# Using Two-column CV Section formatting

I want to use section formatting of Two-column CV (given here) with red color titlerule. I would highly appreciate if someone guide to accomplish this task. Thanks in advance.

\documentclass{article}
\usepackage{xcolor}
\usepackage{blindtext}
\usepackage[compact, small, sf, bf]{titlesec}

\titleformat{\section}{\bfseries\scshape\Large}{}{.0em}{}[\titleline{\color{red}\titlerule}]

\begin{document}

\section{Introduction}
\blindtext[2]

\end{document}


Edited

Wonder how to use same section formating in my document as used in tccv template. So I need to use tccv template section formating in my article document. Thanks

• Do you mean: I want to copy the definition of \section from a specific document class so you can use the same definition in the above file? If so, how complicated is the definition and why can't you simply copy it from the respective .cls? – jon Oct 30 '16 at 3:12
• Thanks @jon for your comment. Yes, I want to use \section definition from tccv in my document. I looked tccv and tried in my article document but could not figured it out. Would highly appreciate if you help me. Thanks – MYaseen208 Oct 30 '16 at 3:18
• I think I'll let @gernot edit his answer (if he or she likes). – jon Oct 30 '16 at 3:23

I'm not completely sure how to interpret your question. If you just want to typeset your sample code in two columns, replace the first line by

\documentclass[twocolumn]{article}


If your aim is to modify the cv that you have linked to (the two column cv of "Nicola Fortuna" on ShareLaTeX) such that the lines below the section headings are colored in red, add the following two lines immediately below \documentclass{tccv}:

\usepackage{xpatch}
\xpatchcmd\section{\hrule height 0.4pt}{{\color{red}\hrule height 0.4pt}}{}{}


If you download the cv and compile it on your computer in a recent TeX installation, you have to start the cv with the following line (add it before the \documentclass line):

\PassOptionsToClass{enabledeprecatedfontcommands}{scrartcl}


i.e., in this case the document starts with

\PassOptionsToClass{enabledeprecatedfontcommands}{scrartcl}
\documentclass{tccv}
\usepackage{xpatch}
\xpatchcmd\section{\hrule height 0.4pt}{{\color{red}\hrule height 0.4pt}}{}{}


Edit: As clarified in the comments, the aim is to transfer the format of the section heading from the tccv class (which is essentially scrartcl) to the article class using titlesec.

\documentclass[twocolumn]{article}
\usepackage{xcolor}
\usepackage{blindtext}
\usepackage[compact, small, sf, bf]{titlesec}

\titleformat{\section}%
{\mdseries\scshape\Large\color[HTML]{801010}}%
{}{0em}{}%
[\vskip-0.5ex\color{gray}\hrule height 0.4pt\vskip0.5ex]

\begin{document}
\section{Introduction}
\blindtext[5]

\end{document}


• Thanks @gernot for your useful answer. Actually I want to use same section formating in my document as used in tccv template. So need to use tccv template section formating in my article document. Any thoughts. Thanks – MYaseen208 Oct 30 '16 at 3:10
• @MYaseen208 All I did was to look up the \section command in the class file and insert the formatting commands into \titleformat; the color information was near the beginning of the document. I don't quite understand why the lua code is needed to make the heading uppercase, since we already use \scshape, so I skipped it. – gernot Oct 30 '16 at 7:24
• A template ports a design to an improved class, somebody wants to port back the desing to the basic class using a completely diffferent set of tools. Now, where is the mistake? – Johannes_B Oct 30 '16 at 8:03
• @Johannes_B One essential piece is missing: The improved class has been wrapped into a bunch of hacks, under a new name, hidden on a web platform. Someone who sees the output and likes some particular feature may not want to investigate the technological genesis but may just want to replicate the feature in his/her familiar setting. – gernot Oct 30 '16 at 9:30
• By the way, the original code was \titleformat{\section}{\Large\scshape\raggedright}{}{0em}{}[\titlerule]\titlespacing{\section}{0pt}{3pt}{3pt} – Johannes_B Oct 30 '16 at 9:37