%% %% This is file `addlines.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% addlines.dtx (with options: `package') %% %% _______________________________________ %% Copyright (C) 2007-2018 Will Robertson %% %% License information appended. %% %% \ProvidesPackage{addlines} [2018/12/05 v0.3 Add/remove lines from a page] \RequirePackage{afterpage,changepage} \newif\if@addlines@checkpage@ \DeclareOption{final}{\@addlines@checkpage@true} \DeclareOption{draft}{\@addlines@checkpage@false} \ExecuteOptions{final} \ProcessOptions \newcommand\addlines{\@ifstar\addlines@a\addlines@b} \newcommand\addlines@a[1][1]{\addlines@here{#1}} \newcommand\addlines@b[1][1]{\addlines@do{#1}} \newcommand\addlines@here[1]{\enlargethispage{#1\baselineskip}} \newcommand\addlines@do[1]{% \if@twocolumn \addlines@twocol{#1}% \else \addlines@onecol{#1}% \fi } \newcommand\addlines@onecol[1]{% \addlines@here{#1}% \if@twoside \checkoddpage \ifoddpage \addlines@error{page} \else \afterpage{\addlines@here{#1}}% \fi \fi} \newcommand\addlines@twocol[1]{% \enlargethispage{#1\baselineskip}% \if@firstcolumn \afterpage{\enlargethispage{#1\baselineskip}}% \else \addlines@error{column}% \fi \if@twoside \checkoddpage \ifoddpage \addlines@error{page}% \else \afterpage{\afterpage{\addlines@here{#1}}}% \afterpage{\afterpage{\afterpage{\addlines@here{#1}}}}% \fi \fi} \newcommand\addlines@error[1]{% \if@addlines@checkpage@ \PackageError{addlines} {\MessageBreak You're adding lines to the wrong #1} {Extra lines need to be added to all columns and both sides of a doublepage spread.^^J This error might clear up after a recompile, though.}% \fi } \let\addline\addlines \newcommand\removelines{\@ifstar\removelines@a\removelines@b} \newcommand\removelines@a[1][1]{\addlines@here{\numexpr -1*(#1) \relax}} \newcommand\removelines@b[1][1]{\addlines@do{\numexpr -1*(#1) \relax}} \let\removeline\removelines \newcommand\squeezepage[1][0]{\enlargethispage*{#1\baselineskip}} \strictpagechecktrue %% %% Copyright (C) 2007-2018 by Will Robertson %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of %% this license is at: http://www.latex-project.org/lppl.txt %% %% This work is "maintained" (as per LPPL maintenance status) %% by Will Robertson. %% %% This work consists of the files addlines.dtx and %% addlines.ins, %% and the derived file addlines.sty. %% %% %% End of file `addlines.sty'.