| 1 |
% ^^A CTAN:macros/latex/contrib/supported/blindtext |
| 2 |
%\iffalse |
| 3 |
%<*package> |
| 4 |
%\fi |
| 5 |
\def\blindfileversion{V2.0} |
| 6 |
\def\blindfiledate{2012/01/06} |
| 7 |
% ^^A For index and changes, run: |
| 8 |
% ^^A makeindex -s gglo.ist -o blindtext.gls blindtext.glo |
| 9 |
% ^^A makeindex -s gind.ist -o blindtext.ind blindtext.idx |
| 10 |
% |
| 11 |
% \CheckSum{1786} |
| 12 |
%% |
| 13 |
%% \CharacterTable |
| 14 |
%% {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 |
| 15 |
%% 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 |
| 16 |
%% Digits \0\1\2\3\4\5\6\7\8\9 |
| 17 |
%% Exclamation \! Double quote \" Hash (number) \# |
| 18 |
%% Dollar \$ Percent \% Ampersand \& |
| 19 |
%% Acute accent \' Left paren \( Right paren \) |
| 20 |
%% Asterisk \* Plus \+ Comma \, |
| 21 |
%% Minus \- Point \. Solidus \/ |
| 22 |
%% Colon \: Semicolon \; Less than \< |
| 23 |
%% Equals \= Greater than \> Question mark \? |
| 24 |
%% Commercial at \@ Left bracket \[ Backslash \\ |
| 25 |
%% Right bracket \] Circumflex \^ Underscore \_ |
| 26 |
%% Grave accent \` Left brace \{ Vertical bar \| |
| 27 |
%% Right brace \} Tilde \~} |
| 28 |
%% |
| 29 |
% \DoNotIndex{\" , \-, \flqq,\frqq, \ ,\def, \begin, \end} |
| 30 |
% \DoNotIndex{\csname,\endcsname, \expandafter, \global, \newcommand} |
| 31 |
% \DoNotIndex{\advance, \blindfiledate, \blindfileversion, \MessageBreak} |
| 32 |
% \DoNotIndex{\newcount, \newcounter, \newif, \or} |
| 33 |
% \DoNotIndex{\if, \else, \fi, \ifcase, \ifdefined, \ifnum, \ifx, \loop, \repeat} |
| 34 |
% \DoNotIndex{\heartsuit} |
| 35 |
% \DoNotIndex{\NeedsTeXFormat, \providecommand, \ProvidesPackage, \relax, \RequirePackage} |
| 36 |
% \DoNotIndex{\par, \chapter, \section, \subsection, \subsubsection, \paragraph, } |
| 37 |
% \DoNotIndex{\selectlanguage, \stepcounter, \ss, \space, \setcounter} |
| 38 |
% \DoNotIndex{\value, \typeout, \long, \renewcommand} |
| 39 |
% |
| 40 |
% \iffalse |
| 41 |
%</package> |
| 42 |
%<*driver> |
| 43 |
\documentclass{ltxdoc} |
| 44 |
\usepackage[ngerman,english]{babel} |
| 45 |
\usepackage{blindtext} |
| 46 |
\usepackage{makeidx} |
| 47 |
\usepackage{varioref} |
| 48 |
\IfFileExists{hyperref.sty}{\usepackage{hyperref}}{} |
| 49 |
\CodelineIndex |
| 50 |
\makeindex |
| 51 |
%\OnlyDescription |
| 52 |
\begin{document} |
| 53 |
\RecordChanges |
| 54 |
\DocInput{blindtext.dtx} |
| 55 |
\end{document} |
| 56 |
%</driver> |
| 57 |
% |
| 58 |
%<*package> |
| 59 |
% \fi |
| 60 |
% |
| 61 |
% \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package |
| 62 |
% \newcommand*{\Lenv}[1]{\texttt {#1}} ^^A typeset a package |
| 63 |
% |
| 64 |
% \title{Blindtext.sty:\\ |
| 65 |
% Creating Dummy Text\\ |
| 66 |
% \em Blindtext erzeugen} |
| 67 |
% |
| 68 |
% \date{\today, \blindfileversion} |
| 69 |
% \author{Knut Lickert\thanks{ |
| 70 |
% \url{http://tex.lickert.net/packages/blindtext/}} |
| 71 |
% } |
| 72 |
% \maketitle |
| 73 |
% |
| 74 |
%\begin{abstract} |
| 75 |
%\selectlanguage{english} |
| 76 |
%With this package you can create dummy text. |
| 77 |
%Use \cmd{\blindtext} to get some text and |
| 78 |
%\cmd{\Blindtext} to get a long text. |
| 79 |
%With \cmd{\blinddocument} (or \cmd{\Blinddocument}) |
| 80 |
%you get complete dummy documents. |
| 81 |
% |
| 82 |
%Details can be found at \url{http://tex.lickert.net/packages/blindtext/index_en.html}. |
| 83 |
%This File describes version \blindfileversion. |
| 84 |
% |
| 85 |
%\selectlanguage{ngerman} |
| 86 |
%\em |
| 87 |
%Mit diesem Paket kann man lange Texte erzeugen, ohne lange |
| 88 |
%Texte einzugeben. |
| 89 |
%Sinn ist die Erzeugung langer Beispieltexte, ohne den |
| 90 |
%Quelltext lang zu machen. |
| 91 |
% |
| 92 |
%Details unter \url{http://tex.lickert.net/packages/blindtext/}. |
| 93 |
%Dieses Dokument beschreibt Version \blindfileversion. |
| 94 |
%\end{abstract} |
| 95 |
% |
| 96 |
% \tableofcontents |
| 97 |
% |
| 98 |
%\selectlanguage{english} |
| 99 |
%\section{Overview/{\"U}bersicht} |
| 100 |
% |
| 101 |
%\begin{table} |
| 102 |
%\renewcommand{\arraystretch}{1.1} |
| 103 |
%\begin{tabular}{p{0.3\textwidth}*{2}{p{0.3\textwidth}}}\hline |
| 104 |
%Command/Makro & Englisch & German \\\hline |
| 105 |
%\cmd{\blinddocument} & create a document & erzeugt ein Dokument\\ |
| 106 |
%\cmd{\Blinddocument} & create a big document & erzeugt ein gro{\ss}es Dokument\\ |
| 107 |
%\cmd{\blindtext} & create text & erzeugt Text\\ |
| 108 |
%\cmd{\Blindtext} & create more text & erzeugt mehr Text\\ |
| 109 |
%\verb|\blindlist{env}| & create a list & erzeugt eine Liste\\ |
| 110 |
%\verb|\blindlistoptional|\newline\hspace*{2em}\verb|{env}| & create a list with \verb|\item[]| & erzeugt eine Liste mit \verb|\item[]|\\ |
| 111 |
%\verb|\blindlistlist|\newline\hspace*{2em}\verb|[level]{env}| & create cascaded lists & erzeugt geschachtelte Listen\\ |
| 112 |
%\verb|\Blindlist{env}| & create a big list & erzeugt eine gro{\ss}e Liste\\ |
| 113 |
%\verb|\Blindlistoptional|\newline\hspace*{2em}\verb|{env}| & create a big list with \verb|\item[]| & erzeugt eine gro{\ss}e Liste mit \verb|\item[]|\\ |
| 114 |
%\verb|\blinditemize| & create an itemize list & erzeugt eine itemize-Liste\\ |
| 115 |
%\verb|\blindenumerate| & create an enumerate list & erzeugt eine enume\-ra\-te-Liste\\ |
| 116 |
%\verb|\blinddescription| & create a description list & erzeugt eine des\-crip\-tion-Liste\\\hline |
| 117 |
%$\sim$[x] & Repetition & Wiederholungsfaktor\\ |
| 118 |
%\end{tabular} |
| 119 |
%\caption{Command Overview/Kommando\"ubersicht} |
| 120 |
%\end{table} |
| 121 |
% |
| 122 |
% \subsection{Create Documents} |
| 123 |
% \DescribeMacro{\blinddocument} |
| 124 |
% \cmd{\blinddocument} create a document with sections, |
| 125 |
% subsections\ldots and lists (\Lenv{itemize}, |
| 126 |
% \Lenv{enumerate} and \Lenv{description}). |
| 127 |
% |
| 128 |
% \DescribeMacro{\Blinddocument} |
| 129 |
% \cmd{\Blinddocument} create a |
| 130 |
% document with bigger sections, subsections\ldots and longer |
| 131 |
% lists.\par |
| 132 |
% |
| 133 |
% The smallest document to check the look of a class would be: |
| 134 |
% \begin{quote} |
| 135 |
% \begin{verbatim} |
| 136 |
% \documentclass{<class>} |
| 137 |
% \usepackage{blindtext} |
| 138 |
% \begin{document} |
| 139 |
% \blinddocument |
| 140 |
% \end{document} |
| 141 |
% \end{verbatim} |
| 142 |
% \end{quote} |
| 143 |
% |
| 144 |
% If you want to have a table of contents you have two ways: |
| 145 |
% \begin{enumerate} |
| 146 |
% \item use the package option ``toc'' |
| 147 |
% \item Just add the |\tableofcontents|-command in your testdocument. |
| 148 |
% \end{enumerate} |
| 149 |
% |
| 150 |
% \subsection{Package options} |
| 151 |
% \subsubsection{Math Option} |
| 152 |
% The \emph{math}-option activates math formula for |\blindtext|. |
| 153 |
% |
| 154 |
% More see in section~\vref{sec:math} and \vref{sec:optionmath}. |
| 155 |
% |
| 156 |
% \subsubsection{Toc Option} |
| 157 |
% Activate the table of contents for |\blinddoccument|. |
| 158 |
% |
| 159 |
% \subsubsection{Random Option} |
| 160 |
% \label{sec:optionrandom} |
| 161 |
% \changes{V2.0}{2011-12-28}{Add option random} |
| 162 |
% The \emph{random}-option changes the default blind text to |
| 163 |
% a sequence of predefined sentences. |
| 164 |
% The next paragraph starts with the next phrase from the previous paragraph. |
| 165 |
% |
| 166 |
% You may redefine the number of phrases per paragraph, |
| 167 |
% details see table~\vref{tab:repetion}. |
| 168 |
% |
| 169 |
% \begin{table} |
| 170 |
% \begin{minipage}{\textwidth} |
| 171 |
% \begin{tabular}{llll} |
| 172 |
% Command & Parameter(s) & Remark & Section\\\hline |
| 173 |
% \cmd{\blindtext} & \oarg{n} & n repetition\textsuperscript{*} &\ref{sec:blindtext}\\ |
| 174 |
% \cmd{\Blindtext} & \oarg{x}\oarg{n} & x paragraphs with n repetitions&\ref{sec:blindtext}\\[1ex] |
| 175 |
% \multicolumn{3}{l}{\textbf{Global Redefinitions of Default} -- \cmd{\setcounter}\marg{Counter}\marg{n}}\\ |
| 176 |
% Counter & Parameter & Remark & Section\\\hline |
| 177 |
% blindtext & \marg{n} & n repetitions per paragraph\\ |
| 178 |
% Blindtext & \marg{n} & n paragraph for \cmd{\Blindtext}\\ |
| 179 |
% blindlist & \marg{n} & n items in list&\ref{sec:blindlists}\\ |
| 180 |
% blindlistlevel & \marg{n} & depth of nested lists (max. 4)&\ref{sec:def:blindlists}\\ |
| 181 |
% \end{tabular} |
| 182 |
% \footnotetext{* The default for \cmd{\blindtext} values depends on selected option |
| 183 |
% (\emph{random}: 17~sentences, \emph{pangram}:~5 pangrams, default:~1 text).} |
| 184 |
% \end{minipage} |
| 185 |
% \caption{Modifiying Repetion Factors} |
| 186 |
% \label{tab:repetion} |
| 187 |
% \end{table} |
| 188 |
% |
| 189 |
% If the language does not support this option, the default text is used. |
| 190 |
% |
| 191 |
% \subsubsection{Pangram Option} |
| 192 |
% \label{sec:optionpangram} |
| 193 |
% \changes{V2.0}{2012-01-02}{Add option pangram} |
| 194 |
% The \emph{pangram}-option changes the default blind text to |
| 195 |
% a sequence of pangrams. |
| 196 |
% A pangram, or holoalphabetic sentence, is a sentence using |
| 197 |
% every letter of the alphabet at least once.\footnote{\url{http://en.wikipedia.org/wiki/Pangram}} |
| 198 |
% |
| 199 |
% You may redefine the number of phrases per paragraph, |
| 200 |
% details see table~\vref{tab:repetion}. |
| 201 |
% |
| 202 |
% If the language does not support this option, the default text is used. |
| 203 |
% |
| 204 |
% \subsubsection{Bible Option} |
| 205 |
% \label{sec:optionbible} |
| 206 |
% \changes{V2.0}{2011-12-27}{Add option bible} |
| 207 |
% The \emph{bible}-option changes the default blind text to |
| 208 |
% texts from bible verse 3.14 (Genesis, Exodus, Leviticus, Numeri and Deuteronomium) |
| 209 |
% |
| 210 |
% \subsection{Get Some Text} |
| 211 |
% \label{sec:blindtext} |
| 212 |
% \DescribeMacro{\blindtext} |
| 213 |
% \cmd{\blindtext}\oarg{x} create a text. The optional parameter define a |
| 214 |
% repetition. Default for the repetition is one and can be modified |
| 215 |
% with \cmd{\setcounter}\marg{blindtext} \marg{1}. |
| 216 |
% See also table~\vref{tab:repetion}. |
| 217 |
% |
| 218 |
% \DescribeMacro{\Blindtext} |
| 219 |
% \cmd{\Blindtext}\oarg{x}\oarg{y} create $x$ paragraphs with the text of |
| 220 |
% \cmd{\blindtext}. The first optional parameter defines a |
| 221 |
% repetition of the paragraphs. Default for the repetition is five |
| 222 |
% and can be modified with \cmd{\setcounter}\marg{Blindtext}\marg{5}. The |
| 223 |
% second optional parameter is given to \cmd{\blindtext}. |
| 224 |
% See also table~\vref{tab:repetion}. |
| 225 |
% |
| 226 |
% \DescribeMacro{\parstart} |
| 227 |
% \DescribeMacro{\parend} |
| 228 |
% It is possible to add a start and end sequence for each paragraph. |
| 229 |
% |
| 230 |
% The two macros \cmd{\parstart} and \cmd{\parend} define a |
| 231 |
% starting and ending sequence for each paragraph in |
| 232 |
% \cmd{\Blindtext}. |
| 233 |
% |
| 234 |
% \changes{V2.0}{2011-12-09}{Default paragraph start} |
| 235 |
% The paragraph start is redefined for each language change: |
| 236 |
% First paragraphs get an empty start, the following paragraphs get |
| 237 |
% different starting texts. |
| 238 |
% Advantage: Each paragraph in a paragraph sequence looks different. |
| 239 |
% This feature must be supported by the language\footnote{ |
| 240 |
% see redefinitions of \cmd{\blindtext@parstart}} |
| 241 |
% |
| 242 |
% \subsection{Get Some Lists} |
| 243 |
% \label{sec:blindlists} |
| 244 |
% \DescribeMacro{\blindlist} |
| 245 |
% \cmd{\blindlist}\marg{env}\oarg{x} create a list, the type is defined by the |
| 246 |
% obligatory parameter. The optional parameter defines a repetition. |
| 247 |
% Default for the repetition is five and can be modified with |
| 248 |
% \cmd{\setcounter}\marg{blindlist}\marg{x}. |
| 249 |
% |
| 250 |
% \DescribeMacro{\blindlistlist} |
| 251 |
% \cmd{\blindlistlist}\oarg{level}\marg{env}\oarg{x} creates cascaded lists up to |
| 252 |
% level \verb|level|, the type is defined by the second obligatory |
| 253 |
% parameter. The optional parameter defines a repetition. Default is the |
| 254 |
% same like in \cmd{\blindlist}. |
| 255 |
% |
| 256 |
% \DescribeMacro{\Blindlist} |
| 257 |
% \cmd{\Blindlist}\marg{env}\oarg{x} create a list with long texts. |
| 258 |
% The optional parameter defines a |
| 259 |
% repetition. Default for the repetition is five and can be modified |
| 260 |
% with \cmd{\setcounter}\marg{blindlist}\marg{x}. |
| 261 |
% |
| 262 |
% \DescribeMacro{\blindlistoptional} |
| 263 |
% \cmd{\blindlistoptional}\marg{env}\oarg{x} create a list with \cmd{\item}\oarg{}. The |
| 264 |
% list is defined by the obligatory parameter. The optional |
| 265 |
% parameter defines a repetition. Default for the repetition is five |
| 266 |
% and can be modified with \cmd{\setcounter}\marg{blindlist} \marg{x}. |
| 267 |
% |
| 268 |
% \DescribeMacro{\Blindlistoptional} |
| 269 |
% \cmd{\Blindlistoptional} create a list like |
| 270 |
% \cmd{\blindlistoptional} with long texts. |
| 271 |
% |
| 272 |
% \DescribeMacro{\blinditemize} |
| 273 |
% \DescribeMacro{\blindenumerate} |
| 274 |
% \DescribeMacro{\blinddescription} |
| 275 |
% The commands \cmd{\blinditemize}, \cmd{\blindenumerate} and \cmd{\blinddescription} |
| 276 |
% are abbreviations for \cmd{\blindlist}\marg{itemize}, \cmd{\blindlist}\marg{enumerate} |
| 277 |
% and \cmd{\blindlist}\marg{description}. |
| 278 |
% |
| 279 |
% \DescribeMacro{\Blinditemize} |
| 280 |
% \DescribeMacro{\Blindenumerate} |
| 281 |
% \DescribeMacro{\Blinddescription} |
| 282 |
% The commands \cmd{\Blinditemize}, \cmd{\Blindenumerate} and \cmd{\Blinddescription} |
| 283 |
% are abbreviations for \cmd{\Blindlist}\marg{itemize}, \cmd{\Blindlist}\marg{enumerate} |
| 284 |
% and \cmd{\Blindlist}\marg{description}. |
| 285 |
% |
| 286 |
% |
| 287 |
% \subsection{Get Some Math in the Text} |
| 288 |
% \label{sec:math} |
| 289 |
% \marginpar{\hfill Option math} |
| 290 |
% If you need a dummy text with math formula, you can add |
| 291 |
% some math with the package option ``math''. |
| 292 |
% |
| 293 |
%\DescribeMacro{\blindmathpaper} |
| 294 |
% |\blindmathpaper| built some text with formulas in between. |
| 295 |
% This macro is used in |\blinddocument| if |\blindmathtrue| is set. |
| 296 |
% |
| 297 |
% If you need dummy text with and without math, you can (de)activate |
| 298 |
% the math option with the following commands: |
| 299 |
% |
| 300 |
%\DescribeMacro{\blindmathtrue} |
| 301 |
% With |\blindmathtrue| you set a flag, so the following blind text contains |
| 302 |
% inline math. |
| 303 |
% |
| 304 |
%\DescribeMacro{\blindmathfalse} |
| 305 |
% With |\blindmathfalse| you reset the flag for inline math |
| 306 |
% inside the blind text. |
| 307 |
% |
| 308 |
% \subsection{Get Additional Markup in the Text} |
| 309 |
% \DescribeMacro{\blindmarkup} |
| 310 |
% If you want to test some markup in your dummy text you can redefine |
| 311 |
% |\blindmarkup|. |
| 312 |
% |
| 313 |
% |\blindmarkup| is a macro with one parameter and it set some |
| 314 |
% parts in your markup. |
| 315 |
% |
| 316 |
% Example: |
| 317 |
% \begin{verbatim} |
| 318 |
% \renewcommand{\blindmarkup}[1]{\emph{#1}} |
| 319 |
% \end{verbatim} |
| 320 |
% |
| 321 |
% \section{FAQ/More features} |
| 322 |
% |
| 323 |
% \subsection{Add Tabulars and Tables} |
| 324 |
% Is it possible to add tabulars to blindtext? |
| 325 |
% |
| 326 |
% There are no plans to integrate tabulars in blindtext. |
| 327 |
% Tabulars in text are no good idea, they should be integrated |
| 328 |
% to tables-environment (tabular, may be a short description, caption). |
| 329 |
% |
| 330 |
% Tabulars need there own layout, I don't think you may define |
| 331 |
% a table for each use in blindtext. |
| 332 |
% |
| 333 |
% You may define your own tabular/table and surround it with |
| 334 |
% |\blindtext|. |
| 335 |
% |
| 336 |
% Example: |
| 337 |
% \begin{verbatim} |
| 338 |
% \Blindtext |
| 339 |
% % Your tabular |
| 340 |
% \Blindtext |
| 341 |
% \end{verbatim} |
| 342 |
% |
| 343 |
% \subsection{Add Pictures and Figures } |
| 344 |
% Is it possible to add pictures to blindtext? |
| 345 |
% |
| 346 |
% There are no plans to integrate pictures in blindtext. |
| 347 |
% |
| 348 |
% I don't think you may define |
| 349 |
% a picture for each use in blindtext. |
| 350 |
% |
| 351 |
% |
| 352 |
% \subsection{Key-Value-Options} |
| 353 |
% |
| 354 |
% You may change some defaults by redefining commands\footnote{macro \cmd{\blindmarkup}} |
| 355 |
% or numbers\footnote{|blindtext|, |Blindtext|, |blindlist| and |blindlistlevel|}. |
| 356 |
% Would it be possible to define them as key-value options? |
| 357 |
% |
| 358 |
% In theory yes, but I don't want to add an additional dependency to other packages. |
| 359 |
% |
| 360 |
% |
| 361 |
% \subsection{More Languages} |
| 362 |
% The language xx is not supported - can you add it? |
| 363 |
% |
| 364 |
% If you want to have blindtext in another language, please provide me some texts. |
| 365 |
% |
| 366 |
% I need: |
| 367 |
% \begin{itemize} |
| 368 |
% \item The language name (used in babel) |
| 369 |
% \item Some text for the paragraphs |
| 370 |
% \item Some (at least three) sentences for paragraph start. |
| 371 |
% \item The numbers as used in ``first, second\ldots'' |
| 372 |
% \item Some sentences to be used with option \emph{random}. |
| 373 |
% You may tell a little story and the last sentence can be continued with |
| 374 |
% the first sentence. |
| 375 |
% \item Some pangrams (See \url{http://en.wikipedia.org/wiki/List_of_pangrams}. |
| 376 |
% \item The following texts: |
| 377 |
% \begin{itemize} |
| 378 |
% \item item: ``item in a list'' |
| 379 |
% \item heading: ``Heading on level'' |
| 380 |
% \item lists: ``Lists'' |
| 381 |
% \item listsEx: ``Example for list'' |
| 382 |
% \item blindmath: ``Some blind text with math formulas'' |
| 383 |
% \end{itemize} |
| 384 |
% \end{itemize} |
| 385 |
|
| 386 |
% \appendix |
| 387 |
% \StopEventually |
| 388 |
% |
| 389 |
% \selectlanguage{english} |
| 390 |
% \section{Implementation} |
| 391 |
% \changes{V1.8}{2009-01-27}{Adding a lot percent to avoid spaces.} |
| 392 |
% |
| 393 |
% |
| 394 |
% \begin{macrocode} |
| 395 |
\NeedsTeXFormat{LaTeX2e} |
| 396 |
\ProvidesPackage{blindtext}[\blindfiledate\space\blindfileversion\space% |
| 397 |
blindtext-Package] |
| 398 |
\RequirePackage{xspace} |
| 399 |
% \end{macrocode} |
| 400 |
% \begin{macro}{\grqq} |
| 401 |
% \begin{macro}{\glqq} |
| 402 |
% Just in case the German quote are not defined |
| 403 |
% \begin{macrocode} |
| 404 |
\providecommand{\grqq}{} |
| 405 |
\providecommand{\glqq}{} |
| 406 |
% \end{macrocode} |
| 407 |
% \end{macro} |
| 408 |
% \end{macro} |
| 409 |
% |
| 410 |
% \begin{macro}{\blind@checklanguage} |
| 411 |
% \changes{V1.6}{2006-08-02}{Check for defined language} |
| 412 |
% \changes{V2.0}{2011-12-31}{Text default lorem lipsum} |
| 413 |
% It is possible, that you use blindtext.sty with |
| 414 |
% undefined languages. |
| 415 |
% This macro checks if blindtext supports the language. |
| 416 |
% If it is not available, an error is reported and |
| 417 |
% the default lorem lipsum used. |
| 418 |
% |
| 419 |
% If you don't load babel, the message may be confusing: |
| 420 |
% I get the warning ``welsh not defined''.\footnote{ |
| 421 |
% \LaTeX\ loads babel on it's own to load hyphenations, |
| 422 |
% Welsch is the last language in alphabet. |
| 423 |
% } |
| 424 |
% \begin{macrocode} |
| 425 |
\newcommand{\blind@checklanguage}{% |
| 426 |
\@ifundefined{blindtext@\languagename}{% |
| 427 |
\PackageWarning{blindtext}{\languagename\space not |
| 428 |
defined, using English instead.\MessageBreak |
| 429 |
}% |
| 430 |
}{}% |
| 431 |
} |
| 432 |
% \end{macrocode} |
| 433 |
% \end{macro} |
| 434 |
% |
| 435 |
% |
| 436 |
% \subsection{Counter and Supporting Macros} |
| 437 |
% First we need some counters for the number of repetitions of the |
| 438 |
% text and the paragraphs. |
| 439 |
% \begin{macrocode} |
| 440 |
\newcounter{blindtext}\setcounter{blindtext}{1} |
| 441 |
\newcounter{Blindtext}\setcounter{Blindtext}{5} |
| 442 |
% \end{macrocode} |
| 443 |
% |
| 444 |
% Define a counter for paragraph start sequence. |
| 445 |
% \begin{macrocode} |
| 446 |
\newcounter{blind@countparstart} |
| 447 |
% \end{macrocode} |
| 448 |
% |
| 449 |
% \begin{macro}{\blindtext} |
| 450 |
% |
| 451 |
% \verb|\blindtext[x]| writes a sentence x times. |
| 452 |
% The default is stored in the counter \verb|blindtext|. This value |
| 453 |
% can be changed with \verb|\setcounter{blindtext}{1}|. |
| 454 |
% |
| 455 |
% \changes{V1.6}{2006-08-02}{Check for defined language} |
| 456 |
% \begin{macrocode} |
| 457 |
\newcount\blind@countxx |
| 458 |
\newcommand{\blindtext}[1][\value{blindtext}]{% |
| 459 |
\blind@checklanguage |
| 460 |
\setcounter{blind@randommax}{#1}%for option random |
| 461 |
\setcounter{blind@pangrammax}{#1}%for option pangram |
| 462 |
\blind@countxx=1 % |
| 463 |
\loop |
| 464 |
\blindtext@text\ |
| 465 |
\ifnum\blind@countxx<#1\advance\blind@countxx by 1 % |
| 466 |
\repeat |
| 467 |
} |
| 468 |
% \end{macrocode} |
| 469 |
% \end{macro} |
| 470 |
% |
| 471 |
% \subsection{Creating Text} |
| 472 |
% \begin{macro}{\Blindtext} |
| 473 |
% \verb|\Blindtext[x][y]| execute $x\times$\verb|\blindtext[y]|. Each |
| 474 |
% \verb|\blindtext[y]| built a paragraph. |
| 475 |
% The default is stored in the counter \verb|Blindtext|. This value |
| 476 |
% can be changed with \verb|\setcounter{Blindtext}{5}|. |
| 477 |
% The counter \verb|blindtext@numBlindtext| stores the first |
| 478 |
% optional parameter to be used in \verb|\blindtext@Blindtext|. |
| 479 |
% \changes{V1.6}{2006-08-02}{Check for defined language} |
| 480 |
% \begin{macrocode} |
| 481 |
\newcount\blindtext@numBlindtext |
| 482 |
\newcommand{\Blindtext}[1][\value{Blindtext}]{% |
| 483 |
\blind@checklanguage |
| 484 |
\blindtext@numBlindtext=#1\relax |
| 485 |
\blind@Blindtext |
| 486 |
} |
| 487 |
% \end{macrocode} |
| 488 |
% \end{macro} %^^A Blindtext |
| 489 |
% |
| 490 |
% \begin{macro}{\blind@Blindtext} |
| 491 |
% This macro continue \cmd{\Blindtext} with a second optional parameter. |
| 492 |
% |
| 493 |
% Each paragraph starts and end with a text, which can be defined with |
| 494 |
% \verb|\starttext| or \verb|\endtext|. |
| 495 |
% \begin{macrocode} |
| 496 |
\newcount\blind@countyy |
| 497 |
\newcommand{\blind@Blindtext}[1][\value{blindtext}]{% |
| 498 |
\blind@countyy=1 % |
| 499 |
\loop |
| 500 |
{\blindtext@parstart\blindtext[{#1}]\blindtext@parend\par}% |
| 501 |
\ifnum\blind@countyy<\blindtext@numBlindtext\advance\blind@countyy by 1 % |
| 502 |
\repeat |
| 503 |
} |
| 504 |
% \end{macrocode} |
| 505 |
% \end{macro}%^^A {\blind@Blindtext} |
| 506 |
% |
| 507 |
% \begin{macro}{\parstart} |
| 508 |
% \begin{macro}{\parend} |
| 509 |
% \begin{macrocode} |
| 510 |
\newcommand{\blindtext@parstart}{} % Text at start of paragraph |
| 511 |
\newcommand{\blindtext@parend}{} % Text at end of paragraph |
| 512 |
\newcommand{\parstart}[1]{\renewcommand{\blindtext@parstart}{#1}} |
| 513 |
\newcommand{\parend}[1]{\renewcommand{\blindtext@parend}{#1}} |
| 514 |
% \end{macrocode} |
| 515 |
% \end{macro}%^^A{\parstart} |
| 516 |
% \end{macro}%^^A{\parend} |
| 517 |
% |
| 518 |
% \subsection{Lists} |
| 519 |
% \label{sec:def:blindlists} |
| 520 |
% Here I define some flags to decide in the lists if we have to |
| 521 |
% create big items and if we need the optional parameter at |
| 522 |
% \verb|\item|. These flags are reset in \verb|\blind@list|.\par |
| 523 |
% The counter \verb|blindlist| define the default number of items in a list. |
| 524 |
% The counter \verb|blindlistitem| is needed by \verb|\blindtext@count| |
| 525 |
% to write a text like 'first', 'second'\ldots. |
| 526 |
% \begin{macrocode} |
| 527 |
\newif\ifblind@long\blind@longfalse |
| 528 |
\newif\ifblind@optional\blind@optionalfalse |
| 529 |
\newcounter{blindlist} |
| 530 |
\newcounter{blindlistlevel}% Up tu X level |
| 531 |
\newcounter{blindlist@level}% internal counter |
| 532 |
\newcount\blind@listitem |
| 533 |
% \end{macrocode} |
| 534 |
% |
| 535 |
% \begin{macro}{\blindlist} |
| 536 |
% \begin{macro}{\blind@listtype} |
| 537 |
% \verb|\blindlist{env}[x]| writes an env-list with $x$ items. |
| 538 |
% The default is stored in the counter \verb|blindlist|. This value |
| 539 |
% can be changed with \verb|\setcounter{blindlist}{1}|. |
| 540 |
% The type of list is stored in \verb|\blind@listtype|. |
| 541 |
% \changes{V1.6}{2006-08-02}{Check for defined language} |
| 542 |
% \begin{macrocode} |
| 543 |
%% ^^A----------------------------------------------------------- |
| 544 |
\newcommand{\blindlist}[1]{% |
| 545 |
\blind@checklanguage |
| 546 |
\def\blind@listtype{#1}% |
| 547 |
\setcounter{blind@levelcount}{1}% |
| 548 |
\blind@list |
| 549 |
} |
| 550 |
% \end{macrocode} |
| 551 |
% \end{macro}%^^A{\blindlist} |
| 552 |
% \end{macro}%^^A{\blind@listtype} |
| 553 |
% |
| 554 |
% \begin{macro}{\blind@list} |
| 555 |
% This macro continue the macro \verb|\blindlist| and with the |
| 556 |
% optional parameter. After the printout, we reset the flags and the |
| 557 |
% counter for the list text. |
| 558 |
% \begin{macrocode} |
| 559 |
\newcommand{\blind@list}[1][5]{% |
| 560 |
\setcounter{blindlist}{#1}% |
| 561 |
\stepcounter{blindlist@level}% depth of list |
| 562 |
\blind@listitem=1 % |
| 563 |
\begin{\blind@listtype}% |
| 564 |
\blind@items |
| 565 |
\end{\blind@listtype}% |
| 566 |
\blind@longfalse |
| 567 |
\blind@optionalfalse |
| 568 |
} |
| 569 |
% \end{macrocode} |
| 570 |
% \end{macro}%^^A {\blind@list} |
| 571 |
% |
| 572 |
% \begin{macro}{\blindlistlist} |
| 573 |
% \verb|\blindlistlist[num]{env}[x]| writes cascaded lists up to level num. |
| 574 |
% \begin{macrocode} |
| 575 |
\newcommand{\blindlistlist}[2][4]{% |
| 576 |
\setcounter{blindlistlevel}{#1}% |
| 577 |
\setcounter{blindlist@level}{0}% deepest reached level |
| 578 |
\setcounter{blind@levelcount}{1}% actual level for printout |
| 579 |
\def\blind@listtype{#2}% |
| 580 |
\blind@list |
| 581 |
} |
| 582 |
% \end{macrocode} |
| 583 |
% \end{macro}%^^A {\blindlistlist} |
| 584 |
% \begin{macro}{\blindlistlistoptional} |
| 585 |
% Like \verb|\blindlistlist[num]{env}[x]| but for environment with optional parameters. |
| 586 |
% \begin{macrocode} |
| 587 |
\newcommand{\blindlistlistoptional}{% |
| 588 |
\blind@optionaltrue |
| 589 |
\blindlistlist |
| 590 |
} |
| 591 |
% \end{macrocode} |
| 592 |
% \end{macro}%^^A{\blindlistlistoptional} |
| 593 |
% |
| 594 |
% \begin{macro}{\blinditemize} |
| 595 |
% \begin{macro}{\blindenumerate} |
| 596 |
% Some default macros for the standard environments. |
| 597 |
% \begin{macrocode} |
| 598 |
\newcommand{\blinditemize}{\blindlist{itemize}} |
| 599 |
\newcommand{\blindenumerate}{\blindlist{enumerate}} |
| 600 |
% \end{macrocode} |
| 601 |
% \end{macro}%^^A{\blinditemize} |
| 602 |
% \end{macro}%^^A{\blindenumerate} |
| 603 |
% |
| 604 |
% \verb|\Blindlist[x]| write a list with $x$ items. |
| 605 |
% The default is stored in the counter \verb|blindlist|. This value |
| 606 |
% can be changed with \verb|\setcounter{blindlist}{1}|. |
| 607 |
% |
| 608 |
% |
| 609 |
% \begin{macro}{\Blindlist} |
| 610 |
% \begin{macrocode} |
| 611 |
\newcommand{\Blindlist}[1]{% |
| 612 |
\blind@longtrue |
| 613 |
\blindlist{#1}% |
| 614 |
} |
| 615 |
% \end{macrocode} |
| 616 |
% \end{macro}%^^A{\Blindlist} |
| 617 |
% |
| 618 |
% \begin{macro}{\Blinditemize} |
| 619 |
% \begin{macro}{\Blindenumerate} |
| 620 |
% Some default macros for the standard environments. |
| 621 |
% \begin{macrocode} |
| 622 |
\newcommand{\Blinditemize}{\Blindlist{itemize}} |
| 623 |
\newcommand{\Blindenumerate}{\Blindlist{enumerate}} |
| 624 |
% \end{macrocode} |
| 625 |
% \end{macro}%^^A{\Blinditemize} |
| 626 |
% \end{macro}%^^A{\Blindenumerate} |
| 627 |
% |
| 628 |
% \begin{macro}{\blindlistoptional} |
| 629 |
% Here we start a list with \verb|\item[]|. So we set the flag for optional |
| 630 |
% parameter and start the normal list. |
| 631 |
% \begin{macrocode} |
| 632 |
\newcommand{\blindlistoptional}[1]{% |
| 633 |
\blind@optionaltrue |
| 634 |
\blindlist{#1}% |
| 635 |
} |
| 636 |
% \end{macrocode} |
| 637 |
% \end{macro}%^^A{\blindlistoptional} |
| 638 |
% |
| 639 |
% \begin{macro}{\Blindlistoptional} |
| 640 |
% Now a big list with optional parameter at \verb|\item|. |
| 641 |
% \begin{macrocode} |
| 642 |
\newcommand{\Blindlistoptional}[1]{% |
| 643 |
\blind@optionaltrue |
| 644 |
\blind@longtrue |
| 645 |
\blindlist{#1}% |
| 646 |
} |
| 647 |
% \end{macrocode} |
| 648 |
% \end{macro}%^^A{\blindlistoptional} |
| 649 |
% |
| 650 |
% \begin{macro}{\blinddescription} |
| 651 |
% \begin{macro}{\Blinddescription} |
| 652 |
% Some default macros for the standard environment description. |
| 653 |
%\changes{1.7}{2006-12-01}{Replace counter listcount} |
| 654 |
% \begin{macrocode} |
| 655 |
\newcommand{\blinddescription}{\blindlistoptional{description}} |
| 656 |
\newcommand{\Blinddescription}{\Blindlistoptional{description}} |
| 657 |
\newcounter{blind@listcount} |
| 658 |
\newcounter{blind@levelcount} |
| 659 |
% \end{macrocode} |
| 660 |
% \end{macro}%^^A{\blinddescription} |
| 661 |
% \end{macro}%^^A{\Blinddescription} |
| 662 |
% |
| 663 |
% \begin{macro}{\blind@items} |
| 664 |
% Here the \verb|\item| are written. |
| 665 |
% A local counter is defined and the \verb|\item| is written. The |
| 666 |
% type of \verb|\item| is influenced by the flags. |
| 667 |
% \begin{macrocode} |
| 668 |
\newcommand{\blind@items}{% |
| 669 |
\setcounter{blind@listcount}{1}% |
| 670 |
\loop |
| 671 |
\ifblind@optional |
| 672 |
\ifblind@long |
| 673 |
\item[\blindtext@countitem] \blindtext@text |
| 674 |
\else |
| 675 |
\item[\blindtext@count] \blindtext@item |
| 676 |
\fi |
| 677 |
\else % \blind@optionalfalse |
| 678 |
\ifblind@long |
| 679 |
\item \blindtext@text |
| 680 |
\else |
| 681 |
\item \blindtext@countitem |
| 682 |
\fi |
| 683 |
\fi % \ifblind@optional |
| 684 |
% \end{macrocode} |
| 685 |
% Loop for cascaded lists. |
| 686 |
% \changes{V1.3}{2003-05-18}{Cascaded lists} |
| 687 |
% \begin{macrocode} |
| 688 |
{% |
| 689 |
\loop |
| 690 |
\ifnum\value{blindlistlevel}>\value{blindlist@level}% |
| 691 |
\stepcounter{blind@levelcount}% |
| 692 |
\blind@list[\value{blindlist}]\relax |
| 693 |
\addtocounter{blind@levelcount}{-1}% |
| 694 |
\setcounter{blind@listcount}{1}% |
| 695 |
\repeat |
| 696 |
}% |
| 697 |
\ifnum\value{blind@listcount}<\value{blindlist}% |
| 698 |
\stepcounter{blind@listcount}% |
| 699 |
% \end{macrocode} |
| 700 |
% Correction for nested values. |
| 701 |
% \begin{macrocode} |
| 702 |
% \end{macrocode} |
| 703 |
% Close the loop |
| 704 |
% \begin{macrocode} |
| 705 |
\repeat |
| 706 |
} |
| 707 |
% \end{macrocode} |
| 708 |
% \end{macro}%^^A{\blind@item} |
| 709 |
%% ^^A----------------------------------------------------------- |
| 710 |
% \subsection{Blind Text with Markup} |
| 711 |
% \changes{V1.9d}{2010-01-14}{Adding markup feature} |
| 712 |
% \begin{macro}{\blindmarkup} |
| 713 |
% \begin{macrocode} |
| 714 |
\newcommand{\blindmarkup}[1]{#1} |
| 715 |
% \end{macrocode} |
| 716 |
% \end{macro}% ^^A \blindmarkup |
| 717 |
% |
| 718 |
%% ^^A----------------------------------------------------------- |
| 719 |
% \subsection{Blind Text with Math} |
| 720 |
% \changes{V1.9}{2009-05-06}{Adding math} |
| 721 |
% \subsubsection{Inline Math} |
| 722 |
% \begin{macro}{\blindtext@endsentence} |
| 723 |
% Finish a sentence with a dot. |
| 724 |
% This macro is redefined for blind text with inline math/formulas. |
| 725 |
% \begin{macrocode} |
| 726 |
\def\blindtext@endsentence{.\xspace}% |
| 727 |
% \end{macrocode} |
| 728 |
% |
| 729 |
% Counter to make some alternation of inline formulas. |
| 730 |
% \begin{macrocode} |
| 731 |
\newcount{\blind@mathformula}\blind@mathformula=0% |
| 732 |
% \end{macrocode} |
| 733 |
% |
| 734 |
% A flag to sign, if math formulas should be used in blind text. |
| 735 |
% \begin{macrocode} |
| 736 |
\newif\ifblindmath |
| 737 |
% \end{macrocode} |
| 738 |
% |
| 739 |
% \begin{macro}{\blindmathtrue} |
| 740 |
% Make the following blind text with inline math. |
| 741 |
% This redefine the logical variable |\ifblindmath|, |
| 742 |
% to keep the flag we have to store and call the old definition. |
| 743 |
% \begin{macrocode} |
| 744 |
\let\oldblindmathtrue\blindmathtrue |
| 745 |
\renewcommand{\blindmathtrue}{ |
| 746 |
\oldblindmathtrue |
| 747 |
% \end{macrocode} |
| 748 |
% Make a formula each x sentence. |
| 749 |
% \begin{macrocode} |
| 750 |
\def\blindtext@endsentence{% |
| 751 |
\advance\blind@mathformula by 1% |
| 752 |
\ifcase\blind@mathformula% |
| 753 |
\or. \(\sin^2(\alpha) + \cos^2(\beta) = 1\)% |
| 754 |
\or\xspace\(E = mc^2\)% |
| 755 |
\or. \(\sqrt[n]{a} \cdot \sqrt[n]{b} = \sqrt[n]{ab}\)% |
| 756 |
\or. \(\frac{\sqrt[n]{a}}{\sqrt[n]{b}} = \sqrt[n]{\frac{a}{b}}\)% |
| 757 |
\or. \(a\sqrt[n]{b} = \sqrt[n]{a^n b}\)% |
| 758 |
\or. \(\mathrm{d}\Omega = \sin \vartheta \mathrm{d} \vartheta \mathrm{d}\varphi\)% |
| 759 |
\else\global\blind@mathformula=0% |
| 760 |
\fi% |
| 761 |
.\xspace}% |
| 762 |
% \end{macrocode} |
| 763 |
% \begin{macrocode} |
| 764 |
}%\blindmathtrue |
| 765 |
% \end{macrocode} |
| 766 |
% \end{macro} %^^A \blindmathtrue |
| 767 |
% |
| 768 |
% \begin{macro}{\blindmathfalse} |
| 769 |
% Make the following blind text without inline math. |
| 770 |
% \begin{macrocode} |
| 771 |
\let\oldblindmathfalse\blindmathfalse |
| 772 |
\renewcommand{\blindmathfalse}{ |
| 773 |
\oldblindmathfalse |
| 774 |
% \end{macrocode} |
| 775 |
% Rebuild the normal sentence end. |
| 776 |
% \begin{macrocode} |
| 777 |
\def\blindtext@endsentence{.\xspace}% |
| 778 |
% \end{macrocode} |
| 779 |
% \begin{macrocode} |
| 780 |
}%\includemath |
| 781 |
% \end{macrocode} |
| 782 |
% \end{macro} %^^A \blindmathfalse |
| 783 |
% \end{macro} %^^A\blindtext@endsentence |
| 784 |
% |
| 785 |
% |
| 786 |
% \subsubsection{'Big' Formulas} |
| 787 |
% Counter to make some alternation of 'big' formulas. |
| 788 |
% \begin{macrocode} |
| 789 |
\newcount{\blind@Mathformula} |
| 790 |
\blind@Mathformula=0% |
| 791 |
% \end{macrocode} |
| 792 |
% \begin{macro}{\blindtext@formula} |
| 793 |
% Make a formula each x sentence. |
| 794 |
% \begin{macrocode} |
| 795 |
\def\blindtext@formula{% |
| 796 |
\advance\blind@Mathformula by 1% |
| 797 |
\ifcase\blind@Mathformula% |
| 798 |
\[\bar x = \frac{1}{n}\sum_{i=1}^{i=n} x_i = \frac{x_1 + x_2 + \dots{} + x_n}{n}\] |
| 799 |
\or \[ \int_0^\infty e^{-\alpha x^2} \mathrm{d}x = |
| 800 |
\frac12\sqrt{\int_{-\infty}^\infty e^{-\alpha x^2}} |
| 801 |
\mathrm{d}x\int_{-\infty}^\infty e^{-\alpha y^2}\mathrm{d}y = |
| 802 |
\frac12\sqrt{\frac{\pi}{\alpha}} \] |
| 803 |
\or \[ \sum_{k=0}^\infty a_0q^k = \lim_{n\to\infty}\sum_{k=0}^n a_0q^k = |
| 804 |
\lim_{n\to\infty} a_0\frac{1-q^{n+1}}{1-q} = \frac{a_0}{1-q} |
| 805 |
\] |
| 806 |
\or \[x_{1,2}=\frac{-b \pm \sqrt{b^2-4ac}}{2a} = \frac{-p \pm \sqrt{p^2-4q}}{2}\] |
| 807 |
\or \[ \frac{\partial^2 \Phi}{\partial x^2} + \frac{\partial^2 \Phi}{\partial y^2} + |
| 808 |
\frac{\partial^2 \Phi}{\partial z^2} = |
| 809 |
\frac{1}{c^2}\frac{\partial^2\Phi}{\partial t^2} |
| 810 |
\] |
| 811 |
\or \[\sqrt[n]{a} \cdot \sqrt[n]{b} = \sqrt[n]{ab}\] |
| 812 |
\or \[\frac{\sqrt[n]{a}}{\sqrt[n]{b}} = \sqrt[n]{\frac{a}{b}}\] |
| 813 |
\or \[a\sqrt[n]{b} = \sqrt[n]{a^n b}\] |
| 814 |
\global\blind@Mathformula=0% |
| 815 |
\fi% |
| 816 |
}% |
| 817 |
% \end{macrocode} %^^A \blindtext@formula |
| 818 |
% \end{macro} %^^A \blindtext@formula |
| 819 |
% |
| 820 |
%% ^^A----------------------------------------------------------- |
| 821 |
% \subsection{Create Complete Documents} |
| 822 |
% A flag to sign, if the dummy documents should include a |
| 823 |
% table of contents. |
| 824 |
% \begin{macrocode} |
| 825 |
\newif\ifblindtoc |
| 826 |
\blindtocfalse |
| 827 |
% \end{macrocode} |
| 828 |
% |
| 829 |
% \begin{macro}{\blinddocument} |
| 830 |
% \cmd{\blinddocument} adds a document with \verb|\chapter|, |
| 831 |
% \verb|\section|\ldots, texts and lists (itemize, enumerate, |
| 832 |
% description). |
| 833 |
% \begin{macrocode} |
| 834 |
\newcommand{\blinddocument}{% |
| 835 |
\ifblindtoc\tableofcontents\fi |
| 836 |
\@ifundefined{chapter}{}{% |
| 837 |
\chapter{\blindtext@heading 0 (chapter)}% |
| 838 |
\blindtext |
| 839 |
}% |
| 840 |
\section{\blindtext@heading 1 (section)}% |
| 841 |
\blindtext |
| 842 |
\subsection{\blindtext@heading 2 (subsection)}% |
| 843 |
\blindtext |
| 844 |
\subsubsection{\blindtext@heading 3 (subsubsection)}% |
| 845 |
\blindtext |
| 846 |
\paragraph{\blindtext@heading 4 (paragraph)}% |
| 847 |
\blindtext |
| 848 |
\section{\blindtext@list}% |
| 849 |
\subsection{\blindtext@listEx (itemize)}% |
| 850 |
\blinditemize |
| 851 |
\subsubsection{\blindtext@listEx (4*itemize)}% |
| 852 |
\blindlistlist{itemize}[2]% |
| 853 |
\subsection{\blindtext@listEx (enumerate)}% |
| 854 |
\blindenumerate |
| 855 |
\subsubsection{\blindtext@listEx (4*enumerate)}% |
| 856 |
\blindlistlist{enumerate}[2]% |
| 857 |
\subsection{\blindtext@listEx (description)}% |
| 858 |
\blinddescription |
| 859 |
\subsubsection{\blindtext@listEx (4*description)}% |
| 860 |
\blindlistlistoptional{description}[2]% |
| 861 |
} |
| 862 |
% \end{macrocode} |
| 863 |
% \end{macro}%^^A{\blinddocument} |
| 864 |
% |
| 865 |
% \begin{macro}{\Blinddocument} |
| 866 |
% \cmd{\blinddocument} adds a document with \verb|\chapter|, |
| 867 |
% \verb|\section|\ldots, texts and lists (itemize, enumerate, |
| 868 |
% description). |
| 869 |
% \begin{macrocode} |
| 870 |
\newcommand{\Blinddocument}{% |
| 871 |
\ifblindtoc\tableofcontents\fi |
| 872 |
\@ifundefined{chapter}{}{% |
| 873 |
\chapter{\blindtext@heading 0 (chapter)}% |
| 874 |
\blindtext |
| 875 |
}% |
| 876 |
\section{\blindtext@heading 1 (section)}% |
| 877 |
\Blindtext |
| 878 |
\subsection{\blindtext@heading 2 (subsection)}% |
| 879 |
\Blindtext |
| 880 |
\subsubsection{\blindtext@heading 3 (subsection)}% |
| 881 |
\Blindtext |
| 882 |
\paragraph{\blindtext@heading 4 (paragraph)}% |
| 883 |
\Blindtext |
| 884 |
\section{\blindtext@list}% |
| 885 |
\subsection{\blindtext@listEx (itemize)}% |
| 886 |
\Blinditemize |
| 887 |
\subsubsection{\blindtext@listEx (4*itemize)}% |
| 888 |
\blind@longtrue |
| 889 |
\blindlistlist{itemize}[2]% |
| 890 |
\subsection{\blindtext@listEx (enumerate)}% |
| 891 |
\Blindenumerate |
| 892 |
\subsubsection{\blindtext@listEx (4*enumerate)}% |
| 893 |
\blind@longtrue |
| 894 |
\blindlistlist{enumerate}[2]% |
| 895 |
\subsection{\blindtext@listEx (description)}% |
| 896 |
\Blinddescription |
| 897 |
\subsubsection{\blindtext@listEx (4*description)}% |
| 898 |
\blind@longtrue |
| 899 |
\blindlistlistoptional{description}[2]% |
| 900 |
% |
| 901 |
\ifblindmath |
| 902 |
\section{\blindtext@blindmath}% |
| 903 |
\blindmathpaper% |
| 904 |
\fi% |
| 905 |
} |
| 906 |
% \end{macrocode} |
| 907 |
% \end{macro}%^^A{\Blinddocument} |
| 908 |
% |
| 909 |
% \begin{macro}{\blindmathpaper} |
| 910 |
% \changes{V1.9}{2009-05-06}{Adding math} |
| 911 |
% Build some text with formulas in between. |
| 912 |
% \begin{macrocode} |
| 913 |
\newcommand{\blindmathpaper}{ |
| 914 |
\blindtext |
| 915 |
\blindtext@formula |
| 916 |
\blindtext |
| 917 |
\blindtext@formula |
| 918 |
\blindtext |
| 919 |
\blindtext@formula |
| 920 |
\blindtext |
| 921 |
\blindtext@formula |
| 922 |
\blindtext |
| 923 |
\blindtext@formula |
| 924 |
\blindtext\relax% |
| 925 |
}%\blindmathpaper |
| 926 |
% \end{macrocode} |
| 927 |
% \end{macro} %^^A \blindmathpaper |
| 928 |
% |
| 929 |
% |
| 930 |
% \section{Option Processing} |
| 931 |
% \subsection{Bible Option} |
| 932 |
% \label{sec:optionbible} |
| 933 |
% \subsection{Bible Option} |
| 934 |
% \changes{V2.0}{2011-12-27}{Option bible} |
| 935 |
% |
| 936 |
% The option bible change the default blind text to texts from the bible. |
| 937 |
% \begin{macrocode} |
| 938 |
\newif\ifblindbible |
| 939 |
\DeclareOption{bible}{ |
| 940 |
\blindbibletrue |
| 941 |
} |
| 942 |
% \end{macrocode} |
| 943 |
% |
| 944 |
% |
| 945 |
% \subsection{Random Option} |
| 946 |
% \changes{V2.0}{2011-12-27}{Option random} |
| 947 |
% \begin{macrocode} |
| 948 |
\newif\ifblindrandom |
| 949 |
% \end{macrocode} |
| 950 |
% Define a counter for continues text change. |
| 951 |
% \begin{macrocode} |
| 952 |
\newcounter{blind@randomcount}\setcounter{blind@randomcount}{0} |
| 953 |
% \end{macrocode} |
| 954 |
% Define a counter to define the number of sentences per paragraph when you use the random option. |
| 955 |
% blind@randommax is redefined in \cmd{blindtext} |
| 956 |
% \begin{macrocode} |
| 957 |
\newcounter{blind@randommax} |
| 958 |
% \end{macrocode} |
| 959 |
% |
| 960 |
% The option random change the default blind text to texts from the random. |
| 961 |
% Changes also the counter \emph{blindtext} (Default parameter for \cmd{blindtext}). |
| 962 |
% \begin{macrocode} |
| 963 |
\DeclareOption{random}{ |
| 964 |
\blindrandomtrue |
| 965 |
} |
| 966 |
% \end{macrocode} |
| 967 |
% |
| 968 |
% |
| 969 |
% \subsection{Pangram Option} |
| 970 |
% \changes{V2.0}{2012-01-02}{Option pangram} |
| 971 |
% \begin{macrocode} |
| 972 |
\newif\ifblindpangram |
| 973 |
% \end{macrocode} |
| 974 |
% Define a counter for continues text change. |
| 975 |
% \begin{macrocode} |
| 976 |
\newcounter{blind@pangramcount}\setcounter{blind@pangramcount}{0} |
| 977 |
% \end{macrocode} |
| 978 |
% Define a counter to define the number of sentences per paragraph when you use the pangram option. |
| 979 |
% blind@pangrammax is redefined in \cmd{blindtext} |
| 980 |
% \begin{macrocode} |
| 981 |
\newcounter{blind@pangrammax} |
| 982 |
% \end{macrocode} |
| 983 |
% |
| 984 |
% The option pangram change the default blind text to texts from the pangram. |
| 985 |
% Changes also the counter \emph{blindtext} (Default parameter for \cmd{blindtext}). |
| 986 |
% \begin{macrocode} |
| 987 |
\DeclareOption{pangram}{ |
| 988 |
\blindpangramtrue |
| 989 |
} |
| 990 |
% \end{macrocode} |
| 991 |
% |
| 992 |
% |
| 993 |
% \subsection{Math Option} |
| 994 |
% \label{sec:optionmath} |
| 995 |
% \changes{V1.9}{2009-06-06}{Option math} |
| 996 |
% Activate the math formulas in the text. |
| 997 |
% \begin{macrocode} |
| 998 |
\DeclareOption{math}{ |
| 999 |
\blindmathtrue |
| 1000 |
} |
| 1001 |
% \end{macrocode} |
| 1002 |
% |
| 1003 |
% \subsection{Toc Option} |
| 1004 |
% \label{sec:optiontoc} |
| 1005 |
% \changes{V1.9}{2009-06-14}{Option toc} |
| 1006 |
% Activate the table of contents for |\blinddoccument|. |
| 1007 |
% \begin{macrocode} |
| 1008 |
\DeclareOption{toc}{ |
| 1009 |
\blindtoctrue |
| 1010 |
} |
| 1011 |
% \end{macrocode} |
| 1012 |
% |
| 1013 |
% \section{Closing Actions} |
| 1014 |
% Activate the options |
| 1015 |
% \begin{macrocode} |
| 1016 |
\ProcessOptions\relax |
| 1017 |
% \end{macrocode} |
| 1018 |
% |
| 1019 |
% |
| 1020 |
%% ^^A----------------------------------------------------------- |
| 1021 |
% \section{The Texts} |
| 1022 |
% |
| 1023 |
% \changes{V1.7}{2006-11-21}{Delete trailing spaces in language definitions.} |
| 1024 |
% |
| 1025 |
% \begin{macro}{\blind@addtext} |
| 1026 |
% This macro adds the texts according to the language definitions. |
| 1027 |
% Four language packages are supported: |
| 1028 |
%\begin{itemize} |
| 1029 |
% \item babel |
| 1030 |
% \item polyglossia (see \url{http://tug.ctan.org/tex-archive/macros/xetex/latex/polyglossia/}) |
| 1031 |
% \item german |
| 1032 |
% \item ngerman |
| 1033 |
%\end{itemize} |
| 1034 |
% |
| 1035 |
%Parameters: |
| 1036 |
%\begin{enumerate} |
| 1037 |
% \item Language |
| 1038 |
% \item The text definitions |
| 1039 |
%\end{enumerate} |
| 1040 |
% \begin{macrocode} |
| 1041 |
\newcommand{\blind@addtext}[2]{% |
| 1042 |
% \end{macrocode} |
| 1043 |
% First we take care of the babel-package. |
| 1044 |
% \begin{macrocode} |
| 1045 |
\@ifpackageloaded{babel}{ |
| 1046 |
\expandafter\addto\csname extras#1\endcsname{#2} |
| 1047 |
}{}% |
| 1048 |
% \end{macrocode} |
| 1049 |
% \changes{V1.9}{2009-06-03}{Support polyglossia} |
| 1050 |
% Polyglossia provides a complete Babel replacement for users of Xe\LaTeX. |
| 1051 |
% \begin{macrocode} |
| 1052 |
\@ifpackageloaded{polyglossia}{ |
| 1053 |
\expandafter\gappto\csname captions#1\endcsname {#2} |
| 1054 |
}{}% |
| 1055 |
% \end{macrocode} |
| 1056 |
% \changes{V1.9}{2009-06-04}{Support (n)german} |
| 1057 |
% Now some special support for the (n)german-package. |
| 1058 |
% \begin{macrocode} |
| 1059 |
\@ifpackageloaded{ngerman}{ |
| 1060 |
\expandafter\g@addto@macro\csname captions#1\endcsname {#2} |
| 1061 |
}{}% |
| 1062 |
\@ifpackageloaded{german}{ |
| 1063 |
\expandafter\g@addto@macro\csname captions#1\endcsname {#2} |
| 1064 |
}{}% |
| 1065 |
% \end{macrocode} |
| 1066 |
% |
| 1067 |
% \begin{macrocode} |
| 1068 |
}%\blind@addtext |
| 1069 |
% \end{macrocode} |
| 1070 |
% \end{macro}%^^A\blind@addtext |
| 1071 |
% |
| 1072 |
% |
| 1073 |
% \subsection{Default Without Language} |
| 1074 |
% First all default texts if no language is selected. |
| 1075 |
% |
| 1076 |
% \begin{macrocode} |
| 1077 |
\def\blindtext@text{% |
| 1078 |
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam |
| 1079 |
lobortis facilisis sem. Nullam nec mi et neque pharetra |
| 1080 |
sollicitudin. Praesent imperdiet mi nec ante. Donec ullamcorper, |
| 1081 |
felis non sodales commodo, lectus velit ultrices augue, a |
| 1082 |
dignissim nibh lectus placerat pede. Vivamus nunc nunc, molestie |
| 1083 |
ut, ultricies vel, semper in, velit. Ut porttitor. Praesent in |
| 1084 |
sapien. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. |
| 1085 |
Duis fringilla tristique neque. Sed interdum libero ut metus. |
| 1086 |
Pellentesque placerat. Nam rutrum augue a leo. Morbi sed elit sit |
| 1087 |
amet ante lobortis sollicitudin. Praesent blandit blandit mauris. |
| 1088 |
Praesent lectus tellus, aliquet aliquam, luctus a, egestas a, |
| 1089 |
turpis. Mauris lacinia lorem sit amet ipsum. Nunc quis urna dictum |
| 1090 |
turpis accumsan semper.% |
| 1091 |
} |
| 1092 |
\def\blindtext@count{% |
| 1093 |
\ifcase\blind@listitem\or |
| 1094 |
First\or Second%... |
| 1095 |
\else |
| 1096 |
Last% |
| 1097 |
\blind@listitem=0 % |
| 1098 |
\fi |
| 1099 |
\global\advance\blind@listitem by 1 % |
| 1100 |
}% \blindtext@count |
| 1101 |
\def\blindtext@item{itemtext} |
| 1102 |
\def\blindtext@countitem{\blindtext@count\ \blindtext@item} |
| 1103 |
\def\blindtext@heading{Heading on level\xspace} |
| 1104 |
\def\blindtext@list{Lists} |
| 1105 |
\def\blindtext@listEx{Example for list\xspace} |
| 1106 |
\def\blindtext@blindmath{Some blind text with math formulas} |
| 1107 |
% \end{macrocode} |
| 1108 |
%</package> |
| 1109 |
% |
| 1110 |
% ^^A Add text documentations |
| 1111 |
% \input{blindtext_english.dtx} |
| 1112 |
% \input{blindtext_german.dtx} |
| 1113 |
% \input{blindtext_ngerman.dtx} |
| 1114 |
% \input{blindtext_american.dtx} |
| 1115 |
% \input{blindtext_catalan.dtx} |
| 1116 |
% \input{blindtext_latin.dtx} |
| 1117 |
% \input{blindtext_french.dtx} |
| 1118 |
% |
| 1119 |
%<*packageend> |
| 1120 |
% \section{Thanks} |
| 1121 |
% Thanks to Heiko Oberdiek and Arno Trautmann for corrections (Version 1.8) |
| 1122 |
% |
| 1123 |
% Thanks to Andrea Bergschneider for her idea with math formulas inside the text |
| 1124 |
% (and Arno Trautmann for his cooperation in realizing it). |
| 1125 |
% Thanks to Dennis Heidsieck for his hint with polygloss. |
| 1126 |
% (Version 1.9) |
| 1127 |
% |
| 1128 |
% Thanks to Joan Queralt Gil for the Catalanian translation. |
| 1129 |
% Thanks to Felix Lehmann for corrections of the documentation and German and English blind texts. |
| 1130 |
% (Version 2.0) |
| 1131 |
% |
| 1132 |
% \Finale |
| 1133 |
% \PrintIndex |
| 1134 |
% \PrintChanges |
| 1135 |
% \end{document} |
| 1136 |
%</packageend> |