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