diff options
author | Karl Berry <karl@freefriends.org> | 2017-04-11 21:15:04 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-04-11 21:15:04 +0000 |
commit | 788d56ac87017f66b122ea36502e185497f5b6aa (patch) | |
tree | b7150767e9ba2bab30d9eae4368d58f8d035d41b /Master/texmf-dist/tex/latex/minidocument | |
parent | fe42f14592a869d9eb04e6bedbf28054c7c2559d (diff) |
minidocument (11apr17)
git-svn-id: svn://tug.org/texlive/trunk@43752 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/minidocument')
-rw-r--r-- | Master/texmf-dist/tex/latex/minidocument/minidocument.sty | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/minidocument/minidocument.sty b/Master/texmf-dist/tex/latex/minidocument/minidocument.sty new file mode 100644 index 00000000000..5ed833cae0c --- /dev/null +++ b/Master/texmf-dist/tex/latex/minidocument/minidocument.sty @@ -0,0 +1,87 @@ +%% +%% This is file `minidocument.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% minidocument.dtx (with options: `package') +%% +%% Copyright 2017 Maurice Leclaire <leclaire@in.tum.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 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `author-maintained'. +%% +%% This work consists of the files minidocument.dtx and minidocument.ins +%% and the derived file minidocument.sty. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{minidocument}[2017/04/11 v1.0 Mini Documents] +\RequirePackage{graphics} +\newbox\minidocument@box +\newbox\minidocument@aggrbox +\newbox\minidocument@hold +\newtoks\minidocument@orig@output +\def\minidocument@shipout{% + \begingroup\setbox\minidocument@box\hbox\bgroup\kern\p@% + \afterassignment\minidocument@testshipout% + \global\setbox\minidocument@box% +} +\def\minidocument@testshipout{% + \ifdim\lastkern=\z@% + \expandafter\aftergroup% + \fi% + \minidocument@makeshipout% +} +\def\minidocument@makeshipout{% + \egroup\endgroup% + \ifvoid\minidocument@box\else% + \global\setbox\minidocument@box\vbox to \paperheight { + \vskip1in% + \hbox to \paperwidth { + \hskip1in% + \box\minidocument@box% + \hfill + }% + \vfill + }% + \global\setbox\minidocument@aggrbox\hbox{\unhbox\minidocument@aggrbox% + \minidocumentshipout{\box\minidocument@box}% + \hskip0pt% + }% + \fi% +} +\newenvironment{minidocument}{% + \minidocument@orig@output\output% + \output{\global\setbox\minidocument@hold\box\@cclv}% + \penalty-\@Mi% + \output\minidocument@orig@output% + \let\minidocument@orig@shipout\shipout% + \let\shipout\minidocument@shipout% + \edef\minidocument@page{\the\c@page}% + \c@page\@ne% +}{% + \clearpage% + \let\shipout\minidocument@orig@shipout% + \global\c@page\minidocument@page% + \unvbox\minidocument@hold% +} +\def\lastminidocument{% + \unhbox\minidocument@aggrbox\unskip% +} + +\def\minidocumentscale{0.333} +\newcommand{\minidocumentshipout}[1]{% + \scalebox{\minidocumentscale}{\frame{#1}}% +} +\endinput +%% +%% End of file `minidocument.sty'. |