summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/vruler/vruler-example.tex
blob: 75569d1566d4b321d0f2933cbf7cf7d1c33e6c2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
% Application example, for the use of vruler.sty

\documentclass[twoside]{article}
\usepackage{vruler}
       \setlength{\textwidth}{2.5in}
       \setlength{\oddsidemargin}{3cm}
       \setlength{\evensidemargin}{6cm}
       \overfullrule=0pt \parindent=0pt
\begin{document}
\advance\textwidth 3cm %2cm is better for plain TeX
\setvruler [][][][][][\textwidth]
         This is a simple example, in which we have
         placed vertical rulers on the left for
         odd numbered pages and on the right for
         even numbered pages. \newpage

         This is the second page and is thus an even
         numbered page. Please see that the vertical
         ruler is now on the right, and is approximately
         of the same distance from the text margin as
         the vertical ruler on the first page from
         the left margin there. \newpage
\unsetvruler
         The following pages, in fact only this page, will
         not be appended with the vertical rulers.\newpage
\setvruler[][\rulercount]
         This page will be added with the vertical ruler again.
         Here the numbering marking of the vertical ruler picks
         up where it was left. Nevertheless, we may start with
         any new number. \newpage

         This is another page. Please see that both this and
         the previous pages have vruler on the left side.
\end{document}