summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/blindtext/blindtext.dtx
blob: 18b0a6bae139cb64c556d050c74664daad1e4a84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
% ^^A CTAN:macros/latex/contrib/supported/minutes
\def\fileversion{V1.8}
\def\filedate{2009/01/27}
% ^^A For index and changes, run:
% ^^A makeindex -s gglo.ist -o blindtext.gls blindtext.glo
% ^^A makeindex -s gind.ist -o blindtext.ind blindtext.idx
%
% \CheckSum{545}
%%
%% \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
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%
% \DoNotIndex{\" , \-, \flqq,\frqq, \ ,\def, \begin, \end}
% \DoNotIndex{\csname,\endcsname, \expandafter, \global, \newcommand}
% \DoNotIndex{\advance, \filedate, \fileversion, \MessageBreak}
% \DoNotIndex{\newcount, \newcounter, \newif, \or}
% \DoNotIndex{\if, \else, \fi, \ifcase, \ifdefined, \ifnum, \ifx, \loop, \repeat}
% \DoNotIndex{\heartsuit}
% \DoNotIndex{\NeedsTeXFormat, \providecommand, \ProvidesPackage, \relax, \RequirePackage}
% \DoNotIndex{\par, \chapter, \section, \subsection, \subsubsection, \paragraph, }
% \DoNotIndex{\selectlanguage, \stepcounter, \ss, \space, \setcounter}
% \DoNotIndex{\value, \typeout, \long, \renewcommand}
%
% \iffalse
%<*driver>
\documentclass{ltxdoc}
%\documentclass{refart}
%\usepackage{doc}
\usepackage[german,english]{babel}
\usepackage{blindtext}
\usepackage{makeidx}
\IfFileExists{hyperref.sty}{\usepackage{hyperref}}{}
\CodelineIndex
\makeindex
%\OnlyDescription
\begin{document}
 \DocInput{blindtext.dtx}
\end{document}
%</driver>
%
%<*package>
% \fi
%
% \newcommand*{\Lpack}[1]{\textsf {#1}}           ^^A typeset a package
% \newcommand*{\Lenv}[1]{\texttt {#1}}           ^^A typeset a package
%
% \title{Blindtext.sty:\\
%   Creating text for testing/
%   Texterzeugung zum testen}
%
% \author{Knut Lickert\\
%       \url{http://tex.lickert.net/packages/blindtext/}
% }
% \maketitle
%
%\begin{abstract}
%\selectlanguage{english}
%This packet create text with the commands \verb|\blindtext| and
%\verb|\Blindtext|.
%With this created text you can get an impression of the look
%of new classes and packages.
%
%\selectlanguage{german}
%Mit diesem Paket kann man lange Texte erzeugen, ohne lange
%Texte einzugeben.
%Sinn ist die Erzeugung langer Beispieltexte, ohne den
%Quelltext lang zu machen.
%\end{abstract}
%
%\selectlanguage{english}
%\section{Overview/{\"U}bersicht}
%\subsection{The commands/Die Kommandos}
%\begin{figure}
%\renewcommand{\arraystretch}{1.1}
%\begin{tabular}{p{0.3\textwidth}*{2}{p{0.3\textwidth}}}\hline
%Command/Makro       & englisch      & german    \\\hline
%\verb|\blinddocument|   & creates a document  & erzeugt ein Dokument\\
%\verb|\Blinddocument|   & creates a big document  & erzeugt ein gro{\ss}es Dokument\\
%\verb|\blindtext|   & creates text  & erzeugt Text\\
%\verb|\Blindtext|   & creates more text & erzeugt mehr Text\\
%\verb|\blindlist{env}|   & creates a list  & erzeugt eine Liste\\
%\verb|\blindlistoptional|\newline\hspace*{2em}\verb|{env}|   & creates a list with \verb|\item[]|  & erzeugt eine Liste mit \verb|\item[]|\\
%\verb|\blindlistlist|\newline\hspace*{2em}\verb|[level]{env}|   & creates cascaded lists  & erzeugt geschachtelte Listen\\
%\verb|\Blindlist{env}|   & creates a big list  & erzeugt eine gro{\ss}e Liste\\
%\verb|\Blindlistoptional|\newline\hspace*{2em}\verb|{env}|   & creates a big list with \verb|\item[]|  & erzeugt eine gro{\ss}e Liste mit \verb|\item[]|\\
%\verb|\blinditemize|   & creates an itemize list  & erzeugt eine itemize-Liste\\
%\verb|\blindenumerate|   & creates an enumerate list  & erzeugt eine enume\-ra\-te-Liste\\
%\verb|\blinddescription|   & creates a description list  & erzeugt eine des\-crip\-tion-Liste\\\hline
%$\sim$[x]   & repetition & Wiederholungsfaktor\\
% ^^A%\verb|\lovetext|   & I love you in different languages & mehrsprachig: Ich liebe dich\\
%\end{tabular}
%\caption{Command Overview}
%\end{figure}
%
% \DescribeMacro{\blinddocument}
% {\verb|\blinddocument|} create a document with sections,
% subsections\ldots and lists (\Lenv{itemize},
% \Lenv{enumerate} and \Lenv{description}).
% \DescribeMacro{\Blinddocument}
% {\verb|\Blinddocument|} create a
% document with bigger sections, subsections\ldots and longer
% lists.\par
%
% The smallest document to check the look of a class would be:
% \begin{quote}
% \begin{verbatim}
% \documentclass{<class>}
% \usepackage{blindtext}
% \begin{document}
%     \blinddocument
% \end{document}
% \end{verbatim}
% \end{quote}
%
% \DescribeMacro{\blindtext}
% \verb|\blindtext[x]| create a text. The optional parameter defines a
% repetition. Default for the repetition is one and can be modified
% with \verb|\setcounter{blindtext}{1}|.
%
% \DescribeMacro{\Blindtext}
% {\verb|\Blindtext[x][y]|} create $x$ paragraphs with the text of
% {\verb|\blindtext|}. The first optional parameter defines a
% repetition of the paragraphs. Default for the repetition is five
% and can be modified with \verb|\setcounter{Blindtext}{5}|. The
% second optional parameter is given to \verb|\blindtext|.
%
% It is possible to add a start and end sequence for each paragraph.
%
% \DescribeMacro{\parstart}
% \DescribeMacro{\parend}
% The two macros \verb|\parstart| and \verb|\parend| define a
% starting and ending sequence for each paragraph in
% \verb|\Blindtext|.
%
% \DescribeMacro{\blindlist}
% {\verb|\blindlist{env}[x]|} create a list, the type is defined by the
% obligatory parameter. The optional parameter defines a repetition.
% Default for the repetition is five and can be modified with
% \verb|\setcounter{blindlist}{x}|.
%
% \DescribeMacro{\blindlistlist}
%  {\verb|\blindlistlist[level]{env}[x]|} creates cascaded lists up to
%  level \verb|level|, the type is defined by the second obligatory
%  parameter. The optional parameter defines a repetition. Default is the
%  same like in \verb|\blindlist|.
%
% \DescribeMacro{\Blindlist}
% \verb|\Blindlist{env}[x]| create a list with long texts. The optional parameter defines a
% repetition. Default for the repetition is five and can be modified
% with \verb|\setcounter{blindlist}{x}|.
%
% \DescribeMacro{\blindlistoptional}
% {\verb|\blindlistoptional{env}[x]|} create a list with \verb|\item[]|. The
% list is defined by the obligatory parameter. The optional
% parameter defines a repetition. Default for the repetition is five
% and can be modified with \verb|\setcounter{blindlist}{x}|.
%
% \DescribeMacro{\Blindlistoptional}
% \verb|\Blindlistoptional| create a list like
% \verb|\blindlistoptional| with long texts.
%
% \DescribeMacro{\blinditemize}     \DescribeMacro{\Blinditemize}
% \DescribeMacro{\blindenumerate}   \DescribeMacro{\Blindenumerate}
% \DescribeMacro{\blinddescription} \DescribeMacro{\Blinddescription}
% This commands are a abbreviation for \verb|\blindlist{itemize}|, \verb|\blindlist{enumerate}|
% and \verb|\blindlist{description}|.
%
% \StopEventually
%
% \selectlanguage{english}
% \section{Implementation/Implementierung}
%    \changes{V1.8}{2009-01-27}{Adding a lot percent to avoid spaces.}
%
%
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{blindtext}[\filedate\space\fileversion\space%
                 blindtext-Package]
\RequirePackage{xspace}
%    \end{macrocode}
% Just in case the french quote are not defined
%    \begin{macrocode}
\providecommand{\frqq}{}
\providecommand{\flqq}{}
%    \end{macrocode}
%
%    \begin{macro}{\blind@checklanguage}
%    \changes{V1.6}{2006-08-02}{Check for defined language}
%    It is possible, that you use blindtext.sty with
%    undefined languages.
%    This macro checks, if blindtext support the language.
%    If it is not available, an error is reported and
%    English is used.
%    \begin{macrocode}
\newcommand{\blind@checklanguage}{%
  \@ifundefined{blindtext@\languagename}{%
    \PackageWarning{blindtext}{\languagename\space not
      defined, using english instead.\MessageBreak
    }%
    \selectlanguage{english}%
  }{}%
}
%    \end{macrocode}
%    \end{macro}


% First we need some counters for the number of repetitions of the
% text and the paragraphs.
%    \begin{macrocode}
\newcounter{blindtext}\setcounter{blindtext}{1}
\newcounter{Blindtext}\setcounter{Blindtext}{5}
%    \end{macrocode}
%
%    \begin{macro}{\blindtext}
%
% \verb|\blindtext[x]| write $x\times$ a sentence.
% The default is stored in the counter \verb|blindtext|. This value
% can be changed with \verb|\setcounter{blindtext}{1}|.
%
%    \changes{V1.6}{2006-08-02}{Check for defined language}
%    \begin{macrocode}
\newcount\blind@countxx
\newcommand{\blindtext}[1][\value{blindtext}]{%
  \blind@checklanguage
  \blind@countxx=1 %
  \loop
    \blindtext@text\
  \ifnum\blind@countxx<#1\advance\blind@countxx by 1 %
  \repeat
}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\Blindtext}
% \verb|\Blindtext[x][y]| execute $x\times$\verb|\blindtext[y]|. Each
% \verb|\blindtext[y]| built a paragraph.
% The default is stored in the counter \verb|Blindtext|. This value
% can be changed with \verb|\setcounter{Blindtext}{5}|.
% The counter \verb|blindtext@numBlindtext| stores the first
% optional parameter to be used in \verb|\blindtext@Blindtext|.
%    \changes{V1.6}{2006-08-02}{Check for defined language}
%    \begin{macrocode}
\newcount\blindtext@numBlindtext
\newcommand{\Blindtext}[1][\value{Blindtext}]{%
  \blind@checklanguage
  \blindtext@numBlindtext=#1\relax
  \blind@Blindtext
}
%    \end{macrocode}
%    \end{macro} %^^A Blindtext
%
% \begin{macro}{\blind@Blindtext}
% This macro continue \verb|\Blindtext| with a second optional parameter.
%
% Each paragraph starts and end with a text, which can be defined with
% \verb|\starttext| or \verb|\endtext|.
%    \begin{macrocode}
\newcount\blind@countyy
\newcommand{\blind@Blindtext}[1][\value{blindtext}]{%
  \blind@countyy=1 %
  \loop
    {\blindtext@parstart\blindtext[{#1}]\blindtext@parend\par}%
  \ifnum\blind@countyy<\blindtext@numBlindtext\advance\blind@countyy by 1 %
  \repeat
}
%    \end{macrocode}
% \end{macro}%^^A {\blind@Blindtext}
%
% \begin{macro}{\parstart}
% \begin{macro}{\parend}
%    \begin{macrocode}
\newcommand{\blindtext@parstart}{}   % Text at start of paragraph
\newcommand{\blindtext@parend}{}     % Text at end   of paragraph
\newcommand{\parstart}[1]{\renewcommand{\blindtext@parstart}{#1}}
\newcommand{\parend}[1]{\renewcommand{\blindtext@parend}{#1}}
%    \end{macrocode}
% \end{macro}%^^A{\parstart}
% \end{macro}%^^A{\parend}
%
% \section{Lists}
% Here I define some flags to decide in the lists, if we have to
% create big items and if we need the optional parameter at
% \verb|\item|. This flags are reset in \verb|\blind@list|.\par
% The counter \verb|blindlist| define the default number of items in a list.
% The counter \verb|blindlistitem| is needed by \verb|\blindtext@count|
% to write a text like 'first', 'second'\ldots.
%    \begin{macrocode}
\newif\ifblind@long\blind@longfalse
\newif\ifblind@optional\blind@optionalfalse
\newcounter{blindlist}
\newcounter{blindlistlevel}% Up tu X level
\newcounter{blindlist@level}% internal counter
\newcount\blind@listitem
%    \end{macrocode}
%
% \begin{macro}{\blindlist}
% \begin{macro}{\blind@listtype}
% \verb|\blindlist{env}[x]| write a env-list with $x$ items.
% The default is stored in the counter \verb|blindlist|. This value
% can be changed with \verb|\setcounter{blindlist}{1}|.
% The type of list is stored in \verb|\blind@listtype|.
%    \changes{V1.6}{2006-08-02}{Check for defined language}
%    \begin{macrocode}
%% ^^A-----------------------------------------------------------
\newcommand{\blindlist}[1]{%
  \blind@checklanguage
  \def\blind@listtype{#1}%
  \setcounter{blind@levelcount}{1}%
  \blind@list
}
%    \end{macrocode}
% \end{macro}%^^A{\blindlist}
% \end{macro}%^^A{\blind@listtype}
%
% \begin{macro}{\blind@list}
% This macro continue the macro \verb|\blindlist| and with the
% optional parameter. After the printout, we reset the flags and the
% counter for the list text.
%    \begin{macrocode}
\newcommand{\blind@list}[1][5]{%
  \setcounter{blindlist}{#1}%
  \stepcounter{blindlist@level}% depth of list
  \blind@listitem=1 %
  \begin{\blind@listtype}%
    \blind@items
  \end{\blind@listtype}%
  \blind@longfalse
  \blind@optionalfalse
}
%    \end{macrocode}
% \end{macro}%^^A {\blind@list}
%
% \begin{macro}{\blindlistlist}
% \verb|\blindlistlist[num]{env}[x]| writes cascaded lists up to level num.
%    \begin{macrocode}
\newcommand{\blindlistlist}[2][4]{%
  \setcounter{blindlistlevel}{#1}%
  \setcounter{blindlist@level}{0}% deepest reached level
  \setcounter{blind@levelcount}{1}% actual level for printout
  \def\blind@listtype{#2}%
  \blind@list
}
%    \end{macrocode}
% \end{macro}%^^A {\blindlistlist}
% \begin{macro}{\blindlistlistoptional}
% Like \verb|\blindlistlist[num]{env}[x]| but for environment with optional parameters.
%    \begin{macrocode}
\newcommand{\blindlistlistoptional}{%
  \blind@optionaltrue
  \blindlistlist
}
%    \end{macrocode}
% \end{macro}%^^A{\blindlistlistoptional}
%
% \begin{macro}{\blinditemize}
% \begin{macro}{\blindenumerate}
% Some default macros for the standard environments.
%    \begin{macrocode}
\newcommand{\blinditemize}{\blindlist{itemize}}
\newcommand{\blindenumerate}{\blindlist{enumerate}}
%    \end{macrocode}
% \end{macro}%^^A{\blinditemize}
% \end{macro}%^^A{\blindenumerate}
%
% \verb|\Blindlist[x]| write a list with $x$ items.
% The default is stored in the counter \verb|blindlist|. This value
% can be changed with \verb|\setcounter{blindlist}{1}|.
%
%
% \begin{macro}{\Blindlist}
%    \begin{macrocode}
\newcommand{\Blindlist}[1]{%
  \blind@longtrue
  \blindlist{#1}%
}
%    \end{macrocode}
% \end{macro}%^^A{\Blindlist}
%
% \begin{macro}{\Blinditemize}
% \begin{macro}{\Blindenumerate}
% Some default macros for the standard environments.
%    \begin{macrocode}
\newcommand{\Blinditemize}{\Blindlist{itemize}}
\newcommand{\Blindenumerate}{\Blindlist{enumerate}}
%    \end{macrocode}
% \end{macro}%^^A{\Blinditemize}
% \end{macro}%^^A{\Blindenumerate}
%
% \begin{macro}{\blindlistoptional}
% Here we start a list with \verb|\item[]|. So we set the flag for optional
% parameter and start the normal list.
%    \begin{macrocode}
\newcommand{\blindlistoptional}[1]{%
  \blind@optionaltrue
  \blindlist{#1}%
}
%    \end{macrocode}
% \end{macro}%^^A{\blindlistoptional}
%
% \begin{macro}{\Blindlistoptional}
% Now a big list with optional parameter at \verb|\item|.
%    \begin{macrocode}
\newcommand{\Blindlistoptional}[1]{%
  \blind@optionaltrue
  \blind@longtrue
  \blindlist{#1}%
}
%    \end{macrocode}
% \end{macro}%^^A{\blindlistoptional}
%
% \begin{macro}{\blinddescription}
% \begin{macro}{\Blinddescription}
% Some default macros for the standard environment description.
%\changes{1.7}{2006-12-01}{Replace counter listcount}
%    \begin{macrocode}
\newcommand{\blinddescription}{\blindlistoptional{description}}
\newcommand{\Blinddescription}{\Blindlistoptional{description}}
\newcounter{blind@listcount}
\newcounter{blind@levelcount}
%    \end{macrocode}
% \end{macro}%^^A{\blinddescription}
% \end{macro}%^^A{\Blinddescription}
%
% \begin{macro}{\blind@items}
% Here the \verb|\item| are written.
% A local counter is defined and the \verb|\item| is written. The
% type of \verb|\item| is influenced by the flags.
%    \begin{macrocode}
\newcommand{\blind@items}{%
  \setcounter{blind@listcount}{1}%
  \loop
  \ifblind@optional
    \ifblind@long
      \item[\blindtext@countitem] \blindtext@text
    \else
      \item[\blindtext@count] \blindtext@item
    \fi
    \else % \blind@optionalfalse
      \ifblind@long
        \item \blindtext@text
      \else
        \item \blindtext@countitem
      \fi
    \fi % \ifblind@optional
%    \end{macrocode}
% Loop for cascaded lists.
% \changes{V1.3}{2003-05-18}{Cascaded lists}
%    \begin{macrocode}
    {%
      \loop
      \ifnum\value{blindlistlevel}>\value{blindlist@level}%
        \stepcounter{blind@levelcount}%
        \blind@list[\value{blindlist}]\relax
        \addtocounter{blind@levelcount}{-1}%
        \setcounter{blind@listcount}{1}%
      \repeat
    }%
  \ifnum\value{blind@listcount}<\value{blindlist}%
    \stepcounter{blind@listcount}%
%    \end{macrocode}
% Correction for nested values.
%    \begin{macrocode}
%    \end{macrocode}
% Close the loop
%    \begin{macrocode}
  \repeat
}
%    \end{macrocode}
% \end{macro}%^^A{\blind@item}
%% ^^A-----------------------------------------------------------
% \section{A sample document}
%    \begin{macro}{\blinddocument}
% \verb|\blinddocument| adds a document with \verb|\chapter|,
% \verb|\section|\ldots, texts and lists (itemize, enumerate,
% description).
%    \begin{macrocode}
\newcommand{\blinddocument}{%
  \@ifundefined{chapter}{}{%
    \chapter{\blindtext@heading 0 (chapter)}%
    \blindtext
  }%
  \section{\blindtext@heading 1 (section)}%
    \blindtext
  \subsection{\blindtext@heading 2 (subsection)}%
    \blindtext
  \subsubsection{\blindtext@heading 3 (subsubsection)}%
    \blindtext
  \paragraph{\blindtext@heading 4 (paragraph)}%
    \blindtext
  \section{\blindtext@list}%
  \subsection{\blindtext@listEx (itemize)}%
    \blinditemize
  \subsubsection{\blindtext@listEx (4*itemize)}%
    \blindlistlist{itemize}[2]%
  \subsection{\blindtext@listEx (enumerate)}%
    \blindenumerate
  \subsubsection{\blindtext@listEx (4*enumerate)}%
    \blindlistlist{enumerate}[2]%
  \subsection{\blindtext@listEx (description)}%
    \blinddescription
  \subsubsection{\blindtext@listEx (4*description)}%
    \blindlistlistoptional{description}[2]%
}
%    \end{macrocode}
%    \end{macro}%^^A{\blinddocument}
%
%    \begin{macro}{\Blinddocument}
% \verb|\blinddocument| adds a document with \verb|\chapter|,
% \verb|\section|\ldots, texts and lists (itemize, enumerate,
% description).
%    \begin{macrocode}
\newcommand{\Blinddocument}{%
  \@ifundefined{chapter}{}{%
    \chapter{\blindtext@heading 0 (chapter)}%
    \blindtext
  }%
  \section{\blindtext@heading 1 (section)}%
    \Blindtext
  \subsection{\blindtext@heading 2 (subsection)}%
    \Blindtext
  \subsubsection{\blindtext@heading 3 (subsection)}%
    \Blindtext
  \paragraph{\blindtext@heading 4 (paragraph)}%
    \Blindtext
  \section{\blindtext@list}%
  \subsection{\blindtext@listEx (itemize)}%
    \Blinditemize
  \subsubsection{\blindtext@listEx (4*itemize)}%
    \blind@longtrue
    \blindlistlist{itemize}[2]%
  \subsection{\blindtext@listEx (enumerate)}%
    \Blindenumerate
  \subsubsection{\blindtext@listEx (4*enumerate)}%
    \blind@longtrue
    \blindlistlist{enumerate}[2]%
  \subsection{\blindtext@listEx (description)}%
    \Blinddescription
  \subsubsection{\blindtext@listEx (4*description)}%
    \blind@longtrue
  \blindlistlistoptional{description}[2]%
}
%    \end{macrocode}
%    \end{macro}%^^A{\Blinddocument}
%
%% ^^A-----------------------------------------------------------
% \section{The texts}
%    \changes{V1.7}{2006-11-21}{Delete trailing spaces in language definitions.}
%    \begin{macro}{\addto}
% If babel is not loaded, we need the command \verb|\addto|.
%    \begin{macrocode}
%\providecommand{\addto}[2]{#2}
\@ifundefined{addto}{%
  \@ifpackageloaded{babel}{}{%
    \PackageWarning{blindtext}{%
    You are not using babel.sty -> Language by random\MessageBreak
    Kein babel.sty verwendet -> Zufallssprache}%
  }%
  \newcommand{\addto}[2]{#2}%
}{}
%    \end{macrocode}
%    \end{macro}%^^A\addto
%
% \subsection{Default without language}
% First all texts without any language. If you make a new translation, please
% define all this macros.
%    \begin{macrocode}
\def\blindtext@text{Text}
\def\blindtext@count{%
  \ifcase\blind@listitem\or
    First\or Second%...
  \else
    Last%
    \blind@listitem=0 %
  \fi
  \global\advance\blind@listitem by 1 %
}% \blindtext@count
\def\blindtext@item{itemtext}
\def\blindtext@countitem{\blindtext@count\ \blindtext@item}
\def\blindtext@heading{Heading on level\xspace}
\def\blindtext@list{Lists}
\def\blindtext@listEx{Example for list\xspace}
%    \end{macrocode}
%
% \subsection{English Texts}
%
%    \begin{macro}{\blindtext@english}
%    Define flag, so we can check, if language is defined.
%    \begin{macrocode}
\def\blindtext@english{}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macrocode}
\addto\extrasenglish{%
  \def\blindtext@text{%
    Hello, here is some text without a meaning. This text should show,
    how a printed text will look like at this place. If you read this
    text, you will get no information. Really? Is there no
    information? Is there a difference between this text and some
    nonsense like \frqq Huardest gefburn\flqq? Kjift -- Never mind! A
    blind text like this gives you information about the selected
    font, how the letters are written and the impression of the look.
    This text should contain all letters of the alphabet and it should
    be written in of the original language. There is no need for a
    special contents, but the length of words should match to the
    language.%
  }% \blindtext@text
}
%    \end{macrocode}
%
%    \begin{macrocode}
\addto\extrasenglish{%
  \def\blindtext@count{%
    \ifcase\value{blind@listcount}\or
      First\or Second\or Third\or Fourth\or Fifth\or
      Sixth\or Seventh\or Eighth\or Ninth\or Tenth\or
      Eleventh\or Twelfth%
    \else Another%
    \fi
  }% \blindtext@count
  \def\blindtext@item{item in a list}%, level~\arabic{blindlist@level}}
}% \addto\extrasenglish
%    \end{macrocode}
%
%    \begin{macrocode}
\addto\extrasenglish{%
  \def\blindtext@heading{Heading on level\xspace}%
  \def\blindtext@list{Lists}%
  \def\blindtext@listEx{Example for list\xspace}%
}%\addto\extrasenglish
%
%    \end{macrocode}
%
%
% \subsection{German Texts}
%
%    \begin{macro}{\blindtext@german}
%    Define flag, so we can check, if language is defined.
%    \begin{macrocode}
\def\blindtext@german{}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macrocode}
\addto\extrasgerman{%
  \def\blindtext@text{%
    Dies hier ist ein Blindtext zum Testen von Textausgaben. Wer
    diesen Text liest, ist selbst schuld. Der Text gibt lediglich den
    Grauwert der Schrift an. Ist das wirklich so? Ist es
    gleich\-g\"ul\-tig ob ich schreibe: \frqq Dies ist ein
    Blindtext\flqq\ oder \frqq Huardest gefburn\flqq? Kjift --
    mitnichten! Ein Blindtext bietet mir wichtige Informationen. An
    ihm messe ich die Lesbarkeit einer Schrift, ihre Anmutung, wie
    harmonisch die Figuren zueinander stehen und pr\"u\-fe, wie breit
    oder schmal sie l\"auft. Ein Blindtext sollte m\"og\-lichst viele
    verschiedene Buchstaben enthalten und in der Originalsprache
    gesetzt sein. Er mu\ss\ keinen Sinn ergeben, sollte aber lesbar
    sein. Fremdsprachige Texte wie \frqq Lorem ipsum\flqq\ dienen
    nicht dem eigentlichen Zweck, da sie eine
    falsche Anmutung vermitteln.%
  }% \blindtext@text
}
%    \end{macrocode}
%
%    \begin{macrocode}
\addto\extrasgerman{%
  \def\blindtext@count{%
    \ifcase\value{blind@listcount}\or
      Erster\or Zweiter\or Dritter\or Vierter\or F{\"u}nfter\or
      Sechster\or Siebter\or Achter\or Neunter\or Zehnter\or
      Elfter\or Zw{\"o}lfter\or Dreizehnter\or Vierzehnter%
      \else
      Noch ein%
    \fi
  }% \blindtext@count
  \def\blindtext@item{Listenpunkt, Stufe~\arabic{blind@levelcount}}%
}%\addto\extrasgerman
%    \end{macrocode}
%
%    \begin{macrocode}
\addto\extrasgerman{%
  \def\blindtext@heading{{\"U}berschrift auf Ebene\xspace}%
  \def\blindtext@list{Listen}%
  \def\blindtext@listEx{Beispiel einer Liste\xspace}%
}% \addto\extrasgerman
%    \end{macrocode}
%
% If the packet \Lpack{german} is loaded, select the language.
%    \begin{macrocode}
\@ifpackageloaded{german}{\selectlanguage{german}}{}
%    \end{macrocode}
%
% \subsection{German - New typesetting}
%    \begin{macro}{\blindtext@ngerman}
%    Define flag, so we can check, if language is defined.
%    \begin{macrocode}
\def\blindtext@ngerman{}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macrocode}
\addto\extrasngerman{%
  \def\blindtext@text{%
    Dies hier ist ein Blindtext zum Testen von Textausgaben. Wer
    diesen Text liest, ist selbst schuld. Der Text gibt lediglich den
    Grauwert der Schrift an. Ist das wirklich so? Ist es
    gleich\-g\"ul\-tig ob ich schreibe: \frqq Dies ist ein
    Blindtext\flqq\ oder \frqq Huardest gefburn\flqq? Kjift --
    mitnichten! Ein Blindtext bietet mir wichtige Informationen. An
    ihm messe ich die Lesbarkeit einer Schrift, ihre Anmutung, wie
    harmonisch die Figuren zueinander stehen und pr\"u\-fe, wie breit
    oder schmal sie l\"auft. Ein Blindtext sollte m\"og\-lichst viele
    verschiedene Buchstaben enthalten und in der Originalsprache
    gesetzt sein. Er mu\ss\ keinen Sinn ergeben, sollte aber lesbar
    sein. Fremdsprachige Texte wie \frqq Lorem ipsum\flqq\ dienen
    nicht dem eigentlichen Zweck, da sie eine
    falsche Anmutung vermitteln.%
  }% \blindtext@text
}
%    \end{macrocode}
%
%    \begin{macrocode}
\addto\extrasngerman{%
  \def\blindtext@count{%
    \ifcase\value{blind@listcount}\or
    Erster\or Zweiter\or Dritter\or Vierter\or F{\"u}nfter\or
    Sechster \or Siebter\or Achter\or Neunter\or Zehnter\or
    Elfter \or Zw{\"o}lfter\or Dreizehnter\or Vierzehnter\else
    Noch ein\fi
  }% \blindtext@count
  \def\blindtext@item{Listenpunkt, Stufe~\arabic{blind@levelcount}}%
}%\addto\extrasgerman
%    \end{macrocode}
%
%    \begin{macrocode}
\addto\extrasngerman{%
  \def\blindtext@heading{{\"U}berschrift auf Ebene\xspace}%
  \def\blindtext@list{Listen}%
  \def\blindtext@listEx{Beispiel einer Liste\xspace}%
}%\addto\extrasngerman
%    \end{macrocode}
%
% If the packet \Lpack{ngerman} is loaded, select the language.
%    \begin{macrocode}
\@ifpackageloaded{ngerman}{\selectlanguage{ngerman}}{}
%    \end{macrocode}
%
% \subsection{Latin Texts}
%    \begin{macro}{\blindtext@latin}
%    Define flag, so we can check, if language is defined.
%    \begin{macrocode}
\def\blindtext@latin{}
%    \end{macrocode}
%    \end{macro}
%
% I don't speak latin, but I think the classic "Lorem ipsum" should be available.
%    \begin{macrocode}
\addto\extraslatin{%
  \def\blindtext@text{%
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam
    lobortis facilisis sem. Nullam nec mi et neque pharetra
    sollicitudin. Praesent imperdiet mi nec ante. Donec ullamcorper,
    felis non sodales commodo, lectus velit ultrices augue, a
    dignissim nibh lectus placerat pede. Vivamus nunc nunc, molestie
    ut, ultricies vel, semper in, velit. Ut porttitor. Praesent in
    sapien. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
    Duis fringilla tristique neque. Sed interdum libero ut metus.
    Pellentesque placerat. Nam rutrum augue a leo. Morbi sed elit sit
    amet ante lobortis sollicitudin. Praesent blandit blandit mauris.
    Praesent lectus tellus, aliquet aliquam, luctus a, egestas a,
    turpis. Mauris lacinia lorem sit amet ipsum. Nunc quis urna dictum
    turpis accumsan semper.%
  }%\blindtext@text
}
%    \end{macrocode}
%
% The following "Latin" texts are not really correct latin.
% (I never learned Latin)
% If you want correct texts, please provide them to me.
%
%    \begin{macrocode}
\addto\extraslatin{%
  \def\blindtext@count{%
    \ifcase\value{blind@listcount}\or
      Primus\or Duo\or Tres\or Quattuor\or Quinque\or
      Sex\or Septem\or Octo\or Novem\or Decem\or
      Undecim\or Duodecim%
    \else
      Nova%
    \fi
  }% \blindtext@count
  \def\blindtext@item{, altum~\arabic{blind@levelcount}}%
}%\addto\extraslatin
%    \end{macrocode}
%
%    \begin{macrocode}
\addto\extraslatin{%
  \def\blindtext@heading{Sectio\xspace}%
  \def\blindtext@list{Caudex}%
  \def\blindtext@listEx{Exemplum caudex\xspace}%
}%\addto\extraslatin
%    \end{macrocode}
%
% \section{Some other macros}
% \changes{V1.2b}{2001/05/25}{Add macros vieltext and alotoftext}
%    \begin{macro}{\alotoftext}
%    \begin{macrocode}
\let\alotoftext=\blindtext
%    \end{macrocode}
%    \end{macro}%^^A\alotoftext
%
%
% \section{Thanks}
% Thanks to Heiko Oberdiek and Arno Trautmann for corrections (Version 1.8)
%
% \Finale
% \PrintIndex
% \end{document}
%</package>