我是 Latex 的新手,对于这个非常基本的问题,我提前致歉。
我只是无法让 Latex 正确地断开单词,或者正确地调整单词的间距,以便在文本的右侧有一条直线,采用 Microsoft Word 用户所称的“两端对齐”格式。
相反,我不断收到这些“Overfull /hbox”警告以及这种可怕的效果:
我正在使用Overleaf 中的 AGU 模板。
这段代码重现了这种效果。每个段落都会收到“Overfull \hbox”的警告。
\documentclass[draft]{agujournal2019}
\usepackage{url}
\usepackage{lineno}
\usepackage[inline]{trackchanges}
\usepackage{soul}
\linenumbers
\draftfalse
\journalname{Enter journal name here}
\begin{document}
\title{=enter title here=}
\authors{=list all authors here=}
\affiliation{=number=}{=Affiliation Address=}
\correspondingauthor{=name=}{=email address=}
\section{My Section}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec euismod, purus quis fringilla vulputate, enim metus placerat urna, id varius tortor justo ac leo. Donec a euismod felis.
Nulla venenatis lectus convallis pretium auctor. Phasellus tincidunt lorem quis lacus aliquam, ut fringilla dui pharetra. Quisque imperdiet metus sem, sit amet semper mauris sollicitudin quis.
Vestibulum tortor urna, porttitor sit amet accumsan vitae, faucibus mattis velit. Aliquam mi dolor, vehicula sit amet nunc venenatis, efficitur ultricies eros.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec facilisis vitae turpis ac ornare. Nulla sollicitudin, nunc vehicula vehicula finibus, nulla enim facilisis leo, id rutrum massa nulla ut magna. Sed cursus tincidunt elit, vulputate placerat nisl eleifend eu. Pellentesque venenatis justo ante. Cras eget ullamcorper lectus.
In fermentum fringilla porta. Praesent porta, ipsum nec ultrices porta, elit tortor eleifend ligula, ut sodales urna libero ac lectus. In nec nisl eu eros fermentum consectetur.
Sed sodales massa at elit tincidunt consequat. Donec euismod facilisis mattis. Morbi semper lectus at condimentum convallis. Donec condimentum libero quis velit maximus malesuada. Quisque fermentum tristique venenatis. Pellentesque nec libero augue.
\acknowledgments
Enter acknowledgments, including your data availability statement, here.
\bibliography{ enter your bibtex bibliography filename here }
\end{document}
提供完整(所有辅助文件)可重现的示例这里。
感谢您的建议。
答案1
正如我从原始问题中发布的图片中猜测的那样,类文件有
%% \RaggedRight makes the right margin go in and out; if this is commented out
%% the default will be a right justified margin.
\RequirePackage{ragged2e}
\RaggedRightParindent=24pt
\advance\RaggedRightRightskip 24pt
\RaggedRight
因此,设计使右边距不整齐。当然,您可以禁用此功能(例如,注释掉最后一行),但期刊类的整个目的是消除作者的样式选择并强制执行期刊内部样式。