]> git.lyx.org Git - lyx.git/blob - lib/doc/Customization.lyx
6d06e09c12317483ce8d0324aa06163fe88ddaa3
[lyx.git] / lib / doc / Customization.lyx
1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 452
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 1355076779
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 (unless you also specify a separate 
10369 \begin_inset Flex Code
10370 status collapsed
10371
10372 \begin_layout Plain Layout
10373
10374 \change_inserted -712698321 1355076779
10375 MenuString
10376 \end_layout
10377
10378 \end_inset
10379
10380 ).
10381  For the menu, you can define an accelerator by appending the respective
10382  character to the string, divided by 
10383 \begin_inset Quotes eld
10384 \end_inset
10385
10386 |
10387 \begin_inset Quotes erd
10388 \end_inset
10389
10390  (e.
10391 \begin_inset space \thinspace{}
10392 \end_inset
10393
10394 g.
10395  
10396 \begin_inset Flex Code
10397 status collapsed
10398
10399 \begin_layout Plain Layout
10400
10401 \change_inserted -712698321 1353691482
10402 \begin_inset Quotes eld
10403 \end_inset
10404
10405 Short Title|S
10406 \begin_inset Quotes erd
10407 \end_inset
10408
10409
10410 \change_unchanged
10411
10412 \end_layout
10413
10414 \end_inset
10415
10416 ).
10417 \end_layout
10418
10419 \begin_layout Itemize
10420
10421 \change_inserted -712698321 1355076754
10422 \begin_inset Flex Code
10423 status collapsed
10424
10425 \begin_layout Plain Layout
10426
10427 \change_inserted -712698321 1355076658
10428 MenuString
10429 \end_layout
10430
10431 \end_inset
10432
10433  
10434 \begin_inset Flex Code
10435 status collapsed
10436
10437 \begin_layout Plain Layout
10438
10439 \change_inserted -712698321 1355076654
10440 [string]
10441 \end_layout
10442
10443 \end_inset
10444
10445  A separate string for the menu.
10446  You can define an accelerator by appending the respective character to
10447  the string, divided by 
10448 \begin_inset Quotes eld
10449 \end_inset
10450
10451 |
10452 \begin_inset Quotes erd
10453 \end_inset
10454
10455  (e.
10456 \begin_inset space \thinspace{}
10457 \end_inset
10458
10459 g.
10460  
10461 \begin_inset Flex Code
10462 status collapsed
10463
10464 \begin_layout Plain Layout
10465
10466 \change_inserted -712698321 1355076654
10467 \begin_inset Quotes eld
10468 \end_inset
10469
10470 Short Title|S
10471 \begin_inset Quotes erd
10472 \end_inset
10473
10474
10475 \end_layout
10476
10477 \end_inset
10478
10479 ).
10480  This specification is optional.
10481  If it is not given the 
10482 \begin_inset Flex Code
10483 status collapsed
10484
10485 \begin_layout Plain Layout
10486
10487 \change_inserted -712698321 1355076736
10488 LabelString
10489 \change_unchanged
10490
10491 \end_layout
10492
10493 \end_inset
10494
10495  will be used instead for the menu.
10496 \end_layout
10497
10498 \begin_layout Itemize
10499
10500 \change_inserted -712698321 1353680665
10501 \begin_inset Flex Code
10502 status collapsed
10503
10504 \begin_layout Plain Layout
10505
10506 \change_inserted -712698321 1353680616
10507 Tooltip
10508 \end_layout
10509
10510 \end_inset
10511
10512  
10513 \begin_inset Flex Code
10514 status collapsed
10515
10516 \begin_layout Plain Layout
10517
10518 \change_inserted -712698321 1353680623
10519 [string]
10520 \end_layout
10521
10522 \end_inset
10523
10524  A longer explanatory text that appears in the tooltip when hovering over
10525  the argument inset.
10526 \end_layout
10527
10528 \begin_layout Itemize
10529
10530 \change_inserted -712698321 1353680874
10531 \begin_inset Flex Code
10532 status collapsed
10533
10534 \begin_layout Plain Layout
10535
10536 \change_inserted -712698321 1353680732
10537 Mandatory
10538 \end_layout
10539
10540 \end_inset
10541
10542  
10543 \begin_inset Flex Code
10544 status collapsed
10545
10546 \begin_layout Plain Layout
10547
10548 \change_inserted -712698321 1353680738
10549 [int=0]
10550 \end_layout
10551
10552 \end_inset
10553
10554  Declare if this is a mandatory 
10555 \change_inserted 2090807402 1353765594
10556 (1) 
10557 \change_inserted -712698321 1353680874
10558 or an optional 
10559 \change_inserted 2090807402 1353765599
10560 (0) 
10561 \change_inserted -712698321 1353680874
10562 argument.
10563  Mandatory arguments will be output empty if not given, while optional arguments
10564  will not be output at all.
10565  By default, mandatory arguments are delimited by 
10566 \begin_inset Flex Code
10567 status collapsed
10568
10569 \begin_layout Plain Layout
10570
10571 \change_inserted -712698321 1353680808
10572 {...}
10573 \change_unchanged
10574
10575 \end_layout
10576
10577 \end_inset
10578
10579 , while optional arguments are delimited by 
10580 \begin_inset Flex Code
10581 status collapsed
10582
10583 \begin_layout Plain Layout
10584
10585 \change_inserted -712698321 1353680833
10586 [...]
10587 \end_layout
10588
10589 \end_inset
10590
10591
10592 \end_layout
10593
10594 \begin_layout Itemize
10595
10596 \change_inserted -712698321 1353917199
10597 \begin_inset Flex Code
10598 status collapsed
10599
10600 \begin_layout Plain Layout
10601
10602 \change_inserted -712698321 1353680879
10603 Requires
10604 \end_layout
10605
10606 \end_inset
10607
10608  
10609 \begin_inset Flex Code
10610 status collapsed
10611
10612 \begin_layout Plain Layout
10613
10614 \change_inserted -712698321 1353680874
10615 [int=0]
10616 \end_layout
10617
10618 \end_inset
10619
10620  defines another argument (by its number) which this argument requires to
10621  be output if it is itself output.
10622  E.
10623 \begin_inset space \thinspace{}
10624 \end_inset
10625
10626 g., in LaTeX commands, optional arguments often require previous optional
10627  arguments to be output (at least empty), as in 
10628 \begin_inset Flex Code
10629 status collapsed
10630
10631 \begin_layout Plain Layout
10632
10633 \change_inserted -712698321 1353688183
10634
10635 \backslash
10636 command[][arg]{text}
10637 \change_unchanged
10638
10639 \end_layout
10640
10641 \end_inset
10642
10643 .
10644  This can be achieved by the statement 
10645 \begin_inset Flex Code
10646 status collapsed
10647
10648 \begin_layout Plain Layout
10649
10650 \change_inserted -712698321 1353681031
10651 Requires 1
10652 \change_unchanged
10653
10654 \end_layout
10655
10656 \end_inset
10657
10658  within 
10659 \begin_inset Flex Code
10660 status collapsed
10661
10662 \begin_layout Plain Layout
10663
10664 \change_inserted -712698321 1353681045
10665 Argument 2
10666 \change_unchanged
10667
10668 \end_layout
10669
10670 \end_inset
10671
10672 .
10673 \end_layout
10674
10675 \begin_layout Itemize
10676
10677 \change_inserted -712698321 1354263104
10678 \begin_inset Flex Code
10679 status collapsed
10680
10681 \begin_layout Plain Layout
10682
10683 \change_inserted -712698321 1353681072
10684 LeftDelim
10685 \change_unchanged
10686
10687 \end_layout
10688
10689 \end_inset
10690
10691  
10692 \begin_inset Flex Code
10693 status collapsed
10694
10695 \begin_layout Plain Layout
10696
10697 \change_inserted -712698321 1353681067
10698 [string]
10699 \end_layout
10700
10701 \end_inset
10702
10703  defines a custom left delimiter (instead of 
10704 \begin_inset Flex Code
10705 status collapsed
10706
10707 \begin_layout Plain Layout
10708
10709 \change_inserted -712698321 1353681127
10710 {
10711 \change_unchanged
10712
10713 \end_layout
10714
10715 \end_inset
10716
10717  or 
10718 \begin_inset Flex Code
10719 status collapsed
10720
10721 \begin_layout Plain Layout
10722
10723 \change_inserted -712698321 1353681133
10724 [
10725 \change_unchanged
10726
10727 \end_layout
10728
10729 \end_inset
10730
10731 ).
10732  A line break in the output can be indicated by 
10733 \begin_inset Flex Code
10734 status collapsed
10735
10736 \begin_layout Plain Layout
10737
10738 \change_inserted -712698321 1354263104
10739 <br/>
10740 \end_layout
10741
10742 \end_inset
10743
10744 .
10745 \change_unchanged
10746
10747 \end_layout
10748
10749 \begin_layout Itemize
10750
10751 \change_inserted -712698321 1355144479
10752 \begin_inset Flex Code
10753 status collapsed
10754
10755 \begin_layout Plain Layout
10756
10757 \change_inserted -712698321 1353681149
10758 RightDelim
10759 \end_layout
10760
10761 \end_inset
10762
10763  
10764 \begin_inset Flex Code
10765 status collapsed
10766
10767 \begin_layout Plain Layout
10768
10769 \change_inserted -712698321 1353681146
10770 [string]
10771 \end_layout
10772
10773 \end_inset
10774
10775  defines a custom right delimiter (instead of 
10776 \begin_inset Flex Code
10777 status collapsed
10778
10779 \begin_layout Plain Layout
10780
10781 \change_inserted -712698321 1353681158
10782 }
10783 \end_layout
10784
10785 \end_inset
10786
10787  or 
10788 \begin_inset Flex Code
10789 status collapsed
10790
10791 \begin_layout Plain Layout
10792
10793 \change_inserted -712698321 1353681161
10794 ]
10795 \end_layout
10796
10797 \end_inset
10798
10799 ).
10800  A line break in the output can be indicated by 
10801 \begin_inset Flex Code
10802 status collapsed
10803
10804 \begin_layout Plain Layout
10805
10806 \change_inserted -712698321 1354263106
10807 <br/>
10808 \end_layout
10809
10810 \end_inset
10811
10812 .
10813 \end_layout
10814
10815 \begin_layout Itemize
10816
10817 \change_inserted -712698321 1355144578
10818 \begin_inset Flex Code
10819 status collapsed
10820
10821 \begin_layout Plain Layout
10822
10823 \change_inserted -712698321 1355144487
10824 PresetArg
10825 \change_unchanged
10826
10827 \end_layout
10828
10829 \end_inset
10830
10831  
10832 \begin_inset Flex Code
10833 status collapsed
10834
10835 \begin_layout Plain Layout
10836
10837 \change_inserted -712698321 1355144500
10838 [string]
10839 \end_layout
10840
10841 \end_inset
10842
10843  defines an argument that is inserted in any case (alone or in addition
10844  to user-specified arguments).
10845  Multiple arguments need to be separated by comma.
10846 \change_unchanged
10847
10848 \end_layout
10849
10850 \begin_layout Itemize
10851
10852 \change_inserted -712698321 1353917320
10853 \begin_inset Flex Code
10854 status collapsed
10855
10856 \begin_layout Plain Layout
10857
10858 \change_inserted -712698321 1353917320
10859 Font
10860 \end_layout
10861
10862 \end_inset
10863
10864  The font used for the argument content.
10865  See section
10866 \begin_inset space ~
10867 \end_inset
10868
10869
10870 \begin_inset CommandInset ref
10871 LatexCommand ref
10872 reference "sub:Font-description"
10873
10874 \end_inset
10875
10876 .
10877 \end_layout
10878
10879 \begin_layout Itemize
10880
10881 \change_inserted -712698321 1353917320
10882 \begin_inset Flex Code
10883 status collapsed
10884
10885 \begin_layout Plain Layout
10886
10887 \change_inserted -712698321 1353917320
10888 LabelFont
10889 \end_layout
10890
10891 \end_inset
10892
10893  The font used for the label.
10894  See section
10895 \begin_inset space ~
10896 \end_inset
10897
10898
10899 \begin_inset CommandInset ref
10900 LatexCommand ref
10901 reference "sub:Font-description"
10902
10903 \end_inset
10904
10905 .
10906 \end_layout
10907
10908 \begin_layout Itemize
10909
10910 \change_inserted -712698321 1353917320
10911 \begin_inset Flex Code
10912 status collapsed
10913
10914 \begin_layout Plain Layout
10915
10916 \change_inserted -712698321 1353917320
10917 Decoration
10918 \end_layout
10919
10920 \end_inset
10921
10922  can be 
10923 \begin_inset Flex Code
10924 status collapsed
10925
10926 \begin_layout Plain Layout
10927
10928 \change_inserted -712698321 1353917320
10929 Classic
10930 \end_layout
10931
10932 \end_inset
10933
10934
10935 \begin_inset Flex Code
10936 status collapsed
10937
10938 \begin_layout Plain Layout
10939
10940 \change_inserted -712698321 1353917320
10941 Minimalistic
10942 \end_layout
10943
10944 \end_inset
10945
10946 , or 
10947 \begin_inset Flex Code
10948 status collapsed
10949
10950 \begin_layout Plain Layout
10951
10952 \change_inserted -712698321 1353917320
10953 Conglomerate
10954 \end_layout
10955
10956 \end_inset
10957
10958 , describing the rendering style used for the inset's frame and buttons.
10959  Default is 
10960 \begin_inset Flex Code
10961 status collapsed
10962
10963 \begin_layout Plain Layout
10964
10965 \change_inserted -712698321 1353917320
10966 Classic
10967 \end_layout
10968
10969 \end_inset
10970
10971 .
10972 \change_inserted 155139281 1354198988
10973
10974 \end_layout
10975
10976 \begin_layout Standard
10977
10978 \change_inserted 155139281 1354199102
10979 Arguments for list 
10980 \begin_inset Flex Code
10981 status collapsed
10982
10983 \begin_layout Plain Layout
10984
10985 \change_inserted 155139281 1354199013
10986
10987 \backslash
10988 item
10989 \change_unchanged
10990
10991 \end_layout
10992
10993 \end_inset
10994
10995 s (as in 
10996 \begin_inset Flex Code
10997 status collapsed
10998
10999 \begin_layout Plain Layout
11000
11001 \change_inserted 155139281 1354199102
11002
11003 \backslash
11004 item[foo]
11005 \change_unchanged
11006
11007 \end_layout
11008
11009 \end_inset
11010
11011 ) have the prefix 
11012 \begin_inset Flex Code
11013 status collapsed
11014
11015 \begin_layout Plain Layout
11016
11017 \change_inserted 155139281 1354199044
11018 item:
11019 \change_unchanged
11020
11021 \end_layout
11022
11023 \end_inset
11024
11025  followed by the number (e.
11026 \begin_inset space \thinspace{}
11027 \end_inset
11028
11029 g.
11030  
11031 \begin_inset Flex Code
11032 status collapsed
11033
11034 \begin_layout Plain Layout
11035
11036 \change_inserted 155139281 1354199064
11037 Argument item:1
11038 \change_unchanged
11039
11040 \end_layout
11041
11042 \end_inset
11043
11044 )
11045 \change_unchanged
11046
11047 \end_layout
11048
11049 \end_deeper
11050 \begin_layout Description
11051 \begin_inset Flex Code
11052 status collapsed
11053
11054 \begin_layout Plain Layout
11055 BabelPreamble
11056 \end_layout
11057
11058 \end_inset
11059
11060  Note that this will completely override any prior 
11061 \begin_inset Flex Code
11062 status collapsed
11063
11064 \begin_layout Plain Layout
11065 BabelPreamble
11066 \end_layout
11067
11068 \end_inset
11069
11070  declaration for this style.
11071  Must end with 
11072 \begin_inset Quotes eld
11073 \end_inset
11074
11075
11076 \begin_inset Flex Code
11077 status collapsed
11078
11079 \begin_layout Plain Layout
11080 EndBabelPreamble
11081 \end_layout
11082
11083 \end_inset
11084
11085
11086 \begin_inset Quotes erd
11087 \end_inset
11088
11089 .
11090  See section 
11091 \begin_inset CommandInset ref
11092 LatexCommand ref
11093 reference "sub:I18n"
11094
11095 \end_inset
11096
11097  for details on its use.
11098 \end_layout
11099
11100 \begin_layout Description
11101 \begin_inset Flex Code
11102 status collapsed
11103
11104 \begin_layout Plain Layout
11105 BottomSep
11106 \end_layout
11107
11108 \end_inset
11109
11110  [
11111 \begin_inset Flex Code
11112 status collapsed
11113
11114 \begin_layout Plain Layout
11115 float=0
11116 \end_layout
11117
11118 \end_inset
11119
11120 ]
11121 \begin_inset Foot
11122 status collapsed
11123
11124 \begin_layout Plain Layout
11125 Note that a `float' here is a real number, such as: 1.5.
11126 \end_layout
11127
11128 \end_inset
11129
11130  The vertical space with which the last of a chain of paragraphs with this
11131  style is separated from the following paragraph.
11132  If the next paragraph has another style, the separations are not simply
11133  added, but the maximum is taken.
11134 \end_layout
11135
11136 \begin_layout Description
11137 \begin_inset Flex Code
11138 status collapsed
11139
11140 \begin_layout Plain Layout
11141 Category
11142 \end_layout
11143
11144 \end_inset
11145
11146  
11147 \begin_inset Flex Code
11148 status collapsed
11149
11150 \begin_layout Plain Layout
11151 [string]
11152 \end_layout
11153
11154 \end_inset
11155
11156  The category for this style.
11157  This is used to group related styles in the style combobox on the toolbar.
11158  Any string can be used, but you may want to use existing categories with
11159  your own styles.
11160  
11161 \end_layout
11162
11163 \begin_layout Description
11164 \begin_inset Flex Code
11165 status collapsed
11166
11167 \begin_layout Plain Layout
11168 CommandDepth
11169 \end_layout
11170
11171 \end_inset
11172
11173  Depth of XML command.
11174  Used only with XML-type formats.
11175 \end_layout
11176
11177 \begin_layout Description
11178 \begin_inset Flex Code
11179 status collapsed
11180
11181 \begin_layout Plain Layout
11182 CopyStyle
11183 \end_layout
11184
11185 \end_inset
11186
11187  
11188 \begin_inset Flex Code
11189 status collapsed
11190
11191 \begin_layout Plain Layout
11192 [string]
11193 \end_layout
11194
11195 \end_inset
11196
11197  Copies all the features of an existing style into the current one.
11198  
11199 \end_layout
11200
11201 \begin_layout Description
11202 \begin_inset Flex Code
11203 status collapsed
11204
11205 \begin_layout Plain Layout
11206 DependsOn
11207 \end_layout
11208
11209 \end_inset
11210
11211  The name of a style whose preamble should be output 
11212 \emph on
11213 before
11214 \emph default
11215  this one.
11216  This allows to ensure some ordering of the preamble snippets when macros
11217  definitions depend on one another.
11218 \begin_inset Foot
11219 status collapsed
11220
11221 \begin_layout Plain Layout
11222 Note that, besides that functionality, there is no way to ensure any ordering
11223  of preambles.
11224  The ordering that you see in a given version of LyX may change without
11225  warning in later versions.
11226 \end_layout
11227
11228 \end_inset
11229
11230
11231 \end_layout
11232
11233 \begin_layout Description
11234 \begin_inset Flex Code
11235 status collapsed
11236
11237 \begin_layout Plain Layout
11238 EndLabeltype
11239 \end_layout
11240
11241 \end_inset
11242
11243  [
11244 \begin_inset Flex Code
11245 status collapsed
11246
11247 \begin_layout Plain Layout
11248
11249 \emph on
11250 No_Label
11251 \emph default
11252 , Box, Filled_Box, Static
11253 \end_layout
11254
11255 \end_inset
11256
11257 ] The type of label that stands at the end of the paragraph (or sequence
11258  of paragraphs if 
11259 \begin_inset Flex Code
11260 status collapsed
11261
11262 \begin_layout Plain Layout
11263 LatexType
11264 \end_layout
11265
11266 \end_inset
11267
11268  is 
11269 \begin_inset Flex Code
11270 status collapsed
11271
11272 \begin_layout Plain Layout
11273 Environment
11274 \end_layout
11275
11276 \end_inset
11277
11278
11279 \begin_inset Flex Code
11280 status collapsed
11281
11282 \begin_layout Plain Layout
11283 Item_Environment
11284 \end_layout
11285
11286 \end_inset
11287
11288  or 
11289 \begin_inset Flex Code
11290 status collapsed
11291
11292 \begin_layout Plain Layout
11293 List_Environment
11294 \end_layout
11295
11296 \end_inset
11297
11298 ).
11299  
11300 \begin_inset Flex Code
11301 status collapsed
11302
11303 \begin_layout Plain Layout
11304 No_Label
11305 \end_layout
11306
11307 \end_inset
11308
11309  means 
11310 \begin_inset Quotes eld
11311 \end_inset
11312
11313 nothing
11314 \begin_inset Quotes erd
11315 \end_inset
11316
11317
11318 \begin_inset Flex Code
11319 status collapsed
11320
11321 \begin_layout Plain Layout
11322 Box
11323 \end_layout
11324
11325 \end_inset
11326
11327  (resp.
11328 \begin_inset Flex Code
11329 status collapsed
11330
11331 \begin_layout Plain Layout
11332 \begin_inset space ~
11333 \end_inset
11334
11335 Filled_Box
11336 \end_layout
11337
11338 \end_inset
11339
11340 ) is a white (resp.
11341 \begin_inset space ~
11342 \end_inset
11343
11344 black) square suitable for end of proof markers, 
11345 \begin_inset Flex Code
11346 status collapsed
11347
11348 \begin_layout Plain Layout
11349 Static
11350 \end_layout
11351
11352 \end_inset
11353
11354  is an explicit text string.
11355 \end_layout
11356
11357 \begin_layout Description
11358 \begin_inset Flex Code
11359 status collapsed
11360
11361 \begin_layout Plain Layout
11362 EndLabelString
11363 \end_layout
11364
11365 \end_inset
11366
11367  [
11368 \begin_inset Flex Code
11369 status collapsed
11370
11371 \begin_layout Plain Layout
11372 string=""
11373 \end_layout
11374
11375 \end_inset
11376
11377 ] The string used for a label with a 
11378 \begin_inset Flex Code
11379 status collapsed
11380
11381 \begin_layout Plain Layout
11382 Static
11383 \end_layout
11384
11385 \end_inset
11386
11387  
11388 \begin_inset Flex Code
11389 status collapsed
11390
11391 \begin_layout Plain Layout
11392 EndLabelType
11393 \end_layout
11394
11395 \end_inset
11396
11397 .
11398  
11399 \end_layout
11400
11401 \begin_layout Description
11402 \begin_inset Flex Code
11403 status collapsed
11404
11405 \begin_layout Plain Layout
11406 Font
11407 \end_layout
11408
11409 \end_inset
11410
11411  The font used for both the text body 
11412 \emph on
11413 and
11414 \emph default
11415  the label.
11416  See section
11417 \begin_inset space ~
11418 \end_inset
11419
11420
11421 \begin_inset CommandInset ref
11422 LatexCommand ref
11423 reference "sub:Font-description"
11424
11425 \end_inset
11426
11427 .
11428  Note that defining this font automatically defines the 
11429 \begin_inset Flex Code
11430 status collapsed
11431
11432 \begin_layout Plain Layout
11433 LabelFont
11434 \end_layout
11435
11436 \end_inset
11437
11438  to the same value.
11439  So you should define this one first if you also want to define 
11440 \begin_inset Flex Code
11441 status collapsed
11442
11443 \begin_layout Plain Layout
11444 LabelFont
11445 \end_layout
11446
11447 \end_inset
11448
11449 .
11450 \end_layout
11451
11452 \begin_layout Description
11453 \begin_inset Flex Code
11454 status collapsed
11455
11456 \begin_layout Plain Layout
11457 FreeSpacing
11458 \end_layout
11459
11460 \end_inset
11461
11462  
11463 \begin_inset CommandInset label
11464 LatexCommand label
11465 name "des:FreeSpacing"
11466
11467 \end_inset
11468
11469 [
11470 \begin_inset Flex Code
11471 status collapsed
11472
11473 \begin_layout Plain Layout
11474
11475 \emph on
11476 0
11477 \end_layout
11478
11479 \end_inset
11480
11481
11482 \begin_inset Flex Code
11483 status collapsed
11484
11485 \begin_layout Plain Layout
11486 1
11487 \end_layout
11488
11489 \end_inset
11490
11491 ] Usually LyX doesn't allow you to insert more than one space between words,
11492  since a space is considered as the separation between two words, not a
11493  character or symbol of its own.
11494  This is a very fine thing but sometimes annoying, for example, when typing
11495  program code or plain LaTeX code.
11496  For this reason, 
11497 \begin_inset Flex Code
11498 status collapsed
11499
11500 \begin_layout Plain Layout
11501 FreeSpacing
11502 \end_layout
11503
11504 \end_inset
11505
11506  can be enabled.
11507  Note that LyX will create protected blanks for the additional blanks when
11508  in another mode than LaTeX-mode.
11509 \end_layout
11510
11511 \begin_layout Description
11512 \begin_inset Flex Code
11513 status collapsed
11514
11515 \begin_layout Plain Layout
11516 HTML*
11517 \end_layout
11518
11519 \end_inset
11520
11521  These tags are used with XHTML output.
11522  See 
11523 \begin_inset CommandInset ref
11524 LatexCommand ref
11525 reference "sub:Paragraph-Style-XHTML"
11526
11527 \end_inset
11528
11529 .
11530 \end_layout
11531
11532 \begin_layout Description
11533 \begin_inset Flex Code
11534 status collapsed
11535
11536 \begin_layout Plain Layout
11537 InnerTag
11538 \end_layout
11539
11540 \end_inset
11541
11542  [[FIXME]] (Used only with XML-type formats.)
11543 \end_layout
11544
11545 \begin_layout Description
11546 \begin_inset Flex Code
11547 status collapsed
11548
11549 \begin_layout Plain Layout
11550 InPreamble
11551 \end_layout
11552
11553 \end_inset
11554
11555  
11556 \begin_inset Flex Code
11557 status collapsed
11558
11559 \begin_layout Plain Layout
11560 [1, 0]
11561 \end_layout
11562
11563 \end_inset
11564
11565  If 1, marks the style as to be included in the document preamble rather
11566  than in the document body.
11567  This is useful for document classes that want such information as the title
11568  and author to appear in the preamble.
11569  Note that this works only for styles for which the 
11570 \begin_inset Flex Code
11571 status collapsed
11572
11573 \begin_layout Plain Layout
11574 LatexType
11575 \end_layout
11576
11577 \end_inset
11578
11579  is 
11580 \begin_inset Flex Code
11581 status collapsed
11582
11583 \begin_layout Plain Layout
11584 Command
11585 \end_layout
11586
11587 \end_inset
11588
11589  or 
11590 \begin_inset Flex Code
11591 status collapsed
11592
11593 \begin_layout Plain Layout
11594 Paragraph
11595 \end_layout
11596
11597 \end_inset
11598
11599 .
11600 \end_layout
11601
11602 \begin_layout Description
11603 \begin_inset Flex Code
11604 status collapsed
11605
11606 \begin_layout Plain Layout
11607 InTitle
11608 \end_layout
11609
11610 \end_inset
11611
11612  
11613 \begin_inset Flex Code
11614 status collapsed
11615
11616 \begin_layout Plain Layout
11617 [1, 0]
11618 \end_layout
11619
11620 \end_inset
11621
11622  If 1, marks the style as being part of a title block (see also the 
11623 \begin_inset Flex Code
11624 status collapsed
11625
11626 \begin_layout Plain Layout
11627 TitleLatexType
11628 \end_layout
11629
11630 \end_inset
11631
11632  and 
11633 \begin_inset Flex Code
11634 status collapsed
11635
11636 \begin_layout Plain Layout
11637 TitleLatexName
11638 \end_layout
11639
11640 \end_inset
11641
11642  global entries).
11643 \end_layout
11644
11645 \begin_layout Description
11646 \begin_inset Flex Code
11647 status collapsed
11648
11649 \begin_layout Plain Layout
11650 ItemSep
11651 \end_layout
11652
11653 \end_inset
11654
11655  [
11656 \begin_inset Flex Code
11657 status collapsed
11658
11659 \begin_layout Plain Layout
11660 float=0
11661 \end_layout
11662
11663 \end_inset
11664
11665 ] This provides extra space between paragraphs that have the same style.
11666  If you put other styles into an environment, each is separated with the
11667  environment's 
11668 \begin_inset Flex Code
11669 status collapsed
11670
11671 \begin_layout Plain Layout
11672 Parsep
11673 \end_layout
11674
11675 \end_inset
11676
11677 .
11678  But the whole items of the environment are additionally separated with
11679  this 
11680 \begin_inset Flex Code
11681 status collapsed
11682
11683 \begin_layout Plain Layout
11684 Itemsep
11685 \end_layout
11686
11687 \end_inset
11688
11689 .
11690  Note that this is a
11691 \emph on
11692  multiplier.
11693 \end_layout
11694
11695 \begin_layout Description
11696 \begin_inset Flex Code
11697 status collapsed
11698
11699 \begin_layout Plain Layout
11700 ItemTag
11701 \end_layout
11702
11703 \end_inset
11704
11705  [[FIXME]] (Used only with XML-type formats.)
11706 \end_layout
11707
11708 \begin_layout Description
11709 \begin_inset Flex Code
11710 status collapsed
11711
11712 \begin_layout Plain Layout
11713 KeepEmpty
11714 \end_layout
11715
11716 \end_inset
11717
11718  [
11719 \begin_inset Flex Code
11720 status collapsed
11721
11722 \begin_layout Plain Layout
11723
11724 \emph on
11725 0
11726 \end_layout
11727
11728 \end_inset
11729
11730
11731 \begin_inset Flex Code
11732 status collapsed
11733
11734 \begin_layout Plain Layout
11735 1
11736 \end_layout
11737
11738 \end_inset
11739
11740 ] Usually LyX does not allow you to leave a paragraph empty, since it would
11741  lead to empty LaTeX output.
11742  There are some cases where this could be desirable however: in a letter
11743  template, the required fields can be provided as empty fields, so that
11744  people do not forget them; in some special classes, a style can be used
11745  as some kind of break, which does not contain actual text.
11746 \end_layout
11747
11748 \begin_layout Description
11749 \begin_inset Flex Code
11750 status collapsed
11751
11752 \begin_layout Plain Layout
11753 LabelBottomsep
11754 \end_layout
11755
11756 \end_inset
11757
11758  [float=0] The vertical space between the label and the text body.
11759  Only used for labels that are above the text body (
11760 \begin_inset Flex Code
11761 status collapsed
11762
11763 \begin_layout Plain Layout
11764 Top_Environment
11765 \end_layout
11766
11767 \end_inset
11768
11769
11770 \begin_inset Flex Code
11771 status collapsed
11772
11773 \begin_layout Plain Layout
11774 Centered_Top_Environment
11775 \end_layout
11776
11777 \end_inset
11778
11779 ).
11780 \end_layout
11781
11782 \begin_layout Description
11783 \begin_inset Flex Code
11784 status collapsed
11785
11786 \begin_layout Plain Layout
11787 LabelCounter
11788 \end_layout
11789
11790 \end_inset
11791
11792  [
11793 \begin_inset Flex Code
11794 status collapsed
11795
11796 \begin_layout Plain Layout
11797 string=""
11798 \end_layout
11799
11800 \end_inset
11801
11802 ]
11803 \begin_inset Newline newline
11804 \end_inset
11805
11806 The name of the counter for automatic numbering.
11807  
11808 \begin_inset Newline newline
11809 \end_inset
11810
11811 This 
11812 \emph on
11813 must
11814 \emph default
11815  be given if 
11816 \begin_inset Flex Code
11817 status collapsed
11818
11819 \begin_layout Plain Layout
11820 LabelType
11821 \end_layout
11822
11823 \end_inset
11824
11825  is 
11826 \begin_inset Flex Code
11827 status collapsed
11828
11829 \begin_layout Plain Layout
11830 Counter
11831 \end_layout
11832
11833 \end_inset
11834
11835 .
11836  In that case, the counter will be stepped each time the style appears.
11837  
11838 \begin_inset Newline newline
11839 \end_inset
11840
11841 This 
11842 \emph on
11843 may
11844 \emph default
11845  also be given if 
11846 \begin_inset Flex Code
11847 status collapsed
11848
11849 \begin_layout Plain Layout
11850 LabelType
11851 \end_layout
11852
11853 \end_inset
11854
11855  is 
11856 \begin_inset Flex Code
11857 status collapsed
11858
11859 \begin_layout Plain Layout
11860 Enumerate
11861 \end_layout
11862
11863 \end_inset
11864
11865 , though this case is a bit complicated.
11866  Suppose you declare 
11867 \begin_inset Quotes eld
11868 \end_inset
11869
11870
11871 \begin_inset Flex Code
11872 status collapsed
11873
11874 \begin_layout Plain Layout
11875 LabelCounter myenum
11876 \end_layout
11877
11878 \end_inset
11879
11880
11881 \begin_inset Quotes erd
11882 \end_inset
11883
11884 .
11885  Then the actual counters used are 
11886 \begin_inset Flex Code
11887 status collapsed
11888
11889 \begin_layout Plain Layout
11890 myenumi
11891 \end_layout
11892
11893 \end_inset
11894
11895
11896 \begin_inset Flex Code
11897 status collapsed
11898
11899 \begin_layout Plain Layout
11900 myenumii
11901 \end_layout
11902
11903 \end_inset
11904
11905
11906 \begin_inset Flex Code
11907 status collapsed
11908
11909 \begin_layout Plain Layout
11910 myenumiii
11911 \end_layout
11912
11913 \end_inset
11914
11915 , and 
11916 \begin_inset Flex Code
11917 status collapsed
11918
11919 \begin_layout Plain Layout
11920 myenumiv
11921 \end_layout
11922
11923 \end_inset
11924
11925 , much as in LaTeX.
11926  These counters must all be declared separately.
11927 \begin_inset Newline newline
11928 \end_inset
11929
11930 See Section 
11931 \begin_inset CommandInset ref
11932 LatexCommand ref
11933 reference "sub:Counters"
11934
11935 \end_inset
11936
11937  for details on counters.
11938 \end_layout
11939
11940 \begin_layout Description
11941 \begin_inset Flex Code
11942 status collapsed
11943
11944 \begin_layout Plain Layout
11945 LabelFont
11946 \end_layout
11947
11948 \end_inset
11949
11950  The font used for the label.
11951  See section
11952 \begin_inset space ~
11953 \end_inset
11954
11955
11956 \begin_inset CommandInset ref
11957 LatexCommand ref
11958 reference "sub:Font-description"
11959
11960 \end_inset
11961
11962 .
11963 \end_layout
11964
11965 \begin_layout Description
11966 \begin_inset Flex Code
11967 status collapsed
11968
11969 \begin_layout Plain Layout
11970 LabelIndent
11971 \end_layout
11972
11973 \end_inset
11974
11975  Text that indicates how far a label should be indented.
11976 \end_layout
11977
11978 \begin_layout Description
11979 \begin_inset Flex Code
11980 status collapsed
11981
11982 \begin_layout Plain Layout
11983 Labelsep
11984 \end_layout
11985
11986 \end_inset
11987
11988  [
11989 \begin_inset Flex Code
11990 status collapsed
11991
11992 \begin_layout Plain Layout
11993 string=""
11994 \end_layout
11995
11996 \end_inset
11997
11998 ] The horizontal space between the label and the text body.
11999  Only used for labels that are not above the text body.
12000 \end_layout
12001
12002 \begin_layout Description
12003 \begin_inset Flex Code
12004 status collapsed
12005
12006 \begin_layout Plain Layout
12007 LabelString
12008 \end_layout
12009
12010 \end_inset
12011
12012  [
12013 \begin_inset Flex Code
12014 status collapsed
12015
12016 \begin_layout Plain Layout
12017 string=""
12018 \end_layout
12019
12020 \end_inset
12021
12022 ] The string used for a label with a 
12023 \begin_inset Flex Code
12024 status collapsed
12025
12026 \begin_layout Plain Layout
12027 Static
12028 \end_layout
12029
12030 \end_inset
12031
12032  labeltype.
12033  When 
12034 \begin_inset Flex Code
12035 status collapsed
12036
12037 \begin_layout Plain Layout
12038 LabelCounter
12039 \end_layout
12040
12041 \end_inset
12042
12043  is set, this string can be contain the special formatting commands described
12044  in Section 
12045 \begin_inset CommandInset ref
12046 LatexCommand ref
12047 reference "sub:Counters"
12048
12049 \end_inset
12050
12051 .
12052 \begin_inset Foot
12053 status collapsed
12054
12055 \begin_layout Plain Layout
12056 For the sake of backwards compatibility, the string 
12057 \begin_inset Flex Code
12058 status collapsed
12059
12060 \begin_layout Plain Layout
12061 @
12062 \emph on
12063 style-name
12064 \emph default
12065 @
12066 \end_layout
12067
12068 \end_inset
12069
12070  will be replaced by the expanded 
12071 \begin_inset Flex Code
12072 status collapsed
12073
12074 \begin_layout Plain Layout
12075 LabelString
12076 \end_layout
12077
12078 \end_inset
12079
12080  of style 
12081 \begin_inset Flex Code
12082 status collapsed
12083
12084 \begin_layout Plain Layout
12085
12086 \emph on
12087 style-name
12088 \end_layout
12089
12090 \end_inset
12091
12092 .
12093  This feature is now obsolete and should be replaced by the mechanisms of
12094  Section 
12095 \begin_inset CommandInset ref
12096 LatexCommand ref
12097 reference "sub:Counters"
12098
12099 \end_inset
12100
12101 .
12102 \end_layout
12103
12104 \end_inset
12105
12106
12107 \end_layout
12108
12109 \begin_layout Description
12110 \begin_inset Flex Code
12111 status collapsed
12112
12113 \begin_layout Plain Layout
12114 LabelStringAppendix
12115 \end_layout
12116
12117 \end_inset
12118
12119  [
12120 \begin_inset Flex Code
12121 status collapsed
12122
12123 \begin_layout Plain Layout
12124 string=""
12125 \end_layout
12126
12127 \end_inset
12128
12129 ] This is used inside the appendix instead of 
12130 \begin_inset Flex Code
12131 status collapsed
12132
12133 \begin_layout Plain Layout
12134 LabelString
12135 \end_layout
12136
12137 \end_inset
12138
12139 .
12140  Note that every 
12141 \begin_inset Flex Code
12142 status collapsed
12143
12144 \begin_layout Plain Layout
12145 LabelString
12146 \end_layout
12147
12148 \end_inset
12149
12150  statement resets 
12151 \begin_inset Flex Code
12152 status collapsed
12153
12154 \begin_layout Plain Layout
12155 LabelStringAppendix
12156 \end_layout
12157
12158 \end_inset
12159
12160  too.
12161 \end_layout
12162
12163 \begin_layout Description
12164 \begin_inset Flex Code
12165 status collapsed
12166
12167 \begin_layout Plain Layout
12168 LabelTag
12169 \end_layout
12170
12171 \end_inset
12172
12173  [FIXME] (Used only with XML-type formats.)
12174 \end_layout
12175
12176 \begin_layout Description
12177 \begin_inset Flex Code
12178 status collapsed
12179
12180 \begin_layout Plain Layout
12181 LabelType
12182 \end_layout
12183
12184 \end_inset
12185
12186  [
12187 \begin_inset Flex Code
12188 status collapsed
12189
12190 \begin_layout Plain Layout
12191
12192 \emph on
12193 No_Label
12194 \emph default
12195 , Manual, Static, Top_Environment, Centered_Top_Environment, Counter, Sensitive,
12196  Enumerate, Itemize, Bibliography
12197 \end_layout
12198
12199 \end_inset
12200
12201
12202 \end_layout
12203
12204 \begin_deeper
12205 \begin_layout Itemize
12206 \begin_inset Flex Code
12207 status collapsed
12208
12209 \begin_layout Plain Layout
12210 Manual
12211 \end_layout
12212
12213 \end_inset
12214
12215  means the label is the very first word (up to the first real blank).
12216  Use protected spaces (like
12217 \begin_inset space ~
12218 \end_inset
12219
12220 that one) if you want more than one word as the label.
12221  
12222 \end_layout
12223
12224 \begin_layout Itemize
12225 \begin_inset Flex Code
12226 status collapsed
12227
12228 \begin_layout Plain Layout
12229 Static
12230 \end_layout
12231
12232 \end_inset
12233
12234  means the label is simply whatever 
12235 \begin_inset Flex Code
12236 status collapsed
12237
12238 \begin_layout Plain Layout
12239 LabelString
12240 \end_layout
12241
12242 \end_inset
12243
12244  declares it to be.
12245  Note that this really is `static'.
12246 \end_layout
12247
12248 \begin_layout Itemize
12249 \begin_inset Flex Code
12250 status collapsed
12251
12252 \begin_layout Plain Layout
12253 Top_Environment
12254 \end_layout
12255
12256 \end_inset
12257
12258  and 
12259 \begin_inset Flex Code
12260 status collapsed
12261
12262 \begin_layout Plain Layout
12263 Centered_Top_Environment
12264 \end_layout
12265
12266 \end_inset
12267
12268  are special cases of 
12269 \begin_inset Flex Code
12270 status collapsed
12271
12272 \begin_layout Plain Layout
12273 Static
12274 \end_layout
12275
12276 \end_inset
12277
12278 .
12279  The label will be printed above the paragraph, but only at the top of an
12280  environment or the top of a chain of paragraphs with this style.
12281  This might be used with the 
12282 \begin_inset Flex MenuItem
12283 status collapsed
12284
12285 \begin_layout Plain Layout
12286 Abstract
12287 \end_layout
12288
12289 \end_inset
12290
12291  style, for example.
12292 \end_layout
12293
12294 \begin_layout Itemize
12295 \begin_inset Flex Code
12296 status collapsed
12297
12298 \begin_layout Plain Layout
12299 Sensitive
12300 \end_layout
12301
12302 \end_inset
12303
12304  is a special case for the caption-labels 
12305 \begin_inset Quotes eld
12306 \end_inset
12307
12308 Figure
12309 \begin_inset Quotes erd
12310 \end_inset
12311
12312  and 
12313 \begin_inset Quotes eld
12314 \end_inset
12315
12316 Table
12317 \begin_inset Quotes erd
12318 \end_inset
12319
12320 .
12321  
12322 \begin_inset Flex Code
12323 status collapsed
12324
12325 \begin_layout Plain Layout
12326 Sensitive
12327 \end_layout
12328
12329 \end_inset
12330
12331  means the (hardcoded) label string depends on the kind of float: It is
12332  hardcoded to be `FloatType N', where N is the value of the counter associated
12333  with the float.
12334 \end_layout
12335
12336 \begin_layout Itemize
12337 The 
12338 \begin_inset Flex Code
12339 status collapsed
12340
12341 \begin_layout Plain Layout
12342 Counter
12343 \end_layout
12344
12345 \end_inset
12346
12347  label type defines automatically numbered labels.
12348  The 
12349 \begin_inset Flex Code
12350 status collapsed
12351
12352 \begin_layout Plain Layout
12353 LabelString
12354 \end_layout
12355
12356 \end_inset
12357
12358  will be expanded to resolve any counter references it contains: For example,
12359  it might be 
12360 \begin_inset Quotes eld
12361 \end_inset
12362
12363
12364 \begin_inset Flex Code
12365 status collapsed
12366
12367 \begin_layout Plain Layout
12368 Section 
12369 \backslash
12370 thechapter.
12371 \backslash
12372 thesection
12373 \end_layout
12374
12375 \end_inset
12376
12377
12378 \begin_inset Quotes erd
12379 \end_inset
12380
12381 .
12382  See Section 
12383 \begin_inset CommandInset ref
12384 LatexCommand ref
12385 reference "sub:Counters"
12386
12387 \end_inset
12388
12389  for more information on counters.
12390 \end_layout
12391
12392 \begin_layout Itemize
12393 \begin_inset Flex Code
12394 status collapsed
12395
12396 \begin_layout Plain Layout
12397 Enumerate
12398 \end_layout
12399
12400 \end_inset
12401
12402  produces the usual sort of enumeration labels.
12403  At present, it is hardcoded to use Arabic numerals, lowercase letters,
12404  small Roman numerals, and uppercase letters for the four possible depths.
12405 \end_layout
12406
12407 \begin_layout Itemize
12408 \begin_inset Flex Code
12409 status collapsed
12410
12411 \begin_layout Plain Layout
12412 Itemize
12413 \end_layout
12414
12415 \end_inset
12416
12417  produces various bullets at the different levels.
12418  It is also hardcoded.
12419 \end_layout
12420
12421 \begin_layout Itemize
12422 \begin_inset Flex Code
12423 status collapsed
12424
12425 \begin_layout Plain Layout
12426 Bibliography
12427 \end_layout
12428
12429 \end_inset
12430
12431  is used internally by LyX and should be used only with 
12432 \begin_inset Flex Code
12433 status collapsed
12434
12435 \begin_layout Plain Layout
12436 LatexType BibEnvironment
12437 \end_layout
12438
12439 \end_inset
12440
12441 .
12442 \end_layout
12443
12444 \end_deeper
12445 \begin_layout Description
12446 \begin_inset Flex Code
12447 status collapsed
12448
12449 \begin_layout Plain Layout
12450 LangPreamble
12451 \end_layout
12452
12453 \end_inset
12454
12455  Note that this will completely override any prior 
12456 \begin_inset Flex Code
12457 status collapsed
12458
12459 \begin_layout Plain Layout
12460 LangPreamble
12461 \end_layout
12462
12463 \end_inset
12464
12465  declaration for this style.
12466  Must end with 
12467 \begin_inset Quotes eld
12468 \end_inset
12469
12470
12471 \begin_inset Flex Code
12472 status collapsed
12473
12474 \begin_layout Plain Layout
12475 EndLangPreamble
12476 \end_layout
12477
12478 \end_inset
12479
12480
12481 \begin_inset Quotes erd
12482 \end_inset
12483
12484 .
12485  See section 
12486 \begin_inset CommandInset ref
12487 LatexCommand ref
12488 reference "sub:I18n"
12489
12490 \end_inset
12491
12492  for details on its use.
12493 \end_layout
12494
12495 \begin_layout Description
12496 \begin_inset Flex Code
12497 status collapsed
12498
12499 \begin_layout Plain Layout
12500 LatexName
12501 \end_layout
12502
12503 \end_inset
12504
12505  The name of the corresponding LaTeX stuff.
12506  Either the environment or command name.
12507 \end_layout
12508
12509 \begin_layout Description
12510 \begin_inset Flex Code
12511 status collapsed
12512
12513 \begin_layout Plain Layout
12514 LatexParam
12515 \end_layout
12516
12517 \end_inset
12518
12519  An optional parameter for the corresponding 
12520 \begin_inset Flex Code
12521 status collapsed
12522
12523 \begin_layout Plain Layout
12524 LatexName
12525 \end_layout
12526
12527 \end_inset
12528
12529  stuff.
12530  This parameter cannot be changed from within LyX
12531 \change_inserted -712698321 1355144804
12532  (use 
12533 \begin_inset Flex Code
12534 status collapsed
12535
12536 \begin_layout Plain Layout
12537
12538 \change_inserted -712698321 1355144804
12539 Argument
12540 \end_layout
12541
12542 \end_inset
12543
12544  for customizable parameters)
12545 \change_unchanged
12546 .
12547
12548 \change_inserted -712698321 1355144804
12549  This will be output as is after all LaTeX 
12550 \begin_inset Flex Code
12551 status collapsed
12552
12553 \begin_layout Plain Layout
12554
12555 \change_inserted -712698321 1355144658
12556 Arguments
12557 \change_unchanged
12558
12559 \end_layout
12560
12561 \end_inset
12562
12563 .
12564 \change_unchanged
12565
12566 \end_layout
12567
12568 \begin_layout Description
12569 \begin_inset Flex Code
12570 status collapsed
12571
12572 \begin_layout Plain Layout
12573 LatexType
12574 \end_layout
12575
12576 \end_inset
12577
12578  [
12579 \begin_inset Flex Code
12580 status collapsed
12581
12582 \begin_layout Plain Layout
12583
12584 \emph on
12585 Paragraph
12586 \emph default
12587 , Command, Environment, Item_Environment,
12588 \end_layout
12589
12590 \end_inset
12591
12592  
12593 \begin_inset Flex Code
12594 status collapsed
12595
12596 \begin_layout Plain Layout
12597 List_Environment, Bib_Environment
12598 \end_layout
12599
12600 \end_inset
12601
12602 ] How the style should be translated into LaTeX.
12603 \begin_inset Foot
12604 status collapsed
12605
12606 \begin_layout Plain Layout
12607 \begin_inset Flex Code
12608 status collapsed
12609
12610 \begin_layout Plain Layout
12611 LatexType
12612 \end_layout
12613
12614 \end_inset
12615
12616  is perhaps a bit misleading, since these rules apply to SGML classes, too.
12617  Visit the SGML class files for specific examples.
12618 \end_layout
12619
12620 \end_inset
12621
12622
12623 \end_layout
12624
12625 \begin_deeper
12626 \begin_layout Itemize
12627 \begin_inset Flex Code
12628 status collapsed
12629
12630 \begin_layout Plain Layout
12631 Paragraph
12632 \end_layout
12633
12634 \end_inset
12635
12636  means nothing special.
12637  
12638 \end_layout
12639
12640 \begin_layout Itemize
12641 \begin_inset Flex Code
12642 status collapsed
12643
12644 \begin_layout Plain Layout
12645 Command
12646 \end_layout
12647
12648 \end_inset
12649
12650  means 
12651 \begin_inset Flex Code
12652 status collapsed
12653
12654 \begin_layout Plain Layout
12655
12656 \backslash
12657
12658 \emph on
12659 LatexName
12660 \emph default
12661 {\SpecialChar \ldots{}
12662 }
12663 \end_layout
12664
12665 \end_inset
12666
12667 .
12668 \end_layout
12669
12670 \begin_layout Itemize
12671 \begin_inset Flex Code
12672 status collapsed
12673
12674 \begin_layout Plain Layout
12675 Environment
12676 \end_layout
12677
12678 \end_inset
12679
12680  means 
12681 \begin_inset Flex Code
12682 status collapsed
12683
12684 \begin_layout Plain Layout
12685
12686 \backslash
12687 begin{
12688 \emph on
12689 LatexName
12690 \emph default
12691 }\SpecialChar \ldots{}
12692
12693 \backslash
12694 end{
12695 \emph on
12696 LatexName
12697 \emph default
12698 }
12699 \end_layout
12700
12701 \end_inset
12702
12703 .
12704  
12705 \end_layout
12706
12707 \begin_layout Itemize
12708 \begin_inset Flex Code
12709 status collapsed
12710
12711 \begin_layout Plain Layout
12712 Item_Environment
12713 \end_layout
12714
12715 \end_inset
12716
12717  is the same as 
12718 \begin_inset Flex Code
12719 status collapsed
12720
12721 \begin_layout Plain Layout
12722 Environment
12723 \end_layout
12724
12725 \end_inset
12726
12727 , except that an 
12728 \begin_inset Flex Code
12729 status collapsed
12730
12731 \begin_layout Plain Layout
12732
12733 \backslash
12734 item
12735 \end_layout
12736
12737 \end_inset
12738
12739  is generated for each paragraph of this environment.
12740  
12741 \end_layout
12742
12743 \begin_layout Itemize
12744 \begin_inset Flex Code
12745 status collapsed
12746
12747 \begin_layout Plain Layout
12748 List_Environment
12749 \end_layout
12750
12751 \end_inset
12752
12753  is the same as 
12754 \begin_inset Flex Code
12755 status collapsed
12756
12757 \begin_layout Plain Layout
12758 Item_Environment
12759 \end_layout
12760
12761 \end_inset
12762
12763 , except that 
12764 \begin_inset Flex Code
12765 status collapsed
12766
12767 \begin_layout Plain Layout
12768 LabelWidthString
12769 \end_layout
12770
12771 \end_inset
12772
12773  is passed as an argument to the environment.
12774  
12775 \begin_inset Flex Code
12776 status collapsed
12777
12778 \begin_layout Plain Layout
12779 LabelWidthString
12780 \end_layout
12781
12782 \end_inset
12783
12784  can be defined in the 
12785 \begin_inset Flex MenuItem
12786 status collapsed
12787
12788 \begin_layout Plain Layout
12789 Edit\SpecialChar \menuseparator
12790 Paragraph
12791 \begin_inset space ~
12792 \end_inset
12793
12794 settings
12795 \end_layout
12796
12797 \end_inset
12798
12799  dialog.
12800  
12801 \end_layout
12802
12803 \begin_layout Standard
12804 Putting the last few things together, the LaTeX output will be either: 
12805 \end_layout
12806
12807 \begin_layout LyX-Code
12808
12809 \backslash
12810 latexname[latexparam]{\SpecialChar \ldots{}
12811 }
12812 \end_layout
12813
12814 \begin_layout Standard
12815 or: 
12816 \end_layout
12817
12818 \begin_layout LyX-Code
12819
12820 \backslash
12821 begin{latexname}[latexparam] \SpecialChar \ldots{}
12822  
12823 \backslash
12824 end{latexname}.
12825 \end_layout
12826
12827 \begin_layout Standard
12828 depending upon the LaTeX type.
12829 \end_layout
12830
12831 \end_deeper
12832 \begin_layout Description
12833
12834 \change_inserted -712698321 1354263086
12835 \begin_inset Flex Code
12836 status collapsed
12837
12838 \begin_layout Plain Layout
12839
12840 \change_inserted -712698321 1353866852
12841 LeftDelim
12842 \end_layout
12843
12844 \end_inset
12845
12846  [
12847 \begin_inset Flex Code
12848 status collapsed
12849
12850 \begin_layout Plain Layout
12851
12852 \change_inserted -712698321 1353866852
12853 string
12854 \end_layout
12855
12856 \end_inset
12857
12858 ] A string that is put at the beginning of the style content.
12859  A line break in the output can be indicated by 
12860 \begin_inset Flex Code
12861 status collapsed
12862
12863 \begin_layout Plain Layout
12864
12865 \change_inserted -712698321 1354263086
12866 <br/>
12867 \end_layout
12868
12869 \end_inset
12870
12871 .
12872 \change_unchanged
12873
12874 \end_layout
12875
12876 \begin_layout Description
12877 \begin_inset Flex Code
12878 status collapsed
12879
12880 \begin_layout Plain Layout
12881 LeftMargin
12882 \end_layout
12883
12884 \end_inset
12885
12886  [
12887 \begin_inset Flex Code
12888 status collapsed
12889
12890 \begin_layout Plain Layout
12891 string=""
12892 \end_layout
12893
12894 \end_inset
12895
12896 ] If you put styles into environments, the leftmargins are not simply added,
12897  but added with a factor 
12898 \begin_inset Formula $\frac{4}{depth+4}$
12899 \end_inset
12900
12901 .
12902  Note that this parameter is also used when the margin is defined as 
12903 \begin_inset Flex Code
12904 status collapsed
12905
12906 \begin_layout Plain Layout
12907 Manual
12908 \end_layout
12909
12910 \end_inset
12911
12912  or 
12913 \begin_inset Flex Code
12914 status collapsed
12915
12916 \begin_layout Plain Layout
12917 Dynamic
12918 \end_layout
12919
12920 \end_inset
12921
12922 .
12923  Then it is added to the manual or dynamic margin.
12924  
12925 \begin_inset Newline newline
12926 \end_inset
12927
12928 The argument is passed as a string.
12929  For example 
12930 \begin_inset Quotes eld
12931 \end_inset
12932
12933
12934 \begin_inset Flex Code
12935 status collapsed
12936
12937 \begin_layout Plain Layout
12938 MM
12939 \end_layout
12940
12941 \end_inset
12942
12943
12944 \begin_inset Quotes erd
12945 \end_inset
12946
12947  means that the paragraph is indented with the width of 
12948 \begin_inset Quotes eld
12949 \end_inset
12950
12951
12952 \begin_inset Flex Code
12953 status collapsed
12954
12955 \begin_layout Plain Layout
12956 MM
12957 \end_layout
12958
12959 \end_inset
12960
12961
12962 \begin_inset Quotes erd
12963 \end_inset
12964
12965  in the normal font.
12966  You can get a negative width by prefixing the string with 
12967 \begin_inset Quotes eld
12968 \end_inset
12969
12970
12971 \begin_inset Flex Code
12972 status collapsed
12973
12974 \begin_layout Plain Layout
12975 -
12976 \end_layout
12977
12978 \end_inset
12979
12980
12981 \begin_inset Quotes erd
12982 \end_inset
12983
12984 .
12985  This way was chosen so that the look is the same with each used screen
12986  font.
12987  
12988 \end_layout
12989
12990 \begin_layout Description
12991 \begin_inset Flex Code
12992 status collapsed
12993
12994 \begin_layout Plain Layout
12995 Margin
12996 \end_layout
12997
12998 \end_inset
12999
13000  [
13001 \begin_inset Flex Code
13002 status collapsed
13003
13004 \begin_layout Plain Layout
13005
13006 \emph on
13007 Static
13008 \emph default
13009 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13010 \end_layout
13011
13012 \end_inset
13013
13014
13015 \begin_inset Newline newline
13016 \end_inset
13017
13018 The kind of margin that the style has on the left side.
13019  
13020 \begin_inset Flex Code
13021 status collapsed
13022
13023 \begin_layout Plain Layout
13024 Static
13025 \end_layout
13026
13027 \end_inset
13028
13029  just means a fixed margin.
13030  
13031 \begin_inset Flex Code
13032 status collapsed
13033
13034 \begin_layout Plain Layout
13035 Manual
13036 \end_layout
13037
13038 \end_inset
13039
13040  means that the left margin depends on the string entered in the 
13041 \begin_inset Flex MenuItem
13042 status collapsed
13043
13044 \begin_layout Plain Layout
13045 Edit\SpecialChar \menuseparator
13046 Paragraph
13047 \begin_inset space ~
13048 \end_inset
13049
13050 Settings
13051 \end_layout
13052
13053 \end_inset
13054
13055  dialog.
13056  This is used to typeset nice lists without tabulators.
13057  
13058 \begin_inset Flex Code
13059 status collapsed
13060
13061 \begin_layout Plain Layout
13062 Dynamic
13063 \end_layout
13064
13065 \end_inset
13066
13067  means that the margin depends on the size of the label.
13068  This is used for automatic enumerated headlines.
13069  It is obvious that the headline 
13070 \begin_inset Quotes eld
13071 \end_inset
13072
13073 5.4.3.2.1 Very long headline
13074 \begin_inset Quotes erd
13075 \end_inset
13076
13077  must have a wider left margin (as wide as 
13078 \begin_inset Quotes eld
13079 \end_inset
13080
13081 5.4.3.2.1
13082 \begin_inset Quotes erd
13083 \end_inset
13084
13085  plus the space) than 
13086 \begin_inset Quotes eld
13087 \end_inset
13088
13089 3.2 Very long headline
13090 \begin_inset Quotes erd
13091 \end_inset
13092
13093 , even if standard 
13094 \begin_inset Quotes eld
13095 \end_inset
13096
13097 word processors
13098 \begin_inset Quotes erd
13099 \end_inset
13100
13101  are not able to do this.
13102  
13103 \begin_inset Flex Code
13104 status collapsed
13105
13106 \begin_layout Plain Layout
13107 First_Dynamic
13108 \end_layout
13109
13110 \end_inset
13111
13112  is similar, but only the very first row of the paragraph is dynamic, while
13113  the others are static; this is used, for example, for descriptions.
13114  
13115 \begin_inset Flex Code
13116 status collapsed
13117
13118 \begin_layout Plain Layout
13119 Right_Address_Box
13120 \end_layout
13121
13122 \end_inset
13123
13124  means the margin is chosen in a way that the longest row of this paragraph
13125  fits to the right margin.
13126  This is used to typeset an address on the right edge of the page.
13127 \end_layout
13128
13129 \begin_layout Description
13130 \begin_inset Flex Code
13131 status collapsed
13132
13133 \begin_layout Plain Layout
13134 NeedProtect
13135 \end_layout
13136
13137 \end_inset
13138
13139  [
13140 \begin_inset Flex Code
13141 status collapsed
13142
13143 \begin_layout Plain Layout
13144
13145 \emph on
13146 0
13147 \end_layout
13148
13149 \end_inset
13150
13151 ,
13152 \begin_inset Flex Code
13153 status collapsed
13154
13155 \begin_layout Plain Layout
13156 1
13157 \end_layout
13158
13159 \end_inset
13160
13161 ] Whether fragile commands in this style should be 
13162 \begin_inset Flex Code
13163 status collapsed
13164
13165 \begin_layout Plain Layout
13166
13167 \backslash
13168 protect
13169 \end_layout
13170
13171 \end_inset
13172
13173 'ed.
13174  (Note: This is 
13175 \emph on
13176 not
13177 \emph default
13178  whether this command should itself be protected.)
13179 \end_layout
13180
13181 \begin_layout Description
13182 \begin_inset Flex Code
13183 status collapsed
13184
13185 \begin_layout Plain Layout
13186 Newline
13187 \end_layout
13188
13189 \end_inset
13190
13191  [
13192 \begin_inset Flex Code
13193 status collapsed
13194
13195 \begin_layout Plain Layout
13196 0
13197 \end_layout
13198
13199 \end_inset
13200
13201
13202 \begin_inset Flex Code
13203 status collapsed
13204
13205 \begin_layout Plain Layout
13206
13207 \emph on
13208 1
13209 \end_layout
13210
13211 \end_inset
13212
13213 ] Whether newlines are translated into LaTeX newlines (
13214 \begin_inset Flex Code
13215 status collapsed
13216
13217 \begin_layout Plain Layout
13218
13219 \backslash
13220
13221 \backslash
13222
13223 \end_layout
13224
13225 \end_inset
13226
13227 ) or not.
13228  The translation can be switched off to allow more comfortable LaTeX editing
13229  inside LyX.
13230 \end_layout
13231
13232 \begin_layout Description
13233 \begin_inset Flex Code
13234 status collapsed
13235
13236 \begin_layout Plain Layout
13237 NextNoIndent
13238 \end_layout
13239
13240 \end_inset
13241
13242  [
13243 \begin_inset Flex Code
13244 status collapsed
13245
13246 \begin_layout Plain Layout
13247 1
13248 \end_layout
13249
13250 \end_inset
13251
13252
13253 \begin_inset Flex Code
13254 status collapsed
13255
13256 \begin_layout Plain Layout
13257
13258 \emph on
13259 0
13260 \end_layout
13261
13262 \end_inset
13263
13264 ] If set to true, and if 
13265 \begin_inset Flex Code
13266 status collapsed
13267
13268 \begin_layout Plain Layout
13269 DefaultStyle
13270 \end_layout
13271
13272 \end_inset
13273
13274  (usually 
13275 \begin_inset Flex Code
13276 status collapsed
13277
13278 \begin_layout Plain Layout
13279 Standard
13280 \end_layout
13281
13282 \end_inset
13283
13284 ) paragraphs are being indented, then the indentation of such a paragraph
13285  following one of this type will be suppressed.
13286  (So this will not affect the display of non-default paragraphs.)
13287 \end_layout
13288
13289 \begin_layout Description
13290 \begin_inset Flex Code
13291 status collapsed
13292
13293 \begin_layout Plain Layout
13294 ObsoletedBy
13295 \end_layout
13296
13297 \end_inset
13298
13299  Name of a style that has replaced this style.
13300  This is used to rename a style, while keeping backward compatibility.
13301 \end_layout
13302
13303 \begin_layout Description
13304
13305 \change_deleted -712698321 1353679722
13306 \begin_inset Flex Code
13307 status collapsed
13308
13309 \begin_layout Plain Layout
13310 OptionalArgs
13311 \end_layout
13312
13313 \end_inset
13314
13315  [
13316 \begin_inset Flex Code
13317 status collapsed
13318
13319 \begin_layout Plain Layout
13320 int=0
13321 \end_layout
13322
13323 \end_inset
13324
13325 ] The number of optional arguments that can be used with this style.
13326  This is useful for things like section headings, and only makes sense with
13327  LaTeX.
13328  Note that, on output, the optional arguments will all precede any required
13329  arguments (see below).
13330  So one can have constructs like:
13331 \end_layout
13332
13333 \begin_deeper
13334 \begin_layout LyX-Code
13335
13336 \change_deleted -712698321 1353679722
13337
13338 \backslash
13339 mycmd[opt1]{req1}{contents of paragraph}
13340 \end_layout
13341
13342 \begin_layout Standard
13343
13344 \change_deleted -712698321 1353679722
13345 but one cannot have things like: 
13346 \end_layout
13347
13348 \begin_layout LyX-Code
13349
13350 \change_deleted -712698321 1353679722
13351
13352 \backslash
13353 mycmd[opt1]{req1}[opt2]{contents of paragraph}
13354 \end_layout
13355
13356 \begin_layout Standard
13357
13358 \change_deleted -712698321 1353679722
13359 at least, not without ERT (with which you can have anything).
13360  
13361 \change_unchanged
13362
13363 \end_layout
13364
13365 \end_deeper
13366 \begin_layout Description
13367 \begin_inset Flex Code
13368 status collapsed
13369
13370 \begin_layout Plain Layout
13371 ParbreakIsNewline
13372 \end_layout
13373
13374 \end_inset
13375
13376  [
13377 \begin_inset Flex Code
13378 status collapsed
13379
13380 \begin_layout Plain Layout
13381
13382 \emph on
13383 0
13384 \end_layout
13385
13386 \end_inset
13387
13388
13389 \begin_inset Flex Code
13390 status collapsed
13391
13392 \begin_layout Plain Layout
13393 1
13394 \end_layout
13395
13396 \end_inset
13397
13398 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
13399  output, but only by a line break; together with 
13400 \begin_inset Flex Code
13401 status collapsed
13402
13403 \begin_layout Plain Layout
13404 PassThru 1
13405 \end_layout
13406
13407 \end_inset
13408
13409 , this allows to emulate a plain text editor (like the ERT inset).
13410 \end_layout
13411
13412 \begin_layout Description
13413 \begin_inset Flex Code
13414 status collapsed
13415
13416 \begin_layout Plain Layout
13417 ParIndent
13418 \end_layout
13419
13420 \end_inset
13421
13422  [
13423 \begin_inset Flex Code
13424 status collapsed
13425
13426 \begin_layout Plain Layout
13427 string=""
13428 \end_layout
13429
13430 \end_inset
13431
13432 ] The indent of the very first line of a paragraph.
13433  The 
13434 \begin_inset Flex Code
13435 status collapsed
13436
13437 \begin_layout Plain Layout
13438 Parindent
13439 \end_layout
13440
13441 \end_inset
13442
13443  will be fixed for a certain style.
13444  The exception is the default style, since the indentation for these paragraphs
13445  can be prohibited with 
13446 \begin_inset Flex Code
13447 status collapsed
13448
13449 \begin_layout Plain Layout
13450 NextNoIndent
13451 \end_layout
13452
13453 \end_inset
13454
13455 .
13456  Also, 
13457 \begin_inset Flex Code
13458 status collapsed
13459
13460 \begin_layout Plain Layout
13461 Standard
13462 \end_layout
13463
13464 \end_inset
13465
13466  style paragraphs inside environments use the 
13467 \begin_inset Flex Code
13468 status collapsed
13469
13470 \begin_layout Plain Layout
13471 Parindent
13472 \end_layout
13473
13474 \end_inset
13475
13476  of the environment, not their native one.
13477  For example, 
13478 \begin_inset Flex Code
13479 status collapsed
13480
13481 \begin_layout Plain Layout
13482 Standard
13483 \end_layout
13484
13485 \end_inset
13486
13487  paragraphs inside an enumeration are not indented.
13488 \end_layout
13489
13490 \begin_layout Description
13491 \begin_inset Flex Code
13492 status collapsed
13493
13494 \begin_layout Plain Layout
13495 Parsep
13496 \end_layout
13497
13498 \end_inset
13499
13500  [
13501 \begin_inset Flex Code
13502 status collapsed
13503
13504 \begin_layout Plain Layout
13505 float=0
13506 \end_layout
13507
13508 \end_inset
13509
13510 ] The vertical space between two paragraphs of this style.
13511 \end_layout
13512
13513 \begin_layout Description
13514 \begin_inset Flex Code
13515 status collapsed
13516
13517 \begin_layout Plain Layout
13518 Parskip
13519 \end_layout
13520
13521 \end_inset
13522
13523  [
13524 \begin_inset Flex Code
13525 status collapsed
13526
13527 \begin_layout Plain Layout
13528 float=0
13529 \end_layout
13530
13531 \end_inset
13532
13533 ] LyX allows the user to choose either 
13534 \begin_inset Quotes eld
13535 \end_inset
13536
13537 indent
13538 \begin_inset Quotes erd
13539 \end_inset
13540
13541  or 
13542 \begin_inset Quotes eld
13543 \end_inset
13544
13545 skip
13546 \begin_inset Quotes erd
13547 \end_inset
13548
13549  to typeset a document.
13550  When 
13551 \begin_inset Quotes eld
13552 \end_inset
13553
13554 indent
13555 \begin_inset Quotes erd
13556 \end_inset
13557
13558  is chosen, this value is completely ignored.
13559  When 
13560 \begin_inset Quotes eld
13561 \end_inset
13562
13563 skip
13564 \begin_inset Quotes erd
13565 \end_inset
13566
13567  is chosen, the parindent of a LaTeXtype 
13568 \begin_inset Quotes eld
13569 \end_inset
13570
13571 Paragraph
13572 \begin_inset Quotes erd
13573 \end_inset
13574
13575  style is ignored and all paragraphs are separated by this parskip argument.
13576  The vertical space is calculated with 
13577 \begin_inset Flex Code
13578 status collapsed
13579
13580 \begin_layout Plain Layout
13581 value
13582 \begin_inset space ~
13583 \end_inset
13584
13585 * DefaultHeight
13586 \end_layout
13587
13588 \end_inset
13589
13590  where 
13591 \begin_inset Flex Code
13592 status collapsed
13593
13594 \begin_layout Plain Layout
13595 DefaultHeight
13596 \end_layout
13597
13598 \end_inset
13599
13600  is the height of a row with the normal font.
13601  This way, the look stays the same with different screen fonts.
13602 \end_layout
13603
13604 \begin_layout Description
13605 \begin_inset Flex Code
13606 status collapsed
13607
13608 \begin_layout Plain Layout
13609 PassThru
13610 \end_layout
13611
13612 \end_inset
13613
13614  [
13615 \begin_inset Flex Code
13616 status collapsed
13617
13618 \begin_layout Plain Layout
13619
13620 \emph on
13621 0
13622 \end_layout
13623
13624 \end_inset
13625
13626
13627 \begin_inset Flex Code
13628 status collapsed
13629
13630 \begin_layout Plain Layout
13631 1
13632 \end_layout
13633
13634 \end_inset
13635
13636 ] Whether the contents of this paragraph should be output in raw form, meaning
13637  without special translations that LaTeX would require.
13638 \end_layout
13639
13640 \begin_layout Description
13641 \begin_inset Flex Code
13642 status collapsed
13643
13644 \begin_layout Plain Layout
13645 Preamble
13646 \end_layout
13647
13648 \end_inset
13649
13650  Information to be included in the LaTeX preamble when this style is used.
13651  Used to define macros, load packages, etc., required by this particular
13652  style.
13653  Must end with 
13654 \begin_inset Quotes eld
13655 \end_inset
13656
13657
13658 \begin_inset Flex Code
13659 status collapsed
13660
13661 \begin_layout Plain Layout
13662 EndPreamble
13663 \end_layout
13664
13665 \end_inset
13666
13667
13668 \begin_inset Quotes erd
13669 \end_inset
13670
13671 .
13672 \end_layout
13673
13674 \begin_layout Description
13675 \begin_inset Flex Code
13676 status collapsed
13677
13678 \begin_layout Plain Layout
13679 RefPrefix
13680 \end_layout
13681
13682 \end_inset
13683
13684  [
13685 \begin_inset Flex Code
13686 status collapsed
13687
13688 \begin_layout Plain Layout
13689 string
13690 \end_layout
13691
13692 \end_inset
13693
13694 ] The prefix to use when creating labels referring to paragraphs of this
13695  type.
13696  This allows the use of formatted references.
13697 \end_layout
13698
13699 \begin_layout Description
13700
13701 \change_deleted -712698321 1353681258
13702 \begin_inset Flex Code
13703 status collapsed
13704
13705 \begin_layout Plain Layout
13706 RequiredArgs
13707 \end_layout
13708
13709 \end_inset
13710
13711  [
13712 \begin_inset Flex Code
13713 status collapsed
13714
13715 \begin_layout Plain Layout
13716 int=0
13717 \end_layout
13718
13719 \end_inset
13720
13721 ] The number of required arguments that the LaTeX command or environment
13722  corresponding to this style expects.
13723  In the case of a command, these are required arguments 
13724 \emph on
13725 other than
13726 \emph default
13727  that associated with the content of the paragraph itself.
13728  These do not actually have to be provided: LyX will output empty arguments
13729  if necessary.
13730  Note that optional arguments will be output before required arguments.
13731  See the discussion of the 
13732 \begin_inset Flex Code
13733 status collapsed
13734
13735 \begin_layout Plain Layout
13736 OptionalArgs
13737 \end_layout
13738
13739 \end_inset
13740
13741  tag above for more information.
13742 \change_unchanged
13743
13744 \end_layout
13745
13746 \begin_layout Description
13747 \begin_inset Flex Code
13748 status collapsed
13749
13750 \begin_layout Plain Layout
13751 Requires 
13752 \end_layout
13753
13754 \end_inset
13755
13756  [
13757 \begin_inset Flex Code
13758 status collapsed
13759
13760 \begin_layout Plain Layout
13761 string
13762 \end_layout
13763
13764 \end_inset
13765
13766 ] Whether the style requires the feature 
13767 \begin_inset Flex Code
13768 status collapsed
13769
13770 \begin_layout Plain Layout
13771 string
13772 \end_layout
13773
13774 \end_inset
13775
13776 .
13777  See the description of 
13778 \begin_inset Flex Code
13779 status collapsed
13780
13781 \begin_layout Plain Layout
13782 Provides
13783 \end_layout
13784
13785 \end_inset
13786
13787  above (page 
13788 \begin_inset CommandInset ref
13789 LatexCommand pageref
13790 reference "des:FreeSpacing"
13791
13792 \end_inset
13793
13794 ) for information on `features'.
13795  
13796 \change_inserted -712698321 1353693134
13797
13798 \end_layout
13799
13800 \begin_layout Description
13801
13802 \change_inserted -712698321 1353693371
13803 \begin_inset Flex Code
13804 status collapsed
13805
13806 \begin_layout Plain Layout
13807
13808 \change_inserted -712698321 1353693146
13809 ResetArgs
13810 \change_unchanged
13811
13812 \end_layout
13813
13814 \end_inset
13815
13816  [
13817 \begin_inset Flex Code
13818 status collapsed
13819
13820 \begin_layout Plain Layout
13821
13822 \change_inserted -712698321 1353693235
13823
13824 \emph on
13825 0
13826 \end_layout
13827
13828 \end_inset
13829
13830 ,
13831 \begin_inset Flex Code
13832 status collapsed
13833
13834 \begin_layout Plain Layout
13835
13836 \change_inserted -712698321 1353693235
13837 1
13838 \end_layout
13839
13840 \end_inset
13841
13842 ] Resets the LaTeX arguments of this style (as defined via the 
13843 \begin_inset Flex Code
13844 status collapsed
13845
13846 \begin_layout Plain Layout
13847
13848 \change_inserted -712698321 1353693371
13849 Argument
13850 \change_unchanged
13851
13852 \end_layout
13853
13854 \end_inset
13855
13856  tag).
13857  This is useful if you have copied a style via 
13858 \begin_inset Flex Code
13859 status collapsed
13860
13861 \begin_layout Plain Layout
13862
13863 \change_inserted -712698321 1353693302
13864 CopyStyle
13865 \change_unchanged
13866
13867 \end_layout
13868
13869 \end_inset
13870
13871 , but you do not want to inherit its (required and optional) arguments.
13872 \change_unchanged
13873
13874 \end_layout
13875
13876 \begin_layout Description
13877
13878 \change_inserted -712698321 1354263074
13879 \begin_inset Flex Code
13880 status collapsed
13881
13882 \begin_layout Plain Layout
13883
13884 \change_inserted -712698321 1353866876
13885 RightDelim
13886 \end_layout
13887
13888 \end_inset
13889
13890  [
13891 \begin_inset Flex Code
13892 status collapsed
13893
13894 \begin_layout Plain Layout
13895
13896 \change_inserted -712698321 1353866873
13897 string
13898 \end_layout
13899
13900 \end_inset
13901
13902 ] A string that is put at the end of the layout content.
13903  A line break in the output can be indicated by 
13904 \begin_inset Flex Code
13905 status collapsed
13906
13907 \begin_layout Plain Layout
13908
13909 \change_inserted -712698321 1354263069
13910 <br/>
13911 \change_unchanged
13912
13913 \end_layout
13914
13915 \end_inset
13916
13917 .
13918 \end_layout
13919
13920 \begin_layout Description
13921 \begin_inset Flex Code
13922 status collapsed
13923
13924 \begin_layout Plain Layout
13925 RightMargin
13926 \end_layout
13927
13928 \end_inset
13929
13930  [
13931 \begin_inset Flex Code
13932 status collapsed
13933
13934 \begin_layout Plain Layout
13935 string=""
13936 \end_layout
13937
13938 \end_inset
13939
13940 ] Similar to 
13941 \begin_inset Flex Code
13942 status collapsed
13943
13944 \begin_layout Plain Layout
13945 LeftMargin
13946 \end_layout
13947
13948 \end_inset
13949
13950 .
13951 \end_layout
13952
13953 \begin_layout Description
13954 \begin_inset Flex Code
13955 status collapsed
13956
13957 \begin_layout Plain Layout
13958 Spacing
13959 \end_layout
13960
13961 \end_inset
13962
13963  [
13964 \begin_inset Flex Code
13965 status collapsed
13966
13967 \begin_layout Plain Layout
13968
13969 \emph on
13970 single
13971 \emph default
13972 , onehalf, double, other
13973 \end_layout
13974
13975 \end_inset
13976
13977  
13978 \emph on
13979 value
13980 \emph default
13981 ] This defines what the default spacing should be in the style.
13982  The arguments 
13983 \begin_inset Flex Code
13984 status collapsed
13985
13986 \begin_layout Plain Layout
13987 single
13988 \end_layout
13989
13990 \end_inset
13991
13992
13993 \begin_inset Flex Code
13994 status collapsed
13995
13996 \begin_layout Plain Layout
13997 onehalf
13998 \end_layout
13999
14000 \end_inset
14001
14002  and 
14003 \begin_inset Flex Code
14004 status collapsed
14005
14006 \begin_layout Plain Layout
14007 double
14008 \end_layout
14009
14010 \end_inset
14011
14012  correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14013  If you specify the argument 
14014 \begin_inset Flex Code
14015 status collapsed
14016
14017 \begin_layout Plain Layout
14018 other
14019 \end_layout
14020
14021 \end_inset
14022
14023 , then you should also provide a numerical argument which will be the actual
14024  multiplier value.
14025  Note that, contrary to other parameters, 
14026 \begin_inset Flex Code
14027 status collapsed
14028
14029 \begin_layout Plain Layout
14030 Spacing
14031 \end_layout
14032
14033 \end_inset
14034
14035  implies the generation of specific LaTeX code, using the package 
14036 \family roman
14037
14038 \begin_inset Flex Code
14039 status collapsed
14040
14041 \begin_layout Plain Layout
14042 setspace.sty
14043 \end_layout
14044
14045 \end_inset
14046
14047 .
14048 \end_layout
14049
14050 \begin_layout Description
14051 \begin_inset Flex Code
14052 status collapsed
14053
14054 \begin_layout Plain Layout
14055 Spellcheck
14056 \end_layout
14057
14058 \end_inset
14059
14060  [
14061 \begin_inset Flex Code
14062 status collapsed
14063
14064 \begin_layout Plain Layout
14065 0
14066 \end_layout
14067
14068 \end_inset
14069
14070 ,
14071 \begin_inset Flex Code
14072 status collapsed
14073
14074 \begin_layout Plain Layout
14075
14076 \emph on
14077 1
14078 \end_layout
14079
14080 \end_inset
14081
14082 ] Spellcheck paragraphs of this style.
14083  Default is true.
14084 \end_layout
14085
14086 \begin_layout Description
14087 \begin_inset Flex Code
14088 status collapsed
14089
14090 \begin_layout Plain Layout
14091 TextFont
14092 \end_layout
14093
14094 \end_inset
14095
14096  The font used for the text body .
14097  See section 
14098 \begin_inset CommandInset ref
14099 LatexCommand ref
14100 reference "sub:Font-description"
14101
14102 \end_inset
14103
14104 .
14105 \end_layout
14106
14107 \begin_layout Description
14108 \begin_inset Flex Code
14109 status collapsed
14110
14111 \begin_layout Plain Layout
14112 TocLevel
14113 \end_layout
14114
14115 \end_inset
14116
14117
14118 \series medium
14119  
14120 \begin_inset Flex Code
14121 status collapsed
14122
14123 \begin_layout Plain Layout
14124
14125 \series medium
14126 [int]
14127 \end_layout
14128
14129 \end_inset
14130
14131
14132 \series default
14133  The level of the style in the table of contents.
14134  This is used for automatic numbering of section headings.
14135 \end_layout
14136
14137 \begin_layout Description
14138 \begin_inset Flex Code
14139 status collapsed
14140
14141 \begin_layout Plain Layout
14142 TopSep
14143 \end_layout
14144
14145 \end_inset
14146
14147  [
14148 \begin_inset Flex Code
14149 status collapsed
14150
14151 \begin_layout Plain Layout
14152 float=0
14153 \end_layout
14154
14155 \end_inset
14156
14157 ] The vertical space with which the very first of a chain of paragraphs
14158  with this style is separated from the previous paragraph.
14159  If the previous paragraph has another style, the separations are not simply
14160  added, but the maximum is taken.
14161 \end_layout
14162
14163 \begin_layout Subsection
14164 \begin_inset CommandInset label
14165 LatexCommand label
14166 name "sub:I18n"
14167
14168 \end_inset
14169
14170 Internationalization of Paragraph Styles
14171 \end_layout
14172
14173 \begin_layout Standard
14174 LyX has long supported internationalization of layout information, but,
14175  until version 2.0, this applied only to the user interface and not to, say,
14176  PDF output.
14177  Thus, French authors were forced to resort to ugly hacks if they wanted
14178  `
14179 \lang french
14180 Théorème
14181 \lang english
14182  1' instead of `Theorem 1'.
14183  Thanks to Georg Baum, that is no longer the case.
14184 \end_layout
14185
14186 \begin_layout Standard
14187 If a 
14188 \begin_inset Flex Code
14189 status collapsed
14190
14191 \begin_layout Plain Layout
14192 Style
14193 \end_layout
14194
14195 \end_inset
14196
14197  defines text that is to appear in the typeset document, it may use 
14198 \begin_inset Flex Code
14199 status collapsed
14200
14201 \begin_layout Plain Layout
14202 LangPreamble
14203 \end_layout
14204
14205 \end_inset
14206
14207  and 
14208 \begin_inset Flex Code
14209 status collapsed
14210
14211 \begin_layout Plain Layout
14212 BabelPreamble
14213 \end_layout
14214
14215 \end_inset
14216
14217  to support non-English and even multi-language documents correctly.
14218  The following excerpt (from the 
14219 \begin_inset Flex Code
14220 status collapsed
14221
14222 \begin_layout Plain Layout
14223 theorems-ams.inc
14224 \end_layout
14225
14226 \end_inset
14227
14228  file) shows how this works:
14229 \end_layout
14230
14231 \begin_layout LyX-Code
14232 Preamble
14233 \end_layout
14234
14235 \begin_deeper
14236 \begin_layout LyX-Code
14237   
14238 \backslash
14239 theoremstyle{remark}
14240 \end_layout
14241
14242 \begin_layout LyX-Code
14243   
14244 \backslash
14245 newtheorem{claim}[thm]{
14246 \backslash
14247 protect
14248 \backslash
14249 claimname}
14250 \end_layout
14251
14252 \begin_layout LyX-Code
14253 EndPreamble
14254 \end_layout
14255
14256 \begin_layout LyX-Code
14257 LangPreamble
14258 \end_layout
14259
14260 \begin_layout LyX-Code
14261   
14262 \backslash
14263 providecommand{
14264 \backslash
14265 claimname}{_(Claim)}
14266 \end_layout
14267
14268 \begin_layout LyX-Code
14269 EndLangPreamble
14270 \end_layout
14271
14272 \begin_layout LyX-Code
14273 BabelPreamble
14274 \end_layout
14275
14276 \begin_layout LyX-Code
14277     
14278 \backslash
14279 addto
14280 \backslash
14281 captions$$lang{
14282 \backslash
14283 renewcommand{
14284 \backslash
14285 claimname}{_(Claim)}}
14286 \end_layout
14287
14288 \begin_layout LyX-Code
14289 EndBabelPreamble
14290 \end_layout
14291
14292 \end_deeper
14293 \begin_layout Standard
14294 In principle, any legal LaTeX may appear in the 
14295 \begin_inset Flex Code
14296 status collapsed
14297
14298 \begin_layout Plain Layout
14299 LangPreamble
14300 \end_layout
14301
14302 \end_inset
14303
14304  and 
14305 \begin_inset Flex Code
14306 status collapsed
14307
14308 \begin_layout Plain Layout
14309 BabelPreamble
14310 \end_layout
14311
14312 \end_inset
14313
14314  tags, but in practice they will typically look as they do here.
14315  The key to correct translation of the typeset text is the definition of
14316  the LaTeX command 
14317 \begin_inset Flex Code
14318 status collapsed
14319
14320 \begin_layout Plain Layout
14321
14322 \backslash
14323 claimname
14324 \end_layout
14325
14326 \end_inset
14327
14328  and its use in 
14329 \begin_inset Flex Code
14330 status collapsed
14331
14332 \begin_layout Plain Layout
14333
14334 \backslash
14335 newtheorem
14336 \end_layout
14337
14338 \end_inset
14339
14340 .
14341  
14342 \end_layout
14343
14344 \begin_layout Standard
14345 The 
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  tag provides for internationalization based upon the overall language of
14356  the document.
14357  The contents of the tag will be included in the preamble, just as with
14358  the 
14359 \begin_inset Flex Code
14360 status collapsed
14361
14362 \begin_layout Plain Layout
14363 Preamble
14364 \end_layout
14365
14366 \end_inset
14367
14368  tag.
14369  What makes it special is the use of the 
14370 \begin_inset Quotes eld
14371 \end_inset
14372
14373 function
14374 \begin_inset Quotes erd
14375 \end_inset
14376
14377  
14378 \begin_inset Flex Code
14379 status collapsed
14380
14381 \begin_layout Plain Layout
14382 _()
14383 \end_layout
14384
14385 \end_inset
14386
14387 , which will be replaced, when LyX produces LaTeX output, with the translation
14388  of its argument into the document language.
14389 \end_layout
14390
14391 \begin_layout Standard
14392 The 
14393 \begin_inset Flex Code
14394 status collapsed
14395
14396 \begin_layout Plain Layout
14397 BabelPreamble
14398 \end_layout
14399
14400 \end_inset
14401
14402  tag is more complex, since it is meant to provide support for multi-language
14403  documents and so offers an interface to the 
14404 \begin_inset Flex Code
14405 status collapsed
14406
14407 \begin_layout Plain Layout
14408 babel
14409 \end_layout
14410
14411 \end_inset
14412
14413  package.
14414  Its contents will be added to the preamble once for each language that
14415  appears in the document.
14416  In this case, the argument to 
14417 \begin_inset Flex Code
14418 status collapsed
14419
14420 \begin_layout Plain Layout
14421 _()
14422 \end_layout
14423
14424 \end_inset
14425
14426  will be replaced with its translation into the language in question; the
14427  expression 
14428 \begin_inset Flex Code
14429 status collapsed
14430
14431 \begin_layout Plain Layout
14432 $$lang
14433 \end_layout
14434
14435 \end_inset
14436
14437  is replaced by the language name (as used by the babel package).
14438 \end_layout
14439
14440 \begin_layout Standard
14441 A German document that also included a French section would thus have the
14442  following in the preamble:
14443 \end_layout
14444
14445 \begin_layout LyX-Code
14446
14447 \backslash
14448 addto
14449 \backslash
14450 captionsfrench{
14451 \backslash
14452 renewcommand{
14453 \backslash
14454 claimname}{Affirmation}}   
14455 \backslash
14456 addto
14457 \backslash
14458 captionsngerman{
14459 \backslash
14460 renewcommand{
14461 \backslash
14462 claimname}{Behauptung}}   
14463 \backslash
14464 providecommand{
14465 \backslash
14466 claimname}{Behauptung}
14467 \end_layout
14468
14469 \begin_layout Standard
14470 LaTeX and 
14471 \begin_inset Flex Code
14472 status collapsed
14473
14474 \begin_layout Plain Layout
14475 babel
14476 \end_layout
14477
14478 \end_inset
14479
14480  will then conspire to produce the correct text in the output.
14481 \end_layout
14482
14483 \begin_layout Standard
14484 One important point to note here is that the translations are provided by
14485  LyX itself, through the 
14486 \change_inserted -195340706 1334775793
14487 file 
14488 \begin_inset Flex Code
14489 status collapsed
14490
14491 \begin_layout Plain Layout
14492
14493 \change_inserted -195340706 1334775793
14494 layouttranslations
14495 \end_layout
14496
14497 \end_inset
14498
14499
14500 \change_deleted -195340706 1334775793
14501 same mechanism it uses for internationalization of the user interface
14502 \change_unchanged
14503 .
14504  This means, in effect, that 
14505 \begin_inset Flex Code
14506 status collapsed
14507
14508 \begin_layout Plain Layout
14509 LangPreamble
14510 \end_layout
14511
14512 \end_inset
14513
14514  and 
14515 \begin_inset Flex Code
14516 status collapsed
14517
14518 \begin_layout Plain Layout
14519 BabelPreamble
14520 \end_layout
14521
14522 \end_inset
14523
14524  are really only of use in layout files that are provided with LyX, since
14525  text entered in user-created layout files will not be seen by LyX's internation
14526 alization routines
14527 \change_inserted -195340706 1334775793
14528  unless the 
14529 \begin_inset Flex Code
14530 status collapsed
14531
14532 \begin_layout Plain Layout
14533
14534 \change_inserted -195340706 1334775793
14535 layouttranslations
14536 \end_layout
14537
14538 \end_inset
14539
14540  file is modified accordingly
14541 \change_unchanged
14542 .
14543  That said, however, any layout created with the intention that it will
14544  be included with LyX should use these tags where appropriate.
14545
14546 \change_inserted -195340706 1334775793
14547  Please note that the paragraph style translations provided by LyX will
14548  never change with a minor update (e.g.
14549  from version 2.1.x to 2.1.y).
14550  It is however quite likely that a major update (e.g.
14551  from 2.0.x to 2.1.y) will introduce new translations or corrections.
14552 \change_unchanged
14553
14554 \end_layout
14555
14556 \begin_layout Subsection
14557 Floats
14558 \begin_inset CommandInset label
14559 LatexCommand label
14560 name "sub:Floats"
14561
14562 \end_inset
14563
14564
14565 \end_layout
14566
14567 \begin_layout Standard
14568 Since version 1.3.0 of LyX, it is has been both possible and necessary to
14569  define the floats (
14570 \begin_inset Flex MenuItem
14571 status collapsed
14572
14573 \begin_layout Plain Layout
14574 figure
14575 \end_layout
14576
14577 \end_inset
14578
14579
14580 \begin_inset Flex MenuItem
14581 status collapsed
14582
14583 \begin_layout Plain Layout
14584 table
14585 \end_layout
14586
14587 \end_inset
14588
14589 , \SpecialChar \ldots{}
14590 ) in the text class itself.
14591  Standard floats are included in the file 
14592 \begin_inset Flex Code
14593 status collapsed
14594
14595 \begin_layout Plain Layout
14596 stdfloats.inc
14597 \end_layout
14598
14599 \end_inset
14600
14601 , so you may have to do no more than add
14602 \end_layout
14603
14604 \begin_layout LyX-Code
14605 Input stdfloats.inc
14606 \end_layout
14607
14608 \begin_layout Standard
14609 to your layout file.
14610  If you want to implement a text class that proposes some other float types
14611  (like the AGU class bundled with LyX), the information below will hopefully
14612  help you:
14613 \end_layout
14614
14615 \begin_layout Description
14616 \begin_inset Flex Code
14617 status collapsed
14618
14619 \begin_layout Plain Layout
14620 Extension
14621 \end_layout
14622
14623 \end_inset
14624
14625  [
14626 \begin_inset Flex Code
14627 status collapsed
14628
14629 \begin_layout Plain Layout
14630 string
14631 \end_layout
14632
14633 \end_inset
14634
14635 =
14636 \begin_inset Quotes erd
14637 \end_inset
14638
14639
14640 \begin_inset Quotes erd
14641 \end_inset
14642
14643 ] The file name extension of an auxiliary file for the list of figures (or
14644  whatever).
14645  LaTeX writes the captions to this file.
14646 \end_layout
14647
14648 \begin_layout Description
14649 \begin_inset Flex Code
14650 status collapsed
14651
14652 \begin_layout Plain Layout
14653 GuiName
14654 \end_layout
14655
14656 \end_inset
14657
14658  [
14659 \begin_inset Flex Code
14660 status collapsed
14661
14662 \begin_layout Plain Layout
14663 string
14664 \end_layout
14665
14666 \end_inset
14667
14668 =
14669 \begin_inset Quotes erd
14670 \end_inset
14671
14672
14673 \begin_inset Quotes erd
14674 \end_inset
14675
14676 ] The string that will be used in the menus and also for the caption.
14677  This is translated to the current language if babel is used.
14678 \end_layout
14679
14680 \begin_layout Description
14681 \begin_inset Flex Code
14682 status collapsed
14683
14684 \begin_layout Plain Layout
14685 HTML*
14686 \end_layout
14687
14688 \end_inset
14689
14690  These are used for XHTML output.
14691  See 
14692 \begin_inset CommandInset ref
14693 LatexCommand ref
14694 reference "sec:Tags-for-XHTML"
14695
14696 \end_inset
14697
14698 .
14699 \end_layout
14700
14701 \begin_layout Description
14702 \begin_inset Flex Code
14703 status collapsed
14704
14705 \begin_layout Plain Layout
14706 IsPredefined
14707 \end_layout
14708
14709 \end_inset
14710
14711  [
14712 \emph on
14713
14714 \begin_inset Flex Code
14715 status open
14716
14717 \begin_layout Plain Layout
14718 0
14719 \end_layout
14720
14721 \end_inset
14722
14723
14724 \emph default
14725
14726 \begin_inset Flex Code
14727 status collapsed
14728
14729 \begin_layout Plain Layout
14730 1
14731 \end_layout
14732
14733 \end_inset
14734
14735 ] Indicates whether the float is already defined in the document class or
14736  if we instead need to load 
14737 \begin_inset Flex Code
14738 status collapsed
14739
14740 \begin_layout Plain Layout
14741 float.sty
14742 \end_layout
14743
14744 \end_inset
14745
14746  and use what it provides to define it on-the-fly.
14747  The default is 
14748 \begin_inset Flex Code
14749 status collapsed
14750
14751 \begin_layout Plain Layout
14752 0
14753 \end_layout
14754
14755 \end_inset
14756
14757 , which means: use 
14758 \begin_inset Flex Code
14759 status collapsed
14760
14761 \begin_layout Plain Layout
14762 float.sty
14763 \end_layout
14764
14765 \end_inset
14766
14767 .
14768  It should be set to 
14769 \begin_inset Flex Code
14770 status collapsed
14771
14772 \begin_layout Plain Layout
14773 1
14774 \end_layout
14775
14776 \end_inset
14777
14778  if the float is already defined by the LaTeX document class.
14779 \end_layout
14780
14781 \begin_layout Description
14782 \begin_inset Flex Code
14783 status collapsed
14784
14785 \begin_layout Plain Layout
14786 ListCommand
14787 \end_layout
14788
14789 \end_inset
14790
14791  [
14792 \begin_inset Flex Code
14793 status collapsed
14794
14795 \begin_layout Plain Layout
14796 string
14797 \end_layout
14798
14799 \end_inset
14800
14801 =
14802 \begin_inset Quotes erd
14803 \end_inset
14804
14805
14806 \begin_inset Quotes erd
14807 \end_inset
14808
14809 ] The command used to generate a list of floats of this type; the leading
14810  `
14811 \backslash
14812 ' should be omitted.
14813  This 
14814 \emph on
14815 must
14816 \emph default
14817  be given if 
14818 \begin_inset Flex Code
14819 status collapsed
14820
14821 \begin_layout Plain Layout
14822 UsesFloatPkg
14823 \end_layout
14824
14825 \end_inset
14826
14827  is false, since there is no standard way to generate this command.
14828  It is ignored if 
14829 \begin_inset Flex Code
14830 status collapsed
14831
14832 \begin_layout Plain Layout
14833 UsesFloatPkg
14834 \end_layout
14835
14836 \end_inset
14837
14838  is true, since in that case there is a standard way to define the command.
14839 \end_layout
14840
14841 \begin_layout Description
14842 \begin_inset Flex Code
14843 status collapsed
14844
14845 \begin_layout Plain Layout
14846 ListName
14847 \end_layout
14848
14849 \end_inset
14850
14851  [
14852 \begin_inset Flex Code
14853 status collapsed
14854
14855 \begin_layout Plain Layout
14856 string
14857 \end_layout
14858
14859 \end_inset
14860
14861 =
14862 \begin_inset Quotes erd
14863 \end_inset
14864
14865
14866 \begin_inset Quotes erd
14867 \end_inset
14868
14869 ] A title for a list of floats of this kind (list of figures, tables, or
14870  whatever).
14871  It is used for the screen label within LyX; it is passed to LaTeX for use
14872  as the title there; and it is used as the title in XHTML output.
14873  It will be translated to the document language.
14874 \end_layout
14875
14876 \begin_layout Description
14877 \begin_inset Flex Code
14878 status collapsed
14879
14880 \begin_layout Plain Layout
14881 NumberWithin
14882 \end_layout
14883
14884 \end_inset
14885
14886  [
14887 \begin_inset Flex Code
14888 status collapsed
14889
14890 \begin_layout Plain Layout
14891 string
14892 \end_layout
14893
14894 \end_inset
14895
14896 =
14897 \begin_inset Quotes erd
14898 \end_inset
14899
14900
14901 \begin_inset Quotes erd
14902 \end_inset
14903
14904 ] This (optional) argument determines whether floats of this class will
14905  be numbered within some sectional unit of the document.
14906  For example, if within is equal to 
14907 \begin_inset Flex Code
14908 status collapsed
14909
14910 \begin_layout Plain Layout
14911 chapter
14912 \end_layout
14913
14914 \end_inset
14915
14916 , the floats will be numbered within chapters.
14917  
14918 \end_layout
14919
14920 \begin_layout Description
14921 \begin_inset Flex Code
14922 status collapsed
14923
14924 \begin_layout Plain Layout
14925 Placement
14926 \end_layout
14927
14928 \end_inset
14929
14930  [
14931 \begin_inset Flex Code
14932 status collapsed
14933
14934 \begin_layout Plain Layout
14935 string
14936 \end_layout
14937
14938 \end_inset
14939
14940 =
14941 \begin_inset Quotes erd
14942 \end_inset
14943
14944
14945 \begin_inset Quotes erd
14946 \end_inset
14947
14948 ] The default placement for the given class of floats.
14949  The string should be as in standard LaTeX: 
14950 \begin_inset Flex Code
14951 status collapsed
14952
14953 \begin_layout Plain Layout
14954 t
14955 \end_layout
14956
14957 \end_inset
14958
14959
14960 \begin_inset Flex Code
14961 status collapsed
14962
14963 \begin_layout Plain Layout
14964 b
14965 \end_layout
14966
14967 \end_inset
14968
14969
14970 \begin_inset Flex Code
14971 status collapsed
14972
14973 \begin_layout Plain Layout
14974 p
14975 \end_layout
14976
14977 \end_inset
14978
14979  and 
14980 \begin_inset Flex Code
14981 status collapsed
14982
14983 \begin_layout Plain Layout
14984 h
14985 \end_layout
14986
14987 \end_inset
14988
14989  for top, bottom, page, and here, respectively.
14990 \begin_inset Foot
14991 status collapsed
14992
14993 \begin_layout Plain Layout
14994 Note that the order of these letters in the string is irrelevant, like in
14995  LaTeX.
14996 \end_layout
14997
14998 \end_inset
14999
15000  On top of that there is a new type, 
15001 \begin_inset Flex Code
15002 status collapsed
15003
15004 \begin_layout Plain Layout
15005 H
15006 \end_layout
15007
15008 \end_inset
15009
15010 , which does not really correspond to a float, since it means: put it 
15011 \begin_inset Quotes eld
15012 \end_inset
15013
15014 here
15015 \begin_inset Quotes erd
15016 \end_inset
15017
15018  and nowhere else.
15019  Note however that the 
15020 \begin_inset Flex Code
15021 status collapsed
15022
15023 \begin_layout Plain Layout
15024 H
15025 \end_layout
15026
15027 \end_inset
15028
15029  specifier is special and, because of implementation details, cannot be
15030  used in non-built in float types.
15031  If you do not understand what this means, just use 
15032 \begin_inset Quotes eld
15033 \end_inset
15034
15035
15036 \begin_inset Flex Code
15037 status collapsed
15038
15039 \begin_layout Plain Layout
15040 tbp
15041 \end_layout
15042
15043 \end_inset
15044
15045
15046 \begin_inset Quotes erd
15047 \end_inset
15048
15049 .
15050 \end_layout
15051
15052 \begin_layout Description
15053 \begin_inset Flex Code
15054 status collapsed
15055
15056 \begin_layout Plain Layout
15057 RefPrefix
15058 \end_layout
15059
15060 \end_inset
15061
15062  [
15063 \begin_inset Flex Code
15064 status collapsed
15065
15066 \begin_layout Plain Layout
15067 string
15068 \end_layout
15069
15070 \end_inset
15071
15072 ] The prefix to use when creating labels referring to floats of this type.
15073  This allows the use of formatted references.
15074  Note that you can remove any 
15075 \begin_inset Flex Code
15076 status collapsed
15077
15078 \begin_layout Plain Layout
15079 RefPrefix
15080 \end_layout
15081
15082 \end_inset
15083
15084  set by a copied style by using the special value 
15085 \begin_inset Quotes eld
15086 \end_inset
15087
15088 OFF
15089 \begin_inset Quotes erd
15090 \end_inset
15091
15092 , which must be all caps.
15093 \end_layout
15094
15095 \begin_layout Description
15096 \begin_inset Flex Code
15097 status collapsed
15098
15099 \begin_layout Plain Layout
15100 Style
15101 \end_layout
15102
15103 \end_inset
15104
15105  [
15106 \begin_inset Flex Code
15107 status collapsed
15108
15109 \begin_layout Plain Layout
15110 string
15111 \end_layout
15112
15113 \end_inset
15114
15115 =
15116 \begin_inset Quotes erd
15117 \end_inset
15118
15119
15120 \begin_inset Quotes erd
15121 \end_inset
15122
15123 ] The style used when defining the float using 
15124 \begin_inset Flex Code
15125 status collapsed
15126
15127 \begin_layout Plain Layout
15128
15129 \backslash
15130 newfloat
15131 \end_layout
15132
15133 \end_inset
15134
15135 .
15136 \end_layout
15137
15138 \begin_layout Description
15139 \begin_inset Flex Code
15140 status collapsed
15141
15142 \begin_layout Plain Layout
15143 Type
15144 \end_layout
15145
15146 \end_inset
15147
15148  [
15149 \begin_inset Flex Code
15150 status collapsed
15151
15152 \begin_layout Plain Layout
15153 string
15154 \end_layout
15155
15156 \end_inset
15157
15158 =
15159 \begin_inset Quotes erd
15160 \end_inset
15161
15162
15163 \begin_inset Quotes erd
15164 \end_inset
15165
15166 ] The 
15167 \begin_inset Quotes eld
15168 \end_inset
15169
15170 type
15171 \begin_inset Quotes erd
15172 \end_inset
15173
15174  of the new class of floats, like program or algorithm.
15175  After the appropriate 
15176 \begin_inset Flex Code
15177 status collapsed
15178
15179 \begin_layout Plain Layout
15180
15181 \backslash
15182 newfloat
15183 \end_layout
15184
15185 \end_inset
15186
15187 , commands such as 
15188 \begin_inset Flex Code
15189 status collapsed
15190
15191 \begin_layout Plain Layout
15192
15193 \backslash
15194 begin{program}
15195 \end_layout
15196
15197 \end_inset
15198
15199  or 
15200 \begin_inset Flex Code
15201 status collapsed
15202
15203 \begin_layout Plain Layout
15204
15205 \backslash
15206 end{algorithm*}
15207 \end_layout
15208
15209 \end_inset
15210
15211  will be available.
15212 \end_layout
15213
15214 \begin_layout Description
15215 \begin_inset Flex Code
15216 status collapsed
15217
15218 \begin_layout Plain Layout
15219 UsesFloatPkg
15220 \end_layout
15221
15222 \end_inset
15223
15224  [
15225 \begin_inset Flex Code
15226 status open
15227
15228 \begin_layout Plain Layout
15229 0
15230 \end_layout
15231
15232 \end_inset
15233
15234
15235 \begin_inset Flex Code
15236 status collapsed
15237
15238 \begin_layout Plain Layout
15239
15240 \emph on
15241 1
15242 \end_layout
15243
15244 \end_inset
15245
15246 ] Tells us whether this float is defined using the facilities provided by
15247  
15248 \begin_inset Flex Code
15249 status collapsed
15250
15251 \begin_layout Plain Layout
15252 float.sty
15253 \end_layout
15254
15255 \end_inset
15256
15257 , either by the class file or a package, or on-the-fly by LyX itself.
15258 \end_layout
15259
15260 \begin_layout Standard
15261 Note that defining a float with type 
15262 \begin_inset Flex Code
15263 status collapsed
15264
15265 \begin_layout Plain Layout
15266
15267 \emph on
15268 type
15269 \end_layout
15270
15271 \end_inset
15272
15273  automatically defines the corresponding counter with name 
15274 \begin_inset Flex Code
15275 status collapsed
15276
15277 \begin_layout Plain Layout
15278
15279 \emph on
15280 type
15281 \end_layout
15282
15283 \end_inset
15284
15285 .
15286 \end_layout
15287
15288 \begin_layout Subsection
15289 Flex insets and InsetLayout
15290 \begin_inset CommandInset label
15291 LatexCommand label
15292 name "sub:Flex-insets-and"
15293
15294 \end_inset
15295
15296
15297 \end_layout
15298
15299 \begin_layout Standard
15300 LyX has supported character styles since version 1.4.0; as of version 1.6.0,
15301  these are called Flex insets.
15302  
15303 \end_layout
15304
15305 \begin_layout Standard
15306 Flex insets come in three different kinds: 
15307 \end_layout
15308
15309 \begin_layout Itemize
15310 character style (
15311 \begin_inset Flex Code
15312 status collapsed
15313
15314 \begin_layout Plain Layout
15315 CharStyle
15316 \end_layout
15317
15318 \end_inset
15319
15320 ): These define semantic markup corresponding to such LaTeX commands as
15321  
15322 \begin_inset Flex Code
15323 status collapsed
15324
15325 \begin_layout Plain Layout
15326
15327 \backslash
15328 noun
15329 \end_layout
15330
15331 \end_inset
15332
15333  and 
15334 \begin_inset Flex Code
15335 status collapsed
15336
15337 \begin_layout Plain Layout
15338
15339 \backslash
15340 code
15341 \end_layout
15342
15343 \end_inset
15344
15345 .
15346 \end_layout
15347
15348 \begin_layout Itemize
15349 user custom (
15350 \begin_inset Flex Code
15351 status collapsed
15352
15353 \begin_layout Plain Layout
15354 Custom
15355 \end_layout
15356
15357 \end_inset
15358
15359 ): These can be used to define custom collapsible insets, similar to TeX
15360  code, footnote, and the like.
15361  An obvious example is an endnote inset, which is defined in the 
15362 \begin_inset Flex Code
15363 status collapsed
15364
15365 \begin_layout Plain Layout
15366 endnote
15367 \end_layout
15368
15369 \end_inset
15370
15371  module.
15372 \end_layout
15373
15374 \begin_layout Itemize
15375 XML elements (
15376 \begin_inset Flex Code
15377 status collapsed
15378
15379 \begin_layout Plain Layout
15380 Element
15381 \end_layout
15382
15383 \end_inset
15384
15385 ): For use with DocBook classes.
15386 \end_layout
15387
15388 \begin_layout Standard
15389 Flex insets are defined using the 
15390 \begin_inset Flex Code
15391 status collapsed
15392
15393 \begin_layout Plain Layout
15394 InsetLayout
15395 \end_layout
15396
15397 \end_inset
15398
15399  tag, which shall be explained in a moment.
15400 \end_layout
15401
15402 \begin_layout Standard
15403 The 
15404 \begin_inset Flex Code
15405 status collapsed
15406
15407 \begin_layout Plain Layout
15408 InsetLayout
15409 \end_layout
15410
15411 \end_inset
15412
15413  tag also serves another function: It can be used to customize the general
15414  layout of many different types of insets.
15415  Currently, 
15416 \begin_inset Flex Code
15417 status collapsed
15418
15419 \begin_layout Plain Layout
15420 InsetLayout
15421 \end_layout
15422
15423 \end_inset
15424
15425  can be used to customize the layout parameters for footnotes, marginal
15426  notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
15427  boxes, tables, algorithms, URLs, and optional arguments, as well as to
15428  define Flex insets.
15429 \end_layout
15430
15431 \begin_layout Standard
15432 The 
15433 \begin_inset Flex Code
15434 status collapsed
15435
15436 \begin_layout Plain Layout
15437 InsetLayout
15438 \end_layout
15439
15440 \end_inset
15441
15442  definition must begin with a line of the form:
15443 \end_layout
15444
15445 \begin_layout LyX-Code
15446 InsetLayout <Type>
15447 \end_layout
15448
15449 \begin_layout Standard
15450 Here 
15451 \begin_inset Flex Code
15452 status collapsed
15453
15454 \begin_layout Plain Layout
15455 <Type>
15456 \end_layout
15457
15458 \end_inset
15459
15460  indicates the inset whose layout is being defined, and here there are 
15461 \change_inserted 5863208 1334489266
15462 three
15463 \change_deleted 5863208 1334489267
15464 two
15465 \change_unchanged
15466  cases.
15467 \end_layout
15468
15469 \begin_layout Enumerate
15470 The layout for a pre-existing inset is being modified.
15471  In this case, can be 
15472 \begin_inset Flex Code
15473 status collapsed
15474
15475 \begin_layout Plain Layout
15476 <Type>
15477 \end_layout
15478
15479 \end_inset
15480
15481  any one of the following: 
15482 \begin_inset Flex Code
15483 status collapsed
15484
15485 \begin_layout Plain Layout
15486 Algorithm
15487 \end_layout
15488
15489 \end_inset
15490
15491
15492 \begin_inset Flex Code
15493 status collapsed
15494
15495 \begin_layout Plain Layout
15496 Branch
15497 \end_layout
15498
15499 \end_inset
15500
15501
15502 \begin_inset Flex Code
15503 status collapsed
15504
15505 \begin_layout Plain Layout
15506 Box
15507 \end_layout
15508
15509 \end_inset
15510
15511
15512 \begin_inset Flex Code
15513 status collapsed
15514
15515 \begin_layout Plain Layout
15516 Box:shaded
15517 \end_layout
15518
15519 \end_inset
15520
15521
15522 \begin_inset Flex Code
15523 status collapsed
15524
15525 \begin_layout Plain Layout
15526 ERT
15527 \end_layout
15528
15529 \end_inset
15530
15531
15532 \begin_inset Flex Code
15533 status collapsed
15534
15535 \begin_layout Plain Layout
15536 Figure
15537 \end_layout
15538
15539 \end_inset
15540
15541
15542 \begin_inset Flex Code
15543 status collapsed
15544
15545 \begin_layout Plain Layout
15546 Foot
15547 \end_layout
15548
15549 \end_inset
15550
15551
15552 \begin_inset Flex Code
15553 status collapsed
15554
15555 \begin_layout Plain Layout
15556 Index
15557 \end_layout
15558
15559 \end_inset
15560
15561
15562 \begin_inset Flex Code
15563 status collapsed
15564
15565 \begin_layout Plain Layout
15566 Info
15567 \end_layout
15568
15569 \end_inset
15570
15571
15572 \begin_inset Flex Code
15573 status collapsed
15574
15575 \begin_layout Plain Layout
15576 Info:menu
15577 \end_layout
15578
15579 \end_inset
15580
15581
15582 \begin_inset Flex Code
15583 status collapsed
15584
15585 \begin_layout Plain Layout
15586 Info:shortcut
15587 \end_layout
15588
15589 \end_inset
15590
15591
15592 \begin_inset Flex Code
15593 status collapsed
15594
15595 \begin_layout Plain Layout
15596 Info:shortcuts
15597 \end_layout
15598
15599 \end_inset
15600
15601
15602 \begin_inset Flex Code
15603 status collapsed
15604
15605 \begin_layout Plain Layout
15606 Listings
15607 \end_layout
15608
15609 \end_inset
15610
15611
15612 \begin_inset Flex Code
15613 status collapsed
15614
15615 \begin_layout Plain Layout
15616 Marginal
15617 \end_layout
15618
15619 \end_inset
15620
15621
15622 \begin_inset Flex Code
15623 status collapsed
15624
15625 \begin_layout Plain Layout
15626 Note:Comment
15627 \end_layout
15628
15629 \end_inset
15630
15631
15632 \begin_inset Flex Code
15633 status collapsed
15634
15635 \begin_layout Plain Layout
15636 Note:Note
15637 \end_layout
15638
15639 \end_inset
15640
15641
15642 \begin_inset Flex Code
15643 status collapsed
15644
15645 \begin_layout Plain Layout
15646 Note:Greyedout
15647 \end_layout
15648
15649 \end_inset
15650
15651
15652 \begin_inset Flex Code
15653 status collapsed
15654
15655 \begin_layout Plain Layout
15656
15657 \change_deleted -712698321 1353866704
15658 Opt
15659 \change_unchanged
15660 Arg
15661 \change_inserted -712698321 1353866707
15662 ument
15663 \change_unchanged
15664
15665 \end_layout
15666
15667 \end_inset
15668
15669
15670 \begin_inset Flex Code
15671 status collapsed
15672
15673 \begin_layout Plain Layout
15674 Table
15675 \end_layout
15676
15677 \end_inset
15678
15679 , or 
15680 \begin_inset Flex Code
15681 status collapsed
15682
15683 \begin_layout Plain Layout
15684 URL
15685 \end_layout
15686
15687 \end_inset
15688
15689 .
15690 \end_layout
15691
15692 \begin_layout Enumerate
15693 The layout for a Flex inset is being defined.
15694  In this case, 
15695 \begin_inset Flex Code
15696 status collapsed
15697
15698 \begin_layout Plain Layout
15699 <Type>
15700 \end_layout
15701
15702 \end_inset
15703
15704  must be of the form 
15705 \begin_inset Quotes eld
15706 \end_inset
15707
15708
15709 \begin_inset Flex Code
15710 status collapsed
15711
15712 \begin_layout Plain Layout
15713 Flex:<name>
15714 \end_layout
15715
15716 \end_inset
15717
15718
15719 \begin_inset Quotes erd
15720 \end_inset
15721
15722 , where 
15723 \begin_inset Flex Code
15724 status collapsed
15725
15726 \begin_layout Plain Layout
15727 name
15728 \end_layout
15729
15730 \end_inset
15731
15732  may be be any valid identifier not used by a pre-existing Flex inset.
15733  The identifier may include spaces, but in that case the whole thing must
15734  be wrapped in quotes.
15735  Note that the definition of a flex inset 
15736 \emph on
15737 must 
15738 \emph default
15739 also include a 
15740 \begin_inset Flex Code
15741 status collapsed
15742
15743 \begin_layout Plain Layout
15744 LyXType
15745 \end_layout
15746
15747 \end_inset
15748
15749  entry, declaring which type of inset it defines.
15750 \change_inserted 5863208 1334489312
15751
15752 \end_layout
15753
15754 \begin_layout Enumerate
15755
15756 \change_inserted 5863208 1334492248
15757 The layout for user specific branch is being defined.
15758  In this case, 
15759 \begin_inset Flex Code
15760 status collapsed
15761
15762 \begin_layout Plain Layout
15763
15764 \change_inserted 5863208 1334489384
15765 <Type>
15766 \end_layout
15767
15768 \end_inset
15769
15770  must be of the form 
15771 \begin_inset Quotes eld
15772 \end_inset
15773
15774
15775 \begin_inset Flex Code
15776 status collapsed
15777
15778 \begin_layout Plain Layout
15779
15780 \change_inserted 5863208 1334489392
15781 Branch:<name>
15782 \end_layout
15783
15784 \end_inset
15785
15786
15787 \begin_inset Quotes erd
15788 \end_inset
15789
15790 , where 
15791 \begin_inset Flex Code
15792 status collapsed
15793
15794 \begin_layout Plain Layout
15795
15796 \change_inserted 5863208 1334489384
15797 name
15798 \end_layout
15799
15800 \end_inset
15801
15802  may be be any valid identifier of branch defined in user's document.
15803  The identifier may include spaces, but in that case the whole thing must
15804  be wrapped in quotes.
15805  The main purpose of this feature is to allow LaTeX wrapping around specific
15806  branches as user needs.
15807 \change_unchanged
15808
15809 \end_layout
15810
15811 \begin_layout Standard
15812 The 
15813 \begin_inset Flex Code
15814 status collapsed
15815
15816 \begin_layout Plain Layout
15817 InsetLayout
15818 \end_layout
15819
15820 \end_inset
15821
15822  definition can contain the following entries:
15823 \end_layout
15824
15825 \begin_layout Description
15826
15827 \change_inserted -712698321 1353681390
15828 \begin_inset Flex Code
15829 status collapsed
15830
15831 \begin_layout Plain Layout
15832
15833 \change_inserted -712698321 1353681344
15834 Argument
15835 \end_layout
15836
15837 \end_inset
15838
15839  [
15840 \begin_inset Flex Code
15841 status collapsed
15842
15843 \begin_layout Plain Layout
15844
15845 \change_inserted -712698321 1353681344
15846 int
15847 \end_layout
15848
15849 \end_inset
15850
15851 ] Defines argument number <int> of a command\SpecialChar \slash{}
15852 environment associated with
15853  the current layout.
15854  The definition must end with 
15855 \begin_inset Flex Code
15856 status collapsed
15857
15858 \begin_layout Plain Layout
15859
15860 \change_inserted -712698321 1353681344
15861 EndArgument
15862 \end_layout
15863
15864 \end_inset
15865
15866 .
15867  See section
15868 \begin_inset space ~
15869 \end_inset
15870
15871
15872 \begin_inset CommandInset ref
15873 LatexCommand ref
15874 reference "sub:Paragraph-Styles"
15875
15876 \end_inset
15877
15878  for details.
15879 \end_layout
15880
15881 \begin_layout Description
15882
15883 \change_inserted -195340706 1333913893
15884 \begin_inset Flex Code
15885 status collapsed
15886
15887 \begin_layout Plain Layout
15888 BabelPreamble
15889 \end_layout
15890
15891 \end_inset
15892
15893  Preamble for changing languages.
15894  See section
15895 \begin_inset space ~
15896 \end_inset
15897
15898
15899 \begin_inset CommandInset ref
15900 LatexCommand ref
15901 reference "sub:I18n"
15902
15903 \end_inset
15904
15905 .
15906 \end_layout
15907
15908 \begin_layout Description
15909 \begin_inset Flex Code
15910 status collapsed
15911
15912 \begin_layout Plain Layout
15913 BgColor
15914 \end_layout
15915
15916 \end_inset
15917
15918  The color for the inset's background.
15919  The valid colors are defined in 
15920 \begin_inset Flex Code
15921 status collapsed
15922
15923 \begin_layout Plain Layout
15924 src/ColorCode.h
15925 \end_layout
15926
15927 \end_inset
15928
15929 .
15930 \end_layout
15931
15932 \begin_layout Description
15933 \begin_inset Flex Code
15934 status collapsed
15935
15936 \begin_layout Plain Layout
15937 ContentAsLabel
15938 \end_layout
15939
15940 \end_inset
15941
15942  [
15943 \begin_inset Flex Code
15944 status collapsed
15945
15946 \begin_layout Plain Layout
15947
15948 \emph on
15949 0
15950 \end_layout
15951
15952 \end_inset
15953
15954 ,
15955 \begin_inset Flex Code
15956 status collapsed
15957
15958 \begin_layout Plain Layout
15959 1
15960 \end_layout
15961
15962 \end_inset
15963
15964 ] Whether to use the content of the inset as the label, when the inset is
15965  closed.
15966  Default is false.
15967 \end_layout
15968
15969 \begin_layout Description
15970 \begin_inset Flex Code
15971 status collapsed
15972
15973 \begin_layout Plain Layout
15974 CopyStyle
15975 \end_layout
15976
15977 \end_inset
15978
15979  
15980 \begin_inset Flex Code
15981 status collapsed
15982
15983 \begin_layout Plain Layout
15984 [string]
15985 \end_layout
15986
15987 \end_inset
15988
15989  Copies all the features of an existing style into the current one.
15990  
15991 \end_layout
15992
15993 \begin_layout Description
15994 \begin_inset Flex Code
15995 status collapsed
15996
15997 \begin_layout Plain Layout
15998 CustomPars
15999 \end_layout
16000
16001 \end_inset
16002
16003  [
16004 \begin_inset Flex Code
16005 status collapsed
16006
16007 \begin_layout Plain Layout
16008
16009 \emph on
16010 0
16011 \end_layout
16012
16013 \end_inset
16014
16015 ,
16016 \begin_inset Flex Code
16017 status collapsed
16018
16019 \begin_layout Plain Layout
16020 1
16021 \end_layout
16022
16023 \end_inset
16024
16025 ] Indicates whether the user may employ the Paragraph Settings dialog to
16026  customize the paragraph.
16027 \end_layout
16028
16029 \begin_layout Description
16030 \begin_inset Flex Code
16031 status collapsed
16032
16033 \begin_layout Plain Layout
16034 Decoration
16035 \end_layout
16036
16037 \end_inset
16038
16039  can be 
16040 \begin_inset Flex Code
16041 status collapsed
16042
16043 \begin_layout Plain Layout
16044 Classic
16045 \end_layout
16046
16047 \end_inset
16048
16049
16050 \begin_inset Flex Code
16051 status collapsed
16052
16053 \begin_layout Plain Layout
16054 Minimalistic
16055 \end_layout
16056
16057 \end_inset
16058
16059 , or 
16060 \begin_inset Flex Code
16061 status collapsed
16062
16063 \begin_layout Plain Layout
16064 Conglomerate
16065 \end_layout
16066
16067 \end_inset
16068
16069 , describing the rendering style used for the inset's frame and buttons.
16070  Footnotes generally use 
16071 \begin_inset Flex Code
16072 status collapsed
16073
16074 \begin_layout Plain Layout
16075 Classic
16076 \end_layout
16077
16078 \end_inset
16079
16080 , ERT insets generally 
16081 \begin_inset Flex Code
16082 status collapsed
16083
16084 \begin_layout Plain Layout
16085 Minimalistic
16086 \end_layout
16087
16088 \end_inset
16089
16090 , and character styles 
16091 \begin_inset Flex Code
16092 status collapsed
16093
16094 \begin_layout Plain Layout
16095 Conglomerate
16096 \end_layout
16097
16098 \end_inset
16099
16100 .
16101 \end_layout
16102
16103 \begin_layout Description
16104 \begin_inset Flex Code
16105 status collapsed
16106
16107 \begin_layout Plain Layout
16108 Display
16109 \end_layout
16110
16111 \end_inset
16112
16113  [
16114 \begin_inset Flex Code
16115 status collapsed
16116
16117 \begin_layout Plain Layout
16118 0
16119 \end_layout
16120
16121 \end_inset
16122
16123 ,
16124 \begin_inset Flex Code
16125 status collapsed
16126
16127 \begin_layout Plain Layout
16128
16129 \emph on
16130 1
16131 \end_layout
16132
16133 \end_inset
16134
16135 ] Only useful if 
16136 \begin_inset Flex Code
16137 status collapsed
16138
16139 \begin_layout Plain Layout
16140 LatexType
16141 \end_layout
16142
16143 \end_inset
16144
16145  is 
16146 \begin_inset Flex Code
16147 status collapsed
16148
16149 \begin_layout Plain Layout
16150 Environment
16151 \end_layout
16152
16153 \end_inset
16154
16155 .
16156  Indicates whether the environment will stand on its own in LaTeX output
16157  or will appear inline with the surrounding text.
16158  If set to false, it is supposed that the LaTeX environment ignores white
16159  space (including one newline character) after the 
16160 \begin_inset Flex Code
16161 status collapsed
16162
16163 \begin_layout Plain Layout
16164
16165 \backslash
16166 begin{
16167 \emph on
16168 LatexName
16169 \emph default
16170 }
16171 \end_layout
16172
16173 \end_inset
16174
16175  and 
16176 \begin_inset Flex Code
16177 status collapsed
16178
16179 \begin_layout Plain Layout
16180
16181 \backslash
16182 end{
16183 \emph on
16184 LatexName
16185 \emph default
16186 }
16187 \end_layout
16188
16189 \end_inset
16190
16191  tags.
16192  Default is true.
16193 \end_layout
16194
16195 \begin_layout Description
16196 \begin_inset Flex Code
16197 status collapsed
16198
16199 \begin_layout Plain Layout
16200 End
16201 \end_layout
16202
16203 \end_inset
16204
16205  Required at the end of the InsetLayout declarations.
16206 \end_layout
16207
16208 \begin_layout Description
16209 \begin_inset Flex Code
16210 status collapsed
16211
16212 \begin_layout Plain Layout
16213 Font
16214 \end_layout
16215
16216 \end_inset
16217
16218  The font used for both the text body 
16219 \emph on
16220 and
16221 \emph default
16222  the label.
16223  See section
16224 \begin_inset space ~
16225 \end_inset
16226
16227
16228 \begin_inset CommandInset ref
16229 LatexCommand ref
16230 reference "sub:Font-description"
16231
16232 \end_inset
16233
16234 .
16235  Note that defining this font automatically defines the 
16236 \begin_inset Flex Code
16237 status collapsed
16238
16239 \begin_layout Plain Layout
16240 LabelFont
16241 \end_layout
16242
16243 \end_inset
16244
16245  to the same value, so define this first and define 
16246 \begin_inset Flex Code
16247 status collapsed
16248
16249 \begin_layout Plain Layout
16250 LabelFont
16251 \end_layout
16252
16253 \end_inset
16254
16255  later if you want them to be different.
16256 \change_inserted 155139281 1354130923
16257
16258 \end_layout
16259
16260 \begin_layout Description
16261
16262 \change_inserted 155139281 1354130923
16263 \begin_inset Flex Code
16264 status collapsed
16265
16266 \begin_layout Plain Layout
16267
16268 \change_inserted 155139281 1354130923
16269 ForceLocalFontSwitch
16270 \end_layout
16271
16272 \end_inset
16273
16274  [
16275 \begin_inset Flex Code
16276 status collapsed
16277
16278 \begin_layout Plain Layout
16279
16280 \change_inserted 155139281 1354130923
16281
16282 \emph on
16283 0
16284 \end_layout
16285
16286 \end_inset
16287
16288 ,
16289 \begin_inset Flex Code
16290 status collapsed
16291
16292 \begin_layout Plain Layout
16293
16294 \change_inserted 155139281 1354130923
16295 1
16296 \end_layout
16297
16298 \end_inset
16299
16300 ] When using babel, always use a local font switch (
16301 \begin_inset Flex Code
16302 status collapsed
16303
16304 \begin_layout Plain Layout
16305
16306 \change_inserted 155139281 1354130923
16307
16308 \backslash
16309 foreignlanguage
16310 \end_layout
16311
16312 \end_inset
16313
16314 ), never a global one (such as 
16315 \begin_inset Flex Code
16316 status collapsed
16317
16318 \begin_layout Plain Layout
16319
16320 \change_inserted 155139281 1354130923
16321
16322 \backslash
16323 selectlanguage
16324 \end_layout
16325
16326 \end_inset
16327
16328 ).
16329 \change_unchanged
16330
16331 \end_layout
16332
16333 \begin_layout Description
16334 \begin_inset Flex Code
16335 status collapsed
16336
16337 \begin_layout Plain Layout
16338 ForceLTR
16339 \end_layout
16340
16341 \end_inset
16342
16343  Force the 
16344 \begin_inset Quotes eld
16345 \end_inset
16346
16347 latex
16348 \begin_inset Quotes erd
16349 \end_inset
16350
16351  language, leading to Left-to-Right (latin) output, e.
16352 \begin_inset space \thinspace{}
16353 \end_inset
16354
16355 g.
16356 \begin_inset space \space{}
16357 \end_inset
16358
16359 in TeX code or URL.
16360  A kludge.
16361 \end_layout
16362
16363 \begin_layout Description
16364 \begin_inset Flex Code
16365 status collapsed
16366
16367 \begin_layout Plain Layout
16368 ForcePlain
16369 \end_layout
16370
16371 \end_inset
16372
16373  [
16374 \begin_inset Flex Code
16375 status collapsed
16376
16377 \begin_layout Plain Layout
16378
16379 \emph on
16380 0
16381 \end_layout
16382
16383 \end_inset
16384
16385 ,
16386 \begin_inset Flex Code
16387 status collapsed
16388
16389 \begin_layout Plain Layout
16390 1
16391 \end_layout
16392
16393 \end_inset
16394
16395 ] Indicates whether the 
16396 \begin_inset Flex Code
16397 status collapsed
16398
16399 \begin_layout Plain Layout
16400 PlainLayout
16401 \end_layout
16402
16403 \end_inset
16404
16405  should be used or, instead, the user can change the paragraph style used
16406  in the inset.
16407  Default is false.
16408 \end_layout
16409
16410 \begin_layout Description
16411 \begin_inset Flex Code
16412 status collapsed
16413
16414 \begin_layout Plain Layout
16415 FreeSpacing
16416 \end_layout
16417
16418 \end_inset
16419
16420  [
16421 \begin_inset Flex Code
16422 status collapsed
16423
16424 \begin_layout Plain Layout
16425
16426 \emph on
16427 0
16428 \end_layout
16429
16430 \end_inset
16431
16432
16433 \begin_inset Flex Code
16434 status collapsed
16435
16436 \begin_layout Plain Layout
16437 1
16438 \end_layout
16439
16440 \end_inset
16441
16442 ] Usually LyX doesn't allow you to insert more than one space between words,
16443  since a space is considered as the separation between two words, not a
16444  character or symbol of its own.
16445  This is a very fine thing but sometimes annoying, for example, when typing
16446  program code or plain LaTeX code.
16447  For this reason, 
16448 \begin_inset Flex Code
16449 status collapsed
16450
16451 \begin_layout Plain Layout
16452 FreeSpacing
16453 \end_layout
16454
16455 \end_inset
16456
16457  can be enabled.
16458  Note that LyX will create protected blanks for the additional blanks when
16459  in another mode than LaTeX-mode.
16460  Default is false.
16461 \end_layout
16462
16463 \begin_layout Description
16464 \begin_inset Flex Code
16465 status collapsed
16466
16467 \begin_layout Plain Layout
16468 HTML*
16469 \end_layout
16470
16471 \end_inset
16472
16473  These tags control XHTML output.
16474  See section 
16475 \begin_inset CommandInset ref
16476 LatexCommand ref
16477 reference "sec:Tags-for-XHTML"
16478
16479 \end_inset
16480
16481 .
16482 \end_layout
16483
16484 \begin_layout Description
16485 \begin_inset Flex Code
16486 status collapsed
16487
16488 \begin_layout Plain Layout
16489 InToc
16490 \end_layout
16491
16492 \end_inset
16493
16494  [
16495 \begin_inset Flex Code
16496 status collapsed
16497
16498 \begin_layout Plain Layout
16499
16500 \emph on
16501 0
16502 \end_layout
16503
16504 \end_inset
16505
16506 ,
16507 \begin_inset Flex Code
16508 status collapsed
16509
16510 \begin_layout Plain Layout
16511 1
16512 \end_layout
16513
16514 \end_inset
16515
16516 ] Whether to include the contents of this inset in the strings generated
16517  for the `Outline' pane.
16518  One would not, for example, want the content of a footnote in a section
16519  header to be included in the TOC displayed in the outline, but one would
16520  normally want the content of a character style displayed.
16521  Default is false: not to include.
16522 \end_layout
16523
16524 \begin_layout Description
16525 \begin_inset Flex Code
16526 status collapsed
16527
16528 \begin_layout Plain Layout
16529 KeepEmpty
16530 \end_layout
16531
16532 \end_inset
16533
16534  [
16535 \begin_inset Flex Code
16536 status collapsed
16537
16538 \begin_layout Plain Layout
16539
16540 \emph on
16541 0
16542 \end_layout
16543
16544 \end_inset
16545
16546
16547 \begin_inset Flex Code
16548 status collapsed
16549
16550 \begin_layout Plain Layout
16551 1
16552 \end_layout
16553
16554 \end_inset
16555
16556 ] Usually LyX does not allow you to leave a paragraph empty, since it would
16557  lead to empty LaTeX output.
16558  There are some cases where this could be desirable however: in a letter
16559  template, the required fields can be provided as empty fields, so that
16560  people do not forget them; in some special classes, a style can be used
16561  as some kind of break, which does not contain actual text.
16562  Default is false.
16563 \end_layout
16564
16565 \begin_layout Description
16566 \begin_inset Flex Code
16567 status collapsed
16568
16569 \begin_layout Plain Layout
16570 LabelFont
16571 \end_layout
16572
16573 \end_inset
16574
16575  The font used for the label.
16576  See section
16577 \begin_inset space ~
16578 \end_inset
16579
16580
16581 \begin_inset CommandInset ref
16582 LatexCommand ref
16583 reference "sub:Font-description"
16584
16585 \end_inset
16586
16587 .
16588  Note that this definition can never appear before 
16589 \begin_inset Flex Code
16590 status collapsed
16591
16592 \begin_layout Plain Layout
16593 Font
16594 \end_layout
16595
16596 \end_inset
16597
16598 , lest it be ineffective.
16599 \end_layout
16600
16601 \begin_layout Description
16602 \begin_inset Flex Code
16603 status collapsed
16604
16605 \begin_layout Plain Layout
16606 LabelString
16607 \end_layout
16608
16609 \end_inset
16610
16611  What will be displayed on the button or elsewhere as the inset label.
16612  Some inset types (
16613 \begin_inset Flex Code
16614 status collapsed
16615
16616 \begin_layout Plain Layout
16617 TeX code
16618 \end_layout
16619
16620 \end_inset
16621
16622  and 
16623 \begin_inset Flex Code
16624 status collapsed
16625
16626 \begin_layout Plain Layout
16627 Branch
16628 \end_layout
16629
16630 \end_inset
16631
16632 ) modify this label on the fly.
16633 \end_layout
16634
16635 \begin_layout Description
16636
16637 \change_inserted -195340706 1333913893
16638 \begin_inset Flex Code
16639 status collapsed
16640
16641 \begin_layout Plain Layout
16642 LangPreamble
16643 \end_layout
16644
16645 \end_inset
16646
16647  Language dependent preamble.
16648  See section
16649 \begin_inset space ~
16650 \end_inset
16651
16652
16653 \begin_inset CommandInset ref
16654 LatexCommand ref
16655 reference "sub:I18n"
16656
16657 \end_inset
16658
16659 .
16660 \end_layout
16661
16662 \begin_layout Description
16663 \begin_inset Flex Code
16664 status collapsed
16665
16666 \begin_layout Plain Layout
16667 LatexName
16668 \end_layout
16669
16670 \end_inset
16671
16672  The name of the corresponding LaTeX stuff.
16673  Either the environment or command name.
16674 \end_layout
16675
16676 \begin_layout Description
16677 \begin_inset Flex Code
16678 status collapsed
16679
16680 \begin_layout Plain Layout
16681 LatexParam
16682 \end_layout
16683
16684 \end_inset
16685
16686  The optional parameter for the corresponding 
16687 \begin_inset Flex Code
16688 status collapsed
16689
16690 \begin_layout Plain Layout
16691 LatexName
16692 \end_layout
16693
16694 \end_inset
16695
16696  stuff, including possible bracket pairs like 
16697 \begin_inset Flex Code
16698 status collapsed
16699
16700 \begin_layout Plain Layout
16701 []
16702 \end_layout
16703
16704 \end_inset
16705
16706 .
16707  
16708 \change_inserted -712698321 1355144715
16709 This will be output as is after all LaTeX 
16710 \begin_inset Flex Code
16711 status collapsed
16712
16713 \begin_layout Plain Layout
16714
16715 \change_inserted -712698321 1355144713
16716 Arguments
16717 \end_layout
16718
16719 \end_inset
16720
16721 .
16722  
16723 \change_unchanged
16724 This parameter cannot be changed from within LyX
16725 \change_inserted -712698321 1355144775
16726  (use 
16727 \begin_inset Flex Code
16728 status collapsed
16729
16730 \begin_layout Plain Layout
16731
16732 \change_inserted -712698321 1355144747
16733 Argument
16734 \end_layout
16735
16736 \end_inset
16737
16738  for customizable parameters)
16739 \change_unchanged
16740 .
16741 \end_layout
16742
16743 \begin_layout Description
16744 \begin_inset Flex Code
16745 status collapsed
16746
16747 \begin_layout Plain Layout
16748 LatexType
16749 \end_layout
16750
16751 \end_inset
16752
16753  [
16754 \begin_inset Flex Code
16755 status collapsed
16756
16757 \begin_layout Plain Layout
16758
16759 \change_deleted -712698321 1353867544
16760
16761 \emph on
16762 Paragraph
16763 \emph default
16764
16765 \change_unchanged
16766 Command, Environment, 
16767 \change_inserted -712698321 1353867573
16768 None
16769 \change_deleted -712698321 1353867557
16770 Item_Environment,
16771 \change_unchanged
16772
16773 \end_layout
16774
16775 \end_inset
16776
16777  
16778 \begin_inset Flex Code
16779 status collapsed
16780
16781 \begin_layout Plain Layout
16782
16783 \change_deleted -712698321 1353867564
16784 List_Environment
16785 \change_unchanged
16786
16787 \change_deleted -712698321 1353867569
16788 Bib_Environment
16789 \change_unchanged
16790
16791 \end_layout
16792
16793 \end_inset
16794
16795 ] How the style should be translated into LaTeX.
16796 \begin_inset Foot
16797 status collapsed
16798
16799 \begin_layout Plain Layout
16800 \begin_inset Flex Code
16801 status collapsed
16802
16803 \begin_layout Plain Layout
16804 LatexType
16805 \end_layout
16806
16807 \end_inset
16808
16809  is perhaps a bit misleading, since these rules apply to SGML classes, too.
16810  Visit the SGML class files for specific examples.
16811 \end_layout
16812
16813 \end_inset
16814
16815
16816 \end_layout
16817
16818 \begin_deeper
16819 \begin_layout Itemize
16820 \begin_inset Flex Code
16821 status collapsed
16822
16823 \begin_layout Plain Layout
16824
16825 \change_deleted -712698321 1353867582
16826 Paragraph
16827 \change_inserted -712698321 1353867583
16828 None
16829 \change_unchanged
16830
16831 \end_layout
16832
16833 \end_inset
16834
16835  means nothing special.
16836  
16837 \end_layout
16838
16839 \begin_layout Itemize
16840 \begin_inset Flex Code
16841 status collapsed
16842
16843 \begin_layout Plain Layout
16844 Command
16845 \end_layout
16846
16847 \end_inset
16848
16849  means 
16850 \begin_inset Flex Code
16851 status collapsed
16852
16853 \begin_layout Plain Layout
16854
16855 \backslash
16856
16857 \emph on
16858 LatexName
16859 \emph default
16860 {\SpecialChar \ldots{}
16861 }
16862 \end_layout
16863
16864 \end_inset
16865
16866 .
16867 \end_layout
16868
16869 \begin_layout Itemize
16870 \begin_inset Flex Code
16871 status collapsed
16872
16873 \begin_layout Plain Layout
16874 Environment
16875 \end_layout
16876
16877 \end_inset
16878
16879  means 
16880 \begin_inset Flex Code
16881 status collapsed
16882
16883 \begin_layout Plain Layout
16884
16885 \backslash
16886 begin{
16887 \emph on
16888 LatexName
16889 \emph default
16890 }\SpecialChar \ldots{}
16891
16892 \backslash
16893 end{
16894 \emph on
16895 LatexName
16896 \emph default
16897 }
16898 \end_layout
16899
16900 \end_inset
16901
16902 .
16903  
16904 \end_layout
16905
16906 \begin_layout Itemize
16907
16908 \change_deleted -712698321 1353867600
16909 \begin_inset Flex Code
16910 status collapsed
16911
16912 \begin_layout Plain Layout
16913 Item_Environment
16914 \end_layout
16915
16916 \end_inset
16917
16918  is the same as 
16919 \begin_inset Flex Code
16920 status collapsed
16921
16922 \begin_layout Plain Layout
16923 Environment
16924 \end_layout
16925
16926 \end_inset
16927
16928 , except that an 
16929 \begin_inset Flex Code
16930 status collapsed
16931
16932 \begin_layout Plain Layout
16933
16934 \backslash
16935 item
16936 \end_layout
16937
16938 \end_inset
16939
16940  is generated for each paragraph of this environment.
16941  
16942 \end_layout
16943
16944 \begin_layout Itemize
16945
16946 \change_deleted -712698321 1353867600
16947 \begin_inset Flex Code
16948 status collapsed
16949
16950 \begin_layout Plain Layout
16951 List_Environment
16952 \end_layout
16953
16954 \end_inset
16955
16956  is the same as 
16957 \begin_inset Flex Code
16958 status collapsed
16959
16960 \begin_layout Plain Layout
16961 Item_Environment
16962 \end_layout
16963
16964 \end_inset
16965
16966 , except that 
16967 \begin_inset Flex Code
16968 status collapsed
16969
16970 \begin_layout Plain Layout
16971 LabelWidthString
16972 \end_layout
16973
16974 \end_inset
16975
16976  is passed as an argument to the environment.
16977  
16978 \begin_inset Flex Code
16979 status collapsed
16980
16981 \begin_layout Plain Layout
16982 LabelWidthString
16983 \end_layout
16984
16985 \end_inset
16986
16987  can be defined in the 
16988 \begin_inset Flex MenuItem
16989 status collapsed
16990
16991 \begin_layout Plain Layout
16992
16993 \bar under
16994 Edit
16995 \bar default
16996 \SpecialChar \menuseparator
16997
16998 \bar under
16999 P
17000 \bar default
17001 aragraph
17002 \begin_inset space ~
17003 \end_inset
17004
17005 settings
17006 \end_layout
17007
17008 \end_inset
17009
17010  dialog.
17011  
17012 \change_unchanged
17013
17014 \end_layout
17015
17016 \begin_layout Standard
17017 Putting the last few things together, the LaTeX output will be either: 
17018 \end_layout
17019
17020 \begin_layout LyX-Code
17021
17022 \backslash
17023 latexname[latexparam]{\SpecialChar \ldots{}
17024 }
17025 \end_layout
17026
17027 \begin_layout Standard
17028 or: 
17029 \end_layout
17030
17031 \begin_layout LyX-Code
17032
17033 \backslash
17034 begin{latexname}[latexparam] \SpecialChar \ldots{}
17035  
17036 \backslash
17037 end{latexname}.
17038 \end_layout
17039
17040 \begin_layout Standard
17041 depending upon the LaTeX type.
17042 \end_layout
17043
17044 \end_deeper
17045 \begin_layout Description
17046
17047 \change_inserted -712698321 1354263128
17048 \begin_inset Flex Code
17049 status collapsed
17050
17051 \begin_layout Plain Layout
17052
17053 \change_inserted -712698321 1353866742
17054 LeftDelim
17055 \change_unchanged
17056
17057 \end_layout
17058
17059 \end_inset
17060
17061  [
17062 \begin_inset Flex Code
17063 status collapsed
17064
17065 \begin_layout Plain Layout
17066
17067 \change_inserted -712698321 1353866752
17068 string
17069 \end_layout
17070
17071 \end_inset
17072
17073 ] A string that is put at the beginning of the layout content.
17074  A line break in the output can be indicated by 
17075 \begin_inset Flex Code
17076 status collapsed
17077
17078 \begin_layout Plain Layout
17079
17080 \change_inserted -712698321 1354263128
17081 <br/>
17082 \end_layout
17083
17084 \end_inset
17085
17086 .
17087 \change_unchanged
17088
17089 \end_layout
17090
17091 \begin_layout Description
17092 \begin_inset Flex Code
17093 status collapsed
17094
17095 \begin_layout Plain Layout
17096 LyxType
17097 \end_layout
17098
17099 \end_inset
17100
17101  Can be 
17102 \begin_inset Flex Code
17103 status collapsed
17104
17105 \begin_layout Plain Layout
17106 charstyle
17107 \end_layout
17108
17109 \end_inset
17110
17111
17112 \begin_inset Flex Code
17113 status collapsed
17114
17115 \begin_layout Plain Layout
17116 custom
17117 \end_layout
17118
17119 \end_inset
17120
17121
17122 \begin_inset Flex Code
17123 status collapsed
17124
17125 \begin_layout Plain Layout
17126 element
17127 \end_layout
17128
17129 \end_inset
17130
17131 , or 
17132 \begin_inset Flex Code
17133 status collapsed
17134
17135 \begin_layout Plain Layout
17136 end
17137 \end_layout
17138
17139 \end_inset
17140
17141  (indicating a dummy definition ending definitions of charstyles, etc).
17142  This entry is required in and is only meaningful for Flex insets.
17143  Among other things, it determines on which menu this inset will appear.
17144  Setting 
17145 \begin_inset Flex Code
17146 status collapsed
17147
17148 \begin_layout Plain Layout
17149 LyXType
17150 \end_layout
17151
17152 \end_inset
17153
17154  to 
17155 \begin_inset Flex Code
17156 status collapsed
17157
17158 \begin_layout Plain Layout
17159 charstyle
17160 \end_layout
17161
17162 \end_inset
17163
17164  will set 
17165 \begin_inset Flex Code
17166 status collapsed
17167
17168 \begin_layout Plain Layout
17169 MultiPar
17170 \end_layout
17171
17172 \end_inset
17173
17174  to false.
17175  
17176 \begin_inset Flex Code
17177 status collapsed
17178
17179 \begin_layout Plain Layout
17180 MultiPar
17181 \end_layout
17182
17183 \end_inset
17184
17185  can be set to true for charstyle insets, if you wish, by setting it 
17186 \emph on
17187 after
17188 \emph default
17189  you set the 
17190 \begin_inset Flex Code
17191 status collapsed
17192
17193 \begin_layout Plain Layout
17194 LyXType
17195 \end_layout
17196
17197 \end_inset
17198
17199 .
17200 \end_layout
17201
17202 \begin_layout Description
17203 \begin_inset Flex Code
17204 status collapsed
17205
17206 \begin_layout Plain Layout
17207 MultiPar
17208 \end_layout
17209
17210 \end_inset
17211
17212  [
17213 \begin_inset Flex Code
17214 status collapsed
17215
17216 \begin_layout Plain Layout
17217
17218 \emph on
17219 0
17220 \end_layout
17221
17222 \end_inset
17223
17224 ,
17225 \begin_inset Flex Code
17226 status collapsed
17227
17228 \begin_layout Plain Layout
17229 1
17230 \end_layout
17231
17232 \end_inset
17233
17234 ] Whether multiple paragraphs are permitted in this inset.
17235  This will also set 
17236 \begin_inset Flex Code
17237 status collapsed
17238
17239 \begin_layout Plain Layout
17240 CustomPars
17241 \end_layout
17242
17243 \end_inset
17244
17245  to the same value and 
17246 \begin_inset Flex Code
17247 status collapsed
17248
17249 \begin_layout Plain Layout
17250 ForcePlain
17251 \end_layout
17252
17253 \end_inset
17254
17255  to the opposite value.
17256  These can be reset to other values, if they are used 
17257 \emph on
17258 after
17259 \emph default
17260  
17261 \begin_inset Flex Code
17262 status collapsed
17263
17264 \begin_layout Plain Layout
17265 MultiPar
17266 \end_layout
17267
17268 \end_inset
17269
17270 .
17271  Default is true.
17272 \end_layout
17273
17274 \begin_layout Description
17275 \begin_inset Flex Code
17276 status collapsed
17277
17278 \begin_layout Plain Layout
17279 NeedProtect
17280 \end_layout
17281
17282 \end_inset
17283
17284  [
17285 \begin_inset Flex Code
17286 status collapsed
17287
17288 \begin_layout Plain Layout
17289
17290 \emph on
17291 0
17292 \end_layout
17293
17294 \end_inset
17295
17296 ,
17297 \begin_inset Flex Code
17298 status collapsed
17299
17300 \begin_layout Plain Layout
17301 1
17302 \end_layout
17303
17304 \end_inset
17305
17306 ] Whether fragile commands in this inset should be 
17307 \begin_inset Flex Code
17308 status collapsed
17309
17310 \begin_layout Plain Layout
17311
17312 \backslash
17313 protect
17314 \end_layout
17315
17316 \end_inset
17317
17318 'ed.
17319  (Note: This is 
17320 \emph on
17321 not
17322 \emph default
17323  whether the command should itself be protected.) Default is false.
17324 \end_layout
17325
17326 \begin_layout Description
17327 \begin_inset Flex Code
17328 status collapsed
17329
17330 \begin_layout Plain Layout
17331 ParbreakIsNewline
17332 \end_layout
17333
17334 \end_inset
17335
17336  [
17337 \begin_inset Flex Code
17338 status collapsed
17339
17340 \begin_layout Plain Layout
17341
17342 \emph on
17343 0
17344 \end_layout
17345
17346 \end_inset
17347
17348
17349 \begin_inset Flex Code
17350 status collapsed
17351
17352 \begin_layout Plain Layout
17353 1
17354 \end_layout
17355
17356 \end_inset
17357
17358 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
17359  output, but only by a line break; together with 
17360 \begin_inset Flex Code
17361 status collapsed
17362
17363 \begin_layout Plain Layout
17364 PassThru 1
17365 \end_layout
17366
17367 \end_inset
17368
17369 , this allows to emulate a plain text editor (like the ERT inset).
17370  Default is false.
17371 \end_layout
17372
17373 \begin_layout Description
17374 \begin_inset Flex Code
17375 status collapsed
17376
17377 \begin_layout Plain Layout
17378 PassThru
17379 \end_layout
17380
17381 \end_inset
17382
17383  [
17384 \begin_inset Flex Code
17385 status collapsed
17386
17387 \begin_layout Plain Layout
17388
17389 \emph on
17390 0
17391 \end_layout
17392
17393 \end_inset
17394
17395
17396 \begin_inset Flex Code
17397 status collapsed
17398
17399 \begin_layout Plain Layout
17400 1
17401 \end_layout
17402
17403 \end_inset
17404
17405 ] Whether the contents of this paragraph should be output in raw form, meaning
17406  without special translations that LaTeX would require.
17407 \end_layout
17408
17409 \begin_layout Description
17410 \begin_inset Flex Code
17411 status collapsed
17412
17413 \begin_layout Plain Layout
17414 Preamble
17415 \end_layout
17416
17417 \end_inset
17418
17419  Information to be included in the LaTeX preamble when this style is used.
17420  Used to define macros, load packages, etc., required by this particular
17421  style.
17422  Must end with 
17423 \begin_inset Quotes eld
17424 \end_inset
17425
17426
17427 \begin_inset Flex Code
17428 status collapsed
17429
17430 \begin_layout Plain Layout
17431 EndPreamble
17432 \end_layout
17433
17434 \end_inset
17435
17436
17437 \begin_inset Quotes erd
17438 \end_inset
17439
17440 .
17441 \end_layout
17442
17443 \begin_layout Description
17444 \begin_inset Flex Code
17445 status collapsed
17446
17447 \begin_layout Plain Layout
17448 RefPrefix
17449 \end_layout
17450
17451 \end_inset
17452
17453  [
17454 \begin_inset Flex Code
17455 status collapsed
17456
17457 \begin_layout Plain Layout
17458 string
17459 \end_layout
17460
17461 \end_inset
17462
17463 ] The prefix to use when creating labels referring to insets of this type.
17464  This allows the use of formatted references.
17465 \end_layout
17466
17467 \begin_layout Description
17468 \begin_inset Flex Code
17469 status collapsed
17470
17471 \begin_layout Plain Layout
17472 Requires
17473 \end_layout
17474
17475 \end_inset
17476
17477  [
17478 \begin_inset Flex Code
17479 status collapsed
17480
17481 \begin_layout Plain Layout
17482 string
17483 \end_layout
17484
17485 \end_inset
17486
17487 ] Whether the style requires the feature 
17488 \begin_inset Flex Code
17489 status collapsed
17490
17491 \begin_layout Plain Layout
17492 string
17493 \end_layout
17494
17495 \end_inset
17496
17497 .
17498  See the description of 
17499 \begin_inset Flex Code
17500 status collapsed
17501
17502 \begin_layout Plain Layout
17503 Provides
17504 \end_layout
17505
17506 \end_inset
17507
17508  above (page 
17509 \begin_inset CommandInset ref
17510 LatexCommand pageref
17511 reference "des:FreeSpacing"
17512
17513 \end_inset
17514
17515 ) for information on `features'.
17516 \change_inserted -712698321 1354439699
17517
17518 \end_layout
17519
17520 \begin_layout Description
17521
17522 \change_inserted -712698321 1354439705
17523 \begin_inset Flex Code
17524 status collapsed
17525
17526 \begin_layout Plain Layout
17527
17528 \change_inserted -712698321 1354439699
17529 ResetArgs
17530 \end_layout
17531
17532 \end_inset
17533
17534  [
17535 \begin_inset Flex Code
17536 status collapsed
17537
17538 \begin_layout Plain Layout
17539
17540 \change_inserted -712698321 1354439699
17541
17542 \emph on
17543 0
17544 \end_layout
17545
17546 \end_inset
17547
17548 ,
17549 \begin_inset Flex Code
17550 status collapsed
17551
17552 \begin_layout Plain Layout
17553
17554 \change_inserted -712698321 1354439699
17555 1
17556 \end_layout
17557
17558 \end_inset
17559
17560 ] Resets the LaTeX arguments of this layout (as defined via the 
17561 \begin_inset Flex Code
17562 status collapsed
17563
17564 \begin_layout Plain Layout
17565
17566 \change_inserted -712698321 1354439699
17567 Argument
17568 \end_layout
17569
17570 \end_inset
17571
17572  tag).
17573  This is useful if you have copied a style via 
17574 \begin_inset Flex Code
17575 status collapsed
17576
17577 \begin_layout Plain Layout
17578
17579 \change_inserted -712698321 1354439699
17580 CopyStyle
17581 \end_layout
17582
17583 \end_inset
17584
17585 , but you do not want to inherit its (required and optional) arguments.
17586
17587 \change_deleted -712698321 1354439698
17588  
17589 \change_unchanged
17590
17591 \end_layout
17592
17593 \begin_layout Description
17594 \begin_inset Flex Code
17595 status collapsed
17596
17597 \begin_layout Plain Layout
17598 ResetsFont
17599 \end_layout
17600
17601 \end_inset
17602
17603  [
17604 \begin_inset Flex Code
17605 status collapsed
17606
17607 \begin_layout Plain Layout
17608 0
17609 \end_layout
17610
17611 \end_inset
17612
17613 ,
17614 \begin_inset Flex Code
17615 status collapsed
17616
17617 \begin_layout Plain Layout
17618
17619 \emph on
17620 1
17621 \end_layout
17622
17623 \end_inset
17624
17625 ] Whether this inset should use the font of its surrounding environment
17626  or uses its own.
17627  Default is true: uses its own.
17628 \change_inserted -712698321 1353866806
17629
17630 \end_layout
17631
17632 \begin_layout Description
17633
17634 \change_inserted -712698321 1354263134
17635 \begin_inset Flex Code
17636 status collapsed
17637
17638 \begin_layout Plain Layout
17639
17640 \change_inserted -712698321 1353866810
17641 RightDelim
17642 \end_layout
17643
17644 \end_inset
17645
17646  [
17647 \begin_inset Flex Code
17648 status collapsed
17649
17650 \begin_layout Plain Layout
17651
17652 \change_inserted -712698321 1353866806
17653 string
17654 \end_layout
17655
17656 \end_inset
17657
17658 ] A string that is put at the end of the layout content.
17659  A line break in the output can be indicated by 
17660 \begin_inset Flex Code
17661 status collapsed
17662
17663 \begin_layout Plain Layout
17664
17665 \change_inserted -712698321 1354263134
17666 <br/>
17667 \end_layout
17668
17669 \end_inset
17670
17671 .
17672 \change_unchanged
17673
17674 \end_layout
17675
17676 \begin_layout Description
17677 \begin_inset Flex Code
17678 status collapsed
17679
17680 \begin_layout Plain Layout
17681 Spellcheck
17682 \end_layout
17683
17684 \end_inset
17685
17686  [
17687 \begin_inset Flex Code
17688 status collapsed
17689
17690 \begin_layout Plain Layout
17691 0
17692 \end_layout
17693
17694 \end_inset
17695
17696 ,
17697 \begin_inset Flex Code
17698 status collapsed
17699
17700 \begin_layout Plain Layout
17701
17702 \emph on
17703 1
17704 \end_layout
17705
17706 \end_inset
17707
17708 ] Spellcheck the contents of this inset.
17709  Default is true.
17710 \end_layout
17711
17712 \begin_layout Subsection
17713 Counters
17714 \begin_inset CommandInset label
17715 LatexCommand label
17716 name "sub:Counters"
17717
17718 \end_inset
17719
17720
17721 \end_layout
17722
17723 \begin_layout Standard
17724 Since version 1.3.0 of LyX, it is both possible and necessary to define the
17725  counters (
17726 \begin_inset Flex MenuItem
17727 status collapsed
17728
17729 \begin_layout Plain Layout
17730 chapter
17731 \end_layout
17732
17733 \end_inset
17734
17735
17736 \begin_inset Flex MenuItem
17737 status collapsed
17738
17739 \begin_layout Plain Layout
17740 figure
17741 \end_layout
17742
17743 \end_inset
17744
17745 , \SpecialChar \ldots{}
17746 ) in the text class itself.
17747  The standard counters are defined in the file 
17748 \begin_inset Flex Code
17749 status collapsed
17750
17751 \begin_layout Plain Layout
17752 stdcounters.inc
17753 \end_layout
17754
17755 \end_inset
17756
17757 , so you may have to do no more than add
17758 \end_layout
17759
17760 \begin_layout LyX-Code
17761 Input stdcounters.inc
17762 \end_layout
17763
17764 \begin_layout Standard
17765 to your layout file to get them to work.
17766  But if you want to define custom counters, then you can do so.
17767  The counter declaration must begin with:
17768 \end_layout
17769
17770 \begin_layout LyX-Code
17771 Counter CounterName
17772 \end_layout
17773
17774 \begin_layout Standard
17775 where of course `
17776 \begin_inset Flex Code
17777 status collapsed
17778
17779 \begin_layout Plain Layout
17780 CounterName
17781 \end_layout
17782
17783 \end_inset
17784
17785 ' is replaced by the name of the counter.
17786  And it must end with 
17787 \begin_inset Quotes eld
17788 \end_inset
17789
17790
17791 \begin_inset Flex Code
17792 status collapsed
17793
17794 \begin_layout Plain Layout
17795 End
17796 \end_layout
17797
17798 \end_inset
17799
17800
17801 \begin_inset Quotes erd
17802 \end_inset
17803
17804 .
17805  The following parameters can also be used:
17806 \end_layout
17807
17808 \begin_layout Description
17809 \begin_inset Flex Code
17810 status collapsed
17811
17812 \begin_layout Plain Layout
17813 LabelString
17814 \end_layout
17815
17816 \end_inset
17817
17818  [
17819 \begin_inset Flex Code
17820 status collapsed
17821
17822 \begin_layout Plain Layout
17823 string
17824 \end_layout
17825
17826 \end_inset
17827
17828 =
17829 \begin_inset Quotes erd
17830 \end_inset
17831
17832
17833 \begin_inset Quotes erd
17834 \end_inset
17835
17836 ] When defined, this string defines how the counter is displayed.
17837  Setting this value sets 
17838 \begin_inset Flex Code
17839 status collapsed
17840
17841 \begin_layout Plain Layout
17842 LabelStringAppendix
17843 \end_layout
17844
17845 \end_inset
17846
17847  to the same value.
17848  The following special constructs can be used in the string:
17849 \end_layout
17850
17851 \begin_deeper
17852 \begin_layout Itemize
17853 \begin_inset Flex Code
17854 status collapsed
17855
17856 \begin_layout Plain Layout
17857
17858 \backslash
17859 thecounter
17860 \end_layout
17861
17862 \end_inset
17863
17864  will be replaced by the expansion of the 
17865 \begin_inset Flex Code
17866 status collapsed
17867
17868 \begin_layout Plain Layout
17869 LabelString
17870 \end_layout
17871
17872 \end_inset
17873
17874  (or 
17875 \begin_inset Flex Code
17876 status collapsed
17877
17878 \begin_layout Plain Layout
17879 LabelStringAppendix
17880 \end_layout
17881
17882 \end_inset
17883
17884 ) of the counter 
17885 \begin_inset Flex Code
17886 status collapsed
17887
17888 \begin_layout Plain Layout
17889 counter
17890 \end_layout
17891
17892 \end_inset
17893
17894 .
17895  
17896 \end_layout
17897
17898 \begin_layout Itemize
17899 counter values can be expressed using LaTeX-like macros 
17900 \begin_inset Flex Code
17901 status collapsed
17902
17903 \begin_layout Plain Layout
17904
17905 \backslash
17906
17907 \emph on
17908 numbertype
17909 \emph default
17910 {
17911 \emph on
17912 counter
17913 \emph default
17914 }
17915 \end_layout
17916
17917 \end_inset
17918
17919 , where 
17920 \begin_inset Flex Code
17921 status collapsed
17922
17923 \begin_layout Plain Layout
17924
17925 \emph on
17926 numbertype
17927 \end_layout
17928
17929 \end_inset
17930
17931  can be:
17932 \begin_inset Foot
17933 status collapsed
17934
17935 \begin_layout Plain Layout
17936
17937 \family roman
17938 \series medium
17939 \shape up
17940 \size normal
17941 \emph off
17942 \bar no
17943 \noun off
17944 \color none
17945 Actually, the situation is a bit more complicated: any
17946 \family default
17947 \series default
17948 \shape default
17949 \emph default
17950 \bar default
17951  
17952 \size default
17953 \emph on
17954 \noun default
17955 \color inherit
17956 numbertype
17957 \family roman
17958 \series medium
17959 \shape up
17960 \size normal
17961 \emph off
17962 \bar no
17963 \noun off
17964  other than those described below will produce arabic numerals.
17965  It would not be surprising to see this change in the future.
17966 \end_layout
17967
17968 \end_inset
17969
17970  
17971 \begin_inset Flex Code
17972 status collapsed
17973
17974 \begin_layout Plain Layout
17975 arabic
17976 \end_layout
17977
17978 \end_inset
17979
17980 : 1, 2, 3,\SpecialChar \ldots{}
17981
17982 \begin_inset Flex Code
17983 status collapsed
17984
17985 \begin_layout Plain Layout
17986 alph
17987 \end_layout
17988
17989 \end_inset
17990
17991  for lower-case letters: a, b, c, \SpecialChar \ldots{}
17992
17993 \begin_inset Flex Code
17994 status collapsed
17995
17996 \begin_layout Plain Layout
17997 Alph
17998 \end_layout
17999
18000 \end_inset
18001
18002  for upper-case letters: A, B, C, \SpecialChar \ldots{}
18003
18004 \begin_inset Flex Code
18005 status collapsed
18006
18007 \begin_layout Plain Layout
18008 roman
18009 \end_layout
18010
18011 \end_inset
18012
18013  for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
18014
18015 \begin_inset Flex Code
18016 status collapsed
18017
18018 \begin_layout Plain Layout
18019 Roman
18020 \end_layout
18021
18022 \end_inset
18023
18024  for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
18025
18026 \begin_inset Flex Code
18027 status collapsed
18028
18029 \begin_layout Plain Layout
18030 hebrew
18031 \end_layout
18032
18033 \end_inset
18034
18035  for hebrew numerals.
18036 \end_layout
18037
18038 \end_deeper
18039 \begin_layout Standard
18040 If LabelString is not defined, a default value is constructed as follows:
18041  if the counter has a master counter 
18042 \begin_inset Flex Code
18043 status collapsed
18044
18045 \begin_layout Plain Layout
18046 master
18047 \end_layout
18048
18049 \end_inset
18050
18051  (defined via 
18052 \begin_inset Flex Code
18053 status collapsed
18054
18055 \begin_layout Plain Layout
18056 Within
18057 \end_layout
18058
18059 \end_inset
18060
18061 ), the string 
18062 \begin_inset Flex Code
18063 status collapsed
18064
18065 \begin_layout Plain Layout
18066
18067 \backslash
18068 themaster.
18069 \backslash
18070 arabic{counter}
18071 \end_layout
18072
18073 \end_inset
18074
18075  is used; otherwise the string 
18076 \begin_inset Flex Code
18077 status collapsed
18078
18079 \begin_layout Plain Layout
18080
18081 \backslash
18082 arabic{counter}
18083 \end_layout
18084
18085 \end_inset
18086
18087  is used.
18088 \end_layout
18089
18090 \begin_layout Description
18091 \begin_inset Flex Code
18092 status collapsed
18093
18094 \begin_layout Plain Layout
18095 LabelStringAppendix
18096 \end_layout
18097
18098 \end_inset
18099
18100  [
18101 \begin_inset Flex Code
18102 status collapsed
18103
18104 \begin_layout Plain Layout
18105 string
18106 \end_layout
18107
18108 \end_inset
18109
18110 =
18111 \begin_inset Quotes erd
18112 \end_inset
18113
18114
18115 \begin_inset Quotes erd
18116 \end_inset
18117
18118 ] Same as 
18119 \begin_inset Flex Code
18120 status collapsed
18121
18122 \begin_layout Plain Layout
18123 LabelString
18124 \end_layout
18125
18126 \end_inset
18127
18128 , but for use in the Appendix.
18129 \end_layout
18130
18131 \begin_layout Description
18132 \begin_inset Flex Code
18133 status collapsed
18134
18135 \begin_layout Plain Layout
18136 PrettyFormat
18137 \end_layout
18138
18139 \end_inset
18140
18141  [
18142 \begin_inset Flex Code
18143 status collapsed
18144
18145 \begin_layout Plain Layout
18146 string
18147 \end_layout
18148
18149 \end_inset
18150
18151 =
18152 \begin_inset Quotes erd
18153 \end_inset
18154
18155
18156 \begin_inset Quotes erd
18157 \end_inset
18158
18159 ] A format for use with formatted references to this counter.
18160  For example, one might want to have references to section numbers appear
18161  as 
18162 \begin_inset Quotes eld
18163 \end_inset
18164
18165 Section 2.4
18166 \begin_inset Quotes erd
18167 \end_inset
18168
18169 .
18170  The string should contain 
18171 \begin_inset Quotes eld
18172 \end_inset
18173
18174 ##
18175 \begin_inset Quotes erd
18176 \end_inset
18177
18178 .
18179  This will be replaced by the counter number itself.
18180  So, for sections, it would be: Section ##.
18181 \end_layout
18182
18183 \begin_layout Description
18184 \begin_inset Flex Code
18185 status collapsed
18186
18187 \begin_layout Plain Layout
18188 Within
18189 \end_layout
18190
18191 \end_inset
18192
18193  [
18194 \begin_inset Flex Code
18195 status collapsed
18196
18197 \begin_layout Plain Layout
18198 string
18199 \end_layout
18200
18201 \end_inset
18202
18203 =
18204 \begin_inset Quotes erd
18205 \end_inset
18206
18207
18208 \begin_inset Quotes erd
18209 \end_inset
18210
18211 ] If this is set to the name of another counter, the present counter will
18212  be reset every time the other one is increased.
18213  For example, 
18214 \begin_inset Flex Code
18215 status collapsed
18216
18217 \begin_layout Plain Layout
18218 subsection
18219 \end_layout
18220
18221 \end_inset
18222
18223  is numbered inside 
18224 \begin_inset Flex Code
18225 status collapsed
18226
18227 \begin_layout Plain Layout
18228 section
18229 \end_layout
18230
18231 \end_inset
18232
18233 .
18234 \end_layout
18235
18236 \begin_layout Subsection
18237 Font description
18238 \begin_inset CommandInset label
18239 LatexCommand label
18240 name "sub:Font-description"
18241
18242 \end_inset
18243
18244
18245 \end_layout
18246
18247 \begin_layout Standard
18248 A font description looks like this:
18249 \end_layout
18250
18251 \begin_layout LyX-Code
18252 Font 
18253 \family roman
18254 \emph on
18255 or
18256 \family default
18257 \emph default
18258  LabelFont
18259 \end_layout
18260
18261 \begin_layout LyX-Code
18262  ...
18263 \end_layout
18264
18265 \begin_layout LyX-Code
18266 EndFont
18267 \end_layout
18268
18269 \begin_layout Standard
18270 The following commands are available:
18271 \end_layout
18272
18273 \begin_layout Description
18274 \begin_inset Flex Code
18275 status collapsed
18276
18277 \begin_layout Plain Layout
18278 Color
18279 \end_layout
18280
18281 \end_inset
18282
18283  [
18284 \begin_inset Flex Code
18285 status collapsed
18286
18287 \begin_layout Plain Layout
18288
18289 \emph on
18290 none
18291 \end_layout
18292
18293 \end_inset
18294
18295
18296 \begin_inset Flex Code
18297 status collapsed
18298
18299 \begin_layout Plain Layout
18300 black
18301 \end_layout
18302
18303 \end_inset
18304
18305
18306 \begin_inset Flex Code
18307 status collapsed
18308
18309 \begin_layout Plain Layout
18310 white
18311 \end_layout
18312
18313 \end_inset
18314
18315
18316 \begin_inset Flex Code
18317 status collapsed
18318
18319 \begin_layout Plain Layout
18320 red
18321 \end_layout
18322
18323 \end_inset
18324
18325
18326 \begin_inset Flex Code
18327 status collapsed
18328
18329 \begin_layout Plain Layout
18330 green
18331 \end_layout
18332
18333 \end_inset
18334
18335
18336 \begin_inset Flex Code
18337 status collapsed
18338
18339 \begin_layout Plain Layout
18340 blue
18341 \end_layout
18342
18343 \end_inset
18344
18345
18346 \begin_inset Flex Code
18347 status collapsed
18348
18349 \begin_layout Plain Layout
18350 cyan
18351 \end_layout
18352
18353 \end_inset
18354
18355
18356 \begin_inset Flex Code
18357 status collapsed
18358
18359 \begin_layout Plain Layout
18360 magenta
18361 \end_layout
18362
18363 \end_inset
18364
18365
18366 \begin_inset Flex Code
18367 status collapsed
18368
18369 \begin_layout Plain Layout
18370 yellow
18371 \end_layout
18372
18373 \end_inset
18374
18375 ]
18376 \end_layout
18377
18378 \begin_layout Description
18379 \begin_inset Flex Code
18380 status collapsed
18381
18382 \begin_layout Plain Layout
18383 Family
18384 \end_layout
18385
18386 \end_inset
18387
18388  [
18389 \begin_inset Flex Code
18390 status collapsed
18391
18392 \begin_layout Plain Layout
18393
18394 \emph on
18395 Roman
18396 \end_layout
18397
18398 \end_inset
18399
18400
18401 \begin_inset Flex Code
18402 status collapsed
18403
18404 \begin_layout Plain Layout
18405 Sans
18406 \end_layout
18407
18408 \end_inset
18409
18410
18411 \begin_inset Flex Code
18412 status collapsed
18413
18414 \begin_layout Plain Layout
18415 Typewriter
18416 \end_layout
18417
18418 \end_inset
18419
18420 ]
18421 \end_layout
18422
18423 \begin_layout Description
18424 \begin_inset Flex Code
18425 status collapsed
18426
18427 \begin_layout Plain Layout
18428 Misc
18429 \end_layout
18430
18431 \end_inset
18432
18433  [
18434 \begin_inset Flex Code
18435 status collapsed
18436
18437 \begin_layout Plain Layout
18438 string
18439 \end_layout
18440
18441 \end_inset
18442
18443 ] Valid arguments are: 
18444 \begin_inset Flex Code
18445 status collapsed
18446
18447 \begin_layout Plain Layout
18448 emph
18449 \end_layout
18450
18451 \end_inset
18452
18453
18454 \begin_inset Flex Code
18455 status collapsed
18456
18457 \begin_layout Plain Layout
18458 noun
18459 \end_layout
18460
18461 \end_inset
18462
18463
18464 \begin_inset Flex Code
18465 status collapsed
18466
18467 \begin_layout Plain Layout
18468 strikeout
18469 \end_layout
18470
18471 \end_inset
18472
18473
18474 \begin_inset Flex Code
18475 status collapsed
18476
18477 \begin_layout Plain Layout
18478 underbar
18479 \end_layout
18480
18481 \end_inset
18482
18483
18484 \begin_inset Flex Code
18485 status collapsed
18486
18487 \begin_layout Plain Layout
18488 uuline
18489 \end_layout
18490
18491 \end_inset
18492
18493
18494 \begin_inset Flex Code
18495 status collapsed
18496
18497 \begin_layout Plain Layout
18498 uwave
18499 \end_layout
18500
18501 \end_inset
18502
18503
18504 \begin_inset Flex Code
18505 status collapsed
18506
18507 \begin_layout Plain Layout
18508 no_emph
18509 \end_layout
18510
18511 \end_inset
18512
18513
18514 \begin_inset Flex Code
18515 status collapsed
18516
18517 \begin_layout Plain Layout
18518 no_noun
18519 \end_layout
18520
18521 \end_inset
18522
18523
18524 \begin_inset Flex Code
18525 status collapsed
18526
18527 \begin_layout Plain Layout
18528 no_strikeout
18529 \end_layout
18530
18531 \end_inset
18532
18533
18534 \begin_inset Flex Code
18535 status collapsed
18536
18537 \begin_layout Plain Layout
18538 no_bar
18539 \end_layout
18540
18541 \end_inset
18542
18543
18544 \begin_inset Flex Code
18545 status collapsed
18546
18547 \begin_layout Plain Layout
18548 no_uuline
18549 \end_layout
18550
18551 \end_inset
18552
18553  and 
18554 \begin_inset Flex Code
18555 status collapsed
18556
18557 \begin_layout Plain Layout
18558 no_uwave
18559 \end_layout
18560
18561 \end_inset
18562
18563 .
18564  Each of these turns on or off the corresponding attribute.
18565  For example, 
18566 \begin_inset Flex Code
18567 status collapsed
18568
18569 \begin_layout Plain Layout
18570 emph
18571 \end_layout
18572
18573 \end_inset
18574
18575  turns on emphasis, and 
18576 \begin_inset Flex Code
18577 status collapsed
18578
18579 \begin_layout Plain Layout
18580 no_emph
18581 \end_layout
18582
18583 \end_inset
18584
18585  turns it off.
18586  
18587 \begin_inset Newline newline
18588 \end_inset
18589
18590 If the latter seems puzzling, remember that the font settings for the present
18591  context are generally inherited from the surrounding context.
18592  So 
18593 \begin_inset Flex Code
18594 status collapsed
18595
18596 \begin_layout Plain Layout
18597 no_emph
18598 \end_layout
18599
18600 \end_inset
18601
18602  would turn off the emphasis that was anyway in effect, say, in a theorem
18603  environment.
18604 \end_layout
18605
18606 \begin_layout Description
18607 \begin_inset Flex Code
18608 status collapsed
18609
18610 \begin_layout Plain Layout
18611 Series
18612 \end_layout
18613
18614 \end_inset
18615
18616  [
18617 \begin_inset Flex Code
18618 status collapsed
18619
18620 \begin_layout Plain Layout
18621
18622 \emph on
18623 Medium
18624 \end_layout
18625
18626 \end_inset
18627
18628
18629 \begin_inset Flex Code
18630 status collapsed
18631
18632 \begin_layout Plain Layout
18633 Bold
18634 \end_layout
18635
18636 \end_inset
18637
18638
18639 \end_layout
18640
18641 \begin_layout Description
18642 \begin_inset Flex Code
18643 status collapsed
18644
18645 \begin_layout Plain Layout
18646 Shape
18647 \end_layout
18648
18649 \end_inset
18650
18651  [
18652 \begin_inset Flex Code
18653 status collapsed
18654
18655 \begin_layout Plain Layout
18656
18657 \emph on
18658 Up
18659 \end_layout
18660
18661 \end_inset
18662
18663
18664 \begin_inset Flex Code
18665 status collapsed
18666
18667 \begin_layout Plain Layout
18668 Italic
18669 \end_layout
18670
18671 \end_inset
18672
18673
18674 \begin_inset Flex Code
18675 status collapsed
18676
18677 \begin_layout Plain Layout
18678 SmallCaps
18679 \end_layout
18680
18681 \end_inset
18682
18683
18684 \begin_inset Flex Code
18685 status collapsed
18686
18687 \begin_layout Plain Layout
18688 Slanted
18689 \end_layout
18690
18691 \end_inset
18692
18693
18694 \end_layout
18695
18696 \begin_layout Description
18697 \begin_inset Flex Code
18698 status collapsed
18699
18700 \begin_layout Plain Layout
18701 Size
18702 \end_layout
18703
18704 \end_inset
18705
18706  [
18707 \begin_inset Flex Code
18708 status collapsed
18709
18710 \begin_layout Plain Layout
18711 tiny
18712 \end_layout
18713
18714 \end_inset
18715
18716
18717 \begin_inset Flex Code
18718 status collapsed
18719
18720 \begin_layout Plain Layout
18721 small
18722 \end_layout
18723
18724 \end_inset
18725
18726
18727 \begin_inset Flex Code
18728 status collapsed
18729
18730 \begin_layout Plain Layout
18731
18732 \emph on
18733 normal
18734 \end_layout
18735
18736 \end_inset
18737
18738
18739 \begin_inset Flex Code
18740 status collapsed
18741
18742 \begin_layout Plain Layout
18743 large
18744 \end_layout
18745
18746 \end_inset
18747
18748
18749 \begin_inset Flex Code
18750 status collapsed
18751
18752 \begin_layout Plain Layout
18753 larger
18754 \end_layout
18755
18756 \end_inset
18757
18758
18759 \begin_inset Flex Code
18760 status collapsed
18761
18762 \begin_layout Plain Layout
18763 largest
18764 \end_layout
18765
18766 \end_inset
18767
18768
18769 \begin_inset Flex Code
18770 status collapsed
18771
18772 \begin_layout Plain Layout
18773 huge
18774 \end_layout
18775
18776 \end_inset
18777
18778
18779 \begin_inset Flex Code
18780 status collapsed
18781
18782 \begin_layout Plain Layout
18783 giant
18784 \end_layout
18785
18786 \end_inset
18787
18788 ]
18789 \end_layout
18790
18791 \begin_layout Subsection
18792 \begin_inset CommandInset label
18793 LatexCommand label
18794 name "sub:Citation-format-description"
18795
18796 \end_inset
18797
18798 Citation format description
18799 \end_layout
18800
18801 \begin_layout Standard
18802 The 
18803 \begin_inset Flex Code
18804 status collapsed
18805
18806 \begin_layout Plain Layout
18807 CiteFormat
18808 \end_layout
18809
18810 \end_inset
18811
18812  blocks are used to describe how bibliographic information should be displayed,
18813  both within LyX itself (in the citation dialog and in tooltips, for example)
18814  and in XHTML output.
18815  Such a block might look like this:
18816 \end_layout
18817
18818 \begin_layout LyX-Code
18819 CiteFormat
18820 \end_layout
18821
18822 \begin_layout LyX-Code
18823  article ...
18824 \end_layout
18825
18826 \begin_layout LyX-Code
18827  book ...
18828 \end_layout
18829
18830 \begin_layout LyX-Code
18831 End
18832 \end_layout
18833
18834 \begin_layout Standard
18835 The individual lines define how the bibliographic information associated
18836  with an article or book, respectively, is to be displayed, and such a definitio
18837 n can be given for any `entry type' that might be present in a BibTeX file.
18838  LyX defines a default format in the source code that will be used if no
18839  specific definition has been given.
18840  LyX predefines several formats in the file 
18841 \begin_inset Flex Code
18842 status collapsed
18843
18844 \begin_layout Plain Layout
18845 stdciteformats.inc
18846 \end_layout
18847
18848 \end_inset
18849
18850 , which is included in most of LyX's document classes.
18851 \end_layout
18852
18853 \begin_layout Standard
18854 The definitions use a simple language that allows BibTeX keys to be replaced
18855  with their values.
18856  Keys should be enclosed in 
18857 \begin_inset Flex Code
18858 status collapsed
18859
18860 \begin_layout Plain Layout
18861 %
18862 \end_layout
18863
18864 \end_inset
18865
18866  signs, e.g.: 
18867 \begin_inset Flex Code
18868 status collapsed
18869
18870 \begin_layout Plain Layout
18871 %author%
18872 \end_layout
18873
18874 \end_inset
18875
18876 .
18877  So a simple definition might look like this:
18878 \end_layout
18879
18880 \begin_layout LyX-Code
18881 misc %author%, 
18882 \begin_inset Quotes eld
18883 \end_inset
18884
18885 %title
18886 \begin_inset Quotes erd
18887 \end_inset
18888
18889 .
18890 \end_layout
18891
18892 \begin_layout Standard
18893 This would print the author, followed by a comma, followed by the title,
18894  in quotes, followed by a period.
18895 \end_layout
18896
18897 \begin_layout Standard
18898 Of course, sometimes you may want to print a key only if it exists.
18899  This can be done by using a conditional construction, such as: 
18900 \begin_inset Flex Code
18901 status collapsed
18902
18903 \begin_layout Plain Layout
18904 {%volume%[[vol.
18905 \begin_inset space ~
18906 \end_inset
18907
18908 %volume%]]}
18909 \end_layout
18910
18911 \end_inset
18912
18913 .
18914  This says: If the 
18915 \begin_inset Flex Code
18916 status collapsed
18917
18918 \begin_layout Plain Layout
18919 volume
18920 \end_layout
18921
18922 \end_inset
18923
18924  key exists, then print 
18925 \begin_inset Quotes eld
18926 \end_inset
18927
18928 vol.
18929 \begin_inset space ~
18930 \end_inset
18931
18932
18933 \begin_inset Quotes erd
18934 \end_inset
18935
18936  followed by the volume key.
18937  It is also possible to have an else clause in the conditional, such as:
18938  
18939 \begin_inset Flex Code
18940 status collapsed
18941
18942 \begin_layout Plain Layout
18943 {%author%[[%author%]][[%editor%, ed.]]}
18944 \end_layout
18945
18946 \end_inset
18947
18948 .
18949  Here, the 
18950 \begin_inset Flex Code
18951 status collapsed
18952
18953 \begin_layout Plain Layout
18954 author
18955 \end_layout
18956
18957 \end_inset
18958
18959  key is printed if it exists; otherwise, the editor key is printed, followed
18960  by 
18961 \begin_inset Quotes eld
18962 \end_inset
18963
18964 ,
18965 \begin_inset space ~
18966 \end_inset
18967
18968 ed.
18969 \begin_inset Quotes erd
18970 \end_inset
18971
18972  Note that the key is again enclosed in 
18973 \begin_inset Flex Code
18974 status collapsed
18975
18976 \begin_layout Plain Layout
18977 %
18978 \end_layout
18979
18980 \end_inset
18981
18982  signs; the entire conditional is enclosed in braces; and the if and else
18983  clauses are enclosed in double brackets, 
18984 \begin_inset Quotes eld
18985 \end_inset
18986
18987
18988 \begin_inset Flex Code
18989 status collapsed
18990
18991 \begin_layout Plain Layout
18992 [[
18993 \end_layout
18994
18995 \end_inset
18996
18997
18998 \begin_inset Quotes eld
18999 \end_inset
19000
19001  and 
19002 \begin_inset Quotes eld
19003 \end_inset
19004
19005
19006 \begin_inset Flex Code
19007 status collapsed
19008
19009 \begin_layout Plain Layout
19010 ]]
19011 \end_layout
19012
19013 \end_inset
19014
19015
19016 \begin_inset Quotes erd
19017 \end_inset
19018
19019 .
19020  There must be no space between any of these.
19021 \end_layout
19022
19023 \begin_layout Standard
19024 There is one other piece of syntax available in definitions, which looks
19025  like this: 
19026 \begin_inset Flex Code
19027 status collapsed
19028
19029 \begin_layout Plain Layout
19030 {!<i>!}
19031 \end_layout
19032
19033 \end_inset
19034
19035 .
19036  This defines a piece of formatting information that is to be used when
19037  creating 
19038 \begin_inset Quotes eld
19039 \end_inset
19040
19041 rich text
19042 \begin_inset Quotes erd
19043 \end_inset
19044
19045 .
19046  Obviously, we do not want to output HTML tags when writing plain text,
19047  so they should be wrapped in 
19048 \begin_inset Quotes eld
19049 \end_inset
19050
19051 {!
19052 \begin_inset Quotes erd
19053 \end_inset
19054
19055  and 
19056 \begin_inset Quotes eld
19057 \end_inset
19058
19059 !}
19060 \begin_inset Quotes erd
19061 \end_inset
19062
19063 .
19064 \end_layout
19065
19066 \begin_layout Standard
19067 Two special sorts of definitions are also possible in a 
19068 \begin_inset Flex Code
19069 status collapsed
19070
19071 \begin_layout Plain Layout
19072 CiteFormat
19073 \end_layout
19074
19075 \end_inset
19076
19077  block.
19078  An example of the first would be:
19079 \end_layout
19080
19081 \begin_layout LyX-Code
19082 !quotetitle 
19083 \begin_inset Quotes eld
19084 \end_inset
19085
19086 %title%
19087 \begin_inset Quotes erd
19088 \end_inset
19089
19090
19091 \end_layout
19092
19093 \begin_layout Standard
19094 This is an abbreviation, or macro, and it can be used by treating it as
19095  if it were a key: 
19096 \begin_inset Flex Code
19097 status collapsed
19098
19099 \begin_layout Plain Layout
19100 %!quotetitle%
19101 \end_layout
19102
19103 \end_inset
19104
19105 .
19106  LyX will treat 
19107 \begin_inset Flex Code
19108 status collapsed
19109
19110 \begin_layout Plain Layout
19111 %!quotetitle%
19112 \end_layout
19113
19114 \end_inset
19115
19116  exactly as it would treat its definition.
19117  So, let us issue the obvious 
19118 \emph on
19119 warning
19120 \emph default
19121 .
19122  Do not do this:
19123 \end_layout
19124
19125 \begin_layout LyX-Code
19126 !funfun %funfun%
19127 \end_layout
19128
19129 \begin_layout Standard
19130 or anything like it.
19131  LyX shouldn't go into an infinite loop, but it may go into a long one before
19132  it gives up.
19133 \end_layout
19134
19135 \begin_layout Standard
19136 The second sort of special definition might look like this:
19137 \end_layout
19138
19139 \begin_layout LyX-Code
19140 _pptext pp.
19141 \end_layout
19142
19143 \begin_layout Standard
19144 This defines a translatable piece of text, which allows relevant parts of
19145  the bibliography to be translated.
19146  It can be included in a definition by treating it as a key: 
19147 \begin_inset Flex Code
19148 status collapsed
19149
19150 \begin_layout Plain Layout
19151 %_pptext%
19152 \end_layout
19153
19154 \end_inset
19155
19156 .
19157  Several of these are predefined in 
19158 \begin_inset Flex Code
19159 status collapsed
19160
19161 \begin_layout Plain Layout
19162 stdciteformats.inc
19163 \end_layout
19164
19165 \end_inset
19166
19167 .
19168  Note that these are not macros, in the sense just defined.
19169  They will not be expanded.
19170 \end_layout
19171
19172 \begin_layout Standard
19173 So here then is an example that use all these features:
19174 \end_layout
19175
19176 \begin_layout LyX-Code
19177 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
19178 \end_layout
19179
19180 \begin_layout Standard
19181 This defines a macro that prints the author, followed by a comma, if the
19182  
19183 \begin_inset Flex Code
19184 status collapsed
19185
19186 \begin_layout Plain Layout
19187 author
19188 \end_layout
19189
19190 \end_inset
19191
19192  key is defined, or else prints the name of the editor, followed by the
19193  
19194 \begin_inset Flex Code
19195 status collapsed
19196
19197 \begin_layout Plain Layout
19198 _edtext
19199 \end_layout
19200
19201 \end_inset
19202
19203  or its translation (it is by default 
19204 \begin_inset Quotes eld
19205 \end_inset
19206
19207 ed.
19208 \begin_inset Quotes erd
19209 \end_inset
19210
19211 ), if the 
19212 \begin_inset Flex Code
19213 status collapsed
19214
19215 \begin_layout Plain Layout
19216 editor
19217 \end_layout
19218
19219 \end_inset
19220
19221  key is defined.
19222  Note that this is in fact defined in 
19223 \begin_inset Flex Code
19224 status collapsed
19225
19226 \begin_layout Plain Layout
19227 stdciteformats.inc
19228 \end_layout
19229
19230 \end_inset
19231
19232 , so you can use it in your own definitions, or re-definitions, if you load
19233  that file first.
19234 \end_layout
19235
19236 \begin_layout Section
19237 \begin_inset CommandInset label
19238 LatexCommand label
19239 name "sec:Tags-for-XHTML"
19240
19241 \end_inset
19242
19243 Tags for XHTML output
19244 \end_layout
19245
19246 \begin_layout Standard
19247 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
19248  by layout information.
19249  In general, LyX provides sensible defaults and, as mentioned earlier, it
19250  will even construct default CSS style rules from the other layout tags.
19251  For example, LyX will attempt to use the information provided in the 
19252 \begin_inset Flex Code
19253 status collapsed
19254
19255 \begin_layout Plain Layout
19256 Font
19257 \end_layout
19258
19259 \end_inset
19260
19261  declaration for the Chapter style to write CSS that will appropriately
19262  format chapter headings.
19263 \end_layout
19264
19265 \begin_layout Standard
19266 In many cases, then, you may not have to do anything at all to get acceptable
19267  XHTML output for your own environments, custom insets, and so forth.
19268  But in some cases you will, and so LyX provides a number of layout tags
19269  that can be used to customize the XHTML and CSS that are generated.
19270 \end_layout
19271
19272 \begin_layout Standard
19273 Note that there are two tags, 
19274 \begin_inset Flex Code
19275 status collapsed
19276
19277 \begin_layout Plain Layout
19278 HTMLPreamble
19279 \end_layout
19280
19281 \end_inset
19282
19283  and 
19284 \begin_inset Flex Code
19285 status collapsed
19286
19287 \begin_layout Plain Layout
19288 AddToHTMLPreamble
19289 \end_layout
19290
19291 \end_inset
19292
19293  that may appear outside style and inset declarations.
19294  See 
19295 \begin_inset CommandInset ref
19296 LatexCommand ref
19297 reference "sub:General-text-class"
19298
19299 \end_inset
19300
19301  for details on these.
19302 \end_layout
19303
19304 \begin_layout Subsection
19305 \begin_inset CommandInset label
19306 LatexCommand label
19307 name "sub:Paragraph-Style-XHTML"
19308
19309 \end_inset
19310
19311 Paragraph styles
19312 \end_layout
19313
19314 \begin_layout Standard
19315 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
19316  dealing with a normal paragraph, a command, or an environment, where this
19317  is itself determined by the contents of the corresponding 
19318 \begin_inset Flex Code
19319 status collapsed
19320
19321 \begin_layout Plain Layout
19322 LaTeXType
19323 \end_layout
19324
19325 \end_inset
19326
19327  tag.
19328  
19329 \end_layout
19330
19331 \begin_layout Standard
19332 For a command or normal paragraph, the output XHTML has the following form:
19333 \end_layout
19334
19335 \begin_layout LyX-Code
19336 <tag attr=
19337 \begin_inset Quotes erd
19338 \end_inset
19339
19340 value
19341 \begin_inset Quotes erd
19342 \end_inset
19343
19344 >
19345 \end_layout
19346
19347 \begin_layout LyX-Code
19348 <labeltag attr=
19349 \begin_inset Quotes erd
19350 \end_inset
19351
19352 value
19353 \begin_inset Quotes erd
19354 \end_inset
19355
19356 >Label</labeltag>
19357 \end_layout
19358
19359 \begin_layout LyX-Code
19360 Contents of the paragraph.
19361 \end_layout
19362
19363 \begin_layout LyX-Code
19364 </tag>
19365 \end_layout
19366
19367 \begin_layout Standard
19368 The label tags are of course omitted if the paragraph does not have a label.
19369 \end_layout
19370
19371 \begin_layout Standard
19372 For an environment that is not some sort of list, the XHTML takes this form:
19373 \end_layout
19374
19375 \begin_layout LyX-Code
19376 <tag attr=
19377 \begin_inset Quotes erd
19378 \end_inset
19379
19380 value
19381 \begin_inset Quotes erd
19382 \end_inset
19383
19384 >
19385 \end_layout
19386
19387 \begin_layout LyX-Code
19388 <itemtag attr=
19389 \begin_inset Quotes erd
19390 \end_inset
19391
19392 value
19393 \begin_inset Quotes erd
19394 \end_inset
19395
19396 ><labeltag attr=
19397 \begin_inset Quotes erd
19398 \end_inset
19399
19400 value
19401 \begin_inset Quotes erd
19402 \end_inset
19403
19404 >Environment Label</labeltag>First paragraph.</itemtag>
19405 \end_layout
19406
19407 \begin_layout LyX-Code
19408 <itemtag>Second paragraph.</itemtag>
19409 \end_layout
19410
19411 \begin_layout LyX-Code
19412 </tag>
19413 \end_layout
19414
19415 \begin_layout Standard
19416 Note that the label is output only for the first paragraph, as it should
19417  be for a theorem, for example.
19418  
19419 \end_layout
19420
19421 \begin_layout Standard
19422 For a list, we have one of these forms:
19423 \end_layout
19424
19425 \begin_layout LyX-Code
19426 <tag attr=
19427 \begin_inset Quotes erd
19428 \end_inset
19429
19430 value
19431 \begin_inset Quotes erd
19432 \end_inset
19433
19434 >
19435 \end_layout
19436
19437 \begin_layout LyX-Code
19438 <itemtag attr=
19439 \begin_inset Quotes erd
19440 \end_inset
19441
19442 value
19443 \begin_inset Quotes erd
19444 \end_inset
19445
19446 ><labeltag attr=
19447 \begin_inset Quotes erd
19448 \end_inset
19449
19450 value
19451 \begin_inset Quotes erd
19452 \end_inset
19453
19454 >List Label</labeltag>First item.</itemtag>
19455 \end_layout
19456
19457 \begin_layout LyX-Code
19458 <itemtag attr=
19459 \begin_inset Quotes erd
19460 \end_inset
19461
19462 value
19463 \begin_inset Quotes erd
19464 \end_inset
19465
19466 ><labeltag attr=
19467 \begin_inset Quotes erd
19468 \end_inset
19469
19470 value
19471 \begin_inset Quotes erd
19472 \end_inset
19473
19474 >List Label</labeltag>Second item.</itemtag>
19475 \end_layout
19476
19477 \begin_layout LyX-Code
19478 </tag>
19479 \end_layout
19480
19481 \begin_layout LyX-Code
19482
19483 \end_layout
19484
19485 \begin_layout LyX-Code
19486 <tag attr=
19487 \begin_inset Quotes erd
19488 \end_inset
19489
19490 value
19491 \begin_inset Quotes erd
19492 \end_inset
19493
19494 >
19495 \end_layout
19496
19497 \begin_layout LyX-Code
19498 <labeltag attr=
19499 \begin_inset Quotes erd
19500 \end_inset
19501
19502 value
19503 \begin_inset Quotes erd
19504 \end_inset
19505
19506 >List Label</labeltag><itemtag attr=
19507 \begin_inset Quotes erd
19508 \end_inset
19509
19510 value
19511 \begin_inset Quotes erd
19512 \end_inset
19513
19514 >First item.</itemtag>
19515 \end_layout
19516
19517 \begin_layout LyX-Code
19518 <labeltag attr=
19519 \begin_inset Quotes erd
19520 \end_inset
19521
19522 value
19523 \begin_inset Quotes erd
19524 \end_inset
19525
19526 >List Label</labeltag><itemtag attr=
19527 \begin_inset Quotes erd
19528 \end_inset
19529
19530 value
19531 \begin_inset Quotes erd
19532 \end_inset
19533
19534 >Second item.</itemtag>
19535 \end_layout
19536
19537 \begin_layout LyX-Code
19538 </tag>
19539 \end_layout
19540
19541 \begin_layout Standard
19542 Note the different orders of 
19543 \begin_inset Flex Code
19544 status collapsed
19545
19546 \begin_layout Plain Layout
19547 labeltag
19548 \end_layout
19549
19550 \end_inset
19551
19552  and 
19553 \begin_inset Flex Code
19554 status collapsed
19555
19556 \begin_layout Plain Layout
19557 itemtag
19558 \end_layout
19559
19560 \end_inset
19561
19562 .
19563  Which order we get depends upon the setting of 
19564 \begin_inset Flex Code
19565 status collapsed
19566
19567 \begin_layout Plain Layout
19568 HTMLLabelFirst
19569 \end_layout
19570
19571 \end_inset
19572
19573 : If 
19574 \begin_inset Flex Code
19575 status collapsed
19576
19577 \begin_layout Plain Layout
19578 HTMLLabelFirst
19579 \end_layout
19580
19581 \end_inset
19582
19583  is false (the default), you get the first of these, with the label within
19584  the item; if true, you get the second, with the label outside the item.
19585 \end_layout
19586
19587 \begin_layout Standard
19588 The specific tags and attributes output for each paragraph type can be controlle
19589 d by means of the layout tags we are about to describe.
19590  As mentioned earlier, however, LyX uses sensible defaults for many of these,
19591  so you often may not need to do very much to get good XHTML output.
19592  Think of the available tags as there so you can tweak things to your liking.
19593 \end_layout
19594
19595 \begin_layout Description
19596 \begin_inset Flex Code
19597 status collapsed
19598
19599 \begin_layout Plain Layout
19600 HTMLAttr
19601 \end_layout
19602
19603 \end_inset
19604
19605  [
19606 \begin_inset Flex Code
19607 status collapsed
19608
19609 \begin_layout Plain Layout
19610 string
19611 \end_layout
19612
19613 \end_inset
19614
19615 ] Specifies attribute information to be output with the main tag.
19616  For example, 
19617 \begin_inset Quotes eld
19618 \end_inset
19619
19620
19621 \begin_inset Flex Code
19622 status collapsed
19623
19624 \begin_layout Plain Layout
19625 class=`mydiv'
19626 \end_layout
19627
19628 \end_inset
19629
19630
19631 \begin_inset Quotes erd
19632 \end_inset
19633
19634 .
19635  By default, LyX will output 
19636 \begin_inset Quotes eld
19637 \end_inset
19638
19639
19640 \begin_inset Flex Code
19641 status collapsed
19642
19643 \begin_layout Plain Layout
19644 class=`layoutname'
19645 \end_layout
19646
19647 \end_inset
19648
19649
19650 \begin_inset Quotes erd
19651 \end_inset
19652
19653 , where 
19654 \begin_inset Flex Code
19655 status collapsed
19656
19657 \begin_layout Plain Layout
19658 layoutname
19659 \end_layout
19660
19661 \end_inset
19662
19663  is the LyX name of the layout, made lowercase, for example: chapter.
19664  This should 
19665 \emph on
19666 not
19667 \emph default
19668  contain any style information.
19669  Use 
19670 \begin_inset Flex Code
19671 status collapsed
19672
19673 \begin_layout Plain Layout
19674 HTMLStyle
19675 \end_layout
19676
19677 \end_inset
19678
19679  for that purpose.
19680 \end_layout
19681
19682 \begin_layout Description
19683 \begin_inset Flex Code
19684 status collapsed
19685
19686 \begin_layout Plain Layout
19687 HTMLForceCSS
19688 \end_layout
19689
19690 \end_inset
19691
19692  [
19693 \begin_inset Flex Code
19694 status collapsed
19695
19696 \begin_layout Plain Layout
19697
19698 \emph on
19699 0
19700 \emph default
19701 ,1
19702 \end_layout
19703
19704 \end_inset
19705
19706 ] Whether to output the default CSS information LyX generates for this layout,
19707  even if additional information is explicitly provided via 
19708 \begin_inset Flex Code
19709 status collapsed
19710
19711 \begin_layout Plain Layout
19712 HTMLStyle
19713 \end_layout
19714
19715 \end_inset
19716
19717 .
19718  Setting this to 
19719 \begin_inset Flex Code
19720 status collapsed
19721
19722 \begin_layout Plain Layout
19723 1
19724 \end_layout
19725
19726 \end_inset
19727
19728  allows you to alter or augment the generated CSS, rather than to override
19729  it completely.
19730  Default is 
19731 \begin_inset Flex Code
19732 status collapsed
19733
19734 \begin_layout Plain Layout
19735 0
19736 \end_layout
19737
19738 \end_inset
19739
19740 .
19741 \end_layout
19742
19743 \begin_layout Description
19744 \begin_inset Flex Code
19745 status collapsed
19746
19747 \begin_layout Plain Layout
19748 HTMLItem
19749 \end_layout
19750
19751 \end_inset
19752
19753  [
19754 \begin_inset Flex Code
19755 status collapsed
19756
19757 \begin_layout Plain Layout
19758 string
19759 \end_layout
19760
19761 \end_inset
19762
19763 ] The tag to be used for individual paragraphs of environments, replacing
19764  
19765 \begin_inset Flex Code
19766 status collapsed
19767
19768 \begin_layout Plain Layout
19769 itemtag
19770 \end_layout
19771
19772 \end_inset
19773
19774  in the examples above.
19775  Defaults to 
19776 \begin_inset Flex Code
19777 status collapsed
19778
19779 \begin_layout Plain Layout
19780 div
19781 \end_layout
19782
19783 \end_inset
19784
19785 .
19786 \end_layout
19787
19788 \begin_layout Description
19789 \begin_inset Flex Code
19790 status collapsed
19791
19792 \begin_layout Plain Layout
19793 HTMLItemAttr
19794 \end_layout
19795
19796 \end_inset
19797
19798  [
19799 \begin_inset Flex Code
19800 status collapsed
19801
19802 \begin_layout Plain Layout
19803 string
19804 \end_layout
19805
19806 \end_inset
19807
19808 ] Attributes for the item tag.
19809  Defaults to 
19810 \begin_inset Quotes eld
19811 \end_inset
19812
19813
19814 \begin_inset Flex Code
19815 status collapsed
19816
19817 \begin_layout Plain Layout
19818 class=`layoutname_item'
19819 \end_layout
19820
19821 \end_inset
19822
19823
19824 \begin_inset Quotes erd
19825 \end_inset
19826
19827 .
19828  This should 
19829 \emph on
19830 not
19831 \emph default
19832  contain any style information.
19833  Use 
19834 \begin_inset Flex Code
19835 status collapsed
19836
19837 \begin_layout Plain Layout
19838 HTMLStyle
19839 \end_layout
19840
19841 \end_inset
19842
19843  for that purpose.
19844 \end_layout
19845
19846 \begin_layout Description
19847 \begin_inset Flex Code
19848 status collapsed
19849
19850 \begin_layout Plain Layout
19851 HTMLLabel
19852 \end_layout
19853
19854 \end_inset
19855
19856  [
19857 \begin_inset Flex Code
19858 status collapsed
19859
19860 \begin_layout Plain Layout
19861 string
19862 \end_layout
19863
19864 \end_inset
19865
19866 ] The tag to be used for paragraph and item labels, replacing 
19867 \begin_inset Flex Code
19868 status collapsed
19869
19870 \begin_layout Plain Layout
19871 labeltag
19872 \end_layout
19873
19874 \end_inset
19875
19876  in the examples above.
19877  Defaults to 
19878 \begin_inset Flex Code
19879 status collapsed
19880
19881 \begin_layout Plain Layout
19882 span
19883 \end_layout
19884
19885 \end_inset
19886
19887 , unless 
19888 \begin_inset Flex Code
19889 status collapsed
19890
19891 \begin_layout Plain Layout
19892 LabelType
19893 \end_layout
19894
19895 \end_inset
19896
19897  is either 
19898 \begin_inset Flex Code
19899 status collapsed
19900
19901 \begin_layout Plain Layout
19902 Top_Environment
19903 \end_layout
19904
19905 \end_inset
19906
19907  or 
19908 \begin_inset Flex Code
19909 status collapsed
19910
19911 \begin_layout Plain Layout
19912 Centered_Top_Environment
19913 \end_layout
19914
19915 \end_inset
19916
19917 , in which case it defaults to 
19918 \begin_inset Flex Code
19919 status collapsed
19920
19921 \begin_layout Plain Layout
19922 div
19923 \end_layout
19924
19925 \end_inset
19926
19927 .
19928 \end_layout
19929
19930 \begin_layout Description
19931 \begin_inset Flex Code
19932 status collapsed
19933
19934 \begin_layout Plain Layout
19935 HTMLLabelAttr
19936 \end_layout
19937
19938 \end_inset
19939
19940  [
19941 \begin_inset Flex Code
19942 status collapsed
19943
19944 \begin_layout Plain Layout
19945 string
19946 \end_layout
19947
19948 \end_inset
19949
19950 ] Attributes for the label tag.
19951  Defaults to 
19952 \begin_inset Quotes eld
19953 \end_inset
19954
19955
19956 \begin_inset Flex Code
19957 status collapsed
19958
19959 \begin_layout Plain Layout
19960 class=`layoutname_label'
19961 \end_layout
19962
19963 \end_inset
19964
19965
19966 \begin_inset Quotes erd
19967 \end_inset
19968
19969 .
19970  This should 
19971 \emph on
19972 not
19973 \emph default
19974  contain any style information.
19975  Use 
19976 \begin_inset Flex Code
19977 status collapsed
19978
19979 \begin_layout Plain Layout
19980 HTMLStyle
19981 \end_layout
19982
19983 \end_inset
19984
19985  for that purpose.
19986 \end_layout
19987
19988 \begin_layout Description
19989 \begin_inset Flex Code
19990 status collapsed
19991
19992 \begin_layout Plain Layout
19993 HTMLLabelFirst
19994 \end_layout
19995
19996 \end_inset
19997
19998  [
19999 \begin_inset Flex Code
20000 status collapsed
20001
20002 \begin_layout Plain Layout
20003
20004 \emph on
20005 0
20006 \emph default
20007 ,1
20008 \end_layout
20009
20010 \end_inset
20011
20012 ] Meaningful only for list-like environments, this tag controls whether
20013  the label tag is output before or inside the item tag.
20014  This is used, for example, in the description environment, where we want
20015  `
20016 \begin_inset Flex Code
20017 status collapsed
20018
20019 \begin_layout Plain Layout
20020 <dt>\SpecialChar \ldots{}
20021 </dt><dd>\SpecialChar \ldots{}
20022 </dd>
20023 \end_layout
20024
20025 \end_inset
20026
20027 .
20028  Default is 
20029 \begin_inset Flex Code
20030 status collapsed
20031
20032 \begin_layout Plain Layout
20033 0
20034 \end_layout
20035
20036 \end_inset
20037
20038 : The label tag is output inside the item tag.
20039 \end_layout
20040
20041 \begin_layout Description
20042 \begin_inset Flex Code
20043 status collapsed
20044
20045 \begin_layout Plain Layout
20046 HTMLPreamble
20047 \end_layout
20048
20049 \end_inset
20050
20051  Information to be output in the 
20052 \begin_inset Flex Code
20053 status collapsed
20054
20055 \begin_layout Plain Layout
20056 <head>
20057 \end_layout
20058
20059 \end_inset
20060
20061  section when this style is used.
20062  This might, for example, be used to include a 
20063 \begin_inset Flex Code
20064 status collapsed
20065
20066 \begin_layout Plain Layout
20067 <script>
20068 \end_layout
20069
20070 \end_inset
20071
20072  block defining an 
20073 \begin_inset Flex Code
20074 status collapsed
20075
20076 \begin_layout Plain Layout
20077 onclick
20078 \end_layout
20079
20080 \end_inset
20081
20082  handler.
20083 \end_layout
20084
20085 \begin_layout Description
20086 \begin_inset Flex Code
20087 status collapsed
20088
20089 \begin_layout Plain Layout
20090 HTMLStyle
20091 \end_layout
20092
20093 \end_inset
20094
20095  CSS style information to be included when this style is used.
20096  Note that this will automatically be wrapped in a layout-generated 
20097 \begin_inset Flex Code
20098 status collapsed
20099
20100 \begin_layout Plain Layout
20101 <style>
20102 \end_layout
20103
20104 \end_inset
20105
20106  block, so only the CSS itself need be included.
20107 \end_layout
20108
20109 \begin_layout Description
20110 \begin_inset Flex Code
20111 status collapsed
20112
20113 \begin_layout Plain Layout
20114 HTMLTag
20115 \end_layout
20116
20117 \end_inset
20118
20119  [
20120 \begin_inset Flex Code
20121 status collapsed
20122
20123 \begin_layout Plain Layout
20124 string
20125 \end_layout
20126
20127 \end_inset
20128
20129 ] The tag to be used for the main label, replacing 
20130 \begin_inset Flex Code
20131 status collapsed
20132
20133 \begin_layout Plain Layout
20134 tag
20135 \end_layout
20136
20137 \end_inset
20138
20139  in the examples above.
20140  Defaults to 
20141 \begin_inset Flex Code
20142 status collapsed
20143
20144 \begin_layout Plain Layout
20145 div
20146 \end_layout
20147
20148 \end_inset
20149
20150 .
20151 \end_layout
20152
20153 \begin_layout Description
20154 \begin_inset Flex Code
20155 status collapsed
20156
20157 \begin_layout Plain Layout
20158 HTMLTitle
20159 \end_layout
20160
20161 \end_inset
20162
20163  [
20164 \begin_inset Flex Code
20165 status collapsed
20166
20167 \begin_layout Plain Layout
20168
20169 \emph on
20170 0
20171 \emph default
20172 ,1
20173 \end_layout
20174
20175 \end_inset
20176
20177 ] Marks this style as the one to be used to generate the 
20178 \begin_inset Flex Code
20179 status collapsed
20180
20181 \begin_layout Plain Layout
20182 <title>
20183 \end_layout
20184
20185 \end_inset
20186
20187  tag for the XHTML file.
20188  By default, it is false.
20189  The 
20190 \begin_inset Flex Code
20191 status collapsed
20192
20193 \begin_layout Plain Layout
20194 stdtitle.inc
20195 \end_layout
20196
20197 \end_inset
20198
20199  file sets it to true for the 
20200 \begin_inset Flex Code
20201 status collapsed
20202
20203 \begin_layout Plain Layout
20204 title
20205 \end_layout
20206
20207 \end_inset
20208
20209  environment.
20210  
20211 \end_layout
20212
20213 \begin_layout Subsection
20214 InsetLayout XHTML
20215 \end_layout
20216
20217 \begin_layout Standard
20218 The XHTML output of insets can also be controlled by information in layout
20219  files.
20220 \begin_inset Foot
20221 status collapsed
20222
20223 \begin_layout Plain Layout
20224 At present, this is true only for 
20225 \begin_inset Quotes eld
20226 \end_inset
20227
20228 text
20229 \begin_inset Quotes erd
20230 \end_inset
20231
20232  insets (insets you can type into) and is not true for 
20233 \begin_inset Quotes eld
20234 \end_inset
20235
20236 command
20237 \begin_inset Quotes erd
20238 \end_inset
20239
20240  insets (insets that are associated with dialog boxes).
20241 \end_layout
20242
20243 \end_inset
20244
20245  Here, too, LyX tries to provide sensible defaults, and it constructs default
20246  CSS style rules.
20247  But everything can be customized.
20248 \end_layout
20249
20250 \begin_layout Standard
20251 The XHTML LyX outputs for an inset has the following form:
20252 \end_layout
20253
20254 \begin_layout LyX-Code
20255 <tag attr=
20256 \begin_inset Quotes erd
20257 \end_inset
20258
20259 value
20260 \begin_inset Quotes erd
20261 \end_inset
20262
20263 >
20264 \end_layout
20265
20266 \begin_layout LyX-Code
20267 <labeltag>Label</labeltag>
20268 \end_layout
20269
20270 \begin_layout LyX-Code
20271 <innertag attr=
20272 \begin_inset Quotes erd
20273 \end_inset
20274
20275 value
20276 \begin_inset Quotes erd
20277 \end_inset
20278
20279 >Contents of the inset.</innertag>
20280 \end_layout
20281
20282 \begin_layout LyX-Code
20283 </tag>
20284 \end_layout
20285
20286 \begin_layout Standard
20287 If the inset permits multiple paragraphs---that is, if 
20288 \begin_inset Flex Code
20289 status collapsed
20290
20291 \begin_layout Plain Layout
20292 MultiPar
20293 \end_layout
20294
20295 \end_inset
20296
20297  is true---then the contents of the inset will itself be output as paragraphs
20298  formatted according to the styles used for those paragraphs (standard,
20299  quote, and the like).
20300  The label tag is of course omitted if the paragraph does not have a label
20301  and, at present, is always 
20302 \begin_inset Flex Code
20303 status collapsed
20304
20305 \begin_layout Plain Layout
20306 span
20307 \end_layout
20308
20309 \end_inset
20310
20311 .
20312  The inner tag is optional and, by default, does not appear.
20313 \end_layout
20314
20315 \begin_layout Standard
20316 The specific tags and attributes output for each inset can be controlled
20317  by means of the following layout tags.
20318 \end_layout
20319
20320 \begin_layout Description
20321 \begin_inset Flex Code
20322 status collapsed
20323
20324 \begin_layout Plain Layout
20325 HTMLAttr
20326 \end_layout
20327
20328 \end_inset
20329
20330  [
20331 \begin_inset Flex Code
20332 status collapsed
20333
20334 \begin_layout Plain Layout
20335 string
20336 \end_layout
20337
20338 \end_inset
20339
20340 ] Specifies attribute information to be output with the main tag.
20341  For example, 
20342 \begin_inset Quotes eld
20343 \end_inset
20344
20345
20346 \begin_inset Flex Code
20347 status collapsed
20348
20349 \begin_layout Plain Layout
20350 class=`myinset' onclick=`\SpecialChar \ldots{}
20351 '
20352 \end_layout
20353
20354 \end_inset
20355
20356
20357 \begin_inset Quotes erd
20358 \end_inset
20359
20360 .
20361  By default, LyX will output 
20362 \begin_inset Quotes eld
20363 \end_inset
20364
20365
20366 \begin_inset Flex Code
20367 status collapsed
20368
20369 \begin_layout Plain Layout
20370 class=`insetname'
20371 \end_layout
20372
20373 \end_inset
20374
20375
20376 \begin_inset Quotes erd
20377 \end_inset
20378
20379 , where 
20380 \begin_inset Flex Code
20381 status collapsed
20382
20383 \begin_layout Plain Layout
20384 insetname
20385 \end_layout
20386
20387 \end_inset
20388
20389  is the LyX name of the inset, made lowercase and with non-alphanumeric
20390  characters converted to underscores, for example: footnote.
20391 \end_layout
20392
20393 \begin_layout Description
20394 \begin_inset Flex Code
20395 status collapsed
20396
20397 \begin_layout Plain Layout
20398 HTMLForceCSS
20399 \end_layout
20400
20401 \end_inset
20402
20403  [
20404 \begin_inset Flex Code
20405 status collapsed
20406
20407 \begin_layout Plain Layout
20408
20409 \emph on
20410 0
20411 \emph default
20412 ,1
20413 \end_layout
20414
20415 \end_inset
20416
20417 ] Whether to output the default CSS information LyX generates for this layout,
20418  even if additional information is explicitly provided via 
20419 \begin_inset Flex Code
20420 status collapsed
20421
20422 \begin_layout Plain Layout
20423 HTMLStyle
20424 \end_layout
20425
20426 \end_inset
20427
20428 .
20429  Setting this to 
20430 \begin_inset Flex Code
20431 status collapsed
20432
20433 \begin_layout Plain Layout
20434 1
20435 \end_layout
20436
20437 \end_inset
20438
20439  allows you to alter or augment the generated CSS, rather than to override
20440  it completely.
20441  Default is 0.
20442 \end_layout
20443
20444 \begin_layout Description
20445 \begin_inset Flex Code
20446 status collapsed
20447
20448 \begin_layout Plain Layout
20449 HTMLInnerAttr
20450 \end_layout
20451
20452 \end_inset
20453
20454  [
20455 \begin_inset Flex Code
20456 status collapsed
20457
20458 \begin_layout Plain Layout
20459 string
20460 \end_layout
20461
20462 \end_inset
20463
20464 ] Attributes for the inner tag.
20465  Defaults to 
20466 \begin_inset Quotes eld
20467 \end_inset
20468
20469
20470 \begin_inset Flex Code
20471 status collapsed
20472
20473 \begin_layout Plain Layout
20474 class=`insetname_inner'
20475 \end_layout
20476
20477 \end_inset
20478
20479
20480 \begin_inset Quotes erd
20481 \end_inset
20482
20483 .
20484 \end_layout
20485
20486 \begin_layout Description
20487 \begin_inset Flex Code
20488 status collapsed
20489
20490 \begin_layout Plain Layout
20491 HTMLInnerTag
20492 \end_layout
20493
20494 \end_inset
20495
20496  [
20497 \begin_inset Flex Code
20498 status collapsed
20499
20500 \begin_layout Plain Layout
20501 string
20502 \end_layout
20503
20504 \end_inset
20505
20506 ] The inner tag, replacing 
20507 \begin_inset Flex Code
20508 status collapsed
20509
20510 \begin_layout Plain Layout
20511 innertag
20512 \end_layout
20513
20514 \end_inset
20515
20516  in the examples above.
20517  By default, there is none.
20518 \end_layout
20519
20520 \begin_layout Description
20521 \begin_inset Flex Code
20522 status collapsed
20523
20524 \begin_layout Plain Layout
20525 HTMLIsBlock
20526 \end_layout
20527
20528 \end_inset
20529
20530  [
20531 \begin_inset Flex Code
20532 status collapsed
20533
20534 \begin_layout Plain Layout
20535 0,
20536 \emph on
20537 1
20538 \end_layout
20539
20540 \end_inset
20541
20542 ] Whether this inset represents a standalone block of text (such as a footnote)
20543  or instead represents material that is included in the surrounding text
20544  (such as a branch).
20545  Defaults to 1.
20546 \end_layout
20547
20548 \begin_layout Description
20549 \begin_inset Flex Code
20550 status collapsed
20551
20552 \begin_layout Plain Layout
20553 HTMLLabel
20554 \end_layout
20555
20556 \end_inset
20557
20558  [
20559 \begin_inset Flex Code
20560 status collapsed
20561
20562 \begin_layout Plain Layout
20563 string
20564 \end_layout
20565
20566 \end_inset
20567
20568 ] A label for this inset, possibly including a reference to a counter.
20569  For example, for footnote, it might be: 
20570 \begin_inset Flex Code
20571 status collapsed
20572
20573 \begin_layout Plain Layout
20574
20575 \backslash
20576 arabic{footnote}
20577 \end_layout
20578
20579 \end_inset
20580
20581 .
20582  This is optional, and there is no default.
20583 \end_layout
20584
20585 \begin_layout Description
20586 \begin_inset Flex Code
20587 status collapsed
20588
20589 \begin_layout Plain Layout
20590 HTMLPreamble
20591 \end_layout
20592
20593 \end_inset
20594
20595  Information to be output in the 
20596 \begin_inset Flex Code
20597 status collapsed
20598
20599 \begin_layout Plain Layout
20600 <head>
20601 \end_layout
20602
20603 \end_inset
20604
20605  section when this style is used.
20606  This might, for example, be used to include a 
20607 \begin_inset Flex Code
20608 status collapsed
20609
20610 \begin_layout Plain Layout
20611 <script>
20612 \end_layout
20613
20614 \end_inset
20615
20616  block defining an 
20617 \begin_inset Flex Code
20618 status collapsed
20619
20620 \begin_layout Plain Layout
20621 onclick
20622 \end_layout
20623
20624 \end_inset
20625
20626  handler.
20627 \end_layout
20628
20629 \begin_layout Description
20630 \begin_inset Flex Code
20631 status collapsed
20632
20633 \begin_layout Plain Layout
20634 HTMLStyle
20635 \end_layout
20636
20637 \end_inset
20638
20639  CSS style information to be included when this style is used.
20640  Note that this will automatically be wrapped in a layout-generated 
20641 \begin_inset Flex Code
20642 status collapsed
20643
20644 \begin_layout Plain Layout
20645 <style>
20646 \end_layout
20647
20648 \end_inset
20649
20650  block, so only the CSS itself need be included.
20651 \end_layout
20652
20653 \begin_layout Description
20654 \begin_inset Flex Code
20655 status collapsed
20656
20657 \begin_layout Plain Layout
20658 HTMLTag
20659 \end_layout
20660
20661 \end_inset
20662
20663  [
20664 \begin_inset Flex Code
20665 status collapsed
20666
20667 \begin_layout Plain Layout
20668 string
20669 \end_layout
20670
20671 \end_inset
20672
20673 ] The tag to be used for the main label, replacing 
20674 \begin_inset Flex Code
20675 status collapsed
20676
20677 \begin_layout Plain Layout
20678 tag
20679 \end_layout
20680
20681 \end_inset
20682
20683  in the examples above.
20684  The default depends upon the setting of 
20685 \begin_inset Flex Code
20686 status collapsed
20687
20688 \begin_layout Plain Layout
20689 MultiPar
20690 \end_layout
20691
20692 \end_inset
20693
20694 : If 
20695 \begin_inset Flex Code
20696 status collapsed
20697
20698 \begin_layout Plain Layout
20699 MultiPar
20700 \end_layout
20701
20702 \end_inset
20703
20704  is true, the default is 
20705 \begin_inset Flex Code
20706 status collapsed
20707
20708 \begin_layout Plain Layout
20709 div
20710 \end_layout
20711
20712 \end_inset
20713
20714 ; if it is false, the default is 
20715 \begin_inset Flex Code
20716 status collapsed
20717
20718 \begin_layout Plain Layout
20719 span
20720 \end_layout
20721
20722 \end_inset
20723
20724 .
20725 \end_layout
20726
20727 \begin_layout Subsection
20728 Float XHTML
20729 \end_layout
20730
20731 \begin_layout Standard
20732 The XHTML output for floats too can be controlled by layout information.
20733  The output has the following form:
20734 \end_layout
20735
20736 \begin_layout LyX-Code
20737 <tag attr=
20738 \begin_inset Quotes erd
20739 \end_inset
20740
20741 value
20742 \begin_inset Quotes erd
20743 \end_inset
20744
20745 >
20746 \end_layout
20747
20748 \begin_layout LyX-Code
20749 Contents of the float.
20750 \end_layout
20751
20752 \begin_layout LyX-Code
20753 </tag>
20754 \end_layout
20755
20756 \begin_layout Standard
20757 The caption, if there is one, is a separate inset and will be output as
20758  such.
20759  Its appearance can be controlled via the InsetLayout for caption insets.
20760  
20761 \end_layout
20762
20763 \begin_layout Description
20764 \begin_inset Flex Code
20765 status collapsed
20766
20767 \begin_layout Plain Layout
20768 HTMLAttr
20769 \end_layout
20770
20771 \end_inset
20772
20773  [
20774 \begin_inset Flex Code
20775 status collapsed
20776
20777 \begin_layout Plain Layout
20778 string
20779 \end_layout
20780
20781 \end_inset
20782
20783 ] Specifies attribute information to be output with the main tag.
20784  For example, 
20785 \begin_inset Quotes eld
20786 \end_inset
20787
20788
20789 \begin_inset Flex Code
20790 status collapsed
20791
20792 \begin_layout Plain Layout
20793 class=`myfloat' onclick=`\SpecialChar \ldots{}
20794 '
20795 \end_layout
20796
20797 \end_inset
20798
20799
20800 \begin_inset Quotes erd
20801 \end_inset
20802
20803 .
20804  By default, LyX will output 
20805 \begin_inset Quotes eld
20806 \end_inset
20807
20808
20809 \begin_inset Flex Code
20810 status collapsed
20811
20812 \begin_layout Plain Layout
20813 class=`float float-floattype'
20814 \end_layout
20815
20816 \end_inset
20817
20818
20819 \begin_inset Quotes erd
20820 \end_inset
20821
20822 , where 
20823 \begin_inset Flex Code
20824 status collapsed
20825
20826 \begin_layout Plain Layout
20827 floattype
20828 \end_layout
20829
20830 \end_inset
20831
20832  is LyX's name for this type of float, as determined by the float declaration
20833  (see 
20834 \begin_inset CommandInset ref
20835 LatexCommand ref
20836 reference "sub:Floats"
20837
20838 \end_inset
20839
20840 ), though made lowercase and with non-alphanumeric characters converted
20841  to underscores, for example: float-table.
20842 \end_layout
20843
20844 \begin_layout Description
20845 \begin_inset Flex Code
20846 status collapsed
20847
20848 \begin_layout Plain Layout
20849 HTMLStyle
20850 \end_layout
20851
20852 \end_inset
20853
20854  CSS style information to be included when this float is used.
20855  Note that this will automatically be wrapped in a layout-generated 
20856 \begin_inset Flex Code
20857 status collapsed
20858
20859 \begin_layout Plain Layout
20860 <style>
20861 \end_layout
20862
20863 \end_inset
20864
20865  block, so only the CSS itself need be included.
20866 \end_layout
20867
20868 \begin_layout Description
20869 \begin_inset Flex Code
20870 status collapsed
20871
20872 \begin_layout Plain Layout
20873 HTMLTag
20874 \end_layout
20875
20876 \end_inset
20877
20878  [
20879 \begin_inset Flex Code
20880 status collapsed
20881
20882 \begin_layout Plain Layout
20883 string
20884 \end_layout
20885
20886 \end_inset
20887
20888 ] The tag to be used for this float, replacing 
20889 \begin_inset Quotes eld
20890 \end_inset
20891
20892
20893 \begin_inset Flex Code
20894 status collapsed
20895
20896 \begin_layout Plain Layout
20897 tag
20898 \end_layout
20899
20900 \end_inset
20901
20902
20903 \begin_inset Quotes erd
20904 \end_inset
20905
20906  in the example above.
20907  The default is 
20908 \begin_inset Flex Code
20909 status collapsed
20910
20911 \begin_layout Plain Layout
20912 div
20913 \end_layout
20914
20915 \end_inset
20916
20917  and will rarely need changing.
20918 \end_layout
20919
20920 \begin_layout Subsection
20921 Bibliography formatting
20922 \end_layout
20923
20924 \begin_layout Standard
20925 The bibliography can be formatted using 
20926 \begin_inset Flex Code
20927 status collapsed
20928
20929 \begin_layout Plain Layout
20930 CiteFormat
20931 \end_layout
20932
20933 \end_inset
20934
20935  blocks.
20936  See Section 
20937 \begin_inset CommandInset ref
20938 LatexCommand ref
20939 reference "sub:Citation-format-description"
20940
20941 \end_inset
20942
20943  for the details.
20944 \end_layout
20945
20946 \begin_layout Subsection
20947 LyX-generated CSS
20948 \end_layout
20949
20950 \begin_layout Standard
20951 We have several times mentioned that LyX will generate default CSS style
20952  rules for both insets and paragraph styles, based upon the other layout
20953  information that is provided.
20954  In this section, we shall say a word about which layout information LyX
20955  uses and how.
20956 \end_layout
20957
20958 \begin_layout Standard
20959 At present, LyX auto-generates CSS only for font information, making use
20960  of the 
20961 \begin_inset Flex Code
20962 status collapsed
20963
20964 \begin_layout Plain Layout
20965 Family
20966 \end_layout
20967
20968 \end_inset
20969
20970
20971 \begin_inset Flex Code
20972 status collapsed
20973
20974 \begin_layout Plain Layout
20975 Series
20976 \end_layout
20977
20978 \end_inset
20979
20980
20981 \begin_inset Flex Code
20982 status collapsed
20983
20984 \begin_layout Plain Layout
20985 Shape
20986 \end_layout
20987
20988 \end_inset
20989
20990 , and 
20991 \begin_inset Flex Code
20992 status collapsed
20993
20994 \begin_layout Plain Layout
20995 Size
20996 \end_layout
20997
20998 \end_inset
20999
21000  specified in the 
21001 \begin_inset Flex Code
21002 status collapsed
21003
21004 \begin_layout Plain Layout
21005 Font
21006 \end_layout
21007
21008 \end_inset
21009
21010  declaration.
21011  (See 
21012 \begin_inset CommandInset ref
21013 LatexCommand ref
21014 reference "sub:Font-description"
21015
21016 \end_inset
21017
21018 .) The translation is mostly straightforward and obvious.
21019  For example, 
21020 \begin_inset Quotes eld
21021 \end_inset
21022
21023
21024 \begin_inset Flex Code
21025 status collapsed
21026
21027 \begin_layout Plain Layout
21028 Family Sans
21029 \end_layout
21030
21031 \end_inset
21032
21033
21034 \begin_inset Quotes erd
21035 \end_inset
21036
21037  becomes 
21038 \begin_inset Quotes eld
21039 \end_inset
21040
21041
21042 \begin_inset Flex Code
21043 status collapsed
21044
21045 \begin_layout Plain Layout
21046 font-family: sans-serif;
21047 \end_layout
21048
21049 \end_inset
21050
21051
21052 \begin_inset Quotes erd
21053 \end_inset
21054
21055 .
21056  The correspondence of LyX sizes and CSS sizes is a little less obvious
21057  but nonetheless intuitive.
21058  See the 
21059 \begin_inset Flex Code
21060 status collapsed
21061
21062 \begin_layout Plain Layout
21063 getSizeCSS()
21064 \end_layout
21065
21066 \end_inset
21067
21068  function in 
21069 \begin_inset Flex URL
21070 status collapsed
21071
21072 \begin_layout Plain Layout
21073
21074 src/FontInfo.cpp
21075 \end_layout
21076
21077 \end_inset
21078
21079  for the details.
21080 \end_layout
21081
21082 \begin_layout Chapter
21083 Including External Material
21084 \end_layout
21085
21086 \begin_layout Standard
21087 \begin_inset Box Shadowbox
21088 position "t"
21089 hor_pos "c"
21090 has_inner_box 1
21091 inner_pos "t"
21092 use_parbox 0
21093 use_makebox 0
21094 width "100col%"
21095 special "none"
21096 height "1in"
21097 height_special "totalheight"
21098 status open
21099
21100 \begin_layout Plain Layout
21101 WARNING: This portion of the documentation has not been updated for some
21102  time.
21103  We certainly hope that it is still accurate, but there are no guarantees.
21104 \end_layout
21105
21106 \end_inset
21107
21108
21109 \end_layout
21110
21111 \begin_layout Standard
21112 The use of material from sources external to LyX is covered in detail in
21113  the 
21114 \emph on
21115 Embedded Objects
21116 \emph default
21117  manual.
21118  This part of the manual covers what needs to happen behind the scenes for
21119  new sorts of material to be included.
21120 \end_layout
21121
21122 \begin_layout Section
21123 How does it work?
21124 \end_layout
21125
21126 \begin_layout Standard
21127 The external material feature is based on the concept of a 
21128 \emph on
21129 template
21130 \emph default
21131 .
21132  A template is a specification of how LyX should interface with a certain
21133  kind of material.
21134  As bundled, LyX comes with predefined templates for Xfig figures, various
21135  raster format images, chess diagrams, and LilyPond music notation.
21136  You can check the actual list by using the menu 
21137 \begin_inset Flex MenuItem
21138 status collapsed
21139
21140 \begin_layout Plain Layout
21141 Insert\SpecialChar \menuseparator
21142 File\SpecialChar \menuseparator
21143 External Material
21144 \end_layout
21145
21146 \end_inset
21147
21148 .
21149  Furthermore, it is possible to roll your own template to support a specific
21150  kind of material.
21151  Later we'll describe in more detail what is involved, and hopefully you
21152  will submit all the templates you create so we can include them in a later
21153  LyX version.
21154 \end_layout
21155
21156 \begin_layout Standard
21157 Another basic idea of the external material feature is to distinguish between
21158  the original file that serves as a base for final material and the produced
21159  file that is included in your exported or printed document.
21160  For example, consider the case of a figure produced with 
21161 \begin_inset Flex Code
21162 status collapsed
21163
21164 \begin_layout Plain Layout
21165 Xfig
21166 \end_layout
21167
21168 \end_inset
21169
21170 .
21171  The Xfig application itself works on an original file with the 
21172 \begin_inset Flex Code
21173 status collapsed
21174
21175 \begin_layout Plain Layout
21176 .fig
21177 \end_layout
21178
21179 \end_inset
21180
21181  extension.
21182  Within Xfig, you create and change your figure, and when you are done,
21183  you save the 
21184 \begin_inset Flex Code
21185 status collapsed
21186
21187 \begin_layout Plain Layout
21188 fig
21189 \end_layout
21190
21191 \end_inset
21192
21193 -file.
21194  When you want to include the figure in your document, you invoke 
21195 \begin_inset Flex Code
21196 status collapsed
21197
21198 \begin_layout Plain Layout
21199 transfig
21200 \end_layout
21201
21202 \end_inset
21203
21204  in order to create a PostScript file that can readily be included in your
21205  LaTeX file.
21206  In this case, the 
21207 \begin_inset Flex Code
21208 status collapsed
21209
21210 \begin_layout Plain Layout
21211 .fig
21212 \end_layout
21213
21214 \end_inset
21215
21216  file is the original file, and the PostScript file is the produced file.
21217 \end_layout
21218
21219 \begin_layout Standard
21220 This distinction is important in order to allow updating of the material
21221  while you are in the process of writing the document.
21222  Furthermore, it provides us with the flexibility that is needed to support
21223  multiple export formats.
21224  For instance, in the case of a plain text file, it is not exactly an award-winn
21225 ing idea to include the figure as raw PostScript.
21226  Instead, you would either prefer to just include a reference to the figure
21227  or try to invoke some graphics to ASCII converter to make the final result
21228  look similar to the real graphics.
21229  The external material management allows you to do this, because it is parametri
21230 zed on the different export formats that LyX supports.
21231 \end_layout
21232
21233 \begin_layout Standard
21234 Besides supporting the production of different products according to the
21235  exported format, it supports tight integration with editing and viewing
21236  applications.
21237  In the case of an Xfig figure, you are able to invoke Xfig on the original
21238  file with a single click from within the external material dialog in LyX,
21239  and also preview the produced PostScript file with Ghostview with another
21240  click.
21241  No more fiddling around with the command line and/or file browsers to locate
21242  and manipulate the original or produced files.
21243  In this way, you are finally able to take full advantage of the many different
21244  applications that are relevant to use when you write your documents, and
21245  ultimately be more productive.
21246 \end_layout
21247
21248 \begin_layout Section
21249 The external template configuration file
21250 \end_layout
21251
21252 \begin_layout Standard
21253 It is relatively easy to add custom external template definitions to LyX.
21254  However, be aware that doing this in an careless manner most probably 
21255 \emph on
21256 will
21257 \emph default
21258  introduce an easily exploitable security hole.
21259  So before you do this, please read the discussion about security in section
21260  
21261 \begin_inset CommandInset ref
21262 LatexCommand ref
21263 reference "sec:Security-discussion"
21264
21265 \end_inset
21266
21267 .
21268 \end_layout
21269
21270 \begin_layout Standard
21271 Having said that, we encourage you to submit any interesting templates that
21272  you create.
21273  
21274 \end_layout
21275
21276 \begin_layout Standard
21277 The external templates are defined in the 
21278 \begin_inset Flex Code
21279 status collapsed
21280
21281 \begin_layout Plain Layout
21282 LyXDir/lib/external_templates
21283 \end_layout
21284
21285 \end_inset
21286
21287  file.
21288  You can place your own version in 
21289 \begin_inset Flex Code
21290 status collapsed
21291
21292 \begin_layout Plain Layout
21293 UserDir/external_templates
21294 \end_layout
21295
21296 \end_inset
21297
21298 .
21299 \end_layout
21300
21301 \begin_layout Standard
21302 A typical template looks like this:
21303 \end_layout
21304
21305 \begin_layout LyX-Code
21306 Template XFig
21307 \end_layout
21308
21309 \begin_layout LyX-Code
21310 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
21311 \end_layout
21312
21313 \begin_layout LyX-Code
21314 HelpText
21315 \end_layout
21316
21317 \begin_layout LyX-Code
21318 An XFig figure.
21319 \end_layout
21320
21321 \begin_layout LyX-Code
21322 HelpTextEnd
21323 \end_layout
21324
21325 \begin_layout LyX-Code
21326 InputFormat fig
21327 \end_layout
21328
21329 \begin_layout LyX-Code
21330 FileFilter "*.fig"
21331 \end_layout
21332
21333 \begin_layout LyX-Code
21334 AutomaticProduction true
21335 \end_layout
21336
21337 \begin_layout LyX-Code
21338 Transform Rotate
21339 \end_layout
21340
21341 \begin_layout LyX-Code
21342 Transform Resize
21343 \end_layout
21344
21345 \begin_layout LyX-Code
21346 Format LaTeX
21347 \end_layout
21348
21349 \begin_layout LyX-Code
21350 TransformCommand Rotate RotationLatexCommand
21351 \end_layout
21352
21353 \begin_layout LyX-Code
21354 TransformCommand Resize ResizeLatexCommand
21355 \end_layout
21356
21357 \begin_layout LyX-Code
21358 Product "$$RotateFront$$ResizeFront
21359 \end_layout
21360
21361 \begin_layout LyX-Code
21362          
21363 \backslash
21364
21365 \backslash
21366 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
21367 \end_layout
21368
21369 \begin_layout LyX-Code
21370          $$ResizeBack$$RotateBack"
21371 \end_layout
21372
21373 \begin_layout LyX-Code
21374 UpdateFormat pstex
21375 \end_layout
21376
21377 \begin_layout LyX-Code
21378 UpdateResult "$$AbsPath$$Basename.pstex_t"
21379 \end_layout
21380
21381 \begin_layout LyX-Code
21382 Requirement "graphicx"
21383 \end_layout
21384
21385 \begin_layout LyX-Code
21386 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
21387 \end_layout
21388
21389 \begin_layout LyX-Code
21390 ReferencedFile latex "$$AbsPath$$Basename.eps"
21391 \end_layout
21392
21393 \begin_layout LyX-Code
21394 ReferencedFile dvi "$$AbsPath$$Basename.eps"
21395 \end_layout
21396
21397 \begin_layout LyX-Code
21398 FormatEnd
21399 \end_layout
21400
21401 \begin_layout LyX-Code
21402 Format PDFLaTeX
21403 \end_layout
21404
21405 \begin_layout LyX-Code
21406 TransformCommand Rotate RotationLatexCommand
21407 \end_layout
21408
21409 \begin_layout LyX-Code
21410 TransformCommand Resize ResizeLatexCommand
21411 \end_layout
21412
21413 \begin_layout LyX-Code
21414 Product "$$RotateFront$$ResizeFront
21415 \end_layout
21416
21417 \begin_layout LyX-Code
21418          
21419 \backslash
21420
21421 \backslash
21422 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
21423 \end_layout
21424
21425 \begin_layout LyX-Code
21426          $$ResizeBack$$RotateBack"
21427 \end_layout
21428
21429 \begin_layout LyX-Code
21430 UpdateFormat pdftex
21431 \end_layout
21432
21433 \begin_layout LyX-Code
21434 UpdateResult "$$AbsPath$$Basename.pdftex_t"
21435 \end_layout
21436
21437 \begin_layout LyX-Code
21438 Requirement "graphicx"
21439 \end_layout
21440
21441 \begin_layout LyX-Code
21442 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
21443 \end_layout
21444
21445 \begin_layout LyX-Code
21446 ReferencedFile latex "$$AbsPath$$Basename.pdf"
21447 \end_layout
21448
21449 \begin_layout LyX-Code
21450 FormatEnd
21451 \end_layout
21452
21453 \begin_layout LyX-Code
21454 Format Ascii
21455 \end_layout
21456
21457 \begin_layout LyX-Code
21458 Product "$$Contents(
21459 \backslash
21460 "$$AbsPath$$Basename.asc
21461 \backslash
21462 ")"
21463 \end_layout
21464
21465 \begin_layout LyX-Code
21466 UpdateFormat asciixfig
21467 \end_layout
21468
21469 \begin_layout LyX-Code
21470 UpdateResult "$$AbsPath$$Basename.asc"
21471 \end_layout
21472
21473 \begin_layout LyX-Code
21474 FormatEnd
21475 \end_layout
21476
21477 \begin_layout LyX-Code
21478 Format DocBook
21479 \end_layout
21480
21481 \begin_layout LyX-Code
21482 Product "<graphic fileref=
21483 \backslash
21484 "$$AbsOrRelPathMaster$$Basename.eps
21485 \backslash
21486 ">
21487 \end_layout
21488
21489 \begin_layout LyX-Code
21490          </graphic>"
21491 \end_layout
21492
21493 \begin_layout LyX-Code
21494 UpdateFormat eps
21495 \end_layout
21496
21497 \begin_layout LyX-Code
21498 UpdateResult "$$AbsPath$$Basename.eps"
21499 \end_layout
21500
21501 \begin_layout LyX-Code
21502 ReferencedFile docbook "$$AbsPath$$Basename.eps"
21503 \end_layout
21504
21505 \begin_layout LyX-Code
21506 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
21507 \end_layout
21508
21509 \begin_layout LyX-Code
21510 FormatEnd
21511 \end_layout
21512
21513 \begin_layout LyX-Code
21514 Product "[XFig: $$FName]"
21515 \end_layout
21516
21517 \begin_layout LyX-Code
21518 FormatEnd
21519 \end_layout
21520
21521 \begin_layout LyX-Code
21522 TemplateEnd
21523 \end_layout
21524
21525 \begin_layout Standard
21526 As you can see, the template is enclosed in 
21527 \begin_inset Flex Code
21528 status collapsed
21529
21530 \begin_layout Plain Layout
21531 Template
21532 \end_layout
21533
21534 \end_inset
21535
21536  \SpecialChar \ldots{}
21537  
21538 \begin_inset Flex Code
21539 status collapsed
21540
21541 \begin_layout Plain Layout
21542 TemplateEnd
21543 \end_layout
21544
21545 \end_inset
21546
21547 .
21548  It contains a header specifying some general settings and, for each supported
21549  primary document file format, a section 
21550 \begin_inset Flex Code
21551 status collapsed
21552
21553 \begin_layout Plain Layout
21554 Format
21555 \end_layout
21556
21557 \end_inset
21558
21559  \SpecialChar \ldots{}
21560  
21561 \begin_inset Flex Code
21562 status collapsed
21563
21564 \begin_layout Plain Layout
21565 FormatEnd
21566 \end_layout
21567
21568 \end_inset
21569
21570 .
21571 \end_layout
21572
21573 \begin_layout Subsection
21574 The template header
21575 \end_layout
21576
21577 \begin_layout Description
21578 \begin_inset Flex Code
21579 status collapsed
21580
21581 \begin_layout Plain Layout
21582 AutomaticProduction
21583 \begin_inset space ~
21584 \end_inset
21585
21586 true|false
21587 \end_layout
21588
21589 \end_inset
21590
21591  Whether the file represented by the template must be generated by LyX.
21592  This command must occur exactly once.
21593 \end_layout
21594
21595 \begin_layout Description
21596 \begin_inset Flex Code
21597 status collapsed
21598
21599 \begin_layout Plain Layout
21600 FileFilter
21601 \begin_inset space ~
21602 \end_inset
21603
21604 <pattern>
21605 \end_layout
21606
21607 \end_inset
21608
21609  A glob pattern that is used in the file dialog to filter out the desired
21610  files.
21611  If there is more than one possible file extension (e.
21612 \begin_inset space \thinspace{}
21613 \end_inset
21614
21615 g.
21616 \begin_inset space \space{}
21617 \end_inset
21618
21619 tgif has 
21620 \begin_inset Flex Code
21621 status collapsed
21622
21623 \begin_layout Plain Layout
21624 .obj
21625 \end_layout
21626
21627 \end_inset
21628
21629  and 
21630 \begin_inset Flex Code
21631 status collapsed
21632
21633 \begin_layout Plain Layout
21634 .tgo
21635 \end_layout
21636
21637 \end_inset
21638
21639 ), use something like 
21640 \begin_inset Flex Code
21641 status collapsed
21642
21643 \begin_layout Plain Layout
21644 "*.{obj,tgo}"
21645 \end_layout
21646
21647 \end_inset
21648
21649 .
21650  This command must occur exactly once.
21651 \end_layout
21652
21653 \begin_layout Description
21654 \begin_inset Flex Code
21655 status collapsed
21656
21657 \begin_layout Plain Layout
21658 GuiName
21659 \begin_inset space ~
21660 \end_inset
21661
21662 <guiname>
21663 \end_layout
21664
21665 \end_inset
21666
21667  The text that is displayed on the button.
21668  This command must occur exactly once.
21669 \end_layout
21670
21671 \begin_layout Description
21672 \begin_inset Flex Code
21673 status collapsed
21674
21675 \begin_layout Plain Layout
21676 HelpText
21677 \begin_inset space ~
21678 \end_inset
21679
21680 <text>
21681 \begin_inset space ~
21682 \end_inset
21683
21684 HelpTextEnd
21685 \end_layout
21686
21687 \end_inset
21688
21689  The help text that is used in the External dialog.
21690  Provide enough information to explain to the user just what the template
21691  can provide him with.
21692  This command must occur exactly once.
21693 \end_layout
21694
21695 \begin_layout Description
21696 \begin_inset Flex Code
21697 status collapsed
21698
21699 \begin_layout Plain Layout
21700 InputFormat
21701 \begin_inset space ~
21702 \end_inset
21703
21704 <format>
21705 \end_layout
21706
21707 \end_inset
21708
21709  The file format of the original file.
21710  This must be the name of a format that is known to LyX (see section
21711 \begin_inset space ~
21712 \end_inset
21713
21714
21715 \begin_inset CommandInset ref
21716 LatexCommand ref
21717 reference "sec:Formats"
21718
21719 \end_inset
21720
21721 ).
21722  Use 
21723 \begin_inset Quotes eld
21724 \end_inset
21725
21726
21727 \begin_inset Flex Code
21728 status collapsed
21729
21730 \begin_layout Plain Layout
21731 *
21732 \end_layout
21733
21734 \end_inset
21735
21736
21737 \begin_inset Quotes erd
21738 \end_inset
21739
21740  if the template can handle original files of more than one format.
21741  LyX will attempt to interrogate the file itself in order to deduce its
21742  format in this case.
21743  This command must occur exactly once.
21744 \end_layout
21745
21746 \begin_layout Description
21747 \begin_inset Flex Code
21748 status collapsed
21749
21750 \begin_layout Plain Layout
21751 Template
21752 \begin_inset space ~
21753 \end_inset
21754
21755 <id>
21756 \end_layout
21757
21758 \end_inset
21759
21760  A unique name for the template.
21761  It must not contain substitution macros (see below).
21762 \end_layout
21763
21764 \begin_layout Description
21765 \begin_inset Flex Code
21766 status collapsed
21767
21768 \begin_layout Plain Layout
21769 Transform
21770 \begin_inset space ~
21771 \end_inset
21772
21773 Rotate|Resize|Clip|Extra
21774 \end_layout
21775
21776 \end_inset
21777
21778  This command specifies which transformations are supported by this template.
21779  It may occur zero or more times.
21780  This command enables the corresponding tabs in the external dialog.
21781  Each 
21782 \begin_inset Flex Code
21783 status collapsed
21784
21785 \begin_layout Plain Layout
21786 Transform
21787 \end_layout
21788
21789 \end_inset
21790
21791  command must have either a corresponding 
21792 \begin_inset Flex Code
21793 status collapsed
21794
21795 \begin_layout Plain Layout
21796 TransformCommand
21797 \end_layout
21798
21799 \end_inset
21800
21801  or a 
21802 \begin_inset Flex Code
21803 status collapsed
21804
21805 \begin_layout Plain Layout
21806 TransformOption
21807 \end_layout
21808
21809 \end_inset
21810
21811  command in the 
21812 \begin_inset Flex Code
21813 status collapsed
21814
21815 \begin_layout Plain Layout
21816 Format
21817 \end_layout
21818
21819 \end_inset
21820
21821  section.
21822  Otherwise the transformation will not be supported by that format.
21823 \end_layout
21824
21825 \begin_layout Subsection
21826 The Format section
21827 \end_layout
21828
21829 \begin_layout Description
21830 \begin_inset Flex Code
21831 status collapsed
21832
21833 \begin_layout Plain Layout
21834 Format
21835 \begin_inset space ~
21836 \end_inset
21837
21838 LaTeX|PDFLaTeX|PlainText|DocBook
21839 \end_layout
21840
21841 \end_inset
21842
21843  The primary document file format that this format definition is for.
21844  Not every template has a sensible representation in all document file formats.
21845  Please define nevertheless a 
21846 \begin_inset Flex Code
21847 status collapsed
21848
21849 \begin_layout Plain Layout
21850 Format
21851 \end_layout
21852
21853 \end_inset
21854
21855  section for all templates.
21856  Use a dummy text when no representation is available.
21857  Then you can at least see a reference to the external material in the exported
21858  document.
21859 \end_layout
21860
21861 \begin_layout Description
21862 \begin_inset Flex Code
21863 status collapsed
21864
21865 \begin_layout Plain Layout
21866 Option
21867 \begin_inset space ~
21868 \end_inset
21869
21870 <name>
21871 \begin_inset space ~
21872 \end_inset
21873
21874 <value>
21875 \end_layout
21876
21877 \end_inset
21878
21879  This command defines an additional macro 
21880 \begin_inset Flex Code
21881 status collapsed
21882
21883 \begin_layout Plain Layout
21884 $$<name>
21885 \end_layout
21886
21887 \end_inset
21888
21889  for substitution in 
21890 \begin_inset Flex Code
21891 status collapsed
21892
21893 \begin_layout Plain Layout
21894 Product
21895 \end_layout
21896
21897 \end_inset
21898
21899 .
21900  
21901 \begin_inset Flex Code
21902 status collapsed
21903
21904 \begin_layout Plain Layout
21905 <value>
21906 \end_layout
21907
21908 \end_inset
21909
21910  itself may contain substitution macros.
21911  The advantage over using 
21912 \begin_inset Flex Code
21913 status collapsed
21914
21915 \begin_layout Plain Layout
21916 <value>
21917 \end_layout
21918
21919 \end_inset
21920
21921  directly in 
21922 \begin_inset Flex Code
21923 status collapsed
21924
21925 \begin_layout Plain Layout
21926 Product
21927 \end_layout
21928
21929 \end_inset
21930
21931  is that the substituted value of 
21932 \begin_inset Flex Code
21933 status collapsed
21934
21935 \begin_layout Plain Layout
21936 $$<name>
21937 \end_layout
21938
21939 \end_inset
21940
21941  is sanitized so that it is a valid optional argument in the document format.
21942  This command may occur zero or more times.
21943 \end_layout
21944
21945 \begin_layout Description
21946 \begin_inset Flex Code
21947 status collapsed
21948
21949 \begin_layout Plain Layout
21950 Product
21951 \begin_inset space ~
21952 \end_inset
21953
21954 <text>
21955 \end_layout
21956
21957 \end_inset
21958
21959  The text that is inserted in the exported document.
21960  This is actually the most important command and can be quite complex.
21961  This command must occur exactly once.
21962 \end_layout
21963
21964 \begin_layout Description
21965 \begin_inset Flex Code
21966 status collapsed
21967
21968 \begin_layout Plain Layout
21969 Preamble
21970 \begin_inset space ~
21971 \end_inset
21972
21973 <name>
21974 \end_layout
21975
21976 \end_inset
21977
21978  This command specifies a preamble snippet that will be included in the
21979  LaTeX preamble.
21980  It has to be defined using 
21981 \begin_inset Flex Code
21982 status collapsed
21983
21984 \begin_layout Plain Layout
21985 PreambleDef
21986 \end_layout
21987
21988 \end_inset
21989
21990  \SpecialChar \ldots{}
21991  
21992 \begin_inset Flex Code
21993 status collapsed
21994
21995 \begin_layout Plain Layout
21996 PreambleDefEnd
21997 \end_layout
21998
21999 \end_inset
22000
22001 .
22002  This command may occur zero or more times.
22003 \end_layout
22004
22005 \begin_layout Description
22006 \begin_inset Flex Code
22007 status collapsed
22008
22009 \begin_layout Plain Layout
22010 ReferencedFile
22011 \begin_inset space ~
22012 \end_inset
22013
22014 <format>
22015 \begin_inset space ~
22016 \end_inset
22017
22018 <filename>
22019 \end_layout
22020
22021 \end_inset
22022
22023  This command denotes files that are created by the conversion process and
22024  are needed for a particular export format.
22025  If the filename is relative, it is interpreted relative to the master document.
22026  This command may be given zero or more times.
22027 \end_layout
22028
22029 \begin_layout Description
22030 \begin_inset Flex Code
22031 status collapsed
22032
22033 \begin_layout Plain Layout
22034 Requirement
22035 \begin_inset space ~
22036 \end_inset
22037
22038 <package>
22039 \end_layout
22040
22041 \end_inset
22042
22043  The name of a required LaTeX package.
22044  The package is included via 
22045 \begin_inset Flex Code
22046 status collapsed
22047
22048 \begin_layout Plain Layout
22049
22050 \backslash
22051 usepackage{}
22052 \end_layout
22053
22054 \end_inset
22055
22056  in the LaTeX preamble.
22057  This command may occur zero or more times.
22058 \end_layout
22059
22060 \begin_layout Description
22061 \begin_inset Flex Code
22062 status collapsed
22063
22064 \begin_layout Plain Layout
22065 TransformCommand
22066 \begin_inset space ~
22067 \end_inset
22068
22069 Rotate
22070 \begin_inset space ~
22071 \end_inset
22072
22073 RotationLatexCommand
22074 \end_layout
22075
22076 \end_inset
22077
22078  This command specifies that the built in LaTeX command should be used for
22079  rotation.
22080  This command may occur once or not at all.
22081 \end_layout
22082
22083 \begin_layout Description
22084 \begin_inset Flex Code
22085 status collapsed
22086
22087 \begin_layout Plain Layout
22088 TransformCommand
22089 \begin_inset space ~
22090 \end_inset
22091
22092 Resize
22093 \begin_inset space ~
22094 \end_inset
22095
22096 ResizeLatexCommand
22097 \end_layout
22098
22099 \end_inset
22100
22101  This command specifies that the built in LaTeX command should be used for
22102  resizing.
22103  This command may occur once or not at all.
22104 \end_layout
22105
22106 \begin_layout Description
22107 \begin_inset Flex Code
22108 status collapsed
22109
22110 \begin_layout Plain Layout
22111 TransformOption
22112 \begin_inset space ~
22113 \end_inset
22114
22115 Rotate
22116 \begin_inset space ~
22117 \end_inset
22118
22119 RotationLatexOption
22120 \end_layout
22121
22122 \end_inset
22123
22124  This command specifies that rotation is done via an optional argument.
22125  This command may occur once or not at all.
22126 \end_layout
22127
22128 \begin_layout Description
22129 \begin_inset Flex Code
22130 status collapsed
22131
22132 \begin_layout Plain Layout
22133 TransformOption
22134 \begin_inset space ~
22135 \end_inset
22136
22137 Resize
22138 \begin_inset space ~
22139 \end_inset
22140
22141 ResizeLatexOption
22142 \end_layout
22143
22144 \end_inset
22145
22146  This command specifies that resizing is done via an optional argument.
22147  This command may occur once or not at all.
22148 \end_layout
22149
22150 \begin_layout Description
22151 \begin_inset Flex Code
22152 status collapsed
22153
22154 \begin_layout Plain Layout
22155 TransformOption
22156 \begin_inset space ~
22157 \end_inset
22158
22159 Clip
22160 \begin_inset space ~
22161 \end_inset
22162
22163 ClipLatexOption
22164 \end_layout
22165
22166 \end_inset
22167
22168  This command specifies that clipping is done via an optional argument.
22169  This command may occur once or not at all.
22170 \end_layout
22171
22172 \begin_layout Description
22173 \begin_inset Flex Code
22174 status collapsed
22175
22176 \begin_layout Plain Layout
22177 TransformOption
22178 \begin_inset space ~
22179 \end_inset
22180
22181 Extra
22182 \begin_inset space ~
22183 \end_inset
22184
22185 ExtraLatexOption
22186 \end_layout
22187
22188 \end_inset
22189
22190  This command specifies that an extra optional argument is used.
22191  This command may occur once or not at all.
22192 \end_layout
22193
22194 \begin_layout Description
22195 \begin_inset Flex Code
22196 status collapsed
22197
22198 \begin_layout Plain Layout
22199 UpdateFormat
22200 \begin_inset space ~
22201 \end_inset
22202
22203 <format>
22204 \end_layout
22205
22206 \end_inset
22207
22208  The file format of the converted file.
22209  This must be the name of a format that is known to LyX (see the 
22210 \begin_inset Flex MenuItem
22211 status collapsed
22212
22213 \begin_layout Plain Layout
22214
22215 \bar under
22216 T
22217 \bar default
22218 ools\SpecialChar \menuseparator
22219
22220 \bar under
22221 P
22222 \bar default
22223 references\SpecialChar \menuseparator
22224 File Handling\SpecialChar \menuseparator
22225 File Format
22226 \end_layout
22227
22228 \end_inset
22229
22230  dialog).
22231  This command must occur exactly once.
22232 \end_layout
22233
22234 \begin_layout Description
22235 \begin_inset Flex Code
22236 status collapsed
22237
22238 \begin_layout Plain Layout
22239 UpdateResult
22240 \begin_inset space ~
22241 \end_inset
22242
22243 <filename>
22244 \end_layout
22245
22246 \end_inset
22247
22248  The file name of the converted file.
22249  The file name must be absolute.
22250  This command must occur exactly once.
22251 \end_layout
22252
22253 \begin_layout Subsection
22254 Preamble definitions
22255 \end_layout
22256
22257 \begin_layout Standard
22258 The external template configuration file may contain additional preamble
22259  definitions enclosed by 
22260 \begin_inset Flex Code
22261 status collapsed
22262
22263 \begin_layout Plain Layout
22264 PreambleDef
22265 \end_layout
22266
22267 \end_inset
22268
22269  \SpecialChar \ldots{}
22270  
22271 \begin_inset Flex Code
22272 status collapsed
22273
22274 \begin_layout Plain Layout
22275 PreambleDefEnd
22276 \end_layout
22277
22278 \end_inset
22279
22280 .
22281  They can be used by the templates in the 
22282 \begin_inset Flex Code
22283 status collapsed
22284
22285 \begin_layout Plain Layout
22286 Format
22287 \end_layout
22288
22289 \end_inset
22290
22291  section.
22292 \end_layout
22293
22294 \begin_layout Section
22295 The substitution mechanism
22296 \end_layout
22297
22298 \begin_layout Standard
22299 When the external material facility invokes an external program, it is done
22300  on the basis of a command defined in the template configuration file.
22301  These commands can contain various macros that are expanded before execution.
22302  Execution always take place in the directory of the containing document.
22303 \end_layout
22304
22305 \begin_layout Standard
22306 Also, whenever external material is to be displayed, the name will be produced
22307  by the substitution mechanism, and most other commands in the template
22308  definition support substitution as well.
22309 \end_layout
22310
22311 \begin_layout Standard
22312 The available macros are the following:
22313 \end_layout
22314
22315 \begin_layout Description
22316 \begin_inset Flex Code
22317 status collapsed
22318
22319 \begin_layout Plain Layout
22320 $$AbsOrRelPathMaster
22321 \end_layout
22322
22323 \end_inset
22324
22325  The file path, absolute or relative to the master LyX document.
22326 \end_layout
22327
22328 \begin_layout Description
22329 \begin_inset Flex Code
22330 status collapsed
22331
22332 \begin_layout Plain Layout
22333 $$AbsOrRelPathParent
22334 \end_layout
22335
22336 \end_inset
22337
22338  The file path, absolute or relative to the LyX document.
22339 \end_layout
22340
22341 \begin_layout Description
22342 \begin_inset Flex Code
22343 status collapsed
22344
22345 \begin_layout Plain Layout
22346 $$AbsPath
22347 \end_layout
22348
22349 \end_inset
22350
22351  The absolute file path.
22352 \end_layout
22353
22354 \begin_layout Description
22355 \begin_inset Flex Code
22356 status collapsed
22357
22358 \begin_layout Plain Layout
22359 $$Basename
22360 \end_layout
22361
22362 \end_inset
22363
22364  The filename without path and without the extension.
22365 \end_layout
22366
22367 \begin_layout Description
22368 \begin_inset Flex Code
22369 status collapsed
22370
22371 \begin_layout Plain Layout
22372 $$Contents(
22373 \begin_inset Quotes eld
22374 \end_inset
22375
22376 filename.ext
22377 \begin_inset Quotes erd
22378 \end_inset
22379
22380 )
22381 \end_layout
22382
22383 \end_inset
22384
22385  This macro will expand to the contents of the file with the name 
22386 \begin_inset Flex Code
22387 status collapsed
22388
22389 \begin_layout Plain Layout
22390 filename.ext
22391 \end_layout
22392
22393 \end_inset
22394
22395 .
22396 \end_layout
22397
22398 \begin_layout Description
22399 \begin_inset Flex Code
22400 status collapsed
22401
22402 \begin_layout Plain Layout
22403 $$Extension
22404 \end_layout
22405
22406 \end_inset
22407
22408  The file extension (including the dot).
22409 \end_layout
22410
22411 \begin_layout Description
22412 \begin_inset Flex Code
22413 status collapsed
22414
22415 \begin_layout Plain Layout
22416 $$FName
22417 \end_layout
22418
22419 \end_inset
22420
22421  The filename of the file specified in the external material dialog.
22422  This is either an absolute name, or it is relative to the LyX document.
22423 \end_layout
22424
22425 \begin_layout Description
22426 \begin_inset Flex Code
22427 status collapsed
22428
22429 \begin_layout Plain Layout
22430 $$FPath
22431 \end_layout
22432
22433 \end_inset
22434
22435  The path part of 
22436 \begin_inset Flex Code
22437 status collapsed
22438
22439 \begin_layout Plain Layout
22440 $$FName
22441 \end_layout
22442
22443 \end_inset
22444
22445  (absolute name or relative to the LyX document).
22446 \end_layout
22447
22448 \begin_layout Description
22449 \begin_inset Flex Code
22450 status collapsed
22451
22452 \begin_layout Plain Layout
22453 $$RelPathMaster
22454 \end_layout
22455
22456 \end_inset
22457
22458  The file path, relative to the master LyX document.
22459 \end_layout
22460
22461 \begin_layout Description
22462 \begin_inset Flex Code
22463 status collapsed
22464
22465 \begin_layout Plain Layout
22466 $$RelPathParent
22467 \end_layout
22468
22469 \end_inset
22470
22471  The file path, relative to the LyX document.
22472 \end_layout
22473
22474 \begin_layout Description
22475 \begin_inset Flex Code
22476 status collapsed
22477
22478 \begin_layout Plain Layout
22479 $$Sysdir
22480 \end_layout
22481
22482 \end_inset
22483
22484  This macro will expand to the absolute path of the system directory.
22485  This is typically used to point to the various helper scripts that are
22486  bundled with LyX.
22487 \end_layout
22488
22489 \begin_layout Description
22490 \begin_inset Flex Code
22491 status collapsed
22492
22493 \begin_layout Plain Layout
22494 $$Tempname
22495 \end_layout
22496
22497 \end_inset
22498
22499  A name and full path to a temporary file which will be automatically deleted
22500  whenever the containing document is closed, or the external material insertion
22501  deleted.
22502 \end_layout
22503
22504 \begin_layout Standard
22505 All path macros contain a trailing directory separator, so you can construct
22506  e.
22507 \begin_inset space \thinspace{}
22508 \end_inset
22509
22510 g.
22511 \begin_inset space \space{}
22512 \end_inset
22513
22514 the absolute filename with 
22515 \begin_inset Flex Code
22516 status collapsed
22517
22518 \begin_layout Plain Layout
22519 $$AbsPath$$Basename$$Extension
22520 \end_layout
22521
22522 \end_inset
22523
22524 .
22525 \end_layout
22526
22527 \begin_layout Standard
22528 The macros above are substituted in all commands unless otherwise noted.
22529  The command 
22530 \begin_inset Flex Code
22531 status collapsed
22532
22533 \begin_layout Plain Layout
22534 Product
22535 \end_layout
22536
22537 \end_inset
22538
22539  supports additionally the following substitutions if they are enabled by
22540  the 
22541 \begin_inset Flex Code
22542 status collapsed
22543
22544 \begin_layout Plain Layout
22545 Transform
22546 \end_layout
22547
22548 \end_inset
22549
22550  and 
22551 \begin_inset Flex Code
22552 status collapsed
22553
22554 \begin_layout Plain Layout
22555 TransformCommand
22556 \end_layout
22557
22558 \end_inset
22559
22560  commands:
22561 \end_layout
22562
22563 \begin_layout Description
22564 \begin_inset Flex Code
22565 status collapsed
22566
22567 \begin_layout Plain Layout
22568 $$ResizeFront
22569 \end_layout
22570
22571 \end_inset
22572
22573  The front part of the resize command.
22574 \end_layout
22575
22576 \begin_layout Description
22577 \begin_inset Flex Code
22578 status collapsed
22579
22580 \begin_layout Plain Layout
22581 $$ResizeBack
22582 \end_layout
22583
22584 \end_inset
22585
22586  The back part of the resize command.
22587 \end_layout
22588
22589 \begin_layout Description
22590 \begin_inset Flex Code
22591 status collapsed
22592
22593 \begin_layout Plain Layout
22594 $$RotateFront
22595 \end_layout
22596
22597 \end_inset
22598
22599  The front part of the rotation command.
22600 \end_layout
22601
22602 \begin_layout Description
22603 \begin_inset Flex Code
22604 status collapsed
22605
22606 \begin_layout Plain Layout
22607 $$RotateBack
22608 \end_layout
22609
22610 \end_inset
22611
22612  The back part of the rotation command.
22613 \end_layout
22614
22615 \begin_layout Standard
22616 The value string of the 
22617 \begin_inset Flex Code
22618 status collapsed
22619
22620 \begin_layout Plain Layout
22621 Option
22622 \end_layout
22623
22624 \end_inset
22625
22626  command supports additionally the following substitutions if they are enabled
22627  by the 
22628 \begin_inset Flex Code
22629 status collapsed
22630
22631 \begin_layout Plain Layout
22632 Transform
22633 \end_layout
22634
22635 \end_inset
22636
22637  and 
22638 \begin_inset Flex Code
22639 status collapsed
22640
22641 \begin_layout Plain Layout
22642 TransformOption
22643 \end_layout
22644
22645 \end_inset
22646
22647  commands:
22648 \end_layout
22649
22650 \begin_layout Description
22651 \begin_inset Flex Code
22652 status collapsed
22653
22654 \begin_layout Plain Layout
22655 $$Clip
22656 \end_layout
22657
22658 \end_inset
22659
22660  The clip option.
22661 \end_layout
22662
22663 \begin_layout Description
22664 \begin_inset Flex Code
22665 status collapsed
22666
22667 \begin_layout Plain Layout
22668 $$Extra
22669 \end_layout
22670
22671 \end_inset
22672
22673  The extra option.
22674 \end_layout
22675
22676 \begin_layout Description
22677 \begin_inset Flex Code
22678 status collapsed
22679
22680 \begin_layout Plain Layout
22681 $$Resize
22682 \end_layout
22683
22684 \end_inset
22685
22686  The resize option.
22687 \end_layout
22688
22689 \begin_layout Description
22690 \begin_inset Flex Code
22691 status collapsed
22692
22693 \begin_layout Plain Layout
22694 $$Rotate
22695 \end_layout
22696
22697 \end_inset
22698
22699  The rotation option.
22700 \end_layout
22701
22702 \begin_layout Standard
22703 You may ask why there are so many path macros.
22704  There are mainly two reasons:
22705 \end_layout
22706
22707 \begin_layout Enumerate
22708 Relative and absolute file names should remain relative or absolute, respectivel
22709 y.
22710  Users may have reasons to prefer either form.
22711  Relative names are useful for portable documents that should work on different
22712  machines, for example.
22713  Absolute names may be required by some programs.
22714 \end_layout
22715
22716 \begin_layout Enumerate
22717 LaTeX treats relative file names differently than LyX and other programs
22718  in nested included files.
22719  For LyX, a relative file name is always relative to the document that contains
22720  the file name.
22721  For LaTeX, it is always relative to the master document.
22722  These two definitions are identical if you have only one document, but
22723  differ if you have a master document that includes part documents.
22724  That means that relative filenames must be transformed when presented to
22725  LaTeX.
22726  Fortunately LyX does this automatically for you if you choose the right
22727  macros.
22728 \end_layout
22729
22730 \begin_layout Standard
22731 So which path macro should be used in new template definitions? The rule
22732  is not difficult:
22733 \end_layout
22734
22735 \begin_layout Itemize
22736 Use 
22737 \begin_inset Flex Code
22738 status collapsed
22739
22740 \begin_layout Plain Layout
22741 $$AbsPath
22742 \end_layout
22743
22744 \end_inset
22745
22746  if an absolute path is required.
22747 \end_layout
22748
22749 \begin_layout Itemize
22750 Use 
22751 \begin_inset Flex Code
22752 status collapsed
22753
22754 \begin_layout Plain Layout
22755 $$AbsOrRelPathMaster
22756 \end_layout
22757
22758 \end_inset
22759
22760  if the substituted string is some kind of LaTeX input.
22761 \end_layout
22762
22763 \begin_layout Itemize
22764 Else use 
22765 \begin_inset Flex Code
22766 status collapsed
22767
22768 \begin_layout Plain Layout
22769 $$AbsOrRelPathParent
22770 \end_layout
22771
22772 \end_inset
22773
22774  in order to preserve the user's choice.
22775 \end_layout
22776
22777 \begin_layout Standard
22778 There are special cases where this rule does not work and e.
22779 \begin_inset space \thinspace{}
22780 \end_inset
22781
22782 g.
22783 \begin_inset space \space{}
22784 \end_inset
22785
22786 relative names are needed, but normally it will work just fine.
22787  One example for such a case is the command 
22788 \begin_inset Flex Code
22789 status collapsed
22790
22791 \begin_layout Plain Layout
22792 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22793 \end_layout
22794
22795 \end_inset
22796
22797  in the XFig template above: We can't use the absolute name because the
22798  copier for 
22799 \begin_inset Flex Code
22800 status collapsed
22801
22802 \begin_layout Plain Layout
22803 .pstex_t
22804 \end_layout
22805
22806 \end_inset
22807
22808  files needs the relative name in order to rewrite the file content.
22809 \end_layout
22810
22811 \begin_layout Section
22812 Security discussion
22813 \begin_inset CommandInset label
22814 LatexCommand label
22815 name "sec:Security-discussion"
22816
22817 \end_inset
22818
22819
22820 \end_layout
22821
22822 \begin_layout Standard
22823 The external material feature interfaces with a lot of external programs
22824  and does so automatically, so we have to consider the security implications
22825  of this.
22826  In particular, since you have the option of including your own filenames
22827  and/or parameter strings and those are expanded into a command, it seems
22828  that it would be possible to create a malicious document which executes
22829  arbitrary commands when a user views or prints the document.
22830  This is something we definitely want to avoid.
22831 \end_layout
22832
22833 \begin_layout Standard
22834 However, since the external program commands are specified in the template
22835  configuration file only, there are no security issues if LyX is properly
22836  configured with safe templates only.
22837  This is so because the external programs are invoked with the 
22838 \begin_inset Flex Code
22839 status collapsed
22840
22841 \begin_layout Plain Layout
22842 execvp
22843 \end_layout
22844
22845 \end_inset
22846
22847 -system call rather than the 
22848 \begin_inset Flex Code
22849 status collapsed
22850
22851 \begin_layout Plain Layout
22852 system
22853 \end_layout
22854
22855 \end_inset
22856
22857  system-call, so it's not possible to execute arbitrary commands from the
22858  filename or parameter section via the shell.
22859 \end_layout
22860
22861 \begin_layout Standard
22862 This also implies that you are restricted in what command strings you can
22863  use in the external material templates.
22864  In particular, pipes and redirection are not readily available.
22865  This has to be so if LyX should remain safe.
22866  If you want to use some of the shell features, you should write a safe
22867  script to do this in a controlled manner, and then invoke the script from
22868  the command string.
22869  
22870 \end_layout
22871
22872 \begin_layout Standard
22873 It is possible to design a template that interacts directly with the shell,
22874  but since this would allow a malicious user to execute arbitrary commands
22875  by writing clever filenames and/or parameters, we generally recommend that
22876  you only use safe scripts that work with the 
22877 \begin_inset Flex Code
22878 status collapsed
22879
22880 \begin_layout Plain Layout
22881 execvp
22882 \end_layout
22883
22884 \end_inset
22885
22886  system call in a controlled manner.
22887  Of course, for use in a controlled environment, it can be tempting to just
22888  fall back to use ordinary shell scripts.
22889  If you do so, be aware that you 
22890 \emph on
22891 will
22892 \emph default
22893  provide an easily exploitable security hole in your system.
22894  Of course it stands to reason that such unsafe templates will never be
22895  included in the standard LyX distribution, although we do encourage people
22896  to submit new templates in the open source tradition.
22897  But LyX as shipped from the official distribution channels will never have
22898  unsafe templates.
22899 \end_layout
22900
22901 \begin_layout Standard
22902 Including external material provides a lot of power, and you have to be
22903  careful not to introduce security hazards with this power.
22904  A subtle error in a single line in an innocent looking script can open
22905  the door to huge security problems.
22906  So if you do not fully understand the issues, we recommend that you consult
22907  a knowledgeable security professional or the LyX development team if you
22908  have any questions about whether a given template is safe or not.
22909  And do this before you use it in an uncontrolled environment.
22910 \end_layout
22911
22912 \end_body
22913 \end_document