| 1 |
\documentclass[a4paper]{article} |
| 2 |
\usepackage[T1]{fontenc} |
| 3 |
\usepackage{underscore,amstext} |
| 4 |
\usepackage[a4paper]{geometry} |
| 5 |
\usepackage{miscdoc} |
| 6 |
\usepackage[scaled=0.85]{luximono} |
| 7 |
\newcommand\nl{\par\noindent} |
| 8 |
\begin{document} |
| 9 |
\title{The \Package{vruler} package~---\\ |
| 10 |
Vertical rulers in \LaTeX{}, Plain \TeX{} and ams\TeX{}} |
| 11 |
\author{Zhuhan Jiang\thanks{University of New England, Australia NSW 2351}} |
| 12 |
\date{October 1996, version v2.3\thanks{% |
| 13 |
This documentation created 2010-03-21, by Robin Fairbairns}} |
| 14 |
\maketitle |
| 15 |
|
| 16 |
\section{What's the package for?} |
| 17 |
|
| 18 |
Make a vertical ruler, numbering consecutively so that any part of an |
| 19 |
article can be pinpointed immediately. The vruler may be moved freely |
| 20 |
up and down, left and right. |
| 21 |
|
| 22 |
There are no formally released packages that number lines in general |
| 23 |
text one by one without missing certain lines, particularly when there |
| 24 |
are many maths equations in the text. So \Package{vruler} is a good |
| 25 |
alternative for people writing text of versatile format or lots of |
| 26 |
maths formulas. |
| 27 |
|
| 28 |
\section{The commands} |
| 29 |
|
| 30 |
\cmdinvoke*{setvruler}[scale][initial_count][step][digits][mode]% |
| 31 |
[odd_hshift][even_hshift][vshift][height]\nl |
| 32 |
defines the start of vertical rulers, where: |
| 33 |
\par\addvspace{1ex} |
| 34 |
\noindent |
| 35 |
\meta{scale} is the distance between two consecutive markings on the |
| 36 |
vruler\nl |
| 37 |
\meta{initial_count} is the value on the first mark on the ruler\nl |
| 38 |
\meta{step} is the mark increment\nl |
| 39 |
\meta{digits} is the number of digits needed for ruler markings\nl |
| 40 |
$\text{\meta{mode}}=0$ if each page has the same ruler marking, $=1$ |
| 41 |
otherwise\nl |
| 42 |
\meta{odd_hshift} is the horizontal shift for odd pages, from the |
| 43 |
default\nl |
| 44 |
\meta{even_hshift} is the horizontal shift for even pages, from the |
| 45 |
default\nl |
| 46 |
\meta{vshift} is the the vertical shift, from the default value, and\nl |
| 47 |
\meta{height} is the height of the vertical ruler. |
| 48 |
\par\addvspace{1ex} |
| 49 |
\noindent\cs{unsetvruler} stops vrulers. |
| 50 |
\par\addvspace{1ex} |
| 51 |
\noindent\cmdinvoke*{setdefault}{cmdname}{n}{default_1}{\dots{}}{default_n}\nl |
| 52 |
(re)sets macro \meta{n} defaults for |
| 53 |
\cmdinvoke{cmdname}[\#1][\dots{}][\#n] to take \meta{default_1} to |
| 54 |
\meta{default_n} respectively, so that \cmdinvoke*{cmdname}[][xy] is |
| 55 |
the same as |
| 56 |
\cmdinvoke{cmdname}*[\meta{default_1}][xy][\meta{default\dots{}}]. |
| 57 |
|
| 58 |
You don't need to use \cs{setdefault} unless you would like to change |
| 59 |
the default setting for macros in \Package{vruler} or elsewhere. |
| 60 |
\par\addvspace{1ex} |
| 61 |
\noindent\cs{vrulecount} holds the next mark value to be used on the |
| 62 |
vertical rules. |
| 63 |
|
| 64 |
\subsection*{Defaults} |
| 65 |
|
| 66 |
The parameters of \cs{setvruler} admit defaults. With no arguments, |
| 67 |
the command is equivalent to:\nl |
| 68 |
\leavevmode\quad\cmdinvoke{setvruler}[10pt][1][1][4][1][0pt][0pt][0pt][\cs{textheight}]\nl |
| 69 |
and\nl |
| 70 |
\leavevmode\quad\cmdinvoke{setvruler}[][20] has the same effect as:\nl |
| 71 |
\leavevmode\quad\cmdinvoke{setvruler}[10pt][20] |
| 72 |
|
| 73 |
\section{Notes} |
| 74 |
|
| 75 |
\begin{enumerate} |
| 76 |
\item If you are using the \Package{multicol} package, then you might |
| 77 |
want to move the vruler into the center to separate the columns. |
| 78 |
\item If you use a value of \cs{topskip} other than the default, then |
| 79 |
you will have to alter \meta{vshift} and \meta{height} parameters in |
| 80 |
\cs{setvruler} accordingly (which is simple). |
| 81 |
\item It is best to choose the value \cs{baselineskip} \meta{scale} so |
| 82 |
that line synchronisation is often optimal. Use (e.g.\@) ``5+'' to |
| 83 |
denote the line immediately after marking number ``5'' if |
| 84 |
necessary. |
| 85 |
\item In twosided \Package{book} class in \LaTeXe{}, the initial |
| 86 |
numbering of title page via \cmdinvoke{begin}{titlepage} is actually |
| 87 |
one page away. To overcome this, either do not include the title |
| 88 |
page in the region covered by vruler, or set the initial count |
| 89 |
(\texttt{\#2}) to a number (a page ahead) so that the resulting |
| 90 |
initial number is what one needs. |
| 91 |
\item The file \texttt{vruler-example.sty} in the distribution offers |
| 92 |
an example of use. |
| 93 |
\end{enumerate} |
| 94 |
\end{document} |