]> git.lyx.org Git - lyx.git/blob - lib/examples/docbook_article.lyx
Update docs to latest format for 2.2.0alpha2
[lyx.git] / lib / examples / docbook_article.lyx
1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
2 \lyxformat 503
3 \begin_document
4 \begin_header
5 \origin /systemlyxdir/examples/
6 \textclass docbook
7 \use_default_options false
8 \maintain_unincluded_children false
9 \language english
10 \language_package default
11 \inputencoding default
12 \fontencoding global
13 \font_roman "default" "default"
14 \font_sans "default" "default"
15 \font_typewriter "default" "default"
16 \font_math "auto" "auto"
17 \font_default_family default
18 \use_non_tex_fonts false
19 \font_sc false
20 \font_osf false
21 \font_sf_scale 100 100
22 \font_tt_scale 100 100
23 \graphics default
24 \default_output_format pdf
25 \output_sync 0
26 \bibtex_command default
27 \index_command default
28 \paperfontsize default
29 \spacing single
30 \use_hyperref false
31 \papersize default
32 \use_geometry false
33 \use_package amsmath 0
34 \use_package amssymb 0
35 \use_package cancel 0
36 \use_package esint 0
37 \use_package mathdots 1
38 \use_package mathtools 0
39 \use_package mhchem 1
40 \use_package stackrel 0
41 \use_package stmaryrd 0
42 \use_package undertilde 0
43 \cite_engine basic
44 \cite_engine_type default
45 \biblio_style plain
46 \use_bibtopic false
47 \use_indices false
48 \paperorientation portrait
49 \suppress_date false
50 \justification true
51 \use_refstyle 0
52 \index Index
53 \shortcut idx
54 \color #008000
55 \end_index
56 \secnumdepth 3
57 \tocdepth 3
58 \paragraph_separation indent
59 \paragraph_indentation default
60 \quotes_language english
61 \papercolumns 1
62 \papersides 1
63 \paperpagestyle default
64 \tracking_changes false
65 \output_changes false
66 \html_math_output 0
67 \html_css_as_file 0
68 \html_be_strict false
69 \end_header
70
71 \begin_body
72
73 \begin_layout Title
74 Docbook with LyX
75 \end_layout
76
77 \begin_layout Date
78 24 September 1999
79 \end_layout
80
81 \begin_layout Author
82 \begin_inset Flex Firstname
83 status open
84
85 \begin_layout Plain Layout
86 José
87 \end_layout
88
89 \end_inset
90
91
92 \begin_inset Flex Surname
93 status open
94
95 \begin_layout Plain Layout
96 Matos
97 \end_layout
98
99 \end_inset
100
101
102 \end_layout
103
104 \begin_layout Abstract
105 This is a small illustration of lyx's features using DocBook.
106 \end_layout
107
108 \begin_layout Abstract
109 The abstract can span several paragraphs.
110 \end_layout
111
112 \begin_layout Section
113 \begin_inset CommandInset label
114 LatexCommand label
115 name "first-section"
116
117 \end_inset
118
119 Introduction
120 \end_layout
121
122 \begin_layout Standard
123 This file ilustrates the generation of docbook documents with LyX.
124 \end_layout
125
126 \begin_layout Standard
127 This will improve as soon as new features are available.
128 \end_layout
129
130 \begin_layout Section
131 Standard layouts
132 \end_layout
133
134 \begin_layout Standard
135 One of the goals is the support, as much as possible, of layouts used in
136  other textclass, for compatibility purposes.
137 \end_layout
138
139 \begin_layout Standard
140 Remember that this is work in progress, I would like to hear any comments,
141  good or 
142 \begin_inset Quotes eld
143 \end_inset
144
145 bad
146 \begin_inset Quotes erd
147 \end_inset
148
149 .
150 \end_layout
151
152 \begin_layout Subsection
153 Lists
154 \end_layout
155
156 \begin_layout Standard
157 This is an example with several nested lists.
158 \end_layout
159
160 \begin_layout Itemize
161 item 1
162 \begin_inset Separator parbreak
163 \end_inset
164
165 \end_layout
166
167 \begin_deeper
168 \begin_layout Enumerate
169 item 2
170 \end_layout
171
172 \begin_layout Description
173 new item
174 \begin_inset Separator parbreak
175 \end_inset
176
177 \end_layout
178
179 \begin_deeper
180 \begin_layout Enumerate
181 collection
182 \end_layout
183
184 \end_deeper
185 \end_deeper
186 \begin_layout Itemize
187 new set
188 \end_layout
189
190 \begin_layout Subsection
191 Code
192 \end_layout
193
194 \begin_layout Standard
195 Required steps to have a running lyx.
196 \end_layout
197
198 \begin_layout Quotation
199 Be carefull with your own code.
200 \end_layout
201
202 \begin_layout Quotation
203 The debugger.
204 \end_layout
205
206 \begin_layout Code
207 cat > env.out
208 \end_layout
209
210 \begin_layout Code
211 tar xvzf lyx.tgz
212 \end_layout
213
214 \begin_layout Code
215 cd lyx-1_0_x
216 \end_layout
217
218 \begin_layout Code
219 ./configure
220 \end_layout
221
222 \begin_layout Code
223 make
224 \end_layout
225
226 \begin_layout Code
227 make install
228 \end_layout
229
230 \begin_layout Subsection
231 Labels
232 \end_layout
233
234 \begin_layout Standard
235 If a label is the first element in any layout, that label will be merged
236  with that element.
237  See as an example 
238 \begin_inset CommandInset ref
239 LatexCommand ref
240 name "first-section"
241 reference "first-section"
242
243 \end_inset
244
245 .
246 \end_layout
247
248 \begin_layout Subsection
249 Fonts
250 \end_layout
251
252 \begin_layout Standard
253 The only fonts supported are 
254 \emph on
255 Emphasis
256 \emph default
257  and 
258 \begin_inset Flex Literal
259 status open
260
261 \begin_layout Plain Layout
262 SGML
263 \end_layout
264
265 \end_inset
266
267 .
268 \end_layout
269
270 \begin_layout Subsection
271 Figures
272 \end_layout
273
274 \begin_layout Standard
275 One of the major changes in the docbook when compared with the linuxdoc
276  support are the figures support.
277  LyX only allows to view eps figures.
278  So you should have one of these if you want to take advantage of this feature.
279 \end_layout
280
281 \begin_layout Standard
282 Notice that when the docbook code is exported the filename extension is
283  stripped.
284  This enables that when the several backends are processed in sgmltools,
285  the corresponding extensions are added.
286  The default extension are eps for the print and gif for the html backend.
287 \end_layout
288
289 \begin_layout Standard
290 \begin_inset Float figure
291 placement htbp
292 wide false
293 sideways false
294 status open
295
296 \begin_layout Plain Layout
297 \begin_inset Graphics
298         filename ../doc/clipart/platypus.eps
299         width 2cm
300         height 3cm
301         scaleBeforeRotation
302         rotateAngle 45
303         rotateOrigin center
304
305 \end_inset
306
307
308 \end_layout
309
310 \begin_layout Plain Layout
311 \begin_inset Caption Standard
312
313 \begin_layout Plain Layout
314 Nice platypus
315 \end_layout
316
317 \end_inset
318
319
320 \end_layout
321
322 \end_inset
323
324  
325 \end_layout
326
327 \begin_layout Standard
328 Wide figures are treated as normal figures.
329 \end_layout
330
331 \begin_layout Standard
332 \begin_inset Float figure
333 placement htbp
334 wide true
335 sideways false
336 status open
337
338 \begin_layout Plain Layout
339 \begin_inset Graphics
340         filename ../doc/clipart/platypus.eps
341         width 2cm
342         height 3cm
343         scaleBeforeRotation
344         rotateAngle 45
345         rotateOrigin center
346
347 \end_inset
348
349
350 \end_layout
351
352 \begin_layout Plain Layout
353 \begin_inset Caption Standard
354
355 \begin_layout Plain Layout
356 long, very long\SpecialChar ldots
357  :-)
358 \end_layout
359
360 \end_inset
361
362
363 \end_layout
364
365 \end_inset
366
367
368 \end_layout
369
370 \begin_layout Subsection
371 Tables
372 \end_layout
373
374 \begin_layout Standard
375 There is also basic support for tables.
376 \begin_inset Float table
377 placement htbp
378 wide false
379 sideways false
380 status open
381
382 \begin_layout Plain Layout
383 \align center
384 \begin_inset Tabular
385 <lyxtabular version="3" rows="3" columns="5">
386 <features rotate="0" tabularvalignment="middle">
387 <column alignment="center" valignment="top" width="0pt">
388 <column alignment="center" valignment="top" width="0pt">
389 <column alignment="center" valignment="top" width="0pt">
390 <column alignment="center" valignment="top" width="0pt">
391 <column alignment="center" valignment="top" width="0pt">
392 <row>
393 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
394 \begin_inset Text
395
396 \begin_layout Plain Layout
397
398 \end_layout
399
400 \end_inset
401 </cell>
402 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
403 \begin_inset Text
404
405 \begin_layout Plain Layout
406 Software 1
407 \end_layout
408
409 \end_inset
410 </cell>
411 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
412 \begin_inset Text
413
414 \begin_layout Plain Layout
415 Software 2
416 \end_layout
417
418 \end_inset
419 </cell>
420 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
421 \begin_inset Text
422
423 \begin_layout Plain Layout
424 Software 3
425 \end_layout
426
427 \end_inset
428 </cell>
429 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
430 \begin_inset Text
431
432 \begin_layout Plain Layout
433 Software 4
434 \end_layout
435
436 \end_inset
437 </cell>
438 </row>
439 <row>
440 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
441 \begin_inset Text
442
443 \begin_layout Plain Layout
444 Plataform 1
445 \end_layout
446
447 \end_inset
448 </cell>
449 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
450 \begin_inset Text
451
452 \begin_layout Plain Layout
453 25 MB
454 \end_layout
455
456 \end_inset
457 </cell>
458 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
459 \begin_inset Text
460
461 \begin_layout Plain Layout
462 10 MB
463 \end_layout
464
465 \end_inset
466 </cell>
467 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
468 \begin_inset Text
469
470 \begin_layout Plain Layout
471 34 MB
472 \end_layout
473
474 \end_inset
475 </cell>
476 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
477 \begin_inset Text
478
479 \begin_layout Plain Layout
480
481 \end_layout
482
483 \end_inset
484 </cell>
485 </row>
486 <row>
487 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
488 \begin_inset Text
489
490 \begin_layout Plain Layout
491 Plataform 2
492 \end_layout
493
494 \end_inset
495 </cell>
496 <cell multicolumn="1" alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
497 \begin_inset Text
498
499 \begin_layout Plain Layout
500
501 \end_layout
502
503 \end_inset
504 </cell>
505 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
506 \begin_inset Text
507
508 \begin_layout Plain Layout
509 12 MB
510 \end_layout
511
512 \end_inset
513 </cell>
514 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
515 \begin_inset Text
516
517 \begin_layout Plain Layout
518 30 MB
519 \end_layout
520
521 \end_inset
522 </cell>
523 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
524 \begin_inset Text
525
526 \begin_layout Plain Layout
527 35 MB
528 \end_layout
529
530 \end_inset
531 </cell>
532 </row>
533 </lyxtabular>
534
535 \end_inset
536
537
538 \end_layout
539
540 \begin_layout Plain Layout
541 \begin_inset Caption Standard
542
543 \begin_layout Plain Layout
544 Nice Formal Table
545 \end_layout
546
547 \end_inset
548
549
550 \end_layout
551
552 \end_inset
553
554  
555 \end_layout
556
557 \begin_layout Standard
558 As it happens with the figures the wide tables are treated as normal tables.
559 \end_layout
560
561 \begin_layout Subsection
562 Margins
563 \end_layout
564
565 \begin_layout Standard
566 There are some restrictions when using margins.
567  For further information on docbook allowed syntax consult the 
568 \begin_inset CommandInset href
569 LatexCommand href
570 name "docbook reference manual"
571 target "http://www.oasis-open.org/docbook/documentation/reference/"
572
573 \end_inset
574
575 .
576 \end_layout
577
578 \begin_layout Quotation
579 It is also possible to insert margin notes inside some environments.
580 \begin_inset Separator parbreak
581 \end_inset
582
583 \end_layout
584
585 \begin_deeper
586 \begin_layout Standard
587 \begin_inset ERT
588 status collapsed
589
590 \begin_layout Plain Layout
591
592 \end_layout
593
594 \begin_layout Plain Layout
595
596 second par -> margin note
597 \end_layout
598
599 \begin_layout Plain Layout
600
601 third par -> margin note
602 \end_layout
603
604 \end_inset
605
606  
607 \end_layout
608
609 \end_deeper
610 \begin_layout Quotation
611 Notice that the previous layout is at level 1 
612 \begin_inset Foot
613 status collapsed
614
615 \begin_layout Plain Layout
616 This comes from a docbook restriction.
617  Sidebar can only appear inside "MSGTEXT", "CAUTION", "IMPORTANT", "NOTE",
618  "TIP", "WARNING", "BLOCKQUOTE".
619 \end_layout
620
621 \begin_layout Plain Layout
622 These environments are easily added to the docbook layout.
623 \end_layout
624
625 \end_inset
626
627  and so is the follow:
628 \begin_inset Separator parbreak
629 \end_inset
630
631 \end_layout
632
633 \begin_deeper
634 \begin_layout Standard
635 \begin_inset ERT
636 status collapsed
637
638 \begin_layout Plain Layout
639
640 \end_layout
641
642 \end_inset
643
644  
645 \end_layout
646
647 \end_deeper
648 \begin_layout Section
649 The road map
650 \end_layout
651
652 \begin_layout Standard
653 This is a small list of the remaining tasks:
654 \end_layout
655
656 \begin_layout Itemize
657 Expand the number of layouts
658 \begin_inset Separator parbreak
659 \end_inset
660
661 \end_layout
662
663 \begin_deeper
664 \begin_layout Itemize
665 example
666 \end_layout
667
668 \begin_layout Itemize
669 note
670 \end_layout
671
672 \begin_layout Itemize
673 warning
674 \end_layout
675
676 \begin_layout Itemize
677 tip
678 \end_layout
679
680 \begin_layout Itemize
681 caution
682 \end_layout
683
684 \begin_layout Itemize
685 important
686 \end_layout
687
688 \end_deeper
689 \begin_layout Itemize
690 Compose other layout files, besides article
691 \begin_inset Separator parbreak
692 \end_inset
693
694 \end_layout
695
696 \begin_deeper
697 \begin_layout Enumerate
698 book
699 \end_layout
700
701 \begin_layout Enumerate
702 set (very unlikely)
703 \begin_inset Foot
704 status collapsed
705
706 \begin_layout Plain Layout
707 I do not expect lyx to deal with colection of books, for now!
708 \end_layout
709
710 \end_inset
711
712
713 \end_layout
714
715 \begin_layout Enumerate
716 refentry
717 \end_layout
718
719 \end_deeper
720 \begin_layout Itemize
721 goodies
722 \begin_inset Separator parbreak
723 \end_inset
724
725 \end_layout
726
727 \begin_deeper
728 \begin_layout Enumerate
729 including other lyx files
730 \end_layout
731
732 \begin_layout Enumerate
733 more advanced tables support
734 \end_layout
735
736 \end_deeper
737 \begin_layout Itemize
738 better documentation
739 \end_layout
740
741 \begin_layout Standard
742 That's all.
743  ;-)
744 \end_layout
745
746 \end_body
747 \end_document