如何在 moderncv 中移动日期列?

如何在 moderncv 中移动日期列?

我正在使用moderncv{classic}并希望将日期列切换到右侧。我假设我可以使用 \renewcommand 来实现,但我不确定如何操作。有什么建议吗?

梅威瑟:

\documentclass[11pt,a4paper]{moderncv}    

% moderncv themes
%\moderncvtheme[blue]{casual}                 % optional argument are 'blue' (default), 'orange', 'red', 'green', 'grey' and 'roman' (for roman fonts, instead of sans serif fonts)
\moderncvtheme[blue]{classic}                % idem

\renewcommand*{\cventry}[7][.25em]{%
  \cvitem[#1]{#2}{%
    {\bfseries#3}%
\ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}% I changed this line (with comma) ...
%\ifthenelse{\equal{#4}{}}{}{ {\slshape#4}}% ... into this one (without comma).
\ifthenelse{\equal{#5}{}}{}{, #5}%
\ifthenelse{\equal{#6}{}}{}{, #6}%
\strut%
\ifx&#7&%
  \else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}


\usepackage[T1]{fontenc}
% character encoding
\usepackage[utf8x]{inputenc}                   % replace by the encoding you are using
\usepackage[italian]{babel}
\usepackage{multicol}%to make columned lists
\usepackage{pifont}
\renewcommand{\labelitemi}{\ding{40}}%changes bullets to ding40 which is an airplane

% adjust the page margins
\usepackage[scale=0.8]{geometry}
\recomputelengths                             % required when changes are made to page layout lengths

\fancyfoot{} % clear all footer fields
%\fancyfoot[LE,RO]{\thepage}           % page number in "outer" position of footer line
\fancyfoot[RE,LO]{\footnotesize } % other info in "inner" position of footer line

% personal data
\firstname{}
\familyname{\\ \\ \namefont Micah Boomhauer}
\title{R\'esum\'e }               % optional, remove the line if not wanted
\address{Imaginationland, SP}{}    % optional, remove the line if not wanted
\mobile{(111)867-5309}                    % optional, remove the line if not wanted
    %\phone{+385 92 2201317}                      % optional, remove the line if not wanted
%\fax{312 996 1491}                          % optional, remove the line if not wanted
\email{[email protected]}                      % optional, remove the line if not wanted
%\extrainfo{additional information (optional)} % optional, remove the line if not wanted
%\photo[84pt]{crop.jpg}          % '64pt' is the height the picture must be resized to and 'picture' is the name of the picture file; optional, remove the line if not wanted

%\quote{\Large"The goal is to turn data into information, and information into insight."-- Carly Fiorina}% Carly Fiorina is ex-CEO of HP. 

%----------------------------------------------------------------------------------
%            content
%----------------------------------------------------------------------------------
\begin{document}
\maketitle

\vspace{-10.8mm}

%Section
\section{Desired Employment and Current Skills}
\cvline{}{\Large Supreme Ruler}
\cvline{}{\small A driven and motivated mastermind with 10+ years of experience}

\vspace{-3mm}

%Section
\section{Experience}

\cventry{Aug 2013 - Current}{Semi-Supreme Ruler}{Colorado}{}{}{Words}


\end{document}    

答案1

您没有具体说明所有其他元素所需的布局,所以我只处理了请求:“将日期列切换到右侧”。

您所需要的只是重新定义以\cvitem交换用于日期和主要内容的列:

\renewcommand*{\cvitem}[3][.25em]{%
  \begin{tabular}{@{}p{\maincolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\hintscolumnwidth}@{}}%
    {#3} &\raggedleft\hintstyle{#2}%
  \end{tabular}%
  \par\addvspace{#1}}

完整示例:

\documentclass[11pt,a4paper]{moderncv}    

% moderncv themes
%\moderncvtheme[blue]{casual}                 % optional argument are 'blue' (default), 'orange', 'red', 'green', 'grey' and 'roman' (for roman fonts, instead of sans serif fonts)
\moderncvtheme[blue]{classic}                % idem

\renewcommand*{\cventry}[7][.25em]{%
  \cvitem[#1]{#2}{%
    {\bfseries#3}%
\ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}% I changed this line (with comma) ...
%\ifthenelse{\equal{#4}{}}{}{ {\slshape#4}}% ... into this one (without comma).
\ifthenelse{\equal{#5}{}}{}{, #5}%
\ifthenelse{\equal{#6}{}}{}{, #6}%
\strut%
\ifx&#7&%
  \else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}
\renewcommand*{\cvitem}[3][.25em]{%
  \begin{tabular}{@{}p{\maincolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\hintscolumnwidth}@{}}%
    {#3} &\raggedleft\hintstyle{#2}%
  \end{tabular}%
  \par\addvspace{#1}}


\usepackage[T1]{fontenc}
% character encoding
\usepackage[utf8x]{inputenc}                   % replace by the encoding you are using
\usepackage[italian]{babel}
\usepackage{multicol}%to make columned lists
\usepackage{pifont}
\renewcommand{\labelitemi}{\ding{40}}%changes bullets to ding40 which is an airplane

% adjust the page margins
\usepackage[scale=0.8]{geometry}
\recomputelengths                             % required when changes are made to page layout lengths

\fancyfoot{} % clear all footer fields
%\fancyfoot[LE,RO]{\thepage}           % page number in "outer" position of footer line
\fancyfoot[RE,LO]{\footnotesize } % other info in "inner" position of footer line

% personal data
\firstname{}
\familyname{\\ \\ \namefont Micah Boomhauer}
\title{R\'esum\'e }               % optional, remove the line if not wanted
\address{Imaginationland, SP}{}    % optional, remove the line if not wanted
\mobile{(111)867-5309}                    % optional, remove the line if not wanted
    %\phone{+385 92 2201317}                      % optional, remove the line if not wanted
%\fax{312 996 1491}                          % optional, remove the line if not wanted
\email{[email protected]}                      % optional, remove the line if not wanted
%\extrainfo{additional information (optional)} % optional, remove the line if not wanted
%\photo[84pt]{crop.jpg}          % '64pt' is the height the picture must be resized to and 'picture' is the name of the picture file; optional, remove the line if not wanted

%\quote{\Large"The goal is to turn data into information, and information into insight."-- Carly Fiorina}% Carly Fiorina is ex-CEO of HP. 

%----------------------------------------------------------------------------------
%            content
%----------------------------------------------------------------------------------
\begin{document}
\maketitle

\vspace{-10.8mm}

%Section
\section{Desired Employment and Current Skills}
\cvline{}{\Large Supreme Ruler}
\cvline{}{\small A driven and motivated mastermind with 10+ years of experience}

\vspace{-3mm}

%Section
\section{Experience}

\cventry{Aug 2013 - Current}{Semi-Supreme Ruler}{Colorado}{}{}{Words}


\end{document}

输出:

在此处输入图片描述

相关内容