# aside in XeLaTeX can't break line automatically

I downloaded a resume template and try to modify it. However, when I modify the email address on the left aside. Since my email address is much longer than the previous mail address within the file. So the email address in the generated pdf just stretched to the main content. How to let LaTeX automatically detect line break within the aside panel so I don't need to adjust it by my own? Thank you very much！

Code:

\documentclass[]{friggeri-cv}

\begin{document}
{social network analyst}

% In the aside, each new line forces a line break
\begin{aside}
2925 Dufferin Street
North York
Ontario
~
\href{mailto:songlin.yang@mail.utoronto.ca}{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}

• Why detect automatically? Just break it (wherever you like): \href{mailto:songlin.yang@mail.utoronto.ca}{songlin.yang@\\mail.utoronto.ca} (Note: it will probably look better if you use the colorlinks option.) – jon Feb 6 '15 at 4:36
• But if this happens often, manual line breaking will be inconvenient and even affect the symmetry – sjtupuzhao Feb 6 '15 at 4:46
• Well, without an actual file to test, I can't tell how often it will happen. The snippet you provide suggests that it is using something like \obeylines, so you already are manually breaking your lines. The email address is different because it is one, continuous series of letters, etc. How many other words are going to be about 20+ characters long? – jon Feb 6 '15 at 4:54
• Oh, just tested, \\ doesn't affect the symmetry at all. The builder started to recognize the line width of the aside panel again if the length of words is shorter than the total width of the panel. – sjtupuzhao Feb 6 '15 at 5:25
• I'm not sure what you mean -- is that good or bad? Another idea: do \href{mailto:songlin.yang@mail.utoronto.ca}{songlin.yang@} and on the next line: \href{mailto:songlin.yang@mail.utoronto.ca}{mail.utoronto.ca}. (Not automatic, I know....) – jon Feb 6 '15 at 5:30

\href{mailto:songlin.yang@mail.utoronto.ca}{songlin.yang@ mail.utoronto.ca}

MWE:

\documentclass[]{friggeri-cv}

\begin{document}
{social network analyst}

% In the aside, each new line forces a line break
\begin{aside}
2925 Dufferin Street
North York
Ontario
~
\href{mailto:songlin.yang@mail.utoronto.ca}{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}

Output

Otherwise, you can make more room for the aside environment, patching this environment.

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

MWE:

\documentclass[]{friggeri-cv}

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

\begin{document}
{social network analyst}

% In the aside, each new line forces a line break
\begin{aside}
2925 Dufferin Street
North York
Ontario
~
\href{mailto:songlin.yang@mail.utoronto.ca}{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}

Output: