]> git.lyx.org Git - lyx.git/blob - lib/examples/docbook_article.lyx
The Box patch
[lyx.git] / lib / examples / docbook_article.lyx
1 #LyX 1.3 created this file. For more info see http://www.lyx.org/
2 \lyxformat 221
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
249         filename ../doc/platypus.eps
250         display grayscale
251         width 2cm
252         height 3cm
253         rotateAngle 45
254         rotateOrigin center
255 \end_inset 
256
257
258 \layout Caption
259
260 Nice platypus
261 \end_inset 
262
263  
264 \layout Standard
265
266 Wide figures are treated as normal figures.
267 \layout Standard
268
269
270 \begin_inset Float figure
271 placement htbp
272 wide true
273 collapsed false
274
275 \layout Standard
276
277
278 \begin_inset Graphics
279         filename ../doc/platypus.eps
280         display grayscale
281         width 2cm
282         height 3cm
283         rotateAngle 45
284         rotateOrigin center
285 \end_inset 
286
287
288 \layout Caption
289
290 long, very long...
291  :-)
292 \end_inset 
293
294
295 \layout Subsection
296
297 Tables
298 \layout Standard
299
300 There is also basic support for tables.
301 \begin_inset Float table
302 placement htbp
303 wide false
304 collapsed false
305
306 \layout Standard
307 \added_space_top 0.3cm \added_space_bottom 0.3cm \align center 
308
309 \begin_inset  Tabular
310 <lyxtabular version="3" rows="3" columns="5">
311 <features>
312 <column alignment="center" valignment="top" leftline="true" width="0pt">
313 <column alignment="center" valignment="top" leftline="true" width="0pt">
314 <column alignment="center" valignment="top" leftline="true" width="0pt">
315 <column alignment="center" valignment="top" leftline="true" width="0pt">
316 <column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
317 <row topline="true">
318 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
319 \begin_inset Text
320
321 \layout Standard
322
323 \end_inset 
324 </cell>
325 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
326 \begin_inset Text
327
328 \layout Standard
329
330 Software 1
331 \end_inset 
332 </cell>
333 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
334 \begin_inset Text
335
336 \layout Standard
337
338 Software 2
339 \end_inset 
340 </cell>
341 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
342 \begin_inset Text
343
344 \layout Standard
345
346 Software 3
347 \end_inset 
348 </cell>
349 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
350 \begin_inset Text
351
352 \layout Standard
353
354 Software 4
355 \end_inset 
356 </cell>
357 </row>
358 <row topline="true">
359 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
360 \begin_inset Text
361
362 \layout Standard
363
364 Plataform 1
365 \end_inset 
366 </cell>
367 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
368 \begin_inset Text
369
370 \layout Standard
371
372 25 MB
373 \end_inset 
374 </cell>
375 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
376 \begin_inset Text
377
378 \layout Standard
379
380 10 MB
381 \end_inset 
382 </cell>
383 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
384 \begin_inset Text
385
386 \layout Standard
387
388 34 MB
389 \end_inset 
390 </cell>
391 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
392 \begin_inset Text
393
394 \layout Standard
395
396 \end_inset 
397 </cell>
398 </row>
399 <row topline="true" bottomline="true">
400 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
401 \begin_inset Text
402
403 \layout Standard
404
405 Plataform 2
406 \end_inset 
407 </cell>
408 <cell multicolumn="1" alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
409 \begin_inset Text
410
411 \layout Standard
412
413 \end_inset 
414 </cell>
415 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
416 \begin_inset Text
417
418 \layout Standard
419
420 12 MB
421 \end_inset 
422 </cell>
423 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
424 \begin_inset Text
425
426 \layout Standard
427
428 30 MB
429 \end_inset 
430 </cell>
431 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
432 \begin_inset Text
433
434 \layout Standard
435
436 35 MB
437 \end_inset 
438 </cell>
439 </row>
440 </lyxtabular>
441
442 \end_inset 
443
444
445 \layout Caption
446
447 Nice Formal Table
448 \end_inset 
449
450  
451 \layout Standard
452
453 As it happens with the figures the wide tables are treated as normal tables.
454 \layout Subsection
455
456 Margins
457 \layout Standard
458
459 There are some restrictions when using margins.
460  For further information on docbook allowed syntax consult the 
461 \begin_inset LatexCommand \url[docbook reference manual]{http://www.oasis-open.org/docbook/documentation/reference/}
462
463 \end_inset 
464
465 .
466 \layout Quotation
467
468 It is also possible to insert margin notes inside some environments.
469 \begin_deeper 
470 \layout SGML
471
472
473 \begin_inset Marginal
474 collapsed true
475
476 \layout Standard
477
478 margin note
479 \layout Standard
480
481 second par -> margin note
482 \layout Standard
483
484 third par -> margin note
485 \end_inset 
486
487  
488 \end_deeper 
489 \layout Quotation
490
491 Notice that the previous layout is at level 1 
492 \begin_inset Foot
493 collapsed true
494
495 \layout Standard
496
497 This comes from a docbook restriction.
498  Sidebar can only appear inside "MSGTEXT", "CAUTION", "IMPORTANT", "NOTE",
499  "TIP", "WARNING", "BLOCKQUOTE".
500 \layout Standard
501
502 These environments are easily added to the docbook layout.
503 \end_inset 
504
505  and so is the follow:
506 \begin_deeper 
507 \layout SGML
508
509
510 \begin_inset Marginal
511 collapsed true
512
513 \layout Standard
514
515 too marginal ;-)
516 \end_inset 
517
518  
519 \end_deeper 
520 \layout Section
521
522 The road map
523 \layout Standard
524
525 This is a small list of the remaining tasks:
526 \layout Itemize
527
528 Expand the number of layouts
529 \begin_deeper 
530 \layout Itemize
531
532 example
533 \layout Itemize
534
535 note
536 \layout Itemize
537
538 warning
539 \layout Itemize
540
541 tip
542 \layout Itemize
543
544 caution
545 \layout Itemize
546
547 important
548 \end_deeper 
549 \layout Itemize
550
551 Compose other layout files, besides article
552 \begin_deeper 
553 \layout Enumerate
554
555 book
556 \layout Enumerate
557
558 set (very unlikely)
559 \begin_inset Foot
560 collapsed true
561
562 \layout Standard
563
564 I do not expect lyx to deal with colection of books, for now!
565 \end_inset 
566
567
568 \layout Enumerate
569
570 refentry
571 \end_deeper 
572 \layout Itemize
573
574 goodies
575 \begin_deeper 
576 \layout Enumerate
577
578 including other lyx files
579 \layout Enumerate
580
581 more advanced tables support
582 \end_deeper 
583 \layout Itemize
584
585 better documentation
586 \layout Standard
587
588 That's all.
589  ;-)
590 \the_end