的文件题词包提到不支持部分页面上的题词并提供了替代方案,但这不允许插入带有引文和作者的常规题词,只能插入引文部分。如何在部分而不是章节中插入看起来像章节题词的常规题词?注意:如果不是epigraph
最适合这项工作的包,我完全愿意使用其他包。我检查了现有的答案,但它们要么是关于没有作者姓名的题词,要么是关于其他文档类型(例如memoir
,不是book
)。
答案1
使用来自的代码 https://tex.stackexchange.com/a/262892/161015
我发现\cleardoublepage
该部分的题词前需要一个。
\documentclass[12pt,a4paper]{book}
\usepackage{epigraph}
\usepackage{titlesec}
\usepackage{xpatch}
\usepackage{kantlipsum} % dumy text
%%% from https://tex.stackexchange.com/a/262892/161015
\titleformat{\part}[display]
{\filleft\fontsize{40}{40}\selectfont\scshape}
{\fontsize{90}{90}\selectfont\thepart}
{20pt}
{\thispagestyle{epigraph}}
\setlength\epigraphwidth{.6\textwidth}
\makeatletter
\xpatchcmd\epigraphhead
{\let\@evenfoot}
{\let\@oddfoot\@empty\let\@evenfoot}
{}{}
\makeatother
% **********************************
\begin{document}
\chapter*{Celestial navigation}
\epigraphhead[70]{\epigraph{Star crossed lovers.}{\textit{The Bard}}}
\kant[1-5]
\section{General}
\epigraph{Example is the school of mankind,and they will learn at no other.}%
{\textit{Letters on a Regicide Peace}\\ \textsc{Edmund Burke}}
\kant[5]
\cleardoublepage % needed <<<<<<<<<<<<<<<<<<<
\epigraphhead[450]{Fairy tales are more than true: not because they tell us that dragons exist, but because they tell us dragons can be beaten.\par\rule[0.7ex]{\epigraphwidth}{.4pt} \par \hfill\textsc{C.K. Chesterton}}
\part{Part title}
\kant[8]
\end{document}
答案2
问题是\part{title}
紧接着以 结尾newpage
。以下 MWE 显示了如何在\part
标题之前和之后放置题词。
% epipartprob.tex SE 599262
\documentclass[a4paper]{book}
\usepackage{epigraph}
\usepackage{lipsum}
\makeatletter
\renewcommand{\@endpart}{} % don't force a \newpage after the part title
\makeatother
\begin{document}
\chapter{Celestial navigation}
\epigraph{Star crossed lovers.}{\textit{The Bard}}
\lipsum[1]
\section{General}
\epigraph{Example is the school of mankind,and they will learn at no other.}%
{\textit{Letters on a Regicide Peace}\\ \textsc{Edmund Burke}}
\lipsum[2]
\section{Apart}
\epigraph{The whole is more than the sum of the parts}{\textit{Metaphysica}\\ Aristotle}
\lipsum[3]
%% put epigraphs before and after the part title
\part{Part title}
\epigraph{The whole is more than the sum of the parts (I)}{\textit{Metaphysica}\\ Aristotle}
\epigraphhead[150]{\epigraph{The whole is more than the sum of the parts (II)}{\textit{Metaphysica}\\ Aristotle}}
\newpage % now go to the next page
\lipsum[3]
\part{Second}
% DON't FORGET THE \newpage
\newpage
\lipsum[4]
\end{document}