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