我记得在章节开头看到过一个可以制作类似下图所示的引文的包,但我似乎再也找不到它了。
(此图来自 Harris、Hirst 和 Mossinghoff 所著的《组合学和图论》一书)
答案1
我认为这是包裹epigraph
并且包含在 TeX Live 和 MiKTeX 发行版中。
\documentclass{book}
\usepackage{epigraph}
\begin{document}
\chapter{First Chapter}
\epigraph{I recall seeing a package to make quotes}{Snowball}
\end{document}
答案2
文档memoir
类提供了“开箱即用”的命令\chapterprecis
、\chapterprecishere
和\chapterprecistoc
:
\documentclass{memoir}
\begin{document}
\chapter{Graph Theory}
\chapterprecishere{``Begin at the beginning,¨ the King said gravely, ``and
go on till you come to the end: then stop."\par\raggedleft--- \textup{Lewis
Carroll}, Alice in Wonderland}
\end{document}
作为布伦特·朗伯勒在他的评论中提到,memoir
还提供了一个\epigraph
命令和一个epigraph
环境:
\documentclass{memoir}
\epigraphfontsize{\small\itshape}
\setlength\epigraphwidth{8cm}
\setlength\epigraphrule{0pt}
\begin{document}
\chapter{Graph Theory}
\epigraphfontsize{\small\itshape}
\epigraph{``Begin at the beginning," the King said gravely, ``and go on till you
come to the end: then stop."}{--- \textup{Lewis Carroll}, Alice in Wonderland}
\end{document}
答案3
你也可以自己做:
\documentclass{book}
\makeatletter
\renewcommand{\@chapapp}{}% Not necessary...
\newenvironment{chapquote}[2][2em]
{\setlength{\@tempdima}{#1}%
\def\chapquote@author{#2}%
\parshape 1 \@tempdima \dimexpr\textwidth-2\@tempdima\relax%
\itshape}
{\par\normalfont\hfill--\ \chapquote@author\hspace*{\@tempdima}\par\bigskip}
\makeatother
\begin{document}
\chapter{Graph Theory}
\begin{chapquote}{Lewis Carroll, \textit{Alice in Wonderland}}
``Begin at the beginning,'' the King said, gravely, ``and go on till you
come to an end; then stop.''
\end{chapquote}
\noindent The Pregolya River passes through the city once known as K\"onigsberg. In the 1700s
seven bridges were situated across this river in a manner similar to what you see
in Figure \ldots
\end{document}
上面的 MWE 提供了一个chapquote
环境,它接受一个参数 - 引文的作者。它将引文缩进 2em(默认),但也可以通过可选参数进行更改:
\begin{chapquote}[30pt]{author}
%... your quote
\end{chapquote}
默认设置为\itshape
,其中“作者”右对齐。
答案4
为了完整起见,我提供了以下内容。这可能是您的替代方案。
\documentclass{book}
\usepackage{quotchap}
\begin{document}
\begin{savequote}[0.55\linewidth]
``Don't give up on your dreams, keep on sleeping.''
\qauthor{Higgs Boson (2012 -- present)}
``Stick together team and hold this position!''
\qauthor{Counter Terrorist (1999 -- present)}
\end{savequote}
\chapter{Introduction}
\end{document}
更多励志名言
``If you're an underdog, mentally disabled, physically disabled, if you don't fit in, if you're not as pretty as the others, you can still be a hero, read \TeX Book!''
\qauthor{Bug Buster (2014 -- present)}
``Motivation isn't enough. If you've an idiot and you motivate him, now you've a motivated idiot.''
\qauthor{Stiff Jokes (2014 -- present)}
``Learning (La)\TeX, PSTricks, and PGF/TikZ is similar to learning how to swim or drive a car. You don’t get the full benefit by watching someone else do it. Your own fingers must get involved.''
\qauthor{Donut E. Knot (2014 -- present)}
``Don't be lukewarm! If you cannot be the best, be the worst!''
\qauthor{Code Mocker (2014 -- present)}
``Beauty without intelligence is a masterpiece painted on a toilet paper.''
\qauthor{The Last Error (2014 -- present)}
``For every problem, there is always a solution that is simple, neat, but wrong.''
\qauthor{Weirdstress Function (2014 -- present)}