我在文章模式下写作,某些段落中的某些行在右侧突出。我在网上看到 LaTeX 默认将文本左右对齐 - 但似乎并非如此?这是我使用的代码。谢谢!
\documentclass[12pt,oneside,a4paper]{article}
\usepackage{color}
\pagestyle{plain}
\usepackage[a4paper]{geometry}
\geometry{left=2.5cm,right=2.5cm,top=1.5in,bottom=1.5in}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{mathpazo}
\usepackage{sgame}
\usepackage{graphicx}
\usepackage{mathtools}
\usepackage{hyperref}
\usepackage{arydshln}
\usepackage{float}
\usepackage{footnote}
\usepackage{lipsum}
\newcommand\blfootnote[1]{%
\begingroup
\renewcommand\thefootnote{}\footnote{#1}%
\addtocounter{footnote}{+1}%
\endgroup
}
\makesavenoteenv{tabular}
\makesavenoteenv{table}
\interfootnotelinepenalty=10000
\renewcommand{\baselinestretch}{1.5}
\makeatother
\begin{document}
I'm writing in article mode and some lines in certain paragraphs stick out on the right. I read online that LaTeX by default aligns text on both left and right. I read online that LaTeX by default aligns text on both left and right - but it doesn't seem to be the case?
As an illustration, two big-budget action movies stood out in summer 2015 : Paramount's {\em Terminator: Genesys}
\end{document}
答案1
您可以手动断词
\documentclass[12pt,oneside,a4paper]{article}
\usepackage{color}
\pagestyle{plain}
\usepackage[a4paper]{geometry}
\geometry{left=2.5cm,right=2.5cm,top=1.5in,bottom=1.5in}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{mathpazo}
\usepackage{sgame}
\usepackage{graphicx}
\usepackage{mathtools}
\usepackage{hyperref}
\usepackage{arydshln}
\usepackage{float}
\usepackage{footnote}
\usepackage{lipsum}
\newcommand\blfootnote[1]{%
\begingroup
\renewcommand\thefootnote{}\footnote{#1}%
\addtocounter{footnote}{+1}%
\endgroup
}
\makesavenoteenv{tabular}
\makesavenoteenv{table}
\interfootnotelinepenalty=10000
\renewcommand{\baselinestretch}{1.5}
\makeatother
\begin{document}
I'm writing in article mode and some lines in certain paragraphs stick out on the right. I read online that LaTeX by default aligns text on both left and right. I read online that LaTeX by default aligns text on both left and right - but it doesn't seem to be the case?
As an illustration, two big-budget action movies stood out in summer 2015 : Para\-mount's {\em Terminator: Genesys}
\end{document}
这种情况并不经常发生,所以我认为手动做事没什么大不了的。
答案2
TeX 尽了最大努力,但有些单词却无法通过连字机制。其中之一是派拉蒙。
这个单词列在了ushyphex.tex
一个大文件中,其中列出了不常见单词的连字符例外情况,以及一些无法正确连字符的常见单词。
该条目列出了para-mount
可能的连字符;添加\hyphenation{para-mount}
在序言中就可以了。
\documentclass[12pt,oneside,a4paper]{article}
\usepackage[a4paper]{geometry}
\geometry{left=2.5cm,right=2.5cm,top=1.5in,bottom=1.5in}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{mathpazo}
\usepackage{sgame}
\usepackage{graphicx}
\usepackage{mathtools}
\usepackage{arydshln}
\usepackage{float}
\usepackage{footnote}
\usepackage{color}
\usepackage{microtype}
\usepackage{lipsum}
\usepackage{hyperref} % should be last
\pagestyle{plain}
\newcommand\blfootnote[1]{%
\begingroup
\renewcommand\thefootnote{}\footnote{#1}%
\addtocounter{footnote}{+1}%
\endgroup
}
\makesavenoteenv{tabular}
\makesavenoteenv{table}
%\interfootnotelinepenalty=10000
%\renewcommand{\baselinestretch}{1.5}
\hyphenation{para-mount}
% maybe also \input{ushyphex}`
\begin{document}
I'm writing in article mode and some lines in certain paragraphs stick out on the right.
I read online that LaTeX by default aligns text on both left and right. I read online
that LaTeX by default aligns text on both left and right - but it doesn't seem to
be the case?
As an illustration, two big-budget action movies stood out in summer 2015:
Paramount's \emph{Terminator: Genesys}
\end{document}
输入\ushyphex
和加载microtype
可能就足够了(或者像示例代码中那样手动添加一些例外)。但是,这并不能保证解决所有段落排版问题:如果一行仍然过满,则需要重新措辞。