| 1 |
%% |
| 2 |
%% Copyright (C) 2014-2019 by Patrick Happel |
| 3 |
%% Copyright (C) 2021 by Phelype Oleinik |
| 4 |
%% |
| 5 |
%% This file may be distributed and/or modified under the |
| 6 |
%% conditions of the LaTeX Project Public License, either |
| 7 |
%% version 1.3 of this license or (at your option) any later |
| 8 |
%% version. The latest version of this license is in: |
| 9 |
%% |
| 10 |
%% http://www.latex-project.org/lppl.txt |
| 11 |
%% |
| 12 |
%% and version 1.3 or later is part of all distributions of |
| 13 |
%% LaTeX version 2005/12/01 or later. |
| 14 |
%% |
| 15 |
\input docstrip.tex |
| 16 |
\askforoverwritefalse |
| 17 |
\keepsilent |
| 18 |
\preamble |
| 19 |
|
| 20 |
This file is part of the package lipsum for use with LaTeX2e. |
| 21 |
|
| 22 |
Function: Access to 150 paragraphs of dummy text. |
| 23 |
|
| 24 |
This program may be distributed and/or modified under the |
| 25 |
conditions of the LaTeX Project Public License, either version 1.3 |
| 26 |
of this license or (at your option) any later version. |
| 27 |
The latest version of this license is in |
| 28 |
http://www.latex-project.org/lppl.txt |
| 29 |
and version 1.3 or later is part of all distributions of LaTeX |
| 30 |
version 2005/12/01 or later. |
| 31 |
|
| 32 |
Please send error reports and suggestions for improvements to |
| 33 |
https://github.com/PhelypeOleinik/lipsum |
| 34 |
|
| 35 |
\endpreamble |
| 36 |
\postamble |
| 37 |
\endpostamble |
| 38 |
|
| 39 |
\generate{\file{lipsum.sty}{\from{lipsum.dtx}{package}}} |
| 40 |
|
| 41 |
\newread\lipsread |
| 42 |
\newread\lipswrite |
| 43 |
\newcount\parno |
| 44 |
\newif\ifinpar |
| 45 |
\def\empty{}% |
| 46 |
\def\line{}% |
| 47 |
\edef\lb{\string{}% |
| 48 |
\edef\rb{\string}}% |
| 49 |
\begingroup\lccode`\?=`\% |
| 50 |
\lowercase{\endgroup\def\pc{?}}% |
| 51 |
\def\wline{\immediate\write\lipswrite}% |
| 52 |
\def\genlipsum#1#2#3{% |
| 53 |
\begingroup |
| 54 |
\def\inFileName{lipsum-#1.txt}% |
| 55 |
\def\outFileName{#2.ltd.tex}% |
| 56 |
\openin\lipsread\inFileName\space |
| 57 |
\immediate\openout\lipswrite\outFileName\space |
| 58 |
\inparfalse |
| 59 |
\parno=0 |
| 60 |
\endlinechar=-1 |
| 61 |
\def\~{ }% |
| 62 |
\def\ReferenceLines{% |
| 63 |
\MetaPrefix ^^J% |
| 64 |
\MetaPrefix\~The original source files were:^^J% |
| 65 |
\MetaPrefix ^^J% |
| 66 |
\MetaPrefix\~\inFileName^^J}% |
| 67 |
\immediate\write\lipswrite{\defaultpreamble}% |
| 68 |
\immediate\write\lipswrite{\string\SetLipsumLanguage{#3}}% |
| 69 |
\genlipsumaux\genlipsumaux |
| 70 |
\closein\lipsread |
| 71 |
\immediate\closeout\lipswrite |
| 72 |
\endgroup} |
| 73 |
\def\genlipsumaux#1\genlipsumaux{% |
| 74 |
\ifeof\lipsread\let\line\empty |
| 75 |
\else \read\lipsread to \line \fi |
| 76 |
\toks0{#1}% |
| 77 |
\ifx\line\empty |
| 78 |
\ifinpar |
| 79 |
\wline{\the\toks0 \rb\pc^^J\pc}% |
| 80 |
\inparfalse |
| 81 |
\fi |
| 82 |
\else |
| 83 |
\ifinpar |
| 84 |
\wline{\the\toks0 }% |
| 85 |
\else |
| 86 |
\inpartrue |
| 87 |
\advance\parno by 1 |
| 88 |
\wline{\string\NewLipsumPar\lb\pc\~{\the\parno}}% |
| 89 |
\fi |
| 90 |
\fi |
| 91 |
\ifeof\lipsread\expandafter\genlipsumend\fi |
| 92 |
\expandafter\genlipsumaux\line\genlipsumaux} |
| 93 |
\def\genlipsumend#1\genlipsumaux#2\genlipsumaux{} |
| 94 |
|
| 95 |
\genlipsum{la}{lipsum}{latin} |
| 96 |
\genlipsum{cs}{lipsum-cs}{czech} |
| 97 |
\genlipsum{cicero}{cicero}{latin} |
| 98 |
|
| 99 |
\catcode`\ =13 \edef {\space}% |
| 100 |
\Msg{****************************************************} |
| 101 |
\Msg{* *} |
| 102 |
\Msg{* To finish the installation you have to move the *} |
| 103 |
\Msg{* following files into a directory searched *} |
| 104 |
\Msg{* by TeX: *} |
| 105 |
\Msg{* *} |
| 106 |
\Msg{* lipsum.sty *} |
| 107 |
\Msg{* lipsum.ltd.tex *} |
| 108 |
\Msg{* lipsum-cs.ltd.tex *} |
| 109 |
\Msg{* cicero.ltd.tex *} |
| 110 |
\Msg{* *} |
| 111 |
\Msg{* To produce the documentation run the file *} |
| 112 |
\Msg{* lipsum.dtx through XeLaTeX or LuaLaTeX. *} |
| 113 |
\Msg{* *} |
| 114 |
\Msg{* Happy TeXing! *} |
| 115 |
\Msg{* *} |
| 116 |
\Msg{****************************************************} |
| 117 |
|
| 118 |
\endbatchfile |