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