XeLaTeX 中的 aside 无法自动换行

XeLaTeX 中的 aside 无法自动换行

下载了一个简历模板,想修改一下,但是修改左边的邮箱地址时,由于我的邮箱地址比文件里的前一个邮箱地址要长很多,所以生成的pdf里的邮箱地址就被拉长到正文里了。如何让LaTeX自动检测左边的换行符,这样我就不用自己调整了?非常感谢!

代码:

\documentclass[]{friggeri-cv}
\addbibresource{bibliography.bib}

\begin{document}
\header{Songlin}{Yang}
       {social network analyst}


% In the aside, each new line forces a line break
\begin{aside}
  \section{about}
    2925 Dufferin Street
    North York
    Ontario
    ~
    \href{mailto:[email protected]}{[email protected]}
    ~
  \section{languages}
    English
    Chinese
  \section{programming}
    {\color{red} $\varheartsuit$} JavaScript
    (ES5, node.js)
    Python, C, OCaml
    CSS3 \& HTML5
\end{aside}

结果

答案1

friggeri-cv.cls下载于http://www.latextemplates.com/template/friggeri-resume-cv

要在您的电子邮件地址中添加空格,您只需在其中添加一个空格即可:

\href{mailto:[email protected]}{songlin.yang@ mail.utoronto.ca}

梅威瑟:

\documentclass[]{friggeri-cv}

\addbibresource{bibliography.bib}

\begin{document}
\header{Songlin}{Yang}
       {social network analyst}


% In the aside, each new line forces a line break
\begin{aside}
  \section{about}
    2925 Dufferin Street
    North York
    Ontario
    ~
    \href{mailto:[email protected]}{songlin.yang@ mail.utoronto.ca}
    ~
  \section{languages}
    English
    Chinese
  \section{programming}
    {\color{red} $\varheartsuit$} JavaScript
    (ES5, node.js)
    Python, C, OCaml
    CSS3 \& HTML5
\end{aside}
\end{document} 

输出

在此处输入图片描述

否则,您可以为aside环境腾出更多空间,修补此环境。

也就是说,在你的序言中添加以下几行:

\patchcmd{\aside}
  {\begin{textblock}{3.6}(1.5, 4.33)}
  {\begin{textblock}{5.3}(0, 4.33)}
  {}{}

梅威瑟:

\documentclass[]{friggeri-cv}

\patchcmd{\aside}
  {\begin{textblock}{3.6}(1.5, 4.33)}
  {\begin{textblock}{5.3}(0, 4.33)}
  {}{}

\addbibresource{bibliography.bib}

\begin{document}
\header{Songlin}{Yang}
       {social network analyst}


% In the aside, each new line forces a line break
\begin{aside}
  \section{about}
    2925 Dufferin Street
    North York
    Ontario
    ~
    \href{mailto:[email protected]}{[email protected]}
    ~
  \section{languages}
    English
    Chinese
  \section{programming}
    {\color{red} $\varheartsuit$} JavaScript
    (ES5, node.js)
    Python, C, OCaml
    CSS3 \& HTML5
\end{aside}
\end{document} 

输出:

在此处输入图片描述

相关内容