From c93404fa9c281217409b952e5bdd22149edbfb07 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 2 Aug 2014 16:27:23 +0000 Subject: lipsum git-svn-id: svn://tug.org/texlive/trunk@34800 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/lipsum/lipsum.sty | 71 +++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 3 deletions(-) (limited to 'Master/texmf-dist/tex/latex/lipsum') diff --git a/Master/texmf-dist/tex/latex/lipsum/lipsum.sty b/Master/texmf-dist/tex/latex/lipsum/lipsum.sty index 458515e2173..6a3e5991031 100644 --- a/Master/texmf-dist/tex/latex/lipsum/lipsum.sty +++ b/Master/texmf-dist/tex/latex/lipsum/lipsum.sty @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 2011 by Patrick Happel +%% Copyright (C) 2014 by Patrick Happel %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -21,7 +21,7 @@ %% LaTeX version 1999/12/01 or later. %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lipsum}[2011/04/14 v1.2 150 paragraphs of Lorem Ipsum dummy text] +\ProvidesPackage{lipsum}[2014/07/27 v1.3 150 paragraphs of Lorem Ipsum dummy text] %% \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 %% Lower-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 @@ -53,7 +53,7 @@ \newcommand\lips@dolipsum{% \ifnum\value{lips@count}<\lips@max\relax% \addtocounter{lips@count}{1}% - \csname lipsum@\roman{lips@count}\endcsname% + \csname lipsum@\romannumeral\c@lips@count\endcsname% \lips@dolipsum% \fi } @@ -93,6 +93,71 @@ \else\expandafter\lips@stripmax\lips@max\fi% } +\newcommand\lipsumexp{} + +\newcommand\unpacklipsum{% + \@ifstar\@@unpacklipsum\@unpacklipsum +} +\newcommand\@@unpacklipsum[1][\lips@default]{% + \begingroup + \ChangeLipsumPar + \@unpacklipsum[#1]% + \endgroup +} + +\newcommand\@unpacklipsum[1][\lips@default]{% + + \begingroup + \ifx\lips@par\relax\def\lips@par{\relax}\fi + \expandafter\lips@minmax\expandafter{#1}% + \c@lips@count=\lips@min\relax + \advance\c@lips@count\m@ne + \def\@lipsumexp{}% + \loop\ifnum\c@lips@count<\lips@max\relax + \advance\c@lips@count\@ne + \global\edef\@lipsumexp{% + \@lipsumexp\csname lipsum@\romannumeral\c@lips@count\endcsname}% + \repeat + \endgroup + \global\edef\lipsumexp{\@lipsumexp}% +} + +\newcommand\UnpackLipsum{% + \@ifstar\@@UnpackLipsum\@UnpackLipsum +} + +\newcommand\@UnpackLipsum[1][\lips@default]{% + \begingroup + \def\lips@par{ }% + \expandafter\lips@minmax\expandafter{#1}% + \c@lips@count=\lips@min\relax + \advance\c@lips@count\m@ne + \def\@lipsumexp{}% + \loop\ifnum\c@lips@count<\lips@max\relax + \advance\c@lips@count\@ne + \global\edef\@lipsumexp{\@lipsumexp\csname + lipsum@\romannumeral\c@lips@count\endcsname}% + \repeat + \endgroup + \edef\lipsumexp{\@lipsumexp}% +} +\newcommand\@@UnpackLipsum[1][\lips@default]{% + \begingroup + \let\lips@par\relax% + \expandafter\lips@minmax\expandafter{#1}% + \c@lips@count=\lips@min\relax + \advance\c@lips@count\m@ne + \def\lipsumexp{}% + \loop\ifnum\c@lips@count<\lips@max\relax + \advance\c@lips@count\@ne + \global\edef\lipsumexp{\lipsumexp\csname + lipsum@\romannumeral\c@lips@count\endcsname}% + \repeat + \endgroup +} + +\AtEndOfPackage{\unpacklipsum} + \newcommand\lipsum@i{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu -- cgit v1.2.3