我正在使用 LyX 撰写论文,遇到了这个奇怪的问题。当我的丹麦语文档中的段落内引用被格式化为英语时(我这样做是为了让拼写检查器适用于英语),会插入这个奇怪的断句:
与未采用英文格式的引用相反:
奇怪的是,如果我将引用的语言改为德语,则不会出现此错误,只有当引用的语言为英语时才会出现。
对于为什么会发生这种情况,有什么建议吗?
编辑:
我已经成功地制作了这个最小的例子:
\documentclass[english,danish]{scrbook}
\usepackage{babel}
\usepackage[unicode=true,pdfusetitle,
bookmarks=true,bookmarksnumbered=true,bookmarksopen=true,bookmarksopenlevel=1,
breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=false]
{hyperref}
\makeatletter
\@ifundefined{date}{}{\date{}}
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
\addto\extrasenglish{%
\renewcommand*{\equationautorefname}[1]{}
\renewcommand{\sectionautorefname}{sec.\negthinspace}
\renewcommand{\subsectionautorefname}{sec.\negthinspace}
\renewcommand{\subsubsectionautorefname}{sec.\negthinspace}
\renewcommand{\figureautorefname}{Fig.\negthinspace}
\renewcommand{\tableautorefname}{Tab.\negthinspace}
}
\begin{document}
Kuhn udvider metaforen i sin karakteristik af udviklingen af paradigmer.
Om videnskabelige nyopdagelse hedder det: \foreignlanguage{english}{``Produced
inadvertedly by a game played under one set of rules, their assimilation
requires the elaboration of another set.''} Videnskabelige nyopdagelse, der i
første omgang forsøges bortforklaret.
\end{document}
从 LyX 论文模板来看,问题显然是这样的:
\addto\extrasenglish{%
\renewcommand*{\equationautorefname}[1]{}
\renewcommand{\sectionautorefname}{sec.\negthinspace}
\renewcommand{\subsectionautorefname}{sec.\negthinspace}
\renewcommand{\subsubsectionautorefname}{sec.\negthinspace}
\renewcommand{\figureautorefname}{Fig.\negthinspace}
\renewcommand{\tableautorefname}{Tab.\negthinspace}
}
这段代码有什么用?如果我删除它,我的工作文档会出现什么问题?
答案1
行末缺少六个注释符号,从而产生了多余的空格。
\documentclass[english,danish]{scrbook}
\usepackage{babel}
\usepackage[unicode=true,pdfusetitle,
bookmarks=true,bookmarksnumbered=true,bookmarksopen=true,bookmarksopenlevel=1,
breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=false]
{hyperref}
\makeatletter
\@ifundefined{date}{}{\date{}}
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
\addto\extrasenglish{%
\renewcommand*{\equationautorefname}[1]{}% <-- This was the first missing comment sign
\renewcommand{\sectionautorefname}{sec.\negthinspace}%
\renewcommand{\subsectionautorefname}{sec.\negthinspace}%
\renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
\renewcommand{\figureautorefname}{Fig.\negthinspace}%
\renewcommand{\tableautorefname}{Tab.\negthinspace}% <-- And this was the last one
}
\makeatother
\begin{document}
Kuhn udvider metaforen i sin karakteristik af udviklingen af paradigmer.
Om videnskabelige nyopdagelse hedder det: \foreignlanguage{english}{``Produced
inadvertedly by a game played under one set of rules, their assimilation
requires the elaboration of another set.''} Videnskabelige nyopdagelse, der i
første omgang forsøges bortforklaret.
\end{document}