段落中引用或参考的框架太高,令人不快

段落中引用或参考的框架太高,令人不快

当引文(或方程式引用)和数学对象出现在段落的同一行时,引文的框架会比正常情况下高。有什么办法可以解决这个问题但保留框架?提前谢谢!

\documentclass{article}
\usepackage{amsmath} 
\usepackage[round]{natbib} 
\usepackage{hyperref} 
\begin{document} 
Since $X_n\overset{p}{\to}X$ as $n\to\infty$, we then have... 

\end{document}

![在此处输入图片描述][1]

答案1

链接的大小取决于与链接在同一行(大致)的其他内容的大小,因此由于您的内联数学运算导致行高变大(确实如此),因此框也会变大。有关该问题的更详细讨论,请参阅以下问题:

作为一种解决方法,您可以将引文或参考文献放入,\mbox但这样会出现链接无法跨行的问题,从而导致框过满。以下是一个例子。(这也是一个如何使用参考书目制作最小示例的例子。)

% !TEX TS-program = pdflatex
% !BIB TS-program = bibtex
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}    
@article{Westerstahl1998,
    Author = {D Westerstahl},
    Journal = {Linguistics and Philosophy},
    Pages = {635-643},
    Title = {On Mathematical Proofs of the Vacuity of Compositionality (Remarks On {Kazmi} and {Pelletier}, {`Is Compositionality Formally Vacuous?'})},
    Volume = {21},
    Year = {1998}}
\end{filecontents}
\usepackage[round]{natbib}
\usepackage{amsmath}
\usepackage{hyperref}
\bibliographystyle{kluwer}
\begin{document}
\parindent=0pt

This is a line that contains a reference \cite{Westerstahl1998}.

This is a line that contains $X_n\overset{L}{\to}X$ as $n\to\infty$ and a reference \cite{Westerstahl1998}.

This is a line that contains $X_n\overset{L}{\to}X$ as $n\to\infty$ and a reference \mbox{\cite{Westerstahl1998}}.

\setlength{\emergencystretch}{2.5em} This is a line that contains $X_n\overset{L}{\to}X$ as $n\to\infty$ and a reference \mbox{\cite{Westerstahl1998}}. 
\bibliography{\jobname}
\end{document}

此文档产生以下警告,因为\mbox包含引文的文本与右边距重叠。我们可以通过增加拉伸来使行换行\emergency,但这会使数学看起来相当丑陋,如第四行所示。

Overfull \hbox (6.43889pt too wide) in paragraph at lines 27--1

代码输出

相关内容