这\foreignlanguage
时,它会在外文文本的开头引入奇怪的水平空格(https://ctan.tetaneutral.net/macros/latex/contrib/llncs/llncsdoc.pdf) 类。默认类不会出现此问题article
。
最小可重现示例:
\documentclass{llncs}
\usepackage[main=french,english]{babel}
\begin{document}
Ceci est \foreignlanguage{english}{a test}.
\end{document}
它如何与常规article
类一起呈现:
\documentclass{article}
\usepackage[main=french,english]{babel}
\begin{document}
Ceci est \foreignlanguage{english}{a test}.
\end{document}
除了负空间之外,我还能做些什么来删除该空间吗?
答案1
该类存在错误,并添加了大量虚假空间。重新定义相关内容并报告错误:
\documentclass{llncs}
\usepackage[main=french,english]{babel}
\makeatletter
\def\switcht@albion{%
\def\abstractname{Abstract.}%
\def\ackname{Acknowledgement.}%
\def\andname{and}%
\def\lastandname{\unskip, and}%
\def\appendixname{Appendix}%
\def\chaptername{Chapter}%
\def\claimname{Claim}%
\def\conjecturename{Conjecture}%
\def\contentsname{Table of Contents}%
\def\corollaryname{Corollary}%
\def\definitionname{Definition}%
\def\examplename{Example}%
\def\exercisename{Exercise}%
\def\figurename{Fig.}%
\def\keywordname{{\bf Keywords:}}%
\def\indexname{Index}%
\def\lemmaname{Lemma}%
\def\contriblistname{List of Contributors}%
\def\listfigurename{List of Figures}%
\def\listtablename{List of Tables}%
\def\mailname{{\it Correspondence to\/}:}%
\def\noteaddname{Note added in proof}%
\def\notename{Note}%
\def\partname{Part}%
\def\problemname{Problem}%
\def\proofname{Proof}%
\def\propertyname{Property}%
\def\propositionname{Proposition}%
\def\questionname{Question}%
\def\remarkname{Remark}%
\def\seename{see}%
\def\solutionname{Solution}%
\def\subclassname{{\it Subject Classifications\/}:}%
\def\tablename{Table}%
\def\theoremname{Theorem}}
\makeatother
\begin{document}
Ceci est \foreignlanguage{english}{a test}.
\end{document}
答案2
如果你想避免编辑本地副本,你可以在阅读课程时忽略行尾
\endlinechar=-1
\documentclass{llncs}
\endlinechar=13
\usepackage[main=french,english]{babel}
\begin{document}
Ceci est \foreignlanguage{english}{a test}.
\end{document}