在我的一个句子的末尾,两个单词被“/”分隔开。该行不对齐。为什么?如何修复?
\documentclass[preprint,12pt]{elsarticle}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{lineno}
\usepackage[colorlinks=true]{hyperref}
\usepackage{natbib}
\usepackage{footnotebackref}
\usepackage{changepage}
\frenchspacing
\usepackage{times}
\makeatletter % <-Added code from here
\def\ps@pprintTitle{%
\let\@oddhead\@empty
\let\@evenhead\@empty
\def\@oddfoot{}%
\let\@evenfoot\@oddfoot}
\makeatother
\usepackage{csquotes}
\MakeOuterQuote{"}
\usepackage{etoolbox}
\patchcmd{\keyword}{\textit}{}{}{}
\usepackage{setspace}
\doublespacing
\begin{document}
With all of good/bad on the one side and versions of reductionism/non-reductionism on the other, I recently dealt with the same task, so here I present my solution: I defined a new columntype Y to center the cells in a tabularx environment. I recently dealt with the same task, so here I present my solution: I defined a new columntype Y to center the cells in a tabularx environment. I recently dealt with the same task, so here I present my solution: I defined a new columntype Y to center the cells in a tabularx environment. I recently dealt with the same task, so here I present my solution: I defined a new columntype Y to center the cells in a tabularx environment.
\end{document}
答案1
TeX 默认被编程为绝不用连字符连接已经包含连字符的单词。在您给出的示例中,问题单词是non-reductionism
,如下方屏幕截图的第一段所示,可以验证这一点。结果是一行内容非常多。
覆盖的一种方法是将指令\hspace{0pt}
直接插入连字符之后,即,将单词写为non-\hspace{0pt}reductionism
。查看中间段落以了解最终效果。
至少对于您提供的段落,和/
之间的(“斜线”)字符的存在实际上是无关紧要的,可以通过比较下面的中间和底部段落来验证;唯一的区别是在底部段落中,两个字符都被宏替换了。reductionism
non-reductionism
/
\slash
如果不喜欢包含两个连字符(其中一个位于行尾)的单词的外观,那么剩下的唯一补救措施就是适当重写该段落。
\documentclass[12pt]{elsarticle}
% (I've retained only the bare essentials...)
\usepackage[english]{babel}
\frenchspacing
\usepackage{times}
\hyphenation{non-re-duc-tion-ism}
\begin{document}
With all of good/bad on the one side and versions of
reductionism/non-reductionism on the other, I recently
dealt with the same task, so here I present my solution:
I defined a new columntype\dots
\medskip
With all of good/bad on the one side and versions of
reductionism/non-\hspace{0pt}reductionism on the other,
I recently dealt with the same task, so here I present
my solution: I defined a new columntype\dots
\medskip
With all of good\slash bad on the one side and versions of
reductionism\slash non-\hspace{0pt}reductionism on the other,
I recently dealt with the same task, so here I present
my solution: I defined a new columntype\dots
\end{document}