3

I'm using komacv (https://www.ctan.org/pkg/komacv) for my resume and want to move the dates column to the right side, similar to that: How to move date column in moderncv? (this only works for moderncv, not for komacv). Any ideas?

Btw. I cannot put the tag "komacv", because of lack of reputation.

Here is a simple example (derived from the example shipped with komacv):

\documentclass[%
]{komacv}

\pagestyle{scrheadings}
\clearscrheadfoot
\ifoot{CV~\firstname~\familyname}
\ofoot{\pagemark/\totalpagemark}
% ===========================
%    FONTS
% ===========================
\addtokomafont{firstnamefont}{\fontsize{35}{50}}

% ===========================
%    BIBLIOGRAPHY
% ===========================
\usepackage[backend=biber,
style=ieee,%authortitle,% 
sorting=ydnt,%
]{biblatex}
\bibliography{komacv.bib}
\defbibheading{bibliography}[Publications]{\section{#1}}

% ===========================
%    PERSONAL DATA
% ===========================
\renewcommand*{\title}{CV}% PDF metadata
\renewcommand*{\firstname}{Jane}
\renewcommand*{\familyname}{Eyre}
\renewcommand*{\acadtitle}{B.\,Ed.}
\renewcommand*{\addressstreet}{Ferndean House}
\renewcommand*{\addresscity}{Ferndean Village}
\renewcommand*{\address}[2]{\addressstreet{#1}\addresscity{#2}}
\renewcommand*{\mobile}{009-87654321}


\begin{document}
\raggedbottom

\maketitle

\section{Personal Information}
\cvitem{Date of birth}{February 15, 1828}

\section{Education}
\cventry{1835--1838}{Homeschooling}{}{Gateshead}{grades 1--3}{Teacher: Mr.~NN, under supervision of my aunt Ms. Reed.}


\end{document}
Schweinebacke
  • 26,336
uiop
  • 43
  • Please note: komacv is not a KOMA-Script class. So the question is not related to KOMA-Script and I removed tag koma-script. – Schweinebacke Apr 19 '17 at 17:00
  • @Schweinebacke Not included in the KOMA bundle, but it uses KOMA-script internally. I would have left the tag. – Johannes_B Apr 23 '17 at 06:38
  • @Johannes_B: But the question is not about a KOMA-Script feature. It's about using komacv. Or would you set the tag latex-kernel for all questions about packages, that use the LaTeX kernel internally? – Schweinebacke Apr 23 '17 at 08:16

1 Answers1

1

The solution depends on the version of komacv. Below you find patches for the versions 2014/08/10 v1.0.1 and 2017/04/17 v1.1.1.


komacv version 2014/08/10 v1.0.1: Add the following lines before \begin{document}:

\usepackage{letltxmacro}
\makeatletter
\LetLtxMacro\origcvitem\cvitem
\renewcommand*{\cvitem}[3][\@afterelementsvspace]{%
  \begin{tabular}{%
      @{}p{\@maincolwidth}%
      @{\hspace{\@sepcolwidth}}p{\@hintscolwidth}@{}%
    }%
    {#3} & \raggedleft\hintstyle{#2}%
  \end{tabular}\\[#1]%
}
\renewcommand\@cvbarsection[1]{%
  \origsection*{
    \phantomsection{}% reset the anchor for hyperrefs
    \addcontentsline{toc}{section}{#1}%
    \origcvitem[0pt]{%
      \raggedleft\hintstyle{\color{@secbarcolor}%
        \rule{\@hintscolwidth}{1ex}}%
    }{\sectionstyle{#1}}
  }% end origsection
} % end cvbarsection
\makeatother

enter image description here

\documentclass[%
]{komacv}

\pagestyle{scrheadings}
\clearscrheadfoot
\ifoot{CV~\firstname~\familyname}
\ofoot{\pagemark/\totalpagemark}
% ===========================
%    FONTS
% ===========================
\addtokomafont{firstnamefont}{\fontsize{35}{50}}

% ===========================
%    BIBLIOGRAPHY
% ===========================
\usepackage[backend=biber,
style=ieee,%authortitle,% 
sorting=ydnt,%
]{biblatex}
\bibliography{komacv.bib}
\defbibheading{bibliography}[Publications]{\section{#1}}

% ===========================
%    PERSONAL DATA
% ===========================
\renewcommand*{\title}{CV}% PDF metadata
\renewcommand*{\firstname}{Jane}
\renewcommand*{\familyname}{Eyre}
\renewcommand*{\acadtitle}{B.\,Ed.}
\renewcommand*{\addressstreet}{Ferndean House}
\renewcommand*{\addresscity}{Ferndean Village}
\renewcommand*{\address}[2]{\addressstreet{#1}\addresscity{#2}}
\renewcommand*{\mobile}{009-87654321}

\usepackage{letltxmacro}
\makeatletter
\LetLtxMacro\origcvitem\cvitem
\renewcommand*{\cvitem}[3][\@afterelementsvspace]{%
  \begin{tabular}{%
      @{}p{\@maincolwidth}%
      @{\hspace{\@sepcolwidth}}p{\@hintscolwidth}@{}%
    }%
    {#3} & \raggedleft\hintstyle{#2}%
  \end{tabular}\\[#1]%
}
\renewcommand\@cvbarsection[1]{%
  \origsection*{
    \phantomsection{}% reset the anchor for hyperrefs
    \addcontentsline{toc}{section}{#1}%
    \origcvitem[0pt]{%
      \raggedleft\hintstyle{\color{@secbarcolor}%
        \rule{\@hintscolwidth}{1ex}}%
    }{\sectionstyle{#1}}
  }% end origsection
} % end cvbarsection

\makeatother

\begin{document}
\raggedbottom

\maketitle

\section{Personal Information}
\cvitem{Date of birth}{February 15, 1828}

\section{Education}
\cventry{1835--1838}{Homeschooling}{}{Gateshead}{grades 1--3}{Teacher: Mr.~NN, under supervision of my aunt Ms. Reed.}


\end{document}

komacv 2017/04/17 v1.1.1: Add the following lines before \begin{document}:

\makeatletter
\renewcommand*{\cvitem}[3][\@afterelementsvspace]{%
  \begin{tabular}{%
      @{}p{\@maincolwidth}%
      @{\hspace{\@sepcolwidth}}p{\@hintscolwidth}@{}%
    }%
    {#3}&\RaggedLeft\hintstyle{#2}%
  \end{tabular}\\[#1]%
}
\makeatother

enter image description here

\documentclass[%
]{komacv}

\pagestyle{scrheadings}
\clearscrheadfoot
\ifoot{CV~\firstname~\familyname}
\ofoot{\pagemark/\totalpagemark}
% ===========================
%    FONTS
% ===========================
\addtokomafont{firstnamefont}{\fontsize{35}{50}}

% ===========================
%    BIBLIOGRAPHY
% ===========================
\usepackage[backend=biber,
style=ieee,%authortitle,% 
sorting=ydnt,%
]{biblatex}
\bibliography{komacv.bib}
\defbibheading{bibliography}[Publications]{\section{#1}}

% ===========================
%    PERSONAL DATA
% ===========================
\renewcommand*{\title}{CV}% PDF metadata
\renewcommand*{\firstname}{Jane}
\renewcommand*{\familyname}{Eyre}
\renewcommand*{\acadtitle}{B.\,Ed.}
\renewcommand*{\addressstreet}{Ferndean House}
\renewcommand*{\addresscity}{Ferndean Village}
\renewcommand*{\address}[2]{\addressstreet{#1}\addresscity{#2}}
\renewcommand*{\mobile}{009-87654321}

\makeatletter
\renewcommand*{\cvitem}[3][\@afterelementsvspace]{%
  \begin{tabular}{%
      @{}p{\@maincolwidth}%
      @{\hspace{\@sepcolwidth}}p{\@hintscolwidth}@{}%
    }%
    {#3}&\RaggedLeft\hintstyle{#2}%
  \end{tabular}\\[#1]%
}
\makeatother
\begin{document}
\raggedbottom
\maketitle

\section{Personal Information}
\cvitem{Date of birth}{February 15, 1828}

\section{Education}
\cventry{1835--1838}{Homeschooling}{}{Gateshead}{grades 1--3}{Teacher: Mr.~NN, under supervision of my aunt Ms. Reed.}


\end{document}
gernot
  • 49,614
  • I get this error, do I need to include something?

    ! Undefined control sequence.

    \\cvitem ...\@hintscolwidth }@{}}{#3}&\RaggedLeft 
    
                                                  \hintstyle {#2}\end {tabul...
    
    l.51 \section{Personal Information}
    
    

    When I let it run till the end, the dates are on the left, but the blue bars as well. Is it possible to have the blue bars on the left like here: https://tex.stackexchange.com/questions/211525/how-to-move-date-column-in-moderncv ?

    – uiop Apr 19 '17 at 20:49
  • @user188311 This is a version mismatch: My solution was for the recent version of komacv.cls (from today), which does not work for the previous version. I've now also added a solution for the previous version, see my answer. – gernot Apr 19 '17 at 22:32