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