带有引文的题词式定义中的换行错误

带有引文的题词式定义中的换行错误

在一个图书项目中,我使用epigraph 题词 doc包含重要引文的包,这些引文应与文本很好地区分开来,并包含来源引文。一切都很好。

我尝试定义类似的东西,为某一节或小节给出类似的引文,称之为“警句”。两个论点是引文的文本和来源。

\newcommand*{\epigram}[2]{%
    {\renewcommand{\baselinestretch}{1}%
    \normalfont\emph{#1}\hfill---#2\par\vspace{1ex}}
    }

我发现这很好,如果源是纯文本\cite(或其他natbib形式,例如,

\epigram{The dominant principle which characterizes my graphic tables and my figurative maps is to make
    immediately appreciable to the eye, as much as possible, the proportions of numeric results. ...
    Not only do my maps speak, but even more, they count, they calculate by the eye.}{\cite{Minard:1862:book}}

渲染效果如下

在此处输入图片描述

但是,如果 mycite包含页面引用,例如

\epigram{At the time, the effect of lithography in the field of duplication was as great as has been the introduction in our time 
of rapid-copying techniques such as Xerox}{\citep[p. 57]{Robinson:1982}}

我在页码前看到了一个不必要的换行符,

在此处输入图片描述

有什么方法可以修改 的定义\epigram以避免这种情况?同样不清楚为什么在第一个例子中,打印的引文没有缩进,但在第二个例子中却缩进。

编辑: 这是一个最小的例子,但不知为何它不起作用——内联 .bib 项无法解析,并且两个epigrams 给出相同的结果,没有说明我在我的书籍项目中遇到的问题。我被难住了。

\documentclass{article}

\usepackage{epigraph}         %% section quotations
\setlength{\epigraphwidth}{.8\textwidth}

% define a short version of an epigraph
\newcommand*{\epigram}[2]{%
    {\renewcommand{\baselinestretch}{1}%
    \normalfont\emph{#1}\hfill---#2\par\vspace{1ex}}
    }

\usepackage[comma]{natbib}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@BOOK{Minard:1862:book,
  title = {Des Tableaux Graphiques et des Cartes Figuratives},
  publisher = {E. Thunot et Cie},
  year = {1862},
  author = {C. J. Minard},
  address = {Paris},
  note = {{\Loc{ENPC: 3386/C161, BNF: Tolbiac, V-16168}; 8 p. and plate(s)}},
  comment = {ENPC no. 36658 (cot 3386) lists this as 1861, n.p.},
  keywords = {tableaux-graphique},
  url = {http://www.edwardtufte.com/tufte/minard-maps}
}
@BOOK{Robinson:1982,
  title = {Early Thematic Mapping in the History of Cartography},
  publisher = {University of Chicago Press},
  year = {1982},
  author = {Arthur H. Robinson},
  address = {Chicago},
  isbn = {0-226-72285-6},
  lccn = {GA201 .R63 1982}
}

}
\end{filecontents}
\bibliographystyle{plain}
\begin{document}

An opening epigraph:

\epigraph{There is, in nature, perhaps nothing older than motion, concerning
which the books written by philosophers are neither few nor small; nevertheless
I have discovered by experiment some properties of it which are worth knowing
and which have not hitherto been either observed or demonstrate}{Galileo,
Dialogues and Mathematical Demonstrations Concerning Two New Sciences (1638)}



\section{First test}
A section epigram that works:

\epigram{The dominant principle which characterizes my graphic tables and my
figurative maps is to make immediately appreciable to the eye, as much as
possible, the proportions of numeric results. ... Not only do my maps speak, but
even more, they count, they calculate by the eye.}{\cite{Minard:1862:book}}


\section{Second test}
One that doesn't:

\epigram{At the time, the effect of lithography in the field of duplication was
as great as has been the introduction in our time of rapid-copying techniques
such as Xerox}{\citep[p. 57]{Robinson:1982}}

\bibliography{\jobname.bib}

\end{document}

编辑2: 啊,这个问题在这个问题中讨论. 使用\mbox{}解决\cite{}该问题

相关内容