Debian Codegraph @

texmf-dist/source/latex/koma-script/doc/common-lists-en.tex

raw
1 % ======================================================================
2 % common-lists-en.tex
3 % Copyright (c) Markus Kohm, 2001-2025
4 %
5 % This file is part of the LaTeX2e KOMA-Script bundle.
6 %
7 % This work may be distributed and/or modified under the conditions of
8 % the LaTeX Project Public License, version 1.3c of the license.
9 % The latest version of this license is in
10 % http://www.latex-project.org/lppl.txt
11 % and version 1.3c or later is part of all distributions of LaTeX
12 % version 2005/12/01 or later and of this work.
13 %
14 % This work has the LPPL maintenance status "author-maintained".
15 %
16 % The Current Maintainer and author of this work is Markus Kohm.
17 %
18 % This work consists of all files listed in MANIFEST.md.
19 % ======================================================================
20 %
21 % Paragraphs that are common for several chapters of the KOMA-Script guide
22 % Maintained by Markus Kohm
23 %
24 % ======================================================================
25
26 \KOMAProvidesFile{common-lists-en.tex}
27 [$Date: 2025-06-04 18:44:23 +0200 (Mi, 04. Jun 2025) $
28 KOMA-Script guide (common paragraphs)]
29 \translator{Gernot Hassenpflug\and Markus Kohm\and Krickette Murabayashi\and
30 Karl Hagen}
31
32 \section{Lists}
33 \seclabel{lists}%
34 \BeginIndexGroup
35 \BeginIndex{}{lists}%
36
37 \IfThisCommonFirstRun{}{%
38 The information in \autoref{sec:\ThisCommonFirstLabelBase.lists} applies
39 equally to this chapter. So if you have already read and understood
40 \autoref{sec:\ThisCommonFirstLabelBase.lists}, you can skip ahead to
41 \autoref{sec:\ThisCommonLabelBase.lists.next},
42 \autopageref{sec:\ThisCommonLabelBase.lists.next}.%
43 \IfThisCommonLabelBaseOneOf{scrextend,scrlttr2}{ %
44 \IfThisCommonLabelBase{scrlttr2}{%
45 The \Package{scrletter}\OnlyAt{\Package{scrletter}} package does not
46 define any list environments itself but leaves them to the class
47 used. If this is not a \KOMAScript{} class, it will load
48 \hyperref[cha:scrextend]{\Package{scrextend}}\IndexPackage{scrextend}%
49 \important{\hyperref[cha:scrextend]{\Package{scrextend}}}. %
50 }{}%
51 However, the \Package{scrextend} package only defines the
52 \DescRef{\ThisCommonLabelBase.env.labeling},
53 \DescRef{\ThisCommonLabelBase.env.addmargin}, and
54 \DescRef{\ThisCommonLabelBase.env.addmargin*} environments. All other list
55 environments are left to the responsibility of the class used.%
56 }{}%
57 }
58
59 \IfThisCommonLabelBase{scrextend}{}{%
60 Both {\LaTeX} and the standard classes\textnote{\KOMAScript{} vs. standard
61 classes} offer different environments for lists. Naturally, {\KOMAScript}
62 also offers all these environments, though slightly modified or extended in
63 some cases. In general, all lists\,---\,even those of different
64 kinds\,---\,can be nested up to four levels deep. From a typographical view,
65 anything more would make no sense, as lists of more than three levels cannot
66 easily be apprehended. In such cases, I recommend\textnote{Hint!} that you
67 split a large list into several smaller ones.%
68 }
69
70 \IfThisCommonFirstRun{}{%
71 Because lists are standard elements of \LaTeX{}, examples have been omitted
72 in this section. Nevertheless, you can find examples either in
73 \autoref{sec:\ThisCommonFirstLabelBase.lists},
74 \autopageref{sec:\ThisCommonFirstLabelBase.lists} or in any \LaTeX{}
75 tutorial.%
76 }
77
78 \IfThisCommonLabelBase{scrextend}{\iffalse}{\csname iftrue\endcsname}
79 \begin{Declaration}
80 \begin{Environment}{itemize}
81 \begin{Body}
82 \Macro{item} \dots
83 \BodyDots
84 \end{Body}
85 \end{Environment}
86 \Macro{labelitemi}
87 \Macro{labelitemii}
88 \Macro{labelitemiii}
89 \Macro{labelitemiv}
90 \end{Declaration}%
91 \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{}%
92 The simplest form of a list is the itemized list\textnote{itemized list},
93 \Environment{itemize}. %
94 \iffalse % Umbruckoptimierungstext
95 The users of a certain disliked word processing package often refer to this
96 form of a list as \emph{bullet points}. Presumably, they cannot imagine
97 that, depending on the level, a symbol other than a large dot could be used
98 to introduce each point. %
99 \fi%
100 Depending on the level, \KOMAScript{} classes use the following marks:
101 ``{\labelitemi}'', ``{\labelitemii}'', ``{\labelitemiii}'', and
102 ``{\labelitemiv}''. The definition of these symbols is specified in the
103 macros \Macro{labelitemi}, \Macro{labelitemii}, \Macro{labelitemiii}, and
104 \Macro{labelitemiv}, all of which you can redefine using
105 \Macro{renewcommand}.
106 \BeginIndex{FontElement}{itemizelabel}\LabelFontElement{itemizelabel}%
107 \BeginIndex{FontElement}{labelitemi}\LabelFontElement{labelitemi}%
108 \BeginIndex{FontElement}{labelitemii}\LabelFontElement{labelitemii}%
109 \BeginIndex{FontElement}{labelitemiii}\LabelFontElement{labelitemiii}%
110 \BeginIndex{FontElement}{labelitemiv}\LabelFontElement{labelitemiv}%
111 With the \KOMAScript{} classes the
112 fonts\Index{font>style}\ChangedAt{v3.33}{\Class{scrbook}\and
113 \Class{scrreprt}\and \Class{scrartcl}} used to format the symbols for the
114 different levels can be changed using
115 \DescRef{\ThisCommonLabelBase.cmd.setkomafont} and
116 \DescRef{\ThisCommonLabelBase.cmd.addtokomafont} (see
117 \autoref{sec:\ThisCommonLabelBase.textmarkup},
118 \DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}) for the elements
119 \FontElement{labelitemi}\important{\FontElement{labelitemi}},
120 \FontElement{labelitemii}\important{\FontElement{labelitemii}},
121 \FontElement{labelitemiii}\important{\FontElement{labelitemiii}} and
122 \FontElement{labelitemiv}\important{\FontElement{labelitemiv}}. By default
123 these all use the font setting for element
124 \FontElement{itemizelabel}\important{\FontElement{itemizelabel}}. Only
125 element \FontElement{labelitemii} additionally uses \Macro{bfseries}. The
126 default of \FontElement{itemizelabel} itself is \Macro{normalfont}.%
127 \EndIndex{FontElement}{labelitemiv}%
128 \EndIndex{FontElement}{labelitemiii}%
129 \EndIndex{FontElement}{labelitemii}%
130 \EndIndex{FontElement}{labelitemi}%
131 \EndIndex{FontElement}{itemizelabel}
132 Every item is introduced with \Macro{item}.%
133 \IfThisCommonFirstRun{\iftrue}{\csname iffalse\endcsname}
134 \begin{Example}
135 \phantomsection\xmpllabel{env.itemize}%
136 You have a simple list which is nested in several levels. You write,
137 for example:
138 \begin{lstcode}
139 \minisec{Vehicles in the game}
140 \begin{itemize}
141 \item aeroplanes
142 \begin{itemize}
143 \item biplane
144 \item transport planes
145 \begin{itemize}
146 \item single-engine
147 \begin{itemize}
148 \item jet propelled
149 \item propeller driven
150 \end{itemize}
151 \item twin-engine
152 \begin{itemize}
153 \item jet propelled
154 \item propeller driven
155 \end{itemize}
156 \end{itemize}
157 \item helicopters
158 \end{itemize}
159 \item motorcycles
160 \item automobiles
161 \begin{itemize}
162 \item racing cars
163 \item passenger cars
164 \item lorries
165 \end{itemize}
166 \item bicycles
167 \end{itemize}
168 \end{lstcode}
169 As output you get:
170 \begin{ShowOutput}[\baselineskip]
171 \minisec{Vehicles in the game}
172 \begin{itemize}
173 \item aeroplanes
174 \begin{itemize}
175 \item biplanes
176 \item transport planes
177 \begin{itemize}
178 \item single-engine
179 \begin{itemize}
180 \item jet-propelled
181 \item propeller-driven
182 \end{itemize}
183 \item twin-engine
184 \begin{itemize}
185 \item jet propelled
186 \item propeller driven
187 \end{itemize}
188 \end{itemize}
189 \item helicopters
190 \end{itemize}
191 \item motorcycles
192 % \begin{itemize}
193 % \item historically accurate
194 % \item futuristic, not real
195 % \end{itemize}
196 \item automobiles
197 \begin{itemize}
198 \item racing cars
199 \item passenger cars
200 \item lorries
201 \end{itemize}
202 \item bicycles
203 \end{itemize}
204 \end{ShowOutput}
205 \end{Example}
206 \fi
207 %
208 \EndIndexGroup
209
210
211 \begin{Declaration}
212 \begin{Environment}{enumerate}\labelsuffix[enumerate]
213 \begin{Body}
214 \Macro{item} \dots
215 \BodyDots
216 \end{Body}
217 \end{Environment}
218 \Macro{theenumi}%
219 \Macro{theenumii}%
220 \Macro{theenumiii}%
221 \Macro{theenumiv}%
222 \Macro{labelenumi}%
223 \Macro{labelenumii}%
224 \Macro{labelenumiii}%
225 \Macro{labelenumiv}
226 \end{Declaration}%
227 \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{}The numbered
228 list\textnote{numbered list} is also very common and already provided by the
229 {\LaTeX} kernel. The numbering\Index{numbering} differs according to the
230 level, with Arabic numbers, small letters, small Roman numerals, and capital
231 letters, respectively. The style of numbering is defined with the macros
232 \Macro{theenumi} down to \Macro{theenumiv}. The output format is determined
233 by the macros \Macro{labelenumi} to \Macro{labelenumiv}. While the small
234 letter of the second level is followed by a right parenthesis, the values of
235 all other levels are followed by a dot.
236 \BeginIndex{FontElement}{enumeratelabel}\LabelFontElement{enumeratelabel}%
237 \BeginIndex{FontElement}{labelenumi}\LabelFontElement{labelenumi}%
238 \BeginIndex{FontElement}{labelenumii}\LabelFontElement{labelenumii}%
239 \BeginIndex{FontElement}{labelenumiii}\LabelFontElement{labelenumiii}%
240 \BeginIndex{FontElement}{labelenumiv}\LabelFontElement{labelenumiv}%
241 With the \KOMAScript{} classes the
242 fonts\Index{font>style}\IfThisCommonLabelBase{scrlttr2}{\ChangedAt{v3.44}{\Class{scrlttr2}\and
243 \Package{scrletter}}}{\ChangedAt{v3.44}{\Class{scrbook}\and
244 \Class{scrreprt}\and \Class{scrartcl}}} used to format the numbers
245 respective labels for the different levels can be changed using
246 \DescRef{\ThisCommonLabelBase.cmd.setkomafont} and
247 \DescRef{\ThisCommonLabelBase.cmd.addtokomafont} (see
248 \autoref{sec:\ThisCommonLabelBase.textmarkup},
249 \DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}) for the elements
250 \FontElement{labelenumi}\important{\FontElement{labelenumi}},
251 \FontElement{labelenumii}\important{\FontElement{labelenumii}} and
252 \FontElement{labelenumiii}\important{\FontElement{labelenumiii}} and
253 \FontElement{labelenumiv}\important{\FontElement{labelenumiv}}. By default
254 these all use the font setting for element
255 \FontElement{enumeratelabel}\important{\FontElement{enumeratelabel}}. The
256 default of \FontElement{enumeratelabel} itself is empty, which means no
257 change of the current font.%
258 \EndIndex{FontElement}{labelenumiv}%
259 \EndIndex{FontElement}{labelenumiii}%
260 \EndIndex{FontElement}{labelenumii}%
261 \EndIndex{FontElement}{labelenumi}%
262 \EndIndex{FontElement}{enumeratelabel} Every item is introduced with
263 \Macro{item}.%
264 \IfThisCommonFirstRun{\iftrue}{\csname iffalse\endcsname}
265 \begin{Example}
266 \phantomsection\xmpllabel{env.enumerate}%
267 Let's shorten the previous example and replace the
268 \DescRef{\ThisCommonLabelBase.env.itemize} environment by an
269 \Environment{enumerate} environment:
270 \begin{ShowOutput}[\baselineskip]
271 \minisec{Vehicles in the game}
272 \begin{enumerate}
273 \item aeroplanes
274 \begin{enumerate}
275 \item biplanes
276 \item transport planes
277 \begin{enumerate}
278 \item single-engine
279 \begin{enumerate}
280 \item jet-propelled\label{xmp:maincls.jets}
281 \item propeller-driven
282 \end{enumerate}
283 \item twin-engine
284 \end{enumerate}
285 % \item helicopters
286 \end{enumerate}
287 \item motorcycles
288 \begin{enumerate}
289 \item historically accurate
290 \item futuristic, not real
291 \end{enumerate}
292 %\item automobiles
293 % \begin{enumerate}
294 % \item racing cars
295 % \item private cars
296 % \item lorries
297 % \end{enumerate}
298 %\item bicycles
299 \end{enumerate}
300 \end{ShowOutput}
301 Within the list, you can set labels in the normal way with
302 \Macro{label} and then reference then with \Macro{ref}.
303 In the example above, a label was set after the jet-propelled,
304 single-engine transport planes with
305 ``\Macro{label}\PParameter{xmp:jets}''. The \Macro{ref} value is then
306 ``\ref{xmp:maincls.jets}''.
307 \end{Example}
308 \fi%
309 %
310 \EndIndexGroup
311
312
313 \begin{Declaration}
314 \begin{Environment}{description}\labelsuffix[description]
315 \begin{Body}
316 \Macro{item}\OParameter{keyword} \dots
317 \BodyDots
318 \end{Body}
319 \end{Environment}
320 \end{Declaration}%
321 \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{}Another list
322 form is the description list\textnote{description list}. It primarily serves
323 to describe individual items or keywords. The item itself is specified as an
324 optional parameter in \Macro{item}. %
325 \BeginIndex{FontElement}{descriptionlabel}%
326 \LabelFontElement{descriptionlabel}%
327 The font\Index{font>style}\ChangedAt{v2.8p}{%
328 \Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}%
329 \ used to format the keyword can be changed with the
330 \DescRef{\ThisCommonLabelBase.cmd.setkomafont} and
331 \DescRef{\ThisCommonLabelBase.cmd.addtokomafont} commands (see
332 \autoref{sec:\ThisCommonLabelBase.textmarkup},
333 \DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}) for the
334 \FontElement{descriptionlabel}\important{\FontElement{descriptionlabel}}
335 element (see \autoref{tab:\ThisCommonLabelBase.fontelements},
336 \autopageref{tab:\ThisCommonLabelBase.fontelements}). The default is
337 \IfThisCommonLabelBase{maincls}{%
338 \ChangedAt{v3.39}{\Class{scrbook}\and \Class{scrreprt}\and
339 \Class{scrartcl}}%
340 }{%
341 \IfThisCommonLabelBase{scrextend}{%
342 \ChangedAt{v3.39}{\Package{screxend}}%
343 }{%
344 \IfThisCommonLabelBase{scrlttr2}{%
345 \ChangedAt{v3.39}{\Class{scrlttr2}}%
346 }{}%
347 }%
348 }%
349 \DescRef{\LabelBase.cmd.maybesffamily}\IndexCmd{maybesffamily}\linebreak[1]%
350 \Macro{bfseries}.%
351 \IfThisCommonFirstRun{\iftrue}{\csname iffalse\endcsname}
352 \begin{Example}
353 \phantomsection\xmpllabel{env.description}%
354 You want the keywords to be printed bold and in the normal font instead
355 of bold and sans serif. Using
356 \begin{lstcode}
357 \setkomafont{descriptionlabel}{\normalfont\bfseries}
358 \end{lstcode}
359 you redefine the font accordingly.
360
361 An example for a description list is the output of the page styles
362 listed in \autoref{sec:maincls.pagestyle}. The (abbreviated) source is:
363 \begin{lstcode}
364 \begin{description}
365 \item[empty] is the page style without any header or footer.
366 \item[plain] is the page style without headings.
367 \item[headings] is the page style with running headings.
368 \item[myheadings] is the page style for manual headings.
369 \end{description}
370 \end{lstcode}
371 This gives:
372 \begin{ShowOutput}
373 \begin{description}
374 \item[empty] is the page style without any header or footer.
375 \item[plain] is the page style without headings.
376 \item[headings] is the page style with running headings.
377 \item[myheadings] is the page style for manual headings.
378 \end{description}
379 \end{ShowOutput}
380 \end{Example}
381 \fi%
382 %
383 \EndIndexGroup%
384 \fi
385
386 \begin{Declaration}
387 \begin{Environment}{labeling}\OParameter{delimiter}
388 \Parameter{widest pattern}
389 \labelsuffix[labeling]
390 \begin{Body}
391 \Macro{item}\OParameter{keyword}\dots
392 \BodyDots
393 \end{Body}
394 \end{Environment}
395 \end{Declaration}%
396 Another form of description list\textnote{alternative description list} is
397 only available in the {\KOMAScript} classes%
398 \IfThisCommonLabelBase{scrextend}{ and \Package{scrextend} }{%
399 \IfThisCommonLabelBase{scrlttr2}{ and
400 \hyperref[cha:scrextend]{\Package{scrextend}}}{}%
401 }%
402 : the \Environment{labeling} environment. Unlike
403 \IfThisCommonLabelBase{scrextend}{%
404 \DescRef{\ThisCommonFirstLabelBase.env.description}%
405 }{%
406 the \DescRef{\ThisCommonLabelBase.env.description} described above%
407 }, you can specify a pattern for \Environment{labeling} whose length
408 determines the indentation of all items. Furthermore, you can put an optional
409 \PName{delimiter} between the item and its description. %
410 \BeginIndexGroup
411 \BeginIndex{FontElement}{labelinglabel}\LabelFontElement{labelinglabel}%
412 \BeginIndex{FontElement}{labelingseparator}%
413 \LabelFontElement{labelingseparator}%
414 The font\Index{font>style}%
415 \IfThisCommonLabelBase{maincls}{%
416 \ChangedAt{v3.02}{\Class{scrbook}\and \Class{scrreprt}\and
417 \Class{scrartcl}}%
418 }{%
419 \IfThisCommonLabelBase{scrlttr2}{%
420 \ChangedAt{v3.02}{\Class{scrlttr2}}%
421 }{%
422 \IfThisCommonLabelBase{scrextend}{%
423 \ChangedAt{v3.02}{\Package{scrextend}}%
424 }{\InternalCommonFileUsageError}%
425 }%
426 } used to format the item and the separator can be changed with the
427 \DescRef{\ThisCommonLabelBase.cmd.setkomafont} and
428 \DescRef{\ThisCommonLabelBase.cmd.addtokomafont} commands (see
429 \autoref{sec:\ThisCommonLabelBase.textmarkup},
430 \DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}) for the element
431 \FontElement{labelinglabel} and \FontElement{labelingseparator} (see
432 \autoref{tab:\ThisCommonLabelBase.fontelements},
433 \autopageref{tab:\ThisCommonLabelBase.fontelements}).
434 \IfThisCommonFirstRun{\iftrue}{\par\csname iffalse\endcsname}
435 \begin{Example}
436 \phantomsection\xmpllabel{env.labeling}%
437 \IfThisCommonLabelBase{scrextend}{%
438 A small example of a list like this can be written as follows:%
439 }{%
440 Slightly changing the example from the
441 \DescRef{\ThisCommonLabelBase.env.description} environment, we could
442 write the following:%
443 }%
444 \begin{lstcode}
445 \setkomafont{labelinglabel}{\ttfamily}
446 \setkomafont{labelingseparator}{\normalfont}
447 \begin{labeling}[~--]{myheadings}
448 \item[empty]
449 Page style without header or footer
450 \item[plain]
451 Page style for chapter beginnings without headings
452 \item[headings]
453 Page style for running headings
454 \item[myheadings]
455 Page style for manual headings
456 \end{labeling}
457 \end{lstcode}
458 The result is this:
459 \begin{ShowOutput}
460 \setkomafont{labelinglabel}{\ttfamily}
461 \setkomafont{labelingseparator}{\normalfont}
462 \begin{labeling}[~--]{myheadings}
463 \item[empty]
464 Page style without header or footer
465 \item[plain]
466 Page style for chapter beginnings without headings
467 \item[headings]
468 Page style for running headings
469 \item[myheadings]
470 Page style for manual headings
471 \end{labeling}
472 \end{ShowOutput}
473 As this example shows, you can set a font-changing command in the usual
474 way. But if you do not want the font of the separator to be changed in the
475 same way as the font of the label, you have to set the font of the
476 separator as well.
477 \end{Example}
478 \fi%
479 \EndIndexGroup
480 Originally, this environment was implemented for things like ``Premise,
481 Evidence, Proof'', or ``Given, Find, Solution'' that are often used in
482 lecture handouts. These days, however, the environment has very different
483 applications. For example, the environment for examples in this guide was
484 defined with the \Environment{labeling} environment.%
485 %
486 \EndIndexGroup
487
488
489 \IfThisCommonLabelBase{scrextend}{\iffalse}{\csname iftrue\endcsname}
490 \begin{Declaration}
491 \begin{Environment}{verse}\end{Environment}
492 \end{Declaration}%
493 \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{} The
494 \Environment{verse} environment\textnote{verse} is not normally perceived
495 as a list environment because you do not work with \Macro{item} commands.
496 Instead, fixed line breaks are used within the \Environment{flushleft}
497 environment. Internally, however, both the standard classes as well as
498 {\KOMAScript} implement it as a list environment.
499
500 In general, the \Environment{verse} environment is used for
501 poetry\Index{poetry}. Lines are indented both left and right. Individual
502 lines of verse are ended by a fixed line break: \verb|\\|. Verses are set as
503 paragraphs, separated by an empty line. Often also
504 \Macro{medskip}\IndexCmd{medskip} or \Macro{bigskip}\IndexCmd{bigskip} is
505 used instead. To avoid a page break at the end of a line of verse you can,
506 as usual, insert \verb|\\*| instead of \verb|\\|.
507 \IfThisCommonFirstRun{\iftrue}{\csname iffalse\endcsname}
508 \begin{Example}
509 \phantomsection\xmpllabel{env.verse}%
510 \iffalse
511 As an example, the first lines of ``Little Red Riding Hood and the
512 Wolf'' by Roald Dahl:
513 \begin{lstcode}
514 \begin{verse}
515 As soon as Wolf began to feel\\*
516 that he would like a decent meal,\\*
517 He went and knocked on Grandma's door.\\*
518 When Grandma opened it, she saw\\*
519 The sharp white teeth, the horrid grin,\\*
520 And Wolfie said, `May I come in?'
521 \end{verse}
522 \end{lstcode}
523 The result is as follows:
524 \begin{ShowOutput}
525 \begin{verse}
526 As soon as Wolf began to feel\\*
527 That he would like a decent meal,\\*
528 He went and knocked on Grandma's door.\\*
529 When Grandma opened it, she saw\\*
530 The sharp white teeth, the horrid grin,\\*
531 And Wolfie said, `May I come in?'
532 \end{verse}
533 \end{ShowOutput}
534 \else
535 As an example, Emma Lazarus's sonnet from the pedestal of Liberty
536 Enlightening the World\footnote{The lines from Roald Dahl's poem
537 ``Little Red Riding Hood and the Wolf'', which was used in former
538 releases, has been replaced, because in these times certain
539 politicians around the world really seem to need ``The New
540 Colossus'' as urgent reminder.}:
541 \begin{lstcode}
542 \begin{verse}
543 Not like the brazen giant of Greek fame\\*
544 With conquering limbs astride from land to land\\*
545 Here at our sea-washed, sunset gates shall stand\\*
546 A mighty woman with a torch, whose flame\\*
547 Is the imprisoned lightning, and her name\\*
548 Mother of Exiles. From her beacon-hand\\*
549 Glows world-wide welcome; her mild eyes command\\*
550 The air-bridged harbor that twin cities frame.\\*
551 ``Keep, ancient lands, your storied pomp!'' cries she\\*
552 With silent lips. ``Give me your tired, your poor,\\*
553 Your huddled masses yearning to breathe free,\\*
554 The wretched refuse of your teeming shore.\\*
555 Send these, the homeless, tempest-tossed to me:\\*
556 I lift my lamp beside the golden door.''
557 \end{verse}
558 \end{lstcode}
559 The result is as follows:
560 \begin{ShowOutput}
561 \begin{verse}
562 Not like the brazen giant of Greek fame\\*
563 With conquering limbs astride from land to land\\*
564 Here at our sea-washed, sunset gates shall stand\\*
565 A mighty woman with a torch, whose flame\\*
566 Is the imprisoned lightning, and her name\\*
567 Mother of Exiles. From her beacon-hand\\*
568 Glows world-wide welcome; her mild eyes command\\*
569 The air-bridged harbor that twin cities frame.\\*
570 ``Keep, ancient lands, your storied pomp!'' cries she\\*
571 With silent lips. ``Give me your tired, your poor,\\*
572 Your huddled masses yearning to breathe free,\\*
573 The wretched refuse of your teeming shore.\\*
574 Send these, the homeless, tempest-tossed to me:\\*
575 I lift my lamp beside the golden door.''
576 \end{verse}
577 \end{ShowOutput}
578 \fi
579 However, if you have very long lines of verse where a line
580 break occurs within a line of verse:
581 \begin{lstcode}
582 \begin{verse}
583 Both the philosopher and the house-owner
584 always have something to repair.\\*
585 \bigskip
586 Don't trust a man, my son, who tells you
587 that he has never lied.
588 \end{verse}
589 \end{lstcode}
590 \begin{ShowOutput}
591 \begin{verse}
592 Both the philosopher and the house-owner always have something to
593 repair.\\
594 \bigskip Don't trust a man, my son, who tells you that he has never
595 lied.
596 \end{verse}
597 \end{ShowOutput}
598 in this case \verb|\\*| can not prevent a page break occurring within a
599 verse at such a line break. To prevent such a page break, a change of
600 \Macro{interlinepenalty}\IndexCmd{interlinepenalty} would have to be
601 inserted at the beginning of the environment:
602 \begin{lstcode}
603 \begin{verse}\interlinepenalty 10000
604 Both the philosopher and the house-owner
605 always have something to repair.\\
606 \bigskip
607 Don't trust a man, my son, who tells you
608 that he has never lied.
609 \end{verse}
610 \end{lstcode}
611 \iftrue% Umbruchkorrekturtext
612 Here are two sayings that should always be considered when confronted
613 with seemingly strange questions about {\LaTeX} or its accompanying
614 explanations:
615 \begin{lstcode}
616 \begin{verse}
617 A little learning is a dangerous thing.\\*
618 Drink deep, or taste not the Pierian Spring;\\
619 \bigskip
620 Our judgments, like our watches, none\\*
621 go just alike, yet each believes his own.
622 \end{verse}
623 \end{lstcode}
624 \begin{ShowOutput}
625 \iffree{}{\vskip-.8\baselineskip}% Umbruchkorrektur
626 \begin{verse}
627 A little learning is a dangerous thing.\\*
628 Drink deep, or taste not the Pierian Spring;\\
629 \bigskip
630 Our judgments, like our watches, none\\*
631 go just alike, yet each believes his own.
632 \end{verse}
633 \end{ShowOutput}
634 \fi
635 Incidentally, \Macro{bigskip} was used in these examples to separate two
636 sayings.
637 \end{Example}
638 \fi
639 %
640 \EndIndexGroup
641
642 \iffalse% Umbruchkorrekturvarianten
643 \begin{Declaration}
644 \begin{Environment}{quote}\end{Environment}
645 \end{Declaration}%
646 \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{}This is
647 internally also a list environment\textnote{block quote with paragraph
648 spacing} and can be found both in the standard classes and in
649 {\KOMAScript}. The content of the environment is set fully justified.
650 The environment is often used to format longer quotes\Index{quotes}.
651 Paragraphs within the environment are distinguished with vertical space.%
652 \EndIndexGroup
653
654 \begin{Declaration}
655 \begin{Environment}{quotation}\end{Environment}
656 \end{Declaration}%
657 \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{}This
658 environment\textnote{block quote with paragraph indent} is comparable to
659 \DescRef{\ThisCommonLabelBase.env.quote}. While
660 \DescRef{\ThisCommonLabelBase.env.quote} paragraphs are indicated by
661 vertical spacing, \Environment{quotation} indents the first line of each
662 paragraph horizontally. This also applies to the first paragraph of a
663 \Environment{quotation} environment. If you want to prevent the
664 indentation there, you must precede it with the
665 \Macro{noindent}\IndexCmd{noindent} command.%
666 \else
667 \begin{Declaration}
668 \begin{Environment}{quote}\end{Environment}
669 \begin{Environment}{quotation}\end{Environment}
670 \end{Declaration}%
671 \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{} These two
672 environments\textnote{block quotes} are also set internally as list
673 environments and can be found in both the standard and the {\KOMAScript}
674 classes. Both environments use justified text which is indented on both
675 the left and the right side. Often they are used to separate longer
676 quotations\Index{quotations} from the main text. The difference between
677 the two lies in in the manner in which paragraphs are typeset. While
678 \Environment{quote} paragraphs are distinguished by vertical space, in
679 \Environment{quotation} paragraphs, the first line is indented. This also
680 applies to the first line of a \Environment{quotation}
681 environment% Umbruchkorrektur
682 \IfThisCommonLabelBase{maincls}{%
683 , unless it is preceded by \Macro{noindent}\IndexCmd{noindent}.%
684 }{%
685 \IfThisCommonLabelBase{scrlttr2}{%
686 . If you want to prevent the indentation there, you must precede it
687 with the \Macro{noindent} command\IndexCmd{noindent}.%
688 }{\InternalCommonFileUsageError}%
689 }%
690 \fi % Umbruchkorrekturvarianten
691 \IfThisCommonFirstRun{\iftrue}{\csname iffalse\endcsname}
692 \begin{Example}
693 \phantomsection\xmpllabel{env.quote}%
694 You want to highlight a short anecdote. You write the following
695 \Environment{quotation} environment for this:%
696 \begin{lstcode}
697 A small example for a short anecdote:
698 \begin{quotation}
699 The old year was turning brown; the West Wind was
700 calling;
701
702 Tom caught the beechen leaf in the forest falling.
703 ``I've caught the happy day blown me by the breezes!
704 Why wait till morrow-year? I'll take it when me pleases.
705 This I'll mend my boat and journey as it chances
706 west down the withy-stream, following my fancies!''
707
708 Little Bird sat on twig. ``Whillo, Tom! I heed you.
709 I've a guess, I've a guess where your fancies lead you.
710 Shall I go, shall I go, bring him word to meet you?''
711 \end{quotation}
712 \end{lstcode}
713 The result is:
714 \begin{ShowOutput}
715 A small example for a short anecdote:
716 \begin{quotation}
717 The old year was turning brown; the West Wind was
718 calling;
719
720 Tom caught the beechen leaf in the forest falling.
721 ``I've caught the happy day blown me by the breezes!
722 Why wait till morrow-year? I'll take it when me pleases.
723 This I'll mend my boat and journey as it chances
724 west down the withy-stream, following my fancies!''
725
726 Little Bird sat on twig. ``Whillo, Tom! I heed you.
727 I've a guess, I've a guess where your fancies lead you.
728 Shall I go, shall I go, bring him word to meet you?''
729 \end{quotation}
730 \end{ShowOutput}
731 %
732 Using a \Environment{quote} environment instead you get:
733 %
734 \begin{ShowOutput}
735 A small example for a short anecdote:
736 \begin{quote}\setlength{\parskip}{4pt plus 2pt minus 2pt}
737 The old year was turning brown; the West Wind was
738 calling;
739
740 Tom caught the beechen leaf in the forest falling.
741 ``I've caught the happy day blown me by the breezes!
742 Why wait till morrow-year? I'll take it when me pleases.
743 This I'll mend my boat and journey as it chances
744 west down the withy-stream, following my fancies!''
745
746 Little Bird sat on twig. ``Whillo, Tom! I heed you.
747 I've a guess, I've a guess where your fancies lead you.
748 Shall I go, shall I go, bring him word to meet you?''
749 \end{quote}
750 \end{ShowOutput}
751 %
752 \end{Example}
753 \fi
754 %
755 \EndIndexGroup
756 \fi
757
758 \begin{Declaration}
759 \begin{Environment}{addmargin}
760 \OParameter{left indentation}\Parameter{indentation}
761 \end{Environment}
762 \begin{Environment}{addmargin*}
763 \OParameter{inner indentation}\Parameter{indentation}
764 \end{Environment}
765 \end{Declaration}
766 Like \IfThisCommonLabelBase{scrextend}{%
767 \DescRef{\ThisCommonFirstLabelBase.env.quote} and
768 \DescRef{\ThisCommonFirstLabelBase.env.quotation}, which are available in
769 the standard and the \KOMAScript{} classes}{%
770 \DescRef{\ThisCommonLabelBase.env.quote} and
771 \DescRef{\ThisCommonLabelBase.env.quotation}%
772 }, the \Environment{addmargin} environment changes the margin\Index{margin}.
773 However, unlike the first two environments, \Environment{addmargin} lets the
774 user change the width of the indentation. Apart from this change, this
775 environment does not change the indentation of the first line nor the vertical
776 spacing between paragraphs.
777
778 If only the obligatory argument \PName{indentation} is given, both the left
779 and right margin are expanded by this value. If the optional argument
780 \PName{left indentation} is given as well, then the value \PName{left
781 indentation} is used for the left margin instead of \PName{indentation}.
782
783 The starred variant \Environment{addmargin*}%
784 \important{\Environment{addmargin*}} differs from the normal version only in
785 the two-sided mode. Furthermore, the difference only occurs if the optional
786 argument \PName{inner indentation} is used. In this case, the value of
787 \PName{inner indentation} is added to the normal inner indentation. For
788 right-hand pages this is the left margin; for left-hand pages, the right
789 margin. Then the value of \PName{indentation} determines the width of the
790 opposite margin.
791
792 Both versions of this environment allow negative values for all parameters.
793 \IfThisCommonLabelBase{scrextend}{%
794 The environment then protrudes into the margin accordingly.%
795 }{%
796 This can be done so that the environment protrudes into the margin.%
797 }%
798 \IfThisCommonFirstRun{\iftrue}{\csname iffalse\endcsname}
799 \begin{Example}
800 \phantomsection\xmpllabel{env.addmargin}%
801 \begin{lstcode}
802 \newenvironment{SourceCodeFrame}{%
803 \begin{addmargin*}[1em]{-1em}%
804 \begin{minipage}{\linewidth}%
805 \rule{\linewidth}{2pt}%
806 }{%
807 \rule[.25\baselineskip]{\linewidth}{2pt}%
808 \end{minipage}%
809 \end{addmargin*}%
810 }
811 \end{lstcode}
812 If you now put your source code in such an environment, it will show
813 up as:
814 \begin{ShowOutput}
815 \newenvironment{SourceCodeFrame}{%
816 \begin{addmargin*}[1em]{-1em}%
817 \begin{minipage}{\linewidth}%
818 \rule{\linewidth}{2pt}%
819 }{%
820 \rule[.25\baselineskip]{\linewidth}{2pt}%
821 \end{minipage}%
822 \end{addmargin*}%
823 }
824 You define the following environment:
825 \begin{SourceCodeFrame}
826 \begin{lstcode}
827 \newenvironment{\SourceCodeFrame}{%
828 \begin{addmargin*}[1em]{-1em}%
829 \begin{minipage}{\linewidth}%
830 \rule{\linewidth}{2pt}%
831 }{%
832 \rule[.25\baselineskip]{\linewidth}{2pt}%
833 \end{minipage}%
834 \end{addmargin*}%
835 }
836 \end{lstcode}
837 \end{SourceCodeFrame}
838 This may be feasible or not. In any case, it shows the usage of this
839 environment.
840 \end{ShowOutput}
841 The optional argument of the \Environment{addmargin*} environment
842 makes sure that the inner margin is extended by 1\Unit{em}. In turn
843 the outer margin is decreased by 1\Unit{em}. The result is a shift
844 by 1\Unit{em} to the outside. Instead of \PValue{1em}, you can of
845 course use a length, for example, \PValue{2\Macro{parindent}}.
846 \end{Example}
847 \fi%
848
849 Whether a page is going to be on the left or right side of the book cannot be
850 determined reliably on the first {\LaTeX} run. For details please refer to
851 the explanation of the commands
852 \DescRef{\ThisCommonLabelBase.cmd.Ifthispageodd}
853 (\autoref{sec:\ThisCommonLabelBase.oddOrEven},
854 \DescPageRef{\ThisCommonLabelBase.cmd.Ifthispageodd}) and
855 \iffree{\Macro{ifthispagewasodd}}{%
856 \DescRef{maincls-experts.cmd.ifthispagewasodd}}
857 (\autoref{sec:maincls-experts.addInfos}\iffree{}{,
858 \DescPageRef{maincls-experts.cmd.Ifthispageodd}}).
859 \IfThisCommonLabelBase{scrlttr2}{}{%
860 \begin{Explain}
861 The interplay of environments such as lists and paragraphs gives rise to
862 frequent questions. Therefore, you can find further explanation in the
863 description of the \Option{parskip} option in
864 \autoref{sec:maincls-experts.addInfos}\iffree{}{,
865 \DescPageRef{maincls-experts.option.parskip}. Also in the expert section, in
866 \autoref{sec:maincls-experts.addInfos},
867 \DescPageRef{maincls-experts.env.addmargin*}, you can find additional
868 information about page breaks inside \Environment{addmargin*}}.%
869 \end{Explain}}%
870 %
871 \EndIndexGroup
872 %
873 \EndIndexGroup
874
875 %%% Local Variables:
876 %%% mode: latex
877 %%% TeX-master: "scrguide-en.tex"
878 %%% coding: utf-8
879 %%% ispell-local-dictionary: "en_GB"
880 %%% eval: (flyspell-mode 1)
881 %%% End: