4

I wanted to have a vertical colored bar running on all my pages, to the left of the page, in between the beginning of the sheet and the beginning of the text.

Something like:

|\|  text  |
|\|  text  |
|\|  text  |
|\|  text  |

where \ is colored.

Does anyone know if this is possible and how?

lockstep
  • 250,273

1 Answers1

4

Is this what you are looking for?

\documentclass{article}
\usepackage[a4paper,top=3cm,bottom=1.5cm,left=3.5cm,right=0.75cm]{geometry}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}

\title{Title}
\author{John Smith}

\usepackage[hidelinks]{hyperref}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usepackage{lipsum}
\usepackage{picture,calc}
\usepackage{fancyhdr}

\def\colstripe{
    \AtBeginShipoutNext{\AtBeginShipoutUpperLeft{%
            \put(0,-\paperheight){{\color{Red}\rule{3cm}{\paperheight}}} %
        }
    }

}
\fancypagestyle{plain}{ %
    \fancyhead{\colstripe}
    \renewcommand{\headrulewidth}{0pt}
    \renewcommand{\footrulewidth}{0pt}
}

\pagestyle{plain}
\begin{document}
    \maketitle
    \lipsum[1-100]
\end{document}

Sample Output: enter image description here