以下是带有和不带有选项的 epigraph 包flushepinormal
。
\documentclass[12pt]{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[american]{babel}
\usepackage{microtype}
\usepackage{libertine}
\usepackage{epigraph}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setlength{\epigraphrule}{0pt}
\setlength{\epigraphwidth}{1\textwidth}
% \renewcommand{\textflush}{flushepinormal}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\epigraph{To be clever enough to get all that money, one must be stupid enough to want it.}{G.K. Chesterton}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[12pt]{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[american]{babel}
\usepackage{microtype}
\usepackage{libertine}
\usepackage{epigraph}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setlength{\epigraphrule}{0pt}
\setlength{\epigraphwidth}{1\textwidth}
\renewcommand{\textflush}{flushepinormal}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\epigraph{To be clever enough to get all that money, one must be stupid enough to want it.}{G.K. Chesterton}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- 是否可以
flushepinormal
在不造成额外垂直间距的情况下应用? - 一般来说,是否可以控制
epigraph
和之间的垂直间距source
?
答案1
下面的代码(将被放入之后的序言中\usepackage{epigraph}
)为命令添加了一个可选参数\epigraph
,可用于在本地控制一个题词的文本和其源之间的距离。
\epigraph[extra space between text and source]{text}{source}
另外,还有一个参数\interepigraphskip
可以全局修改空间;最初它是零。
\setlength\interepigraphskip{extra space between text and source}
这是必须添加到序言中的代码:
\makeatletter
\newlength\interepigraphskip
\setlength\interepigraphskip{0ex}
\renewcommand\epigraph[3][\interepigraphskip]{\vspace{\beforeepigraphskip}
{\epigraphsize\begin{\epigraphflush}\begin{minipage}{\epigraphwidth}
\@epitext{#2}\\[#1] \@episource{#3}
\end{minipage}\end{\epigraphflush}
\vspace{\afterepigraphskip}}}
\makeatother
这里有一些例子,包括原始帖子的问题。
\documentclass[12pt]{article}
\addtolength\textheight{1cm} % Just to make the examples fit on one page
\usepackage{epigraph}
\makeatletter
\newlength\interepigraphskip
\setlength\interepigraphskip{0ex}
\renewcommand\epigraph[3][\interepigraphskip]{\vspace{\beforeepigraphskip}
{\epigraphsize\begin{\epigraphflush}\begin{minipage}{\epigraphwidth}
\@epitext{#2}\\[#1] \@episource{#3}
\end{minipage}\end{\epigraphflush}
\vspace{\afterepigraphskip}}}
\makeatother
\begin{document}
\paragraph{No extra space:}
\epigraph{To be clever enough to get all that money, one must be stupid enough to want it.}{G.K. Chesterton}
\paragraph{Extra space of 3 ex, locally:}
\epigraph[3ex]{To be clever enough to get all that money, one must be stupid enough to want it.}{G.K. Chesterton}
\paragraph{Setting extra space to 5 ex, globally:}
\setlength\interepigraphskip{5ex}
\epigraph{To be clever enough to get all that money, one must be stupid enough to want it.}{G.K. Chesterton}
\setlength\interepigraphskip{0ex} % Setting parameter back for next examples
\paragraph{Original post, default:}
\setlength{\epigraphrule}{0pt}
\setlength{\epigraphwidth}{1\textwidth}
\epigraph{To be clever enough to get all that money, one must be stupid enough to want it.}{G.K. Chesterton}
\paragraph{Original post, case flushepinormal:}
\renewcommand{\textflush}{flushepinormal}
\epigraph{To be clever enough to get all that money, one must be stupid enough to want it.}{G.K. Chesterton}
\paragraph{Original post, case flushepinormal, space corrected:}
\epigraph[-\baselineskip]{To be clever enough to get all that money, one must be stupid enough to want it.}{G.K. Chesterton}
\end{document}
答案2
这是第一个问题的解决方案。在这种情况下,epigraphflushnormal
您可以通过更改参数来控制文本和源之间的间距\vspace*
:
\documentclass[12pt]{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[american]{babel}
\usepackage{microtype}
\usepackage{libertine}
\usepackage{epigraph}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setlength{\epigraphrule}{0pt}
\setlength{\epigraphwidth}{\textwidth}
\renewcommand\textflush{flushepinormal}
\renewenvironment{flushepinormal}{}{\vspace*{-\baselineskip}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\epigraph{To be clever enough to get all that money, one must be stupid enough to want it.}{G.K. Chesterton}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}