1

Hello I am trying to modify the Two-column CV template which uses the tccv document class.

Specifically I want to modify the formatting in the Work experience section which looks like this per default:

Work experience default formatting

I would like to have the dates aligned to the left, the company and role aligned to the right and keep the description justified as it is.

I opened the tccv class document and tracked down the block that formats this part. It is:

\newenvironment{eventlist}{%
\newcommand*\inskip{}
\renewcommand\item[3]{%
\inskip%
{\raggedleft\textsc{##1}\\[1pt]}
{##2}\\[2pt]
{\Large\textit{##3}}
\medskip
\renewcommand\inskip{\bigskip}}}
{\bigskip}

I modified it a little and I almost accomplish what I want except that I cannot manage to keep the description justified. The output is this:

Work experience modified

And the modified code is:

\newenvironment{eventlist}{%
    \newcommand*\inskip{}
    \renewcommand\item[3]{%
    \inskip%
    {\raggedright\textsc{##1}\\[1pt]}
    \raggedleft{##2}\\[2pt]
    \raggedleft{\Large\textit{##3}}
    \medskip
    \renewcommand\inskip{\bigskip}}}
    {\bigskip}

I am just not that sure of where to add the command to keep the description justified. Thanks in advanced for your help.

unmodified tccv document class

% Copyright (C) 2012  Nicola Fontana <ntd at entidi.it>
%
% This program can be redistributed and/or modified under
% the terms of the LaTeX Project Public License, either
% version 1.3 of this license or (at your option) any later
% version. The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all LaTeX distributions
% version 2005/12/01 or later.
%
% Based on the original idea by Alessandro Plasmati found at
% http://www.latextemplates.com/template/two-column-one-page-cv
%
% The most relevant changes from his work are:
%
% * this is a class, not a template document;
% * tccv is based on scrartcl (from Koma-script), not on article;
% * the fonts are selected from the PSNFSS collection, so no
%   custom font installation should be required;
% * heavily based the implementation on custom environments and
%   macros, so the document is much easier to read (and customize);
% * it is plain LaTeX/Koma-script, so the CV can be compiled
%   with the usual tools, latex and pdflatex included.

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{tccv}
              [2012/11/09 v1.0
 Two Column Curriculum Vitae]

\LoadClass[10pt]{scrartcl}

\setcounter{secnumdepth}{-1}
\RequirePackage[hmargin=1.25cm,vmargin=1.25cm,twocolumn,columnsep=1.25cm]{geometry}
\RequirePackage{bookman,etoolbox,hyperref,marvosym,needspace,tabularx,xcolor}

% Capitalize words of at least a minimum length (default to 3 chars).
% The text is capitalized before being expanded.
%
% This macro uses Lua to do the job but fails gracefully (that is,
% return the text as is) if \directlua is not available.
%
% |[
% \ucwords[optional: miminum length]{text}
% ]|
\newcommand\ucwords[2][3]{%
    % Fails gracefully if not in LuaLaTeX
    \providecommand\directlua[1]{#2}%
    \directlua{%
    local minlen=tonumber("#1")
    local src="\luaescapestring{\unexpanded{#2}}"
    local dst={}
    for w in src:gmatch('[^\string\%s]+') do
        if w:len() >= minlen then w = w:sub(1,1):upper()..w:sub(2) end
        table.insert(dst, w)
    end
    tex.print(dst)}}

\pagestyle{empty}
\setlength\parindent{0pt}
\color[HTML]{303030} % Default foreground color
\definecolor{link}{HTML}{506060} % Hyperlinks
\hypersetup{colorlinks,breaklinks,urlcolor=link,linkcolor=link}
\setkomafont{disposition}{\color[HTML]{801010}}
\setkomafont{section}{\scshape\Large\mdseries}

% In tccv \part must contain the subject of the curriculum vitae.
% The command will start a new page and output in onecolumn the
% subject (first and last name) with the hardcoded text
% "Curriculum vitae" under it.
\renewcommand\part[1]{%
    \twocolumn[%
    \begin{center}
    \vskip-\lastskip%
    {\usekomafont{part} #1} \medskip\\
    {\fontfamily{pzc}\selectfont\Huge Curriculum vitae}
    \bigskip
    \end{center}]}

% Overrides the \section command to capitalize every
% word for cosmetic purposes and draws a rule under it.
\makeatletter
\let\old@section\section
\renewcommand\section[2][]{%
    \old@section[#1]{\ucwords{#2}}%
    \newdimen\raising%
    \raising=\dimexpr-0.7\baselineskip\relax%
    \vskip\raising\hrule height 0.4pt\vskip-\raising}
\makeatother

% Allow conditionals based on the job name. This can usually be set
% from a command-line argument: check fausto.en.tex for an example.
%
% |[
% \ifjob{jobname}{content if matches}{content if does not match}
% ]|
\newcommand\ifjob[3]{%
    \edef\JOBNAME{\jobname}%
    \edef\PIVOT{\detokenize{#1}}%
    \ifdefstrequal{\JOBNAME}{\PIVOT}{#2}{#3}%
}

% Renders a personal data box:
%
% |[
% \personal[optional: web site without scheme (no http:// prefix)]
%          {address}{phone number}{email}
% ]|
\newcommand\personal[4][]{%
    \needspace{0.5\textheight}%
    \newdimen\boxwidth%
    \boxwidth=\dimexpr\linewidth-2\fboxsep\relax%
    \colorbox[HTML]{F5DD9D}{%
    \begin{tabularx}{\boxwidth}{c|X}
    \Writinghand & {#2}\smallskip\\
    \Telefon     & {#3}\smallskip\\
    \Letter      & \href{mailto:#4}{#4}
    \ifstrempty{#1}{}{\smallskip\\ \Lightning & \href{http://#1}{#1}}
    \end{tabularx}}}

% Every \item can be followed by one or more paragraphs
% of description:
%
% |[
% \item{date range}{company}{role}
%
% Description of what achieved during this application.
% ]|
\newenvironment{eventlist}{%
    \newcommand*\inskip{}
    \renewcommand\item[3]{%
    \inskip%
    {\raggedleft\textsc{##1}\\[1pt]}
    {##2}\\[2pt]
    {\Large\textit{##3}}
    \medskip
    \renewcommand\inskip{\bigskip}}}
    {\bigskip}

% Use only \item inside this environment: no other macros
% are allowed:
%
% |[
% \item[optional: what has been achieved]{years}{subject}{notes}
% ]|
\newenvironment{yearlist}{%
    \renewcommand\item[4][]{%
    {\textsc{##2}} & {\bfseries ##3} \\
    \ifstrempty{##1}{}{& {\textsc{##1}} \\}
    & {\textit{##4}}\medskip\\}
    \tabularx{\linewidth}{rX}}
    {\endtabularx}


% Use only \item inside this environment: no other macros
% are allowed:
%
% |[
% \item{fact}{description}
% ]|
\newenvironment{factlist}{%
    \newdimen\unbaseline
    \unbaseline=\dimexpr-\baselinestretch\baselineskip\relax
    \renewcommand\item[2]{%
    \textsc{##1} & {\raggedright ##2\medskip\\}\\[\unbaseline]}
    \tabularx{\linewidth}{rX}}
    {\endtabularx}
%%
%% End of file `tccv.cls'.

Two-column CV template

\documentclass{tccv}
\usepackage[english]{babel}

\begin{document}

\part{Nicola Fontana}

\section{Work experience}

\begin{eventlist}

\item{July 2007 -- Present}
     {eNTiDi software, Travagliato}
     {Management and development}

Software development for the industrial automation sector: configuration
front-end in C with interface based on \href{http://www.gtk.org/}{GTK+},
web applications and sites on LAMP platforms grounded on the
\href{http://www.silverstripe.org/}{SilverStripe} framework,
supervisor programs in LabVIEW and remote system in
\href{http://www.lua.org/}{Lua} on GNU/Linux systems.

\item{January 2002 -- June 2004}
     {TEMA s.r.l., Travagliato}
     {PLC Omron development}

Development and testing of automatic and semiautomatic machines for
ribbon winding on spools and rolls (safety belts, hook-and-loop tapes,
elastic ribbon and bindings). Designing of electrical schematics on
2D cad and user manuals drafting.

\item{October 1998 -- November 2001}
     {TWINS s.r.l., Sarezzo}
     {PC and PLC Siemens development}

Programming, installation and trial of transfer machines for assembly,
adjustment and testing of gas taps. Development and installation of PC
based semiautomatic test stands for pneumatic and hydraulic leakage
tests on valves, gas regulators, electrovalves, tanks and others.

\item{September 1996 -- September 1998}
     {Elettronica EFFE-GI s.n.c., Cazzago}
     {PC and PLC Hitachi development}

Development of automatic machines in general, here included the design
of electrical, pneumatic and hydraulic schematics on 2D cad and the PLC
programming. Implementation of configuration and logging front-end using
RS232 serial communications between PC and PLC-based transfer machines
in BASIC, Pascal and C.

\item{January 1994 -- June 1996}
     {Seven Diesel s.p.a., Rovato}
     {Engineering department director}

Planning of nozzles for diesel engines and organization of production.
Upgraded the management software by implementing a system for data
handling and automatic drawing generation (in DXF) developed on the
SuperBase 95 RAD tool.

\end{eventlist}

\personal
    [www.entidi.com]
    {viale Conciliazione, 13\newline 25039 -- Travagliato (BS)}
    {+39 (30) 6862332}
    {ntd@entidi.it}

\section{Education}

\begin{yearlist}

\item[High school diploma]{1988 -- 1992}
     {Informatic engineer}
     {ITIS Castelli, Brescia}

\item{1987 -- 1988}
     {Classical gymnasium}
     {Seminario vescovile, Cremona}

\end{yearlist}

\section{Public projects}

\begin{yearlist}

\item{2012}
     {ntdisp (\href{http://ntdisp.entidi.com/}{ntdisp.entidi.com})}
     {Embedded devices programmer}

\item{2007}
     {tip (\href{http://tip.entidi.com/}{tip.entidi.com})}
     {PHP framework based on PEAR}

\item{2006}
     {adg (\href{http://adg.entidi.com/}{adg.entidi.com})}
     {Automatic drawing generation}

\item{2006}
     {gtk2panel (\href{http://gtk2panel.entidi.com/}{gtk2panel.entidi.com})}
     {Top panel menu in GTK+2}

\item{2004}
     {ntd (\href{http://ntd.entidi.com/}{ntd.entidi.com})}
     {General purpose libraries}

\end{yearlist}

\section{Communication skills}

\begin{factlist}
\item{Italian}{Native speaker}
\item{English}{Oral: fair -- Written: good}
\item{Spanish}{Oral: good}
\end{factlist}

\section{Software skills}

\begin{factlist}

\item{Good level}
     {C, PHP, HTML, CSS, autotools, git, gcc, GTK+, GObject, shell,
      MS-DOS, Linux, ladder, G-Code}

\item{Intermediate}
     {Lua, \LaTeX, MySQL, VBA, cuBasic, pascal, subversion, LabVIEW}

\item{Basic level}
     {Windows, FreeBSD, OpenIndiana, Postgres}

\end{factlist}

\end{document}
  • \raggedleft{\Large\textit{##3}} should be {\raggedleft\Large\textit{##3}}. Move the curly brace in front of raggedleft. – Johannes_B May 21 at 4:05
  • I tried that before and didn't work, the output is the same as the one in the second picture, that is causing me confusion – Paul Lara May 21 at 4:53
1

You need not to change the class file, which is usually always a bad idea and perhaps not allowed!

You can use the command \renewenvironment (you recognized the leading re?) to change the environment eventlist in your preamble with the following code snippet:

\renewenvironment{eventlist}{% <========================================
  \newcommand*\inskip{}
  \renewcommand\item[3]{%
    \inskip%
    {\raggedright\textsc{##1}\\[1pt]}
    {\raggedleft{##2}\\[2pt]}
    {\hfill\Large\textit{##3}}% <=======================================
    \medskip
    \renewcommand\inskip{\bigskip}%
  }%
}
{\bigskip}

Please see the added brackets and the used command \hfill to get the result you want.

With the following complete code

\documentclass{tccv}

\usepackage[english]{babel}
\usepackage{microtype} % <==============================================

\renewenvironment{eventlist}{% <========================================
  \newcommand*\inskip{}
  \renewcommand\item[3]{%
    \inskip%
    {\raggedright\textsc{##1}\\[1pt]}
    {\raggedleft{##2}\\[2pt]}
    {\hfill\Large\textit{##3}}% <=======================================
    \medskip
    \renewcommand\inskip{\bigskip}%
  }%
}
{\bigskip}


\begin{document}

\part{Nicola Fontana}

\section{Work experience}

\begin{eventlist}

\item{July 2007 -- Present}
     {eNTiDi software, Travagliato}
     {Management and development}

Software development for the industrial automation sector: configuration
front-end in C with interface based on \href{http://www.gtk.org/}{GTK+},
web applications and sites on LAMP platforms grounded on the
\href{http://www.silverstripe.org/}{SilverStripe} framework,
supervisor programs in LabVIEW and remote system in
\href{http://www.lua.org/}{Lua} on GNU/Linux systems.

\item{January 2002 -- June 2004}
     {TEMA s.r.l., Travagliato}
     {PLC Omron development}

Development and testing of automatic and semiautomatic machines for
ribbon winding on spools and rolls (safety belts, hook-and-loop tapes,
elastic ribbon and bindings). Designing of electrical schematics on
2D cad and user manuals drafting.

\item{October 1998 -- November 2001}
     {TWINS s.r.l., Sarezzo}
     {PC and PLC Siemens development}

Programming, installation and trial of transfer machines for assembly,
adjustment and testing of gas taps. Development and installation of PC
based semiautomatic test stands for pneumatic and hydraulic leakage
tests on valves, gas regulators, electrovalves, tanks and others.

\item{September 1996 -- September 1998}
     {Elettronica EFFE-GI s.n.c., Cazzago}
     {PC and PLC Hitachi development}

Development of automatic machines in general, here included the design
of electrical, pneumatic and hydraulic schematics on 2D cad and the PLC
programming. Implementation of configuration and logging front-end using
RS232 serial communications between PC and PLC-based transfer machines
in BASIC, Pascal and C.

\item{January 1994 -- June 1996}
     {Seven Diesel s.p.a., Rovato}
     {Engineering department director}

Planning of nozzles for diesel engines and organization of production.
Upgraded the management software by implementing a system for data
handling and automatic drawing generation (in DXF) developed on the
SuperBase 95 RAD tool.

\end{eventlist}

\personal
    [www.entidi.com]
    {viale Conciliazione, 13\newline 25039 -- Travagliato (BS)}
    {+39 (30) 6862332}
    {ntd@entidi.it}

\section{Education}

\begin{yearlist}

\item[High school diploma]{1988 -- 1992}
     {Informatic engineer}
     {ITIS Castelli, Brescia}

\item{1987 -- 1988}
     {Classical gymnasium}
     {Seminario vescovile, Cremona}

\end{yearlist}

\section{Public projects}

\begin{yearlist}

\item{2012}
     {ntdisp (\href{http://ntdisp.entidi.com/}{ntdisp.entidi.com})}
     {Embedded devices programmer}

\item{2007}
     {tip (\href{http://tip.entidi.com/}{tip.entidi.com})}
     {PHP framework based on PEAR}

\item{2006}
     {adg (\href{http://adg.entidi.com/}{adg.entidi.com})}
     {Automatic drawing generation}

\item{2006}
     {gtk2panel (\href{http://gtk2panel.entidi.com/}{gtk2panel.entidi.com})}
     {Top panel menu in GTK+2}

\item{2004}
     {ntd (\href{http://ntd.entidi.com/}{ntd.entidi.com})}
     {General purpose libraries}

\end{yearlist}

\section{Communication skills}

\begin{factlist}
\item{Italian}{Native speaker}
\item{English}{Oral: fair -- Written: good}
\item{Spanish}{Oral: good}
\end{factlist}

\section{Software skills}

\begin{factlist}

\item{Good level}
     {C, PHP, HTML, CSS, autotools, git, gcc, GTK+, GObject, shell,
      MS-DOS, Linux, ladder, G-Code}

\item{Intermediate}
     {Lua, \LaTeX, MySQL, VBA, cuBasic, pascal, subversion, LabVIEW}

\item{Basic level}
     {Windows, FreeBSD, OpenIndiana, Postgres}

\end{factlist}

\end{document}

The result you get is then:

resulting pdf with microtype

Please see that I used package microtype to get a better formatted result. Try first with package microtype and compare this result with the result with commented microtype (have a closer look to the marked place with red !) ...

  • this is great, just a couple more question. You used \hfill to force the textline to stick to the right end, right? Why a command like \raggedleft would affect the description if it is not inside {##3}? – Paul Lara May 22 at 3:02
  • @PaulLara \hfill works only in that line it was issued, \raggedleft works for the complete paragraph. Because in your code there is no blank line or \\ after \textit{##3} the command \raggedleft works still in your description. An alternative could be to use {{\raggedleft\Large\textit{##3}\\[6pt]}} and comment the following \medskip ... But notice the bigger white space before the line containing the third line (##3)! – Mensch May 22 at 13:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.