diff options
author | Karl Berry <karl@freefriends.org> | 2016-02-12 00:25:45 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-02-12 00:25:45 +0000 |
commit | 89bd11ec39b2b88d322dca36ee0db6e01050dda3 (patch) | |
tree | b50c2bc85c3b48014dd663355692662410c72959 /Master/texmf-dist/tex/latex/leaflet | |
parent | e61d83b5ff5c38ecb67a00a7081b0be2e944e5d9 (diff) |
leaflet (10feb16)
git-svn-id: svn://tug.org/texlive/trunk@39683 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/leaflet')
-rw-r--r-- | Master/texmf-dist/tex/latex/leaflet/leaflet.cls | 80 |
1 files changed, 55 insertions, 25 deletions
diff --git a/Master/texmf-dist/tex/latex/leaflet/leaflet.cls b/Master/texmf-dist/tex/latex/leaflet/leaflet.cls index 8609afcc6cd..cbdc3a4a7e4 100644 --- a/Master/texmf-dist/tex/latex/leaflet/leaflet.cls +++ b/Master/texmf-dist/tex/latex/leaflet/leaflet.cls @@ -7,7 +7,7 @@ %% leaflet.dtx (with options: `class') %% %% Copyright (C) 2003, 2004 -%% Rolf Niepraschk, Rolf.Niepraschk@ptb.de +%% Rolf Niepraschk, Rolf.Niepraschk@gmx.de %% Hubert Gaesslein, HubertJG@open.mind.de %% %% This work may be distributed and/or modified under the @@ -22,12 +22,14 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesClass{leaflet} - [2013/11/06 v1.0d LaTeX document class (JS,WaS,RN,HjG)] + [2015/12/27 v1.1a LaTeX document class (JS,WaS,RN,HjG)] \let\LL@shipout\shipout \let\LL@outputpage\@outputpage \let\LL@begindvi\@begindvi \let\LL@@end\@@end \@ifundefined{iflandscape}{\newif\iflandscape}{}% \@ifundefined{iftumble}{\newif\iftumble}{}% \@ifundefined{iftwopart}{\newif\iftwopart}{}% +\@ifundefined{iffoldcorr}{\newif\iffoldcorr}{}% +\newlength\LL@tempdima \newcommand\LL@debug@info[1]{}% \DeclareOption{dvips}{\PassOptionsToPackage{\CurrentOption}{graphics}} \DeclareOption{pdftex}{\PassOptionsToPackage{\CurrentOption}{graphics}} @@ -64,12 +66,14 @@ \def\LL@foldmark{% \begingroup \linethickness{\LenToUnit{\foldmarkrule}}% - \setlength\@tempdima{\paperheight-\LL@tmargin}% + \@tempdima=\dimexpr\paperheight-\LL@tmargin \put(0,\LenToUnit{\@tempdima}){% \line(0,-1){\LenToUnit{\foldmarklength}}}% \endgroup}% } \DeclareOption{nofoldmark}{\def\LL@foldmark{}}% +\DeclareOption{foldcorr}{\foldcorrtrue} +\DeclareOption{nofoldcorr}{\foldcorrfalse} \newcommand*\LL@toomanypages[2]{} \DeclareOption{draft}{\PassOptionsToClass{\CurrentOption}{article}% \AtEndOfClass{% @@ -226,7 +230,7 @@ \let\@begindvi\@empty \fi% end of \ifLL@combine \LoadClass{article} -\RequirePackage{everyshi,calc,graphicx} +\RequirePackage{everyshi,graphicx} \newcommand*\LL@pagesize@specials[2]{} \@ifundefined{Gin@driver}{}% {% @@ -372,16 +376,15 @@ \setlength\topmargin{#1}% \edef\LL@tmargin{\the\topmargin}% \setlength\evensidemargin{#2}% - \setlength\textheight{% - \paperheight-\topmargin-\evensidemargin% - -\headheight-\headsep-\footskip}% + \textheight=\dimexpr\paperheight + -\topmargin-\evensidemargin-\headheight-\headsep-\footskip \setlength\oddsidemargin{#3}% \setlength\evensidemargin{#4}% - \setlength\textwidth{% - \paperwidth-\oddsidemargin-\evensidemargin-\marginparwidth-\marginparsep}% + \textwidth=\dimexpr\paperwidth + -\oddsidemargin-\evensidemargin-\marginparwidth-\marginparsep \addtolength\topmargin{-1in}% \addtolength\oddsidemargin{-1in}% - \evensidemargin\oddsidemargin% + \evensidemargin\oddsidemargin } \LL@setPaperSize \paperwidth=0.333333334\paperwidth @@ -396,7 +399,7 @@ \if@tempswa\def\@tempa{LL@largePic}\else\def\@tempa{LL@smallPic}\fi \expandafter\providecommand\csname\@tempa\@Roman{#1}\endcsname{}% \expandafter\g@addto@macro\csname\@tempa\@Roman{#1}\endcsname{#2}} -\newcommand\LenToUnit[1]{#1\@gobble} +\providecommand\LenToUnit[1]{#1\@gobble} \newcommand*\CutLine{% \@ifstar{\@tempswatrue\LL@CutLine}{\@tempswafalse\LL@CutLine}} \@onlypreamble\CutLine @@ -428,27 +431,54 @@ \newcommand\LL@tempa{} \newcommand*\LL@savePage{% \ifnum\c@LL@page<7\relax - \setbox\@cclv\vbox{% - \vbox{\@tempdima=1in\relax - \@tempdimb=\paperheight\advance\@tempdimb-\@tempdima - \pictur@(0,0)(\LenToUnit{\@tempdima},\LenToUnit{\@tempdimb})% - \begingroup - \set@typeset@protect - \@nameuse{LL@smallPic\Roman{LL@page}}% - %\set@display@protect - \endgroup - \endpicture}% - \nointerlineskip\box\@cclv}% + \LL@tempdima=\paperwidth \ifLL@combine + \iffoldcorr + \@tempswafalse + \ifnum\c@LL@page=4\relax + \@tempswatrue + \else + \ifnum\c@LL@page=5\relax + \@tempswatrue + \fi + \fi + \if@tempswa\LL@tempdima=0.9797979798\paperwidth + \else\LL@tempdima=1.0101010101\paperwidth \fi + \fi \@@@exec@outs \expandafter\newsavebox\csname LL@box\Roman{LL@page}\endcsname% \setbox\@cclv=\vbox{\vskip1in\unvbox\@cclv}% \setbox\@cclv=\vbox{\moveright1in\box\@cclv}% \setbox\@cclv=\hb@xt@\paperwidth{\box\@cclv\hss}% - \setbox\@cclv=\vb@xt@\paperheight{\box\@cclv\vss}% - \global\expandafter\setbox% - \csname LL@box\Roman{LL@page}\endcsname=\box\@cclv% + \iffoldcorr\setbox\@cclv=\hb@xt@\LL@tempdima{\hss\box\@cclv\hss}\fi + \setbox\@cclv=\vb@xt@\paperheight{% + \vbox{% + \pictur@(0,0)(0,\LenToUnit{\paperheight})% + \begingroup + \set@typeset@protect + \paperwidth=\LL@tempdima + \@nameuse{LL@smallPic\Roman{LL@page}}% + \endgroup + \endpicture + }% + \nointerlineskip\box\@cclv\vss + }% + \global\expandafter\setbox + \csname LL@box\Roman{LL@page}\endcsname=\box\@cclv \typeout{\@spaces[\the\c@LL@page] ==> [\Roman{LL@page}]}% + \else + \setbox\@cclv\vbox{% + \vbox{\@tempdima=1in\relax + \@tempdimb=\paperheight\advance\@tempdimb-\@tempdima + \pictur@(0,0)(\LenToUnit{\@tempdima},\LenToUnit{\@tempdimb})% + \begingroup + \set@typeset@protect + \@nameuse{LL@smallPic\Roman{LL@page}}% + \endgroup + \endpicture + }% + \nointerlineskip\box\@cclv + }% \fi \fi \ifnum\c@LL@page=7\relax |