但我想让它像或者一些时尚的东西,但我必须在章节名称和章节的起始实际内容之间写一些文字。
有人能告诉我怎么做吗?例如,我想在开始章节实际内容之前在标题下方添加一些文本。谢谢您的帮助。
我正在使用以下环境
\documentclass[thesis,a4paper,11pt]{ucdThesis}
\setlength{\topskip}{10mm}
\usepackage{amsmath}
\usepackage{fancyhdr}
\usepackage{relsize}
\usepackage{booktabs}
\usepackage{hyperref}
\usepackage{calc}
\setlist[itemize]{align=parleft,left=0pt..1.3em}
\setlist{labelwidth=\widthof{0.},leftmargin={\labelwidth+\labelsep},rightmargin=\leftmargin}
\SetNlSty{}{}{.}
\pgfplotsset{compat=newest,compat/show suggested version=false}
\setlength{\parskip}{0mm}
\raggedbottom
\setlength\abovedisplayskip{2pt}
\setlength\belowdisplayskip{2pt}
\setlength{\parindent}{0em}
\setlength{\parskip}{0.5em}
\parindent0mm
\pagestyle{fancy}
\fancyhead[C]{\rule{.4\textwidth}{4\baselineskip}}
\setlength{\headheight}{27.23802pt}
\makeatletter
\definecolor{oiGB}{rgb}{.01,.01,.01}
\definecolor{myblue}{RGB}{0, 128, 128}
\refstepcounter{mybibcounter}\themybibcounter. }
\renewcommand*{\acsfont}[1]{\textcolor{myblue}{#1}}
\hypersetup{colorlinks=true,linkcolor=myblue,urlcolor=myblue,citecolor=myblue,}
\newcommand{\eqnumcolor}{\color{myblue}}
\let\mytagform@=\tagform@
\def\tagform@#1{\maketag@@@{\color{myblue}(#1)}}
\makeatother
\newcommand\myatop[2]{\genfrac{}{}{0pt}{}{#1\hfill}{#2\hfill}}
\pagestyle{fancy}
\lhead{}
\chead{}
\rhead{\fancyplain{}{\textit{\leftmark}}}
\begin{document}
\pagenumbering{alph}
\addToPDFBookmarks{0}{Front Matter}{rootNode}
\addToPDFBookmarks{1}{Title}{a}
\makeTitlePage
\pagenumbering{roman}
\setcounter{page}{2}
\makeCopyrightPage
\addToPDFBookmarks{1}{Collaborations}{a}
\include{collaborations}
\addToPDFBookmarks{1}{Dedication}{b}
\include{dedication}
\addToPDFBookmarks{1}{Acknowledgements}{c}
\include{acknowledgements}
\addToPDFBookmarks{1}{Abstract}{d}
\include{abstract}
\addToPDFBookmarks{1}{List of Publications}{e}
\include{publications}
\addToPDFBookmarks{0}{Table of Contents}{f}
{
\hypersetup{linkcolor={oiGB}}
\tableofcontents
}
\addToTOC{List of Tables}
{
\hypersetup{linkcolor={oiGB}}
\listoftables
}
\addToTOC{List of Figures}
{
\hypersetup{linkcolor={oiGB}}
\listoffigures
}
\addToPDFBookmarks{0}{Nomenclature}{g}
\cleardoublepage
\newpage
\pagenumbering{arabic}
\setcounter{page}{1}
\include{chapter1}
\include{chapter2}
\include{chapter3}
\include{chapter4}
\include{chapter5}
\include{chapter6}
\include{chapter7}
\include{chapter8}
\include{chapter9}
\include{chapter10}
\bibliographystyle{apalike}
\bibliography{Thesis}
\end{document}
答案1
像这样吗?
\documentclass{book}
\usepackage{blindtext}
\usepackage{titlesec}
\titleformat{\chapter}{\bfseries\Huge}{{\thechapter}}{1em}{}
\newcommand{\chapterwithdesc}[2]{\chapter{#1}\hrule\vspace{1em}\begin{center}\begin{minipage}{0.7\linewidth}\bfseries#2\end{minipage}\end{center}\hrule\vspace{4em}}
\begin{document}
\chapterwithdesc{Chapter name}{Summary of chapter goes here. \blindtext}
Chapter content. \blindtext
\end{document}
输出:
编辑
基于fncychap
包的更奇特的解决方案。
\documentclass{book}
\usepackage{blindtext}
\usepackage[Bjornstrup]{fncychap}
\newcommand{\chapterwithdesc}[2]{\chapter{#1}\hrule\vspace{1em}\begin{center}\begin{minipage}{0.7\linewidth}\bfseries#2\end{minipage}\end{center}\hrule\vspace{4em}}
\begin{document}
\chapterwithdesc{Chapter name}{Summary of chapter goes here. \blindtext}
Chapter content. \blindtext
\end{document}
输出: