我找到了这个论文章节题词的可爱格式代码由 @Pluton 发布。我真的很喜欢这个外观,但它有点“笨重”,占用了很多空白。我也不喜欢每个题词下方的黑条。我的意思是,从视觉上看它还可以,但我希望一切都更紧凑、更干净,占用更少的空间。
编辑:我忘了说,我怀疑引号这么大是因为
\doublespace
我尝试将花哨的引号代码包装在
\begin{singlespacing}
\end{singlespacing}
这不起作用。
以下是 MWE 的链接但我也提供了下面的大部分代码。
如您所见,两个相对较短的题词占用了大量空白。代码在屏幕截图之后。标题故意占用了两行,因为大多数论文章节标题都这么长。救命!?!?
软件包:
\documentclass[12pt,twoside]{report}
\usepackage{appendix}
\graphicspath{ {Images/} }
\usepackage{amsmath}
\usepackage{txfonts}
\usepackage{lipsum}
\usepackage{textcomp}
\usepackage{tocloft}
\usepackage{csquotes}
\usepackage{adjustbox}
\usepackage[backend=bibtex,style=verbose,
bibencoding=ascii,
citestyle=authoryear,doi=false,url=false,isbn=false]{biblatex}
\usepackage{setspace}
\usepackage{booktabs}
\usepackage{float}
\usepackage{stackengine}
\usepackage[bottom]{footmisc}
\usepackage{titlesec}
\usepackage{epigraph}
\usepackage{times}
\usepackage{microtype}
\usepackage{xcolor}
\makeatletter
\usepackage{hyperref}
接下来是定义论文页面样式和布局的代码。我认为它与这个问题无关,所以我省略了。它在上面链接的 MWE 中。
%%%%%%Begin fancy quotes code below from @Pluton%%%%%%
\definecolor{quotemark}{gray}{0.7}
\makeatletter
\def\fquote{%
\@ifnextchar[{\fquote@i}{\fquote@i[]}%]
}%
\def\fquote@i[#1]{%
\def\tempa{#1}%
\@ifnextchar[{\fquote@ii}{\fquote@ii[]}%]
}%
\def\fquote@ii[#1]{%
\def\tempb{#1}%
\@ifnextchar[{\fquote@iii}{\fquote@iii[]}%]
}%
\def\fquote@iii[#1]{%
\def\tempc{#1}%
\vspace{1em}%
\noindent%
\begin{list}{}{%
\setlength{\leftmargin}{0.1\textwidth}%
\setlength{\rightmargin}{0.1\textwidth}%
}%
\item[]%
\begin{picture}(0,0)%
\put(-15,-5){\makebox(0,0){\scalebox{3}{\textcolor{quotemark}{``}}}}%
\end{picture}%
\begingroup\itshape}%
%%%%********************************************************************
\def\endfquote{%
\endgroup\par%
\makebox[0pt][l]{%
\hspace{0.8\textwidth}%
\begin{picture}(0,0)(0,0)%
\put(15,15){\makebox(0,0){%
\scalebox{3}{\color{quotemark}''}}}%
\end{picture}}%
\ifx\tempa\empty%
\else%
\ifx\tempc\empty%
\hfill\rule{100pt}{0.5pt}\\\mbox{}\hfill\tempa,\ \emph{\tempb}%
\else%
\hfill\rule{100pt}{0.5pt}\\\mbox{}\hfill\tempa,\ \emph{\tempb},\ \tempc%
\fi\fi\par%
\vspace{0.5em}%
\end{list}%
}%
\makeatother
该文件的其余部分如下:
\begin{document}
\addcontentsline{toc}{chapter}{Certificate of Examination}
\newpage
\addcontentsline{toc}{chapter}{Co-Authorship Statement}
\addcontentsline{toc}{chapter}{Abstract}
\Large\begin{center}\textbf{Abstract}\end{center}\normalsize
This is a really silly abstract.
\vfill
\textbf{Keywords:} Time series analysis, data mining
\newpage
\tableofcontents\newpage
\newpage
\addcontentsline{toc}{chapter}{List of Figures}
\listoffigures
\newpage
\addcontentsline{toc}{chapter}{List of Tables}
\listoftables\newpage
\addcontentsline{toc}{chapter}{List of Appendices}
\addcontentsline{toc}{chapter}{List of Abbreviations, Symbols, and Nomenclature}
\large List of Abbreviations, Symbols, and Nomenclature \normalsize
\newpage
%Code for making the chapter headings look nice
\titleformat{\chapter}[display]
{\normalfont\Large\raggedleft}
{\MakeUppercase{\chaptertitlename}%
\rlap{ \resizebox{!}{1.5cm}{\thechapter} \rule{5cm}{1.5cm}}}
{10pt}{\Huge}
\titlespacing*{\chapter}{0pt}{30pt}{20pt}
\doublespace
\raggedbottom
% Actual chapter content below
\chapter[Short version of the title]{Longer version of the title that I want to make long enough to fit on two lines}
\begin{fquote}[Sarah Jones][Terminal cardiac failure][1901]Lorum ipsum arcu libero, nonummy eget, consectetuer id, vulputate a, magna.Donec vehicula augue eu neque. Pellentesque habitant morbi tristiquesenectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Crasviverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. \nocite{Jones1995}
\end{fquote}
\begin{fquote}[Smith][The Grim Reaper Service][1901] Lorum ipsum arcu libero, nonummy eget, consectetuer id, vulputate a, magna.Donec vehicula augue eu neque. Pellentesque habitant morbi tristiquesenectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Crasviverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices.
\end{fquote}
\section{Background}
\lipsum
\begin{center}
\end{center}
\printbibliography
\addcontentsline{toc}{chapter}{Bibliography}
\begin{appendices}
\input{AppendixA}
\end{appendices}
\end{document}
答案1
第一条评论:天哪,这个模板是……(自己填写;-))
% MY CHANGE
我做了一些更改并用或标记MY ADDITION
,但我无法解决任何问题......
\singlespacing
没有环境→在\fquote
宏中添加命令- 添加了一些长度,以便更容易地更改栏高和栏宽
- 删除了章节标题中的栏(
titleformat
)并将其放在epigraph
\documentclass[12pt,twoside]{report}
\usepackage{appendix}
\usepackage{amsmath}
\usepackage{txfonts}
\usepackage{lipsum}
\usepackage{textcomp}
\usepackage{tocloft}
\usepackage{csquotes}
\usepackage{adjustbox}
\usepackage[backend=bibtex,style=verbose,
bibencoding=ascii,
citestyle=authoryear,doi=false,url=false,isbn=false]{biblatex}
\usepackage{setspace}
\usepackage{booktabs}
\usepackage{float}
\usepackage{stackengine}
\usepackage[bottom]{footmisc}
\usepackage{titlesec}
\usepackage{epigraph}
\usepackage{times}
\usepackage{microtype}
\usepackage{xcolor}
\usepackage{tocbibind} % MY ADDITION
\usepackage{hyperref}
\makeatletter
%% Define the "thesis" page style.
\if@twoside % If two-sided printing.
\def\ps@thesis{\let\@mkboth\markboth
\def\@oddfoot{}
\let\@evenfoot\@oddfoot
\def\@oddhead{
{\sc\rightmark} \hfil \rm\thepage
}
\def\@evenhead{
\rm\thepage \hfil {\sc\leftmark}
}
\def\chaptermark##1{\markboth{\ifnum \c@secnumdepth >\m@ne
Chapter\ \thechapter. \ \fi ##1}{}}
\def\sectionmark##1{\markright{\ifnum \c@secnumdepth >\z@
\thesection. \ \fi ##1}}}
\else % If one-sided printing.
\def\ps@thesis{\let\@mkboth\markboth
\def\@oddfoot{}
\def\@oddhead{
{\sc\rightmark} \hfil \rm\thepage
}
\def\chaptermark##1{\markright{\ifnum \c@secnumdepth >\m@ne
Chapter\ \thechapter. \ \fi ##1}}}
\fi
\pagestyle{thesis}
% Set up page layout.
\setlength{\textheight}{9in} % Height of the main body of the text
\setlength{\topmargin}{-.5in} % .5" margin on top of page
\setlength{\headsep}{.5in} % space between header and top of body
\addtolength{\headsep}{-\headheight} % See The LaTeX Companion, p 85
\setlength{\footskip}{.5in} % space between footer and bottom of body
\setlength{\textwidth}{6.25in} % width of the body of the text
\setlength{\oddsidemargin}{.25in} % 1.25" margin on the left for odd pages
\setlength{\evensidemargin}{0in} % 1.25" margin on the right for even pages
% Marginal notes
\setlength{\marginparwidth}{.75in} % width of marginal notes
\setlength{\marginparsep}{.125in} % space between marginal notes and text
\setcounter{tocdepth}{3} % Number the subsubsections
\def\normalspacing{1.25} % default line spacing
%%%%%%Begin fancy quotes code below from @Pluton%%%%%%
\definecolor{quotemark}{gray}{0.7}
\makeatletter
\def\fquote{%
\@ifnextchar[{\fquote@i}{\fquote@i[]}%]
}%
\def\fquote@i[#1]{%
\def\tempa{#1}%
\@ifnextchar[{\fquote@ii}{\fquote@ii[]}%]
}%
\def\fquote@ii[#1]{%
\def\tempb{#1}%
\@ifnextchar[{\fquote@iii}{\fquote@iii[]}%]
}%
\def\fquote@iii[#1]{%
\def\tempc{#1}%
\vspace{1em}%
\noindent%
\singlespacing % MY ADDITION
\begin{list}{}{%
\setlength{\leftmargin}{0.1\textwidth}%
\setlength{\rightmargin}{0.1\textwidth}%
}%
\item[]%
\begin{picture}(0,0)%
\put(-15,-5){\makebox(0,0){\scalebox{3}{\textcolor{quotemark}{``}}}}%
\end{picture}%
\begingroup\itshape}%
%%%% ********************************************************************
\def\endfquote{%
\endgroup\par%
\makebox[0pt][l]{%
\hspace{0.8\textwidth}%
\begin{picture}(0,0)(0,0)%
\put(15,15){\makebox(0,0){%
\scalebox{3}{\color{quotemark}''}}}%
\end{picture}
}%
\ifx\tempa\empty%
\else%
\ifx\tempc\empty%
\hfill\rule{100pt}{0.5pt}\\\mbox{}\hfill\tempa,\ \emph{\tempb}%
\else%
\hfill\rule{100pt}{0.5pt}\\\mbox{}\hfill\tempa,\ \emph{\tempb},\ \tempc%
\fi\fi\par%
\vspace{0.5em}%
\end{list}%
\hfill\rlap{\rule{\chapterbarwidth}{\chapterbarheight}} % MY ADDITION
}%
\makeatother
\newlength{\chapterbarheight}
\newlength{\chapterbarwidth}
\setlength{\chapterbarheight}{1cm} % MY ADDITION
\setlength{\chapterbarwidth}{5cm} % MY ADDITION
\begin{document}
\addcontentsline{toc}{chapter}{Certificate of Examination}
\newpage
\addcontentsline{toc}{chapter}{Co-Authorship Statement}
\addcontentsline{toc}{chapter}{Abstract}
\begin{center}
\Large \textbf{Abstract}
\end{center}
This is a really silly abstract.
\vfill
\textbf{Keywords:} Time series analysis, data mining
\newpage
\tableofcontents\newpage
\newpage
%\addcontentsline{toc}{chapter}{List of Figures}
\listoffigures
\newpage
%\addcontentsline{toc}{chapter}{List of Tables}
\listoftables\newpage
\addcontentsline{toc}{chapter}{List of Appendices}
\addcontentsline{toc}{chapter}{List of Abbreviations, Symbols, and Nomenclature}
\large List of Abbreviations, Symbols, and Nomenclature \normalsize
\newpage
%Code for making the chapter headings look nice
\titleformat{\chapter}[display]
{\normalfont\Large\raggedleft}
{\MakeUppercase{\chaptertitlename}%
\rlap{ \resizebox{!}{\chapterbarheight}{\thechapter}}% % MY CHANGE
}%
{10pt}{\Huge}
\titlespacing*{\chapter}{0pt}{30pt}{20pt}
\doublespace % Really??? \Doublespace??
\raggedbottom
% Actual chapter content below
\chapter[Short version of the title]{Longer version of the title that I want to make long enough to fit on two lines}
\begin{fquote}[Sarah Jones][Terminal cardiac failure][1901]Lorum ipsum arcu libero, nonummy eget, consectetuer id, vulputate a, magna.Donec vehicula augue eu neque. Pellentesque habitant morbi tristiquesenectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Crasviverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices.
\end{fquote}
\begin{fquote}[Smith][The Grim Reaper Service][1901] Lorum ipsum arcu libero, nonummy eget, consectetuer id, vulputate a, magna.Donec vehicula augue eu neque. Pellentesque habitant morbi tristiquesenectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Crasviverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices.
\end{fquote}
\section{Background}
\lipsum
\begin{center}
\end{center}
\addcontentsline{toc}{chapter}{Bibliography}
\begin{appendices}
\end{appendices}
\end{document}