我一直在寫履歷。然而,有些文字超越了一行。例如,這裡的“論文主題”超出了單行,如下所示:
這是代碼:
\documentclass[10pt]{article}
\usepackage{calc}
\reversemarginpar
\usepackage[paper=letterpaper,
includefoot, % Uncomment to put page number above margin
marginparwidth=1.2in, % Length of section titles
marginparsep=.05in, % Space between titles and text
margin=0.5in, % 1 inch margins
includemp]{geometry}
\setlength{\parindent}{0in}
\renewcommand{\section}[1]{\pagebreak[3]%
\vspace{1.3\baselineskip}%
\phantomsection\addcontentsline{toc}{section}{#1}%
\noindent\llap{\scshape\smash{\parbox[t]{\marginparwidth}{\hyphenpenalty=10000\raggedright #1}}}%
\vspace{-\baselineskip}\par}
\begin{document}
\section{Education}
M.S., Civil Engineering, The University of Texas at Austin, Austin, TX\hfill\textbf{Dec 20XX}\\
Thesis: \emph{On Accommodating Spatial Dependence in Bicycle and Pedestrian Injury Counts by Severity Level}\\
Adviser: Dr. ABC
\end{document}
如果我們要編譯此程式碼,論文主題中的「層級」將溢出到下一行。這就是當前的問題。是否有可能使文字適合該行?
感謝您的投入!
答案1
使用\resizebox
及包裝graphicx
。另一個推薦的軟體包是 microtype。例如放在 \usepackage[shrink=100]{microtype}
MWE 的序文中,看看沒有效果\resizebox
\documentclass[10pt]{article}
\usepackage{graphicx}
\usepackage{calc}
\reversemarginpar
\usepackage[paper=letterpaper,
includefoot, % Uncomment to put page number above margin
marginparwidth=1.2in, % Length of section titles
marginparsep=.05in, % Space between titles and text
margin=0.5in, % 1 inch margins
includemp]{geometry}
\setlength{\parindent}{0in}
\renewcommand{\section}[1]{\pagebreak[3]%
\vspace{1.3\baselineskip}%
\phantomsection\addcontentsline{toc}{section}{#1}%
\noindent\llap{\scshape\smash{\parbox[t]{\marginparwidth}{\hyphenpenalty=10000\raggedright #1}}}%
\vspace{-\baselineskip}\par}
\begin{document}
\section{Education}
M.S., Civil Engineering, The University of Texas at Austin, Austin, TX\hfill\textbf{Dec 20XX}\\
\resizebox{\textwidth}{!}{Thesis: \emph{On Accommodating Spatial
Dependence in Bicycle and Pedestrian Injury
Counts by Severity Level}\\
}
Thesis: \emph{On Accommodating Spatial Dependence in Bicycle and Pedestrian Injury Counts by Severity Level}\\
Adviser: Dr. ABC
\end{document}