
Estou usando a classe moderncv (http://www.ctan.org/pkg/moderncv) para escrever meu currículo. Para modificar a seção de endereço, modifiquei moderncvstyleclassic.sty.
Quero que o texto da seção de endereço seja justificado à esquerda (o que funcionou), mas agora tenho o problema de que a primeira linha do endereço (addressstreet) está recuada.
Minha dúvida é: Como evito esse recuo da primeira linha dentro dessa caixa de informações
Até agora não encontrei nenhuma solução para este problema.
Código emmoderncvstyleclassic.stycom minha mudança comentei:
%% code above omitted
% optional detailed information box
\newbox{\makecvtitledetailsbox}%
\savebox{\makecvtitledetailsbox}{%
\addressfont\color{color2}%
\begin{tabular}[b]{@{}l@{}}%% MY MODIFICATION <<-- l for left-justified (instead of "r")
\ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\@addressstreet%\addresssymbol##
\ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}}% if \addresstreet is defined, \addresscity will always be defined but could be empty
\ifthenelse{\isundefined{\@countryinfo}}{}{\makenewline\@countryinfo}%%##moved up to use as country
\ifthenelse{\isundefined{\@mobile}}{}{\makenewline\mobilesymbol\@mobile}%
\ifthenelse{\isundefined{\@phone}}{}{\makenewline\phonesymbol\@phone}%
\ifthenelse{\isundefined{\@fax}}{}{\makenewline\faxsymbol\@fax}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
\ifthenelse{\isundefined{\@homepage}}{}{%
\ifthenelse{\equal{\@homepagetitle}{}}% \homepagetitle could be empty
{\makenewline\homepagesymbol\httplink{\@homepage}}%
{\makenewline\homepagesymbol\httplink[\@homepagetitle]{\@homepage}}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}%##moved up to use as country
\end{tabular}
}%
%% code below omitted
Responder1
Usando a \patchcmd
macro:
\makeatletter
\patchcmd{\makecvtitle}{@{}r@{}}{@{}l@{}}{}{}
\patchcmd{\makecvtitle}{\makenewline\addresssymbol\@addressstreet}{\addresssymbol\@addressstreet\makenewline}{}{}
\makeatother
após a declaração de estilo.
Antes:
Depois:
Ou se você quiser editar manualmente o arquivo .sty (desencorajado), basta alterar de:
\makenewline\addresssymbol\@addressstreet
para:
\addresssymbol\@addressstreet\makenewline
Para colocar também as informações extras abaixo da cidade, use o seguinte conjunto de comandos em vez do anterior:
\makeatletter
\patchcmd{\makecvtitle}{@{}r@{}}{@{}l@{}}{}{}
\patchcmd{\makecvtitle}{\makenewline\addresssymbol\@addressstreet}{\addresssymbol\@addressstreet\makenewline}{}{}
\patchcmd{\makecvtitle}{\makenewline\@extrainfo}{}{}{}
\patchcmd{\makecvtitle}{\ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}{\ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}\makenewline\@extrainfo}{}{}
\makeatother
resultado:
o country
campo é opcional, se você definir address
assim:
\address{street and number}{postcode city}{country}
você terá um país. Caso contrário, assim:
\address{street and number}{postcode city}
você não terá país (como na minha última foto).
MWE completo
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{classic}
\makeatletter
\patchcmd{\makecvtitle}{@{}r@{}}{@{}l@{}}{}{}
\patchcmd{\makecvtitle}{\makenewline\addresssymbol\@addressstreet}{\addresssymbol\@addressstreet\makenewline}{}{}
\patchcmd{\makecvtitle}{\makenewline\@extrainfo}{}{}{}
\patchcmd{\makecvtitle}{\ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}{\ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}\makenewline\@extrainfo}{}{}
\makeatother
\moderncvcolor{blue}
\usepackage[scale=0.75]{geometry}
% personal data
\name{John}{Doe}
\title{Resumé title}
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890}
\phone[fixed]{+2~(345)~678~901}
\phone[fax]{+3~(456)~789~012}
\email{[email protected]}
\homepage{www.johndoe.com}
\social[linkedin]{john.doe}
\social[twitter]{jdoe}
\social[github]{jdoe}
\extrainfo{additional information}
\photo[64pt][0.4pt]{picture}
\quote{Some quote}
\begin{document}
\makecvtitle
\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
\end{document}