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