diff options
author | Norbert Preining <norbert@preining.info> | 2022-09-21 03:01:15 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-09-21 03:01:15 +0000 |
commit | 447570beca76a6dfe5283e4793fd2bbabe73766b (patch) | |
tree | efd46c488b2b54cc383cef86e0090bf23aabbe54 /macros/latex/contrib/blowup | |
parent | 7907f67d07d36a7e20421a1ec3a0eceecac4aacd (diff) |
CTAN sync 202209210301
Diffstat (limited to 'macros/latex/contrib/blowup')
-rw-r--r-- | macros/latex/contrib/blowup/README.md | 12 | ||||
-rw-r--r-- | macros/latex/contrib/blowup/blowup-ex1.pdf | bin | 30706 -> 33365 bytes | |||
-rw-r--r-- | macros/latex/contrib/blowup/blowup-ex1.tex | 32 | ||||
-rw-r--r-- | macros/latex/contrib/blowup/blowup-ex2.pdf | bin | 30705 -> 33377 bytes | |||
-rw-r--r-- | macros/latex/contrib/blowup/blowup-ex2.tex | 40 | ||||
-rw-r--r-- | macros/latex/contrib/blowup/blowup-ex3.pdf | bin | 31331 -> 34010 bytes | |||
-rw-r--r-- | macros/latex/contrib/blowup/blowup-ex3.tex | 43 | ||||
-rw-r--r-- | macros/latex/contrib/blowup/blowup-ex4.pdf | bin | 31085 -> 12537 bytes | |||
-rw-r--r-- | macros/latex/contrib/blowup/blowup-ex4.tex | 37 | ||||
-rw-r--r-- | macros/latex/contrib/blowup/blowup-ex5.pdf | bin | 19223 -> 20246 bytes | |||
-rw-r--r-- | macros/latex/contrib/blowup/blowup-ex5.tex | 19 | ||||
-rw-r--r-- | macros/latex/contrib/blowup/blowup.dtx | 284 | ||||
-rw-r--r-- | macros/latex/contrib/blowup/blowup.ins | 40 | ||||
-rw-r--r-- | macros/latex/contrib/blowup/blowup.pdf | bin | 229251 -> 196888 bytes |
14 files changed, 265 insertions, 242 deletions
diff --git a/macros/latex/contrib/blowup/README.md b/macros/latex/contrib/blowup/README.md index 8f59764c93..b749047784 100644 --- a/macros/latex/contrib/blowup/README.md +++ b/macros/latex/contrib/blowup/README.md @@ -1,9 +1,13 @@ # blowup -The package blowup only defines the user-level macro \blowUp, which can be -used to upscale or downscale all pages of a document. It is similar to the -TeX primitive \magnification but more accurate and in a user-friendly manner. + +This package only defines the user-level macro `\blowUp`, which can be used +to scale all pages of a document up or down. It is similar to the TeX +primitive `\mag`, but more accurate and user-friendly. `\blowUp` can be +useful for creating posters from a normal sized document and for many other +types of fine-tuning of a finished document (e.g., minor scaling changes and +position of the pages). Home page: https://github.com/rolfn/blowup -Rolf Niepraschk, 2018-01-02 +Rolf Niepraschk, 2022-09-19 diff --git a/macros/latex/contrib/blowup/blowup-ex1.pdf b/macros/latex/contrib/blowup/blowup-ex1.pdf Binary files differindex fa37576439..d67653e490 100644 --- a/macros/latex/contrib/blowup/blowup-ex1.pdf +++ b/macros/latex/contrib/blowup/blowup-ex1.pdf diff --git a/macros/latex/contrib/blowup/blowup-ex1.tex b/macros/latex/contrib/blowup/blowup-ex1.tex index 47df129299..eb58ff61ef 100644 --- a/macros/latex/contrib/blowup/blowup-ex1.tex +++ b/macros/latex/contrib/blowup/blowup-ex1.tex @@ -1,32 +1,28 @@ - -%--------------------------- -% Rolf Niepraschk, Rolf.Niepraschk@gmx.de, 2017-07-28 - -% lualatex blowup-test.tex -% or -% pdflatex blowup-test.tex -% or -% latex blowup-test.tex ; dvips blowup-test ; ps2pdf blowup-test.ps -% or -% vlatex blowup-test.tex +% Rolf Niepraschk, 2020-09-19 +% +% Translate to pdf with any TeX compiler and check the page size with +% +% pdfinfo filename.pdf +% +% or via the properties menu of the pdf viewer % -% pdfinfo blowup-test.pdf - \listfiles \documentclass[letterpaper,twoside]{article} \usepackage{array,xcolor} -% Only to show the source page size. -\usepackage{eso-pic} -\AddToShipoutPicture{% - \AtPageLowerLeft{\textcolor{green!30}{\rule{\paperwidth}{\paperheight}}}% +% Just to show the page size of the source. +\usepackage{xcolor,atbegshi} +\AtBeginShipout{% + \AtBeginShipoutUpperLeft{% + \textcolor{green!30}{\rule[-\paperheight]{\paperwidth}{\paperheight}}% + }% } \renewcommand\familydefault{\sfdefault} \setlength\parindent{0pt} \pagestyle{empty} -\usepackage{blowup}% Load "blowup" as last package! +\usepackage{blowup} \blowUp{target=a4,pos=c}% vert. and horiz. centered (default) \begin{document} diff --git a/macros/latex/contrib/blowup/blowup-ex2.pdf b/macros/latex/contrib/blowup/blowup-ex2.pdf Binary files differindex 6289de97ca..5ee25768e0 100644 --- a/macros/latex/contrib/blowup/blowup-ex2.pdf +++ b/macros/latex/contrib/blowup/blowup-ex2.pdf diff --git a/macros/latex/contrib/blowup/blowup-ex2.tex b/macros/latex/contrib/blowup/blowup-ex2.tex index 7833df4ac5..bb9d839fc7 100644 --- a/macros/latex/contrib/blowup/blowup-ex2.tex +++ b/macros/latex/contrib/blowup/blowup-ex2.tex @@ -1,33 +1,30 @@ - -%--------------------------- -% Rolf Niepraschk, Rolf.Niepraschk@gmx.de, 2017-07-28 - -% lualatex blowup-test.tex -% or -% pdflatex blowup-test.tex -% or -% latex blowup-test.tex ; dvips blowup-test ; ps2pdf blowup-test.ps -% or -% vlatex blowup-test.tex +% Rolf Niepraschk, 2020-09-19 +% +% Translate to pdf with any TeX compiler and check the page size with +% +% pdfinfo filename.pdf +% +% or via the properties menu of the pdf viewer % -% pdfinfo blowup-test.pdf - \listfiles \documentclass[a4paper,twoside]{article} -\usepackage{array,xcolor} - -% Only to show the source page size. -\usepackage{eso-pic} -\AddToShipoutPicture{% - \AtPageLowerLeft{\textcolor{green!30}{\rule{\paperwidth}{\paperheight}}}% +\usepackage{array} + +% Just to show the page size of the source. +\usepackage{xcolor,atbegshi} +\AtBeginShipout{% + \AtBeginShipoutUpperLeft{% + \textcolor{green!30}{\rule[-\paperheight]{\paperwidth}{\paperheight}}% + }% } \renewcommand\familydefault{\sfdefault} \setlength\parindent{0pt} \pagestyle{empty} -\usepackage{blowup}% Load "blowup" as last package! -\blowUp{target=letter,pos=outside}% outside aligned +\usepackage{blowup} +\blowUp{target=letter,pos=c}% centered +%\blowUp{target=letter,pos=outside}% outside aligned \begin{document} @@ -60,4 +57,3 @@ A4-size document on letter-size paper \newpage\null 2nd page\dots \end{document} -%--------------------------- diff --git a/macros/latex/contrib/blowup/blowup-ex3.pdf b/macros/latex/contrib/blowup/blowup-ex3.pdf Binary files differindex 4ae95e7a99..53404b97d9 100644 --- a/macros/latex/contrib/blowup/blowup-ex3.pdf +++ b/macros/latex/contrib/blowup/blowup-ex3.pdf diff --git a/macros/latex/contrib/blowup/blowup-ex3.tex b/macros/latex/contrib/blowup/blowup-ex3.tex index b4364c8bee..65cf7b8dc9 100644 --- a/macros/latex/contrib/blowup/blowup-ex3.tex +++ b/macros/latex/contrib/blowup/blowup-ex3.tex @@ -1,34 +1,30 @@ - -%--------------------------- -% Rolf Niepraschk, Rolf.Niepraschk@gmx.de, 2017-07-28 - -% lualatex blowup-test.tex -% or -% pdflatex blowup-test.tex -% or -% latex blowup-test.tex ; dvips blowup-test ; ps2pdf blowup-test.ps -% or -% vlatex blowup-test.tex +% Rolf Niepraschk, 2020-09-19 +% +% Translate to pdf with any TeX compiler and check the page size with +% +% pdfinfo filename.pdf +% +% or via the properties menu of the pdf viewer % -% pdfinfo blowup-test.pdf - \listfiles \documentclass[a5paper,twoside]{article} -\usepackage{array,xcolor} - -% Only to show the source page size. -\usepackage{eso-pic} -\AddToShipoutPicture{% - \AtPageLowerLeft{\textcolor{green!30}{\rule{\paperwidth}{\paperheight}}}% +\usepackage{array} + +% Just to show the page size of the source. +\usepackage{xcolor,atbegshi} +\AtBeginShipout{% + \AtBeginShipoutUpperLeft{% + \textcolor{green!30}{\rule[-\paperheight]{\paperwidth}{\paperheight}}% + }% } \renewcommand\familydefault{\sfdefault} \setlength\parindent{0pt} \pagestyle{empty} -\usepackage{blowup}% Load "blowup" as last package! -\blowUp{origin={143mm,202mm},target=a5,pos={o,b}}% top and outside aligned -% or the same: +\usepackage{blowup} +\blowUp{origin={143mm,202mm},target=a5,pos={o,c}}% centered and outside aligned +% or: % \blowUp{origin=x0.966216,target=a5,pos={o,b}}% top and outside aligned \begin{document} @@ -38,7 +34,7 @@ \Large\centering A bit downscaled A5-size document on \mbox{A5-size paper} -(more space for binding) +(5mm more space for binding) \vfill @@ -63,4 +59,3 @@ A bit downscaled A5-size document on \mbox{A5-size paper} \newpage\null 2nd page\,\dots \end{document} -%--------------------------- diff --git a/macros/latex/contrib/blowup/blowup-ex4.pdf b/macros/latex/contrib/blowup/blowup-ex4.pdf Binary files differindex d40dce1266..5d0816e9a4 100644 --- a/macros/latex/contrib/blowup/blowup-ex4.pdf +++ b/macros/latex/contrib/blowup/blowup-ex4.pdf diff --git a/macros/latex/contrib/blowup/blowup-ex4.tex b/macros/latex/contrib/blowup/blowup-ex4.tex index d7c12f9677..c68fb04777 100644 --- a/macros/latex/contrib/blowup/blowup-ex4.tex +++ b/macros/latex/contrib/blowup/blowup-ex4.tex @@ -1,32 +1,28 @@ - -%--------------------------- -% Rolf Niepraschk, Rolf.Niepraschk@gmx.de, 2017-07-28 - -% lualatex blowup-test.tex -% or -% pdflatex blowup-test.tex -% or -% latex blowup-test.tex ; dvips blowup-test ; ps2pdf blowup-test.ps -% or -% vlatex blowup-test.tex +% Rolf Niepraschk, 2020-09-19 +% +% Translate to pdf with any TeX compiler and check the page size with +% +% pdfinfo filename.pdf +% +% or via the properties menu of the pdf viewer % -% pdfinfo blowup-test.pdf - \listfiles \documentclass[paper=a4,landscape]{scrartcl} -\usepackage{array,xcolor} - -% Only to show the source page size. -\usepackage{eso-pic} -\AddToShipoutPicture{% - \AtPageLowerLeft{\textcolor{green!30}{\rule{\paperwidth}{\paperheight}}}% +\usepackage{array} + +% Just to show the page size of the source. +\usepackage{xcolor,atbegshi} +\AtBeginShipout{% + \AtBeginShipoutUpperLeft{% + \textcolor{green!30}{\rule[-\paperheight]{\paperwidth}{\paperheight}}% + }% } \renewcommand\familydefault{\sfdefault} \setlength\parindent{0pt} \pagestyle{empty} -\usepackage{blowup}% Load "blowup" as last package! +\usepackage{blowup} \blowUp{target=a0,landscape,onepage} \begin{document} @@ -61,4 +57,3 @@ The first page of a multipage A4-size document scaled to \mbox{A0-size paper} \newpage\null 2nd page\,\dots \end{document} -%--------------------------- diff --git a/macros/latex/contrib/blowup/blowup-ex5.pdf b/macros/latex/contrib/blowup/blowup-ex5.pdf Binary files differindex 69328f9796..f41f2eb1d2 100644 --- a/macros/latex/contrib/blowup/blowup-ex5.pdf +++ b/macros/latex/contrib/blowup/blowup-ex5.pdf diff --git a/macros/latex/contrib/blowup/blowup-ex5.tex b/macros/latex/contrib/blowup/blowup-ex5.tex index c5f55abbea..435bc7ba27 100644 --- a/macros/latex/contrib/blowup/blowup-ex5.tex +++ b/macros/latex/contrib/blowup/blowup-ex5.tex @@ -1,7 +1,21 @@ - +% Rolf Niepraschk, 2020-09-19 +% +% Translate to pdf with any TeX compiler and check the page size with +% +% pdfinfo filename.pdf +% +% or via the properties menu of the pdf viewer +% \listfiles \documentclass[paper=b6,fontsize=11pt,twoside]{scrartcl} -\usepackage{showframe} + +% Just to show the page size of the source. +\usepackage{xcolor,atbegshi} +\AtBeginShipout{% + \AtBeginShipoutUpperLeft{% + \textcolor{green!30}{\rule[-\paperheight]{\paperwidth}{\paperheight}}% + }% +} \newcommand*\aPage{% \Huge @@ -20,4 +34,3 @@ \aPage \end{document} -%--------------------------- diff --git a/macros/latex/contrib/blowup/blowup.dtx b/macros/latex/contrib/blowup/blowup.dtx index b9ee1cc50f..374f2878de 100644 --- a/macros/latex/contrib/blowup/blowup.dtx +++ b/macros/latex/contrib/blowup/blowup.dtx @@ -1,17 +1,21 @@ % \iffalse meta-comment % -% Copyright (C) 2007, 2018- -% Rolf Niepraschk, Rolf.Niepraschk@gmx.de -% +% Copyright (C) 2007, 2017-2022 by Rolf Niepraschk +% --------------------------------------------------------------------------- % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. % The latest version of this license is in % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX -% version 2003/12/01 or later. -% -% This work has the LPPL maintenance status "author-maintained". +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status `maintained'. +% +% The Current Maintainer of this work is Rolf Niepraschk. +% +% This work consists of the files blowup.dtx and blowup.ins +% and the derived filebase blowup.sty. % % \fi % @@ -19,14 +23,13 @@ %<*driver> \ProvidesFile{blowup.dtx} %</driver> -%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] -%<package>\ProvidesPackage{blowup}[2018/01/02 1.0 Document Scaling (RN)] +%<package>\NeedsTeXFormat{LaTeX2e}[2020/10/01] +%<package>\ProvidesPackage{blowup}[2022/09/19 2.0.0 Page scaling (RN)] % %<*driver> \documentclass{ltxdoc} -\usepackage{array,longtable} -\IfFileExists{ragged2e.sty}{% - \usepackage{ragged2e}}{\let\RaggedRight=\raggedright} +\usepackage{blowup,array,longtable,ragged2e} +\let\RaggedRight=\raggedright \newcommand{\m}[1]{\mbox{$\langle$\it #1\/$\rangle$}} \renewcommand{\arg}[1]{{\ttfamily\string{}\m{#1}{\ttfamily\string}}} \EnableCrossrefs @@ -34,11 +37,13 @@ \RecordChanges \begin{document} \DocInput{blowup.dtx} + \PrintChanges + \PrintIndex \end{document} %</driver> % \fi % -% \CheckSum{504} +% \CheckSum{510} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -57,46 +62,40 @@ % Right brace \} Tilde \~} % % -% \changes{v0.1a}{2007/08/14}{Initial version. (RN)} +% \changes{0.1a}{2007/08/14}{Initial version. (RN)} +% \changes{2.0.0}{2022/09/19}{Major parts rewritten. (RN)} % -% \GetFileInfo{blowup.dtx} +% \DoNotIndex{\newcommand,\newenvironment,\z@,\vskip,\hskip,\vss,\hss,\value, +% \the,\ifx,\if,\fi,ifdim,\ifodd,\else,\providecommand,\newif,\newlength,\noexpand, +% \let,\def,\gdef,\edef,\xdef,\kern,\string,\box,\copy,\csname,\endcsname, +% \begingroup,\endgroup,\expandafter,\relax,\@tempboxa,\@tempdima,\@tempdimb, +% \@empty,\@firstoftwo,\@ifundefined,\@nil,\@secondoftwo,\@tempswafalse, +% \@tempswatrue,\if@tempswa,\@for,\do,\ht,\wd,\dp,\g@addto@macro,\hbox,\vbox, +% \hb@xt@,\vb@xt@,\global,\l@addto@macro,\moveright,\BL@tempa,\BL@tempb} % -% \DoNotIndex{\newcommand,\newenvironment} -% -% \newcommand\afterheading{\par\nobreak\@afterheading} -% \newcolumntype{P}[1]{>{\RaggedRight\hspace{0pt}}p{#1}} -% -% -% \title{The \textsf{blowup} package\thanks{This document -% corresponds to \textsf{blowup}~\fileversion, dated \filedate.}} -% \author{Rolf Niepraschk \\ \texttt{Rolf.Niepraschk@gmx.de}} +% \providecommand*{\url}{\texttt} +% \GetFileInfo{blowup.sty} +% \title{The \textsf{blowup} package} +% \author{Rolf Niepraschk} +% \date{Version~\fileversion~(\filedate)} % % \maketitle -% -% \begin{abstract} -% \noindent -% This package only defines the user-level macro \cmd{\blowUp}, -% which can be used to upscale or downscale all pages -% of a document. It is -% similar to the \TeX\ primitive \cmd{\magnification} but more -% accurate and in a user-friendly manner. \cmd{\blowUp} -% may be useful for the creation of posters from a normal-sized -% document and for many kinds of fine adjustments of a ready -% typesetted document (e.\,g., minor changes of scaling and -% position of the pages). -% \end{abstract} -% -% \tableofcontents +% +% \section{Introduction} +% +% This package only defines the user-level macro \cmd{\blowUp}, which can be +% used to scale all pages of a document up or down. It is similar to the \TeX\ +% primitive \cmd{\mag}, but more accurate and user-friendly. \cmd{\blowUp} can +% be useful for creating posters from a normal sized document and for many other +% types of fine-tuning of a finished document (e.g., minor scaling changes and +% position of the pages). % % \section{Usage} -% Load the package after other packages that affect the paper size -% (e.\,g., \textsf{geometry} and \textsf{hyperref}). -% Then call the macro \cmd{\blowUp} before |\begin{document}| to scale -% the document. \par \medskip \noindent -% |\usepackage{blowup}| \par \noindent -% \cmd{\blowUp}\arg{key=value} \par \noindent -% \vspace{-\baselineskip} +% The only user macro is \cmd{\blowUp}\arg{key=value}. Call it before +% |\begin{document}| to scale all pages of the document: \par \medskip\noindent +% % \setlength\extrarowheight{.2ex} +% \newcolumntype{P}[1]{>{\RaggedRight\hspace{0pt}}p{#1}} % \begin{longtable}{@{}lP{.75\linewidth}@{}} % \multicolumn{1}{@{}l}{\textbf{key}} & % \multicolumn{1}{l@{}}{\textbf{value}} \tabularnewline \hline @@ -104,21 +103,22 @@ % & |letter|, |legal|, |executive| or a paper size from the % ISO/DIN paper series A, B, C, D % (e.\,g., |a8|, |c7|,..., |b1|, |a0|) or a pair of dimensions -% in curly brackets (e.\,g., |paper={925mm,1225mm}|) or the +% in curly brackets (e.\,g., |target={925mm,1225mm}|) or the % letter `x' followed by a scaling factor -% (e.\,g., |paper=x1.414213|). \tabularnewline[.4\baselineskip] -% origin & The paper size of the source document; no scaling to the target -% size. \tabularnewline +% (e.\,g., |target=x1.414213|). \tabularnewline[.4\baselineskip] +% origin & Scaled size of the source document: \tabularnewline % & |letter|, |legal|, |executive| or a paper size from the % ISO/DIN paper series A, B, C, D % (e.\,g., |a8|, |c7|,..., |b1|, |a0|) or a pair of dimensions -% in curly brackets (e.\,g., |paper={925mm,1225mm}|) or the +% in curly brackets (e.\,g., |origin={925mm,1225mm}|) or the % letter `x' followed by a scaling factor -% (e.\,g., |paper=x1.414213|). \tabularnewline[.4\baselineskip] +% (e.\,g., |origin=x1.414213|). \tabularnewline[.4\baselineskip] % landscape & Exchanges paperwidth and paperheight: \tabularnewline -% & |true| (the same as no value) or |false|. \tabularnewline[.4\baselineskip] +% & |true| (the same as no value) or |false|. +% \tabularnewline[.4\baselineskip] % noscale & No scaling of the original paper size: \tabularnewline -% & |true| (the same as no value) or |false|. \tabularnewline[.4\baselineskip] +% & |true| (the same as no value) or |false|. +% \tabularnewline[.4\baselineskip] % pos & Position of the page on the paper: \tabularnewline % & |left| or |right|, |inside| or |outside|, |top| or |bottom| % (only the first letter is significant; default is @@ -134,19 +134,14 @@ % \vspace{0\baselineskip} % See also the example documents |blowup-ex?.tex|. % -% \section{Required Packages} -% -% The \textsf{blowup} package requires the following packages: -% \textsf{atbegshi}, \textsf{graphics}, \textsf{keyval}, and -% \textsf{typearea}. -% -% \StopEventually{\PrintChanges\PrintIndex} +% \StopEventually{} % % \section{Implementation} % -% \begin{macrocode} +% \iffalse %<*package> -% \end{macrocode} +% \fi +% % Load some packages for utility macros. % \begin{macrocode} \RequirePackage{atbegshi,keyval,graphics} @@ -158,10 +153,16 @@ \g@addto@macro\BL@restore@dimens{% \csname #1\endcsname\csname BL@#1\endcsname}% }% - \newcommand*\BL@restore@dimens{}% % \end{macrocode} +% \begin{macro}{\BL@restore@dimens} % Some dimensions changed by \textsf{typearea} must be saved and restored. % \begin{macrocode} + \newcommand*\BL@restore@dimens{}% +% \end{macrocode} +% \end{macro} +% \begin{macrocode} + \BL@save@dimen{paperwidth}% + \BL@save@dimen{paperheight}% \BL@save@dimen{textwidth}% \BL@save@dimen{textheight}% \BL@save@dimen{evensidemargin}% @@ -172,43 +173,54 @@ \BL@save@dimen{topskip}% \BL@save@dimen{footskip}% \BL@save@dimen{baselineskip}% -% \end{macrocode} -% \changes{v0.1j}{2008/11/14}{Undefine \cmd{\l@addto@macro}. (RN)} -% Prevent an error if \cmd{\l@addto@macro} is already defined. -% \begin{macrocode} \let\l@addto@macro=\relax - \RequirePackage{typearea}% + \RequirePackage[pagesize=false]{typearea}% + \expandafter\let\csname ver@typearea.sty\endcsname=\relax \BL@restore@dimens \let\BL@save@dimen=\relax \let\BL@restore@dimens=\relax } +% \end{macrocode} +% +% \begin{macro}{\vb@xt@} +% Similar to \cmd{\hb@xt@} +% \begin{macrocode} \providecommand*\vb@xt@{\vbox to} % \end{macrocode} +% \end{macro} % \begin{macro}{\tPaperWidth} % \begin{macro}{\tPaperHeight} -% The size of the scaled pages. +% The size of the scaled final pages. % \begin{macrocode} -\newlength\tPaperWidth \tPaperWidth=\paperwidth -\newlength\tPaperHeight \tPaperHeight=\paperheight +\newlength\tPaperWidth +\newlength\tPaperHeight % \end{macrocode} % \end{macro} % \end{macro} % \begin{macro}{\oPaperWidth} % \begin{macro}{\oPaperHeight} -% The size of the original pages. +% The size of the original pages. % \begin{macrocode} \newlength\oPaperWidth \oPaperWidth=\z@ \newlength\oPaperHeight \oPaperHeight=\z@ % \end{macrocode} % \end{macro} % \end{macro} +% +% \begin{macro}{\BL@resize} +% Resizes the shipout box. % \begin{macrocode} \newcommand*\BL@resize[1]{#1} % \end{macrocode} +% \end{macro} % \begin{macro}{\BL@scalePage} -% Scales the output box to the dimension of the new paper size. +% The whole scaling process of the the shipout box to the dimension of the +% new paper size. % \begin{macrocode} \newcommand*\BL@scalePage{% +% \end{macrocode} +% Normalize the shipout box +% \begin{macrocode} \setbox\AtBeginShipoutBox=\vbox{% \vskip1in\moveright1in\box\AtBeginShipoutBox}% \setbox\AtBeginShipoutBox=\hb@xt@\paperwidth{% @@ -232,21 +244,26 @@ \hb@xt@\tPaperWidth{\BL@l\BL@resize{\box\AtBeginShipoutBox}\BL@r}% \BL@b\kern\z@ }% +% \end{macrocode} +% Denormalize the shipout box +% \begin{macrocode} \setbox\AtBeginShipoutBox=\vbox{% \vskip-1in\moveright-1in\box\@tempboxa}% } % \end{macrocode} % \end{macro} +% % \begin{macrocode} \newcommand\BL@tempa{} \newcommand\BL@tempb{} \newcommand*\BL@strip@comma{} \def\BL@strip@comma#1,{#1} % \end{macrocode} +% % \begin{macro}{\BL@is@dimen@pair} -% The parameter two will be executed if the first parameter is -% a comma-separated pair of two dimensions. If not the parameter three -% will be executed. +% The parameter two will be executed if the first parameter is +% a comma-separated pair of two dimensions. If not the parameter three +% will be executed. % \begin{macrocode} \newcommand*\BL@is@dimen@pair[1]{% \expandafter\BL@@is@dimen@pair#1,\@nil @@ -269,14 +286,16 @@ } % \end{macrocode} % \end{macro} +% % \begin{macrocode} \newcommand*\BL@strip@x{} \def\BL@strip@x#1x{#1} % \end{macrocode} +% % \begin{macro}{\BL@is@factor} -% The parameter two will be executed if the first parameter is the -% small letter x (`times') immediately followed by a number. If not -% the parameter three will be executed. +% The parameter two will be executed if the first parameter is the +% small letter x (`times') immediately followed by a number. If not +% the parameter three will be executed. % \begin{macrocode} \newcommand*\BL@is@factor[1]{% \expandafter\BL@@is@factor#1x\@nil @@ -297,8 +316,10 @@ } % \end{macrocode} % \end{macro} +% +% % \begin{macro}{\BL@getDimens} -% Sets the two dimen registers (|#2| and |#3|) according to parameter |#1|. +% Sets the two dimen registers (|#2| and |#3|) according to parameter |#1|. % \begin{macrocode} \newcommand*\BL@getDimens[3]{% \BL@is@dimen@pair{#1}{% @@ -319,18 +340,30 @@ } % \end{macrocode} % \end{macro} -% The key-value definitions for \cmd{\blowUp}. +% The key-value definitions for \cmd{\blowUp}: % \begin{macrocode} \define@key{BL@}{origin}{% \BL@getDimens{#1}{\oPaperWidth}{\oPaperHeight}% } +% \end{macrocode} +% +% \begin{macrocode} \define@key{BL@}{target}{% \BL@getDimens{#1}{\tPaperWidth}{\tPaperHeight}% } +% \end{macrocode} +% +% \begin{macrocode} \newif\ifBL@noscale \BL@noscalefalse +% \end{macrocode} +% +% \begin{macrocode} \define@key{BL@}{noscale}[true]{% \csname BL@noscale#1\endcsname } +% \end{macrocode} +% +% \begin{macrocode} \newcommand*\BL@l{} \newcommand*\BL@r{} \newcommand*\BL@i{} @@ -338,9 +371,11 @@ \newcommand*\BL@t{} \newcommand*\BL@b{} % \end{macrocode} +% +% % \begin{macro}{\BL@setPos} -% Modify the macros \cmd{\BL@l}, \cmd{\BL@r} (\cmd{\BL@i}, \cmd{\BL@o}), -% \cmd{\BL@t}, and \cmd{\BL@b} for positioning the page on the paper. +% Modify the macros \cmd{\BL@l}, \cmd{\BL@r} (\cmd{\BL@i}, \cmd{\BL@o}), +% \cmd{\BL@t}, and \cmd{\BL@b} for positioning the page on the paper. % \begin{macrocode} \newcommand\BL@setPos[1]{% \def\BL@l{\hss}\def\BL@r{\hss}% @@ -358,9 +393,6 @@ \if }{% \@for\BL@tempa:=#1\do{% -% \end{macrocode} -% Extract the first letter. -% \begin{macrocode} \edef\BL@tempb{\expandafter\@car\BL@tempa\@nil}% \expandafter\let\csname BL@\BL@tempb \endcsname\relax }% @@ -381,23 +413,37 @@ } % \end{macrocode} % \end{macro} +% % \begin{macrocode} \define@key{BL@}{pos}{% \BL@setPos{#1}% } +% \end{macrocode} +% +% \begin{macrocode} \newif\ifBL@landscape \BL@landscapefalse +% \end{macrocode} +% +% \begin{macrocode} \define@key{BL@}{landscape}[true]{% \csname BL@landscape#1\endcsname } -\newcommand*\BL@pageInit{} +% \end{macrocode} +% +% \begin{macrocode} +\newcommand*\BL@setup{} +% \end{macrocode} +% +% \begin{macrocode} \define@key{BL@}{onepage}[true]{% \csname if#1\endcsname - \def\BL@pageInit{\gdef\shipout{\setbox\@tempboxa=}}% + \def\BL@setup{\gdef\shipout{\deadcycles\z@\setbox\@tempboxa=}}% \fi } % \end{macrocode} +% % \begin{macro}{\blowUp} -% The only user-level macro. +% The only user-level macro. % \begin{macrocode} \newcommand*\blowUp[1]{% \setkeys{BL@}{#1}% @@ -406,60 +452,72 @@ \global\tPaperWidth=\tPaperHeight \global\tPaperHeight=\@tempdima \fi - \AtBeginShipout{\BL@scalePage}% + \AtBeginDocument{% + \AtBeginDvi{\BL@pagesize@code{\tPaperWidth}{\tPaperHeight}}% + \AtBeginShipout{\BL@setup\BL@scalePage} + }% \gdef\blowUp##1{% \PackageWarning{blowup}{Only the first call of `\string\blowUp' \MessageBreak is effective}}% } % \end{macrocode} % \end{macro} +% % \begin{macrocode} -\AtBeginShipout{\BL@pageInit} \@onlypreamble\blowUp -\AtBeginDocument{% - \BL@pagesize@specials{\tPaperWidth}{\tPaperHeight}% -} % \end{macrocode} -% \begin{macro}{\BL@pagesize@specials} -% Write pagesize informations to the output file. Depends on \TeX\ -% compiler or driver. +% +% \begin{macro}{\BL@pagesize@code} +% Page size information (depending on the \TeX\ compiler or driver). +% \begin{macrocode} +\newcommand*\BL@pagesize@code[2]{} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\RequirePackage{iftex} +% \end{macrocode} +% % \begin{macrocode} -\RequirePackage{ifxetex,ifluatex,ifpdf,ifvtex} -\newcommand*\BL@pagesize@specials[2]{} \ifluatex \PackageInfo{blowup}{Generating code for LuaTeX}% \@ifundefined{pagewidth}{% - \def\BL@pagesize@specials#1#2{\pdfpagewidth=#1 \pdfpageheight=#2}% + \def\BL@pagesize@code#1#2{\global\pdfpagewidth=#1 % + \global\pdfpageheight=#2}% }{% - \def\BL@pagesize@specials#1#2{\pagewidth=#1 \pageheight=#2}% + \def\BL@pagesize@code#1#2{\global\pagewidth=#1 % + \global\pageheight=#2}% } \else \ifxetex \PackageInfo{blowup}{Generating code for XeTeX}% - \def\BL@pagesize@specials#1#2{\@tempdima=#1 \@tempdimb=#2 % - \AtBeginDvi{\special{papersize=\the\@tempdima,\the\@tempdimb}}% - \pdfpagewidth=#1 \pdfpageheight=#2}% + \def\BL@pagesize@code#1#2{\global\pdfpagewidth=#1 % + \global\pdfpageheight=#2}% \else \ifvtex \PackageInfo{blowup}{Generating code for VTeX}% - \def\BL@pagesize@specials#1#2{\mediawidth=#1 \mediaheight=#2}% + \def\BL@pagesize@code#1#2{\global\mediawidth=#1 % + \global\mediaheight=#2}% \else \ifpdf \PackageInfo{blowup}{Generating code for pdfTeX}% - \def\BL@pagesize@specials#1#2{\pdfpagewidth=#1 \pdfpageheight=#2}% + \def\BL@pagesize@code#1#2{\global\pdfpagewidth=#1 % + \global\pdfpageheight=#2}% \else \PackageInfo{blowup}{Generating code for dvips}% - \def\BL@pagesize@specials#1#2{\@tempdima=#1 \@tempdimb=#2 % - \AtBeginDvi{\special{papersize=\the\@tempdima,\the\@tempdimb}}}% + \def\BL@pagesize@code#1#2{% + \@tempdima=#1 \@tempdimb=#2 % + \special{papersize=\the\@tempdima,\the\@tempdimb}% + }% \fi - \fi + \fi \fi \fi % \end{macrocode} -% \end{macro} -% \begin{macrocode} +% +% \iffalse %</package> -% \end{macrocode} +% \fi % % \Finale -%\endinput +\endinput diff --git a/macros/latex/contrib/blowup/blowup.ins b/macros/latex/contrib/blowup/blowup.ins index e217a23828..2782987720 100644 --- a/macros/latex/contrib/blowup/blowup.ins +++ b/macros/latex/contrib/blowup/blowup.ins @@ -1,44 +1,10 @@ -%% -%% Copyright (C) 2007, 2017- -%% Rolf Niepraschk, Rolf.Niepraschk@gmx.de -%% -%% This work may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3 -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% http://www.latex-project.org/lppl.txt -%% and version 1.3 or later is part of all distributions of LaTeX -%% version 2003/12/01 or later. -%% -%% This work has the LPPL maintenance status "author-maintained". - -\input docstrip.tex -\keepsilent - -\usedir{tex/latex/blowup} - -\preamble - - Copyright (C) 2007, 2017- - Rolf Niepraschk, Rolf.Niepraschk@gmx.de - - This work may be distributed and/or modified under the - conditions of the LaTeX Project Public License, either version 1.3 - of this license or (at your option) any later version. - The latest version of this license is in - http://www.latex-project.org/lppl.txt - and version 1.3 or later is part of all distributions of LaTeX - version 2003/12/01 or later. - - This work has the LPPL maintenance status "author-maintained". - -\endpreamble +\input docstrip \keepsilent \askforoverwritefalse -\generate{ - \file{blowup.sty}{\from{blowup.dtx}{package}} +\generate{\file{blowup.sty}{\usepreamble\defaultpreamble +\usepostamble\defaultpostamble\from{blowup.dtx}{blowup.sty,package}} } \obeyspaces diff --git a/macros/latex/contrib/blowup/blowup.pdf b/macros/latex/contrib/blowup/blowup.pdf Binary files differindex ece08ca2ee..03efefbc9c 100644 --- a/macros/latex/contrib/blowup/blowup.pdf +++ b/macros/latex/contrib/blowup/blowup.pdf |