]> git.lyx.org Git - features.git/blob - lib/doc/Customization.lyx
Implement resetArgs to InsetLayout (#8437)
[features.git] / lib / doc / Customization.lyx
1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 449
3 \begin_document
4 \begin_header
5 \textclass scrbook
6 \begin_preamble
7 % DO NOT ALTER THIS PREAMBLE!!!
8 %
9 % This preamble is designed to ensure that this document prints
10 % out as advertised. If you mess with this preamble,
11 % parts of this document may not print out as expected.  If you
12 % have problems LaTeXing this file, please contact 
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
15
16 \usepackage{ifpdf} % part of the hyperref bundle
17 \ifpdf % if pdflatex is used
18
19  % set fonts for nicer pdf view
20  \IfFileExists{lmodern.sty}
21   {\usepackage{lmodern}}{}
22
23 \fi % end if pdflatex is used
24
25 % the pages of the TOC is numbered roman
26 % and a pdf-bookmark for the TOC is added
27 \let\myTOC\tableofcontents
28 \renewcommand\tableofcontents{%
29   \frontmatter
30   \pdfbookmark[1]{\contentsname}{}
31   \myTOC
32   \mainmatter }
33 \end_preamble
34 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
35 \use_default_options false
36 \begin_modules
37 logicalmkup
38 \end_modules
39 \maintain_unincluded_children false
40 \begin_local_layout
41 Format 35
42 InsetLayout Flex:MenuItem
43 LyxType               charstyle
44 LabelString           menu
45 LatexType             command
46 LatexName             menuitem
47 Font
48 Family              Sans
49 EndFont
50 Preamble
51 \newcommand*{\menuitem}[1]{{\sffamily #1}}
52 EndPreamble
53 End
54 # In case we need to do with sans...
55 #InsetLayout CharStyle:Code
56 #Font
57 #Family              Sans
58 #EndFont
59 #Preamble
60 #\renewcommand{\code}[1]{{\sffamily #1}}
61 #EndPreamble
62 #End
63 \end_local_layout
64 \language english
65 \language_package default
66 \inputencoding auto
67 \fontencoding global
68 \font_roman default
69 \font_sans default
70 \font_typewriter default
71 \font_math auto
72 \font_default_family default
73 \use_non_tex_fonts false
74 \font_sc false
75 \font_osf false
76 \font_sf_scale 100
77 \font_tt_scale 100
78 \graphics default
79 \default_output_format default
80 \output_sync 0
81 \bibtex_command default
82 \index_command default
83 \paperfontsize 12
84 \spacing single
85 \use_hyperref true
86 \pdf_title "LyX Configuration Manual"
87 \pdf_author "LyX Team"
88 \pdf_subject "LyX-documentation Customization"
89 \pdf_keywords "LyX, documentation, customization"
90 \pdf_bookmarks true
91 \pdf_bookmarksnumbered true
92 \pdf_bookmarksopen true
93 \pdf_bookmarksopenlevel 1
94 \pdf_breaklinks false
95 \pdf_pdfborder false
96 \pdf_colorlinks true
97 \pdf_backref false
98 \pdf_pdfusetitle false
99 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
100 \papersize default
101 \use_geometry false
102 \use_package amsmath 0
103 \use_package amssymb 0
104 \use_package esint 0
105 \use_package mathdots 1
106 \use_package mathtools 0
107 \use_package mhchem 0
108 \use_package undertilde 0
109 \cite_engine basic
110 \cite_engine_type numerical
111 \biblio_style plain
112 \use_bibtopic false
113 \use_indices false
114 \paperorientation portrait
115 \suppress_date false
116 \justification true
117 \use_refstyle 0
118 \branch OutDated
119 \selected 0
120 \filename_suffix 0
121 \color #f5fae7
122 \end_branch
123 \index Index
124 \shortcut idx
125 \color #008000
126 \end_index
127 \secnumdepth 3
128 \tocdepth 3
129 \paragraph_separation indent
130 \paragraph_indentation default
131 \quotes_language english
132 \papercolumns 1
133 \papersides 2
134 \paperpagestyle headings
135 \tracking_changes true
136 \output_changes false
137 \html_math_output 0
138 \html_css_as_file 0
139 \html_be_strict true
140 \author -712698321 "Jürgen Spitzmüller" 
141 \author -195340706 "Georg Baum" 
142 \author 5863208 "ab" 
143 \author 155139281 "Jrgen Spitzmller" 
144 \author 1082167584 "Kayvan Sylvan" kayvan@sylvan.com
145 \author 1414654397 "Richard Heck" 
146 \author 2090807402 "usti" 
147 \end_header
148
149 \begin_body
150
151 \begin_layout Title
152 Customizing LyX: Features for the Advanced User
153 \end_layout
154
155 \begin_layout Author
156 by the LyX Team
157 \begin_inset Foot
158 status collapsed
159
160 \begin_layout Plain Layout
161 \noindent
162 If you have comments or error corrections, please send them to the LyX Documenta
163 tion mailing list, 
164 \begin_inset CommandInset href
165 LatexCommand href
166 target "lyx-docs@lists.lyx.org"
167 type "mailto:"
168
169 \end_inset
170
171 .
172  Include 
173 \begin_inset Quotes eld
174 \end_inset
175
176 [Customization]
177 \begin_inset Quotes erd
178 \end_inset
179
180  in the subject header, and please cc the current maintainer of this file,
181  Richard Heck <rgheck@comcast.net>.
182 \end_layout
183
184 \end_inset
185
186
187 \begin_inset Newline newline
188 \end_inset
189
190
191 \begin_inset Newline newline
192 \end_inset
193
194 Version 2.0.x 
195 \end_layout
196
197 \begin_layout Standard
198 \begin_inset CommandInset toc
199 LatexCommand tableofcontents
200
201 \end_inset
202
203
204 \end_layout
205
206 \begin_layout Standard
207 \begin_inset Note Note
208 status open
209
210 \begin_layout Plain Layout
211 Please use change tracking when modifying this document.
212  This makes it easier for our translators to recognize things that have
213  been changed, and it helps the maintainer keep up-to-date with what's been
214  done.
215 \end_layout
216
217 \end_inset
218
219
220 \end_layout
221
222 \begin_layout Chapter
223 Introduction
224 \end_layout
225
226 \begin_layout Standard
227 This manual covers the customization features present in LyX.
228  In it, we discuss issues like keyboard shortcuts, screen previewing options,
229  printer options, sending commands to LyX via the LyX Server, internationalizati
230 on, installing new LaTeX classes and LyX layouts, etc.
231  We can't possibly hope to touch on everything you can change—our developers
232  add new features faster than we can document them—but we will explain the
233  most common customizations and hopefully point you in the right direction
234  for some of the more obscure ones.
235 \end_layout
236
237 \begin_layout Standard
238 \begin_inset Branch OutDated
239 status collapsed
240
241 \begin_layout Standard
242 Information from previous versions of this document that now seems to be
243  outdated is contained in the OutDated branch of this document.
244  By default, this information will not appear in the LaTeX output.
245 \end_layout
246
247 \end_inset
248
249
250 \end_layout
251
252 \begin_layout Chapter
253 LyX configuration files
254 \end_layout
255
256 \begin_layout Standard
257 This chapter aims to help you to find your way through the LyX configuration
258  files.
259  Before continuing to read this chapter, you should find out where your
260  LyX library and user directories are by using 
261 \begin_inset Flex MenuItem
262 status collapsed
263
264 \begin_layout Plain Layout
265 Help\SpecialChar \menuseparator
266 About
267 \begin_inset space ~
268 \end_inset
269
270 LyX
271 \end_layout
272
273 \end_inset
274
275 .
276  The library directory is the place where LyX places its system-wide configurati
277 on files; the user directory is where you can place your modified versions.
278  We will call the former 
279 \begin_inset Flex Code
280 status collapsed
281
282 \begin_layout Plain Layout
283 LyXDir
284 \end_layout
285
286 \end_inset
287
288  and the latter 
289 \begin_inset Flex MenuItem
290 status collapsed
291
292 \begin_layout Plain Layout
293 UserDir
294 \end_layout
295
296 \end_inset
297
298  in the remainder of this document.
299  
300 \end_layout
301
302 \begin_layout Section
303 What's in 
304 \begin_inset Flex Code
305 status collapsed
306
307 \begin_layout Plain Layout
308 LyXDir
309 \end_layout
310
311 \end_inset
312
313 ?
314 \end_layout
315
316 \begin_layout Standard
317 \begin_inset Flex Code
318 status collapsed
319
320 \begin_layout Plain Layout
321 LyXDir
322 \end_layout
323
324 \end_inset
325
326  and its sub-directories contain a number of files and that can be used
327  to customize LyX's behavior.
328  You can change many of these files from within LyX itself through the 
329 \begin_inset Flex MenuItem
330 status collapsed
331
332 \begin_layout Plain Layout
333 Tools\SpecialChar \menuseparator
334 Preferences
335 \end_layout
336
337 \end_inset
338
339  dialog.
340  Most customization that you will want to do in LyX is possible through
341  this dialog.
342  However, many other inner aspects of LyX can be customized by modifying
343  the files in 
344 \begin_inset Flex Code
345 status collapsed
346
347 \begin_layout Plain Layout
348 LyXDir
349 \end_layout
350
351 \end_inset
352
353 .
354  These files fall in different categories, described in the following subsection
355 s.
356 \end_layout
357
358 \begin_layout Subsection
359 Automatically generated files
360 \end_layout
361
362 \begin_layout Standard
363 The files, which are to be found in 
364 \begin_inset Flex MenuItem
365 status collapsed
366
367 \begin_layout Plain Layout
368 UserDir
369 \end_layout
370
371 \end_inset
372
373 , are generated when you configure LyX.
374  They contain various default values that are guessed by inspection.
375  In general, it is not a good idea to modify them, since they might be overwritt
376 en at any time.
377 \end_layout
378
379 \begin_layout Labeling
380 \labelwidthstring 00.00.0000
381 \begin_inset Flex Code
382 status collapsed
383
384 \begin_layout Plain Layout
385 lyxrc.defaults
386 \end_layout
387
388 \end_inset
389
390  contains defaults for various commands.
391 \end_layout
392
393 \begin_layout Labeling
394 \labelwidthstring 00.00.0000
395 \begin_inset Flex Code
396 status collapsed
397
398 \begin_layout Plain Layout
399 packages.lst
400 \end_layout
401
402 \end_inset
403
404  contains the list of packages that have been recognized by LyX.
405  It is currently unused by the LyX program itself, but the information extracted
406 , and more, is made available with 
407 \begin_inset Flex MenuItem
408 status collapsed
409
410 \begin_layout Plain Layout
411 Help\SpecialChar \menuseparator
412 LaTeX
413 \begin_inset space ~
414 \end_inset
415
416 Configuration
417 \end_layout
418
419 \end_inset
420
421 .
422 \end_layout
423
424 \begin_layout Labeling
425 \labelwidthstring 00.00.0000
426 \begin_inset Flex Code
427 status collapsed
428
429 \begin_layout Plain Layout
430 textclass.lst
431 \end_layout
432
433 \end_inset
434
435  the list of text classes that have been found in your 
436 \begin_inset Flex Code
437 status collapsed
438
439 \begin_layout Plain Layout
440 layout/
441 \end_layout
442
443 \end_inset
444
445  directories, along with the associated LaTeX document class and their descripti
446 on.
447 \end_layout
448
449 \begin_layout Labeling
450 \labelwidthstring 00.00.0000
451 \begin_inset Flex Code
452 status collapsed
453
454 \begin_layout Plain Layout
455 lyxmodules.lst
456 \end_layout
457
458 \end_inset
459
460  the list of layout modules found in your 
461 \begin_inset Flex Code
462 status collapsed
463
464 \begin_layout Plain Layout
465 layout/
466 \end_layout
467
468 \end_inset
469
470  directories
471 \end_layout
472
473 \begin_layout Labeling
474 \labelwidthstring 00.00.0000
475 \begin_inset Flex Code
476 status collapsed
477
478 \begin_layout Plain Layout
479 *files.lst
480 \end_layout
481
482 \end_inset
483
484  lists of various sorts of LaTeX-related files found on your system
485 \end_layout
486
487 \begin_layout Labeling
488 \labelwidthstring 00.00.0000
489 \begin_inset Flex Code
490 status collapsed
491
492 \begin_layout Plain Layout
493 doc/LaTeXConfig.lyx
494 \end_layout
495
496 \end_inset
497
498  is automatically generated during configuration from the file 
499 \begin_inset Flex Code
500 status collapsed
501
502 \begin_layout Plain Layout
503 LaTeXConfig.lyx.in
504 \end_layout
505
506 \end_inset
507
508 .
509  It contains information on your LaTeX configuration.
510 \end_layout
511
512 \begin_layout Subsection
513 Directories
514 \end_layout
515
516 \begin_layout Standard
517 These directories are duplicated between 
518 \begin_inset Flex Code
519 status collapsed
520
521 \begin_layout Plain Layout
522 LyXDir
523 \end_layout
524
525 \end_inset
526
527  and 
528 \begin_inset Flex Code
529 status collapsed
530
531 \begin_layout Plain Layout
532 UserDir
533 \end_layout
534
535 \end_inset
536
537 .
538  If a particular files exists in both places, the one in 
539 \begin_inset Flex Code
540 status collapsed
541
542 \begin_layout Plain Layout
543 UserDir
544 \end_layout
545
546 \end_inset
547
548  will be used.
549 \end_layout
550
551 \begin_layout Labeling
552 \labelwidthstring 00.00.0000
553 \begin_inset Flex Code
554 status collapsed
555
556 \begin_layout Plain Layout
557 bind/
558 \end_layout
559
560 \end_inset
561
562  this directory contains files with the extension 
563 \begin_inset Flex Code
564 status collapsed
565
566 \begin_layout Plain Layout
567 .bind
568 \end_layout
569
570 \end_inset
571
572  that define the keybindings used in LyX.
573  If there exists an internationalized version of the bind file named 
574 \begin_inset Flex Code
575 status collapsed
576
577 \begin_layout Plain Layout
578 $LANG_xxx.bind
579 \end_layout
580
581 \end_inset
582
583 , that will be used first.
584 \end_layout
585
586 \begin_layout Labeling
587 \labelwidthstring 00.00.0000
588 \begin_inset Flex Code
589 status collapsed
590
591 \begin_layout Plain Layout
592 clipart/
593 \end_layout
594
595 \end_inset
596
597  contains graphics files that can be included in documents.
598  
599 \end_layout
600
601 \begin_layout Labeling
602 \labelwidthstring 00.00.0000
603 \begin_inset Flex Code
604 status collapsed
605
606 \begin_layout Plain Layout
607 doc/
608 \end_layout
609
610 \end_inset
611
612  contains LyX documentation files (including the one you are currently reading).
613  The file 
614 \begin_inset Flex Code
615 status collapsed
616
617 \begin_layout Plain Layout
618 LaTeXConfig.lyx
619 \end_layout
620
621 \end_inset
622
623  deserves special attention, as noted above.
624  The internationalized help docs are in subdirectories 
625 \begin_inset Flex Code
626 status collapsed
627
628 \begin_layout Plain Layout
629 doc/xx
630 \end_layout
631
632 \end_inset
633
634  where 
635 \begin_inset Quotes eld
636 \end_inset
637
638 xx
639 \begin_inset Quotes erd
640 \end_inset
641
642  is the ISO language code.
643  See chapter
644 \begin_inset space ~
645 \end_inset
646
647
648 \begin_inset CommandInset ref
649 LatexCommand ref
650 reference "cha:Internationalizing-LyX"
651
652 \end_inset
653
654  for details.
655 \end_layout
656
657 \begin_layout Labeling
658 \labelwidthstring 00.00.0000
659 \begin_inset Flex Code
660 status collapsed
661
662 \begin_layout Plain Layout
663 examples/
664 \end_layout
665
666 \end_inset
667
668  contains example files that explain how to use some features.
669  In the file browser, press the 
670 \begin_inset Flex MenuItem
671 status collapsed
672
673 \begin_layout Plain Layout
674 Examples
675 \end_layout
676
677 \end_inset
678
679  button to get there.
680 \end_layout
681
682 \begin_layout Labeling
683 \labelwidthstring 00.00.0000
684 \begin_inset Flex Code
685 status collapsed
686
687 \begin_layout Plain Layout
688 images/
689 \end_layout
690
691 \end_inset
692
693  contains image files that are used by the 
694 \begin_inset Flex MenuItem
695 status collapsed
696
697 \begin_layout Plain Layout
698 Document
699 \end_layout
700
701 \end_inset
702
703  dialog.
704  In addition, it also contains the individual icons used in the toolbar
705  and the banners that can be shown when LyX is launched.
706 \end_layout
707
708 \begin_layout Labeling
709 \labelwidthstring 00.00.0000
710 \begin_inset Flex Code
711 status collapsed
712
713 \begin_layout Plain Layout
714 kbd/
715 \end_layout
716
717 \end_inset
718
719  contains keyboard keymapping files.
720  See Chapter
721 \begin_inset space ~
722 \end_inset
723
724
725 \begin_inset CommandInset ref
726 LatexCommand ref
727 reference "sec:International-Keymap-Stuff"
728
729 \end_inset
730
731  for details.
732 \end_layout
733
734 \begin_layout Labeling
735 \labelwidthstring 00.00.0000
736 \begin_inset Flex Code
737 status collapsed
738
739 \begin_layout Plain Layout
740 layouts/
741 \end_layout
742
743 \end_inset
744
745  contains the text class and module files described in Chapter
746 \begin_inset space ~
747 \end_inset
748
749
750 \begin_inset CommandInset ref
751 LatexCommand ref
752 reference "cha:Installing-New-Document"
753
754 \end_inset
755
756 .
757 \end_layout
758
759 \begin_layout Labeling
760 \labelwidthstring 00.00.0000
761 \begin_inset Flex Code
762 status collapsed
763
764 \begin_layout Plain Layout
765 lyx2lyx
766 \end_layout
767
768 \end_inset
769
770  contains the 
771 \begin_inset Flex Code
772 status collapsed
773
774 \begin_layout Plain Layout
775 lyx2lyx
776 \end_layout
777
778 \end_inset
779
780  Python scripts used to convert between LyX versions.
781  These can be run from the command line if, say, you want to batch-convert
782  files.
783 \end_layout
784
785 \begin_layout Labeling
786 \labelwidthstring 00.00.0000
787 \begin_inset Flex Code
788 status collapsed
789
790 \begin_layout Plain Layout
791 scripts/
792 \end_layout
793
794 \end_inset
795
796  contains some files that demonstrate the capabilities of the 
797 \begin_inset Flex MenuItem
798 status collapsed
799
800 \begin_layout Plain Layout
801 External
802 \begin_inset space ~
803 \end_inset
804
805 Template
806 \end_layout
807
808 \end_inset
809
810  feature.
811  Also contains some scripts used by LyX itself.
812 \end_layout
813
814 \begin_layout Labeling
815 \labelwidthstring 00.00.0000
816 \begin_inset Flex Code
817 status collapsed
818
819 \begin_layout Plain Layout
820 templates/
821 \end_layout
822
823 \end_inset
824
825  contains the standard LyX template files described in Chapter
826 \begin_inset space ~
827 \end_inset
828
829
830 \begin_inset CommandInset ref
831 LatexCommand ref
832 reference "sub:Creating-Templates"
833
834 \end_inset
835
836 .
837 \end_layout
838
839 \begin_layout Labeling
840 \labelwidthstring 00.00.0000
841 \begin_inset Flex Code
842 status collapsed
843
844 \begin_layout Plain Layout
845 ui/
846 \end_layout
847
848 \end_inset
849
850  contains files with the extension 
851 \begin_inset Flex Code
852 status collapsed
853
854 \begin_layout Plain Layout
855 .ui
856 \end_layout
857
858 \end_inset
859
860  that define the user interface to LyX.
861  That is, the files define which items appear in which menus and the items
862  appearing on the toolbar.
863 \end_layout
864
865 \begin_layout Subsection
866 Files you don't want to modify
867 \end_layout
868
869 \begin_layout Standard
870 These files are used internally by LyX and you generally do not need to
871  modify them unless you are a developer.
872 \end_layout
873
874 \begin_layout Labeling
875 \labelwidthstring 00.00.0000
876 \begin_inset Flex Code
877 status collapsed
878
879 \begin_layout Plain Layout
880 CREDITS
881 \end_layout
882
883 \end_inset
884
885  this file contains the list of LyX developers.
886  The contents are displayed with the menu entry 
887 \begin_inset Flex MenuItem
888 status collapsed
889
890 \begin_layout Plain Layout
891 Help\SpecialChar \menuseparator
892 About
893 \begin_inset space ~
894 \end_inset
895
896 LyX
897 \end_layout
898
899 \end_inset
900
901 .
902 \end_layout
903
904 \begin_layout Labeling
905 \labelwidthstring 00.00.0000
906 \begin_inset Flex Code
907 status collapsed
908
909 \begin_layout Plain Layout
910 chkconfig.ltx
911 \end_layout
912
913 \end_inset
914
915  this is a LaTeX script used during the configuration process.
916  Do not run directly.
917 \end_layout
918
919 \begin_layout Labeling
920 \labelwidthstring 00.00.0000
921 \begin_inset Flex Code
922 status collapsed
923
924 \begin_layout Plain Layout
925 configure.py
926 \end_layout
927
928 \end_inset
929
930  this is the script that is used to re-configure LyX.
931  It creates configuration files in the directory it was run from.
932 \end_layout
933
934 \begin_layout Subsection
935 Other files needing a line or two...
936 \end_layout
937
938 \begin_layout Labeling
939 \labelwidthstring 00.00.0000
940 \begin_inset Flex Code
941 status collapsed
942
943 \begin_layout Plain Layout
944 encodings
945 \end_layout
946
947 \end_inset
948
949  this contains tables describing how different character encodings can be
950  mapped to Unicode
951 \end_layout
952
953 \begin_layout Labeling
954 \labelwidthstring 00.00.0000
955 \begin_inset Flex Code
956 status collapsed
957
958 \begin_layout Plain Layout
959 external_templates
960 \end_layout
961
962 \end_inset
963
964  this file contains the templates available to the new 
965 \begin_inset Flex MenuItem
966 status collapsed
967
968 \begin_layout Plain Layout
969 External
970 \begin_inset space ~
971 \end_inset
972
973 Template
974 \end_layout
975
976 \end_inset
977
978  feature.
979 \end_layout
980
981 \begin_layout Labeling
982 \labelwidthstring 00.00.0000
983 \begin_inset Flex Code
984 status collapsed
985
986 \begin_layout Plain Layout
987 languages
988 \end_layout
989
990 \end_inset
991
992  this file contains a list of all the languages currently supported by LyX.
993 \change_inserted -195340706 1334775793
994
995 \end_layout
996
997 \begin_layout Labeling
998 \labelwidthstring 00.00.0000
999
1000 \change_inserted -195340706 1334775793
1001 \begin_inset Flex Code
1002 status collapsed
1003
1004 \begin_layout Plain Layout
1005
1006 \change_inserted -195340706 1334775793
1007 layouttranslations
1008 \end_layout
1009
1010 \end_inset
1011
1012  this file contains translations for internationalized paragraph styles
1013  (see sec.
1014 \begin_inset space \thinspace{}
1015 \end_inset
1016
1017
1018 \begin_inset CommandInset ref
1019 LatexCommand ref
1020 reference "sub:I18n"
1021
1022 \end_inset
1023
1024 ).
1025 \change_unchanged
1026
1027 \end_layout
1028
1029 \begin_layout Section
1030 Your local configuration directory
1031 \end_layout
1032
1033 \begin_layout Standard
1034 Even if you are using LyX as an unprivileged user, you might want to change
1035  LyX configuration for your own use.
1036  The 
1037 \begin_inset Flex Code
1038 status collapsed
1039
1040 \begin_layout Plain Layout
1041 UserDir
1042 \end_layout
1043
1044 \end_inset
1045
1046  directory contains all your personal configuration files.
1047  This is the directory described as 
1048 \begin_inset Quotes eld
1049 \end_inset
1050
1051 user directory
1052 \begin_inset Quotes erd
1053 \end_inset
1054
1055  in 
1056 \begin_inset Flex MenuItem
1057 status collapsed
1058
1059 \begin_layout Plain Layout
1060 Help\SpecialChar \menuseparator
1061 About
1062 \begin_inset space ~
1063 \end_inset
1064
1065 LyX
1066 \end_layout
1067
1068 \end_inset
1069
1070 .
1071  This directory is used as a mirror of 
1072 \begin_inset Flex Code
1073 status collapsed
1074
1075 \begin_layout Plain Layout
1076 LyXDir
1077 \end_layout
1078
1079 \end_inset
1080
1081 , which means that every file in 
1082 \begin_inset Flex Code
1083 status collapsed
1084
1085 \begin_layout Plain Layout
1086 UserDir
1087 \end_layout
1088
1089 \end_inset
1090
1091  is a replacement for the corresponding file in 
1092 \begin_inset Flex Code
1093 status collapsed
1094
1095 \begin_layout Plain Layout
1096 LyXDir
1097 \end_layout
1098
1099 \end_inset
1100
1101 .
1102  Any configuration file described in the above sections can be placed either
1103  in the system-wide directory, in which case it will affect all users, or
1104  in your local directory for your own use.
1105 \end_layout
1106
1107 \begin_layout Standard
1108 To make things clearer, let's provide a few examples:
1109 \end_layout
1110
1111 \begin_layout Itemize
1112 The preferences set in the 
1113 \begin_inset Flex MenuItem
1114 status collapsed
1115
1116 \begin_layout Plain Layout
1117 Tools\SpecialChar \menuseparator
1118 Preferences
1119 \end_layout
1120
1121 \end_inset
1122
1123  dialog are saved to a file 
1124 \begin_inset Flex Code
1125 status collapsed
1126
1127 \begin_layout Plain Layout
1128 preferences
1129 \end_layout
1130
1131 \end_inset
1132
1133  in 
1134 \begin_inset Flex Code
1135 status collapsed
1136
1137 \begin_layout Plain Layout
1138 UserDir
1139 \end_layout
1140
1141 \end_inset
1142
1143 .
1144 \end_layout
1145
1146 \begin_layout Itemize
1147 When you reconfigure using 
1148 \begin_inset Flex MenuItem
1149 status collapsed
1150
1151 \begin_layout Plain Layout
1152 Tools\SpecialChar \menuseparator
1153 Reconfigure
1154 \end_layout
1155
1156 \end_inset
1157
1158 , LyX runs the 
1159 \begin_inset Flex Code
1160 status collapsed
1161
1162 \begin_layout Plain Layout
1163 configure.py
1164 \end_layout
1165
1166 \end_inset
1167
1168  script, and the resulting files are written in your local configuration
1169  directory.
1170  This means that any additional text class file that you might have added
1171  in 
1172 \begin_inset Flex Code
1173 status collapsed
1174
1175 \begin_layout Plain Layout
1176 UserDir/layouts
1177 \end_layout
1178
1179 \end_inset
1180
1181  will be added to the list of classes in the 
1182 \begin_inset Flex MenuItem
1183 status collapsed
1184
1185 \begin_layout Plain Layout
1186 Document\SpecialChar \menuseparator
1187 Settings
1188 \end_layout
1189
1190 \end_inset
1191
1192  dialog.
1193 \end_layout
1194
1195 \begin_layout Itemize
1196 If you get some updated documentation from LyX ftp site and cannot install
1197  it because you do not have sysadmin rights on your system, you can just
1198  copy the files in 
1199 \begin_inset Flex Code
1200 status collapsed
1201
1202 \begin_layout Plain Layout
1203 UserDir/doc/
1204 \end_layout
1205
1206 \end_inset
1207
1208  and the items in the 
1209 \begin_inset Flex MenuItem
1210 status collapsed
1211
1212 \begin_layout Plain Layout
1213 Help
1214 \end_layout
1215
1216 \end_inset
1217
1218  menu will open them!
1219 \end_layout
1220
1221 \begin_layout Section
1222 Running LyX with multiple configurations
1223 \end_layout
1224
1225 \begin_layout Standard
1226 The configuration freedom of the local configuration directory may not suffice
1227  if you want to have more than one configuration at your disposal.
1228  For example, you may want to be use different key bindings or printer settings
1229  at different times.
1230  You can achieve this by having several such directories.
1231  You then specify which directory to use at run-time.
1232 \end_layout
1233
1234 \begin_layout Standard
1235 Invoking LyX with the command line switch 
1236 \begin_inset Flex Code
1237 status collapsed
1238
1239 \begin_layout Plain Layout
1240 -userdir
1241 \end_layout
1242
1243 \end_inset
1244
1245  
1246 \emph on
1247 <some directory>
1248 \emph default
1249  instructs the program to read the configuration from that directory, and
1250  not from the default directory.
1251  (You can determine the default directory by running LyX without the 
1252 \begin_inset Flex Code
1253 status collapsed
1254
1255 \begin_layout Plain Layout
1256 -userdir
1257 \end_layout
1258
1259 \end_inset
1260
1261  switch.) If the specified directory does not exist, LyX offers to create
1262  it for you, just like it does for the default directory on the first time
1263  you run the program.
1264  You can modify the configuration options in this additional user directory
1265  exactly as you would for the default directory.
1266  These directories are completely independent (but read on).
1267  Note that setting the environment variable 
1268 \begin_inset Flex Code
1269 status collapsed
1270
1271 \begin_layout Plain Layout
1272 LYX_USERDIR_VER
1273 \end_layout
1274
1275 \end_inset
1276
1277  to some value has exactly the same effect.
1278 \end_layout
1279
1280 \begin_layout Standard
1281 Having several configurations also requires more maintenance: if you want
1282  to add a new layout to 
1283 \begin_inset Flex Code
1284 status collapsed
1285
1286 \begin_layout Plain Layout
1287 NewUserDir/layouts
1288 \end_layout
1289
1290 \end_inset
1291
1292  which you want available from all your configurations, you must add it
1293  to each directory separately.
1294  You can avoid this with the following trick: after LyX creates the additional
1295  directory, most of the subdirectories (see above) are empty.
1296  If you want the new configuration to mirror an existing one, replace the
1297  empty subdirectory with a symbolic link to the matching subdirectory in
1298  the existing configuration.
1299  Take care with the 
1300 \begin_inset Flex Code
1301 status collapsed
1302
1303 \begin_layout Plain Layout
1304 doc/
1305 \end_layout
1306
1307 \end_inset
1308
1309  subdirectory, however, since it contains a file written by the configuration
1310  script (also accessible through 
1311 \begin_inset Flex MenuItem
1312 status collapsed
1313
1314 \begin_layout Plain Layout
1315 Tools\SpecialChar \menuseparator
1316 Reconfigure
1317 \end_layout
1318
1319 \end_inset
1320
1321 ) which is configuration-specific.
1322 \end_layout
1323
1324 \begin_layout Chapter
1325 The Preferences dialog
1326 \end_layout
1327
1328 \begin_layout Standard
1329 All options of the preferences dialog are described in the Appendix 
1330 \emph on
1331 The Preferences Dialog
1332 \emph default
1333  in the 
1334 \emph on
1335 User's Guide
1336 \emph default
1337 .
1338  For some options you might find here more details.
1339 \end_layout
1340
1341 \begin_layout Section
1342 Formats
1343 \begin_inset CommandInset label
1344 LatexCommand label
1345 name "sec:Formats"
1346
1347 \end_inset
1348
1349
1350 \end_layout
1351
1352 \begin_layout Standard
1353 The first step is to define your file formats if they are not already defined.
1354  To do so, open the 
1355 \begin_inset Flex MenuItem
1356 status collapsed
1357
1358 \begin_layout Plain Layout
1359 Tools\SpecialChar \menuseparator
1360 Preferences
1361 \end_layout
1362
1363 \end_inset
1364
1365  dialog.
1366  Under 
1367 \begin_inset Flex MenuItem
1368 status collapsed
1369
1370 \begin_layout Plain Layout
1371 File Handling\SpecialChar \menuseparator
1372 File formats
1373 \end_layout
1374
1375 \end_inset
1376
1377  press the 
1378 \begin_inset Flex MenuItem
1379 status collapsed
1380
1381 \begin_layout Plain Layout
1382 New\SpecialChar \ldots{}
1383
1384 \end_layout
1385
1386 \end_inset
1387
1388  button to define your new format.
1389  The 
1390 \begin_inset Flex MenuItem
1391 status collapsed
1392
1393 \begin_layout Plain Layout
1394 Format
1395 \end_layout
1396
1397 \end_inset
1398
1399  field contains the name used to identify the format in the GUI.
1400  The 
1401 \begin_inset Flex MenuItem
1402 status collapsed
1403
1404 \begin_layout Plain Layout
1405 Short Name
1406 \end_layout
1407
1408 \end_inset
1409
1410  is used to identify the format internally.
1411  You will also need to enter a file extension.
1412  These are all required.
1413  The optional 
1414 \begin_inset Flex MenuItem
1415 status collapsed
1416
1417 \begin_layout Plain Layout
1418 Shortcut
1419 \end_layout
1420
1421 \end_inset
1422
1423  field is used to provide a keyboard shortcut on the menus.
1424  (For example, pressing 
1425 \begin_inset Flex MenuItem
1426 status collapsed
1427
1428 \begin_layout Plain Layout
1429 Alt-V F D
1430 \end_layout
1431
1432 \end_inset
1433
1434  will 
1435 \begin_inset Flex MenuItem
1436 status collapsed
1437
1438 \begin_layout Plain Layout
1439 View\SpecialChar \menuseparator
1440 View (Other Formats)\SpecialChar \menuseparator
1441 DVI
1442 \end_layout
1443
1444 \end_inset
1445
1446 .) 
1447 \end_layout
1448
1449 \begin_layout Standard
1450 A Format can have a 
1451 \begin_inset Flex MenuItem
1452 status collapsed
1453
1454 \begin_layout Plain Layout
1455 Viewer
1456 \end_layout
1457
1458 \end_inset
1459
1460  and an 
1461 \begin_inset Flex MenuItem
1462 status collapsed
1463
1464 \begin_layout Plain Layout
1465 Editor
1466 \end_layout
1467
1468 \end_inset
1469
1470  associated with it.
1471  For example, you might want to use 
1472 \begin_inset Flex MenuItem
1473 status collapsed
1474
1475 \begin_layout Plain Layout
1476 Ghostview
1477 \end_layout
1478
1479 \end_inset
1480
1481  to view PostScript files.
1482  You can enter the command needed to start the program in the corresponding
1483  fields.
1484  In defining this command, you can use the four variables listed in the
1485  next section.
1486  The viewer is launched when you view an image in LyX or use the 
1487 \begin_inset Flex MenuItem
1488 status collapsed
1489
1490 \begin_layout Plain Layout
1491 View
1492 \end_layout
1493
1494 \end_inset
1495
1496  menu.
1497  The editor is for example launched when you right-click on an image and
1498  choose 
1499 \begin_inset Flex MenuItem
1500 status collapsed
1501
1502 \begin_layout Plain Layout
1503 Edit externally
1504 \end_layout
1505
1506 \end_inset
1507
1508  in the appearing context menu.
1509 \end_layout
1510
1511 \begin_layout Standard
1512
1513 \change_inserted -195340706 1329851811
1514 The 
1515 \begin_inset Flex MenuItem
1516 status collapsed
1517
1518 \begin_layout Plain Layout
1519 MIME
1520 \end_layout
1521
1522 \end_inset
1523
1524  type of a format is optional, but if it is specified, it must be unique
1525  across all formats.
1526  It is used to detect files of this format from the file contents.
1527  For some important file formats there is no MIME type officially registered
1528  with the 
1529 \begin_inset CommandInset href
1530 LatexCommand href
1531 name "IANA"
1532 target "http://www.iana.org/assignments/media-types/"
1533
1534 \end_inset
1535
1536 .
1537  Therefore LyX uses the extended list of MIME types as specified by 
1538 \begin_inset CommandInset href
1539 LatexCommand href
1540 name "freedesktop.org"
1541 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1542
1543 \end_inset
1544
1545 .
1546 \end_layout
1547
1548 \begin_layout Standard
1549 The 
1550 \begin_inset Flex MenuItem
1551 status collapsed
1552
1553 \begin_layout Plain Layout
1554 Document format
1555 \end_layout
1556
1557 \end_inset
1558
1559  option tells LyX that a format is suitable for document export.
1560  If this is set and if a suitable conversion route exists (see sec.
1561 \begin_inset space \thinspace{}
1562 \end_inset
1563
1564
1565 \begin_inset CommandInset ref
1566 LatexCommand ref
1567 reference "sec:Converters"
1568
1569 \end_inset
1570
1571 ), the format will appear in the 
1572 \begin_inset Flex MenuItem
1573 status collapsed
1574
1575 \begin_layout Plain Layout
1576 File\SpecialChar \menuseparator
1577 Export
1578 \end_layout
1579
1580 \end_inset
1581
1582  menu.
1583  The format will also appear in the 
1584 \begin_inset Flex MenuItem
1585 status collapsed
1586
1587 \begin_layout Plain Layout
1588 View
1589 \end_layout
1590
1591 \end_inset
1592
1593  menu if a viewer is specified for the format.
1594  Pure image formats, such as 
1595 \begin_inset Flex Code
1596 status collapsed
1597
1598 \begin_layout Plain Layout
1599 png
1600 \end_layout
1601
1602 \end_inset
1603
1604 , should not use this option.
1605  Formats that can both represent vector graphics and documents like 
1606 \begin_inset Flex Code
1607 status collapsed
1608
1609 \begin_layout Plain Layout
1610 pdf
1611 \end_layout
1612
1613 \end_inset
1614
1615  should use it.
1616 \end_layout
1617
1618 \begin_layout Standard
1619 The option 
1620 \begin_inset Flex MenuItem
1621 status collapsed
1622
1623 \begin_layout Plain Layout
1624 Vector graphics format
1625 \end_layout
1626
1627 \end_inset
1628
1629  tells LyX that a format can contain vector graphics.
1630  This information is used to determine the target format of included graphics
1631  for 
1632 \begin_inset Flex MenuItem
1633 status collapsed
1634
1635 \begin_layout Plain Layout
1636 pdflatex
1637 \end_layout
1638
1639 \end_inset
1640
1641  export.
1642  Included graphics may need to be converted to either 
1643 \begin_inset Flex MenuItem
1644 status collapsed
1645
1646 \begin_layout Plain Layout
1647 pdf
1648 \end_layout
1649
1650 \end_inset
1651
1652
1653 \begin_inset Flex MenuItem
1654 status collapsed
1655
1656 \begin_layout Plain Layout
1657 png
1658 \end_layout
1659
1660 \end_inset
1661
1662 , or 
1663 \begin_inset Flex MenuItem
1664 status collapsed
1665
1666 \begin_layout Plain Layout
1667 jpg
1668 \end_layout
1669
1670 \end_inset
1671
1672 , since 
1673 \begin_inset Flex MenuItem
1674 status collapsed
1675
1676 \begin_layout Plain Layout
1677 pdflatex
1678 \end_layout
1679
1680 \end_inset
1681
1682  cannot handle other image formats.
1683  If an included graphic is not already in 
1684 \begin_inset Flex MenuItem
1685 status collapsed
1686
1687 \begin_layout Plain Layout
1688 pdf
1689 \end_layout
1690
1691 \end_inset
1692
1693
1694 \begin_inset Flex MenuItem
1695 status collapsed
1696
1697 \begin_layout Plain Layout
1698 png
1699 \end_layout
1700
1701 \end_inset
1702
1703 , or 
1704 \begin_inset Flex MenuItem
1705 status collapsed
1706
1707 \begin_layout Plain Layout
1708 jpg
1709 \end_layout
1710
1711 \end_inset
1712
1713  format, it is converted to 
1714 \begin_inset Flex MenuItem
1715 status collapsed
1716
1717 \begin_layout Plain Layout
1718 pdf
1719 \end_layout
1720
1721 \end_inset
1722
1723  if the vector format option is set, and otherwise to 
1724 \begin_inset Flex MenuItem
1725 status collapsed
1726
1727 \begin_layout Plain Layout
1728 png
1729 \end_layout
1730
1731 \end_inset
1732
1733 .
1734 \end_layout
1735
1736 \begin_layout Section
1737 Copiers
1738 \end_layout
1739
1740 \begin_layout Standard
1741 Since all conversions from one format to another take place in LyX's temporary
1742  directory, it is sometimes necessary to modify a file before copying it
1743  to the temporary directory in order that the conversion may be performed.
1744 \begin_inset Foot
1745 status collapsed
1746
1747 \begin_layout Plain Layout
1748 For example, the file may refer to other files—images, for example—using
1749  relative file names, and these may become invalid when the file is copied
1750  to the temporary directory.
1751 \end_layout
1752
1753 \end_inset
1754
1755  This is done by a Copier: It copies a file to (or from) the temporary directory
1756  and may modify it in the process.
1757 \end_layout
1758
1759 \begin_layout Standard
1760 The definitions of the copiers may use four variables:
1761 \end_layout
1762
1763 \begin_layout Labeling
1764 \labelwidthstring 00.00.0000
1765 \begin_inset Flex Code
1766 status collapsed
1767
1768 \begin_layout Plain Layout
1769 $$s
1770 \end_layout
1771
1772 \end_inset
1773
1774  The LyX system directory (e.
1775 \begin_inset space \thinspace{}
1776 \end_inset
1777
1778 g.
1779 \begin_inset space \space{}
1780 \end_inset
1781
1782
1783 \begin_inset Flex MenuItem
1784 status collapsed
1785
1786 \begin_layout Plain Layout
1787 /usr/share/lyx
1788 \end_layout
1789
1790 \end_inset
1791
1792 ).
1793 \end_layout
1794
1795 \begin_layout Labeling
1796 \labelwidthstring 00.00.0000
1797 \begin_inset Flex Code
1798 status collapsed
1799
1800 \begin_layout Plain Layout
1801 $$i
1802 \end_layout
1803
1804 \end_inset
1805
1806  The input file
1807 \end_layout
1808
1809 \begin_layout Labeling
1810 \labelwidthstring 00.00.0000
1811 \begin_inset Flex Code
1812 status collapsed
1813
1814 \begin_layout Plain Layout
1815 $$o
1816 \end_layout
1817
1818 \end_inset
1819
1820  The output file
1821 \change_inserted 1082167584 1348453985
1822
1823 \end_layout
1824
1825 \begin_layout Labeling
1826 \labelwidthstring 00.00.0000
1827
1828 \change_inserted 1082167584 1348453986
1829 $$b The base name (without filename extension) in the LyX temporary directory
1830 \end_layout
1831
1832 \begin_layout Labeling
1833 \labelwidthstring 00.00.0000
1834
1835 \change_inserted 1082167584 1348453986
1836 $$p The full directory path of the LyX temporary directory
1837 \end_layout
1838
1839 \begin_layout Labeling
1840 \labelwidthstring 00.00.0000
1841
1842 \change_inserted 1082167584 1348453986
1843 $$r The full pathname to the original LyX file being processed
1844 \end_layout
1845
1846 \begin_layout Labeling
1847 \labelwidthstring 00.00.0000
1848
1849 \change_inserted 1082167584 1348453986
1850 $$f The filename (without any directory path) of the LyX file.
1851 \end_layout
1852
1853 \begin_layout Labeling
1854 \labelwidthstring 00.00.0000
1855 \begin_inset Flex Code
1856 status collapsed
1857
1858 \begin_layout Plain Layout
1859 $$l
1860 \end_layout
1861
1862 \end_inset
1863
1864  The `LaTeX name'
1865 \change_inserted 1082167584 1348453720
1866
1867 \end_layout
1868
1869 \begin_layout Standard
1870 The latter should be the filename as it would be used in a LaTeX's 
1871 \series bold
1872
1873 \backslash
1874 include
1875 \series default
1876  command.
1877  It is relevant only when exporting files suitable for such inclusion.
1878 \end_layout
1879
1880 \begin_layout Standard
1881 Copiers can be used to do almost anything with output files.
1882  For example, suppose you want generated pdf files to be copied to a special
1883  directory, 
1884 \begin_inset Flex Code
1885 status collapsed
1886
1887 \begin_layout Plain Layout
1888 /home/you/pdf/
1889 \end_layout
1890
1891 \end_inset
1892
1893 .
1894  Then you could write a shell script such as this one:
1895 \end_layout
1896
1897 \begin_layout Standard
1898 \begin_inset listings
1899 inline false
1900 status open
1901
1902 \begin_layout Plain Layout
1903
1904 #!/bin/bash
1905 \end_layout
1906
1907 \begin_layout Plain Layout
1908
1909 FROMFILE=$1
1910 \end_layout
1911
1912 \begin_layout Plain Layout
1913
1914 TOFILE=`basename $2`
1915 \end_layout
1916
1917 \begin_layout Plain Layout
1918
1919 cp $FROMFILE /home/you/pdf/$TOFILE
1920 \end_layout
1921
1922 \end_inset
1923
1924 Save it in your local LyX directory—say, 
1925 \begin_inset Flex Code
1926 status collapsed
1927
1928 \begin_layout Plain Layout
1929 /home/you/.lyx/scripts/pdfcopier.sh
1930 \end_layout
1931
1932 \end_inset
1933
1934 —and make it executable, if you need to do so on your platform.
1935  Then, in the 
1936 \begin_inset Flex MenuItem
1937 status collapsed
1938
1939 \begin_layout Plain Layout
1940 Tools\SpecialChar \menuseparator
1941 Preferences
1942 \end_layout
1943
1944 \end_inset
1945
1946  dialog, select under 
1947 \begin_inset Flex MenuItem
1948 status collapsed
1949
1950 \begin_layout Plain Layout
1951 File Handling\SpecialChar \menuseparator
1952 File formats
1953 \end_layout
1954
1955 \end_inset
1956
1957  the 
1958 \begin_inset Flex MenuItem
1959 status collapsed
1960
1961 \begin_layout Plain Layout
1962 PDF(pdflatex)
1963 \end_layout
1964
1965 \end_inset
1966
1967  format—or one of the other pdf formats—and enter 
1968 \begin_inset Flex Code
1969 status collapsed
1970
1971 \begin_layout Plain Layout
1972 pdfcopier.sh $$i $$o
1973 \end_layout
1974
1975 \end_inset
1976
1977  into the 
1978 \begin_inset Flex MenuItem
1979 status collapsed
1980
1981 \begin_layout Plain Layout
1982 Copier
1983 \end_layout
1984
1985 \end_inset
1986
1987  field.
1988  
1989 \end_layout
1990
1991 \begin_layout Standard
1992 Copiers are used by LyX in various of its own conversions.
1993  For example, if appropriate programs are found, LyX will automatically
1994  install copiers for the 
1995 \begin_inset Flex MenuItem
1996 status collapsed
1997
1998 \begin_layout Plain Layout
1999 HTML
2000 \end_layout
2001
2002 \end_inset
2003
2004  and 
2005 \begin_inset Flex MenuItem
2006 status collapsed
2007
2008 \begin_layout Plain Layout
2009 HTML
2010 \begin_inset space ~
2011 \end_inset
2012
2013 (MS Word)
2014 \end_layout
2015
2016 \end_inset
2017
2018  formats.
2019  When these formats are exported, the copier sees that not just the main
2020  HTML file but various associated files (style files, images, etc.) are also
2021  copied.
2022  All these files are written to a subdirectory of the directory in which
2023  the original LyX file was found.
2024 \begin_inset Foot
2025 status collapsed
2026
2027 \begin_layout Plain Layout
2028 This copier can be customized.
2029  The optional 
2030 \begin_inset Quotes eld
2031 \end_inset
2032
2033 -e
2034 \begin_inset Quotes erd
2035 \end_inset
2036
2037  argument takes a comma-separated list of extensions to be copied; if it
2038  is omitted, all files will be copied.
2039  The 
2040 \begin_inset Quotes eld
2041 \end_inset
2042
2043 -t
2044 \begin_inset Quotes erd
2045 \end_inset
2046
2047  argument determines the extension added to the generated directory.
2048  By default, it is 
2049 \begin_inset Quotes eld
2050 \end_inset
2051
2052
2053 \begin_inset Flex MenuItem
2054 status collapsed
2055
2056 \begin_layout Plain Layout
2057 LyXconv
2058 \end_layout
2059
2060 \end_inset
2061
2062
2063 \begin_inset Quotes erd
2064 \end_inset
2065
2066 , so HTML generated from 
2067 \begin_inset Flex MenuItem
2068 status collapsed
2069
2070 \begin_layout Plain Layout
2071 /path/to/filename.lyx
2072 \end_layout
2073
2074 \end_inset
2075
2076  will end up in 
2077 \begin_inset Flex MenuItem
2078 status collapsed
2079
2080 \begin_layout Plain Layout
2081 /path/to/filename.html.LyXconv
2082 \end_layout
2083
2084 \end_inset
2085
2086 .
2087  
2088 \end_layout
2089
2090 \end_inset
2091
2092
2093 \end_layout
2094
2095 \begin_layout Section
2096 Converters
2097 \begin_inset CommandInset label
2098 LatexCommand label
2099 name "sec:Converters"
2100
2101 \end_inset
2102
2103
2104 \end_layout
2105
2106 \begin_layout Standard
2107 You can define your own Converters to convert files between different formats.
2108  This is done in the 
2109 \begin_inset Flex MenuItem
2110 status collapsed
2111
2112 \begin_layout Plain Layout
2113 Tools\SpecialChar \menuseparator
2114 Preferences\SpecialChar \menuseparator
2115 File Handling\SpecialChar \menuseparator
2116 Converters
2117 \end_layout
2118
2119 \end_inset
2120
2121  dialog.
2122 \end_layout
2123
2124 \begin_layout Standard
2125 To define a new converter, select the 
2126 \begin_inset Flex MenuItem
2127 status collapsed
2128
2129 \begin_layout Plain Layout
2130 From
2131 \begin_inset space ~
2132 \end_inset
2133
2134 format
2135 \end_layout
2136
2137 \end_inset
2138
2139  and 
2140 \begin_inset Flex MenuItem
2141 status collapsed
2142
2143 \begin_layout Plain Layout
2144 To
2145 \begin_inset space ~
2146 \end_inset
2147
2148 format
2149 \end_layout
2150
2151 \end_inset
2152
2153  from the drop-down lists, enter the command needed for the conversion,
2154  and then press the 
2155 \begin_inset Flex MenuItem
2156 status collapsed
2157
2158 \begin_layout Plain Layout
2159 Add
2160 \end_layout
2161
2162 \end_inset
2163
2164  button.
2165  Several variables can be used in the definition of converters:
2166 \end_layout
2167
2168 \begin_layout Labeling
2169 \labelwidthstring 00.00.0000
2170 \begin_inset Flex Code
2171 status collapsed
2172
2173 \begin_layout Plain Layout
2174 $$s
2175 \end_layout
2176
2177 \end_inset
2178
2179  The LyX system directory
2180 \end_layout
2181
2182 \begin_layout Labeling
2183 \labelwidthstring 00.00.0000
2184 \begin_inset Flex Code
2185 status collapsed
2186
2187 \begin_layout Plain Layout
2188 $$i
2189 \end_layout
2190
2191 \end_inset
2192
2193  The input file
2194 \end_layout
2195
2196 \begin_layout Labeling
2197 \labelwidthstring 00.00.0000
2198 \begin_inset Flex Code
2199 status collapsed
2200
2201 \begin_layout Plain Layout
2202 $$o
2203 \end_layout
2204
2205 \end_inset
2206
2207  The output file
2208 \end_layout
2209
2210 \begin_layout Labeling
2211 \labelwidthstring 00.00.0000
2212 \begin_inset Flex Code
2213 status collapsed
2214
2215 \begin_layout Plain Layout
2216 $$b
2217 \end_layout
2218
2219 \end_inset
2220
2221  The base filename of the input file (i.
2222 \begin_inset space \thinspace{}
2223 \end_inset
2224
2225 g., without the extension)
2226 \end_layout
2227
2228 \begin_layout Labeling
2229 \labelwidthstring 00.00.0000
2230 \begin_inset Flex Code
2231 status collapsed
2232
2233 \begin_layout Plain Layout
2234 $$p
2235 \end_layout
2236
2237 \end_inset
2238
2239  The path to the input file
2240 \end_layout
2241
2242 \begin_layout Labeling
2243 \labelwidthstring 00.00.0000
2244 \begin_inset Flex Code
2245 status collapsed
2246
2247 \begin_layout Plain Layout
2248 $$r
2249 \end_layout
2250
2251 \end_inset
2252
2253  The path to the original input file (this is different from $$p when a
2254  chain of converters is called)
2255 \end_layout
2256
2257 \begin_layout Labeling
2258 \labelwidthstring 00.00.0000
2259 \begin_inset Flex Code
2260 status collapsed
2261
2262 \begin_layout Plain Layout
2263 $$e
2264 \end_layout
2265
2266 \end_inset
2267
2268  The iconv name for the encoding of the document.
2269 \end_layout
2270
2271 \begin_layout Standard
2272 In the 
2273 \begin_inset Flex MenuItem
2274 status collapsed
2275
2276 \begin_layout Plain Layout
2277 Extra
2278 \begin_inset space ~
2279 \end_inset
2280
2281 Flag
2282 \end_layout
2283
2284 \end_inset
2285
2286  field you can enter the following flags, separated by commas:
2287 \end_layout
2288
2289 \begin_layout Labeling
2290 \labelwidthstring 00.00.0000
2291 \begin_inset Flex Code
2292 status collapsed
2293
2294 \begin_layout Plain Layout
2295 latex
2296 \end_layout
2297
2298 \end_inset
2299
2300  This converter runs some form of LaTeX.
2301  This will make LyX's LaTeX error logs available.
2302 \end_layout
2303
2304 \begin_layout Labeling
2305 \labelwidthstring 00.00.0000
2306 \begin_inset Flex Code
2307 status collapsed
2308
2309 \begin_layout Plain Layout
2310 needaux
2311 \end_layout
2312
2313 \end_inset
2314
2315  Needs the LaTeX 
2316 \begin_inset Flex MenuItem
2317 status collapsed
2318
2319 \begin_layout Plain Layout
2320 .aux
2321 \end_layout
2322
2323 \end_inset
2324
2325  file for the conversion.
2326 \change_inserted 1414654397 1337693117
2327
2328 \end_layout
2329
2330 \begin_layout Labeling
2331 \labelwidthstring 00.00.0000
2332
2333 \change_inserted 1414654397 1337693188
2334 \begin_inset Flex Code
2335 status collapsed
2336
2337 \begin_layout Plain Layout
2338
2339 \change_inserted 1414654397 1337693129
2340 nice
2341 \change_unchanged
2342
2343 \end_layout
2344
2345 \end_inset
2346
2347  Needs a 
2348 \begin_inset Quotes eld
2349 \end_inset
2350
2351 nice
2352 \begin_inset Quotes erd
2353 \end_inset
2354
2355  file from the backend, which in practice means a LaTeX file like the one
2356  we would export, without 
2357 \begin_inset Flex Code
2358 status collapsed
2359
2360 \begin_layout Plain Layout
2361
2362 \change_inserted 1414654397 1337693184
2363 input@path
2364 \change_unchanged
2365
2366 \end_layout
2367
2368 \end_inset
2369
2370 .
2371 \change_unchanged
2372
2373 \end_layout
2374
2375 \begin_layout Labeling
2376 \labelwidthstring 00.00.0000
2377 \begin_inset Flex Code
2378 status collapsed
2379
2380 \begin_layout Plain Layout
2381 xml
2382 \end_layout
2383
2384 \end_inset
2385
2386  Output is XML.
2387 \end_layout
2388
2389 \begin_layout Standard
2390 The following three flags are not really flags at all because they take
2391  an argument in the 
2392 \begin_inset Flex MenuItem
2393 status collapsed
2394
2395 \begin_layout Plain Layout
2396 key
2397 \begin_inset space ~
2398 \end_inset
2399
2400 =
2401 \begin_inset space ~
2402 \end_inset
2403
2404 value
2405 \end_layout
2406
2407 \end_inset
2408
2409  format:
2410 \end_layout
2411
2412 \begin_layout Labeling
2413 \labelwidthstring 00.00.0000
2414 \begin_inset Flex Code
2415 status collapsed
2416
2417 \begin_layout Plain Layout
2418 parselog
2419 \end_layout
2420
2421 \end_inset
2422
2423  If set, the converter's standard error will be redirected to a file 
2424 \begin_inset Flex Code
2425 status collapsed
2426
2427 \begin_layout Plain Layout
2428 infile.out
2429 \end_layout
2430
2431 \end_inset
2432
2433 , and the script given as argument will be run as: 
2434 \begin_inset Flex Code
2435 status collapsed
2436
2437 \begin_layout Plain Layout
2438 script < infile.out > infile.log
2439 \end_layout
2440
2441 \end_inset
2442
2443 .
2444  The argument may contain 
2445 \begin_inset Flex Code
2446 status collapsed
2447
2448 \begin_layout Plain Layout
2449 $$s
2450 \end_layout
2451
2452 \end_inset
2453
2454 .
2455 \end_layout
2456
2457 \begin_layout Labeling
2458 \labelwidthstring 00.00.0000
2459 \begin_inset Flex Code
2460 status collapsed
2461
2462 \begin_layout Plain Layout
2463 resultdir
2464 \end_layout
2465
2466 \end_inset
2467
2468  The name of the directory in which the converter will dump the generated
2469  files.
2470  LyX will not create this directory, and it does not copy anything into
2471  it, though it will copy this directory to the destination.
2472  The argument may contain 
2473 \begin_inset Flex Code
2474 status collapsed
2475
2476 \begin_layout Plain Layout
2477 $$b
2478 \end_layout
2479
2480 \end_inset
2481
2482 , which will be replaced by the base name of the input and output files,
2483  respectively, when the directory is copied.
2484 \begin_inset Newline newline
2485 \end_inset
2486
2487 Note that resultdir and usetempdir make no sense together.
2488  The latter will be ignored if the former is given.
2489 \end_layout
2490
2491 \begin_layout Labeling
2492 \labelwidthstring 00.00.0000
2493 \begin_inset Flex Code
2494 status collapsed
2495
2496 \begin_layout Plain Layout
2497 resultfile
2498 \end_layout
2499
2500 \end_inset
2501
2502  Determines the output file name and may, contain 
2503 \begin_inset Flex Code
2504 status collapsed
2505
2506 \begin_layout Plain Layout
2507 $$b
2508 \end_layout
2509
2510 \end_inset
2511
2512 .
2513  Sensible only with resultdir and optional even then; if not given, it defaults
2514  to `index'.
2515 \end_layout
2516
2517 \begin_layout Standard
2518 None of these last three are presently used in any of the converters that
2519  are installed with LyX.
2520  
2521 \end_layout
2522
2523 \begin_layout Standard
2524 You do not have to define converters for all formats between which you want
2525  to convert.
2526  For example, you will note that there is no `LyX to PostScript' converter,
2527  but LyX will export PostScript.
2528  It does so by first creating a LaTeX file (no converter needs to be defined
2529  for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2530  and finally converting the resulting DVI file to PostScript.
2531  LyX finds such `chains' of converters automatically, and it will always
2532  choose the shortest possible chain.
2533  You can, though, still define multiple conversion methods between file
2534  formats.
2535  For example, the standard LyX configuration provides three ways to convert
2536  LaTeX to PDF: Directly, using 
2537 \begin_inset Flex MenuItem
2538 status collapsed
2539
2540 \begin_layout Plain Layout
2541 pdflatex
2542 \end_layout
2543
2544 \end_inset
2545
2546 ; via (DVI and) PostScript, using 
2547 \begin_inset Flex MenuItem
2548 status collapsed
2549
2550 \begin_layout Plain Layout
2551 ps2pdf
2552 \end_layout
2553
2554 \end_inset
2555
2556 ; or via DVI, using 
2557 \begin_inset Flex MenuItem
2558 status collapsed
2559
2560 \begin_layout Plain Layout
2561 dvipdfm
2562 \end_layout
2563
2564 \end_inset
2565
2566 .
2567  To define such alternate chains, you must define multiple target `file
2568  formats', as described in section 
2569 \begin_inset CommandInset ref
2570 LatexCommand ref
2571 reference "sec:Formats"
2572
2573 \end_inset
2574
2575 .
2576  For example, in the standard configuration, the formats named 
2577 \begin_inset Flex MenuItem
2578 status collapsed
2579
2580 \begin_layout Plain Layout
2581 pdf
2582 \end_layout
2583
2584 \end_inset
2585
2586
2587 \begin_inset Flex MenuItem
2588 status collapsed
2589
2590 \begin_layout Plain Layout
2591 pdf2
2592 \end_layout
2593
2594 \end_inset
2595
2596 , and 
2597 \begin_inset Flex MenuItem
2598 status collapsed
2599
2600 \begin_layout Plain Layout
2601 pdf3
2602 \end_layout
2603
2604 \end_inset
2605
2606  are defined, all of which share the extension 
2607 \begin_inset Flex MenuItem
2608 status collapsed
2609
2610 \begin_layout Plain Layout
2611 .pdf
2612 \end_layout
2613
2614 \end_inset
2615
2616 , and which correspond to the conversion methods just mentioned.
2617 \end_layout
2618
2619 \begin_layout Chapter
2620 Internationalizing LyX
2621 \begin_inset CommandInset label
2622 LatexCommand label
2623 name "cha:Internationalizing-LyX"
2624
2625 \end_inset
2626
2627
2628 \end_layout
2629
2630 \begin_layout Standard
2631 LyX supports using a translated interface.
2632  Last time we checked, LyX provided text in thirty languages.
2633  The language of choice is called your 
2634 \emph on
2635 locale
2636 \emph default
2637 .
2638  (For further reading on locale settings, see also the documentation for
2639  locale that comes with your operating system.
2640  For Linux, the manual page for 
2641 \begin_inset Flex Code
2642 status collapsed
2643
2644 \begin_layout Plain Layout
2645 locale(5)
2646 \end_layout
2647
2648 \end_inset
2649
2650  could be a good place to start).
2651 \end_layout
2652
2653 \begin_layout Standard
2654 Notice that these translations will work, but do contain a few flaws.
2655  In particular, all dialogs have been designed with the English text in
2656  mind, which means that some of the translated text will be too large to
2657  fit within the space allocated.
2658  This is only a display problem and will not cause any harm.
2659  Also, you will find that some of the translations do not define shortcut
2660  keys for everything.
2661  Sometimes, there are simply not enough free letters to do it.
2662  Other times, the translator just hasn't got around to doing it yet.
2663  Our localization team, which you may wish to join,
2664 \begin_inset Foot
2665 status collapsed
2666
2667 \begin_layout Plain Layout
2668 If you are a fluent speaker of a language other than English, joining these
2669  teams is a great way to give back to the LyX community!
2670 \end_layout
2671
2672 \end_inset
2673
2674  will of course try to fix these shortcomings in future versions of LyX.
2675 \end_layout
2676
2677 \begin_layout Section
2678 Translating LyX
2679 \end_layout
2680
2681 \begin_layout Subsection
2682 Translating the graphical user interface (text messages).
2683 \end_layout
2684
2685 \begin_layout Standard
2686 LyX uses the GNU 
2687 \begin_inset Flex Code
2688 status collapsed
2689
2690 \begin_layout Plain Layout
2691 gettext
2692 \end_layout
2693
2694 \end_inset
2695
2696  library to handle the internationalization of the interface.
2697  To have LyX speak your favorite language in all menus and dialogs, you
2698  need a 
2699 \begin_inset Flex Code
2700 status collapsed
2701
2702 \begin_layout Plain Layout
2703 po
2704 \end_layout
2705
2706 \end_inset
2707
2708 -file for that language.
2709  When this is available, you'll have to generate a 
2710 \begin_inset Flex Code
2711 status collapsed
2712
2713 \begin_layout Plain Layout
2714 mo
2715 \end_layout
2716
2717 \end_inset
2718
2719 -file from it and install the 
2720 \begin_inset Flex Code
2721 status collapsed
2722
2723 \begin_layout Plain Layout
2724 mo
2725 \end_layout
2726
2727 \end_inset
2728
2729 -file.
2730  The process of doing all of this is explained in the documentation for
2731  GNU 
2732 \begin_inset Flex Code
2733 status collapsed
2734
2735 \begin_layout Plain Layout
2736 gettext
2737 \end_layout
2738
2739 \end_inset
2740
2741 .
2742  It is possible to do this just for yourself, but if you're going to do
2743  it, you might as well share the results of your labors with the rest of
2744  the LyX community.
2745  Send a message to the LyX developers' list for more information about how
2746  to proceed.
2747 \end_layout
2748
2749 \begin_layout Standard
2750 In short, this is what you should do (xx denotes the language code):
2751 \end_layout
2752
2753 \begin_layout Itemize
2754 Check out the LyX source code.
2755  (See the 
2756 \begin_inset CommandInset href
2757 LatexCommand href
2758 name "information on the web"
2759 target "http://www.lyx.org/HowToUseSVN"
2760
2761 \end_inset
2762
2763 .)
2764 \end_layout
2765
2766 \begin_layout Itemize
2767 Copy the file 
2768 \begin_inset Flex Code
2769 status collapsed
2770
2771 \begin_layout Plain Layout
2772 lyx.pot
2773 \end_layout
2774
2775 \end_inset
2776
2777  to the folder of the 
2778 \begin_inset Flex Code
2779 status collapsed
2780
2781 \begin_layout Plain Layout
2782 **.po
2783 \end_layout
2784
2785 \end_inset
2786
2787  files.
2788  Then rename it to 
2789 \begin_inset Flex Code
2790 status collapsed
2791
2792 \begin_layout Plain Layout
2793 xx.po
2794 \end_layout
2795
2796 \end_inset
2797
2798 .
2799  (If 
2800 \begin_inset Flex Code
2801 status collapsed
2802
2803 \begin_layout Plain Layout
2804 lyx.pot
2805 \end_layout
2806
2807 \end_inset
2808
2809  doesn't exist anywhere, it can be remade with the console command 
2810 \begin_inset Flex Code
2811 status collapsed
2812
2813 \begin_layout Plain Layout
2814 make lyx.pot
2815 \end_layout
2816
2817 \end_inset
2818
2819  in that directory, or you can use an existing po-file for some other language
2820  as a template).
2821 \end_layout
2822
2823 \begin_layout Itemize
2824 Edit 
2825 \begin_inset Flex Code
2826 status collapsed
2827
2828 \begin_layout Plain Layout
2829 xx.po
2830 \end_layout
2831
2832 \end_inset
2833
2834 .
2835 \begin_inset Foot
2836 status collapsed
2837
2838 \begin_layout Plain Layout
2839 This is just a text file, so it can be edited in any text editor.
2840  But there are also specialized programs that support such editing, such
2841  as 
2842 \family typewriter
2843 Poedit
2844 \family default
2845  (for all platforms) or 
2846 \family typewriter
2847 KBabel
2848 \family default
2849  (for KDE).
2850  
2851 \family typewriter
2852 Emacs
2853 \family default
2854  contains a `mode' for editing 
2855 \begin_inset Flex Code
2856 status collapsed
2857
2858 \begin_layout Plain Layout
2859 po
2860 \end_layout
2861
2862 \end_inset
2863
2864  files, as well.
2865 \end_layout
2866
2867 \end_inset
2868
2869  For some menu- and widget-labels, there are also shortcut keys that should
2870  be translated.
2871  Those keys are marked after a `|', and should be translated according to
2872  the words and phrases of the language.
2873  You should also fill also out the information at the beginning of the new
2874  
2875 \begin_inset Flex Code
2876 status collapsed
2877
2878 \begin_layout Plain Layout
2879 po
2880 \end_layout
2881
2882 \end_inset
2883
2884 -file with your email-address, etc., so people know where to reach you with
2885  suggestions and entertaining flames.
2886 \end_layout
2887
2888 \begin_layout Standard
2889 If you are just doing this on your own, then:
2890 \end_layout
2891
2892 \begin_layout Itemize
2893 Generate 
2894 \begin_inset Flex Code
2895 status collapsed
2896
2897 \begin_layout Plain Layout
2898 xx.mo
2899 \end_layout
2900
2901 \end_inset
2902
2903 .
2904  This can be done with 
2905 \begin_inset Flex Code
2906 status collapsed
2907
2908 \begin_layout Plain Layout
2909 msgfmt -o xx.mo < xx.po
2910 \end_layout
2911
2912 \end_inset
2913
2914 .
2915 \end_layout
2916
2917 \begin_layout Itemize
2918 Copy the 
2919 \begin_inset Flex Code
2920 status collapsed
2921
2922 \begin_layout Plain Layout
2923 mo
2924 \end_layout
2925
2926 \end_inset
2927
2928 -file to your locale-tree, at the correct directory for application messages
2929  for the language
2930 \series bold
2931  
2932 \series default
2933 xx, and under the name 
2934 \begin_inset Flex Code
2935 status collapsed
2936
2937 \begin_layout Plain Layout
2938 lyx.mo
2939 \end_layout
2940
2941 \end_inset
2942
2943  (e.
2944 \begin_inset space \thinspace{}
2945 \end_inset
2946
2947 g.
2948 \begin_inset space \space{}
2949 \end_inset
2950
2951
2952 \begin_inset Flex Code
2953 status collapsed
2954
2955 \begin_layout Plain Layout
2956 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
2957 \end_layout
2958
2959 \end_inset
2960
2961
2962 \series bold
2963 .
2964 \end_layout
2965
2966 \begin_layout Standard
2967 As said, however, it would be best if the new 
2968 \begin_inset Flex Code
2969 status collapsed
2970
2971 \begin_layout Plain Layout
2972 po
2973 \end_layout
2974
2975 \end_inset
2976
2977 -file could be added to the LyX distribution, so others can use it.
2978  Adding it involves making additional changes to LyX.
2979  So send an email to the developers' mailing list if you're interested in
2980  doing that.
2981 \end_layout
2982
2983 \begin_layout Subsubsection
2984 Ambiguous messages
2985 \end_layout
2986
2987 \begin_layout Standard
2988 Sometimes it turns out that one English message needs to be translated into
2989  different messages in the target language.
2990  One example is the message 
2991 \begin_inset Flex Code
2992 status collapsed
2993
2994 \begin_layout Plain Layout
2995 To
2996 \end_layout
2997
2998 \end_inset
2999
3000  which has the German translation 
3001 \lang german
3002 Nach
3003 \lang english
3004  or 
3005 \lang german
3006 Bis
3007 \lang english
3008 , depending upon exactly what the English 
3009 \begin_inset Quotes eld
3010 \end_inset
3011
3012 to
3013 \begin_inset Quotes erd
3014 \end_inset
3015
3016  means.
3017  GNU 
3018 \begin_inset Flex Code
3019 status collapsed
3020
3021 \begin_layout Plain Layout
3022 gettext
3023 \end_layout
3024
3025 \end_inset
3026
3027  does not handle such ambiguous translations.
3028  Therefore you have to add some context information to the message: Instead
3029  of 
3030 \begin_inset Flex Code
3031 status collapsed
3032
3033 \begin_layout Plain Layout
3034 To
3035 \end_layout
3036
3037 \end_inset
3038
3039  it becomes 
3040 \begin_inset Flex Code
3041 status collapsed
3042
3043 \begin_layout Plain Layout
3044 To[[as in 'From format x to format y']]
3045 \end_layout
3046
3047 \end_inset
3048
3049  and 
3050 \begin_inset Flex Code
3051 status collapsed
3052
3053 \begin_layout Plain Layout
3054 To[[as in 'From page x to page y']].
3055 \end_layout
3056
3057 \end_inset
3058
3059  Now the two occurrences of 
3060 \begin_inset Flex Code
3061 status collapsed
3062
3063 \begin_layout Plain Layout
3064 To
3065 \end_layout
3066
3067 \end_inset
3068
3069  are different for 
3070 \begin_inset Flex Code
3071 status collapsed
3072
3073 \begin_layout Plain Layout
3074 gettext
3075 \end_layout
3076
3077 \end_inset
3078
3079  and can be translated correctly to 
3080 \lang german
3081 Nach
3082 \lang english
3083  and 
3084 \lang german
3085 Bis
3086 \lang english
3087 , respectively.
3088 \end_layout
3089
3090 \begin_layout Standard
3091 Of course the context information needs to be stripped off the original
3092  message when no translation is used.
3093  Therefore you have to put it in double square brackets at the end of the
3094  message (see the example above).
3095  The translation mechanism of LyX ensures that everything in double square
3096  brackets at the end of messages is removed before displaying the message.
3097 \end_layout
3098
3099 \begin_layout Subsection
3100 Translating the documentation.
3101 \end_layout
3102
3103 \begin_layout Standard
3104 The online documentation (in the 
3105 \begin_inset Flex MenuItem
3106 status collapsed
3107
3108 \begin_layout Plain Layout
3109 Help
3110 \end_layout
3111
3112 \end_inset
3113
3114 -menu) can (and should!) be translated.
3115  If there are translated versions of the documentation available
3116 \begin_inset Foot
3117 status collapsed
3118
3119 \begin_layout Plain Layout
3120 As of March 2008, at least some of the documents have been translated into
3121  fourteen languages, with the Tutorial available in a few more.
3122 \end_layout
3123
3124 \end_inset
3125
3126  and the locale is set accordingly, these will be used automagically by
3127  LyX.
3128  LyX looks for translated versions as 
3129 \begin_inset Flex Code
3130 status collapsed
3131
3132 \begin_layout Plain Layout
3133 LyXDir/doc/xx/DocName.lyx
3134 \end_layout
3135
3136 \end_inset
3137
3138 , where 
3139 \begin_inset Flex Code
3140 status collapsed
3141
3142 \begin_layout Plain Layout
3143 xx
3144 \end_layout
3145
3146 \end_inset
3147
3148  is the code for the language currently in use.
3149  If there are no translated documents, the default English versions will
3150  be displayed.
3151  Note that the translated versions must have the same filenames (
3152 \begin_inset Flex Code
3153 status collapsed
3154
3155 \begin_layout Plain Layout
3156 DocName
3157 \end_layout
3158
3159 \end_inset
3160
3161  above) as the original.
3162  If you feel up to translating the documentation (an excellent way to proof-read
3163  the original documentation by the way!), there are a few things you should
3164  do right away:
3165 \end_layout
3166
3167 \begin_layout Itemize
3168 Check out the documentation translation web page at 
3169 \begin_inset CommandInset href
3170 LatexCommand href
3171 name "http://www.lyx.org/Translation"
3172 target "http://www.lyx.org/Translation"
3173
3174 \end_inset
3175
3176 .
3177  That way, you can find out which (if any) documents have already been translate
3178 d into your language.
3179  You can also find out who (if anyone) is organizing the effort to translate
3180  the documentation into your language.
3181  If no one is organizing the effort, please let us know that you're interested.
3182 \end_layout
3183
3184 \begin_layout Standard
3185 Once you get to actually translating, here's a few hints for you that may
3186  save you trouble:
3187 \end_layout
3188
3189 \begin_layout Itemize
3190 Join the documentation team! There is information on how to do that in 
3191 \begin_inset Flex Code
3192 status collapsed
3193
3194 \begin_layout Plain Layout
3195 Intro.lyx
3196 \end_layout
3197
3198 \end_inset
3199
3200  (
3201 \begin_inset Flex MenuItem
3202 status collapsed
3203
3204 \begin_layout Plain Layout
3205 Help\SpecialChar \menuseparator
3206 Introduction
3207 \end_layout
3208
3209 \end_inset
3210
3211 ), which by the way is the first document you should translate.
3212 \end_layout
3213
3214 \begin_layout Itemize
3215 Learn the typographic conventions for the language you are translating to.
3216  Typography is an ancient art and over the centuries, a great variety of
3217  conventions have developed throughout different parts of the world.
3218  Also study the professional terminology amongst typographers in your country.
3219  Inventing your own terminology will only confuse the users.
3220  
3221 \emph on
3222 (Warning! Typography is addictive!)
3223 \end_layout
3224
3225 \begin_layout Itemize
3226 Make a copy of the document.
3227  This will be your working copy.
3228  You can use this as your personal translated help-file by placing it in
3229  your 
3230 \begin_inset Flex Code
3231 status collapsed
3232
3233 \begin_layout Plain Layout
3234 UserDir/doc/xx/
3235 \end_layout
3236
3237 \end_inset
3238
3239  directory.
3240 \end_layout
3241
3242 \begin_layout Itemize
3243 Sometimes the original document (from the LyX-team) will be updated.
3244  Use the source viewer at 
3245 \begin_inset CommandInset href
3246 LatexCommand href
3247 name "http://www.lyx.org/trac/timeline"
3248 target "http://www.lyx.org/trac/timeline"
3249
3250 \end_inset
3251
3252  to see what has been changed.
3253  That way you can easily see which parts of the translated document need
3254  to be updated.
3255 \end_layout
3256
3257 \begin_layout Standard
3258 If you ever find an error in the original document, fix it and notify the
3259  rest of the documentation team of the changes! (You didn't forget to join
3260  the documentation team, did you?)
3261 \end_layout
3262
3263 \begin_layout Standard
3264 \begin_inset Branch OutDated
3265 status collapsed
3266
3267 \begin_layout Section
3268 International Keyboard Support
3269 \end_layout
3270
3271 \begin_layout Standard
3272
3273 \emph on
3274 [Editor's Note: The following section is by
3275 \emph default
3276  
3277 \shape smallcaps
3278 \emph on
3279 Ivan Schreter
3280 \shape default
3281 .
3282  It needs to be fixed to conform to the new Documentation Style sheet and
3283  to make use of the new v1.0 features.
3284  The whole thing also needs to be merged with the section following it.-jw
3285  It may also be badly out of date.-rh (2008)]
3286 \end_layout
3287
3288 \begin_layout Subsection
3289 Defining Own Keymaps: Keymap File Format
3290 \end_layout
3291
3292 \begin_layout Standard
3293 Let's look at a keyboard definition file a little closer.
3294  It is a plain text file defining
3295 \end_layout
3296
3297 \begin_layout Itemize
3298 key-to-key or key-to-string translations
3299 \end_layout
3300
3301 \begin_layout Itemize
3302 dead keys
3303 \end_layout
3304
3305 \begin_layout Itemize
3306 dead keys exceptions
3307 \end_layout
3308
3309 \begin_layout Standard
3310 To define key-to-key or key-to-string translation, use this command:
3311 \end_layout
3312
3313 \begin_layout Quotation
3314 \begin_inset Flex Code
3315 status collapsed
3316
3317 \begin_layout Plain Layout
3318
3319 \backslash
3320 kmap
3321 \end_layout
3322
3323 \end_inset
3324
3325  
3326 \begin_inset Flex Code
3327 status collapsed
3328
3329 \begin_layout Plain Layout
3330 key
3331 \end_layout
3332
3333 \end_inset
3334
3335  outstring 
3336 \end_layout
3337
3338 \begin_layout Standard
3339 where 
3340 \begin_inset Flex Code
3341 status collapsed
3342
3343 \begin_layout Plain Layout
3344 key
3345 \end_layout
3346
3347 \end_inset
3348
3349  is the key to be translated and 
3350 \begin_inset Flex Code
3351 status collapsed
3352
3353 \begin_layout Plain Layout
3354 outstring
3355 \end_layout
3356
3357 \end_inset
3358
3359  is the string to be inserted into the document.
3360  To define dead keys, use:
3361 \end_layout
3362
3363 \begin_layout Quotation
3364 \begin_inset Flex Code
3365 status collapsed
3366
3367 \begin_layout Plain Layout
3368
3369 \backslash
3370 kmod
3371 \end_layout
3372
3373 \end_inset
3374
3375  
3376 \begin_inset Flex Code
3377 status collapsed
3378
3379 \begin_layout Plain Layout
3380 key
3381 \end_layout
3382
3383 \end_inset
3384
3385  deadkey
3386 \end_layout
3387
3388 \begin_layout Standard
3389 where 
3390 \begin_inset Flex Code
3391 status collapsed
3392
3393 \begin_layout Plain Layout
3394 key
3395 \end_layout
3396
3397 \end_inset
3398
3399  is a keyboard key and 
3400 \begin_inset Flex Code
3401 status collapsed
3402
3403 \begin_layout Plain Layout
3404 deadkey
3405 \end_layout
3406
3407 \end_inset
3408
3409  is dead key name.
3410  The following dead keys are supported (shortcut name is in parentheses):
3411 \end_layout
3412
3413 \begin_layout Quotation
3414
3415 \emph on
3416 Name
3417 \begin_inset space \hfill{}
3418 \end_inset
3419
3420 Example
3421 \end_layout
3422
3423 \begin_layout Quotation
3424 acute (acu)
3425 \begin_inset space \hfill{}
3426 \end_inset
3427
3428 áéíóú
3429 \end_layout
3430
3431 \begin_layout Quotation
3432 grave (gra)
3433 \begin_inset space \hfill{}
3434 \end_inset
3435
3436 àèìòù
3437 \end_layout
3438
3439 \begin_layout Quotation
3440 macron (mac)
3441 \begin_inset space \hfill{}
3442 \end_inset
3443
3444  ō
3445 \end_layout
3446
3447 \begin_layout Quotation
3448 tilde (til)
3449 \begin_inset space \hfill{}
3450 \end_inset
3451
3452 ñÑ
3453 \end_layout
3454
3455 \begin_layout Quotation
3456 underbar (underb)
3457 \begin_inset space \hfill{}
3458 \end_inset
3459
3460
3461 \begin_inset ERT
3462 status open
3463
3464 \begin_layout Plain Layout
3465
3466
3467 \backslash
3468 b o
3469 \end_layout
3470
3471 \end_inset
3472
3473
3474 \end_layout
3475
3476 \begin_layout Quotation
3477 cedilla (ced)
3478 \begin_inset space \hfill{}
3479 \end_inset
3480
3481 çÇ
3482 \end_layout
3483
3484 \begin_layout Quotation
3485 underdot (underd)
3486 \begin_inset space \hfill{}
3487 \end_inset
3488
3489
3490 \begin_inset ERT
3491 status open
3492
3493 \begin_layout Plain Layout
3494
3495
3496 \backslash
3497 d o
3498 \end_layout
3499
3500 \end_inset
3501
3502
3503 \end_layout
3504
3505 \begin_layout Quotation
3506 circumflex (circu)
3507 \begin_inset space \hfill{}
3508 \end_inset
3509
3510 âêîôû
3511 \end_layout
3512
3513 \begin_layout Quotation
3514 circle (circl)
3515 \begin_inset space \hfill{}
3516 \end_inset
3517
3518 ÅůŮ
3519 \end_layout
3520
3521 \begin_layout Quotation
3522 tie (tie)
3523 \begin_inset space \hfill{}
3524 \end_inset
3525
3526
3527 \begin_inset ERT
3528 status open
3529
3530 \begin_layout Plain Layout
3531
3532
3533 \backslash
3534 t o
3535 \end_layout
3536
3537 \end_inset
3538
3539
3540 \end_layout
3541
3542 \begin_layout Quotation
3543 breve (bre)
3544 \begin_inset space \hfill{}
3545 \end_inset
3546
3547 ă
3548 \begin_inset ERT
3549 status open
3550
3551 \begin_layout Plain Layout
3552
3553
3554 \backslash
3555 u o
3556 \end_layout
3557
3558 \end_inset
3559
3560
3561 \end_layout
3562
3563 \begin_layout Quotation
3564 caron (car)
3565 \begin_inset space \hfill{}
3566 \end_inset
3567
3568 čšž
3569 \end_layout
3570
3571 \begin_layout Quotation
3572 hungarian umlaut (hug)
3573 \begin_inset space \hfill{}
3574 \end_inset
3575
3576 őű
3577 \end_layout
3578
3579 \begin_layout Quotation
3580 umlaut (uml)
3581 \begin_inset space \hfill{}
3582 \end_inset
3583
3584 äöü
3585 \end_layout
3586
3587 \begin_layout Quotation
3588 dot (dot)
3589 \begin_inset space \hfill{}
3590 \end_inset
3591
3592 ż
3593 \begin_inset ERT
3594 status open
3595
3596 \begin_layout Plain Layout
3597
3598
3599 \backslash
3600 .s
3601 \end_layout
3602
3603 \end_inset
3604
3605
3606 \end_layout
3607
3608 \begin_layout Standard
3609 Since in many international keyboards there are exceptions to what some
3610  dead keys should do, you can define them using
3611 \end_layout
3612
3613 \begin_layout Quotation
3614 \begin_inset Flex Code
3615 status collapsed
3616
3617 \begin_layout Plain Layout
3618
3619 \backslash
3620 kxmod
3621 \end_layout
3622
3623 \end_inset
3624
3625  deadkey key outstring
3626 \end_layout
3627
3628 \begin_layout Standard
3629 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3630 , so you put in
3631 \end_layout
3632
3633 \begin_layout Quotation
3634 \begin_inset Flex Code
3635 status collapsed
3636
3637 \begin_layout Plain Layout
3638
3639 \backslash
3640 kxmod
3641 \end_layout
3642
3643 \end_inset
3644
3645  caron o "
3646 \backslash
3647 ^o"
3648 \end_layout
3649
3650 \begin_layout Standard
3651 to make it work correctly.
3652  Also, you have to define as exceptions dead keys over i and j, to remove
3653  the dot from them before inserting an accent mark.
3654  I will change this when the time comes, but so far I haven't had time.
3655 \end_layout
3656
3657 \begin_layout Standard
3658 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3659  double backslash.
3660  Also, quotes and 
3661 \begin_inset Flex Code
3662 status collapsed
3663
3664 \begin_layout Plain Layout
3665 #
3666 \end_layout
3667
3668 \end_inset
3669
3670  have different meaning.
3671  
3672 \begin_inset Flex Code
3673 status collapsed
3674
3675 \begin_layout Plain Layout
3676 #
3677 \end_layout
3678
3679 \end_inset
3680
3681  marks comments, quotes start and end LaTeX-style commands.
3682  To enter quote, you'll need to use 
3683 \begin_inset Flex Code
3684 status collapsed
3685
3686 \begin_layout Plain Layout
3687
3688 \backslash
3689 "
3690 \end_layout
3691
3692 \end_inset
3693
3694 , to enter 
3695 \begin_inset Flex Code
3696 status collapsed
3697
3698 \begin_layout Plain Layout
3699 #
3700 \end_layout
3701
3702 \end_inset
3703
3704 , use 
3705 \begin_inset Flex Code
3706 status collapsed
3707
3708 \begin_layout Plain Layout
3709
3710 \backslash
3711 #
3712 \end_layout
3713
3714 \end_inset
3715
3716 .
3717 \end_layout
3718
3719 \begin_layout Standard
3720 If you make a keyboard description file that works for your language, please
3721  mail it to me, so I can include it in the next keymap distribution.
3722 \end_layout
3723
3724 \begin_layout Standard
3725 More keywords will be supported in keymap configuration file in future,
3726  like
3727 \end_layout
3728
3729 \begin_layout Itemize
3730 \begin_inset Flex Code
3731 status collapsed
3732
3733 \begin_layout Plain Layout
3734
3735 \backslash
3736 kinclude filename
3737 \end_layout
3738
3739 \end_inset
3740
3741
3742 \emph on
3743
3744 \begin_inset space \hfill{}
3745 \end_inset
3746
3747
3748 \begin_inset Flex Code
3749 status collapsed
3750
3751 \begin_layout Plain Layout
3752 include
3753 \end_layout
3754
3755 \end_inset
3756
3757  another file
3758 \end_layout
3759
3760 \begin_layout Itemize
3761 \begin_inset Flex Code
3762 status collapsed
3763
3764 \begin_layout Plain Layout
3765
3766 \backslash
3767 kprog program
3768 \end_layout
3769
3770 \end_inset
3771
3772
3773 \emph on
3774
3775 \begin_inset space \hfill{}
3776 \end_inset
3777
3778
3779 \begin_inset Flex Code
3780 status collapsed
3781
3782 \begin_layout Plain Layout
3783 define
3784 \end_layout
3785
3786 \end_inset
3787
3788  an external keymap translation program 
3789 \end_layout
3790
3791 \begin_layout Standard
3792 Also, it should look into 
3793 \begin_inset Flex Code
3794 status collapsed
3795
3796 \begin_layout Plain Layout
3797 lyxrc
3798 \end_layout
3799
3800 \end_inset
3801
3802  file for defaults, too (for example, a 
3803 \begin_inset Flex Code
3804 status collapsed
3805
3806 \begin_layout Plain Layout
3807
3808 \backslash
3809 kinclude
3810 \end_layout
3811
3812 \end_inset
3813
3814  option to include default keyboard).
3815 \end_layout
3816
3817 \end_inset
3818
3819
3820 \end_layout
3821
3822 \begin_layout Section
3823 International Keymap Stuff
3824 \begin_inset CommandInset label
3825 LatexCommand label
3826 name "sec:International-Keymap-Stuff"
3827
3828 \end_inset
3829
3830
3831 \end_layout
3832
3833 \begin_layout Standard
3834 \begin_inset Note Note
3835 status open
3836
3837 \begin_layout Plain Layout
3838 In doing the revisions on this document in March 2008, I did not look over
3839  this stuff, as I do not understand it.
3840  It would be good if someone else could do so.
3841  (RH)
3842 \end_layout
3843
3844 \end_inset
3845
3846
3847 \end_layout
3848
3849 \begin_layout Standard
3850 The next two sections describe the 
3851 \begin_inset Flex Code
3852 status collapsed
3853
3854 \begin_layout Plain Layout
3855
3856 \shape up
3857 .kmap
3858 \end_layout
3859
3860 \end_inset
3861
3862  and 
3863 \begin_inset Flex Code
3864 status collapsed
3865
3866 \begin_layout Plain Layout
3867
3868 \shape up
3869 .cdef
3870 \end_layout
3871
3872 \end_inset
3873
3874  file syntax in detail.
3875  These sections should help you design your own key map if the ones provided
3876  do not meet your needs.
3877 \end_layout
3878
3879 \begin_layout Subsection
3880 The .kmap File
3881 \end_layout
3882
3883 \begin_layout Standard
3884
3885 \shape up
3886 .
3887 \begin_inset Flex Code
3888 status collapsed
3889
3890 \begin_layout Plain Layout
3891 kmap
3892 \end_layout
3893
3894 \end_inset
3895
3896  file maps keystrokes to characters or strings.
3897  As the name suggests, it sets a keyboard mapping.
3898  The 
3899 \begin_inset Flex Code
3900 status collapsed
3901
3902 \begin_layout Plain Layout
3903 .kmap
3904 \end_layout
3905
3906 \end_inset
3907
3908
3909 \shape default
3910  file keywords 
3911 \shape up
3912
3913 \begin_inset Flex Code
3914 status collapsed
3915
3916 \begin_layout Plain Layout
3917
3918 \shape up
3919 kmap
3920 \end_layout
3921
3922 \end_inset
3923
3924
3925 \shape default
3926 ,
3927 \shape up
3928  
3929 \shape default
3930
3931 \begin_inset Flex Code
3932 status collapsed
3933
3934 \begin_layout Plain Layout
3935
3936 \shape up
3937 kmod
3938 \end_layout
3939
3940 \end_inset
3941
3942 ,
3943 \shape up
3944  
3945 \shape default
3946
3947 \begin_inset Flex Code
3948 status collapsed
3949
3950 \begin_layout Plain Layout
3951
3952 \shape up
3953 kxmod
3954 \end_layout
3955
3956 \end_inset
3957
3958 , and 
3959 \begin_inset Flex Code
3960 status collapsed
3961
3962 \begin_layout Plain Layout
3963
3964 \shape up
3965 kcomb
3966 \end_layout
3967
3968 \end_inset
3969
3970  are described in this section.
3971 \end_layout
3972
3973 \begin_layout Labeling
3974 \labelwidthstring 00.00.0000
3975 \begin_inset Flex Code
3976 status collapsed
3977
3978 \begin_layout Plain Layout
3979
3980 \shape up
3981 kmap
3982 \end_layout
3983
3984 \end_inset
3985
3986  Map a character to a string
3987 \end_layout
3988
3989 \begin_layout LyX-Code
3990
3991 \backslash
3992 kmap 
3993 \family roman
3994 \emph on
3995 char
3996 \family default
3997 \emph default
3998  
3999 \family roman
4000 \emph on
4001 string
4002 \end_layout
4003
4004 \begin_layout Standard
4005 This will ma
4006 \family roman
4007 p
4008 \family default
4009  
4010 \family roman
4011 \emph on
4012 char
4013 \family default
4014 \emph default
4015  
4016 \family roman
4017 to
4018 \family default
4019  
4020 \family roman
4021 \emph on
4022 string
4023 \emph default
4024 .
4025  Note that in
4026 \family default
4027  
4028 \family roman
4029 \emph on
4030 string
4031 \emph default
4032 ,
4033 \family default
4034  
4035 \family roman
4036 \shape up
4037 the double-quote (")
4038 \family default
4039 \shape default
4040  
4041 \family roman
4042 and
4043 \family default
4044  
4045 \family roman
4046 \shape up
4047 the backslash (
4048 \backslash
4049 )
4050 \family default
4051 \shape default
4052  
4053 \family roman
4054 must be escaped with a preceding backslash (
4055 \shape up
4056
4057 \backslash
4058
4059 \shape default
4060 )
4061 \family default
4062 .
4063 \end_layout
4064
4065 \begin_layout Standard
4066 An example of a 
4067 \begin_inset Flex MenuItem
4068 status collapsed
4069
4070 \begin_layout Plain Layout
4071
4072 \shape up
4073 kmap
4074 \end_layout
4075
4076 \end_inset
4077
4078  statement to cause the symbol 
4079 \begin_inset Flex MenuItem
4080 status collapsed
4081
4082 \begin_layout Plain Layout
4083
4084 \shape up
4085 /
4086 \end_layout
4087
4088 \end_inset
4089
4090  to be output for the keystroke 
4091 \begin_inset Flex MenuItem
4092 status collapsed
4093
4094 \begin_layout Plain Layout
4095
4096 \shape up
4097 &
4098 \end_layout
4099
4100 \end_inset
4101
4102  is:
4103 \end_layout
4104
4105 \begin_layout LyX-Code
4106
4107 \backslash
4108 kmap & /
4109 \end_layout
4110
4111 \begin_layout Labeling
4112 \labelwidthstring 00.00.0000
4113 \begin_inset Flex Code
4114 status collapsed
4115
4116 \begin_layout Plain Layout
4117
4118 \shape up
4119 kmod
4120 \end_layout
4121
4122 \end_inset
4123
4124  Specify an accent character
4125 \end_layout
4126
4127 \begin_layout LyX-Code
4128
4129 \backslash
4130 kmod 
4131 \family roman
4132 \emph on
4133 char accent allowed
4134 \end_layout
4135
4136 \begin_layout Standard
4137 This will make the cha
4138 \family roman
4139 racter
4140 \family default
4141  
4142 \family roman
4143 \emph on
4144 char
4145 \family default
4146 \emph default
4147  
4148 \family roman
4149 \shape up
4150 \emph on
4151 be an accent
4152 \family default
4153 \shape default
4154 \emph default
4155  
4156 \family roman
4157 \shape up
4158 on the
4159 \family default
4160 \shape default
4161  
4162 \family roman
4163 \shape up
4164 \emph on
4165 allowed
4166 \family default
4167 \shape default
4168 \emph default
4169  
4170 \family roman
4171 \shape up
4172 cha
4173 \family default
4174 racter(s).
4175  This is the dead key
4176 \begin_inset Foot
4177 status collapsed
4178
4179 \begin_layout Plain Layout
4180 The term 
4181 \family roman
4182 \emph on
4183 dead key
4184 \family default
4185 \emph default
4186  refers to a key that does not produce a character by itself, but when followed
4187  with another key, produces the desired accent character.
4188  For example, a German characte
4189 \family roman
4190 r with an umlaut like
4191 \family default
4192  
4193 \family roman
4194 \emph on
4195 ä
4196 \family default
4197 \emph default
4198  
4199 \family roman
4200 can be produced in this manner.
4201 \end_layout
4202
4203 \end_inset
4204
4205  mechanism.
4206  
4207 \end_layout
4208
4209 \begin_layout Standard
4210 If you 
4211 \family roman
4212 hit
4213 \family default
4214  
4215 \family roman
4216 \emph on
4217 char
4218 \family default
4219 \emph default
4220  
4221 \family roman
4222 and then another key not in
4223 \family default
4224  
4225 \family roman
4226 \emph on
4227 allowed
4228 \emph default
4229 , you will get a
4230 \family default
4231  
4232 \family roman
4233 \emph on
4234 char
4235 \family default
4236 \emph default
4237  
4238 \family roman
4239 followed by the other, not allowed key, as output.
4240
4241 \family default
4242  Note that a 
4243 \begin_inset Flex MenuItem
4244 status collapsed
4245
4246 \begin_layout Plain Layout
4247
4248 \shape up
4249 Backspace
4250 \end_layout
4251
4252 \end_inset
4253
4254  cancels a dead key, so if 
4255 \family roman
4256 you hit
4257 \family default
4258  
4259 \family roman
4260 \emph on
4261 char
4262 \family default
4263 \emph default
4264  
4265 \begin_inset Flex MenuItem
4266 status collapsed
4267
4268 \begin_layout Plain Layout
4269
4270 \shape up
4271 \emph on
4272 Backspace
4273 \end_layout
4274
4275 \end_inset
4276
4277 , the cursor will not go one position backwards but will instead cancel
4278  the effect t
4279 \family roman
4280 hat
4281 \family default
4282  
4283 \family roman
4284 \shape up
4285 \emph on
4286 char
4287 \family default
4288 \shape default
4289 \emph default
4290  
4291 \family roman
4292 \shape up
4293 might have had on the next keystroke.
4294  
4295 \end_layout
4296
4297 \begin_layout Standard
4298 The following example specifies that the character ' is to be an acute accent,
4299  allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4300 \end_layout
4301
4302 \begin_layout LyX-Code
4303
4304 \backslash
4305 kmod ' acute aeiouAEIOU
4306 \end_layout
4307
4308 \begin_layout Labeling
4309 \labelwidthstring 00.00.0000
4310 \begin_inset Flex Code
4311 status collapsed
4312
4313 \begin_layout Plain Layout
4314 kxmod
4315 \end_layout
4316
4317 \end_inset
4318
4319  Specify an exception to the accent character
4320 \end_layout
4321
4322 \begin_layout LyX-Code
4323
4324 \backslash
4325 kxmod  
4326 \family roman
4327 \emph on
4328 accent char result
4329 \end_layout
4330
4331 \begin_layout Standard
4332 This defines an exce
4333 \family roman
4334 ption for
4335 \family default
4336  
4337 \family roman
4338 \emph on
4339 accent
4340 \family default
4341 \emph default
4342  
4343 \family roman
4344 on
4345 \family default
4346  
4347 \family roman
4348 \emph on
4349 char
4350 \emph default
4351 .
4352  T
4353 \shape up
4354 he
4355 \family default
4356 \shape default
4357  
4358 \family roman
4359 \shape up
4360 \emph on
4361 accent
4362 \family default
4363 \shape default
4364 \emph default
4365  
4366 \family roman
4367 \shape up
4368 must
4369 \family default
4370 \shape default
4371  
4372 \shape up
4373 have been assigned a keystroke with a previous
4374 \shape default
4375  
4376 \begin_inset Flex Code
4377 status collapsed
4378
4379 \begin_layout Plain Layout
4380
4381 \shape up
4382
4383 \backslash
4384 kmo
4385 \shape default
4386 d
4387 \end_layout
4388
4389 \end_inset
4390
4391  declar
4392 \family roman
4393 ation and
4394 \family default
4395  
4396 \family roman
4397 \emph on
4398 char
4399 \family default
4400 \emph default
4401  
4402 \family roman
4403 must not belong in the
4404 \family default
4405  
4406 \family roman
4407 \emph on
4408 allowed
4409 \family default
4410 \emph default
4411  
4412 \family roman
4413 set of
4414 \family default
4415  
4416 \family roman
4417 \emph on
4418 accent
4419 \emph default
4420 .
4421  When
4422 \family default
4423  
4424 \family roman
4425 \shape up
4426 you enter the
4427 \family default
4428 \shape default
4429  
4430 \family roman
4431 \shape up
4432 \emph on
4433 accent char
4434 \family default
4435 \shape default
4436 \emph default
4437  
4438 \family roman
4439 \shape up
4440 sequence,
4441 \family default
4442 \shape default
4443  
4444 \family roman
4445 \shape up
4446 \emph on
4447 result
4448 \emph default
4449  is produced.
4450  If such a declaration does not exist in
4451 \family default
4452 \shape default
4453  
4454 \shape up
4455 the
4456 \shape default
4457  
4458 \begin_inset Flex Code
4459 status collapsed
4460
4461 \begin_layout Plain Layout
4462
4463 \shape up
4464 .kmap
4465 \end_layout
4466
4467 \end_inset
4468
4469  file and yo
4470 \family roman
4471 u enter
4472 \family default
4473  
4474 \family roman
4475 \emph on
4476 accent char
4477 \emph default
4478 , you get
4479 \family default
4480  
4481 \family roman
4482 \emph on
4483 accent_key char
4484 \emph default
4485  where
4486 \family default
4487  
4488 \family roman
4489 \emph on
4490 accent_key
4491 \emph default
4492  is the first arg
4493 \family default
4494 ument of the 
4495 \begin_inset Flex Code
4496 status collapsed
4497
4498 \begin_layout Plain Layout
4499
4500 \shape up
4501
4502 \backslash
4503 kmod
4504 \end_layout
4505
4506 \end_inset
4507
4508  declaration.
4509  
4510 \end_layout
4511
4512 \begin_layout Standard
4513 The following command produces causes äi to be produced when you enter acute-i
4514  ('i):
4515 \end_layout
4516
4517 \begin_layout LyX-Code
4518
4519 \backslash
4520 kxmod acute i "
4521 \backslash
4522
4523 \backslash
4524 '{
4525 \backslash
4526
4527 \backslash
4528 i}"
4529 \end_layout
4530
4531 \begin_layout Labeling
4532 \labelwidthstring 00.00.0000
4533 \begin_inset Flex Code
4534 status collapsed
4535
4536 \begin_layout Plain Layout
4537 kcomb
4538 \end_layout
4539
4540 \end_inset
4541
4542  Combine two accent characters
4543 \end_layout
4544
4545 \begin_layout LyX-Code
4546
4547 \backslash
4548 kcomb 
4549 \family roman
4550 \emph on
4551 accent1 accent2 allowed
4552 \end_layout
4553
4554 \begin_layout Standard
4555 This one is getting pretty esoteric.
4556  It allows you to combine the effect 
4557 \family roman
4558 of
4559 \family default
4560  
4561 \family roman
4562 \emph on
4563 accent1
4564 \family default
4565 \emph default
4566  
4567 \family roman
4568 and
4569 \family default
4570  
4571 \family roman
4572 \emph on
4573 accent2
4574 \family default
4575 \emph default
4576  
4577 \family roman
4578 (in that order!) on
4579 \family default
4580  
4581 \family roman
4582 \emph on
4583 allowed
4584 \family default
4585 \emph default
4586  
4587 \family roman
4588 chars.
4589  The keystrokes for
4590 \family default
4591  
4592 \family roman
4593 \emph on
4594 accent1
4595 \family default
4596 \emph default
4597  
4598 \family roman
4599 and
4600 \family default
4601  
4602 \family roman
4603 \emph on
4604 accent2
4605 \family default
4606 \emph default
4607  
4608 \family roman
4609 must have be
4610 \family default
4611 en set with a 
4612 \begin_inset Flex Code
4613 status collapsed
4614
4615 \begin_layout Plain Layout
4616
4617 \shape up
4618
4619 \backslash
4620 kmod
4621 \end_layout
4622
4623 \end_inset
4624
4625  command at 
4626 \family roman
4627 a
4628 \family default
4629  
4630 \family roman
4631 \emph on
4632 previous
4633 \family default
4634 \emph default
4635  
4636 \family roman
4637 point in the
4638 \family default
4639  file.
4640  
4641 \end_layout
4642
4643 \begin_layout Standard
4644 Consider this example from the 
4645 \begin_inset Flex Code
4646 status collapsed
4647
4648 \begin_layout Plain Layout
4649
4650 \shape up
4651 greek.kmap
4652 \end_layout
4653
4654 \end_inset
4655
4656  file:
4657 \end_layout
4658
4659 \begin_layout LyX-Code
4660
4661 \backslash
4662 kmod ; acute aeioyvhAEIOYVH 
4663 \backslash
4664 kmod : umlaut iyIY 
4665 \backslash
4666 kcomb acute umlaut iyIY
4667 \end_layout
4668
4669 \begin_layout Standard
4670 This allows you to press 
4671 \begin_inset Flex MenuItem
4672 status collapsed
4673
4674 \begin_layout Plain Layout
4675
4676 \shape up
4677 ;:i
4678 \end_layout
4679
4680 \end_inset
4681
4682  and get the effect of 
4683 \begin_inset Flex Code
4684 status collapsed
4685
4686 \begin_layout Plain Layout
4687
4688 \shape up
4689
4690 \backslash
4691 '{
4692 \backslash
4693 "{i}}
4694 \end_layout
4695
4696 \end_inset
4697
4698 .
4699  
4700 \family roman
4701 \shape up
4702 A backspace
4703 \family default
4704 \shape default
4705  in this case cancels the last dead key, so if you press 
4706 \begin_inset Flex MenuItem
4707 status collapsed
4708
4709 \begin_layout Plain Layout
4710
4711 \shape up
4712 ;: Backspace i
4713 \end_layout
4714
4715 \end_inset
4716
4717  you get 
4718 \begin_inset Flex Code
4719 status collapsed
4720
4721 \begin_layout Plain Layout
4722
4723 \shape up
4724
4725 \backslash
4726 '{i}
4727 \end_layout
4728
4729 \end_inset
4730
4731 .
4732 \end_layout
4733
4734 \begin_layout Subsection
4735 The .cdef File
4736 \end_layout
4737
4738 \begin_layout Standard
4739 After the 
4740 \begin_inset Flex Code
4741 status collapsed
4742
4743 \begin_layout Plain Layout
4744
4745 \shape up
4746 .kmap
4747 \end_layout
4748
4749 \end_inset
4750
4751  mapping is performed, a 
4752 \begin_inset Flex Code
4753 status collapsed
4754
4755 \begin_layout Plain Layout
4756
4757 \shape up
4758 .cde
4759 \shape default
4760 f
4761 \end_layout
4762
4763 \end_inset
4764
4765  file maps the strings that the symbols generate to characters in the current
4766  font.
4767  The LyX distribution currently includes at least the 
4768 \begin_inset Flex Code
4769 status collapsed
4770
4771 \begin_layout Plain Layout
4772
4773 \shape up
4774 iso8859-1.cdef
4775 \end_layout
4776
4777 \end_inset
4778
4779  and 
4780 \begin_inset Flex Code
4781 status collapsed
4782
4783 \begin_layout Plain Layout
4784
4785 \shape up
4786 iso8859-2.cdef
4787 \end_layout
4788
4789 \end_inset
4790
4791  files.
4792 \end_layout
4793
4794 \begin_layout Standard
4795 In general the 
4796 \begin_inset Flex Code
4797 status collapsed
4798
4799 \begin_layout Plain Layout
4800
4801 \shape up
4802 .cdef
4803 \end_layout
4804
4805 \end_inset
4806
4807  file is a sequence of declarations of the form
4808 \end_layout
4809
4810 \begin_layout LyX-Code
4811
4812 \family roman
4813 \emph on
4814 char_index_in_set
4815 \family default
4816 \emph default
4817  
4818 \family roman
4819 \emph on
4820  string
4821 \end_layout
4822
4823 \begin_layout Standard
4824 For example, in order to map 
4825 \begin_inset Flex MenuItem
4826 status collapsed
4827
4828 \begin_layout Plain Layout
4829
4830 \shape up
4831
4832 \backslash
4833 '{e}
4834 \end_layout
4835
4836 \end_inset
4837
4838  to the corresponding character in the iso-8859-1 set (233), the following
4839  declaration is used
4840 \end_layout
4841
4842 \begin_layout LyX-Code
4843 233 "
4844 \backslash
4845
4846 \backslash
4847 '{e}"
4848 \end_layout
4849
4850 \begin_layout Standard
4851 with 
4852 \begin_inset Flex Code
4853 status collapsed
4854
4855 \begin_layout Plain Layout
4856
4857 \backslash
4858
4859 \end_layout
4860
4861 \end_inset
4862
4863  and 
4864 \begin_inset Flex Code
4865 status collapsed
4866
4867 \begin_layout Plain Layout
4868 "
4869 \end_layout
4870
4871 \end_inset
4872
4873  being escap
4874 \family roman
4875 ed in
4876 \family default
4877  
4878 \family roman
4879 \emph on
4880 string
4881 \emph default
4882 .
4883  Note that
4884 \family default
4885  the same character can apply to more than one string.
4886  In the 
4887 \begin_inset Flex Code
4888 status collapsed
4889
4890 \begin_layout Plain Layout
4891 i
4892 \shape up
4893 so-8859-7.cdef
4894 \end_layout
4895
4896 \end_inset
4897
4898  file you have
4899 \end_layout
4900
4901 \begin_layout LyX-Code
4902 192 "
4903 \backslash
4904
4905 \backslash
4906 '{
4907 \backslash
4908
4909 \backslash
4910
4911 \backslash
4912 "{i}}"
4913 \begin_inset Newline newline
4914 \end_inset
4915
4916 192 "
4917 \backslash
4918
4919 \backslash
4920
4921 \backslash
4922 "{
4923 \backslash
4924
4925 \backslash
4926 '{i}}"
4927 \end_layout
4928
4929 \begin_layout Standard
4930 If LyX cannot find a mapping for the string produced by the keystroke or
4931  a deadkey sequence, it will check if it looks like an accented char and
4932  try to draw an accent over the character on screen.
4933 \end_layout
4934
4935 \begin_layout Subsection
4936 Dead Keys
4937 \end_layout
4938
4939 \begin_layout Standard
4940 There is a second way to add support for international characters through
4941  so-called dead-keys.
4942  A dead-key works in combination with a letter to produce an accented character.
4943  Here, we'll explain how to create a really simple dead-key to illustrate
4944  how they work.
4945 \end_layout
4946
4947 \begin_layout Standard
4948 Suppose you happen to need the circumflex character, 
4949 \begin_inset Quotes eld
4950 \end_inset
4951
4952  ̂
4953 \begin_inset Quotes erd
4954 \end_inset
4955
4956 .
4957  You could bind the 
4958 \begin_inset Flex MenuItem
4959 status collapsed
4960
4961 \begin_layout Plain Layout
4962 ^
4963 \end_layout
4964
4965 \end_inset
4966
4967 -key [a.k.a.
4968 \begin_inset space ~
4969 \end_inset
4970
4971
4972 \begin_inset Flex MenuItem
4973 status collapsed
4974
4975 \begin_layout Plain Layout
4976 Shift-6
4977 \end_layout
4978
4979 \end_inset
4980
4981 ] to the LyX command 
4982 \begin_inset Flex Code
4983 status collapsed
4984
4985 \begin_layout Plain Layout
4986 accent-circumflex
4987 \end_layout
4988
4989 \end_inset
4990
4991  in your 
4992 \begin_inset Flex Code
4993 status collapsed
4994
4995 \begin_layout Plain Layout
4996 lyxrc
4997 \end_layout
4998
4999 \end_inset
5000
5001  file.
5002  Now, whenever you type the 
5003 \begin_inset Flex MenuItem
5004 status collapsed
5005
5006 \begin_layout Plain Layout
5007 ^
5008 \end_layout
5009
5010 \end_inset
5011
5012 -key followed by a letter, that letter will have a circumflex accent on
5013  it.
5014  For example, the sequence 
5015 \begin_inset Quotes eld
5016 \end_inset
5017
5018
5019 \begin_inset Flex MenuItem
5020 status collapsed
5021
5022 \begin_layout Plain Layout
5023 ^e
5024 \end_layout
5025
5026 \end_inset
5027
5028
5029 \begin_inset Quotes erd
5030 \end_inset
5031
5032  produces the letter: 
5033 \begin_inset Quotes eld
5034 \end_inset
5035
5036 ê
5037 \begin_inset Quotes erd
5038 \end_inset
5039
5040 .
5041  If you tried to type 
5042 \begin_inset Quotes eld
5043 \end_inset
5044
5045
5046 \begin_inset Flex MenuItem
5047 status collapsed
5048
5049 \begin_layout Plain Layout
5050 ^t
5051 \end_layout
5052
5053 \end_inset
5054
5055
5056 \begin_inset Quotes erd
5057 \end_inset
5058
5059 , however, LyX will complain with a beep, since a 
5060 \begin_inset Quotes eld
5061 \end_inset
5062
5063
5064 \begin_inset Flex MenuItem
5065 status collapsed
5066
5067 \begin_layout Plain Layout
5068 t
5069 \end_layout
5070
5071 \end_inset
5072
5073
5074 \begin_inset Quotes erd
5075 \end_inset
5076
5077  never takes a circumflex accent.
5078  Hitting 
5079 \begin_inset Flex MenuItem
5080 status collapsed
5081
5082 \begin_layout Plain Layout
5083 Space
5084 \end_layout
5085
5086 \end_inset
5087
5088  after a dead-key produces the bare-accent.
5089  Please note this last point! If you bind a key to a dead-key, you'll need
5090  to rebind the character on that key to yet another key.
5091  Binding the 
5092 \begin_inset Flex MenuItem
5093 status collapsed
5094
5095 \begin_layout Plain Layout
5096 ,-key
5097 \end_layout
5098
5099 \end_inset
5100
5101  to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5102 \end_layout
5103
5104 \begin_layout Standard
5105 One common way to bind dead-keys is to use 
5106 \begin_inset Flex MenuItem
5107 status collapsed
5108
5109 \begin_layout Plain Layout
5110 Meta-
5111 \end_layout
5112
5113 \end_inset
5114
5115
5116 \begin_inset Flex MenuItem
5117 status collapsed
5118
5119 \begin_layout Plain Layout
5120 Ctrl-
5121 \end_layout
5122
5123 \end_inset
5124
5125 , and 
5126 \begin_inset Flex MenuItem
5127 status collapsed
5128
5129 \begin_layout Plain Layout
5130 Shift-
5131 \end_layout
5132
5133 \end_inset
5134
5135  in combination with an accent, like 
5136 \begin_inset Quotes eld
5137 \end_inset
5138
5139
5140 \begin_inset Flex MenuItem
5141 status collapsed
5142
5143 \begin_layout Plain Layout
5144 ~
5145 \end_layout
5146
5147 \end_inset
5148
5149
5150 \begin_inset Quotes erd
5151 \end_inset
5152
5153  or 
5154 \begin_inset Quotes eld
5155 \end_inset
5156
5157
5158 \begin_inset Flex MenuItem
5159 status collapsed
5160
5161 \begin_layout Plain Layout
5162 ,
5163 \end_layout
5164
5165 \end_inset
5166
5167
5168 \begin_inset Quotes erd
5169 \end_inset
5170
5171  or 
5172 \begin_inset Quotes eld
5173 \end_inset
5174
5175
5176 \begin_inset Flex MenuItem
5177 status collapsed
5178
5179 \begin_layout Plain Layout
5180 ^
5181 \end_layout
5182
5183 \end_inset
5184
5185
5186 \begin_inset Quotes erd
5187 \end_inset
5188
5189 .
5190  Another way involves using 
5191 \begin_inset Flex Code
5192 status collapsed
5193
5194 \begin_layout Plain Layout
5195 xmodmap
5196 \end_layout
5197
5198 \end_inset
5199
5200  and 
5201 \begin_inset Flex Code
5202 status collapsed
5203
5204 \begin_layout Plain Layout
5205 xkeycaps
5206 \end_layout
5207
5208 \end_inset
5209
5210  to set up the special 
5211 \begin_inset Flex Code
5212 status collapsed
5213
5214 \begin_layout Plain Layout
5215 Mode_Switch
5216 \end_layout
5217
5218 \end_inset
5219
5220  key.
5221  The 
5222 \begin_inset Flex Code
5223 status collapsed
5224
5225 \begin_layout Plain Layout
5226 Mode_Switch
5227 \end_layout
5228
5229 \end_inset
5230
5231  acts in some ways just like 
5232 \begin_inset Flex MenuItem
5233 status collapsed
5234
5235 \begin_layout Plain Layout
5236 Shift
5237 \end_layout
5238
5239 \end_inset
5240
5241  and permits you to bind keys to accented characters.
5242  You can also turn keys into dead-keys by binding them to something like
5243  
5244 \begin_inset Flex Code
5245 status collapsed
5246
5247 \begin_layout Plain Layout
5248 usldead_cedilla
5249 \end_layout
5250
5251 \end_inset
5252
5253  and then binding this symbolic key to the corresponding LyX command.
5254 \begin_inset Foot
5255 status collapsed
5256
5257 \begin_layout Plain Layout
5258 Note from 
5259 \noun on
5260 John Weiss
5261 \noun default
5262 : This is exactly what I do in my 
5263 \begin_inset Flex Code
5264 status collapsed
5265
5266 \begin_layout Plain Layout
5267 ~/.lyx/lyxrc
5268 \end_layout
5269
5270 \end_inset
5271
5272  and my 
5273 \begin_inset Flex Code
5274 status collapsed
5275
5276 \begin_layout Plain Layout
5277 ~/.xmodmap
5278 \end_layout
5279
5280 \end_inset
5281
5282  files.
5283  I have my 
5284 \begin_inset Flex MenuItem
5285 status collapsed
5286
5287 \begin_layout Plain Layout
5288 Scroll
5289 \begin_inset space ~
5290 \end_inset
5291
5292 Lock
5293 \end_layout
5294
5295 \end_inset
5296
5297  key set up as 
5298 \begin_inset Flex Code
5299 status collapsed
5300
5301 \begin_layout Plain Layout
5302 Mode_Shift
5303 \end_layout
5304
5305 \end_inset
5306
5307  and a bunch of these 
5308 \begin_inset Quotes eld
5309 \end_inset
5310
5311
5312 \begin_inset Flex Code
5313 status collapsed
5314
5315 \begin_layout Plain Layout
5316 usldead_*
5317 \end_layout
5318
5319 \end_inset
5320
5321
5322 \begin_inset Quotes erd
5323 \end_inset
5324
5325  symbolic keys bound such things as 
5326 \begin_inset Flex MenuItem
5327 status collapsed
5328
5329 \begin_layout Plain Layout
5330 Scroll
5331 \begin_inset space ~
5332 \end_inset
5333
5334 Lock-^
5335 \end_layout
5336
5337 \end_inset
5338
5339  and 
5340 \begin_inset Flex MenuItem
5341 status collapsed
5342
5343 \begin_layout Plain Layout
5344 Scroll
5345 \begin_inset space ~
5346 \end_inset
5347
5348 Lock-~
5349 \end_layout
5350
5351 \end_inset
5352
5353 .
5354  This is how I produce my accented characters.
5355 \end_layout
5356
5357 \end_inset
5358
5359  You can make just about anything into the 
5360 \begin_inset Flex Code
5361 status collapsed
5362
5363 \begin_layout Plain Layout
5364 Mode_Switch
5365 \end_layout
5366
5367 \end_inset
5368
5369  key: One of the 
5370 \begin_inset Flex MenuItem
5371 status collapsed
5372
5373 \begin_layout Plain Layout
5374 Ctrl-
5375 \end_layout
5376
5377 \end_inset
5378
5379  keys, a spare function key, etc.
5380  As for the LyX commands that produce accents, check the entry for 
5381 \begin_inset Flex Code
5382 status collapsed
5383
5384 \begin_layout Plain Layout
5385 accent-acute
5386 \end_layout
5387
5388 \end_inset
5389
5390  in the 
5391 \emph on
5392 Reference Manual
5393 \emph default
5394 .
5395  You'll find the complete list there.
5396 \end_layout
5397
5398 \begin_layout Subsection
5399 Saving your Language Configuration
5400 \end_layout
5401
5402 \begin_layout Standard
5403 You can edit your preferences so that your desired language environment
5404  is automatically configured when LyX starts up, via the 
5405 \begin_inset Flex MenuItem
5406 status collapsed
5407
5408 \begin_layout Plain Layout
5409 Edit\SpecialChar \menuseparator
5410 Preferences
5411 \end_layout
5412
5413 \end_inset
5414
5415  dialog.
5416 \end_layout
5417
5418 \begin_layout Chapter
5419 Installing New Document Classes, Layouts, and Templates
5420 \begin_inset CommandInset label
5421 LatexCommand label
5422 name "cha:Installing-New-Document"
5423
5424 \end_inset
5425
5426
5427 \begin_inset Argument 1
5428 status collapsed
5429
5430 \begin_layout Plain Layout
5431 Installing New Document Classes
5432 \end_layout
5433
5434 \end_inset
5435
5436
5437 \end_layout
5438
5439 \begin_layout Standard
5440 In this chapter, we describe the procedures for creating and installing
5441  new LyX layout and template files, as well as offer a refresher on correctly
5442  installing new LaTeX document classes.
5443  
5444 \end_layout
5445
5446 \begin_layout Standard
5447 First, let us a say a few words about how one ought to think about the relation
5448  between LyX and LaTeX.
5449  The thing to understand is that, in a certain sense, LyX doesn't know anything
5450  about LaTeX.
5451  Indeed, from LyX's point of view, LaTeX is just one of several 
5452 \begin_inset Quotes eld
5453 \end_inset
5454
5455 backend formats
5456 \begin_inset Quotes erd
5457 \end_inset
5458
5459  in which it is capable of producing output.
5460  Other such formats are DocBook, plaintext, and XHTML.
5461  LaTeX is, of course, a particularly important format, but very little of
5462  the information LyX has about LaTeX is actually contained in the program
5463  itself.
5464 \begin_inset Foot
5465 status collapsed
5466
5467 \begin_layout Plain Layout
5468 Some commands are sufficiently complex that they are 
5469 \begin_inset Quotes eld
5470 \end_inset
5471
5472 hardcoded
5473 \begin_inset Quotes erd
5474 \end_inset
5475
5476  into LyX.
5477  But the developers generally regard this as a Bad Thing.
5478 \end_layout
5479
5480 \end_inset
5481
5482  Rather, that information, even for the standard classes like 
5483 \begin_inset Flex Code
5484 status collapsed
5485
5486 \begin_layout Plain Layout
5487 article.cls
5488 \end_layout
5489
5490 \end_inset
5491
5492 , is contained in `layout files'.
5493  Similarly, LyX itself does not know much about DocBook or XHTML.
5494  What it knows is contained in layout files.
5495 \end_layout
5496
5497 \begin_layout Standard
5498 You can think of the layout file for a given document class as a translation
5499  manual between LyX constructs---paragraphs with their corresponding styles,
5500  certain sorts of insets, etc---and the corresponding LaTeX, DocBook, or
5501  XHTML constructs.
5502  Almost everything LyX knows about 
5503 \begin_inset Flex Code
5504 status collapsed
5505
5506 \begin_layout Plain Layout
5507 article.cls
5508 \end_layout
5509
5510 \end_inset
5511
5512 , for example, is contained in the file 
5513 \begin_inset Flex Code
5514 status collapsed
5515
5516 \begin_layout Plain Layout
5517 article.layout
5518 \end_layout
5519
5520 \end_inset
5521
5522  and in various other files it includes.
5523  For this reason, anyone intending to write layout files should plan to
5524  study the existing files.
5525  A good place to start is with 
5526 \begin_inset Flex Code
5527 status collapsed
5528
5529 \begin_layout Plain Layout
5530 stdsections.inc
5531 \end_layout
5532
5533 \end_inset
5534
5535 , which is included in 
5536 \begin_inset Flex Code
5537 status collapsed
5538
5539 \begin_layout Plain Layout
5540 article.layout
5541 \end_layout
5542
5543 \end_inset
5544
5545
5546 \begin_inset Flex Code
5547 status collapsed
5548
5549 \begin_layout Plain Layout
5550 book.layout
5551 \end_layout
5552
5553 \end_inset
5554
5555 , and many of the other layout files for document classes.
5556  This file is where sections and the like are defined: 
5557 \begin_inset Flex Code
5558 status collapsed
5559
5560 \begin_layout Plain Layout
5561 stdsections.inc
5562 \end_layout
5563
5564 \end_inset
5565
5566  tells LyX how paragraphs that are marked with the Section, Subsection,
5567  etc, styles can be translated into corresponding LaTeX, DocBook, and XHTML
5568  commands and tags.
5569  The 
5570 \begin_inset Flex Code
5571 status collapsed
5572
5573 \begin_layout Plain Layout
5574 article.layout
5575 \end_layout
5576
5577 \end_inset
5578
5579  file basically just includes several of these 
5580 \begin_inset Flex Code
5581 status collapsed
5582
5583 \begin_layout Plain Layout
5584 std*.inc
5585 \end_layout
5586
5587 \end_inset
5588
5589  files.
5590 \end_layout
5591
5592 \begin_layout Standard
5593 Defining the LyX--LaTeX correspondence is not the only thing layout files
5594  do, though.
5595  Their other job is to define how the LyX constructs themselves will appear
5596  on-screen.
5597  The fact that layout files have these two jobs is often a source of confusion,
5598  because they are completely separate.
5599  Telling LyX how to translate a certain paragraph style into LaTeX does
5600  not tell LyX how to display it; conversely, telling LyX how to display
5601  a certain paragraph style does not tell LyX how to translate it into LaTeX
5602  (let alone tell LaTeX how to display it).
5603  So, in general, when you define a new LyX construct, you must always do
5604  two quite separate things: (i)
5605 \begin_inset space ~
5606 \end_inset
5607
5608 tell LyX how to translate it into LaTeX and (ii)
5609 \begin_inset space ~
5610 \end_inset
5611
5612 tell LyX how to display it.
5613 \end_layout
5614
5615 \begin_layout Standard
5616 Much the same is true, of course, as regards LyX's other backend formats,
5617  though XHTML is in some ways different, because in that case LyX 
5618 \emph on
5619 is
5620 \emph default
5621  able, to some extent, to use information about how it should display a
5622  paragraph on the screen to output information (in the form of CSS) about
5623  how the paragraph should be displayed in a browser.
5624  Even in this case, however, the distinction between what LyX does internally
5625  and how things are rendered externally remains in force, and the two can
5626  be controlled separately.
5627  See 
5628 \begin_inset CommandInset ref
5629 LatexCommand ref
5630 reference "sec:Tags-for-XHTML"
5631
5632 \end_inset
5633
5634  for the details.
5635 \end_layout
5636
5637 \begin_layout Section
5638 Installing new LaTeX files
5639 \end_layout
5640
5641 \begin_layout Standard
5642 Some installations may not include a LaTeX package or class file that you
5643  would like to use within LyX.
5644  For example, you might need FoilTeX, a package for preparing slides for
5645  overhead projectors.
5646  Modern LaTeX distributions like TeXLive (2008 or newer) or MiKTeX provide
5647  a user interface for installing such packages.
5648  For example, with MiKTeX, you start the program 
5649 \begin_inset Quotes eld
5650 \end_inset
5651
5652 Package
5653 \begin_inset space ~
5654 \end_inset
5655
5656 Manager
5657 \begin_inset Quotes erd
5658 \end_inset
5659
5660  to get a list of available packages.
5661  To install one of them, right click on it or use the corresponding toolbar
5662  button.
5663 \end_layout
5664
5665 \begin_layout Standard
5666 If your LaTeX distribution does not provide such a `package manager', or
5667  if the package is not available from your distribution, then follow these
5668  steps to install it manually:
5669 \end_layout
5670
5671 \begin_layout Enumerate
5672 Get the package from 
5673 \begin_inset CommandInset href
5674 LatexCommand href
5675 name "CTAN"
5676 target "http://www.ctan.org/"
5677
5678 \end_inset
5679
5680  or wherever.
5681 \end_layout
5682
5683 \begin_layout Enumerate
5684 If the package contains a file with the ending 
5685 \begin_inset Quotes eld
5686 \end_inset
5687
5688
5689 \begin_inset Flex Code
5690 status collapsed
5691
5692 \begin_layout Plain Layout
5693 .ins
5694 \end_layout
5695
5696 \end_inset
5697
5698
5699 \begin_inset Quotes erd
5700 \end_inset
5701
5702  (is the case for FoilTeX) then open a console, change to the folder of
5703  this file and execute the command 
5704 \begin_inset Flex Code
5705 status collapsed
5706
5707 \begin_layout Plain Layout
5708 latex foiltex.ins
5709 \end_layout
5710
5711 \end_inset
5712
5713 .
5714  You have now unpacked the package and have all files to install it.
5715  Most LaTeX-packages are not packed and you can skip this step.
5716 \end_layout
5717
5718 \begin_layout Enumerate
5719 Now you need to decide if the package should be available for all users
5720  or only for you.
5721 \end_layout
5722
5723 \begin_deeper
5724 \begin_layout Enumerate
5725 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
5726  for all users on your system, then install it in your `local' TeX tree,
5727  otherwise install it in your own `user' TeX tree.
5728  Where these trees should be created, if they do not already exist, depends
5729  on your system.
5730  To find this out, look in the file 
5731 \begin_inset Flex Code
5732 status collapsed
5733
5734 \begin_layout Plain Layout
5735 texmf.cnf
5736 \end_layout
5737
5738 \end_inset
5739
5740 .
5741 \begin_inset Foot
5742 status collapsed
5743
5744 \begin_layout Plain Layout
5745 This is usually in the directory 
5746 \begin_inset Flex Code
5747 status collapsed
5748
5749 \begin_layout Plain Layout
5750 $TEXMF/web2c
5751 \end_layout
5752
5753 \end_inset
5754
5755 , though you can execute the command 
5756 \begin_inset Flex Code
5757 status collapsed
5758
5759 \begin_layout Plain Layout
5760 kpsewhich texmf.cnf
5761 \end_layout
5762
5763 \end_inset
5764
5765  to locate it.
5766 \end_layout
5767
5768 \end_inset
5769
5770  The location of the `local' TeX tree is defined by the 
5771 \begin_inset Flex Code
5772 status collapsed
5773
5774 \begin_layout Plain Layout
5775 TEXMFLOCAL
5776 \end_layout
5777
5778 \end_inset
5779
5780  variable; this is usually somewhere like 
5781 \begin_inset Flex Code
5782 status collapsed
5783
5784 \begin_layout Plain Layout
5785 /usr/local/share/texmf
5786 \end_layout
5787
5788 \end_inset
5789
5790 .
5791  The location of the `user' TeX tree is defined by 
5792 \begin_inset Flex Code
5793 status collapsed
5794
5795 \begin_layout Plain Layout
5796 TEXMFHOME
5797 \end_layout
5798
5799 \end_inset
5800
5801  and is commonly 
5802 \begin_inset Flex Code
5803 status collapsed
5804
5805 \begin_layout Plain Layout
5806 $HOME/texmf
5807 \end_layout
5808
5809 \end_inset
5810
5811 .
5812  (If these variables are not predefined, you have to define them.) You'll
5813  probably need root permissions to create or modify the `local' tree, but
5814  not for your `user' tree.
5815 \begin_inset Newline newline
5816 \end_inset
5817
5818 In general, it is recommended to install in the user tree because your user
5819  will not be modified or even overwritten when you upgrade your system.
5820  It will typically also be backed up together with everything else when
5821  you backup your home directory (which, of course, you do on a regular basis).
5822 \end_layout
5823
5824 \begin_layout Enumerate
5825 On Windows, if you want the new package to be available for all users on
5826  your system, change to the folder where LaTeX is installed and then change
5827  to the subfolder 
5828 \begin_inset Flex Code
5829 status collapsed
5830
5831 \begin_layout Plain Layout
5832 ~
5833 \backslash
5834 tex
5835 \backslash
5836 latex
5837 \end_layout
5838
5839 \end_inset
5840
5841 .
5842  (For MiKTeX, this would be by default the folder 
5843 \begin_inset Flex Code
5844 status collapsed
5845
5846 \begin_layout Plain Layout
5847 ~:
5848 \backslash
5849 Programs
5850 \backslash
5851 MiKTeX
5852 \backslash
5853 tex
5854 \backslash
5855 latex
5856 \end_layout
5857
5858 \end_inset
5859
5860 .)
5861 \begin_inset Foot
5862 status open
5863
5864 \begin_layout Plain Layout
5865 Note that this will be the correct path only on English installations.
5866  On a German one, it would be 
5867 \begin_inset Flex Code
5868 status collapsed
5869
5870 \begin_layout Plain Layout
5871 ~:
5872 \backslash
5873 Programme
5874 \backslash
5875 MiKTeX
5876 \backslash
5877 tex
5878 \backslash
5879 latex
5880 \end_layout
5881
5882 \end_inset
5883
5884 , and similarly for other languages.
5885 \end_layout
5886
5887 \end_inset
5888
5889  Create there a new folder 
5890 \begin_inset Flex Code
5891 status collapsed
5892
5893 \begin_layout Plain Layout
5894 foiltex
5895 \end_layout
5896
5897 \end_inset
5898
5899  and copy all files of the package into it.
5900  
5901 \begin_inset Newline newline
5902 \end_inset
5903
5904 If the package should only available for you or you don't have admin permissions
5905 , do the same, but in the local LaTeX folder.
5906  E.
5907 \begin_inset space \thinspace{}
5908 \end_inset
5909
5910 g., for MiKTeX
5911 \begin_inset space ~
5912 \end_inset
5913
5914 2.8 under Windows XP, this would be the folder:
5915 \begin_inset Newline newline
5916 \end_inset
5917
5918
5919 \family sans
5920
5921 \begin_inset Flex Code
5922 status collapsed
5923
5924 \begin_layout Plain Layout
5925 ~:
5926 \backslash
5927 Documents and Settings
5928 \backslash
5929 <username>
5930 \backslash
5931 Application Data
5932 \backslash
5933
5934 \end_layout
5935
5936 \end_inset
5937
5938
5939 \begin_inset Newline newline
5940 \end_inset
5941
5942
5943 \family default
5944
5945 \begin_inset Phantom HPhantom
5946 status open
5947
5948 \begin_layout Plain Layout
5949
5950 \family sans
5951 ~:
5952 \backslash
5953
5954 \end_layout
5955
5956 \end_inset
5957
5958
5959 \begin_inset Flex Code
5960 status collapsed
5961
5962 \begin_layout Plain Layout
5963 MiKTeX
5964 \backslash
5965 2.8
5966 \backslash
5967 tex
5968 \backslash
5969 latex
5970 \end_layout
5971
5972 \end_inset
5973
5974
5975 \begin_inset Newline newline
5976 \end_inset
5977
5978 On Vista, it would be:
5979 \begin_inset Newline newline
5980 \end_inset
5981
5982
5983 \begin_inset Flex Code
5984 status collapsed
5985
5986 \begin_layout Plain Layout
5987 ~:
5988 \backslash
5989 Users
5990 \backslash
5991 <username>
5992 \backslash
5993 AppData
5994 \backslash
5995 Roaming
5996 \backslash
5997 2.8
5998 \backslash
5999 MiKTeX
6000 \backslash
6001 tex
6002 \backslash
6003 latex
6004 \end_layout
6005
6006 \end_inset
6007
6008
6009 \end_layout
6010
6011 \end_deeper
6012 \begin_layout Enumerate
6013 Now one only need to tell LaTeX that there are new files.
6014  This depends on the used LaTeX-Distribution:
6015 \end_layout
6016
6017 \begin_deeper
6018 \begin_layout Enumerate
6019 For TeXLive execute the command 
6020 \begin_inset Flex Code
6021 status collapsed
6022
6023 \begin_layout Plain Layout
6024 texhash
6025 \end_layout
6026
6027 \end_inset
6028
6029  from a console.
6030  If you installed the package for all users, then you will probably need
6031  to have root permissions for that.
6032 \end_layout
6033
6034 \begin_layout Enumerate
6035 For MiKTeX, if you have installed the package for all users, start the program
6036  
6037 \begin_inset Quotes eld
6038 \end_inset
6039
6040 Settings
6041 \begin_inset space ~
6042 \end_inset
6043
6044 (Admin)
6045 \begin_inset Quotes erd
6046 \end_inset
6047
6048  and press the button marked 
6049 \begin_inset Quotes eld
6050 \end_inset
6051
6052 Refresh FNDB
6053 \begin_inset Quotes erd
6054 \end_inset
6055
6056 .
6057  Otherwise start the program 
6058 \begin_inset Quotes eld
6059 \end_inset
6060
6061 Settings
6062 \begin_inset Quotes erd
6063 \end_inset
6064
6065  and do the same.
6066 \end_layout
6067
6068 \end_deeper
6069 \begin_layout Enumerate
6070 Finally, you need to tell LyX that there are new packages available.
6071  So, in LyX, use the menu 
6072 \begin_inset Flex MenuItem
6073 status collapsed
6074
6075 \begin_layout Plain Layout
6076 Tools
6077 \family sans
6078 \SpecialChar \menuseparator
6079 Reconfigure
6080 \end_layout
6081
6082 \end_inset
6083
6084  and then restart LyX.
6085 \end_layout
6086
6087 \begin_layout Standard
6088 Now the package is installed.
6089  In our example, the document class 
6090 \begin_inset Flex Code
6091 status collapsed
6092
6093 \begin_layout Plain Layout
6094 Slides
6095 \begin_inset space ~
6096 \end_inset
6097
6098 (FoilTe
6099 \begin_inset ERT
6100 status collapsed
6101
6102 \begin_layout Plain Layout
6103
6104 {}
6105 \end_layout
6106
6107 \end_inset
6108
6109 x)
6110 \end_layout
6111
6112 \end_inset
6113
6114  will now be available under 
6115 \begin_inset Flex MenuItem
6116 status collapsed
6117
6118 \begin_layout Plain Layout
6119 Document\SpecialChar \menuseparator
6120 Settings\SpecialChar \menuseparator
6121 Document Class
6122 \end_layout
6123
6124 \end_inset
6125
6126 .
6127  
6128 \end_layout
6129
6130 \begin_layout Standard
6131 If you would like to use a LaTeX document class that is not even listed
6132  in the menu 
6133 \begin_inset Flex MenuItem
6134 status collapsed
6135
6136 \begin_layout Plain Layout
6137 Document\SpecialChar \menuseparator
6138 Settings\SpecialChar \menuseparator
6139 Document Class
6140 \end_layout
6141
6142 \end_inset
6143
6144 , then you need to create a `layout' file for it.
6145  That is the topic of the next section.
6146 \end_layout
6147
6148 \begin_layout Section
6149 Types of layout files
6150 \end_layout
6151
6152 \begin_layout Standard
6153 This section describes the various sorts of LyX files that contain layout
6154  information.
6155  These files describe various paragraph and character styles, determining
6156  how LyX should display them and how they should be translated into LaTeX,
6157  DocBook, XHTML, or whatever output format is being used.
6158  
6159 \end_layout
6160
6161 \begin_layout Standard
6162 We shall try to provide a thorough description of the process of writing
6163  layout files here.
6164  However, there are so many different types of documents supported even
6165  by just LaTeX that we can't hope to cover every different possibility or
6166  problem you might encounter.
6167  The LyX users' list is frequented by people with lots of experience with
6168  layout design who are willing to share what they've learned, so please
6169  feel free to ask questions there.
6170 \end_layout
6171
6172 \begin_layout Standard
6173 As you prepare to write a new layout, it is extremely helpful to look at
6174  the layouts distributed with LyX.
6175  If you write a LyX layout for a LaTeX document class that might also be
6176  used by others, or write a module that might be useful to others, then
6177  you should consider posting your layout to the 
6178 \begin_inset CommandInset href
6179 LatexCommand href
6180 name "layout section on the LyX wiki"
6181 target "http://wiki.lyx.org/Layouts/Layouts"
6182
6183 \end_inset
6184
6185  or even to the LyX developers' list, so that it might be included in LyX
6186  itself.
6187 \begin_inset Foot
6188 status collapsed
6189
6190 \begin_layout Plain Layout
6191 Note that LyX is licensed under the General Public License, so any material
6192  that is contributed to LyX must be similarly licensed.
6193 \end_layout
6194
6195 \end_inset
6196
6197
6198 \end_layout
6199
6200 \begin_layout Subsection
6201 Layout modules
6202 \begin_inset CommandInset label
6203 LatexCommand label
6204 name "sub:Layout-modules"
6205
6206 \end_inset
6207
6208
6209 \end_layout
6210
6211 \begin_layout Standard
6212 We have spoken to this point about `layout files'.
6213  But there are different sorts of files that contain layout information.
6214  Layout files, strictly so called, have the 
6215 \begin_inset Flex Code
6216 status collapsed
6217
6218 \begin_layout Plain Layout
6219 .layout
6220 \end_layout
6221
6222 \end_inset
6223
6224  extension and provide LyX with information about document classes.
6225  As of LyX 1.6, however, layout information can also be contained in layout
6226  
6227 \emph on
6228 modules
6229 \emph default
6230 , which have the 
6231 \begin_inset Flex Code
6232 status collapsed
6233
6234 \begin_layout Plain Layout
6235 .module
6236 \end_layout
6237
6238 \end_inset
6239
6240  extension.
6241  Modules are to LaTeX packages much as layouts are to LaTeX classes, and
6242  some modules—such as the 
6243 \begin_inset Flex Code
6244 status collapsed
6245
6246 \begin_layout Plain Layout
6247 endnotes
6248 \end_layout
6249
6250 \end_inset
6251
6252  module—specifically provide support for one package.
6253  In a sense, layout modules are similar to included
6254 \begin_inset Foot
6255 status collapsed
6256
6257 \begin_layout Plain Layout
6258 These can have any extension, but by convention have the 
6259 \begin_inset Flex Code
6260 status collapsed
6261
6262 \begin_layout Plain Layout
6263 .inc
6264 \end_layout
6265
6266 \end_inset
6267
6268  extension.
6269 \end_layout
6270
6271 \end_inset
6272
6273  files—files like 
6274 \begin_inset Flex Code
6275 status collapsed
6276
6277 \begin_layout Plain Layout
6278 stdsections.inc
6279 \end_layout
6280
6281 \end_inset
6282
6283 —in that modules are not specific to a given document class but may be used
6284  with many different classes.
6285  The difference is that using an included file with 
6286 \begin_inset Flex Code
6287 status collapsed
6288
6289 \begin_layout Plain Layout
6290 article.cls
6291 \end_layout
6292
6293 \end_inset
6294
6295  requires editing that file.
6296  Modules, by contrast, are selected in the 
6297 \begin_inset Flex MenuItem
6298 status collapsed
6299
6300 \begin_layout Plain Layout
6301 Document\SpecialChar \menuseparator
6302 Settings
6303 \end_layout
6304
6305 \end_inset
6306
6307  dialog.
6308 \end_layout
6309
6310 \begin_layout Standard
6311 Building modules is the easiest way to get started with layout editing,
6312  since it can be as simple as adding a single new paragraph style or flex
6313  inset.
6314  But modules may, in principle, contain anything a layout file can contain.
6315 \end_layout
6316
6317 \begin_layout Standard
6318 After creating a new module and copying it to the 
6319 \begin_inset Flex Code
6320 status collapsed
6321
6322 \begin_layout Plain Layout
6323 layouts/
6324 \end_layout
6325
6326 \end_inset
6327
6328  folder, you will need to reconfigure and then restart LyX for the module
6329  to appear in the menu.
6330  However, changes you make to the module will be seen immediately, if you
6331  open 
6332 \begin_inset Flex MenuItem
6333 status collapsed
6334
6335 \begin_layout Plain Layout
6336 Document\SpecialChar \menuseparator
6337 Settings
6338 \end_layout
6339
6340 \end_inset
6341
6342 , highlight something, and then hit 
6343 \begin_inset Quotes eld
6344 \end_inset
6345
6346 OK
6347 \begin_inset Quotes erd
6348 \end_inset
6349
6350 .
6351  
6352 \emph on
6353 It is strongly recommended that you save your work before doing this
6354 \emph default
6355 .
6356  In fact, 
6357 \emph on
6358 it is strongly recommended that you not attempt to edit modules while simultaneo
6359 usly working on actual documents
6360 \emph default
6361 .
6362  Though of course the developers strive to keep LyX stable in such situations,
6363  syntax errors and the like in your module file could cause strange behavior.
6364 \end_layout
6365
6366 \begin_layout Subsubsection
6367 Local Layout
6368 \end_layout
6369
6370 \begin_layout Standard
6371 Modules are to LyX as packages are to LaTeX.
6372  Sometimes, however, you find yourself wanting a specific inset or character
6373  style just for one document and writing a module that will also be available
6374  to other documents makes little sense.
6375  What you need is LyX's 
6376 \begin_inset Quotes eld
6377 \end_inset
6378
6379 Local Layout
6380 \begin_inset Quotes erd
6381 \end_inset
6382
6383 .
6384 \end_layout
6385
6386 \begin_layout Standard
6387 You will find it under 
6388 \family sans
6389 Document\SpecialChar \menuseparator
6390 Settings\SpecialChar \menuseparator
6391 Local Layout
6392 \family default
6393 .
6394  The large text box allows you to enter anything that you might enter in
6395  a layout file or module.
6396  You can think of a document's local layout, in fact, as a module that belongs
6397  just to it.
6398  So, in particular, you must enter a 
6399 \begin_inset Flex Code
6400 status collapsed
6401
6402 \begin_layout Plain Layout
6403 Format
6404 \end_layout
6405
6406 \end_inset
6407
6408  tag.
6409  Any format is acceptable, but one would normally use the format current
6410  at the time.
6411  (In LyX 2.0, the current layout format is 35.) You should be aware that local
6412  layout is not supported by versions of LyX prior to 1.6, so you should not
6413  use it if you want to be able to export your document to LyX 1.5 or earlier
6414  (without, that is, losing the local layout information).
6415  If you wish to be able to export to 1.6---local layout is supported in 1.6,
6416  though there is no UI for it---then you should use format 11 and, of course,
6417  use only layout constructs that were available in LyX 1.6.
6418 \end_layout
6419
6420 \begin_layout Standard
6421 When you have entered something in the 
6422 \begin_inset Flex Code
6423 status collapsed
6424
6425 \begin_layout Plain Layout
6426 Local Layout
6427 \end_layout
6428
6429 \end_inset
6430
6431  pane, LyX will enable the 
6432 \begin_inset Quotes eld
6433 \end_inset
6434
6435 Validate
6436 \begin_inset Quotes erd
6437 \end_inset
6438
6439  button at the bottom.
6440  Clicking this button will cause LyX to determine whether what you have
6441  entered is valid layout information for the chosen format.
6442  LyX will report the result but, unfortunately, will not tell you what errors
6443  there might have been.
6444  These will be written to the terminal, however, if LyX is started from
6445  a terminal.
6446  You will not be permitted to save your local layout until you have entered
6447  something valid.
6448 \end_layout
6449
6450 \begin_layout Standard
6451 The warnings at the end of the previous section apply here, too.
6452  Do not play with local layout while you are actually working, especially
6453  if you have not saved your document.
6454  That said, using local layout with a test document can be a very convenient
6455  way to try out layout ideas, or even to start developing a module.
6456 \end_layout
6457
6458 \begin_layout Subsection
6459 Layout for 
6460 \begin_inset Flex MenuItem
6461 status collapsed
6462
6463 \begin_layout Plain Layout
6464 .sty
6465 \end_layout
6466
6467 \end_inset
6468
6469  files
6470 \end_layout
6471
6472 \begin_layout Standard
6473 There are two situations you are likely to encounter when wanting to support
6474  a new LaTeX document class, involving style (
6475 \begin_inset Flex Code
6476 status collapsed
6477
6478 \begin_layout Plain Layout
6479 .sty
6480 \end_layout
6481
6482 \end_inset
6483
6484 ) files and LaTeX2e class (
6485 \begin_inset Flex Code
6486 status collapsed
6487
6488 \begin_layout Plain Layout
6489 .cls
6490 \end_layout
6491
6492 \end_inset
6493
6494 ) .
6495  Supporting a style file is usually fairly easy.
6496  Supporting a new class file is a bit harder.
6497  We'll discuss the former in this section and the latter in the next.
6498  Similar remarks apply, of course, if you want to support a new DocBook
6499  DTD.
6500 \end_layout
6501
6502 \begin_layout Standard
6503 The easier case is the one in which your new document class is provided
6504  as a style file that is to be used in conjunction with an already supported
6505  document class.
6506  For the sake of the example, we'll assume that the style file is called
6507  
6508 \begin_inset Flex MenuItem
6509 status collapsed
6510
6511 \begin_layout Plain Layout
6512 myclass.sty
6513 \end_layout
6514
6515 \end_inset
6516
6517  and that it is meant to be used with 
6518 \begin_inset Flex MenuItem
6519 status collapsed
6520
6521 \begin_layout Plain Layout
6522 report.cls
6523 \end_layout
6524
6525 \end_inset
6526
6527 , which is a standard class.
6528  
6529 \end_layout
6530
6531 \begin_layout Standard
6532 Start by copying the existing class's layout file into your local directory:
6533 \begin_inset Foot
6534 status collapsed
6535
6536 \begin_layout Plain Layout
6537 Of course, which directory is your local directory will vary by platform,
6538  and LyX allows you to specify your local directory on startup, too, using
6539  the 
6540 \begin_inset Flex Code
6541 status collapsed
6542
6543 \begin_layout Plain Layout
6544 -userdir
6545 \end_layout
6546
6547 \end_inset
6548
6549  option.
6550 \end_layout
6551
6552 \end_inset
6553
6554
6555 \end_layout
6556
6557 \begin_layout LyX-Code
6558 cp report.layout ~/.lyx/layouts/myclass.layout
6559 \end_layout
6560
6561 \begin_layout Standard
6562 Then edit 
6563 \begin_inset Flex Code
6564 status collapsed
6565
6566 \begin_layout Plain Layout
6567 myclass.layout
6568 \end_layout
6569
6570 \end_inset
6571
6572  and change the line: 
6573 \end_layout
6574
6575 \begin_layout LyX-Code
6576
6577 \backslash
6578 DeclareLaTeXClass{report}
6579 \end_layout
6580
6581 \begin_layout Standard
6582 to read
6583 \end_layout
6584
6585 \begin_layout LyX-Code
6586
6587 \backslash
6588 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
6589 \end_layout
6590
6591 \begin_layout Standard
6592 Then add:
6593 \end_layout
6594
6595 \begin_layout LyX-Code
6596 Preamble 
6597 \begin_inset Newline newline
6598 \end_inset
6599
6600     
6601 \backslash
6602 usepackage{myclass}
6603 \begin_inset Newline newline
6604 \end_inset
6605
6606 EndPreamble
6607 \end_layout
6608
6609 \begin_layout Standard
6610 near the top of the file.
6611 \end_layout
6612
6613 \begin_layout Standard
6614 Start LyX and select 
6615 \begin_inset Flex MenuItem
6616 status collapsed
6617
6618 \begin_layout Plain Layout
6619 Tools\SpecialChar \menuseparator
6620 Reconfigure
6621 \end_layout
6622
6623 \end_inset
6624
6625 .
6626  Then restart LyX and try creating a new document.
6627  You should see "
6628 \begin_inset Flex MenuItem
6629 status collapsed
6630
6631 \begin_layout Plain Layout
6632 report (myclass)
6633 \end_layout
6634
6635 \end_inset
6636
6637 " as a document class option in the 
6638 \begin_inset Flex MenuItem
6639 status collapsed
6640
6641 \begin_layout Plain Layout
6642 Document\SpecialChar \menuseparator
6643 Settings
6644 \end_layout
6645
6646 \end_inset
6647
6648  dialog.
6649  It is likely that some of the sectioning commands and such in your new
6650  class will work differently from how they worked in the base class—
6651 \begin_inset Flex Code
6652 status collapsed
6653
6654 \begin_layout Plain Layout
6655 report
6656 \end_layout
6657
6658 \end_inset
6659
6660  in this example—so you can fiddle around with the settings for the different
6661  sections if you wish.
6662  The layout information for sections is contained in 
6663 \begin_inset Flex Code
6664 status collapsed
6665
6666 \begin_layout Plain Layout
6667 stdsections.inc
6668 \end_layout
6669
6670 \end_inset
6671
6672 , but you do not need to copy and change this file.
6673  Instead, you can simply add your changes to your layout file, after the
6674  line 
6675 \begin_inset Flex Code
6676 status collapsed
6677
6678 \begin_layout Plain Layout
6679 Input stdclass.inc
6680 \end_layout
6681
6682 \end_inset
6683
6684 , which itself includes 
6685 \begin_inset Flex Code
6686 status collapsed
6687
6688 \begin_layout Plain Layout
6689 stdsections.inc
6690 \end_layout
6691
6692 \end_inset
6693
6694 .
6695  For example, you might add these lines:
6696 \end_layout
6697
6698 \begin_layout LyX-Code
6699 Style Chapter
6700 \end_layout
6701
6702 \begin_layout LyX-Code
6703     Font
6704 \end_layout
6705
6706 \begin_layout LyX-Code
6707         Family Sans
6708 \end_layout
6709
6710 \begin_layout LyX-Code
6711     EndFont
6712 \end_layout
6713
6714 \begin_layout LyX-Code
6715 End
6716 \end_layout
6717
6718 \begin_layout Standard
6719 to change the font for chapter headings to sans-serif.
6720  This will override (or, in this case, add to) the existing declaration
6721  for the Chapter style.
6722  
6723 \end_layout
6724
6725 \begin_layout Standard
6726 Your new package may also provide commands or environments not present in
6727  the base class.
6728  In this case, you will want to add these to the layout file.
6729  See 
6730 \begin_inset CommandInset ref
6731 LatexCommand ref
6732 reference "sec:TextClass"
6733
6734 \end_inset
6735
6736  for information on how to do so.
6737 \end_layout
6738
6739 \begin_layout Standard
6740 If 
6741 \begin_inset Flex MenuItem
6742 status collapsed
6743
6744 \begin_layout Plain Layout
6745 myclass.sty
6746 \end_layout
6747
6748 \end_inset
6749
6750  can be used with several different document classes, and even if it cannot,
6751  you might find it easiest just to write a module that you can load with
6752  the base class.
6753  The simplest possible such module would be:
6754 \end_layout
6755
6756 \begin_layout LyX-Code
6757 #
6758 \backslash
6759 DeclareLyXModule{My Package} 
6760 \end_layout
6761
6762 \begin_layout LyX-Code
6763 #DescriptionBegin 
6764 \end_layout
6765
6766 \begin_layout LyX-Code
6767 #Support for mypkg.sty.
6768 \end_layout
6769
6770 \begin_layout LyX-Code
6771 #DescriptionEnd
6772 \begin_inset Newline newline
6773 \end_inset
6774
6775
6776 \end_layout
6777
6778 \begin_layout LyX-Code
6779 Format 21
6780 \begin_inset Newline newline
6781 \end_inset
6782
6783
6784 \end_layout
6785
6786 \begin_layout LyX-Code
6787 Preamble
6788 \begin_inset Newline newline
6789 \end_inset
6790
6791     
6792 \backslash
6793 usepackage{mypkg}
6794 \begin_inset Newline newline
6795 \end_inset
6796
6797 EndPreamble
6798 \end_layout
6799
6800 \begin_layout Standard
6801 A more complex module might modify the behavior of some existing constructs
6802  or define some new ones.
6803  Again, see 
6804 \begin_inset CommandInset ref
6805 LatexCommand ref
6806 reference "sec:TextClass"
6807
6808 \end_inset
6809
6810  for discussion.
6811 \end_layout
6812
6813 \begin_layout Subsection
6814 Layout for 
6815 \begin_inset Flex MenuItem
6816 status collapsed
6817
6818 \begin_layout Plain Layout
6819 .cls
6820 \end_layout
6821
6822 \end_inset
6823
6824  files
6825 \end_layout
6826
6827 \begin_layout Standard
6828 There are two possibilities here.
6829  One is that the class file is itself based upon an existing document class.
6830  For example, many thesis classes are based upon 
6831 \begin_inset Flex MenuItem
6832 status collapsed
6833
6834 \begin_layout Plain Layout
6835 book.cls
6836 \end_layout
6837
6838 \end_inset
6839
6840 .
6841  To see whether yours is, look for a line like
6842 \end_layout
6843
6844 \begin_layout LyX-Code
6845
6846 \backslash
6847 LoadClass{book}
6848 \end_layout
6849
6850 \begin_layout Standard
6851 in the file.
6852  If so, then you may proceed largely as in the previous section, though
6853  the 
6854 \begin_inset Flex Code
6855 status collapsed
6856
6857 \begin_layout Plain Layout
6858 DeclareLaTeXClass
6859 \end_layout
6860
6861 \end_inset
6862
6863  line will be different.
6864  If your new class is 
6865 \begin_inset Flex Code
6866 status collapsed
6867
6868 \begin_layout Plain Layout
6869 thesis
6870 \end_layout
6871
6872 \end_inset
6873
6874  and it is based upon 
6875 \begin_inset Flex Code
6876 status collapsed
6877
6878 \begin_layout Plain Layout
6879 book
6880 \end_layout
6881
6882 \end_inset
6883
6884 , then the line should read:
6885 \begin_inset Foot
6886 status collapsed
6887
6888 \begin_layout Plain Layout
6889 And it will be easiest if you save the file to 
6890 \begin_inset Flex Code
6891 status collapsed
6892
6893 \begin_layout Plain Layout
6894 thesis.layout
6895 \end_layout
6896
6897 \end_inset
6898
6899 : LyX assumes that the document class has the same name as the layout file.
6900  
6901 \end_layout
6902
6903 \end_inset
6904
6905
6906 \end_layout
6907
6908 \begin_layout LyX-Code
6909
6910 \backslash
6911 DeclareLaTeXClass[thesis,book]{thesis}
6912 \end_layout
6913
6914 \begin_layout Standard
6915 If, on the other hand, the new class is not based upon an existing class,
6916  you will probably have to 
6917 \begin_inset Quotes eld
6918 \end_inset
6919
6920 roll your own
6921 \begin_inset Quotes erd
6922 \end_inset
6923
6924  layout.
6925  We strongly suggest copying an existing layout file which uses a similar
6926  LaTeX class and then modifying it, if you can do so.
6927  At least use an existing file as a starting point so you can find out what
6928  items you need to worry about.
6929  Again, the specifics are covered below.
6930 \end_layout
6931
6932 \begin_layout Subsection
6933 Creating templates
6934 \begin_inset CommandInset label
6935 LatexCommand label
6936 name "sub:Creating-Templates"
6937
6938 \end_inset
6939
6940
6941 \end_layout
6942
6943 \begin_layout Standard
6944 Once you have written a layout file for a new document class, you might
6945  want to consider writing a 
6946 \emph on
6947 template
6948 \emph default
6949  for it, too.
6950  A template acts as a kind of tutorial for your layout, showing how it might
6951  be used, though containing dummy content.
6952  You can of course look at the various templates included with LyX for ideas.
6953 \end_layout
6954
6955 \begin_layout Standard
6956 Templates are created just like usual documents: using LyX.
6957  The only difference is that usual documents contain all possible settings,
6958  including the font scheme and the paper size.
6959  Usually a user doesn't want a template to overwrite his preferred settings
6960  for such parameters.
6961  For that reason, the designer of a template should remove the corresponding
6962  commands like 
6963 \begin_inset Flex Code
6964 status collapsed
6965
6966 \begin_layout Plain Layout
6967
6968 \backslash
6969 font_roman
6970 \end_layout
6971
6972 \end_inset
6973
6974  or 
6975 \begin_inset Flex Code
6976 status collapsed
6977
6978 \begin_layout Plain Layout
6979
6980 \backslash
6981 papersize
6982 \end_layout
6983
6984 \end_inset
6985
6986  from the template LyX file.
6987  This can be done with any simple text-editor, for example 
6988 \begin_inset Flex Code
6989 status collapsed
6990
6991 \begin_layout Plain Layout
6992 vi
6993 \end_layout
6994
6995 \end_inset
6996
6997  or 
6998 \begin_inset Flex Code
6999 status collapsed
7000
7001 \begin_layout Plain Layout
7002 notepad
7003 \end_layout
7004
7005 \end_inset
7006
7007 .
7008  
7009 \end_layout
7010
7011 \begin_layout Standard
7012 Put the edited template files you create in 
7013 \begin_inset Flex Code
7014 status collapsed
7015
7016 \begin_layout Plain Layout
7017 UserDir/templates/
7018 \end_layout
7019
7020 \end_inset
7021
7022 , copy the ones you use from the global template directory in 
7023 \begin_inset Flex Code
7024 status collapsed
7025
7026 \begin_layout Plain Layout
7027 LyXDir/templates/
7028 \end_layout
7029
7030 \end_inset
7031
7032  to the same place, and redefine the template path in the 
7033 \begin_inset Flex MenuItem
7034 status collapsed
7035
7036 \begin_layout Plain Layout
7037 Tools\SpecialChar \menuseparator
7038 Preferences\SpecialChar \menuseparator
7039 Paths
7040 \end_layout
7041
7042 \end_inset
7043
7044  dialog.
7045 \end_layout
7046
7047 \begin_layout Standard
7048 Note, by the way, that there is a template which has a particular meaning:
7049  
7050 \begin_inset Flex Code
7051 status collapsed
7052
7053 \begin_layout Plain Layout
7054 defaults.lyx
7055 \end_layout
7056
7057 \end_inset
7058
7059 .
7060  This template is loaded every time you create a new document with 
7061 \begin_inset Flex MenuItem
7062 status collapsed
7063
7064 \begin_layout Plain Layout
7065 File\SpecialChar \menuseparator
7066 New
7067 \end_layout
7068
7069 \end_inset
7070
7071  in order to provide useful defaults.
7072  To create this template from inside LyX, all you have to do is to open
7073  a document with the correct settings, and use the 
7074 \begin_inset Flex MenuItem
7075 status collapsed
7076
7077 \begin_layout Plain Layout
7078 Save as Document Defaults
7079 \end_layout
7080
7081 \end_inset
7082
7083  button.
7084 \end_layout
7085
7086 \begin_layout Subsection
7087 Upgrading old layout files
7088 \end_layout
7089
7090 \begin_layout Standard
7091 The format of layout files changes with each LyX release, so old layout
7092  files need to be converted to the new format.
7093  This process has been automated since LyX 1.4: If LyX reads a layout file
7094  in an older format, it automatically calls the script 
7095 \begin_inset Flex Code
7096 status collapsed
7097
7098 \begin_layout Plain Layout
7099 layout2layout.py
7100 \end_layout
7101
7102 \end_inset
7103
7104  to convert it to a temporary file in current format.
7105  The original file is left untouched.
7106  If you use the layout file often, then, you may want to convert it permanently,
7107  so that LyX does not have to do so itself every time.
7108  To do this, you can call the converter manually:
7109 \end_layout
7110
7111 \begin_layout LyX-Code
7112 mv myclass.layout myclass.old
7113 \end_layout
7114
7115 \begin_layout LyX-Code
7116 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7117 \end_layout
7118
7119 \begin_layout Standard
7120 You need to replace 
7121 \begin_inset Flex Code
7122 status collapsed
7123
7124 \begin_layout Plain Layout
7125 LyXDir
7126 \end_layout
7127
7128 \end_inset
7129
7130  with the name of your LyX system directory, of course.
7131 \end_layout
7132
7133 \begin_layout Standard
7134 Note that manual conversion does not affect included files, so these will
7135  have to be converted separately.
7136 \end_layout
7137
7138 \begin_layout Section
7139 \begin_inset CommandInset label
7140 LatexCommand label
7141 name "sec:TextClass"
7142
7143 \end_inset
7144
7145 The layout file format
7146 \end_layout
7147
7148 \begin_layout Standard
7149 When it's finally time to get your hands dirty and create or edit your own
7150  layout file, the following sections describe what you're up against.
7151  Our advice is to go slowly, save and test often, listen to soothing music,
7152  and enjoy one or two of your favorite adult beverages; more if you are
7153  getting particularly stuck.
7154  It's really not that hard, except that the multitude of options can become
7155  overwhelming if you try to do too much in one sitting.
7156  Go have another adult beverage, just for good measure.
7157 \end_layout
7158
7159 \begin_layout Standard
7160 Note that all the tags used in layout files are case-insensitive.
7161  This means that 
7162 \begin_inset Flex Code
7163 status collapsed
7164
7165 \begin_layout Plain Layout
7166 Style
7167 \end_layout
7168
7169 \end_inset
7170
7171
7172 \begin_inset Flex Code
7173 status collapsed
7174
7175 \begin_layout Plain Layout
7176 style
7177 \end_layout
7178
7179 \end_inset
7180
7181  and 
7182 \begin_inset Flex Code
7183 status collapsed
7184
7185 \begin_layout Plain Layout
7186 StYlE
7187 \end_layout
7188
7189 \end_inset
7190
7191  are really the same tag.
7192  The possible values are printed in brackets after the feature's name.
7193  The default value if a feature isn't specified inside a text class-description
7194  is typeset 
7195 \begin_inset Flex Code
7196 status collapsed
7197
7198 \begin_layout Plain Layout
7199
7200 \emph on
7201 emphasized
7202 \end_layout
7203
7204 \end_inset
7205
7206 .
7207  If the argument has a data type like 
7208 \begin_inset Quotes eld
7209 \end_inset
7210
7211 string
7212 \begin_inset Quotes erd
7213 \end_inset
7214
7215  or 
7216 \begin_inset Quotes eld
7217 \end_inset
7218
7219 float
7220 \begin_inset Quotes erd
7221 \end_inset
7222
7223 , the default is shown like this: 
7224 \begin_inset Flex Code
7225 status collapsed
7226
7227 \begin_layout Plain Layout
7228 float=
7229 \emph on
7230 default
7231 \end_layout
7232
7233 \end_inset
7234
7235 .
7236 \end_layout
7237
7238 \begin_layout Subsection
7239 The document class declaration
7240 \change_inserted -712698321 1349766602
7241  and classification
7242 \change_unchanged
7243
7244 \end_layout
7245
7246 \begin_layout Standard
7247 Lines in a layout file which begin with 
7248 \begin_inset Flex Code
7249 status collapsed
7250
7251 \begin_layout Plain Layout
7252 #
7253 \end_layout
7254
7255 \end_inset
7256
7257  are comments.
7258  There is one exception to this rule.
7259  All 
7260 \begin_inset Flex Code
7261 status collapsed
7262
7263 \begin_layout Plain Layout
7264 *.layout
7265 \end_layout
7266
7267 \end_inset
7268
7269  files should begin with 
7270 \change_deleted -712698321 1349766533
7271
7272 \change_unchanged
7273 line
7274 \change_inserted -712698321 1349766536
7275 s
7276 \change_unchanged
7277  like:
7278 \end_layout
7279
7280 \begin_layout LyX-Code
7281
7282 \size small
7283 #% Do not delete the line below; configure depends on this 
7284 \end_layout
7285
7286 \begin_layout LyX-Code
7287
7288 \size small
7289 #  
7290 \backslash
7291 DeclareLaTeXClass{
7292 \change_deleted -712698321 1349766193
7293 article
7294 \change_inserted -712698321 1349766201
7295 Article (Standard Class)
7296 \change_unchanged
7297 }
7298 \change_inserted -712698321 1349766538
7299
7300 \end_layout
7301
7302 \begin_layout LyX-Code
7303
7304 \change_inserted -712698321 1349766581
7305
7306 \size small
7307 #  
7308 \backslash
7309 DeclareCategory{Articles}
7310 \change_unchanged
7311
7312 \end_layout
7313
7314 \begin_layout Standard
7315 The second 
7316 \change_inserted -712698321 1349766695
7317 and third 
7318 \change_unchanged
7319 line
7320 \change_inserted -712698321 1349766626
7321 s
7322 \change_unchanged
7323  
7324 \change_deleted -712698321 1349766628
7325 is
7326 \change_inserted -712698321 1349766628
7327 are
7328 \change_unchanged
7329  used when you (re)configure LyX.
7330  The layout file is read by the LaTeX script 
7331 \begin_inset Flex Code
7332 status collapsed
7333
7334 \begin_layout Plain Layout
7335 chkconfig.ltx
7336 \end_layout
7337
7338 \end_inset
7339
7340 , in a special mode where 
7341 \begin_inset Flex Code
7342 status collapsed
7343
7344 \begin_layout Plain Layout
7345 #
7346 \end_layout
7347
7348 \end_inset
7349
7350  is ignored.
7351  The first line is just a LaTeX comment, 
7352 \change_deleted -712698321 1349766656
7353 and 
7354 \change_unchanged
7355 the second one contains the 
7356 \change_inserted -712698321 1349766650
7357 mandatory 
7358 \change_unchanged
7359 declaration of the text class
7360 \change_inserted -712698321 1349766689
7361 , and the third line contains the optional classification of the class
7362 \change_unchanged
7363 .
7364  If these lines appear in a file named 
7365 \begin_inset Flex Code
7366 status collapsed
7367
7368 \begin_layout Plain Layout
7369 article.layout
7370 \end_layout
7371
7372 \end_inset
7373
7374 , then they define a text class of name 
7375 \begin_inset Flex Code
7376 status collapsed
7377
7378 \begin_layout Plain Layout
7379 article
7380 \end_layout
7381
7382 \end_inset
7383
7384  (the name of the layout file) which uses the LaTeX document class 
7385 \begin_inset Flex Code
7386 status collapsed
7387
7388 \begin_layout Plain Layout
7389 article.cls
7390 \end_layout
7391
7392 \end_inset
7393
7394  (the default is to use the same name as the layout).
7395  The string 
7396 \begin_inset Quotes eld
7397 \end_inset
7398
7399
7400 \change_deleted -712698321 1349766253
7401 article
7402 \change_inserted -712698321 1349766260
7403 Article (Standard Class)
7404 \change_unchanged
7405
7406 \begin_inset Quotes erd
7407 \end_inset
7408
7409  that appears above is used as a description of the text class in the 
7410 \begin_inset Flex MenuItem
7411 status collapsed
7412
7413 \begin_layout Plain Layout
7414 Document\SpecialChar \menuseparator
7415 Settings
7416 \end_layout
7417
7418 \end_inset
7419
7420  dialog.
7421
7422 \change_inserted -712698321 1349767097
7423  The category (
7424 \begin_inset Quotes eld
7425 \end_inset
7426
7427 Articles
7428 \begin_inset Quotes erd
7429 \end_inset
7430
7431  in the example) is also used in the 
7432 \begin_inset Flex MenuItem
7433 status collapsed
7434
7435 \begin_layout Plain Layout
7436
7437 \change_inserted -712698321 1349766801
7438 Document\SpecialChar \menuseparator
7439 Settings
7440 \end_layout
7441
7442 \end_inset
7443
7444  dialog: the text classes are grouped by these categories (which are usually
7445  genres, so typical categories are 
7446 \begin_inset Quotes eld
7447 \end_inset
7448
7449 Articles
7450 \begin_inset Quotes erd
7451 \end_inset
7452
7453
7454 \begin_inset Quotes eld
7455 \end_inset
7456
7457 Books
7458 \begin_inset Quotes erd
7459 \end_inset
7460
7461
7462 \begin_inset Quotes eld
7463 \end_inset
7464
7465 Reports
7466 \begin_inset Quotes erd
7467 \end_inset
7468
7469
7470 \begin_inset Quotes eld
7471 \end_inset
7472
7473 Letters
7474 \begin_inset Quotes erd
7475 \end_inset
7476
7477
7478 \begin_inset Quotes eld
7479 \end_inset
7480
7481 Presentations
7482 \begin_inset Quotes erd
7483 \end_inset
7484
7485
7486 \begin_inset Quotes eld
7487 \end_inset
7488
7489 Curricula Vitae
7490 \begin_inset Quotes erd
7491 \end_inset
7492
7493  etc.).
7494  If no category has been declared, the class will be put in the 
7495 \begin_inset Quotes eld
7496 \end_inset
7497
7498 Uncategorized
7499 \begin_inset Quotes erd
7500 \end_inset
7501
7502  group.
7503 \change_unchanged
7504
7505 \end_layout
7506
7507 \begin_layout Standard
7508 Let's assume that you wrote your own text class that uses the 
7509 \begin_inset Flex Code
7510 status collapsed
7511
7512 \begin_layout Plain Layout
7513 article.cls
7514 \end_layout
7515
7516 \end_inset
7517
7518  document class, but where you changed the appearance of the section headings.
7519  If you put it in a file 
7520 \begin_inset Flex Code
7521 status collapsed
7522
7523 \begin_layout Plain Layout
7524 myarticle.layout
7525 \end_layout
7526
7527 \end_inset
7528
7529 , the header of this file should be:
7530 \end_layout
7531
7532 \begin_layout LyX-Code
7533
7534 \size small
7535 #% Do not delete the line below; configure depends on this 
7536 \end_layout
7537
7538 \begin_layout LyX-Code
7539
7540 \size small
7541 #  
7542 \backslash
7543 DeclareLaTeXClass[article]{
7544 \change_deleted -712698321 1349766303
7545 a
7546 \change_inserted -712698321 1349766303
7547 A
7548 \change_unchanged
7549 rticle (with 
7550 \change_deleted -712698321 1349766338
7551 m
7552 \change_inserted -712698321 1349766338
7553 M
7554 \change_unchanged
7555
7556 \change_deleted -712698321 1349766340
7557 o
7558 \change_inserted -712698321 1349766340
7559 O
7560 \change_unchanged
7561 wn 
7562 \change_deleted -712698321 1349766343
7563 h
7564 \change_inserted -712698321 1349766343
7565 H
7566 \change_unchanged
7567 eadings)}
7568 \change_inserted -712698321 1349767223
7569
7570 \end_layout
7571
7572 \begin_layout LyX-Code
7573
7574 \change_inserted -712698321 1349767223
7575
7576 \size small
7577 #  
7578 \backslash
7579 DeclareCategory{Articles}
7580 \change_unchanged
7581
7582 \end_layout
7583
7584 \begin_layout Standard
7585 This declares a text class 
7586 \begin_inset Flex Code
7587 status collapsed
7588
7589 \begin_layout Plain Layout
7590 myarticle
7591 \end_layout
7592
7593 \end_inset
7594
7595 , associated with the LaTeX document class 
7596 \begin_inset Flex Code
7597 status collapsed
7598
7599 \begin_layout Plain Layout
7600 article.cls
7601 \end_layout
7602
7603 \end_inset
7604
7605  and described as 
7606 \begin_inset Quotes eld
7607 \end_inset
7608
7609
7610 \change_deleted -712698321 1349766329
7611 a
7612 \change_inserted -712698321 1349766329
7613 A
7614 \change_unchanged
7615 rticle (with 
7616 \change_deleted -712698321 1349766347
7617 m
7618 \change_inserted -712698321 1349766347
7619 M
7620 \change_unchanged
7621
7622 \change_deleted -712698321 1349766350
7623 o
7624 \change_inserted -712698321 1349766350
7625 O
7626 \change_unchanged
7627 wn 
7628 \change_deleted -712698321 1349766352
7629 h
7630 \change_inserted -712698321 1349766352
7631 H
7632 \change_unchanged
7633 eadings)
7634 \begin_inset Quotes erd
7635 \end_inset
7636
7637 .
7638  If your text class depends on several packages, you can declare it as:
7639 \end_layout
7640
7641 \begin_layout LyX-Code
7642
7643 \size small
7644 #% Do not delete the line below; configure depends on this 
7645 \end_layout
7646
7647 \begin_layout LyX-Code
7648
7649 \size small
7650 #  
7651 \backslash
7652 DeclareLaTeXClass[article,foo.sty]{
7653 \change_deleted -712698321 1349766366
7654 a
7655 \change_inserted -712698321 1349766366
7656 A
7657 \change_unchanged
7658 rticle (with 
7659 \change_deleted -712698321 1349766369
7660 m
7661 \change_inserted -712698321 1349766369
7662 M
7663 \change_unchanged
7664
7665 \change_deleted -712698321 1349766371
7666 o
7667 \change_inserted -712698321 1349766371
7668 O
7669 \change_unchanged
7670 wn 
7671 \change_deleted -712698321 1349766374
7672 h
7673 \change_inserted -712698321 1349766374
7674 H
7675 \change_unchanged
7676 eadings)}
7677 \change_inserted -712698321 1349767240
7678
7679 \end_layout
7680
7681 \begin_layout LyX-Code
7682
7683 \change_inserted -712698321 1349767240
7684
7685 \size small
7686 #  
7687 \backslash
7688 DeclareCategory{Articles}
7689 \change_unchanged
7690
7691 \end_layout
7692
7693 \begin_layout Standard
7694 This indicates that your text class uses the 
7695 \begin_inset Flex Code
7696 status collapsed
7697
7698 \begin_layout Plain Layout
7699 foo.sty
7700 \end_layout
7701
7702 \end_inset
7703
7704  package.
7705  Finally, it is also possible to declare classes for DocBook code.
7706  Typical declarations will look like:
7707 \end_layout
7708
7709 \begin_layout LyX-Code
7710
7711 \size small
7712 #% Do not delete the line below; configure depends on this 
7713 \end_layout
7714
7715 \begin_layout LyX-Code
7716
7717 \size small
7718
7719 \backslash
7720 DeclareDocBookClass[article]{SGML (DocBook 
7721 \change_deleted -712698321 1349766387
7722 a
7723 \change_inserted -712698321 1349766387
7724 A
7725 \change_unchanged
7726 rticle)}
7727 \change_inserted -712698321 1349767247
7728
7729 \end_layout
7730
7731 \begin_layout LyX-Code
7732
7733 \change_inserted -712698321 1349767302
7734
7735 \size small
7736
7737 \backslash
7738 DeclareCategory{Articles (DocBook)}
7739 \change_unchanged
7740
7741 \end_layout
7742
7743 \begin_layout Standard
7744 Note that these declarations can also be given an optional parameter declaring
7745  the name of the document class (but not a list).
7746 \end_layout
7747
7748 \begin_layout Standard
7749 So, to be as explicit as possible, the form of the layout declaration is:
7750 \end_layout
7751
7752 \begin_layout LyX-Code
7753
7754 \size small
7755 #  
7756 \backslash
7757 DeclareLaTeXClass[class,package.sty]{layout description}
7758 \change_inserted -712698321 1349767329
7759
7760 \end_layout
7761
7762 \begin_layout LyX-Code
7763
7764 \change_inserted -712698321 1349767339
7765
7766 \size small
7767 #  
7768 \backslash
7769 DeclareCategory{category}
7770 \change_unchanged
7771
7772 \end_layout
7773
7774 \begin_layout Standard
7775 The class need only be specified if the name of the LaTeX class file and
7776  the name of the layout file are different or if there are packages to load.
7777  If the name of the class file is not specified, then LyX will simply assume
7778  that it is the same as the name of the layout file.
7779 \end_layout
7780
7781 \begin_layout Standard
7782 When the text class has been modified to your taste, all you have to do
7783  is to copy it either to 
7784 \begin_inset Flex Code
7785 status collapsed
7786
7787 \begin_layout Plain Layout
7788 LyXDir/layouts/
7789 \end_layout
7790
7791 \end_inset
7792
7793  or to 
7794 \begin_inset Flex Code
7795 status collapsed
7796
7797 \begin_layout Plain Layout
7798 UserDir/layouts
7799 \end_layout
7800
7801 \end_inset
7802
7803 , run 
7804 \begin_inset Flex MenuItem
7805 status collapsed
7806
7807 \begin_layout Plain Layout
7808 Tools\SpecialChar \menuseparator
7809 Reconfigure
7810 \end_layout
7811
7812 \end_inset
7813
7814 , exit LyX and restart.
7815  Then your new text class should be available along with the others.
7816 \end_layout
7817
7818 \begin_layout Standard
7819 Once the layout file is installed, you can edit it and see your changes
7820  without having to reconfigure or to restart LyX.
7821  
7822 \begin_inset Foot
7823 status collapsed
7824
7825 \begin_layout Plain Layout
7826 In versions of LyX prior to 1.6, this was not true.
7827  As a result, editing layout files was very time consuming, since you had
7828  constantly to restart LyX to see changes.
7829 \end_layout
7830
7831 \end_inset
7832
7833  You can force a reload of the current layout by using the LyX function
7834  
7835 \begin_inset Flex MenuItem
7836 status collapsed
7837
7838 \begin_layout Plain Layout
7839 layout-reload
7840 \end_layout
7841
7842 \end_inset
7843
7844 .
7845  There is no default binding for this function—though, of course, you can
7846  bind it to a key yourself.
7847  But you will normally use this function simply by entering it in the mini-buffe
7848 r.
7849  
7850 \end_layout
7851
7852 \begin_layout Standard
7853
7854 \emph on
7855 Warning
7856 \emph default
7857
7858 \begin_inset Flex MenuItem
7859 status collapsed
7860
7861 \begin_layout Plain Layout
7862 layout-reload
7863 \end_layout
7864
7865 \end_inset
7866
7867  is very much an `advanced feature'.
7868  It is 
7869 \emph on
7870 strongly
7871 \emph default
7872  recommended that you save your work before using this function.
7873  In fact, it is 
7874 \emph on
7875 strongly
7876 \emph default
7877  recommended that you not attempt to edit layout information while simultaneousl
7878 y working on a document that you care about.
7879  Use a test document.
7880  Syntax errors and the like in your layout file could cause peculiar behavior.
7881  In particular, such errors could cause LyX to regard the current layout
7882  as invalid and to attempt to switch to some other layout.
7883 \begin_inset Foot
7884 status collapsed
7885
7886 \begin_layout Plain Layout
7887 Really bad syntax errors may even caused LyX to exit.
7888  This is because certain sorts of errors may make LyX unable to read 
7889 \emph on
7890 any
7891 \emph default
7892  layout information.
7893  Please be careful.
7894 \end_layout
7895
7896 \end_inset
7897
7898  The LyX team strives to keep LyX stable in such situations, but safe is
7899  better than sorry.
7900 \begin_inset Foot
7901 status collapsed
7902
7903 \begin_layout Plain Layout
7904 While we're giving advice: make regular backups.
7905  And be nice to your mother.
7906 \end_layout
7907
7908 \end_inset
7909
7910
7911 \end_layout
7912
7913 \begin_layout Subsection
7914 The Module declaration
7915 \end_layout
7916
7917 \begin_layout Standard
7918 A module must begin with a line like the following:
7919 \end_layout
7920
7921 \begin_layout LyX-Code
7922 #
7923 \backslash
7924 DeclareLyXModule[endnotes.sty]{Endnotes} 
7925 \end_layout
7926
7927 \begin_layout Standard
7928 The mandatory argument, in curly brackets, is the name of the module, as
7929  it should appear in 
7930 \begin_inset Flex MenuItem
7931 status collapsed
7932
7933 \begin_layout Plain Layout
7934 Document\SpecialChar \menuseparator
7935 Settings\SpecialChar \menuseparator
7936 Modules
7937 \end_layout
7938
7939 \end_inset
7940
7941 .
7942  The argument in square brackets is optional: It declares any LaTeX packages
7943  on which the module depends.
7944  Please note that only packages about which LyX knows should be listed in
7945  the square brackets.
7946 \begin_inset Foot
7947 status collapsed
7948
7949 \begin_layout Plain Layout
7950 The list of such packages is documented only in the source code.
7951 \end_layout
7952
7953 \end_inset
7954
7955  LyX will not check for arbitrary packages.
7956  It is also possible to use the form 
7957 \begin_inset Flex MenuItem
7958 status collapsed
7959
7960 \begin_layout Plain Layout
7961 from->to
7962 \end_layout
7963
7964 \end_inset
7965
7966  as an optional argument, which declares that the module can only be used
7967  when there exists a conversion chain between the formats `
7968 \begin_inset Flex Code
7969 status collapsed
7970
7971 \begin_layout Plain Layout
7972 from
7973 \end_layout
7974
7975 \end_inset
7976
7977 ' and `
7978 \begin_inset Flex Code
7979 status collapsed
7980
7981 \begin_layout Plain Layout
7982 to
7983 \end_layout
7984
7985 \end_inset
7986
7987 '.
7988 \end_layout
7989
7990 \begin_layout Standard
7991 The module declaration should then be followed by lines like the following
7992 \begin_inset Foot
7993 status collapsed
7994
7995 \begin_layout Plain Layout
7996 Preferably in English if the module should be published with LyX.
7997  This description will appear in the list of messages to be translated and
7998  will be thus translated with the next interface update.
7999 \end_layout
8000
8001 \end_inset
8002
8003 :
8004 \end_layout
8005
8006 \begin_layout LyX-Code
8007 #DescriptionBegin 
8008 \end_layout
8009
8010 \begin_layout LyX-Code
8011 #Adds an endnote command, in addition to footnotes.
8012  
8013 \end_layout
8014
8015 \begin_layout LyX-Code
8016 #You will need to add  
8017 \backslash
8018 theendnotes in TeX code where you 
8019 \end_layout
8020
8021 \begin_layout LyX-Code
8022 #want the endnotes to appear.
8023  
8024 \end_layout
8025
8026 \begin_layout LyX-Code
8027 #DescriptionEnd 
8028 \end_layout
8029
8030 \begin_layout LyX-Code
8031 #Requires: somemodule | othermodule
8032 \end_layout
8033
8034 \begin_layout LyX-Code
8035 #Excludes: badmodule
8036 \end_layout
8037
8038 \begin_layout Standard
8039 The description is used in 
8040 \begin_inset Flex MenuItem
8041 status collapsed
8042
8043 \begin_layout Plain Layout
8044 Document\SpecialChar \menuseparator
8045 Settings\SpecialChar \menuseparator
8046 Modules
8047 \end_layout
8048
8049 \end_inset
8050
8051  to provide the user with information about what the module does.
8052  The 
8053 \begin_inset Flex Code
8054 status collapsed
8055
8056 \begin_layout Plain Layout
8057 Requires
8058 \end_layout
8059
8060 \end_inset
8061
8062  line is used to identify other modules with which this one must be used;
8063  the 
8064 \begin_inset Flex Code
8065 status collapsed
8066
8067 \begin_layout Plain Layout
8068 Excludes
8069 \end_layout
8070
8071 \end_inset
8072
8073  line is used to identify modules with which this one may not be used.
8074  Both are optional, and, as shown, multiple modules should be separated
8075  with the pipe symbol: |.
8076  Note that the required modules are treated disjunctively: 
8077 \emph on
8078 at least one
8079 \emph default
8080  of the required modules must be used.
8081  Similarly, 
8082 \emph on
8083 no
8084 \emph default
8085  excluded module may be used.
8086  Note that modules are identified here by their 
8087 \emph on
8088 filenames
8089 \emph default
8090  without the 
8091 \begin_inset Flex Code
8092 status collapsed
8093
8094 \begin_layout Plain Layout
8095 .module
8096 \end_layout
8097
8098 \end_inset
8099
8100  extension.
8101  So 
8102 \begin_inset Flex Code
8103 status collapsed
8104
8105 \begin_layout Plain Layout
8106 somemodule
8107 \end_layout
8108
8109 \end_inset
8110
8111  is really 
8112 \begin_inset Flex Code
8113 status collapsed
8114
8115 \begin_layout Plain Layout
8116 somemodule.module
8117 \end_layout
8118
8119 \end_inset
8120
8121 .
8122 \end_layout
8123
8124 \begin_layout Subsection
8125 Format number
8126 \end_layout
8127
8128 \begin_layout Standard
8129 The first non-comment line of any layout file, included file, or module
8130  
8131 \emph on
8132 must
8133 \emph default
8134  contain the file format number:
8135 \end_layout
8136
8137 \begin_layout Description
8138 \begin_inset Flex Code
8139 status collapsed
8140
8141 \begin_layout Plain Layout
8142 Format
8143 \end_layout
8144
8145 \end_inset
8146
8147  [
8148 \begin_inset Flex Code
8149 status collapsed
8150
8151 \begin_layout Plain Layout
8152 int
8153 \end_layout
8154
8155 \end_inset
8156
8157 ] The format of the layout file.
8158 \end_layout
8159
8160 \begin_layout Standard
8161 This tag was introduced with LyX 1.4.0.
8162  Layout files from LyX 1.3.x and earlier don't have an explicit file format
8163  and are considered to be of format 1.
8164  The format for the present version of LyX is format 21.
8165  But each version of LyX is capable of reading earlier versions' layout
8166  files, just as they are capable of reading files produced by earlier versions
8167  of LyX.
8168  There is, however, no provision for converting to earlier formats.
8169  So LyX 1.6.x will not read layout files in format 21 but only files in format
8170  11 or earlier.
8171 \end_layout
8172
8173 \begin_layout Subsection
8174 \begin_inset CommandInset label
8175 LatexCommand label
8176 name "sub:General-text-class"
8177
8178 \end_inset
8179
8180 General text class parameters
8181 \end_layout
8182
8183 \begin_layout Standard
8184 These are general parameters that govern the behavior of an entire document
8185  class.
8186  (This does 
8187 \emph on
8188 not
8189 \emph default
8190  mean that they must appear in 
8191 \begin_inset Flex Code
8192 status collapsed
8193
8194 \begin_layout Plain Layout
8195 .layout
8196 \end_layout
8197
8198 \end_inset
8199
8200  files rather than in modules.
8201  A module can contain any layout tag.)
8202 \end_layout
8203
8204 \begin_layout Description
8205 \begin_inset Flex Code
8206 status collapsed
8207
8208 \begin_layout Plain Layout
8209 AddToHTMLPreamble
8210 \end_layout
8211
8212 \end_inset
8213
8214  Adds information that will be output in the 
8215 \begin_inset Flex Code
8216 status collapsed
8217
8218 \begin_layout Plain Layout
8219 <head>
8220 \end_layout
8221
8222 \end_inset
8223
8224  block when this document class is output to XHTML.
8225  Typically, this would be used to output CSS style information, but it can
8226  be used for anything that can appear in 
8227 \begin_inset Flex Code
8228 status collapsed
8229
8230 \begin_layout Plain Layout
8231 <head>
8232 \end_layout
8233
8234 \end_inset
8235
8236 .
8237  Must end with 
8238 \begin_inset Quotes eld
8239 \end_inset
8240
8241
8242 \begin_inset Flex Code
8243 status collapsed
8244
8245 \begin_layout Plain Layout
8246 EndPreamble
8247 \end_layout
8248
8249 \end_inset
8250
8251
8252 \begin_inset Quotes erd
8253 \end_inset
8254
8255 .
8256 \end_layout
8257
8258 \begin_layout Description
8259 \begin_inset Flex Code
8260 status collapsed
8261
8262 \begin_layout Plain Layout
8263 AddToHTMLStyles
8264 \end_layout
8265
8266 \end_inset
8267
8268  Adds CSS styling information.
8269  This will either be output in a 
8270 \begin_inset Quotes eld
8271 \end_inset
8272
8273
8274 \begin_inset Flex Code
8275 status collapsed
8276
8277 \begin_layout Plain Layout
8278 <style>
8279 \end_layout
8280
8281 \end_inset
8282
8283
8284 \begin_inset Quotes erd
8285 \end_inset
8286
8287  block or, if the user has so chosen, to a separate CSS file.Must end with
8288  
8289 \begin_inset Quotes eld
8290 \end_inset
8291
8292
8293 \begin_inset Flex Code
8294 status collapsed
8295
8296 \begin_layout Plain Layout
8297 EndStyles
8298 \end_layout
8299
8300 \end_inset
8301
8302
8303 \begin_inset Quotes erd
8304 \end_inset
8305
8306 .
8307 \end_layout
8308
8309 \begin_layout Description
8310 \begin_inset Flex Code
8311 status collapsed
8312
8313 \begin_layout Plain Layout
8314 AddToPreamble
8315 \end_layout
8316
8317 \end_inset
8318
8319  Adds information to the document preamble.
8320  Must end with 
8321 \begin_inset Quotes eld
8322 \end_inset
8323
8324
8325 \begin_inset Flex Code
8326 status collapsed
8327
8328 \begin_layout Plain Layout
8329 EndPreamble
8330 \end_layout
8331
8332 \end_inset
8333
8334
8335 \begin_inset Quotes erd
8336 \end_inset
8337
8338 .
8339 \end_layout
8340
8341 \begin_layout Description
8342 \begin_inset Flex Code
8343 status collapsed
8344
8345 \begin_layout Plain Layout
8346 CiteFormat
8347 \end_layout
8348
8349 \end_inset
8350
8351  Defines formats for use in the display of bibliographic information.
8352  See Section 
8353 \begin_inset CommandInset ref
8354 LatexCommand ref
8355 reference "sub:Citation-format-description"
8356
8357 \end_inset
8358
8359  for details.
8360  Must end with 
8361 \begin_inset Quotes eld
8362 \end_inset
8363
8364
8365 \begin_inset Flex Code
8366 status collapsed
8367
8368 \begin_layout Plain Layout
8369 End
8370 \end_layout
8371
8372 \end_inset
8373
8374
8375 \begin_inset Quotes erd
8376 \end_inset
8377
8378 .
8379 \end_layout
8380
8381 \begin_layout Description
8382 \begin_inset Flex Code
8383 status collapsed
8384
8385 \begin_layout Plain Layout
8386 ClassOptions
8387 \end_layout
8388
8389 \end_inset
8390
8391  Describes various global options supported by the document class.
8392  See Section
8393 \begin_inset space ~
8394 \end_inset
8395
8396
8397 \begin_inset CommandInset ref
8398 LatexCommand ref
8399 reference "sub:ClassOptions"
8400
8401 \end_inset
8402
8403  for a description.
8404  Must end with 
8405 \begin_inset Quotes eld
8406 \end_inset
8407
8408
8409 \begin_inset Flex Code
8410 status collapsed
8411
8412 \begin_layout Plain Layout
8413 End
8414 \end_layout
8415
8416 \end_inset
8417
8418
8419 \begin_inset Quotes erd
8420 \end_inset
8421
8422 .
8423 \end_layout
8424
8425 \begin_layout Description
8426 \begin_inset Flex Code
8427 status collapsed
8428
8429 \begin_layout Plain Layout
8430 Columns
8431 \end_layout
8432
8433 \end_inset
8434
8435  [
8436 \begin_inset Flex Code
8437 status collapsed
8438
8439 \begin_layout Plain Layout
8440
8441 \emph on
8442 1
8443 \end_layout
8444
8445 \end_inset
8446
8447
8448 \begin_inset Flex Code
8449 status collapsed
8450
8451 \begin_layout Plain Layout
8452 2
8453 \end_layout
8454
8455 \end_inset
8456
8457 ] Whether the class should 
8458 \emph on
8459 default
8460 \emph default
8461  to having one or two columns.
8462  Can be changed in the 
8463 \begin_inset Flex MenuItem
8464 status collapsed
8465
8466 \begin_layout Plain Layout
8467 Document\SpecialChar \menuseparator
8468 Settings
8469 \end_layout
8470
8471 \end_inset
8472
8473  dialog.
8474 \end_layout
8475
8476 \begin_layout Description
8477 \begin_inset Flex Code
8478 status collapsed
8479
8480 \begin_layout Plain Layout
8481 Counter
8482 \end_layout
8483
8484 \end_inset
8485
8486  [
8487 \begin_inset Flex Code
8488 status collapsed
8489
8490 \begin_layout Plain Layout
8491 string
8492 \end_layout
8493
8494 \end_inset
8495
8496 ] This sequence defines the properties for a counter.
8497  If the counter does not yet exist, it is created; if it does exist, it
8498  is modified.
8499  Must end with 
8500 \begin_inset Quotes eld
8501 \end_inset
8502
8503
8504 \begin_inset Flex Code
8505 status collapsed
8506
8507 \begin_layout Plain Layout
8508 End
8509 \end_layout
8510
8511 \end_inset
8512
8513
8514 \begin_inset Quotes erd
8515 \end_inset
8516
8517 .
8518 \begin_inset Newline newline
8519 \end_inset
8520
8521 See Section
8522 \begin_inset space ~
8523 \end_inset
8524
8525
8526 \begin_inset CommandInset ref
8527 LatexCommand ref
8528 reference "sub:Counters"
8529
8530 \end_inset
8531
8532  for details on counters.
8533 \end_layout
8534
8535 \begin_layout Description
8536 \begin_inset Flex Code
8537 status collapsed
8538
8539 \begin_layout Plain Layout
8540 DefaultFont
8541 \end_layout
8542
8543 \end_inset
8544
8545  Sets the default font used to display the document.
8546  See Section
8547 \begin_inset space ~
8548 \end_inset
8549
8550
8551 \begin_inset CommandInset ref
8552 LatexCommand ref
8553 reference "sub:Font-description"
8554
8555 \end_inset
8556
8557  for how to declare fonts.
8558  Must end with 
8559 \begin_inset Quotes eld
8560 \end_inset
8561
8562
8563 \begin_inset Flex Code
8564 status collapsed
8565
8566 \begin_layout Plain Layout
8567 EndFont
8568 \end_layout
8569
8570 \end_inset
8571
8572
8573 \begin_inset Quotes erd
8574 \end_inset
8575
8576 .
8577 \end_layout
8578
8579 \begin_layout Description
8580 \begin_inset Flex Code
8581 status collapsed
8582
8583 \begin_layout Plain Layout
8584 DefaultModule
8585 \end_layout
8586
8587 \end_inset
8588
8589  [
8590 \begin_inset Flex Code
8591 status collapsed
8592
8593 \begin_layout Plain Layout
8594 string]
8595 \end_layout
8596
8597 \end_inset
8598
8599  Specifies a module to be included by default with this document class.
8600  The module should be specified by filename without the 
8601 \begin_inset Flex Code
8602 status collapsed
8603
8604 \begin_layout Plain Layout
8605 .module
8606 \end_layout
8607
8608 \end_inset
8609
8610  extension.
8611  The user can still remove the module, but it will be active at the outset.
8612  (This applies only when new files are created, or when this class is chosen
8613  for an existing document.)
8614 \end_layout
8615
8616 \begin_layout Description
8617 \begin_inset Flex Code
8618 status collapsed
8619
8620 \begin_layout Plain Layout
8621 DefaultStyle
8622 \end_layout
8623
8624 \end_inset
8625
8626  [
8627 \begin_inset Flex Code
8628 status collapsed
8629
8630 \begin_layout Plain Layout
8631 string
8632 \end_layout
8633
8634 \end_inset
8635
8636 ] This is the style that will be assigned to new paragraphs, usually 
8637 \begin_inset Flex MenuItem
8638 status collapsed
8639
8640 \begin_layout Plain Layout
8641 Standard
8642 \end_layout
8643
8644 \end_inset
8645
8646 .
8647  This will default to the first defined style if not given, but you are
8648  encouraged to use this directive.
8649 \end_layout
8650
8651 \begin_layout Description
8652 \begin_inset Flex Code
8653 status collapsed
8654
8655 \begin_layout Plain Layout
8656 ExcludesModule
8657 \end_layout
8658
8659 \end_inset
8660
8661  [
8662 \begin_inset Flex Code
8663 status collapsed
8664
8665 \begin_layout Plain Layout
8666 string
8667 \end_layout
8668
8669 \end_inset
8670
8671 ] This tag indicates that the module in question—which should be specified
8672  by filename without the 
8673 \begin_inset Flex Code
8674 status collapsed
8675
8676 \begin_layout Plain Layout
8677 .module
8678 \end_layout
8679
8680 \end_inset
8681
8682  extension—cannot be used with this document class.
8683  This might be used in a journal-specific layout file to prevent, say, the
8684  use of the 
8685 \begin_inset Flex Code
8686 status collapsed
8687
8688 \begin_layout Plain Layout
8689 theorems-sec
8690 \end_layout
8691
8692 \end_inset
8693
8694  module that numbers theorems by section.
8695  This tag may 
8696 \emph on
8697 not
8698 \emph default
8699  be used in a module.
8700  Modules have their own way of excluding other modules (see 
8701 \begin_inset CommandInset ref
8702 LatexCommand ref
8703 reference "sub:Layout-modules"
8704
8705 \end_inset
8706
8707 ).
8708 \end_layout
8709
8710 \begin_layout Description
8711 \begin_inset Flex Code
8712 status collapsed
8713
8714 \begin_layout Plain Layout
8715 Float
8716 \end_layout
8717
8718 \end_inset
8719
8720  Defines a new float.
8721  See Section
8722 \begin_inset space ~
8723 \end_inset
8724
8725
8726 \begin_inset CommandInset ref
8727 LatexCommand ref
8728 reference "sub:Floats"
8729
8730 \end_inset
8731
8732  for details.
8733  Must end with 
8734 \begin_inset Quotes eld
8735 \end_inset
8736
8737
8738 \begin_inset Flex Code
8739 status collapsed
8740
8741 \begin_layout Plain Layout
8742 End
8743 \end_layout
8744
8745 \end_inset
8746
8747
8748 \begin_inset Quotes erd
8749 \end_inset
8750
8751 .
8752 \end_layout
8753
8754 \begin_layout Description
8755 \begin_inset Flex Code
8756 status collapsed
8757
8758 \begin_layout Plain Layout
8759 HTMLPreamble
8760 \end_layout
8761
8762 \end_inset
8763
8764  Sets the information that will be output in the 
8765 \begin_inset Flex Code
8766 status collapsed
8767
8768 \begin_layout Plain Layout
8769 <head>
8770 \end_layout
8771
8772 \end_inset
8773
8774  block when this document class is output to XHTML.
8775  Note that this will completely override any prior 
8776 \begin_inset Flex Code
8777 status collapsed
8778
8779 \begin_layout Plain Layout
8780 HTMLPreamble
8781 \end_layout
8782
8783 \end_inset
8784
8785  or 
8786 \begin_inset Flex Code
8787 status collapsed
8788
8789 \begin_layout Plain Layout
8790 AddToHTMLPreamble
8791 \end_layout
8792
8793 \end_inset
8794
8795  declarations.
8796  (Use 
8797 \begin_inset Flex Code
8798 status collapsed
8799
8800 \begin_layout Plain Layout
8801 AddToHTMLPreamble
8802 \end_layout
8803
8804 \end_inset
8805
8806  if you just want to add material to the preamble.) Must end with 
8807 \begin_inset Quotes eld
8808 \end_inset
8809
8810
8811 \begin_inset Flex Code
8812 status collapsed
8813
8814 \begin_layout Plain Layout
8815 EndPreamble
8816 \end_layout
8817
8818 \end_inset
8819
8820
8821 \begin_inset Quotes erd
8822 \end_inset
8823
8824 .
8825 \end_layout
8826
8827 \begin_layout Description
8828 \begin_inset Flex Code
8829 status collapsed
8830
8831 \begin_layout Plain Layout
8832 HTMLStyles
8833 \end_layout
8834
8835 \end_inset
8836
8837  Sets CSS styling information.
8838  This will either be output in a 
8839 \begin_inset Quotes eld
8840 \end_inset
8841
8842
8843 \begin_inset Flex Code
8844 status collapsed
8845
8846 \begin_layout Plain Layout
8847 <style>
8848 \end_layout
8849
8850 \end_inset
8851
8852
8853 \begin_inset Quotes erd
8854 \end_inset
8855
8856  block or, if the user has so chosen, to a separate CSS file.
8857  Note that this will completely override any prior 
8858 \begin_inset Flex Code
8859 status collapsed
8860
8861 \begin_layout Plain Layout
8862 HTMLStyles
8863 \end_layout
8864
8865 \end_inset
8866
8867  or 
8868 \begin_inset Flex Code
8869 status collapsed
8870
8871 \begin_layout Plain Layout
8872 AddToHTMLStyles
8873 \end_layout
8874
8875 \end_inset
8876
8877  declarations.
8878  (Use 
8879 \begin_inset Flex Code
8880 status collapsed
8881
8882 \begin_layout Plain Layout
8883 AddToHTMLStyles
8884 \end_layout
8885
8886 \end_inset
8887
8888  if you just want to add material.) Must end with 
8889 \begin_inset Quotes eld
8890 \end_inset
8891
8892
8893 \begin_inset Flex Code
8894 status collapsed
8895
8896 \begin_layout Plain Layout
8897 EndStyles
8898 \end_layout
8899
8900 \end_inset
8901
8902
8903 \begin_inset Quotes erd
8904 \end_inset
8905
8906 .
8907 \end_layout
8908
8909 \begin_layout Description
8910 \begin_inset Flex Code
8911 status collapsed
8912
8913 \begin_layout Plain Layout
8914 HTMLTOCSection
8915 \end_layout
8916
8917 \end_inset
8918
8919  [
8920 \begin_inset Flex Code
8921 status collapsed
8922
8923 \begin_layout Plain Layout
8924 string
8925 \end_layout
8926
8927 \end_inset
8928
8929 ] The layout to use for the table of contents, bibliography, and so forth,
8930  when the document is output to HTML.
8931  For articles, this should normally be Section; for books, Chapter.
8932  If it is not given, then LyX will attempt to figure out which layout to
8933  use.
8934 \end_layout
8935
8936 \begin_layout Description
8937 \begin_inset Flex Code
8938 status collapsed
8939
8940 \begin_layout Plain Layout
8941 IfCounter
8942 \end_layout
8943
8944 \end_inset
8945
8946  [
8947 \begin_inset Flex Code
8948 status collapsed
8949
8950 \begin_layout Plain Layout
8951 string
8952 \end_layout
8953
8954 \end_inset
8955
8956 ] Modifies the properties of the given counter.
8957  If the counter does not exist, the section is ignored.
8958  Must end with 
8959 \begin_inset Quotes eld
8960 \end_inset
8961
8962
8963 \begin_inset Flex Code
8964 status collapsed
8965
8966 \begin_layout Plain Layout
8967 End
8968 \end_layout
8969
8970 \end_inset
8971
8972
8973 \begin_inset Quotes erd
8974 \end_inset
8975
8976 .
8977 \begin_inset Newline newline
8978 \end_inset
8979
8980 See Section
8981 \begin_inset space ~
8982 \end_inset
8983
8984
8985 \begin_inset CommandInset ref
8986 LatexCommand ref
8987 reference "sub:Counters"
8988
8989 \end_inset
8990
8991  for details on counters.
8992 \end_layout
8993
8994 \begin_layout Description
8995 \begin_inset Flex Code
8996 status collapsed
8997
8998 \begin_layout Plain Layout
8999 IfStyle
9000 \end_layout
9001
9002 \end_inset
9003
9004  [
9005 \begin_inset Flex Code
9006 status collapsed
9007
9008 \begin_layout Plain Layout
9009 string
9010 \end_layout
9011
9012 \end_inset
9013
9014 ] Modifies the properties of the given paragraph style.
9015  If the style does not exist, the section is ignored.
9016  Must end with 
9017 \begin_inset Quotes eld
9018 \end_inset
9019
9020
9021 \begin_inset Flex Code
9022 status collapsed
9023
9024 \begin_layout Plain Layout
9025 End
9026 \end_layout
9027
9028 \end_inset
9029
9030
9031 \begin_inset Quotes erd
9032 \end_inset
9033
9034 .
9035 \end_layout
9036
9037 \begin_layout Description
9038 \begin_inset Flex Code
9039 status collapsed
9040
9041 \begin_layout Plain Layout
9042 Input
9043 \end_layout
9044
9045 \end_inset
9046
9047  As its name implies, this command allows you to include another layout
9048  definition file within yours to avoid duplicating commands.
9049  Common examples are the standard layout files, for example, 
9050 \begin_inset Flex Code
9051 status collapsed
9052
9053 \begin_layout Plain Layout
9054 stdclass.inc
9055 \end_layout
9056
9057 \end_inset
9058
9059 , which contains most of the basic layouts.
9060 \end_layout
9061
9062 \begin_layout Description
9063 \begin_inset Flex Code
9064 status collapsed
9065
9066 \begin_layout Plain Layout
9067 InsetLayout
9068 \end_layout
9069
9070 \end_inset
9071
9072  This section (re-)defines the layout of an inset.
9073  It can be applied to an existing inset or to a new, user-defined inset,
9074  e.g., a new character style.
9075  Must end with 
9076 \begin_inset Quotes eld
9077 \end_inset
9078
9079
9080 \begin_inset Flex Code
9081 status collapsed
9082
9083 \begin_layout Plain Layout
9084 End
9085 \end_layout
9086
9087 \end_inset
9088
9089
9090 \begin_inset Quotes erd
9091 \end_inset
9092
9093 .
9094 \begin_inset Newline newline
9095 \end_inset
9096
9097 See Section
9098 \begin_inset space ~
9099 \end_inset
9100
9101
9102 \begin_inset CommandInset ref
9103 LatexCommand ref
9104 reference "sub:Flex-insets-and"
9105
9106 \end_inset
9107
9108  for more information.
9109  
9110 \end_layout
9111
9112 \begin_layout Description
9113 \begin_inset Flex Code
9114 status collapsed
9115
9116 \begin_layout Plain Layout
9117 LeftMargin
9118 \end_layout
9119
9120 \end_inset
9121
9122  [
9123 \begin_inset Flex Code
9124 status collapsed
9125
9126 \begin_layout Plain Layout
9127 string
9128 \end_layout
9129
9130 \end_inset
9131
9132 ] A string that indicates the width of the left margin on the screen, for
9133  example, 
9134 \begin_inset Quotes eld
9135 \end_inset
9136
9137 MMMMM
9138 \begin_inset Quotes erd
9139 \end_inset
9140
9141 .
9142  (Note that this is not a `length', like 
9143 \begin_inset Quotes eld
9144 \end_inset
9145
9146 2ex
9147 \begin_inset Quotes erd
9148 \end_inset
9149
9150 .)
9151 \end_layout
9152
9153 \begin_layout Description
9154 \begin_inset Flex Code
9155 status collapsed
9156
9157 \begin_layout Plain Layout
9158 NoCounter
9159 \end_layout
9160
9161 \end_inset
9162
9163  [
9164 \begin_inset Flex Code
9165 status collapsed
9166
9167 \begin_layout Plain Layout
9168 string
9169 \end_layout
9170
9171 \end_inset
9172
9173 ] This command deletes an existing counter, usually one defined in an included
9174  file.
9175 \end_layout
9176
9177 \begin_layout Description
9178 \begin_inset Flex Code
9179 status collapsed
9180
9181 \begin_layout Plain Layout
9182 NoFloat
9183 \end_layout
9184
9185 \end_inset
9186
9187  This command deletes an existing float.
9188  This is particularly useful when you want to suppress a float that has
9189  been defined in an input file.
9190 \end_layout
9191
9192 \begin_layout Description
9193 \begin_inset Flex Code
9194 status collapsed
9195
9196 \begin_layout Plain Layout
9197 NoStyle
9198 \end_layout
9199
9200 \end_inset
9201
9202  This command deletes an existing style.
9203  This is particularly useful when you want to suppress a style that has
9204  be defined in an input file.
9205 \end_layout
9206
9207 \begin_layout Description
9208 \begin_inset Flex Code
9209 status collapsed
9210
9211 \begin_layout Plain Layout
9212 OutputFormat
9213 \end_layout
9214
9215 \end_inset
9216
9217  A string indicating the file format (as defined in the Preferences dialog)
9218  produced by this class.
9219  It is mainly useful when 
9220 \begin_inset Flex Code
9221 status collapsed
9222
9223 \begin_layout Plain Layout
9224 OutputType
9225 \end_layout
9226
9227 \end_inset
9228
9229  is `literate' and one wants to define a new type of literate document.
9230  This string is reset to `docbook', `latex', or `literate' when the correspondin
9231
9232 \begin_inset Flex Code
9233 status collapsed
9234
9235 \begin_layout Plain Layout
9236 OutputType
9237 \end_layout
9238
9239 \end_inset
9240
9241  parameter is encountered.
9242 \end_layout
9243
9244 \begin_layout Description
9245 \begin_inset Flex Code
9246 status collapsed
9247
9248 \begin_layout Plain Layout
9249 OutputType
9250 \end_layout
9251
9252 \end_inset
9253
9254  A string indicating what sort of output documents using this class will
9255  produce.
9256  At present, the options are: `docbook', `latex', and `literate'.
9257 \end_layout
9258
9259 \begin_layout Description
9260 \begin_inset Flex Code
9261 status collapsed
9262
9263 \begin_layout Plain Layout
9264 PageStyle
9265 \end_layout
9266
9267 \end_inset
9268
9269  [
9270 \begin_inset Flex Code
9271 status collapsed
9272
9273 \begin_layout Plain Layout
9274
9275 \emph on
9276 plain
9277 \end_layout
9278
9279 \end_inset
9280
9281
9282 \begin_inset Flex Code
9283 status collapsed
9284
9285 \begin_layout Plain Layout
9286 empty
9287 \end_layout
9288
9289 \end_inset
9290
9291
9292 \begin_inset Flex Code
9293 status collapsed
9294
9295 \begin_layout Plain Layout
9296 headings
9297 \end_layout
9298
9299 \end_inset
9300
9301 ] The default pagestyle.
9302  Can be changed in the 
9303 \begin_inset Flex MenuItem
9304 status collapsed
9305
9306 \begin_layout Plain Layout
9307 Document\SpecialChar \menuseparator
9308 Settings
9309 \end_layout
9310
9311 \end_inset
9312
9313  dialog.
9314 \end_layout
9315
9316 \begin_layout Description
9317 \begin_inset Flex Code
9318 status collapsed
9319
9320 \begin_layout Plain Layout
9321 Preamble
9322 \end_layout
9323
9324 \end_inset
9325
9326  Sets the preamble for the LaTeX document.
9327  Note that this will completely override any prior 
9328 \begin_inset Flex Code
9329 status collapsed
9330
9331 \begin_layout Plain Layout
9332 Preamble
9333 \end_layout
9334
9335 \end_inset
9336
9337  or 
9338 \begin_inset Flex Code
9339 status collapsed
9340
9341 \begin_layout Plain Layout
9342 AddToPreamble
9343 \end_layout
9344
9345 \end_inset
9346
9347  declarations.
9348  (Use 
9349 \begin_inset Flex Code
9350 status collapsed
9351
9352 \begin_layout Plain Layout
9353 AddToPreamble
9354 \end_layout
9355
9356 \end_inset
9357
9358  if you just want to add material to the preamble.) Must end with 
9359 \begin_inset Quotes eld
9360 \end_inset
9361
9362
9363 \begin_inset Flex Code
9364 status collapsed
9365
9366 \begin_layout Plain Layout
9367 EndPreamble
9368 \end_layout
9369
9370 \end_inset
9371
9372
9373 \begin_inset Quotes erd
9374 \end_inset
9375
9376 .
9377 \end_layout
9378
9379 \begin_layout Description
9380 \begin_inset Flex Code
9381 status collapsed
9382
9383 \begin_layout Plain Layout
9384 Provides
9385 \end_layout
9386
9387 \end_inset
9388
9389  [
9390 \begin_inset Flex Code
9391 status collapsed
9392
9393 \begin_layout Plain Layout
9394 string
9395 \end_layout
9396
9397 \end_inset
9398
9399 ] [
9400 \begin_inset Flex Code
9401 status collapsed
9402
9403 \begin_layout Plain Layout
9404
9405 \emph on
9406 0
9407 \end_layout
9408
9409 \end_inset
9410
9411
9412 \begin_inset Flex Code
9413 status collapsed
9414
9415 \begin_layout Plain Layout
9416 1
9417 \end_layout
9418
9419 \end_inset
9420
9421 ] Whether the class already provides the feature 
9422 \begin_inset Flex Code
9423 status collapsed
9424
9425 \begin_layout Plain Layout
9426 string
9427 \end_layout
9428
9429 \end_inset
9430
9431 .
9432  A feature is in general the name of a package (
9433 \begin_inset Flex Code
9434 status collapsed
9435
9436 \begin_layout Plain Layout
9437 amsmath
9438 \end_layout
9439
9440 \end_inset
9441
9442
9443 \begin_inset Flex Code
9444 status collapsed
9445
9446 \begin_layout Plain Layout
9447 makeidx
9448 \end_layout
9449
9450 \end_inset
9451
9452 , \SpecialChar \ldots{}
9453 ) or a macro (
9454 \begin_inset Flex Code
9455 status collapsed
9456
9457 \begin_layout Plain Layout
9458 url
9459 \end_layout
9460
9461 \end_inset
9462
9463
9464 \begin_inset Flex Code
9465 status collapsed
9466
9467 \begin_layout Plain Layout
9468 boldsymbol
9469 \end_layout
9470
9471 \end_inset
9472
9473 ,\SpecialChar \ldots{}
9474 ); the complete list of supported features is unfortunately not documented
9475  outside the LyX source code—but see 
9476 \begin_inset Flex Code
9477 status collapsed
9478
9479 \begin_layout Plain Layout
9480 LaTeXFeatures.cpp
9481 \end_layout
9482
9483 \end_inset
9484
9485  if you're interested.
9486  
9487 \begin_inset Flex MenuItem
9488 status collapsed
9489
9490 \begin_layout Plain Layout
9491 Help\SpecialChar \menuseparator
9492 LaTeX Configuration
9493 \end_layout
9494
9495 \end_inset
9496
9497  also gives an overview of the supported packages.
9498 \end_layout
9499
9500 \begin_layout Description
9501 \begin_inset Flex Code
9502 status collapsed
9503
9504 \begin_layout Plain Layout
9505 ProvidesModule
9506 \end_layout
9507
9508 \end_inset
9509
9510  [
9511 \begin_inset Flex Code
9512 status collapsed
9513
9514 \begin_layout Plain Layout
9515 string
9516 \end_layout
9517
9518 \end_inset
9519
9520 ] Indicates that this layout provides the functionality of the module mentioned,
9521  which should be specified by the filename without the 
9522 \begin_inset Flex Code
9523 status collapsed
9524
9525 \begin_layout Plain Layout
9526 .module
9527 \end_layout
9528
9529 \end_inset
9530
9531  extension.
9532  This will typically be used if the layout includes the module directly,
9533  rather than using the 
9534 \begin_inset Flex Code
9535 status collapsed
9536
9537 \begin_layout Plain Layout
9538 DefaultModule
9539 \end_layout
9540
9541 \end_inset
9542
9543  tag to indicate that it ought to be used.
9544  It could also be used in a module that provided an alternate implementation
9545  of the same functionality.
9546 \end_layout
9547
9548 \begin_layout Description
9549 \begin_inset Flex Code
9550 status collapsed
9551
9552 \begin_layout Plain Layout
9553 Requires
9554 \end_layout
9555
9556 \end_inset
9557
9558  [
9559 \begin_inset Flex Code
9560 status collapsed
9561
9562 \begin_layout Plain Layout
9563 string
9564 \end_layout
9565
9566 \end_inset
9567
9568 ] Whether the class requires the feature 
9569 \begin_inset Flex Code
9570 status collapsed
9571
9572 \begin_layout Plain Layout
9573 string
9574 \end_layout
9575
9576 \end_inset
9577
9578 .
9579  Multiple features must be separated by commas.
9580  Note that you can only request supported features.
9581  (Again, see 
9582 \begin_inset Flex Code
9583 status collapsed
9584
9585 \begin_layout Plain Layout
9586 LaTeXFeatures.cpp
9587 \end_layout
9588
9589 \end_inset
9590
9591  for a list of these.)
9592 \end_layout
9593
9594 \begin_layout Description
9595 \begin_inset Flex Code
9596 status collapsed
9597
9598 \begin_layout Plain Layout
9599 RightMargin
9600 \end_layout
9601
9602 \end_inset
9603
9604  A string that indicates the width of the right margin on the screen, for
9605  example, 
9606 \begin_inset Quotes eld
9607 \end_inset
9608
9609 MMMMM
9610 \begin_inset Quotes erd
9611 \end_inset
9612
9613 .
9614 \end_layout
9615
9616 \begin_layout Description
9617 \begin_inset Flex Code
9618 status collapsed
9619
9620 \begin_layout Plain Layout
9621 SecNumDepth
9622 \end_layout
9623
9624 \end_inset
9625
9626  Sets which divisions get numbered.
9627  Corresponds to the 
9628 \begin_inset Flex Code
9629 status collapsed
9630
9631 \begin_layout Plain Layout
9632 secnumdepth
9633 \end_layout
9634
9635 \end_inset
9636
9637  counter in LaTeX.
9638 \end_layout
9639
9640 \begin_layout Description
9641 \begin_inset Flex Code
9642 status collapsed
9643
9644 \begin_layout Plain Layout
9645 Sides
9646 \end_layout
9647
9648 \end_inset
9649
9650  [
9651 \begin_inset Flex Code
9652 status collapsed
9653
9654 \begin_layout Plain Layout
9655
9656 \emph on
9657 1
9658 \end_layout
9659
9660 \end_inset
9661
9662
9663 \begin_inset Flex Code
9664 status collapsed
9665
9666 \begin_layout Plain Layout
9667 2
9668 \end_layout
9669
9670 \end_inset
9671
9672 ] Whether the class-default should be printing on one or both sides of the
9673  paper.
9674  Can be changed in the 
9675 \begin_inset Flex MenuItem
9676 status collapsed
9677
9678 \begin_layout Plain Layout
9679 Document\SpecialChar \menuseparator
9680 Settings
9681 \end_layout
9682
9683 \end_inset
9684
9685  dialog.
9686 \end_layout
9687
9688 \begin_layout Description
9689 \begin_inset Flex Code
9690 status collapsed
9691
9692 \begin_layout Plain Layout
9693 Style
9694 \end_layout
9695
9696 \end_inset
9697
9698  This sequence defines a paragraph style.
9699  If the style does not yet exist, it is created; if it does exist, its parameter
9700 s are modified.
9701  Must end with 
9702 \begin_inset Quotes eld
9703 \end_inset
9704
9705
9706 \begin_inset Flex Code
9707 status collapsed
9708
9709 \begin_layout Plain Layout
9710 End
9711 \end_layout
9712
9713 \end_inset
9714
9715
9716 \begin_inset Quotes erd
9717 \end_inset
9718
9719 .
9720 \begin_inset Newline newline
9721 \end_inset
9722
9723 See Section
9724 \begin_inset space ~
9725 \end_inset
9726
9727
9728 \begin_inset CommandInset ref
9729 LatexCommand ref
9730 reference "sub:Paragraph-Styles"
9731
9732 \end_inset
9733
9734  for details on paragraph styles.
9735 \end_layout
9736
9737 \begin_layout Description
9738 \begin_inset Flex Code
9739 status collapsed
9740
9741 \begin_layout Plain Layout
9742 TitleLatexName
9743 \end_layout
9744
9745 \end_inset
9746
9747  [
9748 \begin_inset Flex Code
9749 status collapsed
9750
9751 \begin_layout Plain Layout
9752 string="maketitle"
9753 \end_layout
9754
9755 \end_inset
9756
9757 ] The name of the command or environment to be used with 
9758 \begin_inset Flex Code
9759 status collapsed
9760
9761 \begin_layout Plain Layout
9762 TitleLatexType
9763 \end_layout
9764
9765 \end_inset
9766
9767 .
9768 \end_layout
9769
9770 \begin_layout Description
9771 \begin_inset Flex Code
9772 status collapsed
9773
9774 \begin_layout Plain Layout
9775 TitleLatexType
9776 \end_layout
9777
9778 \end_inset
9779
9780  [
9781 \begin_inset Flex Code
9782 status collapsed
9783
9784 \begin_layout Plain Layout
9785
9786 \emph on
9787 CommandAfter
9788 \end_layout
9789
9790 \end_inset
9791
9792
9793 \begin_inset Flex Code
9794 status collapsed
9795
9796 \begin_layout Plain Layout
9797 Environment
9798 \end_layout
9799
9800 \end_inset
9801
9802 ] Indicates what kind of markup is used to define the title of a document.
9803  
9804 \begin_inset Flex Code
9805 status collapsed
9806
9807 \begin_layout Plain Layout
9808 CommandAfter
9809 \end_layout
9810
9811 \end_inset
9812
9813  means that the macro with name 
9814 \begin_inset Flex Code
9815 status collapsed
9816
9817 \begin_layout Plain Layout
9818 TitleLatexName
9819 \end_layout
9820
9821 \end_inset
9822
9823  will be inserted after the last layout which has 
9824 \begin_inset Quotes eld
9825 \end_inset
9826
9827
9828 \begin_inset Flex Code
9829 status collapsed
9830
9831 \begin_layout Plain Layout
9832 InTitle 1
9833 \end_layout
9834
9835 \end_inset
9836
9837
9838 \begin_inset Quotes erd
9839 \end_inset
9840
9841 .
9842  
9843 \begin_inset Flex Code
9844 status collapsed
9845
9846 \begin_layout Plain Layout
9847 Environment
9848 \end_layout
9849
9850 \end_inset
9851
9852  corresponds to the case where the block of paragraphs which have 
9853 \begin_inset Quotes eld
9854 \end_inset
9855
9856
9857 \begin_inset Flex Code
9858 status collapsed
9859
9860 \begin_layout Plain Layout
9861 InTitle 1
9862 \end_layout
9863
9864 \end_inset
9865
9866
9867 \begin_inset Quotes erd
9868 \end_inset
9869
9870  should be enclosed into the 
9871 \begin_inset Flex Code
9872 status collapsed
9873
9874 \begin_layout Plain Layout
9875 TitleLatexName
9876 \end_layout
9877
9878 \end_inset
9879
9880  environment.
9881 \end_layout
9882
9883 \begin_layout Description
9884 \begin_inset Flex Code
9885 status collapsed
9886
9887 \begin_layout Plain Layout
9888 TocDepth
9889 \end_layout
9890
9891 \end_inset
9892
9893  Sets which divisions are included in the table of contents.
9894  Corresponds to the 
9895 \begin_inset Flex Code
9896 status collapsed
9897
9898 \begin_layout Plain Layout
9899 tocdepth
9900 \end_layout
9901
9902 \end_inset
9903
9904  counter in LaTeX.
9905 \end_layout
9906
9907 \begin_layout Subsection
9908 \begin_inset Flex Code
9909 status collapsed
9910
9911 \begin_layout Plain Layout
9912 ClassOptions
9913 \end_layout
9914
9915 \end_inset
9916
9917  section
9918 \begin_inset CommandInset label
9919 LatexCommand label
9920 name "sub:ClassOptions"
9921
9922 \end_inset
9923
9924
9925 \end_layout
9926
9927 \begin_layout Standard
9928 The 
9929 \begin_inset Flex Code
9930 status collapsed
9931
9932 \begin_layout Plain Layout
9933 ClassOptions
9934 \end_layout
9935
9936 \end_inset
9937
9938  section can contain the following entries:
9939 \end_layout
9940
9941 \begin_layout Description
9942 \begin_inset Flex Code
9943 status collapsed
9944
9945 \begin_layout Plain Layout
9946 FontSize
9947 \end_layout
9948
9949 \end_inset
9950
9951  [
9952 \begin_inset Flex Code
9953 status collapsed
9954
9955 \begin_layout Plain Layout
9956 string="10|11|12"
9957 \end_layout
9958
9959 \end_inset
9960
9961 ] The list of available font sizes for the document's main font, separated
9962  by 
9963 \begin_inset Quotes eld
9964 \end_inset
9965
9966
9967 \begin_inset Flex Code
9968 status collapsed
9969
9970 \begin_layout Plain Layout
9971 |
9972 \end_layout
9973
9974 \end_inset
9975
9976
9977 \begin_inset Quotes erd
9978 \end_inset
9979
9980 .
9981 \end_layout
9982
9983 \begin_layout Description
9984 \begin_inset Flex Code
9985 status collapsed
9986
9987 \begin_layout Plain Layout
9988 Header
9989 \end_layout
9990
9991 \end_inset
9992
9993  Used to set the DTD line with XML-based output classes.
9994  E.
9995 \begin_inset space \thinspace{}
9996 \end_inset
9997
9998 g.: PUBLIC 
9999 \begin_inset Quotes eld
10000 \end_inset
10001
10002 -//OASIS//DTD DocBook V4.2//EN
10003 \begin_inset Quotes erd
10004 \end_inset
10005
10006 .
10007 \end_layout
10008
10009 \begin_layout Description
10010 \begin_inset Flex Code
10011 status collapsed
10012
10013 \begin_layout Plain Layout
10014 PageStyle
10015 \end_layout
10016
10017 \end_inset
10018
10019  [
10020 \begin_inset Flex Code
10021 status collapsed
10022
10023 \begin_layout Plain Layout
10024 string="empty|plain|headings|fancy"
10025 \end_layout
10026
10027 \end_inset
10028
10029 ] The list of available page styles, separated by 
10030 \begin_inset Quotes eld
10031 \end_inset
10032
10033
10034 \begin_inset Flex Code
10035 status collapsed
10036
10037 \begin_layout Plain Layout
10038 |
10039 \end_layout
10040
10041 \end_inset
10042
10043
10044 \begin_inset Quotes erd
10045 \end_inset
10046
10047 .
10048 \end_layout
10049
10050 \begin_layout Description
10051 \begin_inset Flex Code
10052 status collapsed
10053
10054 \begin_layout Plain Layout
10055 Other
10056 \end_layout
10057
10058 \end_inset
10059
10060  [
10061 \begin_inset Flex Code
10062 status collapsed
10063
10064 \begin_layout Plain Layout
10065 string=""
10066 \end_layout
10067
10068 \end_inset
10069
10070 ] Some document class options, separated by a comma, that will be added
10071  to the optional part of the 
10072 \begin_inset Flex Code
10073 status collapsed
10074
10075 \begin_layout Plain Layout
10076
10077 \backslash
10078 documentclass
10079 \end_layout
10080
10081 \end_inset
10082
10083  command.
10084 \end_layout
10085
10086 \begin_layout Standard
10087 The 
10088 \begin_inset Flex Code
10089 status collapsed
10090
10091 \begin_layout Plain Layout
10092 ClassOptions
10093 \end_layout
10094
10095 \end_inset
10096
10097  section must end with 
10098 \begin_inset Quotes eld
10099 \end_inset
10100
10101
10102 \begin_inset Flex Code
10103 status collapsed
10104
10105 \begin_layout Plain Layout
10106 End
10107 \end_layout
10108
10109 \end_inset
10110
10111
10112 \begin_inset Quotes erd
10113 \end_inset
10114
10115 .
10116 \end_layout
10117
10118 \begin_layout Subsection
10119 Paragraph styles
10120 \begin_inset CommandInset label
10121 LatexCommand label
10122 name "sub:Paragraph-Styles"
10123
10124 \end_inset
10125
10126
10127 \end_layout
10128
10129 \begin_layout Standard
10130 A paragraph style description looks like this:
10131 \begin_inset Foot
10132 status collapsed
10133
10134 \begin_layout Plain Layout
10135 Note that this will either define a new style or modify an existing one.
10136 \end_layout
10137
10138 \end_inset
10139
10140
10141 \end_layout
10142
10143 \begin_layout LyX-Code
10144 Style 
10145 \family roman
10146 \emph on
10147 name
10148 \end_layout
10149
10150 \begin_layout LyX-Code
10151  ...
10152 \end_layout
10153
10154 \begin_layout LyX-Code
10155 End
10156 \end_layout
10157
10158 \begin_layout Standard
10159 where the following commands are allowed:
10160 \end_layout
10161
10162 \begin_layout Description
10163 \begin_inset Flex Code
10164 status collapsed
10165
10166 \begin_layout Plain Layout
10167 Align
10168 \end_layout
10169
10170 \end_inset
10171
10172  [
10173 \begin_inset Flex Code
10174 status collapsed
10175
10176 \begin_layout Plain Layout
10177
10178 \emph on
10179 block
10180 \emph default
10181 , left, right, center
10182 \end_layout
10183
10184 \end_inset
10185
10186 ] Paragraph alignment.
10187 \end_layout
10188
10189 \begin_layout Description
10190 \begin_inset Flex Code
10191 status collapsed
10192
10193 \begin_layout Plain Layout
10194 AlignPossible
10195 \end_layout
10196
10197 \end_inset
10198
10199  [
10200 \begin_inset Flex Code
10201 status collapsed
10202
10203 \begin_layout Plain Layout
10204
10205 \emph on
10206 block
10207 \emph default
10208 , left, right, center
10209 \end_layout
10210
10211 \end_inset
10212
10213 ] A comma separated list of permitted alignments.
10214  (Some LaTeX styles prohibit certain alignments, since those wouldn't make
10215  sense.
10216  For example a right-aligned or centered enumeration isn't possible.)
10217 \change_inserted -712698321 1353679769
10218
10219 \end_layout
10220
10221 \begin_layout Description
10222
10223 \change_inserted -712698321 1353680268
10224 \begin_inset Flex Code
10225 status collapsed
10226
10227 \begin_layout Plain Layout
10228
10229 \change_inserted -712698321 1353679781
10230 Argument
10231 \end_layout
10232
10233 \end_inset
10234
10235  [
10236 \begin_inset Flex Code
10237 status collapsed
10238
10239 \begin_layout Plain Layout
10240
10241 \change_inserted -712698321 1353679772
10242 int
10243 \end_layout
10244
10245 \end_inset
10246
10247 ] Defines argument number <int> of a command\SpecialChar \slash{}
10248 environment associated with
10249  the current style.
10250  This is useful for things like section headings, and only makes sense with
10251  LaTeX.
10252  Every (optional or required) argument of a command or environment -- except
10253  for the required argument that is associated with the content of the paragraph
10254  itself -- has a separate definition, where the number specifies the order
10255  of the arguments.
10256  The definition must end with 
10257 \begin_inset Flex Code
10258 status collapsed
10259
10260 \begin_layout Plain Layout
10261
10262 \change_inserted -712698321 1353680069
10263 EndArgument
10264 \end_layout
10265
10266 \end_inset
10267
10268 .
10269  So a command with two optional arguments has:
10270 \end_layout
10271
10272 \begin_deeper
10273 \begin_layout Quote
10274
10275 \change_inserted -712698321 1353680127
10276
10277 \family typewriter
10278 Argument 1
10279 \end_layout
10280
10281 \begin_layout Quote
10282
10283 \change_inserted -712698321 1353680195
10284
10285 \family typewriter
10286 ...
10287 \end_layout
10288
10289 \begin_layout Quote
10290
10291 \change_inserted -712698321 1353680135
10292
10293 \family typewriter
10294 EndArgument
10295 \end_layout
10296
10297 \begin_layout Quote
10298
10299 \change_inserted -712698321 1353680140
10300
10301 \family typewriter
10302 Argument 2
10303 \end_layout
10304
10305 \begin_layout Quote
10306
10307 \change_inserted -712698321 1353680197
10308
10309 \family typewriter
10310 ...
10311 \end_layout
10312
10313 \begin_layout Quote
10314
10315 \change_inserted -712698321 1353680147
10316
10317 \family typewriter
10318 EndArgument
10319 \end_layout
10320
10321 \begin_layout Standard
10322
10323 \change_inserted -712698321 1353680528
10324 Inside the 
10325 \begin_inset Flex Code
10326 status collapsed
10327
10328 \begin_layout Plain Layout
10329
10330 \change_inserted -712698321 1353680412
10331 Argument
10332 \end_layout
10333
10334 \end_inset
10335
10336  definition, the following specifications are possible:
10337 \end_layout
10338
10339 \begin_layout Itemize
10340
10341 \change_inserted -712698321 1353691469
10342 \begin_inset Flex Code
10343 status collapsed
10344
10345 \begin_layout Plain Layout
10346
10347 \change_inserted -712698321 1353680543
10348 LabelString
10349 \change_unchanged
10350
10351 \end_layout
10352
10353 \end_inset
10354
10355  
10356 \begin_inset Flex Code
10357 status collapsed
10358
10359 \begin_layout Plain Layout
10360
10361 \change_inserted -712698321 1353680567
10362 [string]
10363 \end_layout
10364
10365 \end_inset
10366
10367  The string that will appear both in the menu (to insert this argument)
10368  and on the argument inset button.
10369  For the menu, you can define an accelerator by appending the respective
10370  character to the string, divided by 
10371 \begin_inset Quotes eld
10372 \end_inset
10373
10374 |
10375 \begin_inset Quotes erd
10376 \end_inset
10377
10378  (e.
10379 \begin_inset space \thinspace{}
10380 \end_inset
10381
10382 g.
10383  
10384 \begin_inset Flex Code
10385 status collapsed
10386
10387 \begin_layout Plain Layout
10388
10389 \change_inserted -712698321 1353691482
10390 \begin_inset Quotes eld
10391 \end_inset
10392
10393 Short Title|S
10394 \begin_inset Quotes erd
10395 \end_inset
10396
10397
10398 \change_unchanged
10399
10400 \end_layout
10401
10402 \end_inset
10403
10404 ).
10405 \end_layout
10406
10407 \begin_layout Itemize
10408
10409 \change_inserted -712698321 1353680665
10410 \begin_inset Flex Code
10411 status collapsed
10412
10413 \begin_layout Plain Layout
10414
10415 \change_inserted -712698321 1353680616
10416 Tooltip
10417 \end_layout
10418
10419 \end_inset
10420
10421  
10422 \begin_inset Flex Code
10423 status collapsed
10424
10425 \begin_layout Plain Layout
10426
10427 \change_inserted -712698321 1353680623
10428 [string]
10429 \end_layout
10430
10431 \end_inset
10432
10433  A longer explanatory text that appears in the tooltip when hovering over
10434  the argument inset.
10435 \end_layout
10436
10437 \begin_layout Itemize
10438
10439 \change_inserted -712698321 1353680874
10440 \begin_inset Flex Code
10441 status collapsed
10442
10443 \begin_layout Plain Layout
10444
10445 \change_inserted -712698321 1353680732
10446 Mandatory
10447 \end_layout
10448
10449 \end_inset
10450
10451  
10452 \begin_inset Flex Code
10453 status collapsed
10454
10455 \begin_layout Plain Layout
10456
10457 \change_inserted -712698321 1353680738
10458 [int=0]
10459 \end_layout
10460
10461 \end_inset
10462
10463  Declare if this is a mandatory 
10464 \change_inserted 2090807402 1353765594
10465 (1) 
10466 \change_inserted -712698321 1353680874
10467 or an optional 
10468 \change_inserted 2090807402 1353765599
10469 (0) 
10470 \change_inserted -712698321 1353680874
10471 argument.
10472  Mandatory arguments will be output empty if not given, while optional arguments
10473  will not be output at all.
10474  By default, mandatory arguments are delimited by 
10475 \begin_inset Flex Code
10476 status collapsed
10477
10478 \begin_layout Plain Layout
10479
10480 \change_inserted -712698321 1353680808
10481 {...}
10482 \change_unchanged
10483
10484 \end_layout
10485
10486 \end_inset
10487
10488 , while optional arguments are delimited by 
10489 \begin_inset Flex Code
10490 status collapsed
10491
10492 \begin_layout Plain Layout
10493
10494 \change_inserted -712698321 1353680833
10495 [...]
10496 \end_layout
10497
10498 \end_inset
10499
10500
10501 \end_layout
10502
10503 \begin_layout Itemize
10504
10505 \change_inserted -712698321 1353917199
10506 \begin_inset Flex Code
10507 status collapsed
10508
10509 \begin_layout Plain Layout
10510
10511 \change_inserted -712698321 1353680879
10512 Requires
10513 \end_layout
10514
10515 \end_inset
10516
10517  
10518 \begin_inset Flex Code
10519 status collapsed
10520
10521 \begin_layout Plain Layout
10522
10523 \change_inserted -712698321 1353680874
10524 [int=0]
10525 \end_layout
10526
10527 \end_inset
10528
10529  defines another argument (by its number) which this argument requires to
10530  be output if it is itself output.
10531  E.
10532 \begin_inset space \thinspace{}
10533 \end_inset
10534
10535 g., in LaTeX commands, optional arguments often require previous optional
10536  arguments to be output (at least empty), as in 
10537 \begin_inset Flex Code
10538 status collapsed
10539
10540 \begin_layout Plain Layout
10541
10542 \change_inserted -712698321 1353688183
10543
10544 \backslash
10545 command[][arg]{text}
10546 \change_unchanged
10547
10548 \end_layout
10549
10550 \end_inset
10551
10552 .
10553  This can be achieved by the statement 
10554 \begin_inset Flex Code
10555 status collapsed
10556
10557 \begin_layout Plain Layout
10558
10559 \change_inserted -712698321 1353681031
10560 Requires 1
10561 \change_unchanged
10562
10563 \end_layout
10564
10565 \end_inset
10566
10567  within 
10568 \begin_inset Flex Code
10569 status collapsed
10570
10571 \begin_layout Plain Layout
10572
10573 \change_inserted -712698321 1353681045
10574 Argument 2
10575 \change_unchanged
10576
10577 \end_layout
10578
10579 \end_inset
10580
10581 .
10582 \end_layout
10583
10584 \begin_layout Itemize
10585
10586 \change_inserted -712698321 1354263104
10587 \begin_inset Flex Code
10588 status collapsed
10589
10590 \begin_layout Plain Layout
10591
10592 \change_inserted -712698321 1353681072
10593 LeftDelim
10594 \change_unchanged
10595
10596 \end_layout
10597
10598 \end_inset
10599
10600  
10601 \begin_inset Flex Code
10602 status collapsed
10603
10604 \begin_layout Plain Layout
10605
10606 \change_inserted -712698321 1353681067
10607 [string]
10608 \end_layout
10609
10610 \end_inset
10611
10612  defines a custom left delimiter (instead of 
10613 \begin_inset Flex Code
10614 status collapsed
10615
10616 \begin_layout Plain Layout
10617
10618 \change_inserted -712698321 1353681127
10619 {
10620 \change_unchanged
10621
10622 \end_layout
10623
10624 \end_inset
10625
10626  or 
10627 \begin_inset Flex Code
10628 status collapsed
10629
10630 \begin_layout Plain Layout
10631
10632 \change_inserted -712698321 1353681133
10633 [
10634 \change_unchanged
10635
10636 \end_layout
10637
10638 \end_inset
10639
10640 ).
10641  A line break in the output can be indicated by 
10642 \begin_inset Flex Code
10643 status collapsed
10644
10645 \begin_layout Plain Layout
10646
10647 \change_inserted -712698321 1354263104
10648 <br/>
10649 \end_layout
10650
10651 \end_inset
10652
10653 .
10654 \change_unchanged
10655
10656 \end_layout
10657
10658 \begin_layout Itemize
10659
10660 \change_inserted -712698321 1354263106
10661 \begin_inset Flex Code
10662 status collapsed
10663
10664 \begin_layout Plain Layout
10665
10666 \change_inserted -712698321 1353681149
10667 RightDelim
10668 \end_layout
10669
10670 \end_inset
10671
10672  
10673 \begin_inset Flex Code
10674 status collapsed
10675
10676 \begin_layout Plain Layout
10677
10678 \change_inserted -712698321 1353681146
10679 [string]
10680 \end_layout
10681
10682 \end_inset
10683
10684  defines a custom right delimiter (instead of 
10685 \begin_inset Flex Code
10686 status collapsed
10687
10688 \begin_layout Plain Layout
10689
10690 \change_inserted -712698321 1353681158
10691 }
10692 \end_layout
10693
10694 \end_inset
10695
10696  or 
10697 \begin_inset Flex Code
10698 status collapsed
10699
10700 \begin_layout Plain Layout
10701
10702 \change_inserted -712698321 1353681161
10703 ]
10704 \end_layout
10705
10706 \end_inset
10707
10708 ).
10709  A line break in the output can be indicated by 
10710 \begin_inset Flex Code
10711 status collapsed
10712
10713 \begin_layout Plain Layout
10714
10715 \change_inserted -712698321 1354263106
10716 <br/>
10717 \end_layout
10718
10719 \end_inset
10720
10721 .
10722 \change_unchanged
10723
10724 \end_layout
10725
10726 \begin_layout Itemize
10727
10728 \change_inserted -712698321 1353917320
10729 \begin_inset Flex Code
10730 status collapsed
10731
10732 \begin_layout Plain Layout
10733
10734 \change_inserted -712698321 1353917320
10735 Font
10736 \end_layout
10737
10738 \end_inset
10739
10740  The font used for the argument content.
10741  See section
10742 \begin_inset space ~
10743 \end_inset
10744
10745
10746 \begin_inset CommandInset ref
10747 LatexCommand ref
10748 reference "sub:Font-description"
10749
10750 \end_inset
10751
10752 .
10753 \end_layout
10754
10755 \begin_layout Itemize
10756
10757 \change_inserted -712698321 1353917320
10758 \begin_inset Flex Code
10759 status collapsed
10760
10761 \begin_layout Plain Layout
10762
10763 \change_inserted -712698321 1353917320
10764 LabelFont
10765 \end_layout
10766
10767 \end_inset
10768
10769  The font used for the label.
10770  See section
10771 \begin_inset space ~
10772 \end_inset
10773
10774
10775 \begin_inset CommandInset ref
10776 LatexCommand ref
10777 reference "sub:Font-description"
10778
10779 \end_inset
10780
10781 .
10782 \end_layout
10783
10784 \begin_layout Itemize
10785
10786 \change_inserted -712698321 1353917320
10787 \begin_inset Flex Code
10788 status collapsed
10789
10790 \begin_layout Plain Layout
10791
10792 \change_inserted -712698321 1353917320
10793 Decoration
10794 \end_layout
10795
10796 \end_inset
10797
10798  can be 
10799 \begin_inset Flex Code
10800 status collapsed
10801
10802 \begin_layout Plain Layout
10803
10804 \change_inserted -712698321 1353917320
10805 Classic
10806 \end_layout
10807
10808 \end_inset
10809
10810
10811 \begin_inset Flex Code
10812 status collapsed
10813
10814 \begin_layout Plain Layout
10815
10816 \change_inserted -712698321 1353917320
10817 Minimalistic
10818 \end_layout
10819
10820 \end_inset
10821
10822 , or 
10823 \begin_inset Flex Code
10824 status collapsed
10825
10826 \begin_layout Plain Layout
10827
10828 \change_inserted -712698321 1353917320
10829 Conglomerate
10830 \end_layout
10831
10832 \end_inset
10833
10834 , describing the rendering style used for the inset's frame and buttons.
10835  Default is 
10836 \begin_inset Flex Code
10837 status collapsed
10838
10839 \begin_layout Plain Layout
10840
10841 \change_inserted -712698321 1353917320
10842 Classic
10843 \end_layout
10844
10845 \end_inset
10846
10847 .
10848 \change_inserted 155139281 1354198988
10849
10850 \end_layout
10851
10852 \begin_layout Standard
10853
10854 \change_inserted 155139281 1354199102
10855 Arguments for list 
10856 \begin_inset Flex Code
10857 status collapsed
10858
10859 \begin_layout Plain Layout
10860
10861 \change_inserted 155139281 1354199013
10862
10863 \backslash
10864 item
10865 \change_unchanged
10866
10867 \end_layout
10868
10869 \end_inset
10870
10871 s (as in 
10872 \begin_inset Flex Code
10873 status collapsed
10874
10875 \begin_layout Plain Layout
10876
10877 \change_inserted 155139281 1354199102
10878
10879 \backslash
10880 item[foo]
10881 \change_unchanged
10882
10883 \end_layout
10884
10885 \end_inset
10886
10887 ) have the prefix 
10888 \begin_inset Flex Code
10889 status collapsed
10890
10891 \begin_layout Plain Layout
10892
10893 \change_inserted 155139281 1354199044
10894 item:
10895 \change_unchanged
10896
10897 \end_layout
10898
10899 \end_inset
10900
10901  followed by the number (e.
10902 \begin_inset space \thinspace{}
10903 \end_inset
10904
10905 g.
10906  
10907 \begin_inset Flex Code
10908 status collapsed
10909
10910 \begin_layout Plain Layout
10911
10912 \change_inserted 155139281 1354199064
10913 Argument item:1
10914 \change_unchanged
10915
10916 \end_layout
10917
10918 \end_inset
10919
10920 )
10921 \change_unchanged
10922
10923 \end_layout
10924
10925 \end_deeper
10926 \begin_layout Description
10927 \begin_inset Flex Code
10928 status collapsed
10929
10930 \begin_layout Plain Layout
10931 BabelPreamble
10932 \end_layout
10933
10934 \end_inset
10935
10936  Note that this will completely override any prior 
10937 \begin_inset Flex Code
10938 status collapsed
10939
10940 \begin_layout Plain Layout
10941 BabelPreamble
10942 \end_layout
10943
10944 \end_inset
10945
10946  declaration for this style.
10947  Must end with 
10948 \begin_inset Quotes eld
10949 \end_inset
10950
10951
10952 \begin_inset Flex Code
10953 status collapsed
10954
10955 \begin_layout Plain Layout
10956 EndBabelPreamble
10957 \end_layout
10958
10959 \end_inset
10960
10961
10962 \begin_inset Quotes erd
10963 \end_inset
10964
10965 .
10966  See section 
10967 \begin_inset CommandInset ref
10968 LatexCommand ref
10969 reference "sub:I18n"
10970
10971 \end_inset
10972
10973  for details on its use.
10974 \end_layout
10975
10976 \begin_layout Description
10977 \begin_inset Flex Code
10978 status collapsed
10979
10980 \begin_layout Plain Layout
10981 BottomSep
10982 \end_layout
10983
10984 \end_inset
10985
10986  [
10987 \begin_inset Flex Code
10988 status collapsed
10989
10990 \begin_layout Plain Layout
10991 float=0
10992 \end_layout
10993
10994 \end_inset
10995
10996 ]
10997 \begin_inset Foot
10998 status collapsed
10999
11000 \begin_layout Plain Layout
11001 Note that a `float' here is a real number, such as: 1.5.
11002 \end_layout
11003
11004 \end_inset
11005
11006  The vertical space with which the last of a chain of paragraphs with this
11007  style is separated from the following paragraph.
11008  If the next paragraph has another style, the separations are not simply
11009  added, but the maximum is taken.
11010 \end_layout
11011
11012 \begin_layout Description
11013 \begin_inset Flex Code
11014 status collapsed
11015
11016 \begin_layout Plain Layout
11017 Category
11018 \end_layout
11019
11020 \end_inset
11021
11022  
11023 \begin_inset Flex Code
11024 status collapsed
11025
11026 \begin_layout Plain Layout
11027 [string]
11028 \end_layout
11029
11030 \end_inset
11031
11032  The category for this style.
11033  This is used to group related styles in the style combobox on the toolbar.
11034  Any string can be used, but you may want to use existing categories with
11035  your own styles.
11036  
11037 \end_layout
11038
11039 \begin_layout Description
11040 \begin_inset Flex Code
11041 status collapsed
11042
11043 \begin_layout Plain Layout
11044 CommandDepth
11045 \end_layout
11046
11047 \end_inset
11048
11049  Depth of XML command.
11050  Used only with XML-type formats.
11051 \end_layout
11052
11053 \begin_layout Description
11054 \begin_inset Flex Code
11055 status collapsed
11056
11057 \begin_layout Plain Layout
11058 CopyStyle
11059 \end_layout
11060
11061 \end_inset
11062
11063  
11064 \begin_inset Flex Code
11065 status collapsed
11066
11067 \begin_layout Plain Layout
11068 [string]
11069 \end_layout
11070
11071 \end_inset
11072
11073  Copies all the features of an existing style into the current one.
11074  
11075 \end_layout
11076
11077 \begin_layout Description
11078 \begin_inset Flex Code
11079 status collapsed
11080
11081 \begin_layout Plain Layout
11082 DependsOn
11083 \end_layout
11084
11085 \end_inset
11086
11087  The name of a style whose preamble should be output 
11088 \emph on
11089 before
11090 \emph default
11091  this one.
11092  This allows to ensure some ordering of the preamble snippets when macros
11093  definitions depend on one another.
11094 \begin_inset Foot
11095 status collapsed
11096
11097 \begin_layout Plain Layout
11098 Note that, besides that functionality, there is no way to ensure any ordering
11099  of preambles.
11100  The ordering that you see in a given version of LyX may change without
11101  warning in later versions.
11102 \end_layout
11103
11104 \end_inset
11105
11106
11107 \end_layout
11108
11109 \begin_layout Description
11110 \begin_inset Flex Code
11111 status collapsed
11112
11113 \begin_layout Plain Layout
11114 EndLabeltype
11115 \end_layout
11116
11117 \end_inset
11118
11119  [
11120 \begin_inset Flex Code
11121 status collapsed
11122
11123 \begin_layout Plain Layout
11124
11125 \emph on
11126 No_Label
11127 \emph default
11128 , Box, Filled_Box, Static
11129 \end_layout
11130
11131 \end_inset
11132
11133 ] The type of label that stands at the end of the paragraph (or sequence
11134  of paragraphs if 
11135 \begin_inset Flex Code
11136 status collapsed
11137
11138 \begin_layout Plain Layout
11139 LatexType
11140 \end_layout
11141
11142 \end_inset
11143
11144  is 
11145 \begin_inset Flex Code
11146 status collapsed
11147
11148 \begin_layout Plain Layout
11149 Environment
11150 \end_layout
11151
11152 \end_inset
11153
11154
11155 \begin_inset Flex Code
11156 status collapsed
11157
11158 \begin_layout Plain Layout
11159 Item_Environment
11160 \end_layout
11161
11162 \end_inset
11163
11164  or 
11165 \begin_inset Flex Code
11166 status collapsed
11167
11168 \begin_layout Plain Layout
11169 List_Environment
11170 \end_layout
11171
11172 \end_inset
11173
11174 ).
11175  
11176 \begin_inset Flex Code
11177 status collapsed
11178
11179 \begin_layout Plain Layout
11180 No_Label
11181 \end_layout
11182
11183 \end_inset
11184
11185  means 
11186 \begin_inset Quotes eld
11187 \end_inset
11188
11189 nothing
11190 \begin_inset Quotes erd
11191 \end_inset
11192
11193
11194 \begin_inset Flex Code
11195 status collapsed
11196
11197 \begin_layout Plain Layout
11198 Box
11199 \end_layout
11200
11201 \end_inset
11202
11203  (resp.
11204 \begin_inset Flex Code
11205 status collapsed
11206
11207 \begin_layout Plain Layout
11208 \begin_inset space ~
11209 \end_inset
11210
11211 Filled_Box
11212 \end_layout
11213
11214 \end_inset
11215
11216 ) is a white (resp.
11217 \begin_inset space ~
11218 \end_inset
11219
11220 black) square suitable for end of proof markers, 
11221 \begin_inset Flex Code
11222 status collapsed
11223
11224 \begin_layout Plain Layout
11225 Static
11226 \end_layout
11227
11228 \end_inset
11229
11230  is an explicit text string.
11231 \end_layout
11232
11233 \begin_layout Description
11234 \begin_inset Flex Code
11235 status collapsed
11236
11237 \begin_layout Plain Layout
11238 EndLabelString
11239 \end_layout
11240
11241 \end_inset
11242
11243  [
11244 \begin_inset Flex Code
11245 status collapsed
11246
11247 \begin_layout Plain Layout
11248 string=""
11249 \end_layout
11250
11251 \end_inset
11252
11253 ] The string used for a label with a 
11254 \begin_inset Flex Code
11255 status collapsed
11256
11257 \begin_layout Plain Layout
11258 Static
11259 \end_layout
11260
11261 \end_inset
11262
11263  
11264 \begin_inset Flex Code
11265 status collapsed
11266
11267 \begin_layout Plain Layout
11268 EndLabelType
11269 \end_layout
11270
11271 \end_inset
11272
11273 .
11274  
11275 \end_layout
11276
11277 \begin_layout Description
11278 \begin_inset Flex Code
11279 status collapsed
11280
11281 \begin_layout Plain Layout
11282 Font
11283 \end_layout
11284
11285 \end_inset
11286
11287  The font used for both the text body 
11288 \emph on
11289 and
11290 \emph default
11291  the label.
11292  See section
11293 \begin_inset space ~
11294 \end_inset
11295
11296
11297 \begin_inset CommandInset ref
11298 LatexCommand ref
11299 reference "sub:Font-description"
11300
11301 \end_inset
11302
11303 .
11304  Note that defining this font automatically defines the 
11305 \begin_inset Flex Code
11306 status collapsed
11307
11308 \begin_layout Plain Layout
11309 LabelFont
11310 \end_layout
11311
11312 \end_inset
11313
11314  to the same value.
11315  So you should define this one first if you also want to define 
11316 \begin_inset Flex Code
11317 status collapsed
11318
11319 \begin_layout Plain Layout
11320 LabelFont
11321 \end_layout
11322
11323 \end_inset
11324
11325 .
11326 \end_layout
11327
11328 \begin_layout Description
11329 \begin_inset Flex Code
11330 status collapsed
11331
11332 \begin_layout Plain Layout
11333 FreeSpacing
11334 \end_layout
11335
11336 \end_inset
11337
11338  
11339 \begin_inset CommandInset label
11340 LatexCommand label
11341 name "des:FreeSpacing"
11342
11343 \end_inset
11344
11345 [
11346 \begin_inset Flex Code
11347 status collapsed
11348
11349 \begin_layout Plain Layout
11350
11351 \emph on
11352 0
11353 \end_layout
11354
11355 \end_inset
11356
11357
11358 \begin_inset Flex Code
11359 status collapsed
11360
11361 \begin_layout Plain Layout
11362 1
11363 \end_layout
11364
11365 \end_inset
11366
11367 ] Usually LyX doesn't allow you to insert more than one space between words,
11368  since a space is considered as the separation between two words, not a
11369  character or symbol of its own.
11370  This is a very fine thing but sometimes annoying, for example, when typing
11371  program code or plain LaTeX code.
11372  For this reason, 
11373 \begin_inset Flex Code
11374 status collapsed
11375
11376 \begin_layout Plain Layout
11377 FreeSpacing
11378 \end_layout
11379
11380 \end_inset
11381
11382  can be enabled.
11383  Note that LyX will create protected blanks for the additional blanks when
11384  in another mode than LaTeX-mode.
11385 \end_layout
11386
11387 \begin_layout Description
11388 \begin_inset Flex Code
11389 status collapsed
11390
11391 \begin_layout Plain Layout
11392 HTML*
11393 \end_layout
11394
11395 \end_inset
11396
11397  These tags are used with XHTML output.
11398  See 
11399 \begin_inset CommandInset ref
11400 LatexCommand ref
11401 reference "sub:Paragraph-Style-XHTML"
11402
11403 \end_inset
11404
11405 .
11406 \end_layout
11407
11408 \begin_layout Description
11409 \begin_inset Flex Code
11410 status collapsed
11411
11412 \begin_layout Plain Layout
11413 InnerTag
11414 \end_layout
11415
11416 \end_inset
11417
11418  [[FIXME]] (Used only with XML-type formats.)
11419 \end_layout
11420
11421 \begin_layout Description
11422 \begin_inset Flex Code
11423 status collapsed
11424
11425 \begin_layout Plain Layout
11426 InPreamble
11427 \end_layout
11428
11429 \end_inset
11430
11431  
11432 \begin_inset Flex Code
11433 status collapsed
11434
11435 \begin_layout Plain Layout
11436 [1, 0]
11437 \end_layout
11438
11439 \end_inset
11440
11441  If 1, marks the style as to be included in the document preamble rather
11442  than in the document body.
11443  This is useful for document classes that want such information as the title
11444  and author to appear in the preamble.
11445  Note that this works only for styles for which the 
11446 \begin_inset Flex Code
11447 status collapsed
11448
11449 \begin_layout Plain Layout
11450 LatexType
11451 \end_layout
11452
11453 \end_inset
11454
11455  is 
11456 \begin_inset Flex Code
11457 status collapsed
11458
11459 \begin_layout Plain Layout
11460 Command
11461 \end_layout
11462
11463 \end_inset
11464
11465  or 
11466 \begin_inset Flex Code
11467 status collapsed
11468
11469 \begin_layout Plain Layout
11470 Paragraph
11471 \end_layout
11472
11473 \end_inset
11474
11475 .
11476 \end_layout
11477
11478 \begin_layout Description
11479 \begin_inset Flex Code
11480 status collapsed
11481
11482 \begin_layout Plain Layout
11483 InTitle
11484 \end_layout
11485
11486 \end_inset
11487
11488  
11489 \begin_inset Flex Code
11490 status collapsed
11491
11492 \begin_layout Plain Layout
11493 [1, 0]
11494 \end_layout
11495
11496 \end_inset
11497
11498  If 1, marks the style as being part of a title block (see also the 
11499 \begin_inset Flex Code
11500 status collapsed
11501
11502 \begin_layout Plain Layout
11503 TitleLatexType
11504 \end_layout
11505
11506 \end_inset
11507
11508  and 
11509 \begin_inset Flex Code
11510 status collapsed
11511
11512 \begin_layout Plain Layout
11513 TitleLatexName
11514 \end_layout
11515
11516 \end_inset
11517
11518  global entries).
11519 \end_layout
11520
11521 \begin_layout Description
11522 \begin_inset Flex Code
11523 status collapsed
11524
11525 \begin_layout Plain Layout
11526 ItemSep
11527 \end_layout
11528
11529 \end_inset
11530
11531  [
11532 \begin_inset Flex Code
11533 status collapsed
11534
11535 \begin_layout Plain Layout
11536 float=0
11537 \end_layout
11538
11539 \end_inset
11540
11541 ] This provides extra space between paragraphs that have the same style.
11542  If you put other styles into an environment, each is separated with the
11543  environment's 
11544 \begin_inset Flex Code
11545 status collapsed
11546
11547 \begin_layout Plain Layout
11548 Parsep
11549 \end_layout
11550
11551 \end_inset
11552
11553 .
11554  But the whole items of the environment are additionally separated with
11555  this 
11556 \begin_inset Flex Code
11557 status collapsed
11558
11559 \begin_layout Plain Layout
11560 Itemsep
11561 \end_layout
11562
11563 \end_inset
11564
11565 .
11566  Note that this is a
11567 \emph on
11568  multiplier.
11569 \end_layout
11570
11571 \begin_layout Description
11572 \begin_inset Flex Code
11573 status collapsed
11574
11575 \begin_layout Plain Layout
11576 ItemTag
11577 \end_layout
11578
11579 \end_inset
11580
11581  [[FIXME]] (Used only with XML-type formats.)
11582 \end_layout
11583
11584 \begin_layout Description
11585 \begin_inset Flex Code
11586 status collapsed
11587
11588 \begin_layout Plain Layout
11589 KeepEmpty
11590 \end_layout
11591
11592 \end_inset
11593
11594  [
11595 \begin_inset Flex Code
11596 status collapsed
11597
11598 \begin_layout Plain Layout
11599
11600 \emph on
11601 0
11602 \end_layout
11603
11604 \end_inset
11605
11606
11607 \begin_inset Flex Code
11608 status collapsed
11609
11610 \begin_layout Plain Layout
11611 1
11612 \end_layout
11613
11614 \end_inset
11615
11616 ] Usually LyX does not allow you to leave a paragraph empty, since it would
11617  lead to empty LaTeX output.
11618  There are some cases where this could be desirable however: in a letter
11619  template, the required fields can be provided as empty fields, so that
11620  people do not forget them; in some special classes, a style can be used
11621  as some kind of break, which does not contain actual text.
11622 \end_layout
11623
11624 \begin_layout Description
11625 \begin_inset Flex Code
11626 status collapsed
11627
11628 \begin_layout Plain Layout
11629 LabelBottomsep
11630 \end_layout
11631
11632 \end_inset
11633
11634  [float=0] The vertical space between the label and the text body.
11635  Only used for labels that are above the text body (
11636 \begin_inset Flex Code
11637 status collapsed
11638
11639 \begin_layout Plain Layout
11640 Top_Environment
11641 \end_layout
11642
11643 \end_inset
11644
11645
11646 \begin_inset Flex Code
11647 status collapsed
11648
11649 \begin_layout Plain Layout
11650 Centered_Top_Environment
11651 \end_layout
11652
11653 \end_inset
11654
11655 ).
11656 \end_layout
11657
11658 \begin_layout Description
11659 \begin_inset Flex Code
11660 status collapsed
11661
11662 \begin_layout Plain Layout
11663 LabelCounter
11664 \end_layout
11665
11666 \end_inset
11667
11668  [
11669 \begin_inset Flex Code
11670 status collapsed
11671
11672 \begin_layout Plain Layout
11673 string=""
11674 \end_layout
11675
11676 \end_inset
11677
11678 ]
11679 \begin_inset Newline newline
11680 \end_inset
11681
11682 The name of the counter for automatic numbering.
11683  
11684 \begin_inset Newline newline
11685 \end_inset
11686
11687 This 
11688 \emph on
11689 must
11690 \emph default
11691  be given if 
11692 \begin_inset Flex Code
11693 status collapsed
11694
11695 \begin_layout Plain Layout
11696 LabelType
11697 \end_layout
11698
11699 \end_inset
11700
11701  is 
11702 \begin_inset Flex Code
11703 status collapsed
11704
11705 \begin_layout Plain Layout
11706 Counter
11707 \end_layout
11708
11709 \end_inset
11710
11711 .
11712  In that case, the counter will be stepped each time the style appears.
11713  
11714 \begin_inset Newline newline
11715 \end_inset
11716
11717 This 
11718 \emph on
11719 may
11720 \emph default
11721  also be given if 
11722 \begin_inset Flex Code
11723 status collapsed
11724
11725 \begin_layout Plain Layout
11726 LabelType
11727 \end_layout
11728
11729 \end_inset
11730
11731  is 
11732 \begin_inset Flex Code
11733 status collapsed
11734
11735 \begin_layout Plain Layout
11736 Enumerate
11737 \end_layout
11738
11739 \end_inset
11740
11741 , though this case is a bit complicated.
11742  Suppose you declare 
11743 \begin_inset Quotes eld
11744 \end_inset
11745
11746
11747 \begin_inset Flex Code
11748 status collapsed
11749
11750 \begin_layout Plain Layout
11751 LabelCounter myenum
11752 \end_layout
11753
11754 \end_inset
11755
11756
11757 \begin_inset Quotes erd
11758 \end_inset
11759
11760 .
11761  Then the actual counters used are 
11762 \begin_inset Flex Code
11763 status collapsed
11764
11765 \begin_layout Plain Layout
11766 myenumi
11767 \end_layout
11768
11769 \end_inset
11770
11771
11772 \begin_inset Flex Code
11773 status collapsed
11774
11775 \begin_layout Plain Layout
11776 myenumii
11777 \end_layout
11778
11779 \end_inset
11780
11781
11782 \begin_inset Flex Code
11783 status collapsed
11784
11785 \begin_layout Plain Layout
11786 myenumiii
11787 \end_layout
11788
11789 \end_inset
11790
11791 , and 
11792 \begin_inset Flex Code
11793 status collapsed
11794
11795 \begin_layout Plain Layout
11796 myenumiv
11797 \end_layout
11798
11799 \end_inset
11800
11801 , much as in LaTeX.
11802  These counters must all be declared separately.
11803 \begin_inset Newline newline
11804 \end_inset
11805
11806 See Section 
11807 \begin_inset CommandInset ref
11808 LatexCommand ref
11809 reference "sub:Counters"
11810
11811 \end_inset
11812
11813  for details on counters.
11814 \end_layout
11815
11816 \begin_layout Description
11817 \begin_inset Flex Code
11818 status collapsed
11819
11820 \begin_layout Plain Layout
11821 LabelFont
11822 \end_layout
11823
11824 \end_inset
11825
11826  The font used for the label.
11827  See section
11828 \begin_inset space ~
11829 \end_inset
11830
11831
11832 \begin_inset CommandInset ref
11833 LatexCommand ref
11834 reference "sub:Font-description"
11835
11836 \end_inset
11837
11838 .
11839 \end_layout
11840
11841 \begin_layout Description
11842 \begin_inset Flex Code
11843 status collapsed
11844
11845 \begin_layout Plain Layout
11846 LabelIndent
11847 \end_layout
11848
11849 \end_inset
11850
11851  Text that indicates how far a label should be indented.
11852 \end_layout
11853
11854 \begin_layout Description
11855 \begin_inset Flex Code
11856 status collapsed
11857
11858 \begin_layout Plain Layout
11859 Labelsep
11860 \end_layout
11861
11862 \end_inset
11863
11864  [
11865 \begin_inset Flex Code
11866 status collapsed
11867
11868 \begin_layout Plain Layout
11869 string=""
11870 \end_layout
11871
11872 \end_inset
11873
11874 ] The horizontal space between the label and the text body.
11875  Only used for labels that are not above the text body.
11876 \end_layout
11877
11878 \begin_layout Description
11879 \begin_inset Flex Code
11880 status collapsed
11881
11882 \begin_layout Plain Layout
11883 LabelString
11884 \end_layout
11885
11886 \end_inset
11887
11888  [
11889 \begin_inset Flex Code
11890 status collapsed
11891
11892 \begin_layout Plain Layout
11893 string=""
11894 \end_layout
11895
11896 \end_inset
11897
11898 ] The string used for a label with a 
11899 \begin_inset Flex Code
11900 status collapsed
11901
11902 \begin_layout Plain Layout
11903 Static
11904 \end_layout
11905
11906 \end_inset
11907
11908  labeltype.
11909  When 
11910 \begin_inset Flex Code
11911 status collapsed
11912
11913 \begin_layout Plain Layout
11914 LabelCounter
11915 \end_layout
11916
11917 \end_inset
11918
11919  is set, this string can be contain the special formatting commands described
11920  in Section 
11921 \begin_inset CommandInset ref
11922 LatexCommand ref
11923 reference "sub:Counters"
11924
11925 \end_inset
11926
11927 .
11928 \begin_inset Foot
11929 status collapsed
11930
11931 \begin_layout Plain Layout
11932 For the sake of backwards compatibility, the string 
11933 \begin_inset Flex Code
11934 status collapsed
11935
11936 \begin_layout Plain Layout
11937 @
11938 \emph on
11939 style-name
11940 \emph default
11941 @
11942 \end_layout
11943
11944 \end_inset
11945
11946  will be replaced by the expanded 
11947 \begin_inset Flex Code
11948 status collapsed
11949
11950 \begin_layout Plain Layout
11951 LabelString
11952 \end_layout
11953
11954 \end_inset
11955
11956  of style 
11957 \begin_inset Flex Code
11958 status collapsed
11959
11960 \begin_layout Plain Layout
11961
11962 \emph on
11963 style-name
11964 \end_layout
11965
11966 \end_inset
11967
11968 .
11969  This feature is now obsolete and should be replaced by the mechanisms of
11970  Section 
11971 \begin_inset CommandInset ref
11972 LatexCommand ref
11973 reference "sub:Counters"
11974
11975 \end_inset
11976
11977 .
11978 \end_layout
11979
11980 \end_inset
11981
11982
11983 \end_layout
11984
11985 \begin_layout Description
11986 \begin_inset Flex Code
11987 status collapsed
11988
11989 \begin_layout Plain Layout
11990 LabelStringAppendix
11991 \end_layout
11992
11993 \end_inset
11994
11995  [
11996 \begin_inset Flex Code
11997 status collapsed
11998
11999 \begin_layout Plain Layout
12000 string=""
12001 \end_layout
12002
12003 \end_inset
12004
12005 ] This is used inside the appendix instead of 
12006 \begin_inset Flex Code
12007 status collapsed
12008
12009 \begin_layout Plain Layout
12010 LabelString
12011 \end_layout
12012
12013 \end_inset
12014
12015 .
12016  Note that every 
12017 \begin_inset Flex Code
12018 status collapsed
12019
12020 \begin_layout Plain Layout
12021 LabelString
12022 \end_layout
12023
12024 \end_inset
12025
12026  statement resets 
12027 \begin_inset Flex Code
12028 status collapsed
12029
12030 \begin_layout Plain Layout
12031 LabelStringAppendix
12032 \end_layout
12033
12034 \end_inset
12035
12036  too.
12037 \end_layout
12038
12039 \begin_layout Description
12040 \begin_inset Flex Code
12041 status collapsed
12042
12043 \begin_layout Plain Layout
12044 LabelTag
12045 \end_layout
12046
12047 \end_inset
12048
12049  [FIXME] (Used only with XML-type formats.)
12050 \end_layout
12051
12052 \begin_layout Description
12053 \begin_inset Flex Code
12054 status collapsed
12055
12056 \begin_layout Plain Layout
12057 LabelType
12058 \end_layout
12059
12060 \end_inset
12061
12062  [
12063 \begin_inset Flex Code
12064 status collapsed
12065
12066 \begin_layout Plain Layout
12067
12068 \emph on
12069 No_Label
12070 \emph default
12071 , Manual, Static, Top_Environment, Centered_Top_Environment, Counter, Sensitive,
12072  Enumerate, Itemize, Bibliography
12073 \end_layout
12074
12075 \end_inset
12076
12077
12078 \end_layout
12079
12080 \begin_deeper
12081 \begin_layout Itemize
12082 \begin_inset Flex Code
12083 status collapsed
12084
12085 \begin_layout Plain Layout
12086 Manual
12087 \end_layout
12088
12089 \end_inset
12090
12091  means the label is the very first word (up to the first real blank).
12092  Use protected spaces (like
12093 \begin_inset space ~
12094 \end_inset
12095
12096 that one) if you want more than one word as the label.
12097  
12098 \end_layout
12099
12100 \begin_layout Itemize
12101 \begin_inset Flex Code
12102 status collapsed
12103
12104 \begin_layout Plain Layout
12105 Static
12106 \end_layout
12107
12108 \end_inset
12109
12110  means the label is simply whatever 
12111 \begin_inset Flex Code
12112 status collapsed
12113
12114 \begin_layout Plain Layout
12115 LabelString
12116 \end_layout
12117
12118 \end_inset
12119
12120  declares it to be.
12121  Note that this really is `static'.
12122 \end_layout
12123
12124 \begin_layout Itemize
12125 \begin_inset Flex Code
12126 status collapsed
12127
12128 \begin_layout Plain Layout
12129 Top_Environment
12130 \end_layout
12131
12132 \end_inset
12133
12134  and 
12135 \begin_inset Flex Code
12136 status collapsed
12137
12138 \begin_layout Plain Layout
12139 Centered_Top_Environment
12140 \end_layout
12141
12142 \end_inset
12143
12144  are special cases of 
12145 \begin_inset Flex Code
12146 status collapsed
12147
12148 \begin_layout Plain Layout
12149 Static
12150 \end_layout
12151
12152 \end_inset
12153
12154 .
12155  The label will be printed above the paragraph, but only at the top of an
12156  environment or the top of a chain of paragraphs with this style.
12157  This might be used with the 
12158 \begin_inset Flex MenuItem
12159 status collapsed
12160
12161 \begin_layout Plain Layout
12162 Abstract
12163 \end_layout
12164
12165 \end_inset
12166
12167  style, for example.
12168 \end_layout
12169
12170 \begin_layout Itemize
12171 \begin_inset Flex Code
12172 status collapsed
12173
12174 \begin_layout Plain Layout
12175 Sensitive
12176 \end_layout
12177
12178 \end_inset
12179
12180  is a special case for the caption-labels 
12181 \begin_inset Quotes eld
12182 \end_inset
12183
12184 Figure
12185 \begin_inset Quotes erd
12186 \end_inset
12187
12188  and 
12189 \begin_inset Quotes eld
12190 \end_inset
12191
12192 Table
12193 \begin_inset Quotes erd
12194 \end_inset
12195
12196 .
12197  
12198 \begin_inset Flex Code
12199 status collapsed
12200
12201 \begin_layout Plain Layout
12202 Sensitive
12203 \end_layout
12204
12205 \end_inset
12206
12207  means the (hardcoded) label string depends on the kind of float: It is
12208  hardcoded to be `FloatType N', where N is the value of the counter associated
12209  with the float.
12210 \end_layout
12211
12212 \begin_layout Itemize
12213 The 
12214 \begin_inset Flex Code
12215 status collapsed
12216
12217 \begin_layout Plain Layout
12218 Counter
12219 \end_layout
12220
12221 \end_inset
12222
12223  label type defines automatically numbered labels.
12224  The 
12225 \begin_inset Flex Code
12226 status collapsed
12227
12228 \begin_layout Plain Layout
12229 LabelString
12230 \end_layout
12231
12232 \end_inset
12233
12234  will be expanded to resolve any counter references it contains: For example,
12235  it might be 
12236 \begin_inset Quotes eld
12237 \end_inset
12238
12239
12240 \begin_inset Flex Code
12241 status collapsed
12242
12243 \begin_layout Plain Layout
12244 Section 
12245 \backslash
12246 thechapter.
12247 \backslash
12248 thesection
12249 \end_layout
12250
12251 \end_inset
12252
12253
12254 \begin_inset Quotes erd
12255 \end_inset
12256
12257 .
12258  See Section 
12259 \begin_inset CommandInset ref
12260 LatexCommand ref
12261 reference "sub:Counters"
12262
12263 \end_inset
12264
12265  for more information on counters.
12266 \end_layout
12267
12268 \begin_layout Itemize
12269 \begin_inset Flex Code
12270 status collapsed
12271
12272 \begin_layout Plain Layout
12273 Enumerate
12274 \end_layout
12275
12276 \end_inset
12277
12278  produces the usual sort of enumeration labels.
12279  At present, it is hardcoded to use Arabic numerals, lowercase letters,
12280  small Roman numerals, and uppercase letters for the four possible depths.
12281 \end_layout
12282
12283 \begin_layout Itemize
12284 \begin_inset Flex Code
12285 status collapsed
12286
12287 \begin_layout Plain Layout
12288 Itemize
12289 \end_layout
12290
12291 \end_inset
12292
12293  produces various bullets at the different levels.
12294  It is also hardcoded.
12295 \end_layout
12296
12297 \begin_layout Itemize
12298 \begin_inset Flex Code
12299 status collapsed
12300
12301 \begin_layout Plain Layout
12302 Bibliography
12303 \end_layout
12304
12305 \end_inset
12306
12307  is used internally by LyX and should be used only with 
12308 \begin_inset Flex Code
12309 status collapsed
12310
12311 \begin_layout Plain Layout
12312 LatexType BibEnvironment
12313 \end_layout
12314
12315 \end_inset
12316
12317 .
12318 \end_layout
12319
12320 \end_deeper
12321 \begin_layout Description
12322 \begin_inset Flex Code
12323 status collapsed
12324
12325 \begin_layout Plain Layout
12326 LangPreamble
12327 \end_layout
12328
12329 \end_inset
12330
12331  Note that this will completely override any prior 
12332 \begin_inset Flex Code
12333 status collapsed
12334
12335 \begin_layout Plain Layout
12336 LangPreamble
12337 \end_layout
12338
12339 \end_inset
12340
12341  declaration for this style.
12342  Must end with 
12343 \begin_inset Quotes eld
12344 \end_inset
12345
12346
12347 \begin_inset Flex Code
12348 status collapsed
12349
12350 \begin_layout Plain Layout
12351 EndLangPreamble
12352 \end_layout
12353
12354 \end_inset
12355
12356
12357 \begin_inset Quotes erd
12358 \end_inset
12359
12360 .
12361  See section 
12362 \begin_inset CommandInset ref
12363 LatexCommand ref
12364 reference "sub:I18n"
12365
12366 \end_inset
12367
12368  for details on its use.
12369 \end_layout
12370
12371 \begin_layout Description
12372 \begin_inset Flex Code
12373 status collapsed
12374
12375 \begin_layout Plain Layout
12376 LatexName
12377 \end_layout
12378
12379 \end_inset
12380
12381  The name of the corresponding LaTeX stuff.
12382  Either the environment or command name.
12383 \end_layout
12384
12385 \begin_layout Description
12386 \begin_inset Flex Code
12387 status collapsed
12388
12389 \begin_layout Plain Layout
12390 LatexParam
12391 \end_layout
12392
12393 \end_inset
12394
12395  An optional parameter for the corresponding 
12396 \begin_inset Flex Code
12397 status collapsed
12398
12399 \begin_layout Plain Layout
12400 LatexName
12401 \end_layout
12402
12403 \end_inset
12404
12405  stuff.
12406  This parameter cannot be changed from within LyX.
12407 \end_layout
12408
12409 \begin_layout Description
12410 \begin_inset Flex Code
12411 status collapsed
12412
12413 \begin_layout Plain Layout
12414 LatexType
12415 \end_layout
12416
12417 \end_inset
12418
12419  [
12420 \begin_inset Flex Code
12421 status collapsed
12422
12423 \begin_layout Plain Layout
12424
12425 \emph on
12426 Paragraph
12427 \emph default
12428 , Command, Environment, Item_Environment,
12429 \end_layout
12430
12431 \end_inset
12432
12433  
12434 \begin_inset Flex Code
12435 status collapsed
12436
12437 \begin_layout Plain Layout
12438 List_Environment, Bib_Environment
12439 \end_layout
12440
12441 \end_inset
12442
12443 ] How the style should be translated into LaTeX.
12444 \begin_inset Foot
12445 status collapsed
12446
12447 \begin_layout Plain Layout
12448 \begin_inset Flex Code
12449 status collapsed
12450
12451 \begin_layout Plain Layout
12452 LatexType
12453 \end_layout
12454
12455 \end_inset
12456
12457  is perhaps a bit misleading, since these rules apply to SGML classes, too.
12458  Visit the SGML class files for specific examples.
12459 \end_layout
12460
12461 \end_inset
12462
12463
12464 \end_layout
12465
12466 \begin_deeper
12467 \begin_layout Itemize
12468 \begin_inset Flex Code
12469 status collapsed
12470
12471 \begin_layout Plain Layout
12472 Paragraph
12473 \end_layout
12474
12475 \end_inset
12476
12477  means nothing special.
12478  
12479 \end_layout
12480
12481 \begin_layout Itemize
12482 \begin_inset Flex Code
12483 status collapsed
12484
12485 \begin_layout Plain Layout
12486 Command
12487 \end_layout
12488
12489 \end_inset
12490
12491  means 
12492 \begin_inset Flex Code
12493 status collapsed
12494
12495 \begin_layout Plain Layout
12496
12497 \backslash
12498
12499 \emph on
12500 LatexName
12501 \emph default
12502 {\SpecialChar \ldots{}
12503 }
12504 \end_layout
12505
12506 \end_inset
12507
12508 .
12509 \end_layout
12510
12511 \begin_layout Itemize
12512 \begin_inset Flex Code
12513 status collapsed
12514
12515 \begin_layout Plain Layout
12516 Environment
12517 \end_layout
12518
12519 \end_inset
12520
12521  means 
12522 \begin_inset Flex Code
12523 status collapsed
12524
12525 \begin_layout Plain Layout
12526
12527 \backslash
12528 begin{
12529 \emph on
12530 LatexName
12531 \emph default
12532 }\SpecialChar \ldots{}
12533
12534 \backslash
12535 end{
12536 \emph on
12537 LatexName
12538 \emph default
12539 }
12540 \end_layout
12541
12542 \end_inset
12543
12544 .
12545  
12546 \end_layout
12547
12548 \begin_layout Itemize
12549 \begin_inset Flex Code
12550 status collapsed
12551
12552 \begin_layout Plain Layout
12553 Item_Environment
12554 \end_layout
12555
12556 \end_inset
12557
12558  is the same as 
12559 \begin_inset Flex Code
12560 status collapsed
12561
12562 \begin_layout Plain Layout
12563 Environment
12564 \end_layout
12565
12566 \end_inset
12567
12568 , except that an 
12569 \begin_inset Flex Code
12570 status collapsed
12571
12572 \begin_layout Plain Layout
12573
12574 \backslash
12575 item
12576 \end_layout
12577
12578 \end_inset
12579
12580  is generated for each paragraph of this environment.
12581  
12582 \end_layout
12583
12584 \begin_layout Itemize
12585 \begin_inset Flex Code
12586 status collapsed
12587
12588 \begin_layout Plain Layout
12589 List_Environment
12590 \end_layout
12591
12592 \end_inset
12593
12594  is the same as 
12595 \begin_inset Flex Code
12596 status collapsed
12597
12598 \begin_layout Plain Layout
12599 Item_Environment
12600 \end_layout
12601
12602 \end_inset
12603
12604 , except that 
12605 \begin_inset Flex Code
12606 status collapsed
12607
12608 \begin_layout Plain Layout
12609 LabelWidthString
12610 \end_layout
12611
12612 \end_inset
12613
12614  is passed as an argument to the environment.
12615  
12616 \begin_inset Flex Code
12617 status collapsed
12618
12619 \begin_layout Plain Layout
12620 LabelWidthString
12621 \end_layout
12622
12623 \end_inset
12624
12625  can be defined in the 
12626 \begin_inset Flex MenuItem
12627 status collapsed
12628
12629 \begin_layout Plain Layout
12630 Edit\SpecialChar \menuseparator
12631 Paragraph
12632 \begin_inset space ~
12633 \end_inset
12634
12635 settings
12636 \end_layout
12637
12638 \end_inset
12639
12640  dialog.
12641  
12642 \end_layout
12643
12644 \begin_layout Standard
12645 Putting the last few things together, the LaTeX output will be either: 
12646 \end_layout
12647
12648 \begin_layout LyX-Code
12649
12650 \backslash
12651 latexname[latexparam]{\SpecialChar \ldots{}
12652 }
12653 \end_layout
12654
12655 \begin_layout Standard
12656 or: 
12657 \end_layout
12658
12659 \begin_layout LyX-Code
12660
12661 \backslash
12662 begin{latexname}[latexparam] \SpecialChar \ldots{}
12663  
12664 \backslash
12665 end{latexname}.
12666 \end_layout
12667
12668 \begin_layout Standard
12669 depending upon the LaTeX type.
12670 \end_layout
12671
12672 \end_deeper
12673 \begin_layout Description
12674
12675 \change_inserted -712698321 1354263086
12676 \begin_inset Flex Code
12677 status collapsed
12678
12679 \begin_layout Plain Layout
12680
12681 \change_inserted -712698321 1353866852
12682 LeftDelim
12683 \end_layout
12684
12685 \end_inset
12686
12687  [
12688 \begin_inset Flex Code
12689 status collapsed
12690
12691 \begin_layout Plain Layout
12692
12693 \change_inserted -712698321 1353866852
12694 string
12695 \end_layout
12696
12697 \end_inset
12698
12699 ] A string that is put at the beginning of the style content.
12700  A line break in the output can be indicated by 
12701 \begin_inset Flex Code
12702 status collapsed
12703
12704 \begin_layout Plain Layout
12705
12706 \change_inserted -712698321 1354263086
12707 <br/>
12708 \end_layout
12709
12710 \end_inset
12711
12712 .
12713 \change_unchanged
12714
12715 \end_layout
12716
12717 \begin_layout Description
12718 \begin_inset Flex Code
12719 status collapsed
12720
12721 \begin_layout Plain Layout
12722 LeftMargin
12723 \end_layout
12724
12725 \end_inset
12726
12727  [
12728 \begin_inset Flex Code
12729 status collapsed
12730
12731 \begin_layout Plain Layout
12732 string=""
12733 \end_layout
12734
12735 \end_inset
12736
12737 ] If you put styles into environments, the leftmargins are not simply added,
12738  but added with a factor 
12739 \begin_inset Formula $\frac{4}{depth+4}$
12740 \end_inset
12741
12742 .
12743  Note that this parameter is also used when the margin is defined as 
12744 \begin_inset Flex Code
12745 status collapsed
12746
12747 \begin_layout Plain Layout
12748 Manual
12749 \end_layout
12750
12751 \end_inset
12752
12753  or 
12754 \begin_inset Flex Code
12755 status collapsed
12756
12757 \begin_layout Plain Layout
12758 Dynamic
12759 \end_layout
12760
12761 \end_inset
12762
12763 .
12764  Then it is added to the manual or dynamic margin.
12765  
12766 \begin_inset Newline newline
12767 \end_inset
12768
12769 The argument is passed as a string.
12770  For example 
12771 \begin_inset Quotes eld
12772 \end_inset
12773
12774
12775 \begin_inset Flex Code
12776 status collapsed
12777
12778 \begin_layout Plain Layout
12779 MM
12780 \end_layout
12781
12782 \end_inset
12783
12784
12785 \begin_inset Quotes erd
12786 \end_inset
12787
12788  means that the paragraph is indented with the width of 
12789 \begin_inset Quotes eld
12790 \end_inset
12791
12792
12793 \begin_inset Flex Code
12794 status collapsed
12795
12796 \begin_layout Plain Layout
12797 MM
12798 \end_layout
12799
12800 \end_inset
12801
12802
12803 \begin_inset Quotes erd
12804 \end_inset
12805
12806  in the normal font.
12807  You can get a negative width by prefixing the string with 
12808 \begin_inset Quotes eld
12809 \end_inset
12810
12811
12812 \begin_inset Flex Code
12813 status collapsed
12814
12815 \begin_layout Plain Layout
12816 -
12817 \end_layout
12818
12819 \end_inset
12820
12821
12822 \begin_inset Quotes erd
12823 \end_inset
12824
12825 .
12826  This way was chosen so that the look is the same with each used screen
12827  font.
12828  
12829 \end_layout
12830
12831 \begin_layout Description
12832 \begin_inset Flex Code
12833 status collapsed
12834
12835 \begin_layout Plain Layout
12836 Margin
12837 \end_layout
12838
12839 \end_inset
12840
12841  [
12842 \begin_inset Flex Code
12843 status collapsed
12844
12845 \begin_layout Plain Layout
12846
12847 \emph on
12848 Static
12849 \emph default
12850 , Manual, Dynamic, First_Dynamic, Right_Address_Box
12851 \end_layout
12852
12853 \end_inset
12854
12855
12856 \begin_inset Newline newline
12857 \end_inset
12858
12859 The kind of margin that the style has on the left side.
12860  
12861 \begin_inset Flex Code
12862 status collapsed
12863
12864 \begin_layout Plain Layout
12865 Static
12866 \end_layout
12867
12868 \end_inset
12869
12870  just means a fixed margin.
12871  
12872 \begin_inset Flex Code
12873 status collapsed
12874
12875 \begin_layout Plain Layout
12876 Manual
12877 \end_layout
12878
12879 \end_inset
12880
12881  means that the left margin depends on the string entered in the 
12882 \begin_inset Flex MenuItem
12883 status collapsed
12884
12885 \begin_layout Plain Layout
12886 Edit\SpecialChar \menuseparator
12887 Paragraph
12888 \begin_inset space ~
12889 \end_inset
12890
12891 Settings
12892 \end_layout
12893
12894 \end_inset
12895
12896  dialog.
12897  This is used to typeset nice lists without tabulators.
12898  
12899 \begin_inset Flex Code
12900 status collapsed
12901
12902 \begin_layout Plain Layout
12903 Dynamic
12904 \end_layout
12905
12906 \end_inset
12907
12908  means that the margin depends on the size of the label.
12909  This is used for automatic enumerated headlines.
12910  It is obvious that the headline 
12911 \begin_inset Quotes eld
12912 \end_inset
12913
12914 5.4.3.2.1 Very long headline
12915 \begin_inset Quotes erd
12916 \end_inset
12917
12918  must have a wider left margin (as wide as 
12919 \begin_inset Quotes eld
12920 \end_inset
12921
12922 5.4.3.2.1
12923 \begin_inset Quotes erd
12924 \end_inset
12925
12926  plus the space) than 
12927 \begin_inset Quotes eld
12928 \end_inset
12929
12930 3.2 Very long headline
12931 \begin_inset Quotes erd
12932 \end_inset
12933
12934 , even if standard 
12935 \begin_inset Quotes eld
12936 \end_inset
12937
12938 word processors
12939 \begin_inset Quotes erd
12940 \end_inset
12941
12942  are not able to do this.
12943  
12944 \begin_inset Flex Code
12945 status collapsed
12946
12947 \begin_layout Plain Layout
12948 First_Dynamic
12949 \end_layout
12950
12951 \end_inset
12952
12953  is similar, but only the very first row of the paragraph is dynamic, while
12954  the others are static; this is used, for example, for descriptions.
12955  
12956 \begin_inset Flex Code
12957 status collapsed
12958
12959 \begin_layout Plain Layout
12960 Right_Address_Box
12961 \end_layout
12962
12963 \end_inset
12964
12965  means the margin is chosen in a way that the longest row of this paragraph
12966  fits to the right margin.
12967  This is used to typeset an address on the right edge of the page.
12968 \end_layout
12969
12970 \begin_layout Description
12971 \begin_inset Flex Code
12972 status collapsed
12973
12974 \begin_layout Plain Layout
12975 NeedProtect
12976 \end_layout
12977
12978 \end_inset
12979
12980  [
12981 \begin_inset Flex Code
12982 status collapsed
12983
12984 \begin_layout Plain Layout
12985
12986 \emph on
12987 0
12988 \end_layout
12989
12990 \end_inset
12991
12992 ,
12993 \begin_inset Flex Code
12994 status collapsed
12995
12996 \begin_layout Plain Layout
12997 1
12998 \end_layout
12999
13000 \end_inset
13001
13002 ] Whether fragile commands in this style should be 
13003 \begin_inset Flex Code
13004 status collapsed
13005
13006 \begin_layout Plain Layout
13007
13008 \backslash
13009 protect
13010 \end_layout
13011
13012 \end_inset
13013
13014 'ed.
13015  (Note: This is 
13016 \emph on
13017 not
13018 \emph default
13019  whether this command should itself be protected.)
13020 \end_layout
13021
13022 \begin_layout Description
13023 \begin_inset Flex Code
13024 status collapsed
13025
13026 \begin_layout Plain Layout
13027 Newline
13028 \end_layout
13029
13030 \end_inset
13031
13032  [
13033 \begin_inset Flex Code
13034 status collapsed
13035
13036 \begin_layout Plain Layout
13037 0
13038 \end_layout
13039
13040 \end_inset
13041
13042
13043 \begin_inset Flex Code
13044 status collapsed
13045
13046 \begin_layout Plain Layout
13047
13048 \emph on
13049 1
13050 \end_layout
13051
13052 \end_inset
13053
13054 ] Whether newlines are translated into LaTeX newlines (
13055 \begin_inset Flex Code
13056 status collapsed
13057
13058 \begin_layout Plain Layout
13059
13060 \backslash
13061
13062 \backslash
13063
13064 \end_layout
13065
13066 \end_inset
13067
13068 ) or not.
13069  The translation can be switched off to allow more comfortable LaTeX editing
13070  inside LyX.
13071 \end_layout
13072
13073 \begin_layout Description
13074 \begin_inset Flex Code
13075 status collapsed
13076
13077 \begin_layout Plain Layout
13078 NextNoIndent
13079 \end_layout
13080
13081 \end_inset
13082
13083  [
13084 \begin_inset Flex Code
13085 status collapsed
13086
13087 \begin_layout Plain Layout
13088 1
13089 \end_layout
13090
13091 \end_inset
13092
13093
13094 \begin_inset Flex Code
13095 status collapsed
13096
13097 \begin_layout Plain Layout
13098
13099 \emph on
13100 0
13101 \end_layout
13102
13103 \end_inset
13104
13105 ] If set to true, and if 
13106 \begin_inset Flex Code
13107 status collapsed
13108
13109 \begin_layout Plain Layout
13110 DefaultStyle
13111 \end_layout
13112
13113 \end_inset
13114
13115  (usually 
13116 \begin_inset Flex Code
13117 status collapsed
13118
13119 \begin_layout Plain Layout
13120 Standard
13121 \end_layout
13122
13123 \end_inset
13124
13125 ) paragraphs are being indented, then the indentation of such a paragraph
13126  following one of this type will be suppressed.
13127  (So this will not affect the display of non-default paragraphs.)
13128 \end_layout
13129
13130 \begin_layout Description
13131 \begin_inset Flex Code
13132 status collapsed
13133
13134 \begin_layout Plain Layout
13135 ObsoletedBy
13136 \end_layout
13137
13138 \end_inset
13139
13140  Name of a style that has replaced this style.
13141  This is used to rename a style, while keeping backward compatibility.
13142 \end_layout
13143
13144 \begin_layout Description
13145
13146 \change_deleted -712698321 1353679722
13147 \begin_inset Flex Code
13148 status collapsed
13149
13150 \begin_layout Plain Layout
13151 OptionalArgs
13152 \end_layout
13153
13154 \end_inset
13155
13156  [
13157 \begin_inset Flex Code
13158 status collapsed
13159
13160 \begin_layout Plain Layout
13161 int=0
13162 \end_layout
13163
13164 \end_inset
13165
13166 ] The number of optional arguments that can be used with this style.
13167  This is useful for things like section headings, and only makes sense with
13168  LaTeX.
13169  Note that, on output, the optional arguments will all precede any required
13170  arguments (see below).
13171  So one can have constructs like:
13172 \end_layout
13173
13174 \begin_deeper
13175 \begin_layout LyX-Code
13176
13177 \change_deleted -712698321 1353679722
13178
13179 \backslash
13180 mycmd[opt1]{req1}{contents of paragraph}
13181 \end_layout
13182
13183 \begin_layout Standard
13184
13185 \change_deleted -712698321 1353679722
13186 but one cannot have things like: 
13187 \end_layout
13188
13189 \begin_layout LyX-Code
13190
13191 \change_deleted -712698321 1353679722
13192
13193 \backslash
13194 mycmd[opt1]{req1}[opt2]{contents of paragraph}
13195 \end_layout
13196
13197 \begin_layout Standard
13198
13199 \change_deleted -712698321 1353679722
13200 at least, not without ERT (with which you can have anything).
13201  
13202 \change_unchanged
13203
13204 \end_layout
13205
13206 \end_deeper
13207 \begin_layout Description
13208 \begin_inset Flex Code
13209 status collapsed
13210
13211 \begin_layout Plain Layout
13212 ParbreakIsNewline
13213 \end_layout
13214
13215 \end_inset
13216
13217  [
13218 \begin_inset Flex Code
13219 status collapsed
13220
13221 \begin_layout Plain Layout
13222
13223 \emph on
13224 0
13225 \end_layout
13226
13227 \end_inset
13228
13229
13230 \begin_inset Flex Code
13231 status collapsed
13232
13233 \begin_layout Plain Layout
13234 1
13235 \end_layout
13236
13237 \end_inset
13238
13239 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
13240  output, but only by a line break; together with 
13241 \begin_inset Flex Code
13242 status collapsed
13243
13244 \begin_layout Plain Layout
13245 PassThru 1
13246 \end_layout
13247
13248 \end_inset
13249
13250 , this allows to emulate a plain text editor (like the ERT inset).
13251 \end_layout
13252
13253 \begin_layout Description
13254 \begin_inset Flex Code
13255 status collapsed
13256
13257 \begin_layout Plain Layout
13258 ParIndent
13259 \end_layout
13260
13261 \end_inset
13262
13263  [
13264 \begin_inset Flex Code
13265 status collapsed
13266
13267 \begin_layout Plain Layout
13268 string=""
13269 \end_layout
13270
13271 \end_inset
13272
13273 ] The indent of the very first line of a paragraph.
13274  The 
13275 \begin_inset Flex Code
13276 status collapsed
13277
13278 \begin_layout Plain Layout
13279 Parindent
13280 \end_layout
13281
13282 \end_inset
13283
13284  will be fixed for a certain style.
13285  The exception is the default style, since the indentation for these paragraphs
13286  can be prohibited with 
13287 \begin_inset Flex Code
13288 status collapsed
13289
13290 \begin_layout Plain Layout
13291 NextNoIndent
13292 \end_layout
13293
13294 \end_inset
13295
13296 .
13297  Also, 
13298 \begin_inset Flex Code
13299 status collapsed
13300
13301 \begin_layout Plain Layout
13302 Standard
13303 \end_layout
13304
13305 \end_inset
13306
13307  style paragraphs inside environments use the 
13308 \begin_inset Flex Code
13309 status collapsed
13310
13311 \begin_layout Plain Layout
13312 Parindent
13313 \end_layout
13314
13315 \end_inset
13316
13317  of the environment, not their native one.
13318  For example, 
13319 \begin_inset Flex Code
13320 status collapsed
13321
13322 \begin_layout Plain Layout
13323 Standard
13324 \end_layout
13325
13326 \end_inset
13327
13328  paragraphs inside an enumeration are not indented.
13329 \end_layout
13330
13331 \begin_layout Description
13332 \begin_inset Flex Code
13333 status collapsed
13334
13335 \begin_layout Plain Layout
13336 Parsep
13337 \end_layout
13338
13339 \end_inset
13340
13341  [
13342 \begin_inset Flex Code
13343 status collapsed
13344
13345 \begin_layout Plain Layout
13346 float=0
13347 \end_layout
13348
13349 \end_inset
13350
13351 ] The vertical space between two paragraphs of this style.
13352 \end_layout
13353
13354 \begin_layout Description
13355 \begin_inset Flex Code
13356 status collapsed
13357
13358 \begin_layout Plain Layout
13359 Parskip
13360 \end_layout
13361
13362 \end_inset
13363
13364  [
13365 \begin_inset Flex Code
13366 status collapsed
13367
13368 \begin_layout Plain Layout
13369 float=0
13370 \end_layout
13371
13372 \end_inset
13373
13374 ] LyX allows the user to choose either 
13375 \begin_inset Quotes eld
13376 \end_inset
13377
13378 indent
13379 \begin_inset Quotes erd
13380 \end_inset
13381
13382  or 
13383 \begin_inset Quotes eld
13384 \end_inset
13385
13386 skip
13387 \begin_inset Quotes erd
13388 \end_inset
13389
13390  to typeset a document.
13391  When 
13392 \begin_inset Quotes eld
13393 \end_inset
13394
13395 indent
13396 \begin_inset Quotes erd
13397 \end_inset
13398
13399  is chosen, this value is completely ignored.
13400  When 
13401 \begin_inset Quotes eld
13402 \end_inset
13403
13404 skip
13405 \begin_inset Quotes erd
13406 \end_inset
13407
13408  is chosen, the parindent of a LaTeXtype 
13409 \begin_inset Quotes eld
13410 \end_inset
13411
13412 Paragraph
13413 \begin_inset Quotes erd
13414 \end_inset
13415
13416  style is ignored and all paragraphs are separated by this parskip argument.
13417  The vertical space is calculated with 
13418 \begin_inset Flex Code
13419 status collapsed
13420
13421 \begin_layout Plain Layout
13422 value
13423 \begin_inset space ~
13424 \end_inset
13425
13426 * DefaultHeight
13427 \end_layout
13428
13429 \end_inset
13430
13431  where 
13432 \begin_inset Flex Code
13433 status collapsed
13434
13435 \begin_layout Plain Layout
13436 DefaultHeight
13437 \end_layout
13438
13439 \end_inset
13440
13441  is the height of a row with the normal font.
13442  This way, the look stays the same with different screen fonts.
13443 \end_layout
13444
13445 \begin_layout Description
13446 \begin_inset Flex Code
13447 status collapsed
13448
13449 \begin_layout Plain Layout
13450 PassThru
13451 \end_layout
13452
13453 \end_inset
13454
13455  [
13456 \begin_inset Flex Code
13457 status collapsed
13458
13459 \begin_layout Plain Layout
13460
13461 \emph on
13462 0
13463 \end_layout
13464
13465 \end_inset
13466
13467
13468 \begin_inset Flex Code
13469 status collapsed
13470
13471 \begin_layout Plain Layout
13472 1
13473 \end_layout
13474
13475 \end_inset
13476
13477 ] Whether the contents of this paragraph should be output in raw form, meaning
13478  without special translations that LaTeX would require.
13479 \end_layout
13480
13481 \begin_layout Description
13482 \begin_inset Flex Code
13483 status collapsed
13484
13485 \begin_layout Plain Layout
13486 Preamble
13487 \end_layout
13488
13489 \end_inset
13490
13491  Information to be included in the LaTeX preamble when this style is used.
13492  Used to define macros, load packages, etc., required by this particular
13493  style.
13494  Must end with 
13495 \begin_inset Quotes eld
13496 \end_inset
13497
13498
13499 \begin_inset Flex Code
13500 status collapsed
13501
13502 \begin_layout Plain Layout
13503 EndPreamble
13504 \end_layout
13505
13506 \end_inset
13507
13508
13509 \begin_inset Quotes erd
13510 \end_inset
13511
13512 .
13513 \end_layout
13514
13515 \begin_layout Description
13516 \begin_inset Flex Code
13517 status collapsed
13518
13519 \begin_layout Plain Layout
13520 RefPrefix
13521 \end_layout
13522
13523 \end_inset
13524
13525  [
13526 \begin_inset Flex Code
13527 status collapsed
13528
13529 \begin_layout Plain Layout
13530 string
13531 \end_layout
13532
13533 \end_inset
13534
13535 ] The prefix to use when creating labels referring to paragraphs of this
13536  type.
13537  This allows the use of formatted references.
13538 \end_layout
13539
13540 \begin_layout Description
13541
13542 \change_deleted -712698321 1353681258
13543 \begin_inset Flex Code
13544 status collapsed
13545
13546 \begin_layout Plain Layout
13547 RequiredArgs
13548 \end_layout
13549
13550 \end_inset
13551
13552  [
13553 \begin_inset Flex Code
13554 status collapsed
13555
13556 \begin_layout Plain Layout
13557 int=0
13558 \end_layout
13559
13560 \end_inset
13561
13562 ] The number of required arguments that the LaTeX command or environment
13563  corresponding to this style expects.
13564  In the case of a command, these are required arguments 
13565 \emph on
13566 other than
13567 \emph default
13568  that associated with the content of the paragraph itself.
13569  These do not actually have to be provided: LyX will output empty arguments
13570  if necessary.
13571  Note that optional arguments will be output before required arguments.
13572  See the discussion of the 
13573 \begin_inset Flex Code
13574 status collapsed
13575
13576 \begin_layout Plain Layout
13577 OptionalArgs
13578 \end_layout
13579
13580 \end_inset
13581
13582  tag above for more information.
13583 \change_unchanged
13584
13585 \end_layout
13586
13587 \begin_layout Description
13588 \begin_inset Flex Code
13589 status collapsed
13590
13591 \begin_layout Plain Layout
13592 Requires 
13593 \end_layout
13594
13595 \end_inset
13596
13597  [
13598 \begin_inset Flex Code
13599 status collapsed
13600
13601 \begin_layout Plain Layout
13602 string
13603 \end_layout
13604
13605 \end_inset
13606
13607 ] Whether the style requires the feature 
13608 \begin_inset Flex Code
13609 status collapsed
13610
13611 \begin_layout Plain Layout
13612 string
13613 \end_layout
13614
13615 \end_inset
13616
13617 .
13618  See the description of 
13619 \begin_inset Flex Code
13620 status collapsed
13621
13622 \begin_layout Plain Layout
13623 Provides
13624 \end_layout
13625
13626 \end_inset
13627
13628  above (page 
13629 \begin_inset CommandInset ref
13630 LatexCommand pageref
13631 reference "des:FreeSpacing"
13632
13633 \end_inset
13634
13635 ) for information on `features'.
13636  
13637 \change_inserted -712698321 1353693134
13638
13639 \end_layout
13640
13641 \begin_layout Description
13642
13643 \change_inserted -712698321 1353693371
13644 \begin_inset Flex Code
13645 status collapsed
13646
13647 \begin_layout Plain Layout
13648
13649 \change_inserted -712698321 1353693146
13650 ResetArgs
13651 \change_unchanged
13652
13653 \end_layout
13654
13655 \end_inset
13656
13657  [
13658 \begin_inset Flex Code
13659 status collapsed
13660
13661 \begin_layout Plain Layout
13662
13663 \change_inserted -712698321 1353693235
13664
13665 \emph on
13666 0
13667 \end_layout
13668
13669 \end_inset
13670
13671 ,
13672 \begin_inset Flex Code
13673 status collapsed
13674
13675 \begin_layout Plain Layout
13676
13677 \change_inserted -712698321 1353693235
13678 1
13679 \end_layout
13680
13681 \end_inset
13682
13683 ] Resets the LaTeX arguments of this style (as defined via the 
13684 \begin_inset Flex Code
13685 status collapsed
13686
13687 \begin_layout Plain Layout
13688
13689 \change_inserted -712698321 1353693371
13690 Argument
13691 \change_unchanged
13692
13693 \end_layout
13694
13695 \end_inset
13696
13697  tag).
13698  This is useful if you have copied a style via 
13699 \begin_inset Flex Code
13700 status collapsed
13701
13702 \begin_layout Plain Layout
13703
13704 \change_inserted -712698321 1353693302
13705 CopyStyle
13706 \change_unchanged
13707
13708 \end_layout
13709
13710 \end_inset
13711
13712 , but you do not want to inherit its (required and optional) arguments.
13713 \change_unchanged
13714
13715 \end_layout
13716
13717 \begin_layout Description
13718
13719 \change_inserted -712698321 1354263074
13720 \begin_inset Flex Code
13721 status collapsed
13722
13723 \begin_layout Plain Layout
13724
13725 \change_inserted -712698321 1353866876
13726 RightDelim
13727 \end_layout
13728
13729 \end_inset
13730
13731  [
13732 \begin_inset Flex Code
13733 status collapsed
13734
13735 \begin_layout Plain Layout
13736
13737 \change_inserted -712698321 1353866873
13738 string
13739 \end_layout
13740
13741 \end_inset
13742
13743 ] A string that is put at the end of the layout content.
13744  A line break in the output can be indicated by 
13745 \begin_inset Flex Code
13746 status collapsed
13747
13748 \begin_layout Plain Layout
13749
13750 \change_inserted -712698321 1354263069
13751 <br/>
13752 \change_unchanged
13753
13754 \end_layout
13755
13756 \end_inset
13757
13758 .
13759 \end_layout
13760
13761 \begin_layout Description
13762 \begin_inset Flex Code
13763 status collapsed
13764
13765 \begin_layout Plain Layout
13766 RightMargin
13767 \end_layout
13768
13769 \end_inset
13770
13771  [
13772 \begin_inset Flex Code
13773 status collapsed
13774
13775 \begin_layout Plain Layout
13776 string=""
13777 \end_layout
13778
13779 \end_inset
13780
13781 ] Similar to 
13782 \begin_inset Flex Code
13783 status collapsed
13784
13785 \begin_layout Plain Layout
13786 LeftMargin
13787 \end_layout
13788
13789 \end_inset
13790
13791 .
13792 \end_layout
13793
13794 \begin_layout Description
13795 \begin_inset Flex Code
13796 status collapsed
13797
13798 \begin_layout Plain Layout
13799 Spacing
13800 \end_layout
13801
13802 \end_inset
13803
13804  [
13805 \begin_inset Flex Code
13806 status collapsed
13807
13808 \begin_layout Plain Layout
13809
13810 \emph on
13811 single
13812 \emph default
13813 , onehalf, double, other
13814 \end_layout
13815
13816 \end_inset
13817
13818  
13819 \emph on
13820 value
13821 \emph default
13822 ] This defines what the default spacing should be in the style.
13823  The arguments 
13824 \begin_inset Flex Code
13825 status collapsed
13826
13827 \begin_layout Plain Layout
13828 single
13829 \end_layout
13830
13831 \end_inset
13832
13833
13834 \begin_inset Flex Code
13835 status collapsed
13836
13837 \begin_layout Plain Layout
13838 onehalf
13839 \end_layout
13840
13841 \end_inset
13842
13843  and 
13844 \begin_inset Flex Code
13845 status collapsed
13846
13847 \begin_layout Plain Layout
13848 double
13849 \end_layout
13850
13851 \end_inset
13852
13853  correspond respectively to a multiplier value of 1, 1.25 and 1.667.
13854  If you specify the argument 
13855 \begin_inset Flex Code
13856 status collapsed
13857
13858 \begin_layout Plain Layout
13859 other
13860 \end_layout
13861
13862 \end_inset
13863
13864 , then you should also provide a numerical argument which will be the actual
13865  multiplier value.
13866  Note that, contrary to other parameters, 
13867 \begin_inset Flex Code
13868 status collapsed
13869
13870 \begin_layout Plain Layout
13871 Spacing
13872 \end_layout
13873
13874 \end_inset
13875
13876  implies the generation of specific LaTeX code, using the package 
13877 \family roman
13878
13879 \begin_inset Flex Code
13880 status collapsed
13881
13882 \begin_layout Plain Layout
13883 setspace.sty
13884 \end_layout
13885
13886 \end_inset
13887
13888 .
13889 \end_layout
13890
13891 \begin_layout Description
13892 \begin_inset Flex Code
13893 status collapsed
13894
13895 \begin_layout Plain Layout
13896 Spellcheck
13897 \end_layout
13898
13899 \end_inset
13900
13901  [
13902 \begin_inset Flex Code
13903 status collapsed
13904
13905 \begin_layout Plain Layout
13906 0
13907 \end_layout
13908
13909 \end_inset
13910
13911 ,
13912 \begin_inset Flex Code
13913 status collapsed
13914
13915 \begin_layout Plain Layout
13916
13917 \emph on
13918 1
13919 \end_layout
13920
13921 \end_inset
13922
13923 ] Spellcheck paragraphs of this style.
13924  Default is true.
13925 \end_layout
13926
13927 \begin_layout Description
13928 \begin_inset Flex Code
13929 status collapsed
13930
13931 \begin_layout Plain Layout
13932 TextFont
13933 \end_layout
13934
13935 \end_inset
13936
13937  The font used for the text body .
13938  See section 
13939 \begin_inset CommandInset ref
13940 LatexCommand ref
13941 reference "sub:Font-description"
13942
13943 \end_inset
13944
13945 .
13946 \end_layout
13947
13948 \begin_layout Description
13949 \begin_inset Flex Code
13950 status collapsed
13951
13952 \begin_layout Plain Layout
13953 TocLevel
13954 \end_layout
13955
13956 \end_inset
13957
13958
13959 \series medium
13960  
13961 \begin_inset Flex Code
13962 status collapsed
13963
13964 \begin_layout Plain Layout
13965
13966 \series medium
13967 [int]
13968 \end_layout
13969
13970 \end_inset
13971
13972
13973 \series default
13974  The level of the style in the table of contents.
13975  This is used for automatic numbering of section headings.
13976 \end_layout
13977
13978 \begin_layout Description
13979 \begin_inset Flex Code
13980 status collapsed
13981
13982 \begin_layout Plain Layout
13983 TopSep
13984 \end_layout
13985
13986 \end_inset
13987
13988  [
13989 \begin_inset Flex Code
13990 status collapsed
13991
13992 \begin_layout Plain Layout
13993 float=0
13994 \end_layout
13995
13996 \end_inset
13997
13998 ] The vertical space with which the very first of a chain of paragraphs
13999  with this style is separated from the previous paragraph.
14000  If the previous paragraph has another style, the separations are not simply
14001  added, but the maximum is taken.
14002 \end_layout
14003
14004 \begin_layout Subsection
14005 \begin_inset CommandInset label
14006 LatexCommand label
14007 name "sub:I18n"
14008
14009 \end_inset
14010
14011 Internationalization of Paragraph Styles
14012 \end_layout
14013
14014 \begin_layout Standard
14015 LyX has long supported internationalization of layout information, but,
14016  until version 2.0, this applied only to the user interface and not to, say,
14017  PDF output.
14018  Thus, French authors were forced to resort to ugly hacks if they wanted
14019  `
14020 \lang french
14021 Théorème
14022 \lang english
14023  1' instead of `Theorem 1'.
14024  Thanks to Georg Baum, that is no longer the case.
14025 \end_layout
14026
14027 \begin_layout Standard
14028 If a 
14029 \begin_inset Flex Code
14030 status collapsed
14031
14032 \begin_layout Plain Layout
14033 Style
14034 \end_layout
14035
14036 \end_inset
14037
14038  defines text that is to appear in the typeset document, it may use 
14039 \begin_inset Flex Code
14040 status collapsed
14041
14042 \begin_layout Plain Layout
14043 LangPreamble
14044 \end_layout
14045
14046 \end_inset
14047
14048  and 
14049 \begin_inset Flex Code
14050 status collapsed
14051
14052 \begin_layout Plain Layout
14053 BabelPreamble
14054 \end_layout
14055
14056 \end_inset
14057
14058  to support non-English and even multi-language documents correctly.
14059  The following excerpt (from the 
14060 \begin_inset Flex Code
14061 status collapsed
14062
14063 \begin_layout Plain Layout
14064 theorems-ams.inc
14065 \end_layout
14066
14067 \end_inset
14068
14069  file) shows how this works:
14070 \end_layout
14071
14072 \begin_layout LyX-Code
14073 Preamble
14074 \end_layout
14075
14076 \begin_deeper
14077 \begin_layout LyX-Code
14078   
14079 \backslash
14080 theoremstyle{remark}
14081 \end_layout
14082
14083 \begin_layout LyX-Code
14084   
14085 \backslash
14086 newtheorem{claim}[thm]{
14087 \backslash
14088 protect
14089 \backslash
14090 claimname}
14091 \end_layout
14092
14093 \begin_layout LyX-Code
14094 EndPreamble
14095 \end_layout
14096
14097 \begin_layout LyX-Code
14098 LangPreamble
14099 \end_layout
14100
14101 \begin_layout LyX-Code
14102   
14103 \backslash
14104 providecommand{
14105 \backslash
14106 claimname}{_(Claim)}
14107 \end_layout
14108
14109 \begin_layout LyX-Code
14110 EndLangPreamble
14111 \end_layout
14112
14113 \begin_layout LyX-Code
14114 BabelPreamble
14115 \end_layout
14116
14117 \begin_layout LyX-Code
14118     
14119 \backslash
14120 addto
14121 \backslash
14122 captions$$lang{
14123 \backslash
14124 renewcommand{
14125 \backslash
14126 claimname}{_(Claim)}}
14127 \end_layout
14128
14129 \begin_layout LyX-Code
14130 EndBabelPreamble
14131 \end_layout
14132
14133 \end_deeper
14134 \begin_layout Standard
14135 In principle, any legal LaTeX may appear in the 
14136 \begin_inset Flex Code
14137 status collapsed
14138
14139 \begin_layout Plain Layout
14140 LangPreamble
14141 \end_layout
14142
14143 \end_inset
14144
14145  and 
14146 \begin_inset Flex Code
14147 status collapsed
14148
14149 \begin_layout Plain Layout
14150 BabelPreamble
14151 \end_layout
14152
14153 \end_inset
14154
14155  tags, but in practice they will typically look as they do here.
14156  The key to correct translation of the typeset text is the definition of
14157  the LaTeX command 
14158 \begin_inset Flex Code
14159 status collapsed
14160
14161 \begin_layout Plain Layout
14162
14163 \backslash
14164 claimname
14165 \end_layout
14166
14167 \end_inset
14168
14169  and its use in 
14170 \begin_inset Flex Code
14171 status collapsed
14172
14173 \begin_layout Plain Layout
14174
14175 \backslash
14176 newtheorem
14177 \end_layout
14178
14179 \end_inset
14180
14181 .
14182  
14183 \end_layout
14184
14185 \begin_layout Standard
14186 The 
14187 \begin_inset Flex Code
14188 status collapsed
14189
14190 \begin_layout Plain Layout
14191 LangPreamble
14192 \end_layout
14193
14194 \end_inset
14195
14196  tag provides for internationalization based upon the overall language of
14197  the document.
14198  The contents of the tag will be included in the preamble, just as with
14199  the 
14200 \begin_inset Flex Code
14201 status collapsed
14202
14203 \begin_layout Plain Layout
14204 Preamble
14205 \end_layout
14206
14207 \end_inset
14208
14209  tag.
14210  What makes it special is the use of the 
14211 \begin_inset Quotes eld
14212 \end_inset
14213
14214 function
14215 \begin_inset Quotes erd
14216 \end_inset
14217
14218  
14219 \begin_inset Flex Code
14220 status collapsed
14221
14222 \begin_layout Plain Layout
14223 _()
14224 \end_layout
14225
14226 \end_inset
14227
14228 , which will be replaced, when LyX produces LaTeX output, with the translation
14229  of its argument into the document language.
14230 \end_layout
14231
14232 \begin_layout Standard
14233 The 
14234 \begin_inset Flex Code
14235 status collapsed
14236
14237 \begin_layout Plain Layout
14238 BabelPreamble
14239 \end_layout
14240
14241 \end_inset
14242
14243  tag is more complex, since it is meant to provide support for multi-language
14244  documents and so offers an interface to the 
14245 \begin_inset Flex Code
14246 status collapsed
14247
14248 \begin_layout Plain Layout
14249 babel
14250 \end_layout
14251
14252 \end_inset
14253
14254  package.
14255  Its contents will be added to the preamble once for each language that
14256  appears in the document.
14257  In this case, the argument to 
14258 \begin_inset Flex Code
14259 status collapsed
14260
14261 \begin_layout Plain Layout
14262 _()
14263 \end_layout
14264
14265 \end_inset
14266
14267  will be replaced with its translation into the language in question; the
14268  expression 
14269 \begin_inset Flex Code
14270 status collapsed
14271
14272 \begin_layout Plain Layout
14273 $$lang
14274 \end_layout
14275
14276 \end_inset
14277
14278  is replaced by the language name (as used by the babel package).
14279 \end_layout
14280
14281 \begin_layout Standard
14282 A German document that also included a French section would thus have the
14283  following in the preamble:
14284 \end_layout
14285
14286 \begin_layout LyX-Code
14287
14288 \backslash
14289 addto
14290 \backslash
14291 captionsfrench{
14292 \backslash
14293 renewcommand{
14294 \backslash
14295 claimname}{Affirmation}}   
14296 \backslash
14297 addto
14298 \backslash
14299 captionsngerman{
14300 \backslash
14301 renewcommand{
14302 \backslash
14303 claimname}{Behauptung}}   
14304 \backslash
14305 providecommand{
14306 \backslash
14307 claimname}{Behauptung}
14308 \end_layout
14309
14310 \begin_layout Standard
14311 LaTeX and 
14312 \begin_inset Flex Code
14313 status collapsed
14314
14315 \begin_layout Plain Layout
14316 babel
14317 \end_layout
14318
14319 \end_inset
14320
14321  will then conspire to produce the correct text in the output.
14322 \end_layout
14323
14324 \begin_layout Standard
14325 One important point to note here is that the translations are provided by
14326  LyX itself, through the 
14327 \change_inserted -195340706 1334775793
14328 file 
14329 \begin_inset Flex Code
14330 status collapsed
14331
14332 \begin_layout Plain Layout
14333
14334 \change_inserted -195340706 1334775793
14335 layouttranslations
14336 \end_layout
14337
14338 \end_inset
14339
14340
14341 \change_deleted -195340706 1334775793
14342 same mechanism it uses for internationalization of the user interface
14343 \change_unchanged
14344 .
14345  This means, in effect, that 
14346 \begin_inset Flex Code
14347 status collapsed
14348
14349 \begin_layout Plain Layout
14350 LangPreamble
14351 \end_layout
14352
14353 \end_inset
14354
14355  and 
14356 \begin_inset Flex Code
14357 status collapsed
14358
14359 \begin_layout Plain Layout
14360 BabelPreamble
14361 \end_layout
14362
14363 \end_inset
14364
14365  are really only of use in layout files that are provided with LyX, since
14366  text entered in user-created layout files will not be seen by LyX's internation
14367 alization routines
14368 \change_inserted -195340706 1334775793
14369  unless the 
14370 \begin_inset Flex Code
14371 status collapsed
14372
14373 \begin_layout Plain Layout
14374
14375 \change_inserted -195340706 1334775793
14376 layouttranslations
14377 \end_layout
14378
14379 \end_inset
14380
14381  file is modified accordingly
14382 \change_unchanged
14383 .
14384  That said, however, any layout created with the intention that it will
14385  be included with LyX should use these tags where appropriate.
14386
14387 \change_inserted -195340706 1334775793
14388  Please note that the paragraph style translations provided by LyX will
14389  never change with a minor update (e.g.
14390  from version 2.1.x to 2.1.y).
14391  It is however quite likely that a major update (e.g.
14392  from 2.0.x to 2.1.y) will introduce new translations or corrections.
14393 \change_unchanged
14394
14395 \end_layout
14396
14397 \begin_layout Subsection
14398 Floats
14399 \begin_inset CommandInset label
14400 LatexCommand label
14401 name "sub:Floats"
14402
14403 \end_inset
14404
14405
14406 \end_layout
14407
14408 \begin_layout Standard
14409 Since version 1.3.0 of LyX, it is has been both possible and necessary to
14410  define the floats (
14411 \begin_inset Flex MenuItem
14412 status collapsed
14413
14414 \begin_layout Plain Layout
14415 figure
14416 \end_layout
14417
14418 \end_inset
14419
14420
14421 \begin_inset Flex MenuItem
14422 status collapsed
14423
14424 \begin_layout Plain Layout
14425 table
14426 \end_layout
14427
14428 \end_inset
14429
14430 , \SpecialChar \ldots{}
14431 ) in the text class itself.
14432  Standard floats are included in the file 
14433 \begin_inset Flex Code
14434 status collapsed
14435
14436 \begin_layout Plain Layout
14437 stdfloats.inc
14438 \end_layout
14439
14440 \end_inset
14441
14442 , so you may have to do no more than add
14443 \end_layout
14444
14445 \begin_layout LyX-Code
14446 Input stdfloats.inc
14447 \end_layout
14448
14449 \begin_layout Standard
14450 to your layout file.
14451  If you want to implement a text class that proposes some other float types
14452  (like the AGU class bundled with LyX), the information below will hopefully
14453  help you:
14454 \end_layout
14455
14456 \begin_layout Description
14457 \begin_inset Flex Code
14458 status collapsed
14459
14460 \begin_layout Plain Layout
14461 Extension
14462 \end_layout
14463
14464 \end_inset
14465
14466  [
14467 \begin_inset Flex Code
14468 status collapsed
14469
14470 \begin_layout Plain Layout
14471 string
14472 \end_layout
14473
14474 \end_inset
14475
14476 =
14477 \begin_inset Quotes erd
14478 \end_inset
14479
14480
14481 \begin_inset Quotes erd
14482 \end_inset
14483
14484 ] The file name extension of an auxiliary file for the list of figures (or
14485  whatever).
14486  LaTeX writes the captions to this file.
14487 \end_layout
14488
14489 \begin_layout Description
14490 \begin_inset Flex Code
14491 status collapsed
14492
14493 \begin_layout Plain Layout
14494 GuiName
14495 \end_layout
14496
14497 \end_inset
14498
14499  [
14500 \begin_inset Flex Code
14501 status collapsed
14502
14503 \begin_layout Plain Layout
14504 string
14505 \end_layout
14506
14507 \end_inset
14508
14509 =
14510 \begin_inset Quotes erd
14511 \end_inset
14512
14513
14514 \begin_inset Quotes erd
14515 \end_inset
14516
14517 ] The string that will be used in the menus and also for the caption.
14518  This is translated to the current language if babel is used.
14519 \end_layout
14520
14521 \begin_layout Description
14522 \begin_inset Flex Code
14523 status collapsed
14524
14525 \begin_layout Plain Layout
14526 HTML*
14527 \end_layout
14528
14529 \end_inset
14530
14531  These are used for XHTML output.
14532  See 
14533 \begin_inset CommandInset ref
14534 LatexCommand ref
14535 reference "sec:Tags-for-XHTML"
14536
14537 \end_inset
14538
14539 .
14540 \end_layout
14541
14542 \begin_layout Description
14543 \begin_inset Flex Code
14544 status collapsed
14545
14546 \begin_layout Plain Layout
14547 IsPredefined
14548 \end_layout
14549
14550 \end_inset
14551
14552  [
14553 \emph on
14554
14555 \begin_inset Flex Code
14556 status open
14557
14558 \begin_layout Plain Layout
14559 0
14560 \end_layout
14561
14562 \end_inset
14563
14564
14565 \emph default
14566
14567 \begin_inset Flex Code
14568 status collapsed
14569
14570 \begin_layout Plain Layout
14571 1
14572 \end_layout
14573
14574 \end_inset
14575
14576 ] Indicates whether the float is already defined in the document class or
14577  if we instead need to load 
14578 \begin_inset Flex Code
14579 status collapsed
14580
14581 \begin_layout Plain Layout
14582 float.sty
14583 \end_layout
14584
14585 \end_inset
14586
14587  and use what it provides to define it on-the-fly.
14588  The default is 
14589 \begin_inset Flex Code
14590 status collapsed
14591
14592 \begin_layout Plain Layout
14593 0
14594 \end_layout
14595
14596 \end_inset
14597
14598 , which means: use 
14599 \begin_inset Flex Code
14600 status collapsed
14601
14602 \begin_layout Plain Layout
14603 float.sty
14604 \end_layout
14605
14606 \end_inset
14607
14608 .
14609  It should be set to 
14610 \begin_inset Flex Code
14611 status collapsed
14612
14613 \begin_layout Plain Layout
14614 1
14615 \end_layout
14616
14617 \end_inset
14618
14619  if the float is already defined by the LaTeX document class.
14620 \end_layout
14621
14622 \begin_layout Description
14623 \begin_inset Flex Code
14624 status collapsed
14625
14626 \begin_layout Plain Layout
14627 ListCommand
14628 \end_layout
14629
14630 \end_inset
14631
14632  [
14633 \begin_inset Flex Code
14634 status collapsed
14635
14636 \begin_layout Plain Layout
14637 string
14638 \end_layout
14639
14640 \end_inset
14641
14642 =
14643 \begin_inset Quotes erd
14644 \end_inset
14645
14646
14647 \begin_inset Quotes erd
14648 \end_inset
14649
14650 ] The command used to generate a list of floats of this type; the leading
14651  `
14652 \backslash
14653 ' should be omitted.
14654  This 
14655 \emph on
14656 must
14657 \emph default
14658  be given if 
14659 \begin_inset Flex Code
14660 status collapsed
14661
14662 \begin_layout Plain Layout
14663 UsesFloatPkg
14664 \end_layout
14665
14666 \end_inset
14667
14668  is false, since there is no standard way to generate this command.
14669  It is ignored if 
14670 \begin_inset Flex Code
14671 status collapsed
14672
14673 \begin_layout Plain Layout
14674 UsesFloatPkg
14675 \end_layout
14676
14677 \end_inset
14678
14679  is true, since in that case there is a standard way to define the command.
14680 \end_layout
14681
14682 \begin_layout Description
14683 \begin_inset Flex Code
14684 status collapsed
14685
14686 \begin_layout Plain Layout
14687 ListName
14688 \end_layout
14689
14690 \end_inset
14691
14692  [
14693 \begin_inset Flex Code
14694 status collapsed
14695
14696 \begin_layout Plain Layout
14697 string
14698 \end_layout
14699
14700 \end_inset
14701
14702 =
14703 \begin_inset Quotes erd
14704 \end_inset
14705
14706
14707 \begin_inset Quotes erd
14708 \end_inset
14709
14710 ] A title for a list of floats of this kind (list of figures, tables, or
14711  whatever).
14712  It is used for the screen label within LyX; it is passed to LaTeX for use
14713  as the title there; and it is used as the title in XHTML output.
14714  It will be translated to the document language.
14715 \end_layout
14716
14717 \begin_layout Description
14718 \begin_inset Flex Code
14719 status collapsed
14720
14721 \begin_layout Plain Layout
14722 NumberWithin
14723 \end_layout
14724
14725 \end_inset
14726
14727  [
14728 \begin_inset Flex Code
14729 status collapsed
14730
14731 \begin_layout Plain Layout
14732 string
14733 \end_layout
14734
14735 \end_inset
14736
14737 =
14738 \begin_inset Quotes erd
14739 \end_inset
14740
14741
14742 \begin_inset Quotes erd
14743 \end_inset
14744
14745 ] This (optional) argument determines whether floats of this class will
14746  be numbered within some sectional unit of the document.
14747  For example, if within is equal to 
14748 \begin_inset Flex Code
14749 status collapsed
14750
14751 \begin_layout Plain Layout
14752 chapter
14753 \end_layout
14754
14755 \end_inset
14756
14757 , the floats will be numbered within chapters.
14758  
14759 \end_layout
14760
14761 \begin_layout Description
14762 \begin_inset Flex Code
14763 status collapsed
14764
14765 \begin_layout Plain Layout
14766 Placement
14767 \end_layout
14768
14769 \end_inset
14770
14771  [
14772 \begin_inset Flex Code
14773 status collapsed
14774
14775 \begin_layout Plain Layout
14776 string
14777 \end_layout
14778
14779 \end_inset
14780
14781 =
14782 \begin_inset Quotes erd
14783 \end_inset
14784
14785
14786 \begin_inset Quotes erd
14787 \end_inset
14788
14789 ] The default placement for the given class of floats.
14790  The string should be as in standard LaTeX: 
14791 \begin_inset Flex Code
14792 status collapsed
14793
14794 \begin_layout Plain Layout
14795 t
14796 \end_layout
14797
14798 \end_inset
14799
14800
14801 \begin_inset Flex Code
14802 status collapsed
14803
14804 \begin_layout Plain Layout
14805 b
14806 \end_layout
14807
14808 \end_inset
14809
14810
14811 \begin_inset Flex Code
14812 status collapsed
14813
14814 \begin_layout Plain Layout
14815 p
14816 \end_layout
14817
14818 \end_inset
14819
14820  and 
14821 \begin_inset Flex Code
14822 status collapsed
14823
14824 \begin_layout Plain Layout
14825 h
14826 \end_layout
14827
14828 \end_inset
14829
14830  for top, bottom, page, and here, respectively.
14831 \begin_inset Foot
14832 status collapsed
14833
14834 \begin_layout Plain Layout
14835 Note that the order of these letters in the string is irrelevant, like in
14836  LaTeX.
14837 \end_layout
14838
14839 \end_inset
14840
14841  On top of that there is a new type, 
14842 \begin_inset Flex Code
14843 status collapsed
14844
14845 \begin_layout Plain Layout
14846 H
14847 \end_layout
14848
14849 \end_inset
14850
14851 , which does not really correspond to a float, since it means: put it 
14852 \begin_inset Quotes eld
14853 \end_inset
14854
14855 here
14856 \begin_inset Quotes erd
14857 \end_inset
14858
14859  and nowhere else.
14860  Note however that the 
14861 \begin_inset Flex Code
14862 status collapsed
14863
14864 \begin_layout Plain Layout
14865 H
14866 \end_layout
14867
14868 \end_inset
14869
14870  specifier is special and, because of implementation details, cannot be
14871  used in non-built in float types.
14872  If you do not understand what this means, just use 
14873 \begin_inset Quotes eld
14874 \end_inset
14875
14876
14877 \begin_inset Flex Code
14878 status collapsed
14879
14880 \begin_layout Plain Layout
14881 tbp
14882 \end_layout
14883
14884 \end_inset
14885
14886
14887 \begin_inset Quotes erd
14888 \end_inset
14889
14890 .
14891 \end_layout
14892
14893 \begin_layout Description
14894 \begin_inset Flex Code
14895 status collapsed
14896
14897 \begin_layout Plain Layout
14898 RefPrefix
14899 \end_layout
14900
14901 \end_inset
14902
14903  [
14904 \begin_inset Flex Code
14905 status collapsed
14906
14907 \begin_layout Plain Layout
14908 string
14909 \end_layout
14910
14911 \end_inset
14912
14913 ] The prefix to use when creating labels referring to floats of this type.
14914  This allows the use of formatted references.
14915  Note that you can remove any 
14916 \begin_inset Flex Code
14917 status collapsed
14918
14919 \begin_layout Plain Layout
14920 RefPrefix
14921 \end_layout
14922
14923 \end_inset
14924
14925  set by a copied style by using the special value 
14926 \begin_inset Quotes eld
14927 \end_inset
14928
14929 OFF
14930 \begin_inset Quotes erd
14931 \end_inset
14932
14933 , which must be all caps.
14934 \end_layout
14935
14936 \begin_layout Description
14937 \begin_inset Flex Code
14938 status collapsed
14939
14940 \begin_layout Plain Layout
14941 Style
14942 \end_layout
14943
14944 \end_inset
14945
14946  [
14947 \begin_inset Flex Code
14948 status collapsed
14949
14950 \begin_layout Plain Layout
14951 string
14952 \end_layout
14953
14954 \end_inset
14955
14956 =
14957 \begin_inset Quotes erd
14958 \end_inset
14959
14960
14961 \begin_inset Quotes erd
14962 \end_inset
14963
14964 ] The style used when defining the float using 
14965 \begin_inset Flex Code
14966 status collapsed
14967
14968 \begin_layout Plain Layout
14969
14970 \backslash
14971 newfloat
14972 \end_layout
14973
14974 \end_inset
14975
14976 .
14977 \end_layout
14978
14979 \begin_layout Description
14980 \begin_inset Flex Code
14981 status collapsed
14982
14983 \begin_layout Plain Layout
14984 Type
14985 \end_layout
14986
14987 \end_inset
14988
14989  [
14990 \begin_inset Flex Code
14991 status collapsed
14992
14993 \begin_layout Plain Layout
14994 string
14995 \end_layout
14996
14997 \end_inset
14998
14999 =
15000 \begin_inset Quotes erd
15001 \end_inset
15002
15003
15004 \begin_inset Quotes erd
15005 \end_inset
15006
15007 ] The 
15008 \begin_inset Quotes eld
15009 \end_inset
15010
15011 type
15012 \begin_inset Quotes erd
15013 \end_inset
15014
15015  of the new class of floats, like program or algorithm.
15016  After the appropriate 
15017 \begin_inset Flex Code
15018 status collapsed
15019
15020 \begin_layout Plain Layout
15021
15022 \backslash
15023 newfloat
15024 \end_layout
15025
15026 \end_inset
15027
15028 , commands such as 
15029 \begin_inset Flex Code
15030 status collapsed
15031
15032 \begin_layout Plain Layout
15033
15034 \backslash
15035 begin{program}
15036 \end_layout
15037
15038 \end_inset
15039
15040  or 
15041 \begin_inset Flex Code
15042 status collapsed
15043
15044 \begin_layout Plain Layout
15045
15046 \backslash
15047 end{algorithm*}
15048 \end_layout
15049
15050 \end_inset
15051
15052  will be available.
15053 \end_layout
15054
15055 \begin_layout Description
15056 \begin_inset Flex Code
15057 status collapsed
15058
15059 \begin_layout Plain Layout
15060 UsesFloatPkg
15061 \end_layout
15062
15063 \end_inset
15064
15065  [
15066 \begin_inset Flex Code
15067 status open
15068
15069 \begin_layout Plain Layout
15070 0
15071 \end_layout
15072
15073 \end_inset
15074
15075
15076 \begin_inset Flex Code
15077 status collapsed
15078
15079 \begin_layout Plain Layout
15080
15081 \emph on
15082 1
15083 \end_layout
15084
15085 \end_inset
15086
15087 ] Tells us whether this float is defined using the facilities provided by
15088  
15089 \begin_inset Flex Code
15090 status collapsed
15091
15092 \begin_layout Plain Layout
15093 float.sty
15094 \end_layout
15095
15096 \end_inset
15097
15098 , either by the class file or a package, or on-the-fly by LyX itself.
15099 \end_layout
15100
15101 \begin_layout Standard
15102 Note that defining a float with type 
15103 \begin_inset Flex Code
15104 status collapsed
15105
15106 \begin_layout Plain Layout
15107
15108 \emph on
15109 type
15110 \end_layout
15111
15112 \end_inset
15113
15114  automatically defines the corresponding counter with name 
15115 \begin_inset Flex Code
15116 status collapsed
15117
15118 \begin_layout Plain Layout
15119
15120 \emph on
15121 type
15122 \end_layout
15123
15124 \end_inset
15125
15126 .
15127 \end_layout
15128
15129 \begin_layout Subsection
15130 Flex insets and InsetLayout
15131 \begin_inset CommandInset label
15132 LatexCommand label
15133 name "sub:Flex-insets-and"
15134
15135 \end_inset
15136
15137
15138 \end_layout
15139
15140 \begin_layout Standard
15141 LyX has supported character styles since version 1.4.0; as of version 1.6.0,
15142  these are called Flex insets.
15143  
15144 \end_layout
15145
15146 \begin_layout Standard
15147 Flex insets come in three different kinds: 
15148 \end_layout
15149
15150 \begin_layout Itemize
15151 character style (
15152 \begin_inset Flex Code
15153 status collapsed
15154
15155 \begin_layout Plain Layout
15156 CharStyle
15157 \end_layout
15158
15159 \end_inset
15160
15161 ): These define semantic markup corresponding to such LaTeX commands as
15162  
15163 \begin_inset Flex Code
15164 status collapsed
15165
15166 \begin_layout Plain Layout
15167
15168 \backslash
15169 noun
15170 \end_layout
15171
15172 \end_inset
15173
15174  and 
15175 \begin_inset Flex Code
15176 status collapsed
15177
15178 \begin_layout Plain Layout
15179
15180 \backslash
15181 code
15182 \end_layout
15183
15184 \end_inset
15185
15186 .
15187 \end_layout
15188
15189 \begin_layout Itemize
15190 user custom (
15191 \begin_inset Flex Code
15192 status collapsed
15193
15194 \begin_layout Plain Layout
15195 Custom
15196 \end_layout
15197
15198 \end_inset
15199
15200 ): These can be used to define custom collapsible insets, similar to TeX
15201  code, footnote, and the like.
15202  An obvious example is an endnote inset, which is defined in the 
15203 \begin_inset Flex Code
15204 status collapsed
15205
15206 \begin_layout Plain Layout
15207 endnote
15208 \end_layout
15209
15210 \end_inset
15211
15212  module.
15213 \end_layout
15214
15215 \begin_layout Itemize
15216 XML elements (
15217 \begin_inset Flex Code
15218 status collapsed
15219
15220 \begin_layout Plain Layout
15221 Element
15222 \end_layout
15223
15224 \end_inset
15225
15226 ): For use with DocBook classes.
15227 \end_layout
15228
15229 \begin_layout Standard
15230 Flex insets are defined using the 
15231 \begin_inset Flex Code
15232 status collapsed
15233
15234 \begin_layout Plain Layout
15235 InsetLayout
15236 \end_layout
15237
15238 \end_inset
15239
15240  tag, which shall be explained in a moment.
15241 \end_layout
15242
15243 \begin_layout Standard
15244 The 
15245 \begin_inset Flex Code
15246 status collapsed
15247
15248 \begin_layout Plain Layout
15249 InsetLayout
15250 \end_layout
15251
15252 \end_inset
15253
15254  tag also serves another function: It can be used to customize the general
15255  layout of many different types of insets.
15256  Currently, 
15257 \begin_inset Flex Code
15258 status collapsed
15259
15260 \begin_layout Plain Layout
15261 InsetLayout
15262 \end_layout
15263
15264 \end_inset
15265
15266  can be used to customize the layout parameters for footnotes, marginal
15267  notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
15268  boxes, tables, algorithms, URLs, and optional arguments, as well as to
15269  define Flex insets.
15270 \end_layout
15271
15272 \begin_layout Standard
15273 The 
15274 \begin_inset Flex Code
15275 status collapsed
15276
15277 \begin_layout Plain Layout
15278 InsetLayout
15279 \end_layout
15280
15281 \end_inset
15282
15283  definition must begin with a line of the form:
15284 \end_layout
15285
15286 \begin_layout LyX-Code
15287 InsetLayout <Type>
15288 \end_layout
15289
15290 \begin_layout Standard
15291 Here 
15292 \begin_inset Flex Code
15293 status collapsed
15294
15295 \begin_layout Plain Layout
15296 <Type>
15297 \end_layout
15298
15299 \end_inset
15300
15301  indicates the inset whose layout is being defined, and here there are 
15302 \change_inserted 5863208 1334489266
15303 three
15304 \change_deleted 5863208 1334489267
15305 two
15306 \change_unchanged
15307  cases.
15308 \end_layout
15309
15310 \begin_layout Enumerate
15311 The layout for a pre-existing inset is being modified.
15312  In this case, can be 
15313 \begin_inset Flex Code
15314 status collapsed
15315
15316 \begin_layout Plain Layout
15317 <Type>
15318 \end_layout
15319
15320 \end_inset
15321
15322  any one of the following: 
15323 \begin_inset Flex Code
15324 status collapsed
15325
15326 \begin_layout Plain Layout
15327 Algorithm
15328 \end_layout
15329
15330 \end_inset
15331
15332
15333 \begin_inset Flex Code
15334 status collapsed
15335
15336 \begin_layout Plain Layout
15337 Branch
15338 \end_layout
15339
15340 \end_inset
15341
15342
15343 \begin_inset Flex Code
15344 status collapsed
15345
15346 \begin_layout Plain Layout
15347 Box
15348 \end_layout
15349
15350 \end_inset
15351
15352
15353 \begin_inset Flex Code
15354 status collapsed
15355
15356 \begin_layout Plain Layout
15357 Box:shaded
15358 \end_layout
15359
15360 \end_inset
15361
15362
15363 \begin_inset Flex Code
15364 status collapsed
15365
15366 \begin_layout Plain Layout
15367 ERT
15368 \end_layout
15369
15370 \end_inset
15371
15372
15373 \begin_inset Flex Code
15374 status collapsed
15375
15376 \begin_layout Plain Layout
15377 Figure
15378 \end_layout
15379
15380 \end_inset
15381
15382
15383 \begin_inset Flex Code
15384 status collapsed
15385
15386 \begin_layout Plain Layout
15387 Foot
15388 \end_layout
15389
15390 \end_inset
15391
15392
15393 \begin_inset Flex Code
15394 status collapsed
15395
15396 \begin_layout Plain Layout
15397 Index
15398 \end_layout
15399
15400 \end_inset
15401
15402
15403 \begin_inset Flex Code
15404 status collapsed
15405
15406 \begin_layout Plain Layout
15407 Info
15408 \end_layout
15409
15410 \end_inset
15411
15412
15413 \begin_inset Flex Code
15414 status collapsed
15415
15416 \begin_layout Plain Layout
15417 Info:menu
15418 \end_layout
15419
15420 \end_inset
15421
15422
15423 \begin_inset Flex Code
15424 status collapsed
15425
15426 \begin_layout Plain Layout
15427 Info:shortcut
15428 \end_layout
15429
15430 \end_inset
15431
15432
15433 \begin_inset Flex Code
15434 status collapsed
15435
15436 \begin_layout Plain Layout
15437 Info:shortcuts
15438 \end_layout
15439
15440 \end_inset
15441
15442
15443 \begin_inset Flex Code
15444 status collapsed
15445
15446 \begin_layout Plain Layout
15447 Listings
15448 \end_layout
15449
15450 \end_inset
15451
15452
15453 \begin_inset Flex Code
15454 status collapsed
15455
15456 \begin_layout Plain Layout
15457 Marginal
15458 \end_layout
15459
15460 \end_inset
15461
15462
15463 \begin_inset Flex Code
15464 status collapsed
15465
15466 \begin_layout Plain Layout
15467 Note:Comment
15468 \end_layout
15469
15470 \end_inset
15471
15472
15473 \begin_inset Flex Code
15474 status collapsed
15475
15476 \begin_layout Plain Layout
15477 Note:Note
15478 \end_layout
15479
15480 \end_inset
15481
15482
15483 \begin_inset Flex Code
15484 status collapsed
15485
15486 \begin_layout Plain Layout
15487 Note:Greyedout
15488 \end_layout
15489
15490 \end_inset
15491
15492
15493 \begin_inset Flex Code
15494 status collapsed
15495
15496 \begin_layout Plain Layout
15497
15498 \change_deleted -712698321 1353866704
15499 Opt
15500 \change_unchanged
15501 Arg
15502 \change_inserted -712698321 1353866707
15503 ument
15504 \change_unchanged
15505
15506 \end_layout
15507
15508 \end_inset
15509
15510
15511 \begin_inset Flex Code
15512 status collapsed
15513
15514 \begin_layout Plain Layout
15515 Table
15516 \end_layout
15517
15518 \end_inset
15519
15520 , or 
15521 \begin_inset Flex Code
15522 status collapsed
15523
15524 \begin_layout Plain Layout
15525 URL
15526 \end_layout
15527
15528 \end_inset
15529
15530 .
15531 \end_layout
15532
15533 \begin_layout Enumerate
15534 The layout for a Flex inset is being defined.
15535  In this case, 
15536 \begin_inset Flex Code
15537 status collapsed
15538
15539 \begin_layout Plain Layout
15540 <Type>
15541 \end_layout
15542
15543 \end_inset
15544
15545  must be of the form 
15546 \begin_inset Quotes eld
15547 \end_inset
15548
15549
15550 \begin_inset Flex Code
15551 status collapsed
15552
15553 \begin_layout Plain Layout
15554 Flex:<name>
15555 \end_layout
15556
15557 \end_inset
15558
15559
15560 \begin_inset Quotes erd
15561 \end_inset
15562
15563 , where 
15564 \begin_inset Flex Code
15565 status collapsed
15566
15567 \begin_layout Plain Layout
15568 name
15569 \end_layout
15570
15571 \end_inset
15572
15573  may be be any valid identifier not used by a pre-existing Flex inset.
15574  The identifier may include spaces, but in that case the whole thing must
15575  be wrapped in quotes.
15576  Note that the definition of a flex inset 
15577 \emph on
15578 must 
15579 \emph default
15580 also include a 
15581 \begin_inset Flex Code
15582 status collapsed
15583
15584 \begin_layout Plain Layout
15585 LyXType
15586 \end_layout
15587
15588 \end_inset
15589
15590  entry, declaring which type of inset it defines.
15591 \change_inserted 5863208 1334489312
15592
15593 \end_layout
15594
15595 \begin_layout Enumerate
15596
15597 \change_inserted 5863208 1334492248
15598 The layout for user specific branch is being defined.
15599  In this case, 
15600 \begin_inset Flex Code
15601 status collapsed
15602
15603 \begin_layout Plain Layout
15604
15605 \change_inserted 5863208 1334489384
15606 <Type>
15607 \end_layout
15608
15609 \end_inset
15610
15611  must be of the form 
15612 \begin_inset Quotes eld
15613 \end_inset
15614
15615
15616 \begin_inset Flex Code
15617 status collapsed
15618
15619 \begin_layout Plain Layout
15620
15621 \change_inserted 5863208 1334489392
15622 Branch:<name>
15623 \end_layout
15624
15625 \end_inset
15626
15627
15628 \begin_inset Quotes erd
15629 \end_inset
15630
15631 , where 
15632 \begin_inset Flex Code
15633 status collapsed
15634
15635 \begin_layout Plain Layout
15636
15637 \change_inserted 5863208 1334489384
15638 name
15639 \end_layout
15640
15641 \end_inset
15642
15643  may be be any valid identifier of branch defined in user's document.
15644  The identifier may include spaces, but in that case the whole thing must
15645  be wrapped in quotes.
15646  The main purpose of this feature is to allow LaTeX wrapping around specific
15647  branches as user needs.
15648 \change_unchanged
15649
15650 \end_layout
15651
15652 \begin_layout Standard
15653 The 
15654 \begin_inset Flex Code
15655 status collapsed
15656
15657 \begin_layout Plain Layout
15658 InsetLayout
15659 \end_layout
15660
15661 \end_inset
15662
15663  definition can contain the following entries:
15664 \end_layout
15665
15666 \begin_layout Description
15667
15668 \change_inserted -712698321 1353681390
15669 \begin_inset Flex Code
15670 status collapsed
15671
15672 \begin_layout Plain Layout
15673
15674 \change_inserted -712698321 1353681344
15675 Argument
15676 \end_layout
15677
15678 \end_inset
15679
15680  [
15681 \begin_inset Flex Code
15682 status collapsed
15683
15684 \begin_layout Plain Layout
15685
15686 \change_inserted -712698321 1353681344
15687 int
15688 \end_layout
15689
15690 \end_inset
15691
15692 ] Defines argument number <int> of a command\SpecialChar \slash{}
15693 environment associated with
15694  the current layout.
15695  The definition must end with 
15696 \begin_inset Flex Code
15697 status collapsed
15698
15699 \begin_layout Plain Layout
15700
15701 \change_inserted -712698321 1353681344
15702 EndArgument
15703 \end_layout
15704
15705 \end_inset
15706
15707 .
15708  See section
15709 \begin_inset space ~
15710 \end_inset
15711
15712
15713 \begin_inset CommandInset ref
15714 LatexCommand ref
15715 reference "sub:Paragraph-Styles"
15716
15717 \end_inset
15718
15719  for details.
15720 \end_layout
15721
15722 \begin_layout Description
15723
15724 \change_inserted -195340706 1333913893
15725 \begin_inset Flex Code
15726 status collapsed
15727
15728 \begin_layout Plain Layout
15729 BabelPreamble
15730 \end_layout
15731
15732 \end_inset
15733
15734  Preamble for changing languages.
15735  See section
15736 \begin_inset space ~
15737 \end_inset
15738
15739
15740 \begin_inset CommandInset ref
15741 LatexCommand ref
15742 reference "sub:I18n"
15743
15744 \end_inset
15745
15746 .
15747 \end_layout
15748
15749 \begin_layout Description
15750 \begin_inset Flex Code
15751 status collapsed
15752
15753 \begin_layout Plain Layout
15754 BgColor
15755 \end_layout
15756
15757 \end_inset
15758
15759  The color for the inset's background.
15760  The valid colors are defined in 
15761 \begin_inset Flex Code
15762 status collapsed
15763
15764 \begin_layout Plain Layout
15765 src/ColorCode.h
15766 \end_layout
15767
15768 \end_inset
15769
15770 .
15771 \end_layout
15772
15773 \begin_layout Description
15774 \begin_inset Flex Code
15775 status collapsed
15776
15777 \begin_layout Plain Layout
15778 ContentAsLabel
15779 \end_layout
15780
15781 \end_inset
15782
15783  [
15784 \begin_inset Flex Code
15785 status collapsed
15786
15787 \begin_layout Plain Layout
15788
15789 \emph on
15790 0
15791 \end_layout
15792
15793 \end_inset
15794
15795 ,
15796 \begin_inset Flex Code
15797 status collapsed
15798
15799 \begin_layout Plain Layout
15800 1
15801 \end_layout
15802
15803 \end_inset
15804
15805 ] Whether to use the content of the inset as the label, when the inset is
15806  closed.
15807  Default is false.
15808 \end_layout
15809
15810 \begin_layout Description
15811 \begin_inset Flex Code
15812 status collapsed
15813
15814 \begin_layout Plain Layout
15815 CopyStyle
15816 \end_layout
15817
15818 \end_inset
15819
15820  
15821 \begin_inset Flex Code
15822 status collapsed
15823
15824 \begin_layout Plain Layout
15825 [string]
15826 \end_layout
15827
15828 \end_inset
15829
15830  Copies all the features of an existing style into the current one.
15831  
15832 \end_layout
15833
15834 \begin_layout Description
15835 \begin_inset Flex Code
15836 status collapsed
15837
15838 \begin_layout Plain Layout
15839 CustomPars
15840 \end_layout
15841
15842 \end_inset
15843
15844  [
15845 \begin_inset Flex Code
15846 status collapsed
15847
15848 \begin_layout Plain Layout
15849
15850 \emph on
15851 0
15852 \end_layout
15853
15854 \end_inset
15855
15856 ,
15857 \begin_inset Flex Code
15858 status collapsed
15859
15860 \begin_layout Plain Layout
15861 1
15862 \end_layout
15863
15864 \end_inset
15865
15866 ] Indicates whether the user may employ the Paragraph Settings dialog to
15867  customize the paragraph.
15868 \end_layout
15869
15870 \begin_layout Description
15871 \begin_inset Flex Code
15872 status collapsed
15873
15874 \begin_layout Plain Layout
15875 Decoration
15876 \end_layout
15877
15878 \end_inset
15879
15880  can be 
15881 \begin_inset Flex Code
15882 status collapsed
15883
15884 \begin_layout Plain Layout
15885 Classic
15886 \end_layout
15887
15888 \end_inset
15889
15890
15891 \begin_inset Flex Code
15892 status collapsed
15893
15894 \begin_layout Plain Layout
15895 Minimalistic
15896 \end_layout
15897
15898 \end_inset
15899
15900 , or 
15901 \begin_inset Flex Code
15902 status collapsed
15903
15904 \begin_layout Plain Layout
15905 Conglomerate
15906 \end_layout
15907
15908 \end_inset
15909
15910 , describing the rendering style used for the inset's frame and buttons.
15911  Footnotes generally use 
15912 \begin_inset Flex Code
15913 status collapsed
15914
15915 \begin_layout Plain Layout
15916 Classic
15917 \end_layout
15918
15919 \end_inset
15920
15921 , ERT insets generally 
15922 \begin_inset Flex Code
15923 status collapsed
15924
15925 \begin_layout Plain Layout
15926 Minimalistic
15927 \end_layout
15928
15929 \end_inset
15930
15931 , and character styles 
15932 \begin_inset Flex Code
15933 status collapsed
15934
15935 \begin_layout Plain Layout
15936 Conglomerate
15937 \end_layout
15938
15939 \end_inset
15940
15941 .
15942 \end_layout
15943
15944 \begin_layout Description
15945 \begin_inset Flex Code
15946 status collapsed
15947
15948 \begin_layout Plain Layout
15949 Display
15950 \end_layout
15951
15952 \end_inset
15953
15954  [
15955 \begin_inset Flex Code
15956 status collapsed
15957
15958 \begin_layout Plain Layout
15959 0
15960 \end_layout
15961
15962 \end_inset
15963
15964 ,
15965 \begin_inset Flex Code
15966 status collapsed
15967
15968 \begin_layout Plain Layout
15969
15970 \emph on
15971 1
15972 \end_layout
15973
15974 \end_inset
15975
15976 ] Only useful if 
15977 \begin_inset Flex Code
15978 status collapsed
15979
15980 \begin_layout Plain Layout
15981 LatexType
15982 \end_layout
15983
15984 \end_inset
15985
15986  is 
15987 \begin_inset Flex Code
15988 status collapsed
15989
15990 \begin_layout Plain Layout
15991 Environment
15992 \end_layout
15993
15994 \end_inset
15995
15996 .
15997  Indicates whether the environment will stand on its own in LaTeX output
15998  or will appear inline with the surrounding text.
15999  If set to false, it is supposed that the LaTeX environment ignores white
16000  space (including one newline character) after the 
16001 \begin_inset Flex Code
16002 status collapsed
16003
16004 \begin_layout Plain Layout
16005
16006 \backslash
16007 begin{
16008 \emph on
16009 LatexName
16010 \emph default
16011 }
16012 \end_layout
16013
16014 \end_inset
16015
16016  and 
16017 \begin_inset Flex Code
16018 status collapsed
16019
16020 \begin_layout Plain Layout
16021
16022 \backslash
16023 end{
16024 \emph on
16025 LatexName
16026 \emph default
16027 }
16028 \end_layout
16029
16030 \end_inset
16031
16032  tags.
16033  Default is true.
16034 \end_layout
16035
16036 \begin_layout Description
16037 \begin_inset Flex Code
16038 status collapsed
16039
16040 \begin_layout Plain Layout
16041 End
16042 \end_layout
16043
16044 \end_inset
16045
16046  Required at the end of the InsetLayout declarations.
16047 \end_layout
16048
16049 \begin_layout Description
16050 \begin_inset Flex Code
16051 status collapsed
16052
16053 \begin_layout Plain Layout
16054 Font
16055 \end_layout
16056
16057 \end_inset
16058
16059  The font used for both the text body 
16060 \emph on
16061 and
16062 \emph default
16063  the label.
16064  See section
16065 \begin_inset space ~
16066 \end_inset
16067
16068
16069 \begin_inset CommandInset ref
16070 LatexCommand ref
16071 reference "sub:Font-description"
16072
16073 \end_inset
16074
16075 .
16076  Note that defining this font automatically defines the 
16077 \begin_inset Flex Code
16078 status collapsed
16079
16080 \begin_layout Plain Layout
16081 LabelFont
16082 \end_layout
16083
16084 \end_inset
16085
16086  to the same value, so define this first and define 
16087 \begin_inset Flex Code
16088 status collapsed
16089
16090 \begin_layout Plain Layout
16091 LabelFont
16092 \end_layout
16093
16094 \end_inset
16095
16096  later if you want them to be different.
16097 \change_inserted 155139281 1354130923
16098
16099 \end_layout
16100
16101 \begin_layout Description
16102
16103 \change_inserted 155139281 1354130923
16104 \begin_inset Flex Code
16105 status collapsed
16106
16107 \begin_layout Plain Layout
16108
16109 \change_inserted 155139281 1354130923
16110 ForceLocalFontSwitch
16111 \end_layout
16112
16113 \end_inset
16114
16115  [
16116 \begin_inset Flex Code
16117 status collapsed
16118
16119 \begin_layout Plain Layout
16120
16121 \change_inserted 155139281 1354130923
16122
16123 \emph on
16124 0
16125 \end_layout
16126
16127 \end_inset
16128
16129 ,
16130 \begin_inset Flex Code
16131 status collapsed
16132
16133 \begin_layout Plain Layout
16134
16135 \change_inserted 155139281 1354130923
16136 1
16137 \end_layout
16138
16139 \end_inset
16140
16141 ] When using babel, always use a local font switch (
16142 \begin_inset Flex Code
16143 status collapsed
16144
16145 \begin_layout Plain Layout
16146
16147 \change_inserted 155139281 1354130923
16148
16149 \backslash
16150 foreignlanguage
16151 \end_layout
16152
16153 \end_inset
16154
16155 ), never a global one (such as 
16156 \begin_inset Flex Code
16157 status collapsed
16158
16159 \begin_layout Plain Layout
16160
16161 \change_inserted 155139281 1354130923
16162
16163 \backslash
16164 selectlanguage
16165 \end_layout
16166
16167 \end_inset
16168
16169 ).
16170 \change_unchanged
16171
16172 \end_layout
16173
16174 \begin_layout Description
16175 \begin_inset Flex Code
16176 status collapsed
16177
16178 \begin_layout Plain Layout
16179 ForceLTR
16180 \end_layout
16181
16182 \end_inset
16183
16184  Force the 
16185 \begin_inset Quotes eld
16186 \end_inset
16187
16188 latex
16189 \begin_inset Quotes erd
16190 \end_inset
16191
16192  language, leading to Left-to-Right (latin) output, e.
16193 \begin_inset space \thinspace{}
16194 \end_inset
16195
16196 g.
16197 \begin_inset space \space{}
16198 \end_inset
16199
16200 in TeX code or URL.
16201  A kludge.
16202 \end_layout
16203
16204 \begin_layout Description
16205 \begin_inset Flex Code
16206 status collapsed
16207
16208 \begin_layout Plain Layout
16209 ForcePlain
16210 \end_layout
16211
16212 \end_inset
16213
16214  [
16215 \begin_inset Flex Code
16216 status collapsed
16217
16218 \begin_layout Plain Layout
16219
16220 \emph on
16221 0
16222 \end_layout
16223
16224 \end_inset
16225
16226 ,
16227 \begin_inset Flex Code
16228 status collapsed
16229
16230 \begin_layout Plain Layout
16231 1
16232 \end_layout
16233
16234 \end_inset
16235
16236 ] Indicates whether the 
16237 \begin_inset Flex Code
16238 status collapsed
16239
16240 \begin_layout Plain Layout
16241 PlainLayout
16242 \end_layout
16243
16244 \end_inset
16245
16246  should be used or, instead, the user can change the paragraph style used
16247  in the inset.
16248  Default is false.
16249 \end_layout
16250
16251 \begin_layout Description
16252 \begin_inset Flex Code
16253 status collapsed
16254
16255 \begin_layout Plain Layout
16256 FreeSpacing
16257 \end_layout
16258
16259 \end_inset
16260
16261  [
16262 \begin_inset Flex Code
16263 status collapsed
16264
16265 \begin_layout Plain Layout
16266
16267 \emph on
16268 0
16269 \end_layout
16270
16271 \end_inset
16272
16273
16274 \begin_inset Flex Code
16275 status collapsed
16276
16277 \begin_layout Plain Layout
16278 1
16279 \end_layout
16280
16281 \end_inset
16282
16283 ] Usually LyX doesn't allow you to insert more than one space between words,
16284  since a space is considered as the separation between two words, not a
16285  character or symbol of its own.
16286  This is a very fine thing but sometimes annoying, for example, when typing
16287  program code or plain LaTeX code.
16288  For this reason, 
16289 \begin_inset Flex Code
16290 status collapsed
16291
16292 \begin_layout Plain Layout
16293 FreeSpacing
16294 \end_layout
16295
16296 \end_inset
16297
16298  can be enabled.
16299  Note that LyX will create protected blanks for the additional blanks when
16300  in another mode than LaTeX-mode.
16301  Default is false.
16302 \end_layout
16303
16304 \begin_layout Description
16305 \begin_inset Flex Code
16306 status collapsed
16307
16308 \begin_layout Plain Layout
16309 HTML*
16310 \end_layout
16311
16312 \end_inset
16313
16314  These tags control XHTML output.
16315  See section 
16316 \begin_inset CommandInset ref
16317 LatexCommand ref
16318 reference "sec:Tags-for-XHTML"
16319
16320 \end_inset
16321
16322 .
16323 \end_layout
16324
16325 \begin_layout Description
16326 \begin_inset Flex Code
16327 status collapsed
16328
16329 \begin_layout Plain Layout
16330 InToc
16331 \end_layout
16332
16333 \end_inset
16334
16335  [
16336 \begin_inset Flex Code
16337 status collapsed
16338
16339 \begin_layout Plain Layout
16340
16341 \emph on
16342 0
16343 \end_layout
16344
16345 \end_inset
16346
16347 ,
16348 \begin_inset Flex Code
16349 status collapsed
16350
16351 \begin_layout Plain Layout
16352 1
16353 \end_layout
16354
16355 \end_inset
16356
16357 ] Whether to include the contents of this inset in the strings generated
16358  for the `Outline' pane.
16359  One would not, for example, want the content of a footnote in a section
16360  header to be included in the TOC displayed in the outline, but one would
16361  normally want the content of a character style displayed.
16362  Default is false: not to include.
16363 \end_layout
16364
16365 \begin_layout Description
16366 \begin_inset Flex Code
16367 status collapsed
16368
16369 \begin_layout Plain Layout
16370 KeepEmpty
16371 \end_layout
16372
16373 \end_inset
16374
16375  [
16376 \begin_inset Flex Code
16377 status collapsed
16378
16379 \begin_layout Plain Layout
16380
16381 \emph on
16382 0
16383 \end_layout
16384
16385 \end_inset
16386
16387
16388 \begin_inset Flex Code
16389 status collapsed
16390
16391 \begin_layout Plain Layout
16392 1
16393 \end_layout
16394
16395 \end_inset
16396
16397 ] Usually LyX does not allow you to leave a paragraph empty, since it would
16398  lead to empty LaTeX output.
16399  There are some cases where this could be desirable however: in a letter
16400  template, the required fields can be provided as empty fields, so that
16401  people do not forget them; in some special classes, a style can be used
16402  as some kind of break, which does not contain actual text.
16403  Default is false.
16404 \end_layout
16405
16406 \begin_layout Description
16407 \begin_inset Flex Code
16408 status collapsed
16409
16410 \begin_layout Plain Layout
16411 LabelFont
16412 \end_layout
16413
16414 \end_inset
16415
16416  The font used for the label.
16417  See section
16418 \begin_inset space ~
16419 \end_inset
16420
16421
16422 \begin_inset CommandInset ref
16423 LatexCommand ref
16424 reference "sub:Font-description"
16425
16426 \end_inset
16427
16428 .
16429  Note that this definition can never appear before 
16430 \begin_inset Flex Code
16431 status collapsed
16432
16433 \begin_layout Plain Layout
16434 Font
16435 \end_layout
16436
16437 \end_inset
16438
16439 , lest it be ineffective.
16440 \end_layout
16441
16442 \begin_layout Description
16443 \begin_inset Flex Code
16444 status collapsed
16445
16446 \begin_layout Plain Layout
16447 LabelString
16448 \end_layout
16449
16450 \end_inset
16451
16452  What will be displayed on the button or elsewhere as the inset label.
16453  Some inset types (
16454 \begin_inset Flex Code
16455 status collapsed
16456
16457 \begin_layout Plain Layout
16458 TeX code
16459 \end_layout
16460
16461 \end_inset
16462
16463  and 
16464 \begin_inset Flex Code
16465 status collapsed
16466
16467 \begin_layout Plain Layout
16468 Branch
16469 \end_layout
16470
16471 \end_inset
16472
16473 ) modify this label on the fly.
16474 \end_layout
16475
16476 \begin_layout Description
16477
16478 \change_inserted -195340706 1333913893
16479 \begin_inset Flex Code
16480 status collapsed
16481
16482 \begin_layout Plain Layout
16483 LangPreamble
16484 \end_layout
16485
16486 \end_inset
16487
16488  Language dependent preamble.
16489  See section
16490 \begin_inset space ~
16491 \end_inset
16492
16493
16494 \begin_inset CommandInset ref
16495 LatexCommand ref
16496 reference "sub:I18n"
16497
16498 \end_inset
16499
16500 .
16501 \end_layout
16502
16503 \begin_layout Description
16504 \begin_inset Flex Code
16505 status collapsed
16506
16507 \begin_layout Plain Layout
16508 LatexName
16509 \end_layout
16510
16511 \end_inset
16512
16513  The name of the corresponding LaTeX stuff.
16514  Either the environment or command name.
16515 \end_layout
16516
16517 \begin_layout Description
16518 \begin_inset Flex Code
16519 status collapsed
16520
16521 \begin_layout Plain Layout
16522 LatexParam
16523 \end_layout
16524
16525 \end_inset
16526
16527  The optional parameter for the corresponding 
16528 \begin_inset Flex Code
16529 status collapsed
16530
16531 \begin_layout Plain Layout
16532 LatexName
16533 \end_layout
16534
16535 \end_inset
16536
16537  stuff, including possible bracket pairs like 
16538 \begin_inset Flex Code
16539 status collapsed
16540
16541 \begin_layout Plain Layout
16542 []
16543 \end_layout
16544
16545 \end_inset
16546
16547 .
16548  This parameter cannot be changed from within LyX.
16549 \end_layout
16550
16551 \begin_layout Description
16552 \begin_inset Flex Code
16553 status collapsed
16554
16555 \begin_layout Plain Layout
16556 LatexType
16557 \end_layout
16558
16559 \end_inset
16560
16561  [
16562 \begin_inset Flex Code
16563 status collapsed
16564
16565 \begin_layout Plain Layout
16566
16567 \change_deleted -712698321 1353867544
16568
16569 \emph on
16570 Paragraph
16571 \emph default
16572
16573 \change_unchanged
16574 Command, Environment, 
16575 \change_inserted -712698321 1353867573
16576 None
16577 \change_deleted -712698321 1353867557
16578 Item_Environment,
16579 \change_unchanged
16580
16581 \end_layout
16582
16583 \end_inset
16584
16585  
16586 \begin_inset Flex Code
16587 status collapsed
16588
16589 \begin_layout Plain Layout
16590
16591 \change_deleted -712698321 1353867564
16592 List_Environment
16593 \change_unchanged
16594
16595 \change_deleted -712698321 1353867569
16596 Bib_Environment
16597 \change_unchanged
16598
16599 \end_layout
16600
16601 \end_inset
16602
16603 ] How the style should be translated into LaTeX.
16604 \begin_inset Foot
16605 status collapsed
16606
16607 \begin_layout Plain Layout
16608 \begin_inset Flex Code
16609 status collapsed
16610
16611 \begin_layout Plain Layout
16612 LatexType
16613 \end_layout
16614
16615 \end_inset
16616
16617  is perhaps a bit misleading, since these rules apply to SGML classes, too.
16618  Visit the SGML class files for specific examples.
16619 \end_layout
16620
16621 \end_inset
16622
16623
16624 \end_layout
16625
16626 \begin_deeper
16627 \begin_layout Itemize
16628 \begin_inset Flex Code
16629 status collapsed
16630
16631 \begin_layout Plain Layout
16632
16633 \change_deleted -712698321 1353867582
16634 Paragraph
16635 \change_inserted -712698321 1353867583
16636 None
16637 \change_unchanged
16638
16639 \end_layout
16640
16641 \end_inset
16642
16643  means nothing special.
16644  
16645 \end_layout
16646
16647 \begin_layout Itemize
16648 \begin_inset Flex Code
16649 status collapsed
16650
16651 \begin_layout Plain Layout
16652 Command
16653 \end_layout
16654
16655 \end_inset
16656
16657  means 
16658 \begin_inset Flex Code
16659 status collapsed
16660
16661 \begin_layout Plain Layout
16662
16663 \backslash
16664
16665 \emph on
16666 LatexName
16667 \emph default
16668 {\SpecialChar \ldots{}
16669 }
16670 \end_layout
16671
16672 \end_inset
16673
16674 .
16675 \end_layout
16676
16677 \begin_layout Itemize
16678 \begin_inset Flex Code
16679 status collapsed
16680
16681 \begin_layout Plain Layout
16682 Environment
16683 \end_layout
16684
16685 \end_inset
16686
16687  means 
16688 \begin_inset Flex Code
16689 status collapsed
16690
16691 \begin_layout Plain Layout
16692
16693 \backslash
16694 begin{
16695 \emph on
16696 LatexName
16697 \emph default
16698 }\SpecialChar \ldots{}
16699
16700 \backslash
16701 end{
16702 \emph on
16703 LatexName
16704 \emph default
16705 }
16706 \end_layout
16707
16708 \end_inset
16709
16710 .
16711  
16712 \end_layout
16713
16714 \begin_layout Itemize
16715
16716 \change_deleted -712698321 1353867600
16717 \begin_inset Flex Code
16718 status collapsed
16719
16720 \begin_layout Plain Layout
16721 Item_Environment
16722 \end_layout
16723
16724 \end_inset
16725
16726  is the same as 
16727 \begin_inset Flex Code
16728 status collapsed
16729
16730 \begin_layout Plain Layout
16731 Environment
16732 \end_layout
16733
16734 \end_inset
16735
16736 , except that an 
16737 \begin_inset Flex Code
16738 status collapsed
16739
16740 \begin_layout Plain Layout
16741
16742 \backslash
16743 item
16744 \end_layout
16745
16746 \end_inset
16747
16748  is generated for each paragraph of this environment.
16749  
16750 \end_layout
16751
16752 \begin_layout Itemize
16753
16754 \change_deleted -712698321 1353867600
16755 \begin_inset Flex Code
16756 status collapsed
16757
16758 \begin_layout Plain Layout
16759 List_Environment
16760 \end_layout
16761
16762 \end_inset
16763
16764  is the same as 
16765 \begin_inset Flex Code
16766 status collapsed
16767
16768 \begin_layout Plain Layout
16769 Item_Environment
16770 \end_layout
16771
16772 \end_inset
16773
16774 , except that 
16775 \begin_inset Flex Code
16776 status collapsed
16777
16778 \begin_layout Plain Layout
16779 LabelWidthString
16780 \end_layout
16781
16782 \end_inset
16783
16784  is passed as an argument to the environment.
16785  
16786 \begin_inset Flex Code
16787 status collapsed
16788
16789 \begin_layout Plain Layout
16790 LabelWidthString
16791 \end_layout
16792
16793 \end_inset
16794
16795  can be defined in the 
16796 \begin_inset Flex MenuItem
16797 status collapsed
16798
16799 \begin_layout Plain Layout
16800
16801 \bar under
16802 Edit
16803 \bar default
16804 \SpecialChar \menuseparator
16805
16806 \bar under
16807 P
16808 \bar default
16809 aragraph
16810 \begin_inset space ~
16811 \end_inset
16812
16813 settings
16814 \end_layout
16815
16816 \end_inset
16817
16818  dialog.
16819  
16820 \change_unchanged
16821
16822 \end_layout
16823
16824 \begin_layout Standard
16825 Putting the last few things together, the LaTeX output will be either: 
16826 \end_layout
16827
16828 \begin_layout LyX-Code
16829
16830 \backslash
16831 latexname[latexparam]{\SpecialChar \ldots{}
16832 }
16833 \end_layout
16834
16835 \begin_layout Standard
16836 or: 
16837 \end_layout
16838
16839 \begin_layout LyX-Code
16840
16841 \backslash
16842 begin{latexname}[latexparam] \SpecialChar \ldots{}
16843  
16844 \backslash
16845 end{latexname}.
16846 \end_layout
16847
16848 \begin_layout Standard
16849 depending upon the LaTeX type.
16850 \end_layout
16851
16852 \end_deeper
16853 \begin_layout Description
16854
16855 \change_inserted -712698321 1354263128
16856 \begin_inset Flex Code
16857 status collapsed
16858
16859 \begin_layout Plain Layout
16860
16861 \change_inserted -712698321 1353866742
16862 LeftDelim
16863 \change_unchanged
16864
16865 \end_layout
16866
16867 \end_inset
16868
16869  [
16870 \begin_inset Flex Code
16871 status collapsed
16872
16873 \begin_layout Plain Layout
16874
16875 \change_inserted -712698321 1353866752
16876 string
16877 \end_layout
16878
16879 \end_inset
16880
16881 ] A string that is put at the beginning of the layout content.
16882  A line break in the output can be indicated by 
16883 \begin_inset Flex Code
16884 status collapsed
16885
16886 \begin_layout Plain Layout
16887
16888 \change_inserted -712698321 1354263128
16889 <br/>
16890 \end_layout
16891
16892 \end_inset
16893
16894 .
16895 \change_unchanged
16896
16897 \end_layout
16898
16899 \begin_layout Description
16900 \begin_inset Flex Code
16901 status collapsed
16902
16903 \begin_layout Plain Layout
16904 LyxType
16905 \end_layout
16906
16907 \end_inset
16908
16909  Can be 
16910 \begin_inset Flex Code
16911 status collapsed
16912
16913 \begin_layout Plain Layout
16914 charstyle
16915 \end_layout
16916
16917 \end_inset
16918
16919
16920 \begin_inset Flex Code
16921 status collapsed
16922
16923 \begin_layout Plain Layout
16924 custom
16925 \end_layout
16926
16927 \end_inset
16928
16929
16930 \begin_inset Flex Code
16931 status collapsed
16932
16933 \begin_layout Plain Layout
16934 element
16935 \end_layout
16936
16937 \end_inset
16938
16939 , or 
16940 \begin_inset Flex Code
16941 status collapsed
16942
16943 \begin_layout Plain Layout
16944 end
16945 \end_layout
16946
16947 \end_inset
16948
16949  (indicating a dummy definition ending definitions of charstyles, etc).
16950  This entry is required in and is only meaningful for Flex insets.
16951  Among other things, it determines on which menu this inset will appear.
16952  Setting 
16953 \begin_inset Flex Code
16954 status collapsed
16955
16956 \begin_layout Plain Layout
16957 LyXType
16958 \end_layout
16959
16960 \end_inset
16961
16962  to 
16963 \begin_inset Flex Code
16964 status collapsed
16965
16966 \begin_layout Plain Layout
16967 charstyle
16968 \end_layout
16969
16970 \end_inset
16971
16972  will set 
16973 \begin_inset Flex Code
16974 status collapsed
16975
16976 \begin_layout Plain Layout
16977 MultiPar
16978 \end_layout
16979
16980 \end_inset
16981
16982  to false.
16983  
16984 \begin_inset Flex Code
16985 status collapsed
16986
16987 \begin_layout Plain Layout
16988 MultiPar
16989 \end_layout
16990
16991 \end_inset
16992
16993  can be set to true for charstyle insets, if you wish, by setting it 
16994 \emph on
16995 after
16996 \emph default
16997  you set the 
16998 \begin_inset Flex Code
16999 status collapsed
17000
17001 \begin_layout Plain Layout
17002 LyXType
17003 \end_layout
17004
17005 \end_inset
17006
17007 .
17008 \end_layout
17009
17010 \begin_layout Description
17011 \begin_inset Flex Code
17012 status collapsed
17013
17014 \begin_layout Plain Layout
17015 MultiPar
17016 \end_layout
17017
17018 \end_inset
17019
17020  [
17021 \begin_inset Flex Code
17022 status collapsed
17023
17024 \begin_layout Plain Layout
17025
17026 \emph on
17027 0
17028 \end_layout
17029
17030 \end_inset
17031
17032 ,
17033 \begin_inset Flex Code
17034 status collapsed
17035
17036 \begin_layout Plain Layout
17037 1
17038 \end_layout
17039
17040 \end_inset
17041
17042 ] Whether multiple paragraphs are permitted in this inset.
17043  This will also set 
17044 \begin_inset Flex Code
17045 status collapsed
17046
17047 \begin_layout Plain Layout
17048 CustomPars
17049 \end_layout
17050
17051 \end_inset
17052
17053  to the same value and 
17054 \begin_inset Flex Code
17055 status collapsed
17056
17057 \begin_layout Plain Layout
17058 ForcePlain
17059 \end_layout
17060
17061 \end_inset
17062
17063  to the opposite value.
17064  These can be reset to other values, if they are used 
17065 \emph on
17066 after
17067 \emph default
17068  
17069 \begin_inset Flex Code
17070 status collapsed
17071
17072 \begin_layout Plain Layout
17073 MultiPar
17074 \end_layout
17075
17076 \end_inset
17077
17078 .
17079  Default is true.
17080 \end_layout
17081
17082 \begin_layout Description
17083 \begin_inset Flex Code
17084 status collapsed
17085
17086 \begin_layout Plain Layout
17087 NeedProtect
17088 \end_layout
17089
17090 \end_inset
17091
17092  [
17093 \begin_inset Flex Code
17094 status collapsed
17095
17096 \begin_layout Plain Layout
17097
17098 \emph on
17099 0
17100 \end_layout
17101
17102 \end_inset
17103
17104 ,
17105 \begin_inset Flex Code
17106 status collapsed
17107
17108 \begin_layout Plain Layout
17109 1
17110 \end_layout
17111
17112 \end_inset
17113
17114 ] Whether fragile commands in this inset should be 
17115 \begin_inset Flex Code
17116 status collapsed
17117
17118 \begin_layout Plain Layout
17119
17120 \backslash
17121 protect
17122 \end_layout
17123
17124 \end_inset
17125
17126 'ed.
17127  (Note: This is 
17128 \emph on
17129 not
17130 \emph default
17131  whether the command should itself be protected.) Default is false.
17132 \end_layout
17133
17134 \begin_layout Description
17135 \begin_inset Flex Code
17136 status collapsed
17137
17138 \begin_layout Plain Layout
17139 ParbreakIsNewline
17140 \end_layout
17141
17142 \end_inset
17143
17144  [
17145 \begin_inset Flex Code
17146 status collapsed
17147
17148 \begin_layout Plain Layout
17149
17150 \emph on
17151 0
17152 \end_layout
17153
17154 \end_inset
17155
17156
17157 \begin_inset Flex Code
17158 status collapsed
17159
17160 \begin_layout Plain Layout
17161 1
17162 \end_layout
17163
17164 \end_inset
17165
17166 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
17167  output, but only by a line break; together with 
17168 \begin_inset Flex Code
17169 status collapsed
17170
17171 \begin_layout Plain Layout
17172 PassThru 1
17173 \end_layout
17174
17175 \end_inset
17176
17177 , this allows to emulate a plain text editor (like the ERT inset).
17178  Default is false.
17179 \end_layout
17180
17181 \begin_layout Description
17182 \begin_inset Flex Code
17183 status collapsed
17184
17185 \begin_layout Plain Layout
17186 PassThru
17187 \end_layout
17188
17189 \end_inset
17190
17191  [
17192 \begin_inset Flex Code
17193 status collapsed
17194
17195 \begin_layout Plain Layout
17196
17197 \emph on
17198 0
17199 \end_layout
17200
17201 \end_inset
17202
17203
17204 \begin_inset Flex Code
17205 status collapsed
17206
17207 \begin_layout Plain Layout
17208 1
17209 \end_layout
17210
17211 \end_inset
17212
17213 ] Whether the contents of this paragraph should be output in raw form, meaning
17214  without special translations that LaTeX would require.
17215 \end_layout
17216
17217 \begin_layout Description
17218 \begin_inset Flex Code
17219 status collapsed
17220
17221 \begin_layout Plain Layout
17222 Preamble
17223 \end_layout
17224
17225 \end_inset
17226
17227  Information to be included in the LaTeX preamble when this style is used.
17228  Used to define macros, load packages, etc., required by this particular
17229  style.
17230  Must end with 
17231 \begin_inset Quotes eld
17232 \end_inset
17233
17234
17235 \begin_inset Flex Code
17236 status collapsed
17237
17238 \begin_layout Plain Layout
17239 EndPreamble
17240 \end_layout
17241
17242 \end_inset
17243
17244
17245 \begin_inset Quotes erd
17246 \end_inset
17247
17248 .
17249 \end_layout
17250
17251 \begin_layout Description
17252 \begin_inset Flex Code
17253 status collapsed
17254
17255 \begin_layout Plain Layout
17256 RefPrefix
17257 \end_layout
17258
17259 \end_inset
17260
17261  [
17262 \begin_inset Flex Code
17263 status collapsed
17264
17265 \begin_layout Plain Layout
17266 string
17267 \end_layout
17268
17269 \end_inset
17270
17271 ] The prefix to use when creating labels referring to insets of this type.
17272  This allows the use of formatted references.
17273 \end_layout
17274
17275 \begin_layout Description
17276 \begin_inset Flex Code
17277 status collapsed
17278
17279 \begin_layout Plain Layout
17280 Requires
17281 \end_layout
17282
17283 \end_inset
17284
17285  [
17286 \begin_inset Flex Code
17287 status collapsed
17288
17289 \begin_layout Plain Layout
17290 string
17291 \end_layout
17292
17293 \end_inset
17294
17295 ] Whether the style requires the feature 
17296 \begin_inset Flex Code
17297 status collapsed
17298
17299 \begin_layout Plain Layout
17300 string
17301 \end_layout
17302
17303 \end_inset
17304
17305 .
17306  See the description of 
17307 \begin_inset Flex Code
17308 status collapsed
17309
17310 \begin_layout Plain Layout
17311 Provides
17312 \end_layout
17313
17314 \end_inset
17315
17316  above (page 
17317 \begin_inset CommandInset ref
17318 LatexCommand pageref
17319 reference "des:FreeSpacing"
17320
17321 \end_inset
17322
17323 ) for information on `features'.
17324 \change_inserted -712698321 1354439699
17325
17326 \end_layout
17327
17328 \begin_layout Description
17329
17330 \change_inserted -712698321 1354439705
17331 \begin_inset Flex Code
17332 status collapsed
17333
17334 \begin_layout Plain Layout
17335
17336 \change_inserted -712698321 1354439699
17337 ResetArgs
17338 \end_layout
17339
17340 \end_inset
17341
17342  [
17343 \begin_inset Flex Code
17344 status collapsed
17345
17346 \begin_layout Plain Layout
17347
17348 \change_inserted -712698321 1354439699
17349
17350 \emph on
17351 0
17352 \end_layout
17353
17354 \end_inset
17355
17356 ,
17357 \begin_inset Flex Code
17358 status collapsed
17359
17360 \begin_layout Plain Layout
17361
17362 \change_inserted -712698321 1354439699
17363 1
17364 \end_layout
17365
17366 \end_inset
17367
17368 ] Resets the LaTeX arguments of this layout (as defined via the 
17369 \begin_inset Flex Code
17370 status collapsed
17371
17372 \begin_layout Plain Layout
17373
17374 \change_inserted -712698321 1354439699
17375 Argument
17376 \end_layout
17377
17378 \end_inset
17379
17380  tag).
17381  This is useful if you have copied a style via 
17382 \begin_inset Flex Code
17383 status collapsed
17384
17385 \begin_layout Plain Layout
17386
17387 \change_inserted -712698321 1354439699
17388 CopyStyle
17389 \end_layout
17390
17391 \end_inset
17392
17393 , but you do not want to inherit its (required and optional) arguments.
17394
17395 \change_deleted -712698321 1354439698
17396  
17397 \change_unchanged
17398
17399 \end_layout
17400
17401 \begin_layout Description
17402 \begin_inset Flex Code
17403 status collapsed
17404
17405 \begin_layout Plain Layout
17406 ResetsFont
17407 \end_layout
17408
17409 \end_inset
17410
17411  [
17412 \begin_inset Flex Code
17413 status collapsed
17414
17415 \begin_layout Plain Layout
17416 0
17417 \end_layout
17418
17419 \end_inset
17420
17421 ,
17422 \begin_inset Flex Code
17423 status collapsed
17424
17425 \begin_layout Plain Layout
17426
17427 \emph on
17428 1
17429 \end_layout
17430
17431 \end_inset
17432
17433 ] Whether this inset should use the font of its surrounding environment
17434  or uses its own.
17435  Default is true: uses its own.
17436 \change_inserted -712698321 1353866806
17437
17438 \end_layout
17439
17440 \begin_layout Description
17441
17442 \change_inserted -712698321 1354263134
17443 \begin_inset Flex Code
17444 status collapsed
17445
17446 \begin_layout Plain Layout
17447
17448 \change_inserted -712698321 1353866810
17449 RightDelim
17450 \end_layout
17451
17452 \end_inset
17453
17454  [
17455 \begin_inset Flex Code
17456 status collapsed
17457
17458 \begin_layout Plain Layout
17459
17460 \change_inserted -712698321 1353866806
17461 string
17462 \end_layout
17463
17464 \end_inset
17465
17466 ] A string that is put at the end of the layout content.
17467  A line break in the output can be indicated by 
17468 \begin_inset Flex Code
17469 status collapsed
17470
17471 \begin_layout Plain Layout
17472
17473 \change_inserted -712698321 1354263134
17474 <br/>
17475 \end_layout
17476
17477 \end_inset
17478
17479 .
17480 \change_unchanged
17481
17482 \end_layout
17483
17484 \begin_layout Description
17485 \begin_inset Flex Code
17486 status collapsed
17487
17488 \begin_layout Plain Layout
17489 Spellcheck
17490 \end_layout
17491
17492 \end_inset
17493
17494  [
17495 \begin_inset Flex Code
17496 status collapsed
17497
17498 \begin_layout Plain Layout
17499 0
17500 \end_layout
17501
17502 \end_inset
17503
17504 ,
17505 \begin_inset Flex Code
17506 status collapsed
17507
17508 \begin_layout Plain Layout
17509
17510 \emph on
17511 1
17512 \end_layout
17513
17514 \end_inset
17515
17516 ] Spellcheck the contents of this inset.
17517  Default is true.
17518 \end_layout
17519
17520 \begin_layout Subsection
17521 Counters
17522 \begin_inset CommandInset label
17523 LatexCommand label
17524 name "sub:Counters"
17525
17526 \end_inset
17527
17528
17529 \end_layout
17530
17531 \begin_layout Standard
17532 Since version 1.3.0 of LyX, it is both possible and necessary to define the
17533  counters (
17534 \begin_inset Flex MenuItem
17535 status collapsed
17536
17537 \begin_layout Plain Layout
17538 chapter
17539 \end_layout
17540
17541 \end_inset
17542
17543
17544 \begin_inset Flex MenuItem
17545 status collapsed
17546
17547 \begin_layout Plain Layout
17548 figure
17549 \end_layout
17550
17551 \end_inset
17552
17553 , \SpecialChar \ldots{}
17554 ) in the text class itself.
17555  The standard counters are defined in the file 
17556 \begin_inset Flex Code
17557 status collapsed
17558
17559 \begin_layout Plain Layout
17560 stdcounters.inc
17561 \end_layout
17562
17563 \end_inset
17564
17565 , so you may have to do no more than add
17566 \end_layout
17567
17568 \begin_layout LyX-Code
17569 Input stdcounters.inc
17570 \end_layout
17571
17572 \begin_layout Standard
17573 to your layout file to get them to work.
17574  But if you want to define custom counters, then you can do so.
17575  The counter declaration must begin with:
17576 \end_layout
17577
17578 \begin_layout LyX-Code
17579 Counter CounterName
17580 \end_layout
17581
17582 \begin_layout Standard
17583 where of course `
17584 \begin_inset Flex Code
17585 status collapsed
17586
17587 \begin_layout Plain Layout
17588 CounterName
17589 \end_layout
17590
17591 \end_inset
17592
17593 ' is replaced by the name of the counter.
17594  And it must end with 
17595 \begin_inset Quotes eld
17596 \end_inset
17597
17598
17599 \begin_inset Flex Code
17600 status collapsed
17601
17602 \begin_layout Plain Layout
17603 End
17604 \end_layout
17605
17606 \end_inset
17607
17608
17609 \begin_inset Quotes erd
17610 \end_inset
17611
17612 .
17613  The following parameters can also be used:
17614 \end_layout
17615
17616 \begin_layout Description
17617 \begin_inset Flex Code
17618 status collapsed
17619
17620 \begin_layout Plain Layout
17621 LabelString
17622 \end_layout
17623
17624 \end_inset
17625
17626  [
17627 \begin_inset Flex Code
17628 status collapsed
17629
17630 \begin_layout Plain Layout
17631 string
17632 \end_layout
17633
17634 \end_inset
17635
17636 =
17637 \begin_inset Quotes erd
17638 \end_inset
17639
17640
17641 \begin_inset Quotes erd
17642 \end_inset
17643
17644 ] When defined, this string defines how the counter is displayed.
17645  Setting this value sets 
17646 \begin_inset Flex Code
17647 status collapsed
17648
17649 \begin_layout Plain Layout
17650 LabelStringAppendix
17651 \end_layout
17652
17653 \end_inset
17654
17655  to the same value.
17656  The following special constructs can be used in the string:
17657 \end_layout
17658
17659 \begin_deeper
17660 \begin_layout Itemize
17661 \begin_inset Flex Code
17662 status collapsed
17663
17664 \begin_layout Plain Layout
17665
17666 \backslash
17667 thecounter
17668 \end_layout
17669
17670 \end_inset
17671
17672  will be replaced by the expansion of the 
17673 \begin_inset Flex Code
17674 status collapsed
17675
17676 \begin_layout Plain Layout
17677 LabelString
17678 \end_layout
17679
17680 \end_inset
17681
17682  (or 
17683 \begin_inset Flex Code
17684 status collapsed
17685
17686 \begin_layout Plain Layout
17687 LabelStringAppendix
17688 \end_layout
17689
17690 \end_inset
17691
17692 ) of the counter 
17693 \begin_inset Flex Code
17694 status collapsed
17695
17696 \begin_layout Plain Layout
17697 counter
17698 \end_layout
17699
17700 \end_inset
17701
17702 .
17703  
17704 \end_layout
17705
17706 \begin_layout Itemize
17707 counter values can be expressed using LaTeX-like macros 
17708 \begin_inset Flex Code
17709 status collapsed
17710
17711 \begin_layout Plain Layout
17712
17713 \backslash
17714
17715 \emph on
17716 numbertype
17717 \emph default
17718 {
17719 \emph on
17720 counter
17721 \emph default
17722 }
17723 \end_layout
17724
17725 \end_inset
17726
17727 , where 
17728 \begin_inset Flex Code
17729 status collapsed
17730
17731 \begin_layout Plain Layout
17732
17733 \emph on
17734 numbertype
17735 \end_layout
17736
17737 \end_inset
17738
17739  can be:
17740 \begin_inset Foot
17741 status collapsed
17742
17743 \begin_layout Plain Layout
17744
17745 \family roman
17746 \series medium
17747 \shape up
17748 \size normal
17749 \emph off
17750 \bar no
17751 \noun off
17752 \color none
17753 Actually, the situation is a bit more complicated: any
17754 \family default
17755 \series default
17756 \shape default
17757 \emph default
17758 \bar default
17759  
17760 \size default
17761 \emph on
17762 \noun default
17763 \color inherit
17764 numbertype
17765 \family roman
17766 \series medium
17767 \shape up
17768 \size normal
17769 \emph off
17770 \bar no
17771 \noun off
17772  other than those described below will produce arabic numerals.
17773  It would not be surprising to see this change in the future.
17774 \end_layout
17775
17776 \end_inset
17777
17778  
17779 \begin_inset Flex Code
17780 status collapsed
17781
17782 \begin_layout Plain Layout
17783 arabic
17784 \end_layout
17785
17786 \end_inset
17787
17788 : 1, 2, 3,\SpecialChar \ldots{}
17789
17790 \begin_inset Flex Code
17791 status collapsed
17792
17793 \begin_layout Plain Layout
17794 alph
17795 \end_layout
17796
17797 \end_inset
17798
17799  for lower-case letters: a, b, c, \SpecialChar \ldots{}
17800
17801 \begin_inset Flex Code
17802 status collapsed
17803
17804 \begin_layout Plain Layout
17805 Alph
17806 \end_layout
17807
17808 \end_inset
17809
17810  for upper-case letters: A, B, C, \SpecialChar \ldots{}
17811
17812 \begin_inset Flex Code
17813 status collapsed
17814
17815 \begin_layout Plain Layout
17816 roman
17817 \end_layout
17818
17819 \end_inset
17820
17821  for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
17822
17823 \begin_inset Flex Code
17824 status collapsed
17825
17826 \begin_layout Plain Layout
17827 Roman
17828 \end_layout
17829
17830 \end_inset
17831
17832  for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
17833
17834 \begin_inset Flex Code
17835 status collapsed
17836
17837 \begin_layout Plain Layout
17838 hebrew
17839 \end_layout
17840
17841 \end_inset
17842
17843  for hebrew numerals.
17844 \end_layout
17845
17846 \end_deeper
17847 \begin_layout Standard
17848 If LabelString is not defined, a default value is constructed as follows:
17849  if the counter has a master counter 
17850 \begin_inset Flex Code
17851 status collapsed
17852
17853 \begin_layout Plain Layout
17854 master
17855 \end_layout
17856
17857 \end_inset
17858
17859  (defined via 
17860 \begin_inset Flex Code
17861 status collapsed
17862
17863 \begin_layout Plain Layout
17864 Within
17865 \end_layout
17866
17867 \end_inset
17868
17869 ), the string 
17870 \begin_inset Flex Code
17871 status collapsed
17872
17873 \begin_layout Plain Layout
17874
17875 \backslash
17876 themaster.
17877 \backslash
17878 arabic{counter}
17879 \end_layout
17880
17881 \end_inset
17882
17883  is used; otherwise the string 
17884 \begin_inset Flex Code
17885 status collapsed
17886
17887 \begin_layout Plain Layout
17888
17889 \backslash
17890 arabic{counter}
17891 \end_layout
17892
17893 \end_inset
17894
17895  is used.
17896 \end_layout
17897
17898 \begin_layout Description
17899 \begin_inset Flex Code
17900 status collapsed
17901
17902 \begin_layout Plain Layout
17903 LabelStringAppendix
17904 \end_layout
17905
17906 \end_inset
17907
17908  [
17909 \begin_inset Flex Code
17910 status collapsed
17911
17912 \begin_layout Plain Layout
17913 string
17914 \end_layout
17915
17916 \end_inset
17917
17918 =
17919 \begin_inset Quotes erd
17920 \end_inset
17921
17922
17923 \begin_inset Quotes erd
17924 \end_inset
17925
17926 ] Same as 
17927 \begin_inset Flex Code
17928 status collapsed
17929
17930 \begin_layout Plain Layout
17931 LabelString
17932 \end_layout
17933
17934 \end_inset
17935
17936 , but for use in the Appendix.
17937 \end_layout
17938
17939 \begin_layout Description
17940 \begin_inset Flex Code
17941 status collapsed
17942
17943 \begin_layout Plain Layout
17944 PrettyFormat
17945 \end_layout
17946
17947 \end_inset
17948
17949  [
17950 \begin_inset Flex Code
17951 status collapsed
17952
17953 \begin_layout Plain Layout
17954 string
17955 \end_layout
17956
17957 \end_inset
17958
17959 =
17960 \begin_inset Quotes erd
17961 \end_inset
17962
17963
17964 \begin_inset Quotes erd
17965 \end_inset
17966
17967 ] A format for use with formatted references to this counter.
17968  For example, one might want to have references to section numbers appear
17969  as 
17970 \begin_inset Quotes eld
17971 \end_inset
17972
17973 Section 2.4
17974 \begin_inset Quotes erd
17975 \end_inset
17976
17977 .
17978  The string should contain 
17979 \begin_inset Quotes eld
17980 \end_inset
17981
17982 ##
17983 \begin_inset Quotes erd
17984 \end_inset
17985
17986 .
17987  This will be replaced by the counter number itself.
17988  So, for sections, it would be: Section ##.
17989 \end_layout
17990
17991 \begin_layout Description
17992 \begin_inset Flex Code
17993 status collapsed
17994
17995 \begin_layout Plain Layout
17996 Within
17997 \end_layout
17998
17999 \end_inset
18000
18001  [
18002 \begin_inset Flex Code
18003 status collapsed
18004
18005 \begin_layout Plain Layout
18006 string
18007 \end_layout
18008
18009 \end_inset
18010
18011 =
18012 \begin_inset Quotes erd
18013 \end_inset
18014
18015
18016 \begin_inset Quotes erd
18017 \end_inset
18018
18019 ] If this is set to the name of another counter, the present counter will
18020  be reset every time the other one is increased.
18021  For example, 
18022 \begin_inset Flex Code
18023 status collapsed
18024
18025 \begin_layout Plain Layout
18026 subsection
18027 \end_layout
18028
18029 \end_inset
18030
18031  is numbered inside 
18032 \begin_inset Flex Code
18033 status collapsed
18034
18035 \begin_layout Plain Layout
18036 section
18037 \end_layout
18038
18039 \end_inset
18040
18041 .
18042 \end_layout
18043
18044 \begin_layout Subsection
18045 Font description
18046 \begin_inset CommandInset label
18047 LatexCommand label
18048 name "sub:Font-description"
18049
18050 \end_inset
18051
18052
18053 \end_layout
18054
18055 \begin_layout Standard
18056 A font description looks like this:
18057 \end_layout
18058
18059 \begin_layout LyX-Code
18060 Font 
18061 \family roman
18062 \emph on
18063 or
18064 \family default
18065 \emph default
18066  LabelFont
18067 \end_layout
18068
18069 \begin_layout LyX-Code
18070  ...
18071 \end_layout
18072
18073 \begin_layout LyX-Code
18074 EndFont
18075 \end_layout
18076
18077 \begin_layout Standard
18078 The following commands are available:
18079 \end_layout
18080
18081 \begin_layout Description
18082 \begin_inset Flex Code
18083 status collapsed
18084
18085 \begin_layout Plain Layout
18086 Color
18087 \end_layout
18088
18089 \end_inset
18090
18091  [
18092 \begin_inset Flex Code
18093 status collapsed
18094
18095 \begin_layout Plain Layout
18096
18097 \emph on
18098 none
18099 \end_layout
18100
18101 \end_inset
18102
18103
18104 \begin_inset Flex Code
18105 status collapsed
18106
18107 \begin_layout Plain Layout
18108 black
18109 \end_layout
18110
18111 \end_inset
18112
18113
18114 \begin_inset Flex Code
18115 status collapsed
18116
18117 \begin_layout Plain Layout
18118 white
18119 \end_layout
18120
18121 \end_inset
18122
18123
18124 \begin_inset Flex Code
18125 status collapsed
18126
18127 \begin_layout Plain Layout
18128 red
18129 \end_layout
18130
18131 \end_inset
18132
18133
18134 \begin_inset Flex Code
18135 status collapsed
18136
18137 \begin_layout Plain Layout
18138 green
18139 \end_layout
18140
18141 \end_inset
18142
18143
18144 \begin_inset Flex Code
18145 status collapsed
18146
18147 \begin_layout Plain Layout
18148 blue
18149 \end_layout
18150
18151 \end_inset
18152
18153
18154 \begin_inset Flex Code
18155 status collapsed
18156
18157 \begin_layout Plain Layout
18158 cyan
18159 \end_layout
18160
18161 \end_inset
18162
18163
18164 \begin_inset Flex Code
18165 status collapsed
18166
18167 \begin_layout Plain Layout
18168 magenta
18169 \end_layout
18170
18171 \end_inset
18172
18173
18174 \begin_inset Flex Code
18175 status collapsed
18176
18177 \begin_layout Plain Layout
18178 yellow
18179 \end_layout
18180
18181 \end_inset
18182
18183 ]
18184 \end_layout
18185
18186 \begin_layout Description
18187 \begin_inset Flex Code
18188 status collapsed
18189
18190 \begin_layout Plain Layout
18191 Family
18192 \end_layout
18193
18194 \end_inset
18195
18196  [
18197 \begin_inset Flex Code
18198 status collapsed
18199
18200 \begin_layout Plain Layout
18201
18202 \emph on
18203 Roman
18204 \end_layout
18205
18206 \end_inset
18207
18208
18209 \begin_inset Flex Code
18210 status collapsed
18211
18212 \begin_layout Plain Layout
18213 Sans
18214 \end_layout
18215
18216 \end_inset
18217
18218
18219 \begin_inset Flex Code
18220 status collapsed
18221
18222 \begin_layout Plain Layout
18223 Typewriter
18224 \end_layout
18225
18226 \end_inset
18227
18228 ]
18229 \end_layout
18230
18231 \begin_layout Description
18232 \begin_inset Flex Code
18233 status collapsed
18234
18235 \begin_layout Plain Layout
18236 Misc
18237 \end_layout
18238
18239 \end_inset
18240
18241  [
18242 \begin_inset Flex Code
18243 status collapsed
18244
18245 \begin_layout Plain Layout
18246 string
18247 \end_layout
18248
18249 \end_inset
18250
18251 ] Valid arguments are: 
18252 \begin_inset Flex Code
18253 status collapsed
18254
18255 \begin_layout Plain Layout
18256 emph
18257 \end_layout
18258
18259 \end_inset
18260
18261
18262 \begin_inset Flex Code
18263 status collapsed
18264
18265 \begin_layout Plain Layout
18266 noun
18267 \end_layout
18268
18269 \end_inset
18270
18271
18272 \begin_inset Flex Code
18273 status collapsed
18274
18275 \begin_layout Plain Layout
18276 strikeout
18277 \end_layout
18278
18279 \end_inset
18280
18281
18282 \begin_inset Flex Code
18283 status collapsed
18284
18285 \begin_layout Plain Layout
18286 underbar
18287 \end_layout
18288
18289 \end_inset
18290
18291
18292 \begin_inset Flex Code
18293 status collapsed
18294
18295 \begin_layout Plain Layout
18296 uuline
18297 \end_layout
18298
18299 \end_inset
18300
18301
18302 \begin_inset Flex Code
18303 status collapsed
18304
18305 \begin_layout Plain Layout
18306 uwave
18307 \end_layout
18308
18309 \end_inset
18310
18311
18312 \begin_inset Flex Code
18313 status collapsed
18314
18315 \begin_layout Plain Layout
18316 no_emph
18317 \end_layout
18318
18319 \end_inset
18320
18321
18322 \begin_inset Flex Code
18323 status collapsed
18324
18325 \begin_layout Plain Layout
18326 no_noun
18327 \end_layout
18328
18329 \end_inset
18330
18331
18332 \begin_inset Flex Code
18333 status collapsed
18334
18335 \begin_layout Plain Layout
18336 no_strikeout
18337 \end_layout
18338
18339 \end_inset
18340
18341
18342 \begin_inset Flex Code
18343 status collapsed
18344
18345 \begin_layout Plain Layout
18346 no_bar
18347 \end_layout
18348
18349 \end_inset
18350
18351
18352 \begin_inset Flex Code
18353 status collapsed
18354
18355 \begin_layout Plain Layout
18356 no_uuline
18357 \end_layout
18358
18359 \end_inset
18360
18361  and 
18362 \begin_inset Flex Code
18363 status collapsed
18364
18365 \begin_layout Plain Layout
18366 no_uwave
18367 \end_layout
18368
18369 \end_inset
18370
18371 .
18372  Each of these turns on or off the corresponding attribute.
18373  For example, 
18374 \begin_inset Flex Code
18375 status collapsed
18376
18377 \begin_layout Plain Layout
18378 emph
18379 \end_layout
18380
18381 \end_inset
18382
18383  turns on emphasis, and 
18384 \begin_inset Flex Code
18385 status collapsed
18386
18387 \begin_layout Plain Layout
18388 no_emph
18389 \end_layout
18390
18391 \end_inset
18392
18393  turns it off.
18394  
18395 \begin_inset Newline newline
18396 \end_inset
18397
18398 If the latter seems puzzling, remember that the font settings for the present
18399  context are generally inherited from the surrounding context.
18400  So 
18401 \begin_inset Flex Code
18402 status collapsed
18403
18404 \begin_layout Plain Layout
18405 no_emph
18406 \end_layout
18407
18408 \end_inset
18409
18410  would turn off the emphasis that was anyway in effect, say, in a theorem
18411  environment.
18412 \end_layout
18413
18414 \begin_layout Description
18415 \begin_inset Flex Code
18416 status collapsed
18417
18418 \begin_layout Plain Layout
18419 Series
18420 \end_layout
18421
18422 \end_inset
18423
18424  [
18425 \begin_inset Flex Code
18426 status collapsed
18427
18428 \begin_layout Plain Layout
18429
18430 \emph on
18431 Medium
18432 \end_layout
18433
18434 \end_inset
18435
18436
18437 \begin_inset Flex Code
18438 status collapsed
18439
18440 \begin_layout Plain Layout
18441 Bold
18442 \end_layout
18443
18444 \end_inset
18445
18446
18447 \end_layout
18448
18449 \begin_layout Description
18450 \begin_inset Flex Code
18451 status collapsed
18452
18453 \begin_layout Plain Layout
18454 Shape
18455 \end_layout
18456
18457 \end_inset
18458
18459  [
18460 \begin_inset Flex Code
18461 status collapsed
18462
18463 \begin_layout Plain Layout
18464
18465 \emph on
18466 Up
18467 \end_layout
18468
18469 \end_inset
18470
18471
18472 \begin_inset Flex Code
18473 status collapsed
18474
18475 \begin_layout Plain Layout
18476 Italic
18477 \end_layout
18478
18479 \end_inset
18480
18481
18482 \begin_inset Flex Code
18483 status collapsed
18484
18485 \begin_layout Plain Layout
18486 SmallCaps
18487 \end_layout
18488
18489 \end_inset
18490
18491
18492 \begin_inset Flex Code
18493 status collapsed
18494
18495 \begin_layout Plain Layout
18496 Slanted
18497 \end_layout
18498
18499 \end_inset
18500
18501
18502 \end_layout
18503
18504 \begin_layout Description
18505 \begin_inset Flex Code
18506 status collapsed
18507
18508 \begin_layout Plain Layout
18509 Size
18510 \end_layout
18511
18512 \end_inset
18513
18514  [
18515 \begin_inset Flex Code
18516 status collapsed
18517
18518 \begin_layout Plain Layout
18519 tiny
18520 \end_layout
18521
18522 \end_inset
18523
18524
18525 \begin_inset Flex Code
18526 status collapsed
18527
18528 \begin_layout Plain Layout
18529 small
18530 \end_layout
18531
18532 \end_inset
18533
18534
18535 \begin_inset Flex Code
18536 status collapsed
18537
18538 \begin_layout Plain Layout
18539
18540 \emph on
18541 normal
18542 \end_layout
18543
18544 \end_inset
18545
18546
18547 \begin_inset Flex Code
18548 status collapsed
18549
18550 \begin_layout Plain Layout
18551 large
18552 \end_layout
18553
18554 \end_inset
18555
18556
18557 \begin_inset Flex Code
18558 status collapsed
18559
18560 \begin_layout Plain Layout
18561 larger
18562 \end_layout
18563
18564 \end_inset
18565
18566
18567 \begin_inset Flex Code
18568 status collapsed
18569
18570 \begin_layout Plain Layout
18571 largest
18572 \end_layout
18573
18574 \end_inset
18575
18576
18577 \begin_inset Flex Code
18578 status collapsed
18579
18580 \begin_layout Plain Layout
18581 huge
18582 \end_layout
18583
18584 \end_inset
18585
18586
18587 \begin_inset Flex Code
18588 status collapsed
18589
18590 \begin_layout Plain Layout
18591 giant
18592 \end_layout
18593
18594 \end_inset
18595
18596 ]
18597 \end_layout
18598
18599 \begin_layout Subsection
18600 \begin_inset CommandInset label
18601 LatexCommand label
18602 name "sub:Citation-format-description"
18603
18604 \end_inset
18605
18606 Citation format description
18607 \end_layout
18608
18609 \begin_layout Standard
18610 The 
18611 \begin_inset Flex Code
18612 status collapsed
18613
18614 \begin_layout Plain Layout
18615 CiteFormat
18616 \end_layout
18617
18618 \end_inset
18619
18620  blocks are used to describe how bibliographic information should be displayed,
18621  both within LyX itself (in the citation dialog and in tooltips, for example)
18622  and in XHTML output.
18623  Such a block might look like this:
18624 \end_layout
18625
18626 \begin_layout LyX-Code
18627 CiteFormat
18628 \end_layout
18629
18630 \begin_layout LyX-Code
18631  article ...
18632 \end_layout
18633
18634 \begin_layout LyX-Code
18635  book ...
18636 \end_layout
18637
18638 \begin_layout LyX-Code
18639 End
18640 \end_layout
18641
18642 \begin_layout Standard
18643 The individual lines define how the bibliographic information associated
18644  with an article or book, respectively, is to be displayed, and such a definitio
18645 n can be given for any `entry type' that might be present in a BibTeX file.
18646  LyX defines a default format in the source code that will be used if no
18647  specific definition has been given.
18648  LyX predefines several formats in the file 
18649 \begin_inset Flex Code
18650 status collapsed
18651
18652 \begin_layout Plain Layout
18653 stdciteformats.inc
18654 \end_layout
18655
18656 \end_inset
18657
18658 , which is included in most of LyX's document classes.
18659 \end_layout
18660
18661 \begin_layout Standard
18662 The definitions use a simple language that allows BibTeX keys to be replaced
18663  with their values.
18664  Keys should be enclosed in 
18665 \begin_inset Flex Code
18666 status collapsed
18667
18668 \begin_layout Plain Layout
18669 %
18670 \end_layout
18671
18672 \end_inset
18673
18674  signs, e.g.: 
18675 \begin_inset Flex Code
18676 status collapsed
18677
18678 \begin_layout Plain Layout
18679 %author%
18680 \end_layout
18681
18682 \end_inset
18683
18684 .
18685  So a simple definition might look like this:
18686 \end_layout
18687
18688 \begin_layout LyX-Code
18689 misc %author%, 
18690 \begin_inset Quotes eld
18691 \end_inset
18692
18693 %title
18694 \begin_inset Quotes erd
18695 \end_inset
18696
18697 .
18698 \end_layout
18699
18700 \begin_layout Standard
18701 This would print the author, followed by a comma, followed by the title,
18702  in quotes, followed by a period.
18703 \end_layout
18704
18705 \begin_layout Standard
18706 Of course, sometimes you may want to print a key only if it exists.
18707  This can be done by using a conditional construction, such as: 
18708 \begin_inset Flex Code
18709 status collapsed
18710
18711 \begin_layout Plain Layout
18712 {%volume%[[vol.
18713 \begin_inset space ~
18714 \end_inset
18715
18716 %volume%]]}
18717 \end_layout
18718
18719 \end_inset
18720
18721 .
18722  This says: If the 
18723 \begin_inset Flex Code
18724 status collapsed
18725
18726 \begin_layout Plain Layout
18727 volume
18728 \end_layout
18729
18730 \end_inset
18731
18732  key exists, then print 
18733 \begin_inset Quotes eld
18734 \end_inset
18735
18736 vol.
18737 \begin_inset space ~
18738 \end_inset
18739
18740
18741 \begin_inset Quotes erd
18742 \end_inset
18743
18744  followed by the volume key.
18745  It is also possible to have an else clause in the conditional, such as:
18746  
18747 \begin_inset Flex Code
18748 status collapsed
18749
18750 \begin_layout Plain Layout
18751 {%author%[[%author%]][[%editor%, ed.]]}
18752 \end_layout
18753
18754 \end_inset
18755
18756 .
18757  Here, the 
18758 \begin_inset Flex Code
18759 status collapsed
18760
18761 \begin_layout Plain Layout
18762 author
18763 \end_layout
18764
18765 \end_inset
18766
18767  key is printed if it exists; otherwise, the editor key is printed, followed
18768  by 
18769 \begin_inset Quotes eld
18770 \end_inset
18771
18772 ,
18773 \begin_inset space ~
18774 \end_inset
18775
18776 ed.
18777 \begin_inset Quotes erd
18778 \end_inset
18779
18780  Note that the key is again enclosed in 
18781 \begin_inset Flex Code
18782 status collapsed
18783
18784 \begin_layout Plain Layout
18785 %
18786 \end_layout
18787
18788 \end_inset
18789
18790  signs; the entire conditional is enclosed in braces; and the if and else
18791  clauses are enclosed in double brackets, 
18792 \begin_inset Quotes eld
18793 \end_inset
18794
18795
18796 \begin_inset Flex Code
18797 status collapsed
18798
18799 \begin_layout Plain Layout
18800 [[
18801 \end_layout
18802
18803 \end_inset
18804
18805
18806 \begin_inset Quotes eld
18807 \end_inset
18808
18809  and 
18810 \begin_inset Quotes eld
18811 \end_inset
18812
18813
18814 \begin_inset Flex Code
18815 status collapsed
18816
18817 \begin_layout Plain Layout
18818 ]]
18819 \end_layout
18820
18821 \end_inset
18822
18823
18824 \begin_inset Quotes erd
18825 \end_inset
18826
18827 .
18828  There must be no space between any of these.
18829 \end_layout
18830
18831 \begin_layout Standard
18832 There is one other piece of syntax available in definitions, which looks
18833  like this: 
18834 \begin_inset Flex Code
18835 status collapsed
18836
18837 \begin_layout Plain Layout
18838 {!<i>!}
18839 \end_layout
18840
18841 \end_inset
18842
18843 .
18844  This defines a piece of formatting information that is to be used when
18845  creating 
18846 \begin_inset Quotes eld
18847 \end_inset
18848
18849 rich text
18850 \begin_inset Quotes erd
18851 \end_inset
18852
18853 .
18854  Obviously, we do not want to output HTML tags when writing plain text,
18855  so they should be wrapped in 
18856 \begin_inset Quotes eld
18857 \end_inset
18858
18859 {!
18860 \begin_inset Quotes erd
18861 \end_inset
18862
18863  and 
18864 \begin_inset Quotes eld
18865 \end_inset
18866
18867 !}
18868 \begin_inset Quotes erd
18869 \end_inset
18870
18871 .
18872 \end_layout
18873
18874 \begin_layout Standard
18875 Two special sorts of definitions are also possible in a 
18876 \begin_inset Flex Code
18877 status collapsed
18878
18879 \begin_layout Plain Layout
18880 CiteFormat
18881 \end_layout
18882
18883 \end_inset
18884
18885  block.
18886  An example of the first would be:
18887 \end_layout
18888
18889 \begin_layout LyX-Code
18890 !quotetitle 
18891 \begin_inset Quotes eld
18892 \end_inset
18893
18894 %title%
18895 \begin_inset Quotes erd
18896 \end_inset
18897
18898
18899 \end_layout
18900
18901 \begin_layout Standard
18902 This is an abbreviation, or macro, and it can be used by treating it as
18903  if it were a key: 
18904 \begin_inset Flex Code
18905 status collapsed
18906
18907 \begin_layout Plain Layout
18908 %!quotetitle%
18909 \end_layout
18910
18911 \end_inset
18912
18913 .
18914  LyX will treat 
18915 \begin_inset Flex Code
18916 status collapsed
18917
18918 \begin_layout Plain Layout
18919 %!quotetitle%
18920 \end_layout
18921
18922 \end_inset
18923
18924  exactly as it would treat its definition.
18925  So, let us issue the obvious 
18926 \emph on
18927 warning
18928 \emph default
18929 .
18930  Do not do this:
18931 \end_layout
18932
18933 \begin_layout LyX-Code
18934 !funfun %funfun%
18935 \end_layout
18936
18937 \begin_layout Standard
18938 or anything like it.
18939  LyX shouldn't go into an infinite loop, but it may go into a long one before
18940  it gives up.
18941 \end_layout
18942
18943 \begin_layout Standard
18944 The second sort of special definition might look like this:
18945 \end_layout
18946
18947 \begin_layout LyX-Code
18948 _pptext pp.
18949 \end_layout
18950
18951 \begin_layout Standard
18952 This defines a translatable piece of text, which allows relevant parts of
18953  the bibliography to be translated.
18954  It can be included in a definition by treating it as a key: 
18955 \begin_inset Flex Code
18956 status collapsed
18957
18958 \begin_layout Plain Layout
18959 %_pptext%
18960 \end_layout
18961
18962 \end_inset
18963
18964 .
18965  Several of these are predefined in 
18966 \begin_inset Flex Code
18967 status collapsed
18968
18969 \begin_layout Plain Layout
18970 stdciteformats.inc
18971 \end_layout
18972
18973 \end_inset
18974
18975 .
18976  Note that these are not macros, in the sense just defined.
18977  They will not be expanded.
18978 \end_layout
18979
18980 \begin_layout Standard
18981 So here then is an example that use all these features:
18982 \end_layout
18983
18984 \begin_layout LyX-Code
18985 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
18986 \end_layout
18987
18988 \begin_layout Standard
18989 This defines a macro that prints the author, followed by a comma, if the
18990  
18991 \begin_inset Flex Code
18992 status collapsed
18993
18994 \begin_layout Plain Layout
18995 author
18996 \end_layout
18997
18998 \end_inset
18999
19000  key is defined, or else prints the name of the editor, followed by the
19001  
19002 \begin_inset Flex Code
19003 status collapsed
19004
19005 \begin_layout Plain Layout
19006 _edtext
19007 \end_layout
19008
19009 \end_inset
19010
19011  or its translation (it is by default 
19012 \begin_inset Quotes eld
19013 \end_inset
19014
19015 ed.
19016 \begin_inset Quotes erd
19017 \end_inset
19018
19019 ), if the 
19020 \begin_inset Flex Code
19021 status collapsed
19022
19023 \begin_layout Plain Layout
19024 editor
19025 \end_layout
19026
19027 \end_inset
19028
19029  key is defined.
19030  Note that this is in fact defined in 
19031 \begin_inset Flex Code
19032 status collapsed
19033
19034 \begin_layout Plain Layout
19035 stdciteformats.inc
19036 \end_layout
19037
19038 \end_inset
19039
19040 , so you can use it in your own definitions, or re-definitions, if you load
19041  that file first.
19042 \end_layout
19043
19044 \begin_layout Section
19045 \begin_inset CommandInset label
19046 LatexCommand label
19047 name "sec:Tags-for-XHTML"
19048
19049 \end_inset
19050
19051 Tags for XHTML output
19052 \end_layout
19053
19054 \begin_layout Standard
19055 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
19056  by layout information.
19057  In general, LyX provides sensible defaults and, as mentioned earlier, it
19058  will even construct default CSS style rules from the other layout tags.
19059  For example, LyX will attempt to use the information provided in the 
19060 \begin_inset Flex Code
19061 status collapsed
19062
19063 \begin_layout Plain Layout
19064 Font
19065 \end_layout
19066
19067 \end_inset
19068
19069  declaration for the Chapter style to write CSS that will appropriately
19070  format chapter headings.
19071 \end_layout
19072
19073 \begin_layout Standard
19074 In many cases, then, you may not have to do anything at all to get acceptable
19075  XHTML output for your own environments, custom insets, and so forth.
19076  But in some cases you will, and so LyX provides a number of layout tags
19077  that can be used to customize the XHTML and CSS that are generated.
19078 \end_layout
19079
19080 \begin_layout Standard
19081 Note that there are two tags, 
19082 \begin_inset Flex Code
19083 status collapsed
19084
19085 \begin_layout Plain Layout
19086 HTMLPreamble
19087 \end_layout
19088
19089 \end_inset
19090
19091  and 
19092 \begin_inset Flex Code
19093 status collapsed
19094
19095 \begin_layout Plain Layout
19096 AddToHTMLPreamble
19097 \end_layout
19098
19099 \end_inset
19100
19101  that may appear outside style and inset declarations.
19102  See 
19103 \begin_inset CommandInset ref
19104 LatexCommand ref
19105 reference "sub:General-text-class"
19106
19107 \end_inset
19108
19109  for details on these.
19110 \end_layout
19111
19112 \begin_layout Subsection
19113 \begin_inset CommandInset label
19114 LatexCommand label
19115 name "sub:Paragraph-Style-XHTML"
19116
19117 \end_inset
19118
19119 Paragraph styles
19120 \end_layout
19121
19122 \begin_layout Standard
19123 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
19124  dealing with a normal paragraph, a command, or an environment, where this
19125  is itself determined by the contents of the corresponding 
19126 \begin_inset Flex Code
19127 status collapsed
19128
19129 \begin_layout Plain Layout
19130 LaTeXType
19131 \end_layout
19132
19133 \end_inset
19134
19135  tag.
19136  
19137 \end_layout
19138
19139 \begin_layout Standard
19140 For a command or normal paragraph, the output XHTML has the following form:
19141 \end_layout
19142
19143 \begin_layout LyX-Code
19144 <tag attr=
19145 \begin_inset Quotes erd
19146 \end_inset
19147
19148 value
19149 \begin_inset Quotes erd
19150 \end_inset
19151
19152 >
19153 \end_layout
19154
19155 \begin_layout LyX-Code
19156 <labeltag attr=
19157 \begin_inset Quotes erd
19158 \end_inset
19159
19160 value
19161 \begin_inset Quotes erd
19162 \end_inset
19163
19164 >Label</labeltag>
19165 \end_layout
19166
19167 \begin_layout LyX-Code
19168 Contents of the paragraph.
19169 \end_layout
19170
19171 \begin_layout LyX-Code
19172 </tag>
19173 \end_layout
19174
19175 \begin_layout Standard
19176 The label tags are of course omitted if the paragraph does not have a label.
19177 \end_layout
19178
19179 \begin_layout Standard
19180 For an environment that is not some sort of list, the XHTML takes this form:
19181 \end_layout
19182
19183 \begin_layout LyX-Code
19184 <tag attr=
19185 \begin_inset Quotes erd
19186 \end_inset
19187
19188 value
19189 \begin_inset Quotes erd
19190 \end_inset
19191
19192 >
19193 \end_layout
19194
19195 \begin_layout LyX-Code
19196 <itemtag attr=
19197 \begin_inset Quotes erd
19198 \end_inset
19199
19200 value
19201 \begin_inset Quotes erd
19202 \end_inset
19203
19204 ><labeltag attr=
19205 \begin_inset Quotes erd
19206 \end_inset
19207
19208 value
19209 \begin_inset Quotes erd
19210 \end_inset
19211
19212 >Environment Label</labeltag>First paragraph.</itemtag>
19213 \end_layout
19214
19215 \begin_layout LyX-Code
19216 <itemtag>Second paragraph.</itemtag>
19217 \end_layout
19218
19219 \begin_layout LyX-Code
19220 </tag>
19221 \end_layout
19222
19223 \begin_layout Standard
19224 Note that the label is output only for the first paragraph, as it should
19225  be for a theorem, for example.
19226  
19227 \end_layout
19228
19229 \begin_layout Standard
19230 For a list, we have one of these forms:
19231 \end_layout
19232
19233 \begin_layout LyX-Code
19234 <tag attr=
19235 \begin_inset Quotes erd
19236 \end_inset
19237
19238 value
19239 \begin_inset Quotes erd
19240 \end_inset
19241
19242 >
19243 \end_layout
19244
19245 \begin_layout LyX-Code
19246 <itemtag attr=
19247 \begin_inset Quotes erd
19248 \end_inset
19249
19250 value
19251 \begin_inset Quotes erd
19252 \end_inset
19253
19254 ><labeltag attr=
19255 \begin_inset Quotes erd
19256 \end_inset
19257
19258 value
19259 \begin_inset Quotes erd
19260 \end_inset
19261
19262 >List Label</labeltag>First item.</itemtag>
19263 \end_layout
19264
19265 \begin_layout LyX-Code
19266 <itemtag attr=
19267 \begin_inset Quotes erd
19268 \end_inset
19269
19270 value
19271 \begin_inset Quotes erd
19272 \end_inset
19273
19274 ><labeltag attr=
19275 \begin_inset Quotes erd
19276 \end_inset
19277
19278 value
19279 \begin_inset Quotes erd
19280 \end_inset
19281
19282 >List Label</labeltag>Second item.</itemtag>
19283 \end_layout
19284
19285 \begin_layout LyX-Code
19286 </tag>
19287 \end_layout
19288
19289 \begin_layout LyX-Code
19290
19291 \end_layout
19292
19293 \begin_layout LyX-Code
19294 <tag attr=
19295 \begin_inset Quotes erd
19296 \end_inset
19297
19298 value
19299 \begin_inset Quotes erd
19300 \end_inset
19301
19302 >
19303 \end_layout
19304
19305 \begin_layout LyX-Code
19306 <labeltag attr=
19307 \begin_inset Quotes erd
19308 \end_inset
19309
19310 value
19311 \begin_inset Quotes erd
19312 \end_inset
19313
19314 >List Label</labeltag><itemtag attr=
19315 \begin_inset Quotes erd
19316 \end_inset
19317
19318 value
19319 \begin_inset Quotes erd
19320 \end_inset
19321
19322 >First item.</itemtag>
19323 \end_layout
19324
19325 \begin_layout LyX-Code
19326 <labeltag attr=
19327 \begin_inset Quotes erd
19328 \end_inset
19329
19330 value
19331 \begin_inset Quotes erd
19332 \end_inset
19333
19334 >List Label</labeltag><itemtag attr=
19335 \begin_inset Quotes erd
19336 \end_inset
19337
19338 value
19339 \begin_inset Quotes erd
19340 \end_inset
19341
19342 >Second item.</itemtag>
19343 \end_layout
19344
19345 \begin_layout LyX-Code
19346 </tag>
19347 \end_layout
19348
19349 \begin_layout Standard
19350 Note the different orders of 
19351 \begin_inset Flex Code
19352 status collapsed
19353
19354 \begin_layout Plain Layout
19355 labeltag
19356 \end_layout
19357
19358 \end_inset
19359
19360  and 
19361 \begin_inset Flex Code
19362 status collapsed
19363
19364 \begin_layout Plain Layout
19365 itemtag
19366 \end_layout
19367
19368 \end_inset
19369
19370 .
19371  Which order we get depends upon the setting of 
19372 \begin_inset Flex Code
19373 status collapsed
19374
19375 \begin_layout Plain Layout
19376 HTMLLabelFirst
19377 \end_layout
19378
19379 \end_inset
19380
19381 : If 
19382 \begin_inset Flex Code
19383 status collapsed
19384
19385 \begin_layout Plain Layout
19386 HTMLLabelFirst
19387 \end_layout
19388
19389 \end_inset
19390
19391  is false (the default), you get the first of these, with the label within
19392  the item; if true, you get the second, with the label outside the item.
19393 \end_layout
19394
19395 \begin_layout Standard
19396 The specific tags and attributes output for each paragraph type can be controlle
19397 d by means of the layout tags we are about to describe.
19398  As mentioned earlier, however, LyX uses sensible defaults for many of these,
19399  so you often may not need to do very much to get good XHTML output.
19400  Think of the available tags as there so you can tweak things to your liking.
19401 \end_layout
19402
19403 \begin_layout Description
19404 \begin_inset Flex Code
19405 status collapsed
19406
19407 \begin_layout Plain Layout
19408 HTMLAttr
19409 \end_layout
19410
19411 \end_inset
19412
19413  [
19414 \begin_inset Flex Code
19415 status collapsed
19416
19417 \begin_layout Plain Layout
19418 string
19419 \end_layout
19420
19421 \end_inset
19422
19423 ] Specifies attribute information to be output with the main tag.
19424  For example, 
19425 \begin_inset Quotes eld
19426 \end_inset
19427
19428
19429 \begin_inset Flex Code
19430 status collapsed
19431
19432 \begin_layout Plain Layout
19433 class=`mydiv'
19434 \end_layout
19435
19436 \end_inset
19437
19438
19439 \begin_inset Quotes erd
19440 \end_inset
19441
19442 .
19443  By default, LyX will output 
19444 \begin_inset Quotes eld
19445 \end_inset
19446
19447
19448 \begin_inset Flex Code
19449 status collapsed
19450
19451 \begin_layout Plain Layout
19452 class=`layoutname'
19453 \end_layout
19454
19455 \end_inset
19456
19457
19458 \begin_inset Quotes erd
19459 \end_inset
19460
19461 , where 
19462 \begin_inset Flex Code
19463 status collapsed
19464
19465 \begin_layout Plain Layout
19466 layoutname
19467 \end_layout
19468
19469 \end_inset
19470
19471  is the LyX name of the layout, made lowercase, for example: chapter.
19472  This should 
19473 \emph on
19474 not
19475 \emph default
19476  contain any style information.
19477  Use 
19478 \begin_inset Flex Code
19479 status collapsed
19480
19481 \begin_layout Plain Layout
19482 HTMLStyle
19483 \end_layout
19484
19485 \end_inset
19486
19487  for that purpose.
19488 \end_layout
19489
19490 \begin_layout Description
19491 \begin_inset Flex Code
19492 status collapsed
19493
19494 \begin_layout Plain Layout
19495 HTMLForceCSS
19496 \end_layout
19497
19498 \end_inset
19499
19500  [
19501 \begin_inset Flex Code
19502 status collapsed
19503
19504 \begin_layout Plain Layout
19505
19506 \emph on
19507 0
19508 \emph default
19509 ,1
19510 \end_layout
19511
19512 \end_inset
19513
19514 ] Whether to output the default CSS information LyX generates for this layout,
19515  even if additional information is explicitly provided via 
19516 \begin_inset Flex Code
19517 status collapsed
19518
19519 \begin_layout Plain Layout
19520 HTMLStyle
19521 \end_layout
19522
19523 \end_inset
19524
19525 .
19526  Setting this to 
19527 \begin_inset Flex Code
19528 status collapsed
19529
19530 \begin_layout Plain Layout
19531 1
19532 \end_layout
19533
19534 \end_inset
19535
19536  allows you to alter or augment the generated CSS, rather than to override
19537  it completely.
19538  Default is 
19539 \begin_inset Flex Code
19540 status collapsed
19541
19542 \begin_layout Plain Layout
19543 0
19544 \end_layout
19545
19546 \end_inset
19547
19548 .
19549 \end_layout
19550
19551 \begin_layout Description
19552 \begin_inset Flex Code
19553 status collapsed
19554
19555 \begin_layout Plain Layout
19556 HTMLItem
19557 \end_layout
19558
19559 \end_inset
19560
19561  [
19562 \begin_inset Flex Code
19563 status collapsed
19564
19565 \begin_layout Plain Layout
19566 string
19567 \end_layout
19568
19569 \end_inset
19570
19571 ] The tag to be used for individual paragraphs of environments, replacing
19572  
19573 \begin_inset Flex Code
19574 status collapsed
19575
19576 \begin_layout Plain Layout
19577 itemtag
19578 \end_layout
19579
19580 \end_inset
19581
19582  in the examples above.
19583  Defaults to 
19584 \begin_inset Flex Code
19585 status collapsed
19586
19587 \begin_layout Plain Layout
19588 div
19589 \end_layout
19590
19591 \end_inset
19592
19593 .
19594 \end_layout
19595
19596 \begin_layout Description
19597 \begin_inset Flex Code
19598 status collapsed
19599
19600 \begin_layout Plain Layout
19601 HTMLItemAttr
19602 \end_layout
19603
19604 \end_inset
19605
19606  [
19607 \begin_inset Flex Code
19608 status collapsed
19609
19610 \begin_layout Plain Layout
19611 string
19612 \end_layout
19613
19614 \end_inset
19615
19616 ] Attributes for the item tag.
19617  Defaults to 
19618 \begin_inset Quotes eld
19619 \end_inset
19620
19621
19622 \begin_inset Flex Code
19623 status collapsed
19624
19625 \begin_layout Plain Layout
19626 class=`layoutname_item'
19627 \end_layout
19628
19629 \end_inset
19630
19631
19632 \begin_inset Quotes erd
19633 \end_inset
19634
19635 .
19636  This should 
19637 \emph on
19638 not
19639 \emph default
19640  contain any style information.
19641  Use 
19642 \begin_inset Flex Code
19643 status collapsed
19644
19645 \begin_layout Plain Layout
19646 HTMLStyle
19647 \end_layout
19648
19649 \end_inset
19650
19651  for that purpose.
19652 \end_layout
19653
19654 \begin_layout Description
19655 \begin_inset Flex Code
19656 status collapsed
19657
19658 \begin_layout Plain Layout
19659 HTMLLabel
19660 \end_layout
19661
19662 \end_inset
19663
19664  [
19665 \begin_inset Flex Code
19666 status collapsed
19667
19668 \begin_layout Plain Layout
19669 string
19670 \end_layout
19671
19672 \end_inset
19673
19674 ] The tag to be used for paragraph and item labels, replacing 
19675 \begin_inset Flex Code
19676 status collapsed
19677
19678 \begin_layout Plain Layout
19679 labeltag
19680 \end_layout
19681
19682 \end_inset
19683
19684  in the examples above.
19685  Defaults to 
19686 \begin_inset Flex Code
19687 status collapsed
19688
19689 \begin_layout Plain Layout
19690 span
19691 \end_layout
19692
19693 \end_inset
19694
19695 , unless 
19696 \begin_inset Flex Code
19697 status collapsed
19698
19699 \begin_layout Plain Layout
19700 LabelType
19701 \end_layout
19702
19703 \end_inset
19704
19705  is either 
19706 \begin_inset Flex Code
19707 status collapsed
19708
19709 \begin_layout Plain Layout
19710 Top_Environment
19711 \end_layout
19712
19713 \end_inset
19714
19715  or 
19716 \begin_inset Flex Code
19717 status collapsed
19718
19719 \begin_layout Plain Layout
19720 Centered_Top_Environment
19721 \end_layout
19722
19723 \end_inset
19724
19725 , in which case it defaults to 
19726 \begin_inset Flex Code
19727 status collapsed
19728
19729 \begin_layout Plain Layout
19730 div
19731 \end_layout
19732
19733 \end_inset
19734
19735 .
19736 \end_layout
19737
19738 \begin_layout Description
19739 \begin_inset Flex Code
19740 status collapsed
19741
19742 \begin_layout Plain Layout
19743 HTMLLabelAttr
19744 \end_layout
19745
19746 \end_inset
19747
19748  [
19749 \begin_inset Flex Code
19750 status collapsed
19751
19752 \begin_layout Plain Layout
19753 string
19754 \end_layout
19755
19756 \end_inset
19757
19758 ] Attributes for the label tag.
19759  Defaults to 
19760 \begin_inset Quotes eld
19761 \end_inset
19762
19763
19764 \begin_inset Flex Code
19765 status collapsed
19766
19767 \begin_layout Plain Layout
19768 class=`layoutname_label'
19769 \end_layout
19770
19771 \end_inset
19772
19773
19774 \begin_inset Quotes erd
19775 \end_inset
19776
19777 .
19778  This should 
19779 \emph on
19780 not
19781 \emph default
19782  contain any style information.
19783  Use 
19784 \begin_inset Flex Code
19785 status collapsed
19786
19787 \begin_layout Plain Layout
19788 HTMLStyle
19789 \end_layout
19790
19791 \end_inset
19792
19793  for that purpose.
19794 \end_layout
19795
19796 \begin_layout Description
19797 \begin_inset Flex Code
19798 status collapsed
19799
19800 \begin_layout Plain Layout
19801 HTMLLabelFirst
19802 \end_layout
19803
19804 \end_inset
19805
19806  [
19807 \begin_inset Flex Code
19808 status collapsed
19809
19810 \begin_layout Plain Layout
19811
19812 \emph on
19813 0
19814 \emph default
19815 ,1
19816 \end_layout
19817
19818 \end_inset
19819
19820 ] Meaningful only for list-like environments, this tag controls whether
19821  the label tag is output before or inside the item tag.
19822  This is used, for example, in the description environment, where we want
19823  `
19824 \begin_inset Flex Code
19825 status collapsed
19826
19827 \begin_layout Plain Layout
19828 <dt>\SpecialChar \ldots{}
19829 </dt><dd>\SpecialChar \ldots{}
19830 </dd>
19831 \end_layout
19832
19833 \end_inset
19834
19835 .
19836  Default is 
19837 \begin_inset Flex Code
19838 status collapsed
19839
19840 \begin_layout Plain Layout
19841 0
19842 \end_layout
19843
19844 \end_inset
19845
19846 : The label tag is output inside the item tag.
19847 \end_layout
19848
19849 \begin_layout Description
19850 \begin_inset Flex Code
19851 status collapsed
19852
19853 \begin_layout Plain Layout
19854 HTMLPreamble
19855 \end_layout
19856
19857 \end_inset
19858
19859  Information to be output in the 
19860 \begin_inset Flex Code
19861 status collapsed
19862
19863 \begin_layout Plain Layout
19864 <head>
19865 \end_layout
19866
19867 \end_inset
19868
19869  section when this style is used.
19870  This might, for example, be used to include a 
19871 \begin_inset Flex Code
19872 status collapsed
19873
19874 \begin_layout Plain Layout
19875 <script>
19876 \end_layout
19877
19878 \end_inset
19879
19880  block defining an 
19881 \begin_inset Flex Code
19882 status collapsed
19883
19884 \begin_layout Plain Layout
19885 onclick
19886 \end_layout
19887
19888 \end_inset
19889
19890  handler.
19891 \end_layout
19892
19893 \begin_layout Description
19894 \begin_inset Flex Code
19895 status collapsed
19896
19897 \begin_layout Plain Layout
19898 HTMLStyle
19899 \end_layout
19900
19901 \end_inset
19902
19903  CSS style information to be included when this style is used.
19904  Note that this will automatically be wrapped in a layout-generated 
19905 \begin_inset Flex Code
19906 status collapsed
19907
19908 \begin_layout Plain Layout
19909 <style>
19910 \end_layout
19911
19912 \end_inset
19913
19914  block, so only the CSS itself need be included.
19915 \end_layout
19916
19917 \begin_layout Description
19918 \begin_inset Flex Code
19919 status collapsed
19920
19921 \begin_layout Plain Layout
19922 HTMLTag
19923 \end_layout
19924
19925 \end_inset
19926
19927  [
19928 \begin_inset Flex Code
19929 status collapsed
19930
19931 \begin_layout Plain Layout
19932 string
19933 \end_layout
19934
19935 \end_inset
19936
19937 ] The tag to be used for the main label, replacing 
19938 \begin_inset Flex Code
19939 status collapsed
19940
19941 \begin_layout Plain Layout
19942 tag
19943 \end_layout
19944
19945 \end_inset
19946
19947  in the examples above.
19948  Defaults to 
19949 \begin_inset Flex Code
19950 status collapsed
19951
19952 \begin_layout Plain Layout
19953 div
19954 \end_layout
19955
19956 \end_inset
19957
19958 .
19959 \end_layout
19960
19961 \begin_layout Description
19962 \begin_inset Flex Code
19963 status collapsed
19964
19965 \begin_layout Plain Layout
19966 HTMLTitle
19967 \end_layout
19968
19969 \end_inset
19970
19971  [
19972 \begin_inset Flex Code
19973 status collapsed
19974
19975 \begin_layout Plain Layout
19976
19977 \emph on
19978 0
19979 \emph default
19980 ,1
19981 \end_layout
19982
19983 \end_inset
19984
19985 ] Marks this style as the one to be used to generate the 
19986 \begin_inset Flex Code
19987 status collapsed
19988
19989 \begin_layout Plain Layout
19990 <title>
19991 \end_layout
19992
19993 \end_inset
19994
19995  tag for the XHTML file.
19996  By default, it is false.
19997  The 
19998 \begin_inset Flex Code
19999 status collapsed
20000
20001 \begin_layout Plain Layout
20002 stdtitle.inc
20003 \end_layout
20004
20005 \end_inset
20006
20007  file sets it to true for the 
20008 \begin_inset Flex Code
20009 status collapsed
20010
20011 \begin_layout Plain Layout
20012 title
20013 \end_layout
20014
20015 \end_inset
20016
20017  environment.
20018  
20019 \end_layout
20020
20021 \begin_layout Subsection
20022 InsetLayout XHTML
20023 \end_layout
20024
20025 \begin_layout Standard
20026 The XHTML output of insets can also be controlled by information in layout
20027  files.
20028 \begin_inset Foot
20029 status collapsed
20030
20031 \begin_layout Plain Layout
20032 At present, this is true only for 
20033 \begin_inset Quotes eld
20034 \end_inset
20035
20036 text
20037 \begin_inset Quotes erd
20038 \end_inset
20039
20040  insets (insets you can type into) and is not true for 
20041 \begin_inset Quotes eld
20042 \end_inset
20043
20044 command
20045 \begin_inset Quotes erd
20046 \end_inset
20047
20048  insets (insets that are associated with dialog boxes).
20049 \end_layout
20050
20051 \end_inset
20052
20053  Here, too, LyX tries to provide sensible defaults, and it constructs default
20054  CSS style rules.
20055  But everything can be customized.
20056 \end_layout
20057
20058 \begin_layout Standard
20059 The XHTML LyX outputs for an inset has the following form:
20060 \end_layout
20061
20062 \begin_layout LyX-Code
20063 <tag attr=
20064 \begin_inset Quotes erd
20065 \end_inset
20066
20067 value
20068 \begin_inset Quotes erd
20069 \end_inset
20070
20071 >
20072 \end_layout
20073
20074 \begin_layout LyX-Code
20075 <labeltag>Label</labeltag>
20076 \end_layout
20077
20078 \begin_layout LyX-Code
20079 <innertag attr=
20080 \begin_inset Quotes erd
20081 \end_inset
20082
20083 value
20084 \begin_inset Quotes erd
20085 \end_inset
20086
20087 >Contents of the inset.</innertag>
20088 \end_layout
20089
20090 \begin_layout LyX-Code
20091 </tag>
20092 \end_layout
20093
20094 \begin_layout Standard
20095 If the inset permits multiple paragraphs---that is, if 
20096 \begin_inset Flex Code
20097 status collapsed
20098
20099 \begin_layout Plain Layout
20100 MultiPar
20101 \end_layout
20102
20103 \end_inset
20104
20105  is true---then the contents of the inset will itself be output as paragraphs
20106  formatted according to the styles used for those paragraphs (standard,
20107  quote, and the like).
20108  The label tag is of course omitted if the paragraph does not have a label
20109  and, at present, is always 
20110 \begin_inset Flex Code
20111 status collapsed
20112
20113 \begin_layout Plain Layout
20114 span
20115 \end_layout
20116
20117 \end_inset
20118
20119 .
20120  The inner tag is optional and, by default, does not appear.
20121 \end_layout
20122
20123 \begin_layout Standard
20124 The specific tags and attributes output for each inset can be controlled
20125  by means of the following layout tags.
20126 \end_layout
20127
20128 \begin_layout Description
20129 \begin_inset Flex Code
20130 status collapsed
20131
20132 \begin_layout Plain Layout
20133 HTMLAttr
20134 \end_layout
20135
20136 \end_inset
20137
20138  [
20139 \begin_inset Flex Code
20140 status collapsed
20141
20142 \begin_layout Plain Layout
20143 string
20144 \end_layout
20145
20146 \end_inset
20147
20148 ] Specifies attribute information to be output with the main tag.
20149  For example, 
20150 \begin_inset Quotes eld
20151 \end_inset
20152
20153
20154 \begin_inset Flex Code
20155 status collapsed
20156
20157 \begin_layout Plain Layout
20158 class=`myinset' onclick=`\SpecialChar \ldots{}
20159 '
20160 \end_layout
20161
20162 \end_inset
20163
20164
20165 \begin_inset Quotes erd
20166 \end_inset
20167
20168 .
20169  By default, LyX will output 
20170 \begin_inset Quotes eld
20171 \end_inset
20172
20173
20174 \begin_inset Flex Code
20175 status collapsed
20176
20177 \begin_layout Plain Layout
20178 class=`insetname'
20179 \end_layout
20180
20181 \end_inset
20182
20183
20184 \begin_inset Quotes erd
20185 \end_inset
20186
20187 , where 
20188 \begin_inset Flex Code
20189 status collapsed
20190
20191 \begin_layout Plain Layout
20192 insetname
20193 \end_layout
20194
20195 \end_inset
20196
20197  is the LyX name of the inset, made lowercase and with non-alphanumeric
20198  characters converted to underscores, for example: footnote.
20199 \end_layout
20200
20201 \begin_layout Description
20202 \begin_inset Flex Code
20203 status collapsed
20204
20205 \begin_layout Plain Layout
20206 HTMLForceCSS
20207 \end_layout
20208
20209 \end_inset
20210
20211  [
20212 \begin_inset Flex Code
20213 status collapsed
20214
20215 \begin_layout Plain Layout
20216
20217 \emph on
20218 0
20219 \emph default
20220 ,1
20221 \end_layout
20222
20223 \end_inset
20224
20225 ] Whether to output the default CSS information LyX generates for this layout,
20226  even if additional information is explicitly provided via 
20227 \begin_inset Flex Code
20228 status collapsed
20229
20230 \begin_layout Plain Layout
20231 HTMLStyle
20232 \end_layout
20233
20234 \end_inset
20235
20236 .
20237  Setting this to 
20238 \begin_inset Flex Code
20239 status collapsed
20240
20241 \begin_layout Plain Layout
20242 1
20243 \end_layout
20244
20245 \end_inset
20246
20247  allows you to alter or augment the generated CSS, rather than to override
20248  it completely.
20249  Default is 0.
20250 \end_layout
20251
20252 \begin_layout Description
20253 \begin_inset Flex Code
20254 status collapsed
20255
20256 \begin_layout Plain Layout
20257 HTMLInnerAttr
20258 \end_layout
20259
20260 \end_inset
20261
20262  [
20263 \begin_inset Flex Code
20264 status collapsed
20265
20266 \begin_layout Plain Layout
20267 string
20268 \end_layout
20269
20270 \end_inset
20271
20272 ] Attributes for the inner tag.
20273  Defaults to 
20274 \begin_inset Quotes eld
20275 \end_inset
20276
20277
20278 \begin_inset Flex Code
20279 status collapsed
20280
20281 \begin_layout Plain Layout
20282 class=`insetname_inner'
20283 \end_layout
20284
20285 \end_inset
20286
20287
20288 \begin_inset Quotes erd
20289 \end_inset
20290
20291 .
20292 \end_layout
20293
20294 \begin_layout Description
20295 \begin_inset Flex Code
20296 status collapsed
20297
20298 \begin_layout Plain Layout
20299 HTMLInnerTag
20300 \end_layout
20301
20302 \end_inset
20303
20304  [
20305 \begin_inset Flex Code
20306 status collapsed
20307
20308 \begin_layout Plain Layout
20309 string
20310 \end_layout
20311
20312 \end_inset
20313
20314 ] The inner tag, replacing 
20315 \begin_inset Flex Code
20316 status collapsed
20317
20318 \begin_layout Plain Layout
20319 innertag
20320 \end_layout
20321
20322 \end_inset
20323
20324  in the examples above.
20325  By default, there is none.
20326 \end_layout
20327
20328 \begin_layout Description
20329 \begin_inset Flex Code
20330 status collapsed
20331
20332 \begin_layout Plain Layout
20333 HTMLIsBlock
20334 \end_layout
20335
20336 \end_inset
20337
20338  [
20339 \begin_inset Flex Code
20340 status collapsed
20341
20342 \begin_layout Plain Layout
20343 0,
20344 \emph on
20345 1
20346 \end_layout
20347
20348 \end_inset
20349
20350 ] Whether this inset represents a standalone block of text (such as a footnote)
20351  or instead represents material that is included in the surrounding text
20352  (such as a branch).
20353  Defaults to 1.
20354 \end_layout
20355
20356 \begin_layout Description
20357 \begin_inset Flex Code
20358 status collapsed
20359
20360 \begin_layout Plain Layout
20361 HTMLLabel
20362 \end_layout
20363
20364 \end_inset
20365
20366  [
20367 \begin_inset Flex Code
20368 status collapsed
20369
20370 \begin_layout Plain Layout
20371 string
20372 \end_layout
20373
20374 \end_inset
20375
20376 ] A label for this inset, possibly including a reference to a counter.
20377  For example, for footnote, it might be: 
20378 \begin_inset Flex Code
20379 status collapsed
20380
20381 \begin_layout Plain Layout
20382
20383 \backslash
20384 arabic{footnote}
20385 \end_layout
20386
20387 \end_inset
20388
20389 .
20390  This is optional, and there is no default.
20391 \end_layout
20392
20393 \begin_layout Description
20394 \begin_inset Flex Code
20395 status collapsed
20396
20397 \begin_layout Plain Layout
20398 HTMLPreamble
20399 \end_layout
20400
20401 \end_inset
20402
20403  Information to be output in the 
20404 \begin_inset Flex Code
20405 status collapsed
20406
20407 \begin_layout Plain Layout
20408 <head>
20409 \end_layout
20410
20411 \end_inset
20412
20413  section when this style is used.
20414  This might, for example, be used to include a 
20415 \begin_inset Flex Code
20416 status collapsed
20417
20418 \begin_layout Plain Layout
20419 <script>
20420 \end_layout
20421
20422 \end_inset
20423
20424  block defining an 
20425 \begin_inset Flex Code
20426 status collapsed
20427
20428 \begin_layout Plain Layout
20429 onclick
20430 \end_layout
20431
20432 \end_inset
20433
20434  handler.
20435 \end_layout
20436
20437 \begin_layout Description
20438 \begin_inset Flex Code
20439 status collapsed
20440
20441 \begin_layout Plain Layout
20442 HTMLStyle
20443 \end_layout
20444
20445 \end_inset
20446
20447  CSS style information to be included when this style is used.
20448  Note that this will automatically be wrapped in a layout-generated 
20449 \begin_inset Flex Code
20450 status collapsed
20451
20452 \begin_layout Plain Layout
20453 <style>
20454 \end_layout
20455
20456 \end_inset
20457
20458  block, so only the CSS itself need be included.
20459 \end_layout
20460
20461 \begin_layout Description
20462 \begin_inset Flex Code
20463 status collapsed
20464
20465 \begin_layout Plain Layout
20466 HTMLTag
20467 \end_layout
20468
20469 \end_inset
20470
20471  [
20472 \begin_inset Flex Code
20473 status collapsed
20474
20475 \begin_layout Plain Layout
20476 string
20477 \end_layout
20478
20479 \end_inset
20480
20481 ] The tag to be used for the main label, replacing 
20482 \begin_inset Flex Code
20483 status collapsed
20484
20485 \begin_layout Plain Layout
20486 tag
20487 \end_layout
20488
20489 \end_inset
20490
20491  in the examples above.
20492  The default depends upon the setting of 
20493 \begin_inset Flex Code
20494 status collapsed
20495
20496 \begin_layout Plain Layout
20497 MultiPar
20498 \end_layout
20499
20500 \end_inset
20501
20502 : If 
20503 \begin_inset Flex Code
20504 status collapsed
20505
20506 \begin_layout Plain Layout
20507 MultiPar
20508 \end_layout
20509
20510 \end_inset
20511
20512  is true, the default is 
20513 \begin_inset Flex Code
20514 status collapsed
20515
20516 \begin_layout Plain Layout
20517 div
20518 \end_layout
20519
20520 \end_inset
20521
20522 ; if it is false, the default is 
20523 \begin_inset Flex Code
20524 status collapsed
20525
20526 \begin_layout Plain Layout
20527 span
20528 \end_layout
20529
20530 \end_inset
20531
20532 .
20533 \end_layout
20534
20535 \begin_layout Subsection
20536 Float XHTML
20537 \end_layout
20538
20539 \begin_layout Standard
20540 The XHTML output for floats too can be controlled by layout information.
20541  The output has the following form:
20542 \end_layout
20543
20544 \begin_layout LyX-Code
20545 <tag attr=
20546 \begin_inset Quotes erd
20547 \end_inset
20548
20549 value
20550 \begin_inset Quotes erd
20551 \end_inset
20552
20553 >
20554 \end_layout
20555
20556 \begin_layout LyX-Code
20557 Contents of the float.
20558 \end_layout
20559
20560 \begin_layout LyX-Code
20561 </tag>
20562 \end_layout
20563
20564 \begin_layout Standard
20565 The caption, if there is one, is a separate inset and will be output as
20566  such.
20567  Its appearance can be controlled via the InsetLayout for caption insets.
20568  
20569 \end_layout
20570
20571 \begin_layout Description
20572 \begin_inset Flex Code
20573 status collapsed
20574
20575 \begin_layout Plain Layout
20576 HTMLAttr
20577 \end_layout
20578
20579 \end_inset
20580
20581  [
20582 \begin_inset Flex Code
20583 status collapsed
20584
20585 \begin_layout Plain Layout
20586 string
20587 \end_layout
20588
20589 \end_inset
20590
20591 ] Specifies attribute information to be output with the main tag.
20592  For example, 
20593 \begin_inset Quotes eld
20594 \end_inset
20595
20596
20597 \begin_inset Flex Code
20598 status collapsed
20599
20600 \begin_layout Plain Layout
20601 class=`myfloat' onclick=`\SpecialChar \ldots{}
20602 '
20603 \end_layout
20604
20605 \end_inset
20606
20607
20608 \begin_inset Quotes erd
20609 \end_inset
20610
20611 .
20612  By default, LyX will output 
20613 \begin_inset Quotes eld
20614 \end_inset
20615
20616
20617 \begin_inset Flex Code
20618 status collapsed
20619
20620 \begin_layout Plain Layout
20621 class=`float float-floattype'
20622 \end_layout
20623
20624 \end_inset
20625
20626
20627 \begin_inset Quotes erd
20628 \end_inset
20629
20630 , where 
20631 \begin_inset Flex Code
20632 status collapsed
20633
20634 \begin_layout Plain Layout
20635 floattype
20636 \end_layout
20637
20638 \end_inset
20639
20640  is LyX's name for this type of float, as determined by the float declaration
20641  (see 
20642 \begin_inset CommandInset ref
20643 LatexCommand ref
20644 reference "sub:Floats"
20645
20646 \end_inset
20647
20648 ), though made lowercase and with non-alphanumeric characters converted
20649  to underscores, for example: float-table.
20650 \end_layout
20651
20652 \begin_layout Description
20653 \begin_inset Flex Code
20654 status collapsed
20655
20656 \begin_layout Plain Layout
20657 HTMLStyle
20658 \end_layout
20659
20660 \end_inset
20661
20662  CSS style information to be included when this float is used.
20663  Note that this will automatically be wrapped in a layout-generated 
20664 \begin_inset Flex Code
20665 status collapsed
20666
20667 \begin_layout Plain Layout
20668 <style>
20669 \end_layout
20670
20671 \end_inset
20672
20673  block, so only the CSS itself need be included.
20674 \end_layout
20675
20676 \begin_layout Description
20677 \begin_inset Flex Code
20678 status collapsed
20679
20680 \begin_layout Plain Layout
20681 HTMLTag
20682 \end_layout
20683
20684 \end_inset
20685
20686  [
20687 \begin_inset Flex Code
20688 status collapsed
20689
20690 \begin_layout Plain Layout
20691 string
20692 \end_layout
20693
20694 \end_inset
20695
20696 ] The tag to be used for this float, replacing 
20697 \begin_inset Quotes eld
20698 \end_inset
20699
20700
20701 \begin_inset Flex Code
20702 status collapsed
20703
20704 \begin_layout Plain Layout
20705 tag
20706 \end_layout
20707
20708 \end_inset
20709
20710
20711 \begin_inset Quotes erd
20712 \end_inset
20713
20714  in the example above.
20715  The default is 
20716 \begin_inset Flex Code
20717 status collapsed
20718
20719 \begin_layout Plain Layout
20720 div
20721 \end_layout
20722
20723 \end_inset
20724
20725  and will rarely need changing.
20726 \end_layout
20727
20728 \begin_layout Subsection
20729 Bibliography formatting
20730 \end_layout
20731
20732 \begin_layout Standard
20733 The bibliography can be formatted using 
20734 \begin_inset Flex Code
20735 status collapsed
20736
20737 \begin_layout Plain Layout
20738 CiteFormat
20739 \end_layout
20740
20741 \end_inset
20742
20743  blocks.
20744  See Section 
20745 \begin_inset CommandInset ref
20746 LatexCommand ref
20747 reference "sub:Citation-format-description"
20748
20749 \end_inset
20750
20751  for the details.
20752 \end_layout
20753
20754 \begin_layout Subsection
20755 LyX-generated CSS
20756 \end_layout
20757
20758 \begin_layout Standard
20759 We have several times mentioned that LyX will generate default CSS style
20760  rules for both insets and paragraph styles, based upon the other layout
20761  information that is provided.
20762  In this section, we shall say a word about which layout information LyX
20763  uses and how.
20764 \end_layout
20765
20766 \begin_layout Standard
20767 At present, LyX auto-generates CSS only for font information, making use
20768  of the 
20769 \begin_inset Flex Code
20770 status collapsed
20771
20772 \begin_layout Plain Layout
20773 Family
20774 \end_layout
20775
20776 \end_inset
20777
20778
20779 \begin_inset Flex Code
20780 status collapsed
20781
20782 \begin_layout Plain Layout
20783 Series
20784 \end_layout
20785
20786 \end_inset
20787
20788
20789 \begin_inset Flex Code
20790 status collapsed
20791
20792 \begin_layout Plain Layout
20793 Shape
20794 \end_layout
20795
20796 \end_inset
20797
20798 , and 
20799 \begin_inset Flex Code
20800 status collapsed
20801
20802 \begin_layout Plain Layout
20803 Size
20804 \end_layout
20805
20806 \end_inset
20807
20808  specified in the 
20809 \begin_inset Flex Code
20810 status collapsed
20811
20812 \begin_layout Plain Layout
20813 Font
20814 \end_layout
20815
20816 \end_inset
20817
20818  declaration.
20819  (See 
20820 \begin_inset CommandInset ref
20821 LatexCommand ref
20822 reference "sub:Font-description"
20823
20824 \end_inset
20825
20826 .) The translation is mostly straightforward and obvious.
20827  For example, 
20828 \begin_inset Quotes eld
20829 \end_inset
20830
20831
20832 \begin_inset Flex Code
20833 status collapsed
20834
20835 \begin_layout Plain Layout
20836 Family Sans
20837 \end_layout
20838
20839 \end_inset
20840
20841
20842 \begin_inset Quotes erd
20843 \end_inset
20844
20845  becomes 
20846 \begin_inset Quotes eld
20847 \end_inset
20848
20849
20850 \begin_inset Flex Code
20851 status collapsed
20852
20853 \begin_layout Plain Layout
20854 font-family: sans-serif;
20855 \end_layout
20856
20857 \end_inset
20858
20859
20860 \begin_inset Quotes erd
20861 \end_inset
20862
20863 .
20864  The correspondence of LyX sizes and CSS sizes is a little less obvious
20865  but nonetheless intuitive.
20866  See the 
20867 \begin_inset Flex Code
20868 status collapsed
20869
20870 \begin_layout Plain Layout
20871 getSizeCSS()
20872 \end_layout
20873
20874 \end_inset
20875
20876  function in 
20877 \begin_inset Flex URL
20878 status collapsed
20879
20880 \begin_layout Plain Layout
20881
20882 src/FontInfo.cpp
20883 \end_layout
20884
20885 \end_inset
20886
20887  for the details.
20888 \end_layout
20889
20890 \begin_layout Chapter
20891 Including External Material
20892 \end_layout
20893
20894 \begin_layout Standard
20895 \begin_inset Box Shadowbox
20896 position "t"
20897 hor_pos "c"
20898 has_inner_box 1
20899 inner_pos "t"
20900 use_parbox 0
20901 use_makebox 0
20902 width "100col%"
20903 special "none"
20904 height "1in"
20905 height_special "totalheight"
20906 status open
20907
20908 \begin_layout Plain Layout
20909 WARNING: This portion of the documentation has not been updated for some
20910  time.
20911  We certainly hope that it is still accurate, but there are no guarantees.
20912 \end_layout
20913
20914 \end_inset
20915
20916
20917 \end_layout
20918
20919 \begin_layout Standard
20920 The use of material from sources external to LyX is covered in detail in
20921  the 
20922 \emph on
20923 Embedded Objects
20924 \emph default
20925  manual.
20926  This part of the manual covers what needs to happen behind the scenes for
20927  new sorts of material to be included.
20928 \end_layout
20929
20930 \begin_layout Section
20931 How does it work?
20932 \end_layout
20933
20934 \begin_layout Standard
20935 The external material feature is based on the concept of a 
20936 \emph on
20937 template
20938 \emph default
20939 .
20940  A template is a specification of how LyX should interface with a certain
20941  kind of material.
20942  As bundled, LyX comes with predefined templates for Xfig figures, various
20943  raster format images, chess diagrams, and LilyPond music notation.
20944  You can check the actual list by using the menu 
20945 \begin_inset Flex MenuItem
20946 status collapsed
20947
20948 \begin_layout Plain Layout
20949 Insert\SpecialChar \menuseparator
20950 File\SpecialChar \menuseparator
20951 External Material
20952 \end_layout
20953
20954 \end_inset
20955
20956 .
20957  Furthermore, it is possible to roll your own template to support a specific
20958  kind of material.
20959  Later we'll describe in more detail what is involved, and hopefully you
20960  will submit all the templates you create so we can include them in a later
20961  LyX version.
20962 \end_layout
20963
20964 \begin_layout Standard
20965 Another basic idea of the external material feature is to distinguish between
20966  the original file that serves as a base for final material and the produced
20967  file that is included in your exported or printed document.
20968  For example, consider the case of a figure produced with 
20969 \begin_inset Flex Code
20970 status collapsed
20971
20972 \begin_layout Plain Layout
20973 Xfig
20974 \end_layout
20975
20976 \end_inset
20977
20978 .
20979  The Xfig application itself works on an original file with the 
20980 \begin_inset Flex Code
20981 status collapsed
20982
20983 \begin_layout Plain Layout
20984 .fig
20985 \end_layout
20986
20987 \end_inset
20988
20989  extension.
20990  Within Xfig, you create and change your figure, and when you are done,
20991  you save the 
20992 \begin_inset Flex Code
20993 status collapsed
20994
20995 \begin_layout Plain Layout
20996 fig
20997 \end_layout
20998
20999 \end_inset
21000
21001 -file.
21002  When you want to include the figure in your document, you invoke 
21003 \begin_inset Flex Code
21004 status collapsed
21005
21006 \begin_layout Plain Layout
21007 transfig
21008 \end_layout
21009
21010 \end_inset
21011
21012  in order to create a PostScript file that can readily be included in your
21013  LaTeX file.
21014  In this case, the 
21015 \begin_inset Flex Code
21016 status collapsed
21017
21018 \begin_layout Plain Layout
21019 .fig
21020 \end_layout
21021
21022 \end_inset
21023
21024  file is the original file, and the PostScript file is the produced file.
21025 \end_layout
21026
21027 \begin_layout Standard
21028 This distinction is important in order to allow updating of the material
21029  while you are in the process of writing the document.
21030  Furthermore, it provides us with the flexibility that is needed to support
21031  multiple export formats.
21032  For instance, in the case of a plain text file, it is not exactly an award-winn
21033 ing idea to include the figure as raw PostScript.
21034  Instead, you would either prefer to just include a reference to the figure
21035  or try to invoke some graphics to ASCII converter to make the final result
21036  look similar to the real graphics.
21037  The external material management allows you to do this, because it is parametri
21038 zed on the different export formats that LyX supports.
21039 \end_layout
21040
21041 \begin_layout Standard
21042 Besides supporting the production of different products according to the
21043  exported format, it supports tight integration with editing and viewing
21044  applications.
21045  In the case of an Xfig figure, you are able to invoke Xfig on the original
21046  file with a single click from within the external material dialog in LyX,
21047  and also preview the produced PostScript file with Ghostview with another
21048  click.
21049  No more fiddling around with the command line and/or file browsers to locate
21050  and manipulate the original or produced files.
21051  In this way, you are finally able to take full advantage of the many different
21052  applications that are relevant to use when you write your documents, and
21053  ultimately be more productive.
21054 \end_layout
21055
21056 \begin_layout Section
21057 The external template configuration file
21058 \end_layout
21059
21060 \begin_layout Standard
21061 It is relatively easy to add custom external template definitions to LyX.
21062  However, be aware that doing this in an careless manner most probably 
21063 \emph on
21064 will
21065 \emph default
21066  introduce an easily exploitable security hole.
21067  So before you do this, please read the discussion about security in section
21068  
21069 \begin_inset CommandInset ref
21070 LatexCommand ref
21071 reference "sec:Security-discussion"
21072
21073 \end_inset
21074
21075 .
21076 \end_layout
21077
21078 \begin_layout Standard
21079 Having said that, we encourage you to submit any interesting templates that
21080  you create.
21081  
21082 \end_layout
21083
21084 \begin_layout Standard
21085 The external templates are defined in the 
21086 \begin_inset Flex Code
21087 status collapsed
21088
21089 \begin_layout Plain Layout
21090 LyXDir/lib/external_templates
21091 \end_layout
21092
21093 \end_inset
21094
21095  file.
21096  You can place your own version in 
21097 \begin_inset Flex Code
21098 status collapsed
21099
21100 \begin_layout Plain Layout
21101 UserDir/external_templates
21102 \end_layout
21103
21104 \end_inset
21105
21106 .
21107 \end_layout
21108
21109 \begin_layout Standard
21110 A typical template looks like this:
21111 \end_layout
21112
21113 \begin_layout LyX-Code
21114 Template XFig
21115 \end_layout
21116
21117 \begin_layout LyX-Code
21118 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
21119 \end_layout
21120
21121 \begin_layout LyX-Code
21122 HelpText
21123 \end_layout
21124
21125 \begin_layout LyX-Code
21126 An XFig figure.
21127 \end_layout
21128
21129 \begin_layout LyX-Code
21130 HelpTextEnd
21131 \end_layout
21132
21133 \begin_layout LyX-Code
21134 InputFormat fig
21135 \end_layout
21136
21137 \begin_layout LyX-Code
21138 FileFilter "*.fig"
21139 \end_layout
21140
21141 \begin_layout LyX-Code
21142 AutomaticProduction true
21143 \end_layout
21144
21145 \begin_layout LyX-Code
21146 Transform Rotate
21147 \end_layout
21148
21149 \begin_layout LyX-Code
21150 Transform Resize
21151 \end_layout
21152
21153 \begin_layout LyX-Code
21154 Format LaTeX
21155 \end_layout
21156
21157 \begin_layout LyX-Code
21158 TransformCommand Rotate RotationLatexCommand
21159 \end_layout
21160
21161 \begin_layout LyX-Code
21162 TransformCommand Resize ResizeLatexCommand
21163 \end_layout
21164
21165 \begin_layout LyX-Code
21166 Product "$$RotateFront$$ResizeFront
21167 \end_layout
21168
21169 \begin_layout LyX-Code
21170          
21171 \backslash
21172
21173 \backslash
21174 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
21175 \end_layout
21176
21177 \begin_layout LyX-Code
21178          $$ResizeBack$$RotateBack"
21179 \end_layout
21180
21181 \begin_layout LyX-Code
21182 UpdateFormat pstex
21183 \end_layout
21184
21185 \begin_layout LyX-Code
21186 UpdateResult "$$AbsPath$$Basename.pstex_t"
21187 \end_layout
21188
21189 \begin_layout LyX-Code
21190 Requirement "graphicx"
21191 \end_layout
21192
21193 \begin_layout LyX-Code
21194 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
21195 \end_layout
21196
21197 \begin_layout LyX-Code
21198 ReferencedFile latex "$$AbsPath$$Basename.eps"
21199 \end_layout
21200
21201 \begin_layout LyX-Code
21202 ReferencedFile dvi "$$AbsPath$$Basename.eps"
21203 \end_layout
21204
21205 \begin_layout LyX-Code
21206 FormatEnd
21207 \end_layout
21208
21209 \begin_layout LyX-Code
21210 Format PDFLaTeX
21211 \end_layout
21212
21213 \begin_layout LyX-Code
21214 TransformCommand Rotate RotationLatexCommand
21215 \end_layout
21216
21217 \begin_layout LyX-Code
21218 TransformCommand Resize ResizeLatexCommand
21219 \end_layout
21220
21221 \begin_layout LyX-Code
21222 Product "$$RotateFront$$ResizeFront
21223 \end_layout
21224
21225 \begin_layout LyX-Code
21226          
21227 \backslash
21228
21229 \backslash
21230 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
21231 \end_layout
21232
21233 \begin_layout LyX-Code
21234          $$ResizeBack$$RotateBack"
21235 \end_layout
21236
21237 \begin_layout LyX-Code
21238 UpdateFormat pdftex
21239 \end_layout
21240
21241 \begin_layout LyX-Code
21242 UpdateResult "$$AbsPath$$Basename.pdftex_t"
21243 \end_layout
21244
21245 \begin_layout LyX-Code
21246 Requirement "graphicx"
21247 \end_layout
21248
21249 \begin_layout LyX-Code
21250 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
21251 \end_layout
21252
21253 \begin_layout LyX-Code
21254 ReferencedFile latex "$$AbsPath$$Basename.pdf"
21255 \end_layout
21256
21257 \begin_layout LyX-Code
21258 FormatEnd
21259 \end_layout
21260
21261 \begin_layout LyX-Code
21262 Format Ascii
21263 \end_layout
21264
21265 \begin_layout LyX-Code
21266 Product "$$Contents(
21267 \backslash
21268 "$$AbsPath$$Basename.asc
21269 \backslash
21270 ")"
21271 \end_layout
21272
21273 \begin_layout LyX-Code
21274 UpdateFormat asciixfig
21275 \end_layout
21276
21277 \begin_layout LyX-Code
21278 UpdateResult "$$AbsPath$$Basename.asc"
21279 \end_layout
21280
21281 \begin_layout LyX-Code
21282 FormatEnd
21283 \end_layout
21284
21285 \begin_layout LyX-Code
21286 Format DocBook
21287 \end_layout
21288
21289 \begin_layout LyX-Code
21290 Product "<graphic fileref=
21291 \backslash
21292 "$$AbsOrRelPathMaster$$Basename.eps
21293 \backslash
21294 ">
21295 \end_layout
21296
21297 \begin_layout LyX-Code
21298          </graphic>"
21299 \end_layout
21300
21301 \begin_layout LyX-Code
21302 UpdateFormat eps
21303 \end_layout
21304
21305 \begin_layout LyX-Code
21306 UpdateResult "$$AbsPath$$Basename.eps"
21307 \end_layout
21308
21309 \begin_layout LyX-Code
21310 ReferencedFile docbook "$$AbsPath$$Basename.eps"
21311 \end_layout
21312
21313 \begin_layout LyX-Code
21314 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
21315 \end_layout
21316
21317 \begin_layout LyX-Code
21318 FormatEnd
21319 \end_layout
21320
21321 \begin_layout LyX-Code
21322 Product "[XFig: $$FName]"
21323 \end_layout
21324
21325 \begin_layout LyX-Code
21326 FormatEnd
21327 \end_layout
21328
21329 \begin_layout LyX-Code
21330 TemplateEnd
21331 \end_layout
21332
21333 \begin_layout Standard
21334 As you can see, the template is enclosed in 
21335 \begin_inset Flex Code
21336 status collapsed
21337
21338 \begin_layout Plain Layout
21339 Template
21340 \end_layout
21341
21342 \end_inset
21343
21344  \SpecialChar \ldots{}
21345  
21346 \begin_inset Flex Code
21347 status collapsed
21348
21349 \begin_layout Plain Layout
21350 TemplateEnd
21351 \end_layout
21352
21353 \end_inset
21354
21355 .
21356  It contains a header specifying some general settings and, for each supported
21357  primary document file format, a section 
21358 \begin_inset Flex Code
21359 status collapsed
21360
21361 \begin_layout Plain Layout
21362 Format
21363 \end_layout
21364
21365 \end_inset
21366
21367  \SpecialChar \ldots{}
21368  
21369 \begin_inset Flex Code
21370 status collapsed
21371
21372 \begin_layout Plain Layout
21373 FormatEnd
21374 \end_layout
21375
21376 \end_inset
21377
21378 .
21379 \end_layout
21380
21381 \begin_layout Subsection
21382 The template header
21383 \end_layout
21384
21385 \begin_layout Description
21386 \begin_inset Flex Code
21387 status collapsed
21388
21389 \begin_layout Plain Layout
21390 AutomaticProduction
21391 \begin_inset space ~
21392 \end_inset
21393
21394 true|false
21395 \end_layout
21396
21397 \end_inset
21398
21399  Whether the file represented by the template must be generated by LyX.
21400  This command must occur exactly once.
21401 \end_layout
21402
21403 \begin_layout Description
21404 \begin_inset Flex Code
21405 status collapsed
21406
21407 \begin_layout Plain Layout
21408 FileFilter
21409 \begin_inset space ~
21410 \end_inset
21411
21412 <pattern>
21413 \end_layout
21414
21415 \end_inset
21416
21417  A glob pattern that is used in the file dialog to filter out the desired
21418  files.
21419  If there is more than one possible file extension (e.
21420 \begin_inset space \thinspace{}
21421 \end_inset
21422
21423 g.
21424 \begin_inset space \space{}
21425 \end_inset
21426
21427 tgif has 
21428 \begin_inset Flex Code
21429 status collapsed
21430
21431 \begin_layout Plain Layout
21432 .obj
21433 \end_layout
21434
21435 \end_inset
21436
21437  and 
21438 \begin_inset Flex Code
21439 status collapsed
21440
21441 \begin_layout Plain Layout
21442 .tgo
21443 \end_layout
21444
21445 \end_inset
21446
21447 ), use something like 
21448 \begin_inset Flex Code
21449 status collapsed
21450
21451 \begin_layout Plain Layout
21452 "*.{obj,tgo}"
21453 \end_layout
21454
21455 \end_inset
21456
21457 .
21458  This command must occur exactly once.
21459 \end_layout
21460
21461 \begin_layout Description
21462 \begin_inset Flex Code
21463 status collapsed
21464
21465 \begin_layout Plain Layout
21466 GuiName
21467 \begin_inset space ~
21468 \end_inset
21469
21470 <guiname>
21471 \end_layout
21472
21473 \end_inset
21474
21475  The text that is displayed on the button.
21476  This command must occur exactly once.
21477 \end_layout
21478
21479 \begin_layout Description
21480 \begin_inset Flex Code
21481 status collapsed
21482
21483 \begin_layout Plain Layout
21484 HelpText
21485 \begin_inset space ~
21486 \end_inset
21487
21488 <text>
21489 \begin_inset space ~
21490 \end_inset
21491
21492 HelpTextEnd
21493 \end_layout
21494
21495 \end_inset
21496
21497  The help text that is used in the External dialog.
21498  Provide enough information to explain to the user just what the template
21499  can provide him with.
21500  This command must occur exactly once.
21501 \end_layout
21502
21503 \begin_layout Description
21504 \begin_inset Flex Code
21505 status collapsed
21506
21507 \begin_layout Plain Layout
21508 InputFormat
21509 \begin_inset space ~
21510 \end_inset
21511
21512 <format>
21513 \end_layout
21514
21515 \end_inset
21516
21517  The file format of the original file.
21518  This must be the name of a format that is known to LyX (see section
21519 \begin_inset space ~
21520 \end_inset
21521
21522
21523 \begin_inset CommandInset ref
21524 LatexCommand ref
21525 reference "sec:Formats"
21526
21527 \end_inset
21528
21529 ).
21530  Use 
21531 \begin_inset Quotes eld
21532 \end_inset
21533
21534
21535 \begin_inset Flex Code
21536 status collapsed
21537
21538 \begin_layout Plain Layout
21539 *
21540 \end_layout
21541
21542 \end_inset
21543
21544
21545 \begin_inset Quotes erd
21546 \end_inset
21547
21548  if the template can handle original files of more than one format.
21549  LyX will attempt to interrogate the file itself in order to deduce its
21550  format in this case.
21551  This command must occur exactly once.
21552 \end_layout
21553
21554 \begin_layout Description
21555 \begin_inset Flex Code
21556 status collapsed
21557
21558 \begin_layout Plain Layout
21559 Template
21560 \begin_inset space ~
21561 \end_inset
21562
21563 <id>
21564 \end_layout
21565
21566 \end_inset
21567
21568  A unique name for the template.
21569  It must not contain substitution macros (see below).
21570 \end_layout
21571
21572 \begin_layout Description
21573 \begin_inset Flex Code
21574 status collapsed
21575
21576 \begin_layout Plain Layout
21577 Transform
21578 \begin_inset space ~
21579 \end_inset
21580
21581 Rotate|Resize|Clip|Extra
21582 \end_layout
21583
21584 \end_inset
21585
21586  This command specifies which transformations are supported by this template.
21587  It may occur zero or more times.
21588  This command enables the corresponding tabs in the external dialog.
21589  Each 
21590 \begin_inset Flex Code
21591 status collapsed
21592
21593 \begin_layout Plain Layout
21594 Transform
21595 \end_layout
21596
21597 \end_inset
21598
21599  command must have either a corresponding 
21600 \begin_inset Flex Code
21601 status collapsed
21602
21603 \begin_layout Plain Layout
21604 TransformCommand
21605 \end_layout
21606
21607 \end_inset
21608
21609  or a 
21610 \begin_inset Flex Code
21611 status collapsed
21612
21613 \begin_layout Plain Layout
21614 TransformOption
21615 \end_layout
21616
21617 \end_inset
21618
21619  command in the 
21620 \begin_inset Flex Code
21621 status collapsed
21622
21623 \begin_layout Plain Layout
21624 Format
21625 \end_layout
21626
21627 \end_inset
21628
21629  section.
21630  Otherwise the transformation will not be supported by that format.
21631 \end_layout
21632
21633 \begin_layout Subsection
21634 The Format section
21635 \end_layout
21636
21637 \begin_layout Description
21638 \begin_inset Flex Code
21639 status collapsed
21640
21641 \begin_layout Plain Layout
21642 Format
21643 \begin_inset space ~
21644 \end_inset
21645
21646 LaTeX|PDFLaTeX|PlainText|DocBook
21647 \end_layout
21648
21649 \end_inset
21650
21651  The primary document file format that this format definition is for.
21652  Not every template has a sensible representation in all document file formats.
21653  Please define nevertheless a 
21654 \begin_inset Flex Code
21655 status collapsed
21656
21657 \begin_layout Plain Layout
21658 Format
21659 \end_layout
21660
21661 \end_inset
21662
21663  section for all templates.
21664  Use a dummy text when no representation is available.
21665  Then you can at least see a reference to the external material in the exported
21666  document.
21667 \end_layout
21668
21669 \begin_layout Description
21670 \begin_inset Flex Code
21671 status collapsed
21672
21673 \begin_layout Plain Layout
21674 Option
21675 \begin_inset space ~
21676 \end_inset
21677
21678 <name>
21679 \begin_inset space ~
21680 \end_inset
21681
21682 <value>
21683 \end_layout
21684
21685 \end_inset
21686
21687  This command defines an additional macro 
21688 \begin_inset Flex Code
21689 status collapsed
21690
21691 \begin_layout Plain Layout
21692 $$<name>
21693 \end_layout
21694
21695 \end_inset
21696
21697  for substitution in 
21698 \begin_inset Flex Code
21699 status collapsed
21700
21701 \begin_layout Plain Layout
21702 Product
21703 \end_layout
21704
21705 \end_inset
21706
21707 .
21708  
21709 \begin_inset Flex Code
21710 status collapsed
21711
21712 \begin_layout Plain Layout
21713 <value>
21714 \end_layout
21715
21716 \end_inset
21717
21718  itself may contain substitution macros.
21719  The advantage over using 
21720 \begin_inset Flex Code
21721 status collapsed
21722
21723 \begin_layout Plain Layout
21724 <value>
21725 \end_layout
21726
21727 \end_inset
21728
21729  directly in 
21730 \begin_inset Flex Code
21731 status collapsed
21732
21733 \begin_layout Plain Layout
21734 Product
21735 \end_layout
21736
21737 \end_inset
21738
21739  is that the substituted value of 
21740 \begin_inset Flex Code
21741 status collapsed
21742
21743 \begin_layout Plain Layout
21744 $$<name>
21745 \end_layout
21746
21747 \end_inset
21748
21749  is sanitized so that it is a valid optional argument in the document format.
21750  This command may occur zero or more times.
21751 \end_layout
21752
21753 \begin_layout Description
21754 \begin_inset Flex Code
21755 status collapsed
21756
21757 \begin_layout Plain Layout
21758 Product
21759 \begin_inset space ~
21760 \end_inset
21761
21762 <text>
21763 \end_layout
21764
21765 \end_inset
21766
21767  The text that is inserted in the exported document.
21768  This is actually the most important command and can be quite complex.
21769  This command must occur exactly once.
21770 \end_layout
21771
21772 \begin_layout Description
21773 \begin_inset Flex Code
21774 status collapsed
21775
21776 \begin_layout Plain Layout
21777 Preamble
21778 \begin_inset space ~
21779 \end_inset
21780
21781 <name>
21782 \end_layout
21783
21784 \end_inset
21785
21786  This command specifies a preamble snippet that will be included in the
21787  LaTeX preamble.
21788  It has to be defined using 
21789 \begin_inset Flex Code
21790 status collapsed
21791
21792 \begin_layout Plain Layout
21793 PreambleDef
21794 \end_layout
21795
21796 \end_inset
21797
21798  \SpecialChar \ldots{}
21799  
21800 \begin_inset Flex Code
21801 status collapsed
21802
21803 \begin_layout Plain Layout
21804 PreambleDefEnd
21805 \end_layout
21806
21807 \end_inset
21808
21809 .
21810  This command may occur zero or more times.
21811 \end_layout
21812
21813 \begin_layout Description
21814 \begin_inset Flex Code
21815 status collapsed
21816
21817 \begin_layout Plain Layout
21818 ReferencedFile
21819 \begin_inset space ~
21820 \end_inset
21821
21822 <format>
21823 \begin_inset space ~
21824 \end_inset
21825
21826 <filename>
21827 \end_layout
21828
21829 \end_inset
21830
21831  This command denotes files that are created by the conversion process and
21832  are needed for a particular export format.
21833  If the filename is relative, it is interpreted relative to the master document.
21834  This command may be given zero or more times.
21835 \end_layout
21836
21837 \begin_layout Description
21838 \begin_inset Flex Code
21839 status collapsed
21840
21841 \begin_layout Plain Layout
21842 Requirement
21843 \begin_inset space ~
21844 \end_inset
21845
21846 <package>
21847 \end_layout
21848
21849 \end_inset
21850
21851  The name of a required LaTeX package.
21852  The package is included via 
21853 \begin_inset Flex Code
21854 status collapsed
21855
21856 \begin_layout Plain Layout
21857
21858 \backslash
21859 usepackage{}
21860 \end_layout
21861
21862 \end_inset
21863
21864  in the LaTeX preamble.
21865  This command may occur zero or more times.
21866 \end_layout
21867
21868 \begin_layout Description
21869 \begin_inset Flex Code
21870 status collapsed
21871
21872 \begin_layout Plain Layout
21873 TransformCommand
21874 \begin_inset space ~
21875 \end_inset
21876
21877 Rotate
21878 \begin_inset space ~
21879 \end_inset
21880
21881 RotationLatexCommand
21882 \end_layout
21883
21884 \end_inset
21885
21886  This command specifies that the built in LaTeX command should be used for
21887  rotation.
21888  This command may occur once or not at all.
21889 \end_layout
21890
21891 \begin_layout Description
21892 \begin_inset Flex Code
21893 status collapsed
21894
21895 \begin_layout Plain Layout
21896 TransformCommand
21897 \begin_inset space ~
21898 \end_inset
21899
21900 Resize
21901 \begin_inset space ~
21902 \end_inset
21903
21904 ResizeLatexCommand
21905 \end_layout
21906
21907 \end_inset
21908
21909  This command specifies that the built in LaTeX command should be used for
21910  resizing.
21911  This command may occur once or not at all.
21912 \end_layout
21913
21914 \begin_layout Description
21915 \begin_inset Flex Code
21916 status collapsed
21917
21918 \begin_layout Plain Layout
21919 TransformOption
21920 \begin_inset space ~
21921 \end_inset
21922
21923 Rotate
21924 \begin_inset space ~
21925 \end_inset
21926
21927 RotationLatexOption
21928 \end_layout
21929
21930 \end_inset
21931
21932  This command specifies that rotation is done via an optional argument.
21933  This command may occur once or not at all.
21934 \end_layout
21935
21936 \begin_layout Description
21937 \begin_inset Flex Code
21938 status collapsed
21939
21940 \begin_layout Plain Layout
21941 TransformOption
21942 \begin_inset space ~
21943 \end_inset
21944
21945 Resize
21946 \begin_inset space ~
21947 \end_inset
21948
21949 ResizeLatexOption
21950 \end_layout
21951
21952 \end_inset
21953
21954  This command specifies that resizing is done via an optional argument.
21955  This command may occur once or not at all.
21956 \end_layout
21957
21958 \begin_layout Description
21959 \begin_inset Flex Code
21960 status collapsed
21961
21962 \begin_layout Plain Layout
21963 TransformOption
21964 \begin_inset space ~
21965 \end_inset
21966
21967 Clip
21968 \begin_inset space ~
21969 \end_inset
21970
21971 ClipLatexOption
21972 \end_layout
21973
21974 \end_inset
21975
21976  This command specifies that clipping is done via an optional argument.
21977  This command may occur once or not at all.
21978 \end_layout
21979
21980 \begin_layout Description
21981 \begin_inset Flex Code
21982 status collapsed
21983
21984 \begin_layout Plain Layout
21985 TransformOption
21986 \begin_inset space ~
21987 \end_inset
21988
21989 Extra
21990 \begin_inset space ~
21991 \end_inset
21992
21993 ExtraLatexOption
21994 \end_layout
21995
21996 \end_inset
21997
21998  This command specifies that an extra optional argument is used.
21999  This command may occur once or not at all.
22000 \end_layout
22001
22002 \begin_layout Description
22003 \begin_inset Flex Code
22004 status collapsed
22005
22006 \begin_layout Plain Layout
22007 UpdateFormat
22008 \begin_inset space ~
22009 \end_inset
22010
22011 <format>
22012 \end_layout
22013
22014 \end_inset
22015
22016  The file format of the converted file.
22017  This must be the name of a format that is known to LyX (see the 
22018 \begin_inset Flex MenuItem
22019 status collapsed
22020
22021 \begin_layout Plain Layout
22022
22023 \bar under
22024 T
22025 \bar default
22026 ools\SpecialChar \menuseparator
22027
22028 \bar under
22029 P
22030 \bar default
22031 references\SpecialChar \menuseparator
22032 File Handling\SpecialChar \menuseparator
22033 File Format
22034 \end_layout
22035
22036 \end_inset
22037
22038  dialog).
22039  This command must occur exactly once.
22040 \end_layout
22041
22042 \begin_layout Description
22043 \begin_inset Flex Code
22044 status collapsed
22045
22046 \begin_layout Plain Layout
22047 UpdateResult
22048 \begin_inset space ~
22049 \end_inset
22050
22051 <filename>
22052 \end_layout
22053
22054 \end_inset
22055
22056  The file name of the converted file.
22057  The file name must be absolute.
22058  This command must occur exactly once.
22059 \end_layout
22060
22061 \begin_layout Subsection
22062 Preamble definitions
22063 \end_layout
22064
22065 \begin_layout Standard
22066 The external template configuration file may contain additional preamble
22067  definitions enclosed by 
22068 \begin_inset Flex Code
22069 status collapsed
22070
22071 \begin_layout Plain Layout
22072 PreambleDef
22073 \end_layout
22074
22075 \end_inset
22076
22077  \SpecialChar \ldots{}
22078  
22079 \begin_inset Flex Code
22080 status collapsed
22081
22082 \begin_layout Plain Layout
22083 PreambleDefEnd
22084 \end_layout
22085
22086 \end_inset
22087
22088 .
22089  They can be used by the templates in the 
22090 \begin_inset Flex Code
22091 status collapsed
22092
22093 \begin_layout Plain Layout
22094 Format
22095 \end_layout
22096
22097 \end_inset
22098
22099  section.
22100 \end_layout
22101
22102 \begin_layout Section
22103 The substitution mechanism
22104 \end_layout
22105
22106 \begin_layout Standard
22107 When the external material facility invokes an external program, it is done
22108  on the basis of a command defined in the template configuration file.
22109  These commands can contain various macros that are expanded before execution.
22110  Execution always take place in the directory of the containing document.
22111 \end_layout
22112
22113 \begin_layout Standard
22114 Also, whenever external material is to be displayed, the name will be produced
22115  by the substitution mechanism, and most other commands in the template
22116  definition support substitution as well.
22117 \end_layout
22118
22119 \begin_layout Standard
22120 The available macros are the following:
22121 \end_layout
22122
22123 \begin_layout Description
22124 \begin_inset Flex Code
22125 status collapsed
22126
22127 \begin_layout Plain Layout
22128 $$AbsOrRelPathMaster
22129 \end_layout
22130
22131 \end_inset
22132
22133  The file path, absolute or relative to the master LyX document.
22134 \end_layout
22135
22136 \begin_layout Description
22137 \begin_inset Flex Code
22138 status collapsed
22139
22140 \begin_layout Plain Layout
22141 $$AbsOrRelPathParent
22142 \end_layout
22143
22144 \end_inset
22145
22146  The file path, absolute or relative to the LyX document.
22147 \end_layout
22148
22149 \begin_layout Description
22150 \begin_inset Flex Code
22151 status collapsed
22152
22153 \begin_layout Plain Layout
22154 $$AbsPath
22155 \end_layout
22156
22157 \end_inset
22158
22159  The absolute file path.
22160 \end_layout
22161
22162 \begin_layout Description
22163 \begin_inset Flex Code
22164 status collapsed
22165
22166 \begin_layout Plain Layout
22167 $$Basename
22168 \end_layout
22169
22170 \end_inset
22171
22172  The filename without path and without the extension.
22173 \end_layout
22174
22175 \begin_layout Description
22176 \begin_inset Flex Code
22177 status collapsed
22178
22179 \begin_layout Plain Layout
22180 $$Contents(
22181 \begin_inset Quotes eld
22182 \end_inset
22183
22184 filename.ext
22185 \begin_inset Quotes erd
22186 \end_inset
22187
22188 )
22189 \end_layout
22190
22191 \end_inset
22192
22193  This macro will expand to the contents of the file with the name 
22194 \begin_inset Flex Code
22195 status collapsed
22196
22197 \begin_layout Plain Layout
22198 filename.ext
22199 \end_layout
22200
22201 \end_inset
22202
22203 .
22204 \end_layout
22205
22206 \begin_layout Description
22207 \begin_inset Flex Code
22208 status collapsed
22209
22210 \begin_layout Plain Layout
22211 $$Extension
22212 \end_layout
22213
22214 \end_inset
22215
22216  The file extension (including the dot).
22217 \end_layout
22218
22219 \begin_layout Description
22220 \begin_inset Flex Code
22221 status collapsed
22222
22223 \begin_layout Plain Layout
22224 $$FName
22225 \end_layout
22226
22227 \end_inset
22228
22229  The filename of the file specified in the external material dialog.
22230  This is either an absolute name, or it is relative to the LyX document.
22231 \end_layout
22232
22233 \begin_layout Description
22234 \begin_inset Flex Code
22235 status collapsed
22236
22237 \begin_layout Plain Layout
22238 $$FPath
22239 \end_layout
22240
22241 \end_inset
22242
22243  The path part of 
22244 \begin_inset Flex Code
22245 status collapsed
22246
22247 \begin_layout Plain Layout
22248 $$FName
22249 \end_layout
22250
22251 \end_inset
22252
22253  (absolute name or relative to the LyX document).
22254 \end_layout
22255
22256 \begin_layout Description
22257 \begin_inset Flex Code
22258 status collapsed
22259
22260 \begin_layout Plain Layout
22261 $$RelPathMaster
22262 \end_layout
22263
22264 \end_inset
22265
22266  The file path, relative to the master LyX document.
22267 \end_layout
22268
22269 \begin_layout Description
22270 \begin_inset Flex Code
22271 status collapsed
22272
22273 \begin_layout Plain Layout
22274 $$RelPathParent
22275 \end_layout
22276
22277 \end_inset
22278
22279  The file path, relative to the LyX document.
22280 \end_layout
22281
22282 \begin_layout Description
22283 \begin_inset Flex Code
22284 status collapsed
22285
22286 \begin_layout Plain Layout
22287 $$Sysdir
22288 \end_layout
22289
22290 \end_inset
22291
22292  This macro will expand to the absolute path of the system directory.
22293  This is typically used to point to the various helper scripts that are
22294  bundled with LyX.
22295 \end_layout
22296
22297 \begin_layout Description
22298 \begin_inset Flex Code
22299 status collapsed
22300
22301 \begin_layout Plain Layout
22302 $$Tempname
22303 \end_layout
22304
22305 \end_inset
22306
22307  A name and full path to a temporary file which will be automatically deleted
22308  whenever the containing document is closed, or the external material insertion
22309  deleted.
22310 \end_layout
22311
22312 \begin_layout Standard
22313 All path macros contain a trailing directory separator, so you can construct
22314  e.
22315 \begin_inset space \thinspace{}
22316 \end_inset
22317
22318 g.
22319 \begin_inset space \space{}
22320 \end_inset
22321
22322 the absolute filename with 
22323 \begin_inset Flex Code
22324 status collapsed
22325
22326 \begin_layout Plain Layout
22327 $$AbsPath$$Basename$$Extension
22328 \end_layout
22329
22330 \end_inset
22331
22332 .
22333 \end_layout
22334
22335 \begin_layout Standard
22336 The macros above are substituted in all commands unless otherwise noted.
22337  The command 
22338 \begin_inset Flex Code
22339 status collapsed
22340
22341 \begin_layout Plain Layout
22342 Product
22343 \end_layout
22344
22345 \end_inset
22346
22347  supports additionally the following substitutions if they are enabled by
22348  the 
22349 \begin_inset Flex Code
22350 status collapsed
22351
22352 \begin_layout Plain Layout
22353 Transform
22354 \end_layout
22355
22356 \end_inset
22357
22358  and 
22359 \begin_inset Flex Code
22360 status collapsed
22361
22362 \begin_layout Plain Layout
22363 TransformCommand
22364 \end_layout
22365
22366 \end_inset
22367
22368  commands:
22369 \end_layout
22370
22371 \begin_layout Description
22372 \begin_inset Flex Code
22373 status collapsed
22374
22375 \begin_layout Plain Layout
22376 $$ResizeFront
22377 \end_layout
22378
22379 \end_inset
22380
22381  The front part of the resize command.
22382 \end_layout
22383
22384 \begin_layout Description
22385 \begin_inset Flex Code
22386 status collapsed
22387
22388 \begin_layout Plain Layout
22389 $$ResizeBack
22390 \end_layout
22391
22392 \end_inset
22393
22394  The back part of the resize command.
22395 \end_layout
22396
22397 \begin_layout Description
22398 \begin_inset Flex Code
22399 status collapsed
22400
22401 \begin_layout Plain Layout
22402 $$RotateFront
22403 \end_layout
22404
22405 \end_inset
22406
22407  The front part of the rotation command.
22408 \end_layout
22409
22410 \begin_layout Description
22411 \begin_inset Flex Code
22412 status collapsed
22413
22414 \begin_layout Plain Layout
22415 $$RotateBack
22416 \end_layout
22417
22418 \end_inset
22419
22420  The back part of the rotation command.
22421 \end_layout
22422
22423 \begin_layout Standard
22424 The value string of the 
22425 \begin_inset Flex Code
22426 status collapsed
22427
22428 \begin_layout Plain Layout
22429 Option
22430 \end_layout
22431
22432 \end_inset
22433
22434  command supports additionally the following substitutions if they are enabled
22435  by the 
22436 \begin_inset Flex Code
22437 status collapsed
22438
22439 \begin_layout Plain Layout
22440 Transform
22441 \end_layout
22442
22443 \end_inset
22444
22445  and 
22446 \begin_inset Flex Code
22447 status collapsed
22448
22449 \begin_layout Plain Layout
22450 TransformOption
22451 \end_layout
22452
22453 \end_inset
22454
22455  commands:
22456 \end_layout
22457
22458 \begin_layout Description
22459 \begin_inset Flex Code
22460 status collapsed
22461
22462 \begin_layout Plain Layout
22463 $$Clip
22464 \end_layout
22465
22466 \end_inset
22467
22468  The clip option.
22469 \end_layout
22470
22471 \begin_layout Description
22472 \begin_inset Flex Code
22473 status collapsed
22474
22475 \begin_layout Plain Layout
22476 $$Extra
22477 \end_layout
22478
22479 \end_inset
22480
22481  The extra option.
22482 \end_layout
22483
22484 \begin_layout Description
22485 \begin_inset Flex Code
22486 status collapsed
22487
22488 \begin_layout Plain Layout
22489 $$Resize
22490 \end_layout
22491
22492 \end_inset
22493
22494  The resize option.
22495 \end_layout
22496
22497 \begin_layout Description
22498 \begin_inset Flex Code
22499 status collapsed
22500
22501 \begin_layout Plain Layout
22502 $$Rotate
22503 \end_layout
22504
22505 \end_inset
22506
22507  The rotation option.
22508 \end_layout
22509
22510 \begin_layout Standard
22511 You may ask why there are so many path macros.
22512  There are mainly two reasons:
22513 \end_layout
22514
22515 \begin_layout Enumerate
22516 Relative and absolute file names should remain relative or absolute, respectivel
22517 y.
22518  Users may have reasons to prefer either form.
22519  Relative names are useful for portable documents that should work on different
22520  machines, for example.
22521  Absolute names may be required by some programs.
22522 \end_layout
22523
22524 \begin_layout Enumerate
22525 LaTeX treats relative file names differently than LyX and other programs
22526  in nested included files.
22527  For LyX, a relative file name is always relative to the document that contains
22528  the file name.
22529  For LaTeX, it is always relative to the master document.
22530  These two definitions are identical if you have only one document, but
22531  differ if you have a master document that includes part documents.
22532  That means that relative filenames must be transformed when presented to
22533  LaTeX.
22534  Fortunately LyX does this automatically for you if you choose the right
22535  macros.
22536 \end_layout
22537
22538 \begin_layout Standard
22539 So which path macro should be used in new template definitions? The rule
22540  is not difficult:
22541 \end_layout
22542
22543 \begin_layout Itemize
22544 Use 
22545 \begin_inset Flex Code
22546 status collapsed
22547
22548 \begin_layout Plain Layout
22549 $$AbsPath
22550 \end_layout
22551
22552 \end_inset
22553
22554  if an absolute path is required.
22555 \end_layout
22556
22557 \begin_layout Itemize
22558 Use 
22559 \begin_inset Flex Code
22560 status collapsed
22561
22562 \begin_layout Plain Layout
22563 $$AbsOrRelPathMaster
22564 \end_layout
22565
22566 \end_inset
22567
22568  if the substituted string is some kind of LaTeX input.
22569 \end_layout
22570
22571 \begin_layout Itemize
22572 Else use 
22573 \begin_inset Flex Code
22574 status collapsed
22575
22576 \begin_layout Plain Layout
22577 $$AbsOrRelPathParent
22578 \end_layout
22579
22580 \end_inset
22581
22582  in order to preserve the user's choice.
22583 \end_layout
22584
22585 \begin_layout Standard
22586 There are special cases where this rule does not work and e.
22587 \begin_inset space \thinspace{}
22588 \end_inset
22589
22590 g.
22591 \begin_inset space \space{}
22592 \end_inset
22593
22594 relative names are needed, but normally it will work just fine.
22595  One example for such a case is the command 
22596 \begin_inset Flex Code
22597 status collapsed
22598
22599 \begin_layout Plain Layout
22600 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22601 \end_layout
22602
22603 \end_inset
22604
22605  in the XFig template above: We can't use the absolute name because the
22606  copier for 
22607 \begin_inset Flex Code
22608 status collapsed
22609
22610 \begin_layout Plain Layout
22611 .pstex_t
22612 \end_layout
22613
22614 \end_inset
22615
22616  files needs the relative name in order to rewrite the file content.
22617 \end_layout
22618
22619 \begin_layout Section
22620 Security discussion
22621 \begin_inset CommandInset label
22622 LatexCommand label
22623 name "sec:Security-discussion"
22624
22625 \end_inset
22626
22627
22628 \end_layout
22629
22630 \begin_layout Standard
22631 The external material feature interfaces with a lot of external programs
22632  and does so automatically, so we have to consider the security implications
22633  of this.
22634  In particular, since you have the option of including your own filenames
22635  and/or parameter strings and those are expanded into a command, it seems
22636  that it would be possible to create a malicious document which executes
22637  arbitrary commands when a user views or prints the document.
22638  This is something we definitely want to avoid.
22639 \end_layout
22640
22641 \begin_layout Standard
22642 However, since the external program commands are specified in the template
22643  configuration file only, there are no security issues if LyX is properly
22644  configured with safe templates only.
22645  This is so because the external programs are invoked with the 
22646 \begin_inset Flex Code
22647 status collapsed
22648
22649 \begin_layout Plain Layout
22650 execvp
22651 \end_layout
22652
22653 \end_inset
22654
22655 -system call rather than the 
22656 \begin_inset Flex Code
22657 status collapsed
22658
22659 \begin_layout Plain Layout
22660 system
22661 \end_layout
22662
22663 \end_inset
22664
22665  system-call, so it's not possible to execute arbitrary commands from the
22666  filename or parameter section via the shell.
22667 \end_layout
22668
22669 \begin_layout Standard
22670 This also implies that you are restricted in what command strings you can
22671  use in the external material templates.
22672  In particular, pipes and redirection are not readily available.
22673  This has to be so if LyX should remain safe.
22674  If you want to use some of the shell features, you should write a safe
22675  script to do this in a controlled manner, and then invoke the script from
22676  the command string.
22677  
22678 \end_layout
22679
22680 \begin_layout Standard
22681 It is possible to design a template that interacts directly with the shell,
22682  but since this would allow a malicious user to execute arbitrary commands
22683  by writing clever filenames and/or parameters, we generally recommend that
22684  you only use safe scripts that work with the 
22685 \begin_inset Flex Code
22686 status collapsed
22687
22688 \begin_layout Plain Layout
22689 execvp
22690 \end_layout
22691
22692 \end_inset
22693
22694  system call in a controlled manner.
22695  Of course, for use in a controlled environment, it can be tempting to just
22696  fall back to use ordinary shell scripts.
22697  If you do so, be aware that you 
22698 \emph on
22699 will
22700 \emph default
22701  provide an easily exploitable security hole in your system.
22702  Of course it stands to reason that such unsafe templates will never be
22703  included in the standard LyX distribution, although we do encourage people
22704  to submit new templates in the open source tradition.
22705  But LyX as shipped from the official distribution channels will never have
22706  unsafe templates.
22707 \end_layout
22708
22709 \begin_layout Standard
22710 Including external material provides a lot of power, and you have to be
22711  careful not to introduce security hazards with this power.
22712  A subtle error in a single line in an innocent looking script can open
22713  the door to huge security problems.
22714  So if you do not fully understand the issues, we recommend that you consult
22715  a knowledgeable security professional or the LyX development team if you
22716  have any questions about whether a given template is safe or not.
22717  And do this before you use it in an uncontrolled environment.
22718 \end_layout
22719
22720 \end_body
22721 \end_document