diff options
author | Karl Berry <karl@freefriends.org> | 2010-02-06 23:41:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-02-06 23:41:34 +0000 |
commit | c4de2d646327abffb394d44f2b06b2085dd4bfb0 (patch) | |
tree | 30bba6a0d563570ca8b3974c99e72b54fceb2fdb /Master/texmf-dist/tex/latex/renditions | |
parent | 585255c491e58499ca285c62e610eee9e3a257df (diff) |
new latex package renditions 0.1 (6feb10)
git-svn-id: svn://tug.org/texlive/trunk@16932 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/renditions')
-rw-r--r-- | Master/texmf-dist/tex/latex/renditions/renditions.sty | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/renditions/renditions.sty b/Master/texmf-dist/tex/latex/renditions/renditions.sty new file mode 100644 index 00000000000..43bb79e4a0c --- /dev/null +++ b/Master/texmf-dist/tex/latex/renditions/renditions.sty @@ -0,0 +1,61 @@ +%% +%% This is file `renditions.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% renditions.dtx (with options: `copyright,package') +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Renditions.sty package, 2010-1-29 %% +%% Copyright (C) 1999-2002 D. P. Story %% +%% dpstory@uakron.edu %% +%% %% +%% This program can redistributed and/or modified under %% +%% the terms of the LaTeX Project Public License %% +%% Distributed from CTAN archives in directory %% +%% macros/latex/base/lppl.txt; either version 1 of the %% +%% License, or (at your option) any later version. %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% +%% History: Noel Vaillant began developing a better renditions.sty +%% based on my earlier published renditions.sty. Many thanks +%% to him for starting me off. +%%--------------------------------------------------------- +\NeedsTeXFormat{LaTeX2e}[1997/12/01] +\ProvidesPackage{rendition} + [2010/01/29 v0.1 rendition: Package for creating multiple renditions from the same source (dps)] +\RequirePackage{xkeyval} +\DeclareOptionX{max}{\def\ren@numberOf{#1}} +\def\ren@numberOf{3} +\DeclareOptionX{rendition}{\def\thisrendition{#1}} +\def\thisrendition{1} +\InputIfFileExists{rendition.cfg}{}{} +\ProcessOptionsX +\RequirePackage{comment} +\let\save@message\message\let\message\@gobble +\@tempcnta=0 +\@whilenum\@tempcnta<\ren@numberOf\do{% + \@tempcntb=\@tempcnta\advance\@tempcntb1 + \edef\temp@exp{\noexpand\excludecomment{rendition\the\@tempcntb}}% + \temp@exp + \expandafter\let\csname Afterver\the\@tempcntb Comment\endcsname\relax + \advance\@tempcnta1 +}\let\message\save@message +\AtBeginDocument{\includecomment{rendition\thisrendition}} +\def\rendition#1{\def\thisrendition{#1}% + \ifnum\thisrendition>\ren@numberOf + \@tempcnta=\thisrendition + \@tempcntb=\@tempcnta + \advance\@tempcnta-1 \divide\@tempcnta\ren@numberOf + \multiply\@tempcnta\ren@numberOf + \advance\@tempcntb-\@tempcnta + \edef\thisrendition{\the\@tempcntb}% + \typeout{Modular arithmetic applied: ren=\thisrendition}% + \fi +} +\@onlypreamble{\rendition} +\expandafter\rendition\expandafter{\thisrendition} +\endinput +%% +%% End of file `renditions.sty'. |