我正在尝试完成以下任务:
章节,例如两条细线之间的“Chapter1”,采用 CMCSC10 字体 之后是章节名称,例如“Introduction”,采用 CMR17 字体 CMR12 字体的段落正文
我希望创建一种与文档中相同的格式 这里。
另外,我需要用非常小的字体(比如说 8 )来写页眉和页脚,并用斜体表示褪色的灰白色。
我的 Class 文件如下所示
% report classs for writing thesis
\ProvidesClass{mtechthesis}[2015/05/16 Thesis class]
\NeedsTeXFormat{LaTeX2e}
%\DeclareOption{print}{\def\@cv@print{}}
\DeclareOption*{%
\PassOptionsToClass{\CurrentOption}{report}%
}
\ProcessOptions\relax
\LoadClass{report}
\renewcommand*{\familydefault}{\rmdefault}
% To use graphics
\usepackage{graphicx}
% My Images folder
\graphicspath{{myimages/}}
% To put images between text and positioning
\usepackage{float}
%% paper margins
\usepackage[a4paper,width=150mm,top=25 mm,bottom=25mm]{geometry}
\RequirePackage{titlesec}
\titleformat{\chapter}[display]
{\mdseries\Huge}
{\filleft\Large\chaptertitlename~\thechapter}
{3ex}
{\titlerule\vspace{1.5ex}\filright}
[\vspace{1ex}\titlerule]
我的主要 tex 文件如下所示..
\documentclass[12pt]{mtechthesis}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{}
\fancyhead[LO]{\tiny \textit{My Thesis title}}
% footer page number
\fancyfoot{}
\fancyfoot[RO]{\thepage}
\fancyfoot[LO]{\small \textit{My universityname}}
%header footer font size not working
\renewcommand{\headrulewidth}{0.2pt}
\renewcommand{\footrulewidth}{0.2pt}
\title{
{My thesis Title}\\
{\large University name}\\
{\includegraphics[scale=0.4]{Logo.jpg}}
}
\author{My Name}
\date{May 2015}
\begin{document}
\maketitle
%%unnumbered chapters
\chapter*{ACKNOWLEDGEMENT}
I express my, gratitude
\tableofcontents
% Paragraph spacing and indent
\setlength{\parindent}{4em}
\setlength{\parskip}{1em}
% including chapters from chapters folder
%chapter1
\chapter{Introduction}
\input{chapters/1intro}
%chapter2
\chapter{SDN Architecture}
\input{chapters/2sdnarchitecture}
%chapter3
\chapter{Openflow}
\input{chapters/3Openflow}
\appendix
\chapter{Appendix}
\input{chapters/Appendix}
\end{document}
我是 Latex 新手。请告诉我如何修改我的类文件以实现上述规格和效果。
答案1
如果您不提供 MWE,那么我将从纯 TeX 示例开始。所有规范(您提到的)都在此处实现。
\input opmac
\font\smcaps=cmcsc10 \regfont\smcaps
\def\printchap#1{\vfil\break
\headline={\hfil\global\headline={\printheadline}}
\gdef\headtext{#1}
\vglue 30pt
\hrule
\line{\smcaps\thefontsize[17]\vrule height22pt depth10pt width0pt \hfil
\mtext{chap} \dotocnum{\thechapnum}}
\hrule
\vskip20pt
{\typosize[17/22]\rm \hfill #1\nbpar}\mark{}%
\nobreak \vskip2cm \firstnoindent
}
\typosize[12/14]
\def\printheadline{\localcolor\Grey\bi\thefontsize[8]\the\pageno\
\hfil\ \headtext\unskip}
\chap Introduction
This is first chapter
\vfil\break
Next page where the headline occurs...
Lorem ipsum dolor sit amet, consectetuer
adipiscing elit. Ut purus elit, vestibulum ut, placerat ac,
adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu
libero, nonummy eget, consectetuer id, vulputate a, magna.
\bye