summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/vertbars
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/vertbars
Initial commit
Diffstat (limited to 'macros/latex/contrib/vertbars')
-rw-r--r--macros/latex/contrib/vertbars/README.md44
-rw-r--r--macros/latex/contrib/vertbars/vertbars.pdfbin0 -> 160548 bytes
-rw-r--r--macros/latex/contrib/vertbars/vertbars.sty60
-rw-r--r--macros/latex/contrib/vertbars/vertbars.tex93
4 files changed, 197 insertions, 0 deletions
diff --git a/macros/latex/contrib/vertbars/README.md b/macros/latex/contrib/vertbars/README.md
new file mode 100644
index 0000000000..9ff5647a45
--- /dev/null
+++ b/macros/latex/contrib/vertbars/README.md
@@ -0,0 +1,44 @@
+
+The VERTBARS package
+====================
+
+Place vertical bars in the margin around material.
+(Also see the changebar package.)
+This package uses lineno to do its thing.
+
+
+
+COPYRIGHT AND LICENSING
+-----------------------
+
+Authors: Peter Wilson (Herries Press)
+Maintainer: Will Robertson (will dot robertson at latex-project dot org)
+Copyright 2000 Peter Wilson
+Copyright 2010-2018 Will Robertson
+
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3c of this license or (at your option) any
+later version: <http://www.latex-project.org/lppl.txt>
+
+This work has the LPPL maintenance status "maintained".
+The Current Maintainer of this work is Will Robertson.
+
+This work consists of the files vertbars.tex and the
+derived files vertbars.sty and vertbars.ins.
+
+
+
+MAINTENANCE
+-----------
+
+Please report bugs or request features:
+ <http://github.com/wspr/herries-press/issues>
+
+Developmental and historical versions:
+ <http://github.com/wspr/herries-press>
+
+Current release version:
+ <http://ctan.tug.org/pkg/vertbars>
+
diff --git a/macros/latex/contrib/vertbars/vertbars.pdf b/macros/latex/contrib/vertbars/vertbars.pdf
new file mode 100644
index 0000000000..0b24afda94
--- /dev/null
+++ b/macros/latex/contrib/vertbars/vertbars.pdf
Binary files differ
diff --git a/macros/latex/contrib/vertbars/vertbars.sty b/macros/latex/contrib/vertbars/vertbars.sty
new file mode 100644
index 0000000000..9b24d20496
--- /dev/null
+++ b/macros/latex/contrib/vertbars/vertbars.sty
@@ -0,0 +1,60 @@
+%%%%%%%%%1%%%%%%%%%2%%%%%%%%%3%%%%%%%%%4%%%%%%%%%5
+%% Bundled source file for the VERTBARS package
+%%-------1---------2---------3---------4---------5
+%% Please see the accompanying README for author,
+%% license, documentation and installation information
+%%%%%%%%%1%%%%%%%%%2%%%%%%%%%3%%%%%%%%%4%%%%%%%%%5
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{vertbars}[2018/12/16 v1.0c vertical bars in the margin]
+
+\newcommand{\LNenv}{runninglinenumbers}
+\DeclareOption{switch}{%
+ \renewcommand{\LNenv}{runningpagewiselinenumbers}
+ \PassOptionsToPackage{\CurrentOption}{lineno}
+}
+
+\DeclareOption{switch*}{%
+ \renewcommand{\LNenv}{runningpagewiselinenumbers}
+ \PassOptionsToPackage{\CurrentOption}{lineno}
+}
+
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{lineno}}
+\ProcessOptions\relax
+\RequirePackage{lineno}
+
+% Code to add stuff at start and end of a pre-existing zero argument macro:
+\newcommand{\addtodef}[3]{\begingroup
+ \@temptokena{#2}%
+ \toks@\expandafter{#1#3}%
+ \edef\x{\endgroup
+ \def\noexpand#1{\the\@temptokena \the\toks@}}%
+ \x
+}
+
+% It's useful to preserve \cmd\baselineskip:
+\newlength{\pwvbbl}
+\setlength{\pwvbbl}{\baselineskip}
+
+% Width of bars:
+\newlength{\barwidth}
+\setlength{\barwidth}{0.4pt}
+
+% Horizontal space between bars:
+\newlength{\barspace}
+\setlength{\barspace}{0.5\linenumbersep}
+
+\newcommand{\addtomakeLNL}{{\rule[-0.25\pwvbbl]{\barwidth}{1.1\pwvbbl}\hskip\barspace\relax}}
+\newcommand{\pwvbLNL}{}
+
+\newenvironment{vertbar}{%
+ \par
+ \pagewiselinenumbers
+ \begin{\LNenv}%
+ \addtodef{\pwvbLNL}{}{\addtomakeLNL}%
+ \let\LineNumber\pwvbLNL
+}{%
+ \end{\LNenv}%
+ \par
+}
+
diff --git a/macros/latex/contrib/vertbars/vertbars.tex b/macros/latex/contrib/vertbars/vertbars.tex
new file mode 100644
index 0000000000..8b5a3f34f7
--- /dev/null
+++ b/macros/latex/contrib/vertbars/vertbars.tex
@@ -0,0 +1,93 @@
+
+\makeatletter
+\documentclass{ltxdoc}
+
+\usepackage[it,medium]{titlesec}
+
+\usepackage{array,bigfoot,vertbars}
+\usepackage[svgnames]{xcolor}
+\usepackage[colorlinks,linktocpage]{hyperref}
+
+\usepackage{geometry}
+\geometry{b5paper}
+
+\DeclareRobustCommand\pkg{\textsf}
+\def\pkgopt#1{\texttt{[#1]}}
+
+
+\usepackage[T1]{fontenc}
+\usepackage{microtype}
+\usepackage{lmodern}
+\usepackage[sc,osf]{mathpazo}
+\linespread{1.1}
+\frenchspacing
+
+\GetFileInfo{vertbars.sty}
+\begin{document}
+
+\title{The \pkg{vertbars} package}
+\author{%
+ Author: Peter Wilson, Herries Press\\
+ Maintainer: Will Robertson\\
+ \url{http://github.com/wspr/herries-press}%
+}
+\date{\fileversion \qquad \filedate}
+
+\maketitle
+
+\section{Documentation}
+
+Because this package uses \textsf{lineno} as a driver,
+please read the documentation of that package first to
+understand the mechanisms used here.
+
+The \textsf{vertbars} package takes the same options as the \textsf{lineno} package.
+In particular, the switch and switch* options control which side of the page any bars will be printed.
+The package automatically calls the lineno package, so you just need to write:
+\begin{verbatim}
+ \usepackage[...]{vertbars}
+\end{verbatim}
+
+The package provides the \texttt{vertbar} environment, which is equivalent to the linenumbers environment except that a vertical bar replaces the line number.
+Text paragraphs within a vertbar environment will be marked with a vertical bar in the margin.
+Nested environments generate multiple marginal bars.
+
+The width of the bars is controlled by the value of \cmd\barwidth, which is initialised to \verb|0.4pt|, and can be changed via \cmd\setlength.
+
+The horizontal separation between adjacent bars is controlled by the value of \cmd\barspace, which is initialised to \verb|0.5\linenumbersep|, and can be changed via \cmd\setlength.
+(\cmd\linenumbersep is a command from the lineno package that controls the spacing between line numbers and the text body).
+
+Note: Bars can only be applied to complete paragraphs.
+For bars between arbitrary points, use the \textsf{changebar} package.
+Any limitations of the \textsf{lineno} package apply equally to the \textsf{vertbars} package.
+
+\section*{Change History}
+
+\begin{itemize}
+\item[v1.0c] 2018-12-12 Add \cs{par} before and after the \texttt{vertbar} environment to avoid confusing/unwanted behaviour with paragraphs
+\item[v1.0b] 2010/11/27 Fix behaviour with \texttt{switch} option
+\item[v1.0a] 2009/09/04 New maintainer (Will Robertson)
+\end{itemize}
+
+
+
+\section*{Licence and copyright}
+
+This work may be modified and/or distributed under the terms and
+conditions of the \LaTeX\ Project Public License\footnote{\url{http://www.latex-project.org/lppl.txt}}, version~1.3c or later (your choice).
+The current maintainer of this work is Will Robertson.
+
+\bigskip
+ \noindent
+ Copyright Peter Wilson, 2000 \\
+ Copyright Will Robertson, 2010-2018 \\
+
+{\addtocontents{toc}{\protect\end{varwidth}\protect\hfill}}
+{\addtocontents{toc}{\protect\begin{varwidth}[t]{\protect\tocwidthB\protect\linewidth}}}
+\clearpage
+\parindent=0pt
+
+
+{\addtocontents{toc}{\protect\end{varwidth}}}
+
+\end{document}