在枚举环境中,什么样的间距/对齐变化可能会修复这个 hbox 溢出问题?

在枚举环境中,什么样的间距/对齐变化可能会修复这个 hbox 溢出问题?

我计划清理一个大型 TeX 文件,以便在电子阅读器上查看(因此页面尺寸较小),因为我对 TeX 还不熟悉,所以我在示例文件和以下这些说明。但是,我无法使用常见修复。给定以下 TeX(完整文档在末尾):

\begin{enumerate}
\item {\small First Subpoint (Small Font)} 
\item {\tiny Second Subpoint (Tiny Font)} 
\item {\Huge Third Subpoint (Huge Font)} 
\end{enumerate}

糟糕的包装



我尝试调整 \pretolerance,但没有效果,而 \sloppypar 也很马虎: 斯洛皮帕尔



可能最好的外观就是“第三子点”的“常规”间距,左对齐,下一行有“(大字体)”。但我不确定使用什么间距或对齐设置来解决问题(或者为什么行宽“无效”而不凌乱)。任何建议都将不胜感激。谢谢!


\documentclass[10pt]{article}

\usepackage[font=small,labelformat=simple,]{caption} 

\usepackage{titlesec} 
\titleformat{\section}{\itshape\large}{}{0em}{}
\titlespacing{\section}{0pt}{8pt}{4pt}
\titleformat{\subsection}{\itshape}{}{0em}{}
\titlespacing{\subsection}{0pt}{4pt}{2pt}
\titleformat{\subsubsection}[runin]{\bf\scshape}{}{0em}{}
\titlespacing{\subsubsection}{0pt}{5pt}{5pt}

\usepackage[papersize={3.6in,4.8in}, hmargin=0.1in,vmargin={0.1in,0.1in}]{geometry} 

\usepackage{fancyhdr} 
\pagestyle{fancy}
\fancyhead{}            
\fancyfoot{}            

\setlength{\abovecaptionskip}{2pt} 
\setlength{\belowcaptionskip}{0pt} 
\setlength{\textfloatsep}{2pt}     
\setlength{\floatsep}{2pt}         
\setlength{\intextsep}{2pt}        

\usepackage{amssymb,latexsym,amsmath}     % Standard packages
\usepackage{breqn,microtype}

\newtheorem{theorem}{Theorem}
\newenvironment{proof}{\noindent{\bf Proof:}}{$\hfill \Box$}  


\begin{document}

\title{Sample \LaTeX ~File}
\author{David P. Little}
\maketitle

\begin{abstract}
This document represents the output from the file ``sample.tex" once compiled using your favorite \LaTeX compiler.  This file should serve as a good example of the basic structure of a ``.tex" file as well as many of the most basic commands needed for typesetting documents involving mathematical symbols and expressions.  For more of a description on how each command works, please consult the links found on our course webpage.
\end{abstract}


\section{Lists}
\begin{enumerate}
\item {\bf First Point (Bold Face)}
\item {\em Second Point (Italic)}
\item {\Large Third Point (Large Font)}
    \begin{enumerate}
        \item {\small First Subpoint (Small Font)} 
        \item {\tiny Second Subpoint (Tiny Font)} 
        \item {\Huge Third Subpoint (Huge Font)} 
    \end{enumerate}
\item[$\bullet$] {\sf Bullet Point (Sans Serif)}
\item[$\circ$] {\sc Circle Point (Small Caps)} 
\end{enumerate}


\section{Equations}

\subsection{Binomial Theorem}
\begin{theorem}[Binomial Theorem]
For any nonnegative integer $n$, we have
$$(1+x)^n = \sum_{i=0}^n {\binom{n}{i}} x^i$$
\end{theorem}

\subsection{Taylor Series}
The Taylor series expansion for the function $e^x$ is given by
\begin{equation}
e^x = 1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \cdots = \sum_{n\geq 0} \frac{x^n}{n!}
\end{equation}


\subsection{Sets}

\begin{theorem}
For any sets $A$, $B$ and $C$, we have
$$ (A\cup B)-(C-A) = A \cup (B-C)$$
\end{theorem}

\begin{proof}
\begin{eqnarray*}
(A\cup B)-(C-A) &=& (A\cup B) \cap (C-A)^c\\
&=& (A\cup B) \cap (C \cap A^c)^c \\
&=& (A\cup B) \cap (C^c \cup A) \\
&=& A \cup (B\cap C^c) \\
&=& A \cup (B-C)
\end{eqnarray*}
\end{proof}


\section{Tables}
\begin{center}
\begin{tabular}{l||c|r}
left justified & center & right justified \\ \hline
1 & 3.14159 & 5 \\
2.4678 & 3 &  1234 \\ \hline \hline
3.4678 & 6.14159 & 1239
\end{tabular}
\end{center}


\section{A Picture}
\begin{center}
\begin{picture}(100,100)(0,0)
\setlength{\unitlength}{1pt}
\put(20,70){\circle{30}}  \put(20,70){\circle*{10}}   % left eye
\put(80,70){\circle{30}}  \put(80,70){\circle*{10}}   % right eye
\put(40,40){\line(1,2){10}} \put(60,40){\line(-1,2){10}} \put(40,40){\line(1,0){20}} % nose
\put(50,20){\oval(80,10)[b]} % mouth
\multiput(0,90)(4,0){10}{\line(1,3){4}}  % left eyebrow
\multiput(100,90)(-4,0){10}{\line(-1,3){4}}  % right eyebrow
\end{picture}
\end{center}


\end{document}

答案1

当对齐成为一个问题时(典型的是较小的水平空间),使用一种\raggedright方法(可能包括ragged2e) 有时会更好。microtype也可以帮助...

此外,在混合搭配不同字体大小时,请确保设置一个段落(通过明确\par或空行)以便纠正基线跳跃。

相关内容