I am designing my resume on latex and I need to put a colored vertical rule in my resume like this light green rule in this CV
[Tex/LaTex] How to insert a vertical rule in a resume latex
colorcvrules
Related Solutions
One option would be to redefine \@outputdblcol
(from the LaTeX kernel) to let the rule have some depth; the following example shows this redefinition (signaled with %NEW
); I used a depth equal to 2ex
, but you can use any other value; of course, this modification will apply to all the document:
\documentclass[twocolumn]{article}
\setlength\columnseprule{1pt}
\usepackage{lipsum}
\makeatletter
\def\@outputdblcol{%
\if@firstcolumn
\global \@firstcolumnfalse
\global \setbox\@leftcolumn \box\@outputbox
\else
\global \@firstcolumntrue
\setbox\@outputbox \vbox {%
\hb@xt@\textwidth {%
\hb@xt@\columnwidth {%
\box\@leftcolumn \hss}%
\hfil
{\normalcolor\vrule \@depth2ex \@width\columnseprule}%NEW (original without \@depth2ex)
\hfil
\hb@xt@\columnwidth {%
\box\@outputbox \hss}%
}%
}%
\@combinedblfloats
\@outputpage
\begingroup
\@dblfloatplacement
\@startdblcolumn
\@startdblcolumn.
\@whilesw\if@fcolmade \fi
{\@outputpage
\@startdblcolumn}%
\endgroup
\fi
}
\makeatother
\begin{document}
\lipsum[1-40]
\end{document}
A fragment of the bottom part of the first page showing the extension:
With the help of the etoolbox
package, the code reduces to (using now a 3ex
depth):
\documentclass[twocolumn]{article}
\setlength\columnseprule{1pt}
\usepackage{lipsum}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\@outputdblcol}{\vrule \@width\columnseprule}{\vrule \@depth3ex \@width\columnseprule}{}{}
\makeatother
\begin{document}
\lipsum[1-40]
\end{document}
The memoir
class provides a good method of creating a custom header with three parts. As set up here, the header will appear on every page as a custom letterhead. The technique is explained in the comments below.
\documentclass[12pt, oneside]{memoir}
% Select a font package here (any TeX engine), or use fontspec with LuaLaTex or XeLaTeX
% If it has to look like Times New Roman, \usepackage{tgtermes} instead
\usepackage{lmodern}
% Set dimensions of text block for memoir
% For example, 1-inch margins on letter-size paper, with extra on top for header
\settypeblocksize{9in}{6.5in}{*}
\setlrmarginsandblock{1in}{1in}{*}
\setulmarginsandblock{1.5in}{1in}{*}
% Set header and footer size
\setheadfoot{4\baselineskip}{\baselineskip}
\checkandfixthelayout
% Create a custom header for every page:
% The three parameters of \makeoddhead{headers} define the left, center, and right parts of the header.
% We use macros for the data and then fill them in below.
% Use any formating commands within each bracketed parameter.
\copypagestyle{headers}{plain}
\makeoddhead{headers}
%left side
{\currentAddress}
% center
{{\Large\bfseries\name}\\ \vspace{0.5em} {\footnotesize\email \\ \phone }}
% right side
{\permanentAddress}
% A horizontal rule beneath the header looks nice
\makeheadrule{headers}{\textwidth}{\normalrulethickness}
% Activate your custom header
\pagestyle{headers}
% Now supply the information to be put into the header above: This makes it easier to change
\newcommand{\name}{LaTeX User}
\newcommand{\currentAddress}{123 Main St.\\ Current City, State 12345}
\newcommand{\permanentAddress}{321 Main St.\\ Permanent City, State 54321}
\newcommand{\email}{mwe@example.com}
\newcommand{\phone}{(123) 456-7890}
\begin{document}
%********************
% Here is one basic way to format CV information
\section*{Information}
\begin{itemize}
\item{Fact 1}
\item{Fact 2}
\end{itemize}
%*******************
\end{document}
Best Answer
Assuming that you already have the layout sorted, placement of a vertical rule along the left side of the page can be done by
eso-pic
:If you wish to add some content to the vertical bar: