履歴書を作成中です。ただし、一部のテキストが 1 行を超えています。たとえば、次の図に示すように、「論文のテーマ」が 1 行を超えています。
コードは次のとおりです:
\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}
このコードをコンパイルすると、Thesis topic の「Level」が次の行にオーバーフローします。これが問題です。テキストをその 1 行に収めることは可能ですか?
ご意見ありがとうございます!
答え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}