]> git.lyx.org Git - features.git/blob - lib/examples/enumitem.lyx
- EmbeddedObjects.lyx: new chapter about objects surrounded by text
[features.git] / lib / examples / enumitem.lyx
1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
2 \lyxformat 413
3 \begin_document
4 \begin_header
5 \textclass article
6 \use_default_options false
7 \begin_modules
8 enumitem
9 \end_modules
10 \maintain_unincluded_children false
11 \language british
12 \language_package default
13 \inputencoding auto
14 \fontencoding global
15 \font_roman lmodern
16 \font_sans lmss
17 \font_typewriter lmtt
18 \font_default_family default
19 \use_non_tex_fonts false
20 \font_sc false
21 \font_osf false
22 \font_sf_scale 100
23 \font_tt_scale 100
24
25 \graphics default
26 \default_output_format default
27 \output_sync 0
28 \bibtex_command default
29 \index_command default
30 \paperfontsize default
31 \spacing single
32 \use_hyperref false
33 \pdf_bookmarks true
34 \pdf_bookmarksnumbered false
35 \pdf_bookmarksopen false
36 \pdf_bookmarksopenlevel 1
37 \pdf_breaklinks false
38 \pdf_pdfborder true
39 \pdf_colorlinks true
40 \pdf_backref section
41 \pdf_pdfusetitle true
42 \papersize a4paper
43 \use_geometry false
44 \use_amsmath 1
45 \use_esint 1
46 \use_mhchem 1
47 \use_mathdots 1
48 \cite_engine basic
49 \use_bibtopic false
50 \use_indices false
51 \paperorientation portrait
52 \suppress_date false
53 \use_refstyle 0
54 \index Index
55 \shortcut idx
56 \color #008000
57 \end_index
58 \secnumdepth 3
59 \tocdepth 3
60 \paragraph_separation indent
61 \paragraph_indentation default
62 \quotes_language english
63 \papercolumns 1
64 \papersides 1
65 \paperpagestyle default
66 \tracking_changes false
67 \output_changes false
68 \html_math_output 0
69 \html_css_as_file 0
70 \html_be_strict false
71 \end_header
72
73 \begin_body
74
75 \begin_layout Section*
76 The enumitem Module
77 \end_layout
78
79 \begin_layout Standard
80 The enumitem Module provides customisable list Styles using the 
81 \begin_inset CommandInset href
82 LatexCommand href
83 name "enumitem LaTeX package"
84 target "http://dante.ctan.org/CTAN/help/Catalogue/entries/enumitem.html"
85
86 \end_inset
87
88 .
89 \end_layout
90
91 \begin_layout Subsection*
92 Lists with optional arguments
93 \end_layout
94
95 \begin_layout Standard
96 Itemize, Enumeration, and Description lists may have an optional arguments.
97  If the optional argument contains special characters (e.
98 \begin_inset space \thinspace{}
99 \end_inset
100
101 g.
102 \begin_inset space ~
103 \end_inset
104
105 the backslash), put it in a 
106 \begin_inset ERT
107 status open
108
109 \begin_layout Plain Layout
110
111 TeX code box
112 \end_layout
113
114 \end_inset
115
116 .
117 \end_layout
118
119 \begin_layout Enumerate
120 \begin_inset Argument
121 status open
122
123 \begin_layout Plain Layout
124 \begin_inset ERT
125 status open
126
127 \begin_layout Plain Layout
128
129 labelindent=
130 \backslash
131 parindent,leftmargin=*,label=
132 \backslash
133 Roman*.,widest=IV,align=left 
134 \end_layout
135
136 \end_inset
137
138
139 \end_layout
140
141 \end_inset
142
143  An enumeration
144 \end_layout
145
146 \begin_layout Enumerate
147 with left-aligned roman
148 \end_layout
149
150 \begin_layout Enumerate
151 numbering
152 \end_layout
153
154 \begin_layout Enumerate
155 1of items.
156 \end_layout
157
158 \begin_layout Standard
159 Enumerating with 
160 \begin_inset Quotes eld
161 \end_inset
162
163 Spanish layout
164 \begin_inset Quotes erd
165 \end_inset
166
167 : italic letters followed by )
168 \end_layout
169
170 \begin_layout Enumerate
171 \begin_inset Argument
172 status open
173
174 \begin_layout Plain Layout
175 \begin_inset ERT
176 status open
177
178 \begin_layout Plain Layout
179
180 label=
181 \backslash
182 emph{
183 \backslash
184 alph*})
185 \end_layout
186
187 \end_inset
188
189
190 \end_layout
191
192 \end_inset
193
194  first item
195 \end_layout
196
197 \begin_layout Enumerate
198 second item
199 \end_layout
200
201 \begin_layout Standard
202 Enumeration starting at a given value:
203 \end_layout
204
205 \begin_layout Enumerate
206 \begin_inset Argument
207 status open
208
209 \begin_layout Plain Layout
210 start=4
211 \end_layout
212
213 \end_inset
214
215  This enumeration
216 \end_layout
217
218 \begin_layout Enumerate
219 starts at 4.
220 \end_layout
221
222 \begin_layout Standard
223 Description with emphasized (instead of bold) label and  left margin 1.5
224  em:
225 \end_layout
226
227 \begin_layout Description
228 Ionizing
229 \begin_inset space ~
230 \end_inset
231
232 radiation:
233 \begin_inset Argument
234 status open
235
236 \begin_layout Plain Layout
237 leftmargin=1.5em,
238 \begin_inset ERT
239 status open
240
241 \begin_layout Plain Layout
242
243 font=
244 \backslash
245 itshape
246 \backslash
247 mdseries
248 \end_layout
249
250 \end_inset
251
252
253 \end_layout
254
255 \end_inset
256
257  Ionizing radiation consists of particles or electromagnetic waves that
258  are energetic enough to detach electrons from atoms or molecules, therefore
259  ionizing them.
260 \end_layout
261
262 \begin_layout Description
263 Reference
264 \begin_inset space ~
265 \end_inset
266
267 counting: In computer science, reference counting is a technique of storing
268  the number of references, pointers, or handles to a resource such as an
269  object, block of memory, disk space or other resource.
270 \end_layout
271
272 \begin_layout Standard
273 More details and examples in 
274 \begin_inset CommandInset href
275 LatexCommand href
276 name "enumitem.pdf"
277 target "http://dante.ctan.org/CTAN/macros/latex/contrib/enumitem/enumitem.pdf"
278
279 \end_inset
280
281 .
282 \end_layout
283
284 \begin_layout Subsection*
285 Resume enumeration
286 \end_layout
287
288 \begin_layout Standard
289 \begin_inset Note Note
290 status open
291
292 \begin_layout Enumerate-Resume
293 Attention, if there is no previous enumeration to resume, a latex error
294  is thrown!
295 \end_layout
296
297 \end_inset
298
299
300 \end_layout
301
302 \begin_layout Standard
303 Enumerations can be resumed after intermediate paragraphs:
304 \end_layout
305
306 \begin_layout Enumerate
307 first
308 \end_layout
309
310 \begin_layout Enumerate
311 second
312 \end_layout
313
314 \begin_layout Standard
315 regular text
316 \end_layout
317
318 \begin_layout Enumerate-Resume
319 resumed (the numbering is not continued in the LyX GUI but correct in the
320  LaTeX output).
321 \end_layout
322
323 \begin_layout Standard
324 Nesting enumerations:
325 \end_layout
326
327 \begin_layout Enumerate
328 depth 1
329 \end_layout
330
331 \begin_deeper
332 \begin_layout Enumerate
333 first
334 \end_layout
335
336 \begin_deeper
337 \begin_layout Enumerate-Resume
338 resume without something to resume! (Works here.)
339 \end_layout
340
341 \end_deeper
342 \begin_layout Enumerate
343 second
344 \end_layout
345
346 \begin_deeper
347 \begin_layout Enumerate
348 with something nested inside
349 \end_layout
350
351 \end_deeper
352 \begin_layout Standard
353 regular text 
354 \end_layout
355
356 \begin_layout Enumerate-Resume
357 resumed at depth 2
358 \end_layout
359
360 \end_deeper
361 \begin_layout Standard
362 regular text outside the list
363 \end_layout
364
365 \begin_layout Subsection*
366 Compact Lists
367 \end_layout
368
369 \begin_layout Standard
370 There are keywords for more compact variants of the standard lists:
371 \end_layout
372
373 \begin_layout Itemize
374 A bullet list
375 \end_layout
376
377 \begin_layout Itemize
378 with standard spacing 
379 \end_layout
380
381 \begin_layout Standard
382 lorem ipsum
383 \end_layout
384
385 \begin_layout Itemize
386 A bullet list 
387 \begin_inset Argument
388 status open
389
390 \begin_layout Plain Layout
391 nolistsep
392 \end_layout
393
394 \end_inset
395
396
397 \end_layout
398
399 \begin_layout Itemize
400 with less 
401 \end_layout
402
403 \begin_layout Itemize
404 vertical space.
405  (nolistsep)
406 \end_layout
407
408 \begin_layout Standard
409 lorem ipsum
410 \end_layout
411
412 \begin_layout Itemize
413 A bullet list 
414 \begin_inset Argument
415 status open
416
417 \begin_layout Plain Layout
418 noitemsep
419 \end_layout
420
421 \end_inset
422
423
424 \end_layout
425
426 \begin_layout Itemize
427 with less 
428 \end_layout
429
430 \begin_layout Itemize
431 vertical space.
432  (noitemsep)
433 \end_layout
434
435 \begin_layout Standard
436 You can customize the itemset and listsep for all base lists in the LaTeX
437  preamble.
438  (Also per list type.) See 
439 \begin_inset CommandInset href
440 LatexCommand href
441 name "enumitem.pdf"
442 target "http://dante.ctan.org/CTAN/macros/latex/contrib/enumitem/enumitem.pdf"
443
444 \end_inset
445
446 .
447 \end_layout
448
449 \begin_layout Subsection*
450 Customisable LyX-List/Labeling
451 \end_layout
452
453 \begin_layout Standard
454 The LyX 
455 \begin_inset Quotes eld
456 \end_inset
457
458 List
459 \begin_inset Quotes erd
460 \end_inset
461
462  style (or KOMA script 
463 \begin_inset Quotes eld
464 \end_inset
465
466 labeling
467 \begin_inset Quotes erd
468 \end_inset
469
470 ) is re-defined on the base of enumitems 
471 \begin_inset Quotes eld
472 \end_inset
473
474 description
475 \begin_inset Quotes erd
476 \end_inset
477
478  to allow customisation like the base lists.
479 \end_layout
480
481 \begin_layout Labeling
482 \labelwidthstring 00.00.0000
483 nice description 
484 \end_layout
485
486 \begin_layout Labeling
487 \labelwidthstring 00.00.0000
488 with several items and
489 \end_layout
490
491 \begin_layout Labeling
492 \labelwidthstring 00.00.0000
493 including
494 \begin_inset space ~
495 \end_inset
496
497 one
498 \begin_inset space ~
499 \end_inset
500
501 very
502 \begin_inset space ~
503 \end_inset
504
505 long
506 \begin_inset space ~
507 \end_inset
508
509 label at last.
510  
511 \end_layout
512
513 \begin_layout Standard
514 It also takes an optional argument:
515 \end_layout
516
517 \begin_layout Labeling
518 \labelwidthstring withNN
519 nice description 
520 \begin_inset Argument
521 status open
522
523 \begin_layout Plain Layout
524 style=nextline
525 \end_layout
526
527 \end_inset
528
529
530 \end_layout
531
532 \begin_layout Labeling
533 \labelwidthstring withNN
534 with several items and
535 \end_layout
536
537 \begin_layout Labeling
538 \labelwidthstring withNN
539 including
540 \begin_inset space ~
541 \end_inset
542
543 one
544 \begin_inset space ~
545 \end_inset
546
547 very
548 \begin_inset space ~
549 \end_inset
550
551 long
552 \begin_inset space ~
553 \end_inset
554
555 label and the item content starting at the next line.
556 \end_layout
557
558 \end_body
559 \end_document