是否可以在同一行中放置长标题和名称moderncv
?目前,它看起来像这样:
理想情况下,Juantostos 之后没有换行符。我尝试取消注释,\setlength{\makecvtitlenamewidth}{12cm}
但这是“经典”风格,并且也会出现编译错误
(Undefined control sequence)
。
我正在使用 Overleaf。
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{blue}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.75]{geometry}
%\setlength{\makecvtitlenamewidth}{10cm} % for the 'classic' style, if you want to force the width allocated to your name and avoid line breaks. be careful though, the length is normally calculated to avoid any overlap with your personal info; use this at your own typographical risks...
\usepackage{upgreek}
\usepackage{import}
% personal data
\name{John}{Juanostos Buenos}
\title{Curriculum Vitae}
\address{Something}{Stuff 34 more stuff here}{}
\phone[mobile]{+34 342453533}
\extrainfo{FNAC.: 07/19/1985}
\email{[email protected]}
\begin{document}
\makecvtitle
\end{document}
答案1
以下是一个选项:
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{blue}
\usepackage[scale=0.75]{geometry}
\usepackage{etoolbox,changepage}
\patchcmd{\makehead}% <cmd>
{0.8\textwidth}% <search>
{\linewidth}% <replace>
{}{}% <success><failure>
% personal data
\name{John}{Juanostos Buenos}
\title{Curriculum Vitae}
\address{Something}{Stuff 34 more stuff here}{}
\phone[mobile]{+34 342453533}
\extrainfo{FNAC.: 07/19/1985}
\email{[email protected]}
\begin{document}
% Increase block width by 1cm on both sides
\begin{adjustwidth}{-1cm}{-1cm}
\makecvtitle
X\dotfill X
\end{adjustwidth}
Y\dotfill Y
\end{document}
我们做两件事:
补丁
\makehead
将标题的宽度从 增加到0.8\textwidth
。\linewidth
至少,这会将其设置为\textwidth
。但是,由于\textwidth
是刚性的(或固定的),我们可以......使用
adjustwidth
(来自changepage
)临时增加标题的宽度。
在上面的例子中X.....X
表示用于标题的宽度,以及Y.....Y
后续文本块的宽度。