Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
2  
You can also use background package. Possible dupe: How to set colored ruled margins for different pages? –  Harish Kumar Jan 24 '13 at 14:10

1 Answer 1

up vote 2 down vote accepted

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

share|improve this answer
    
Great, that's exactly it! –  Diego Martinoia Jan 24 '13 at 18:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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