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