From 424ade50e036f3d865a1283f25173efa4e90bd37 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 28 Nov 2010 23:49:38 +0000 Subject: vertbars 1.0b (28nov10) git-svn-id: svn://tug.org/texlive/trunk@20589 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/vertbars/README | 52 ++++++ Master/texmf-dist/doc/latex/vertbars/vertbars.pdf | Bin 0 -> 33809 bytes .../texmf-dist/source/latex/vertbars/vertbars.ins | 4 + .../texmf-dist/source/latex/vertbars/vertbars.tex | 204 +++++++++++++++++++++ Master/texmf-dist/tex/latex/vertbars/vertbars.sty | 92 +++------- 5 files changed, 282 insertions(+), 70 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/vertbars/README create mode 100644 Master/texmf-dist/doc/latex/vertbars/vertbars.pdf create mode 100644 Master/texmf-dist/source/latex/vertbars/vertbars.ins create mode 100644 Master/texmf-dist/source/latex/vertbars/vertbars.tex diff --git a/Master/texmf-dist/doc/latex/vertbars/README b/Master/texmf-dist/doc/latex/vertbars/README new file mode 100644 index 00000000000..9d037914bc4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/vertbars/README @@ -0,0 +1,52 @@ + +The VERTBARS package +==================== + +Place vertical bars in the margin around material. +(Also see the changebar package.) +This package uses lineno to do its thing. + +INSTALLATION +------------ + +Run `pdflatex` on vertbars.tex to produce the files + vertbars.ins and vertbars.sty, +as well as to compile the PDF documentation. + +Execute `tex vertbars.ins` to produce the files above +except vertbars.ins itself (and the PDF file, obviously). + + +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 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: + +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: + + +Developmental and historical versions: + + +Current release version: + + diff --git a/Master/texmf-dist/doc/latex/vertbars/vertbars.pdf b/Master/texmf-dist/doc/latex/vertbars/vertbars.pdf new file mode 100644 index 00000000000..d162d2e76f4 Binary files /dev/null and b/Master/texmf-dist/doc/latex/vertbars/vertbars.pdf differ diff --git a/Master/texmf-dist/source/latex/vertbars/vertbars.ins b/Master/texmf-dist/source/latex/vertbars/vertbars.ins new file mode 100644 index 00000000000..d769a2ceb42 --- /dev/null +++ b/Master/texmf-dist/source/latex/vertbars/vertbars.ins @@ -0,0 +1,4 @@ +%&latex +\def\documentationCompile{N} +\input vertbars.tex +\csname@@end\endcsname diff --git a/Master/texmf-dist/source/latex/vertbars/vertbars.tex b/Master/texmf-dist/source/latex/vertbars/vertbars.tex new file mode 100644 index 00000000000..c00e2797337 --- /dev/null +++ b/Master/texmf-dist/source/latex/vertbars/vertbars.tex @@ -0,0 +1,204 @@ + +%%%%%%%%%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 + +\RequirePackage{filecontents} +\begin{filecontents}{vertbars.sty} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{vertbars}[2010/11/27 v1.0b 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}{% + \pagewiselinenumbers % <= added v1.0b + \begin{\LNenv}% + \addtodef{\pwvbLNL}{}{\addtomakeLNL}% + \let\LineNumber\pwvbLNL +}{% + \end{\LNenv}% +} + +\end{filecontents} +%%%%%%%%%1%%%%%%%%%2%%%%%%%%%3%%%%%%%%%4%%%%%%%%%5 + + +% Conditionally compile the documentation & generate the .ins file: +\providecommand\documentationCompile{Y} +\makeatletter +\if\documentationCompile N + \expandafter\@@end +\fi + + +\begin{filecontents*}{vertbars.ins} +%&latex +\def\documentationCompile{N} +\input vertbars.tex +\csname@@end\endcsname +\end{filecontents*} + + + + +\makeatletter +\documentclass{article} + +\usepackage[it,medium]{titlesec} + +\usepackage{array,bigfoot,vertbars} +\usepackage[svgnames]{xcolor} +\usepackage[colorlinks,linktocpage]{hyperref} + +\usepackage{geometry} +\geometry{b5paper} + +\usepackage{gmdoc} +\usepackage{gmverb} +\dekclubs +\stanzaskip=\bigskipamount +\CodeSpacesGrey + +\usepackage{tocloft,varwidth} +\setcounter{tocdepth}{1} +\def\tocwidthA{0.55} +\def\tocwidthB{0.44} +\def\cftpartfont{\scshape} +\def\cftsecfont{\small} +\cftbeforesecskip=0pt +\def\cftpartleader{} +\def\cftpartafterpnum{\cftparfillskip} +\def\cftsecleader{} +\def\cftsecafterpnum{\cftparfillskip} + +\DeclareRobustCommand\pkg{\textsf} +\def\pkgopt#1{\texttt{[#1]}} +\newcommand\chng[1]{\marginpar{\footnotesize\raggedright\textsf{#1}}} + +\def\PDF{\textsc{pdf}} +\def\PS{\textsc{ps}} +\def\DVI{\textsc{dvi}} +\def\EPS{\textsc{eps}} + +\usepackage{amsmath,listings} +\lstset{basicstyle=\ttfamily,columns=fullflexible} + +\usepackage{changepage} +\usepackage[T1]{fontenc} +\usepackage{microtype} +\usepackage{lmodern} +\usepackage[sc,osf]{mathpazo} +\linespread{1.1} +\frenchspacing + +\GetFileInfo{vertbars.sty} +\begin{document} +{\addtocontents{toc}{\protect\begin{varwidth}[t]{\tocwidthA\linewidth}}} + +\title{The \pkg{vertbars} package} +\author{% + Author: Peter Wilson, Herries Press\\ + Maintainer: Will Robertson\\ + \texttt{will dot robertson at latex-project dot org}% +} +\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 seperation 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.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 \\ + +{\addtocontents{toc}{\protect\end{varwidth}\protect\hfill}} +{\addtocontents{toc}{\protect\begin{varwidth}[t]{\protect\tocwidthB\protect\linewidth}}} +\clearpage +\parindent=0pt + +\section{Implementation} +\DocInput{vertbars.sty} + +{\addtocontents{toc}{\protect\end{varwidth}}} + +\end{document} diff --git a/Master/texmf-dist/tex/latex/vertbars/vertbars.sty b/Master/texmf-dist/tex/latex/vertbars/vertbars.sty index 522cf9b0b81..bb988addbf3 100644 --- a/Master/texmf-dist/tex/latex/vertbars/vertbars.sty +++ b/Master/texmf-dist/tex/latex/vertbars/vertbars.sty @@ -1,26 +1,9 @@ -% vertbars.sty The VERTical BARS package -% An extension to the lineno package -% to put vertical rules at left (right) -% of lines instead of numbers -% -% This package requires the lineno package -% -% Author: Peter Wilson, Herries Press -% Maintainer: Will Robertson (will dot robertson at latex-project dot org) -% Copyright Peter R Wilson 2000 -% -% 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: -% -% This work has the LPPL maintenance status "maintained". -% The Current Maintainer of this work is Will Robertson. -% -% Instructions are at the end of this file, after \endinput - +%% LaTeX2e file `vertbars.sty' +%% generated by the `filecontents' environment +%% from source `vertbars' on 2010/11/27. +%% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{vertbars}[2009/09/04 v1.0a vertical bars] +\ProvidesPackage{vertbars}[2010/11/27 v1.0b vertical bars in the margin] \newcommand{\LNenv}{runninglinenumbers} \DeclareOption{switch}{% @@ -37,7 +20,7 @@ \ProcessOptions\relax \RequirePackage{lineno} -%%% code to add stuff at start and end of a pre-existing zero argument macro +% 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}% @@ -46,58 +29,27 @@ \x } +% It's useful to preserve \cmd\baselineskip: \newlength{\pwvbbl} -\setlength{\pwvbbl}{\baselineskip} % it's useful to preserve \baselineskip -\newlength{\barwidth} % width of bars +\setlength{\pwvbbl}{\baselineskip} + +% Width of bars: +\newlength{\barwidth} \setlength{\barwidth}{0.4pt} -\newlength{\barspace} % horizontal space between bars + +% 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}{\begin{\LNenv}% - \addtodef{\pwvbLNL}{}{\addtomakeLNL}% - \let\LineNumber\pwvbLNL% - }{\end{\LNenv}} - -\endinput - -% Instructions: -% -% Read the documentation for the lineno package. -% -% The vertbars package takes the same options as the 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: -% \usepackage[...]{vertbars} -% -% The package provides one environment, namely the vertbar environment. -% The vertbar environment 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 \barwidth, which -% is initialised to 0.4pt, and can be changed via \setlength. -% -% The horizontal seperation between adjacent bars is controlled by -% the value of \barspace, which is initialised to 0.5\linenumbersep, and can -% be changed via \setlength. (\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 changebar package. Any limitations -% of the lineno package apply equally to the vertbars package. -% -% Peter W. -% -% CHANGE HISTORY -% -% v1.0a (2009/09/04) - New maintainer (Will Robertson) -% - - +\newenvironment{vertbar}{% + \pagewiselinenumbers % <= added v1.0b + \begin{\LNenv}% + \addtodef{\pwvbLNL}{}{\addtomakeLNL}% + \let\LineNumber\pwvbLNL +}{% + \end{\LNenv}% +} -- cgit v1.2.3