# Left align title in moderncv style casual

I want to align left the title (which is "Curriculum Vitae") under the horizontal line. I also want it not to be Italic. So my name above the horizontal line in the left side and the title under the line again in the left.

• I am using moderncv style casual. – Roozbeh May 13 '13 at 12:35
• Welcome to TeX.SX! You may have a look on our starter guide. Can you show us what you have (please delete personal informations)? Seeing your code we can better help you. See minimal working example (MWE) for more information ... – Mensch May 13 '13 at 12:36
• I don't understand how should i post my template. It is too complicated. My problem is just as follows: I used Moderncv style casual. I used the rule from this website to put photo on the right and name on the left. Now everything is OK, my fist and last name are in the left of the header above the horizontal line, my photo in the right of header above the horizontal line (actually I removed the photo), and title (which is "Curriculum Vitae") is under the horizontal line but in the right side. I just want title to be in the left side under horizontal line just under my Name. – Roozbeh May 13 '13 at 14:20
• If necessary, shall I just email you the .tex file? – Roozbeh May 13 '13 at 14:22
• \firstname{Roozbeh} \familyname{Sasan} \title{Curriculum Vitae} % name % \parbox[b]{\textwidth-\makecvtitlepicturewidth}{% { \raggedright\namefont{\color{color2!50}\@firstname} {\color{color2}\@familyname}}%\lastname -> error \hfill\usebox{\makecvtitlepicturebox}% % \parbox[b]{\textwidth-\makecvtitlepicturewidth}{% % \raggedleft\namefont{\color{color2!50}\@firstname} {\color{color2}\@lastname}}%\familyname \[-.35em]% {\color{color2!50}\rule{\textwidth}{.25ex}}% % optional title \ifthenelse{\equal{\@title}{}}{}{\[1.25em]\null\hfill\titlestyle{\@title}}\[2.5em]% – Roozbeh May 13 '13 at 17:59

Font styling of elements like title are controlled by corresponding commands of the form \titlefont. The default in your case is \LARGE\mdseries\slshape. So to get upright, replace the latter by \upshape. For the positioning the title, I am afraid you have to copy the style file's definition of \makecvtitle and remove the \hfill before the title insertion. As this definition includes internal commands with @ in them, you have to enclose the redifinition in a \makeatletter/\makeother pair.

\documentclass{moderncv}

\usepackage{moderncvstylecasual}

\firstname{Roozbeh} \familyname{Sasan} \title{Curriculum Vitae}

\renewcommand*{\titlefont}{\LARGE\mdseries\upshape}

\makeatletter
\renewcommand*{\makecvtitle}{%
% recompute lengths (in case we are switching from letter to resume, or vice versa)
\recomputecvlengths%
% ensure footer with personal information
\makecvfooter%
% optional picture
\newbox{\makecvtitlepicturebox}%
\savebox{\makecvtitlepicturebox}{%
\ifthenelse{\isundefined{\@photo}}%
{}%
{%
\setlength\fboxrule{\@photoframewidth}%
\ifdim\@photoframewidth=0pt%
\setlength{\fboxsep}{0pt}\fi%
{\color{color1}\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}}%
\usebox{\makecvtitlepicturebox}%
% name
\@initializelength{\makecvtitlepicturewidth}%
\settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}%
\parbox[b]{\textwidth-\makecvtitlepicturewidth}{%
\raggedleft\namefont{\color{color2!50}\@firstname} {\color{color2}\@familyname}}\\[-.35em]%
{\color{color2!50}\rule{\textwidth}{.25ex}}%
% optional title
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\null\titlestyle{\@title}}\\[2.5em]  % optional quote
\ifthenelse{\isundefined{\@quote}}%
{}%
{{\null\hfill\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\hfill\null\\[2.5em]}}%
\par}%
\makeatother

\begin{document}
\makecvtitle
Test.
\end{document}


ADDED in response to comment: To make similar adjustments for the name, look at the lines containing \@firstname. Changing \raggedleft to \raggedright there will make the name left aligned. Finally removing the \color commands will give you black text. These lines then become:

\parbox[b]{\textwidth-\makecvtitlepicturewidth}{%
\raggedright\namefont{\@firstname} {\@familyname}}\\[-.35em]%
{\rule{\textwidth}{.25ex}}%


and a complete document is:

\documentclass{moderncv}

\usepackage{moderncvstylecasual}

\firstname{Roozbeh} \familyname{Sasan} \title{Curriculum Vitae}

\renewcommand*{\titlefont}{\LARGE\mdseries\upshape}

\makeatletter
\renewcommand*{\makecvtitle}{%
% recompute lengths (in case we are switching from letter to resume, or vice versa)
\recomputecvlengths%
% ensure footer with personal information
\makecvfooter%
% optional picture
\newbox{\makecvtitlepicturebox}%
\savebox{\makecvtitlepicturebox}{%
\ifthenelse{\isundefined{\@photo}}%
{}%
{%
\setlength\fboxrule{\@photoframewidth}%
\ifdim\@photoframewidth=0pt%
\setlength{\fboxsep}{0pt}\fi%
{\color{color1}\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}}%
\usebox{\makecvtitlepicturebox}%
% name
\@initializelength{\makecvtitlepicturewidth}%
\settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}%
\parbox[b]{\textwidth-\makecvtitlepicturewidth}{%
\raggedright\namefont{\@firstname} {\@familyname}}\\[-.35em]%
{\rule{\textwidth}{.25ex}}%
% optional title
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\null\titlestyle{\@title}}\\[2.5em]  % optional quote
\ifthenelse{\isundefined{\@quote}}%
{}%
{{\null\hfill\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\hfill\null\\[2.5em]}}%
\par}%
\makeatother

\begin{document}
\makecvtitle
Test.
\end{document}

• Many Thanks! Just that I like both name and title to be on the left side. Your code placed title on the left while putting name on the right. I also would appreciate if you let me know how to change the color of them (title, name, and the line itself) into black. Thanks in advance! – Roozbeh May 13 '13 at 21:09