]> git.lyx.org Git - lyx.git/blob - lib/doc/Customization.lyx
Forgot to document ResetArgs
[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 \change_inserted -712698321 1353693134
13357
13358 \end_layout
13359
13360 \begin_layout Description
13361
13362 \change_inserted -712698321 1353693371
13363 \begin_inset Flex Code
13364 status collapsed
13365
13366 \begin_layout Plain Layout
13367
13368 \change_inserted -712698321 1353693146
13369 ResetArgs
13370 \change_unchanged
13371
13372 \end_layout
13373
13374 \end_inset
13375
13376  [
13377 \begin_inset Flex Code
13378 status collapsed
13379
13380 \begin_layout Plain Layout
13381
13382 \change_inserted -712698321 1353693235
13383
13384 \emph on
13385 0
13386 \end_layout
13387
13388 \end_inset
13389
13390 ,
13391 \begin_inset Flex Code
13392 status collapsed
13393
13394 \begin_layout Plain Layout
13395
13396 \change_inserted -712698321 1353693235
13397 1
13398 \end_layout
13399
13400 \end_inset
13401
13402 ] Resets the LaTeX arguments of this style (as defined via the 
13403 \begin_inset Flex Code
13404 status collapsed
13405
13406 \begin_layout Plain Layout
13407
13408 \change_inserted -712698321 1353693371
13409 Argument
13410 \change_unchanged
13411
13412 \end_layout
13413
13414 \end_inset
13415
13416  tag).
13417  This is useful if you have copied a style via 
13418 \begin_inset Flex Code
13419 status collapsed
13420
13421 \begin_layout Plain Layout
13422
13423 \change_inserted -712698321 1353693302
13424 CopyStyle
13425 \change_unchanged
13426
13427 \end_layout
13428
13429 \end_inset
13430
13431 , but you do not want to inherit its (required and optional) arguments.
13432 \change_unchanged
13433
13434 \end_layout
13435
13436 \begin_layout Description
13437 \begin_inset Flex Code
13438 status collapsed
13439
13440 \begin_layout Plain Layout
13441 RightMargin
13442 \end_layout
13443
13444 \end_inset
13445
13446  [
13447 \begin_inset Flex Code
13448 status collapsed
13449
13450 \begin_layout Plain Layout
13451 string=""
13452 \end_layout
13453
13454 \end_inset
13455
13456 ] Similar to 
13457 \begin_inset Flex Code
13458 status collapsed
13459
13460 \begin_layout Plain Layout
13461 LeftMargin
13462 \end_layout
13463
13464 \end_inset
13465
13466 .
13467 \end_layout
13468
13469 \begin_layout Description
13470 \begin_inset Flex Code
13471 status collapsed
13472
13473 \begin_layout Plain Layout
13474 Spacing
13475 \end_layout
13476
13477 \end_inset
13478
13479  [
13480 \begin_inset Flex Code
13481 status collapsed
13482
13483 \begin_layout Plain Layout
13484
13485 \emph on
13486 single
13487 \emph default
13488 , onehalf, double, other
13489 \end_layout
13490
13491 \end_inset
13492
13493  
13494 \emph on
13495 value
13496 \emph default
13497 ] This defines what the default spacing should be in the style.
13498  The arguments 
13499 \begin_inset Flex Code
13500 status collapsed
13501
13502 \begin_layout Plain Layout
13503 single
13504 \end_layout
13505
13506 \end_inset
13507
13508
13509 \begin_inset Flex Code
13510 status collapsed
13511
13512 \begin_layout Plain Layout
13513 onehalf
13514 \end_layout
13515
13516 \end_inset
13517
13518  and 
13519 \begin_inset Flex Code
13520 status collapsed
13521
13522 \begin_layout Plain Layout
13523 double
13524 \end_layout
13525
13526 \end_inset
13527
13528  correspond respectively to a multiplier value of 1, 1.25 and 1.667.
13529  If you specify the argument 
13530 \begin_inset Flex Code
13531 status collapsed
13532
13533 \begin_layout Plain Layout
13534 other
13535 \end_layout
13536
13537 \end_inset
13538
13539 , then you should also provide a numerical argument which will be the actual
13540  multiplier value.
13541  Note that, contrary to other parameters, 
13542 \begin_inset Flex Code
13543 status collapsed
13544
13545 \begin_layout Plain Layout
13546 Spacing
13547 \end_layout
13548
13549 \end_inset
13550
13551  implies the generation of specific LaTeX code, using the package 
13552 \family roman
13553
13554 \begin_inset Flex Code
13555 status collapsed
13556
13557 \begin_layout Plain Layout
13558 setspace.sty
13559 \end_layout
13560
13561 \end_inset
13562
13563 .
13564 \end_layout
13565
13566 \begin_layout Description
13567 \begin_inset Flex Code
13568 status collapsed
13569
13570 \begin_layout Plain Layout
13571 Spellcheck
13572 \end_layout
13573
13574 \end_inset
13575
13576  [
13577 \begin_inset Flex Code
13578 status collapsed
13579
13580 \begin_layout Plain Layout
13581 0
13582 \end_layout
13583
13584 \end_inset
13585
13586 ,
13587 \begin_inset Flex Code
13588 status collapsed
13589
13590 \begin_layout Plain Layout
13591
13592 \emph on
13593 1
13594 \end_layout
13595
13596 \end_inset
13597
13598 ] Spellcheck paragraphs of this style.
13599  Default is true.
13600 \end_layout
13601
13602 \begin_layout Description
13603 \begin_inset Flex Code
13604 status collapsed
13605
13606 \begin_layout Plain Layout
13607 TextFont
13608 \end_layout
13609
13610 \end_inset
13611
13612  The font used for the text body .
13613  See section 
13614 \begin_inset CommandInset ref
13615 LatexCommand ref
13616 reference "sub:Font-description"
13617
13618 \end_inset
13619
13620 .
13621 \end_layout
13622
13623 \begin_layout Description
13624 \begin_inset Flex Code
13625 status collapsed
13626
13627 \begin_layout Plain Layout
13628 TocLevel
13629 \end_layout
13630
13631 \end_inset
13632
13633
13634 \series medium
13635  
13636 \begin_inset Flex Code
13637 status collapsed
13638
13639 \begin_layout Plain Layout
13640
13641 \series medium
13642 [int]
13643 \end_layout
13644
13645 \end_inset
13646
13647
13648 \series default
13649  The level of the style in the table of contents.
13650  This is used for automatic numbering of section headings.
13651 \end_layout
13652
13653 \begin_layout Description
13654 \begin_inset Flex Code
13655 status collapsed
13656
13657 \begin_layout Plain Layout
13658 TopSep
13659 \end_layout
13660
13661 \end_inset
13662
13663  [
13664 \begin_inset Flex Code
13665 status collapsed
13666
13667 \begin_layout Plain Layout
13668 float=0
13669 \end_layout
13670
13671 \end_inset
13672
13673 ] The vertical space with which the very first of a chain of paragraphs
13674  with this style is separated from the previous paragraph.
13675  If the previous paragraph has another style, the separations are not simply
13676  added, but the maximum is taken.
13677 \end_layout
13678
13679 \begin_layout Subsection
13680 \begin_inset CommandInset label
13681 LatexCommand label
13682 name "sub:I18n"
13683
13684 \end_inset
13685
13686 Internationalization of Paragraph Styles
13687 \end_layout
13688
13689 \begin_layout Standard
13690 LyX has long supported internationalization of layout information, but,
13691  until version 2.0, this applied only to the user interface and not to, say,
13692  PDF output.
13693  Thus, French authors were forced to resort to ugly hacks if they wanted
13694  `
13695 \lang french
13696 Théorème
13697 \lang english
13698  1' instead of `Theorem 1'.
13699  Thanks to Georg Baum, that is no longer the case.
13700 \end_layout
13701
13702 \begin_layout Standard
13703 If a 
13704 \begin_inset Flex Code
13705 status collapsed
13706
13707 \begin_layout Plain Layout
13708 Style
13709 \end_layout
13710
13711 \end_inset
13712
13713  defines text that is to appear in the typeset document, it may use 
13714 \begin_inset Flex Code
13715 status collapsed
13716
13717 \begin_layout Plain Layout
13718 LangPreamble
13719 \end_layout
13720
13721 \end_inset
13722
13723  and 
13724 \begin_inset Flex Code
13725 status collapsed
13726
13727 \begin_layout Plain Layout
13728 BabelPreamble
13729 \end_layout
13730
13731 \end_inset
13732
13733  to support non-English and even multi-language documents correctly.
13734  The following excerpt (from the 
13735 \begin_inset Flex Code
13736 status collapsed
13737
13738 \begin_layout Plain Layout
13739 theorems-ams.inc
13740 \end_layout
13741
13742 \end_inset
13743
13744  file) shows how this works:
13745 \end_layout
13746
13747 \begin_layout LyX-Code
13748 Preamble
13749 \end_layout
13750
13751 \begin_deeper
13752 \begin_layout LyX-Code
13753   
13754 \backslash
13755 theoremstyle{remark}
13756 \end_layout
13757
13758 \begin_layout LyX-Code
13759   
13760 \backslash
13761 newtheorem{claim}[thm]{
13762 \backslash
13763 protect
13764 \backslash
13765 claimname}
13766 \end_layout
13767
13768 \begin_layout LyX-Code
13769 EndPreamble
13770 \end_layout
13771
13772 \begin_layout LyX-Code
13773 LangPreamble
13774 \end_layout
13775
13776 \begin_layout LyX-Code
13777   
13778 \backslash
13779 providecommand{
13780 \backslash
13781 claimname}{_(Claim)}
13782 \end_layout
13783
13784 \begin_layout LyX-Code
13785 EndLangPreamble
13786 \end_layout
13787
13788 \begin_layout LyX-Code
13789 BabelPreamble
13790 \end_layout
13791
13792 \begin_layout LyX-Code
13793     
13794 \backslash
13795 addto
13796 \backslash
13797 captions$$lang{
13798 \backslash
13799 renewcommand{
13800 \backslash
13801 claimname}{_(Claim)}}
13802 \end_layout
13803
13804 \begin_layout LyX-Code
13805 EndBabelPreamble
13806 \end_layout
13807
13808 \end_deeper
13809 \begin_layout Standard
13810 In principle, any legal LaTeX may appear in the 
13811 \begin_inset Flex Code
13812 status collapsed
13813
13814 \begin_layout Plain Layout
13815 LangPreamble
13816 \end_layout
13817
13818 \end_inset
13819
13820  and 
13821 \begin_inset Flex Code
13822 status collapsed
13823
13824 \begin_layout Plain Layout
13825 BabelPreamble
13826 \end_layout
13827
13828 \end_inset
13829
13830  tags, but in practice they will typically look as they do here.
13831  The key to correct translation of the typeset text is the definition of
13832  the LaTeX command 
13833 \begin_inset Flex Code
13834 status collapsed
13835
13836 \begin_layout Plain Layout
13837
13838 \backslash
13839 claimname
13840 \end_layout
13841
13842 \end_inset
13843
13844  and its use in 
13845 \begin_inset Flex Code
13846 status collapsed
13847
13848 \begin_layout Plain Layout
13849
13850 \backslash
13851 newtheorem
13852 \end_layout
13853
13854 \end_inset
13855
13856 .
13857  
13858 \end_layout
13859
13860 \begin_layout Standard
13861 The 
13862 \begin_inset Flex Code
13863 status collapsed
13864
13865 \begin_layout Plain Layout
13866 LangPreamble
13867 \end_layout
13868
13869 \end_inset
13870
13871  tag provides for internationalization based upon the overall language of
13872  the document.
13873  The contents of the tag will be included in the preamble, just as with
13874  the 
13875 \begin_inset Flex Code
13876 status collapsed
13877
13878 \begin_layout Plain Layout
13879 Preamble
13880 \end_layout
13881
13882 \end_inset
13883
13884  tag.
13885  What makes it special is the use of the 
13886 \begin_inset Quotes eld
13887 \end_inset
13888
13889 function
13890 \begin_inset Quotes erd
13891 \end_inset
13892
13893  
13894 \begin_inset Flex Code
13895 status collapsed
13896
13897 \begin_layout Plain Layout
13898 _()
13899 \end_layout
13900
13901 \end_inset
13902
13903 , which will be replaced, when LyX produces LaTeX output, with the translation
13904  of its argument into the document language.
13905 \end_layout
13906
13907 \begin_layout Standard
13908 The 
13909 \begin_inset Flex Code
13910 status collapsed
13911
13912 \begin_layout Plain Layout
13913 BabelPreamble
13914 \end_layout
13915
13916 \end_inset
13917
13918  tag is more complex, since it is meant to provide support for multi-language
13919  documents and so offers an interface to the 
13920 \begin_inset Flex Code
13921 status collapsed
13922
13923 \begin_layout Plain Layout
13924 babel
13925 \end_layout
13926
13927 \end_inset
13928
13929  package.
13930  Its contents will be added to the preamble once for each language that
13931  appears in the document.
13932  In this case, the argument to 
13933 \begin_inset Flex Code
13934 status collapsed
13935
13936 \begin_layout Plain Layout
13937 _()
13938 \end_layout
13939
13940 \end_inset
13941
13942  will be replaced with its translation into the language in question; the
13943  expression 
13944 \begin_inset Flex Code
13945 status collapsed
13946
13947 \begin_layout Plain Layout
13948 $$lang
13949 \end_layout
13950
13951 \end_inset
13952
13953  is replaced by the language name (as used by the babel package).
13954 \end_layout
13955
13956 \begin_layout Standard
13957 A German document that also included a French section would thus have the
13958  following in the preamble:
13959 \end_layout
13960
13961 \begin_layout LyX-Code
13962
13963 \backslash
13964 addto
13965 \backslash
13966 captionsfrench{
13967 \backslash
13968 renewcommand{
13969 \backslash
13970 claimname}{Affirmation}}   
13971 \backslash
13972 addto
13973 \backslash
13974 captionsngerman{
13975 \backslash
13976 renewcommand{
13977 \backslash
13978 claimname}{Behauptung}}   
13979 \backslash
13980 providecommand{
13981 \backslash
13982 claimname}{Behauptung}
13983 \end_layout
13984
13985 \begin_layout Standard
13986 LaTeX and 
13987 \begin_inset Flex Code
13988 status collapsed
13989
13990 \begin_layout Plain Layout
13991 babel
13992 \end_layout
13993
13994 \end_inset
13995
13996  will then conspire to produce the correct text in the output.
13997 \end_layout
13998
13999 \begin_layout Standard
14000 One important point to note here is that the translations are provided by
14001  LyX itself, through the 
14002 \change_inserted -195340706 1334775793
14003 file 
14004 \begin_inset Flex Code
14005 status collapsed
14006
14007 \begin_layout Plain Layout
14008
14009 \change_inserted -195340706 1334775793
14010 layouttranslations
14011 \end_layout
14012
14013 \end_inset
14014
14015
14016 \change_deleted -195340706 1334775793
14017 same mechanism it uses for internationalization of the user interface
14018 \change_unchanged
14019 .
14020  This means, in effect, that 
14021 \begin_inset Flex Code
14022 status collapsed
14023
14024 \begin_layout Plain Layout
14025 LangPreamble
14026 \end_layout
14027
14028 \end_inset
14029
14030  and 
14031 \begin_inset Flex Code
14032 status collapsed
14033
14034 \begin_layout Plain Layout
14035 BabelPreamble
14036 \end_layout
14037
14038 \end_inset
14039
14040  are really only of use in layout files that are provided with LyX, since
14041  text entered in user-created layout files will not be seen by LyX's internation
14042 alization routines
14043 \change_inserted -195340706 1334775793
14044  unless the 
14045 \begin_inset Flex Code
14046 status collapsed
14047
14048 \begin_layout Plain Layout
14049
14050 \change_inserted -195340706 1334775793
14051 layouttranslations
14052 \end_layout
14053
14054 \end_inset
14055
14056  file is modified accordingly
14057 \change_unchanged
14058 .
14059  That said, however, any layout created with the intention that it will
14060  be included with LyX should use these tags where appropriate.
14061
14062 \change_inserted -195340706 1334775793
14063  Please note that the paragraph style translations provided by LyX will
14064  never change with a minor update (e.g.
14065  from version 2.1.x to 2.1.y).
14066  It is however quite likely that a major update (e.g.
14067  from 2.0.x to 2.1.y) will introduce new translations or corrections.
14068 \change_unchanged
14069
14070 \end_layout
14071
14072 \begin_layout Subsection
14073 Floats
14074 \begin_inset CommandInset label
14075 LatexCommand label
14076 name "sub:Floats"
14077
14078 \end_inset
14079
14080
14081 \end_layout
14082
14083 \begin_layout Standard
14084 Since version 1.3.0 of LyX, it is has been both possible and necessary to
14085  define the floats (
14086 \begin_inset Flex MenuItem
14087 status collapsed
14088
14089 \begin_layout Plain Layout
14090 figure
14091 \end_layout
14092
14093 \end_inset
14094
14095
14096 \begin_inset Flex MenuItem
14097 status collapsed
14098
14099 \begin_layout Plain Layout
14100 table
14101 \end_layout
14102
14103 \end_inset
14104
14105 , \SpecialChar \ldots{}
14106 ) in the text class itself.
14107  Standard floats are included in the file 
14108 \begin_inset Flex Code
14109 status collapsed
14110
14111 \begin_layout Plain Layout
14112 stdfloats.inc
14113 \end_layout
14114
14115 \end_inset
14116
14117 , so you may have to do no more than add
14118 \end_layout
14119
14120 \begin_layout LyX-Code
14121 Input stdfloats.inc
14122 \end_layout
14123
14124 \begin_layout Standard
14125 to your layout file.
14126  If you want to implement a text class that proposes some other float types
14127  (like the AGU class bundled with LyX), the information below will hopefully
14128  help you:
14129 \end_layout
14130
14131 \begin_layout Description
14132 \begin_inset Flex Code
14133 status collapsed
14134
14135 \begin_layout Plain Layout
14136 Extension
14137 \end_layout
14138
14139 \end_inset
14140
14141  [
14142 \begin_inset Flex Code
14143 status collapsed
14144
14145 \begin_layout Plain Layout
14146 string
14147 \end_layout
14148
14149 \end_inset
14150
14151 =
14152 \begin_inset Quotes erd
14153 \end_inset
14154
14155
14156 \begin_inset Quotes erd
14157 \end_inset
14158
14159 ] The file name extension of an auxiliary file for the list of figures (or
14160  whatever).
14161  LaTeX writes the captions to this file.
14162 \end_layout
14163
14164 \begin_layout Description
14165 \begin_inset Flex Code
14166 status collapsed
14167
14168 \begin_layout Plain Layout
14169 GuiName
14170 \end_layout
14171
14172 \end_inset
14173
14174  [
14175 \begin_inset Flex Code
14176 status collapsed
14177
14178 \begin_layout Plain Layout
14179 string
14180 \end_layout
14181
14182 \end_inset
14183
14184 =
14185 \begin_inset Quotes erd
14186 \end_inset
14187
14188
14189 \begin_inset Quotes erd
14190 \end_inset
14191
14192 ] The string that will be used in the menus and also for the caption.
14193  This is translated to the current language if babel is used.
14194 \end_layout
14195
14196 \begin_layout Description
14197 \begin_inset Flex Code
14198 status collapsed
14199
14200 \begin_layout Plain Layout
14201 HTML*
14202 \end_layout
14203
14204 \end_inset
14205
14206  These are used for XHTML output.
14207  See 
14208 \begin_inset CommandInset ref
14209 LatexCommand ref
14210 reference "sec:Tags-for-XHTML"
14211
14212 \end_inset
14213
14214 .
14215 \end_layout
14216
14217 \begin_layout Description
14218 \begin_inset Flex Code
14219 status collapsed
14220
14221 \begin_layout Plain Layout
14222 IsPredefined
14223 \end_layout
14224
14225 \end_inset
14226
14227  [
14228 \emph on
14229
14230 \begin_inset Flex Code
14231 status open
14232
14233 \begin_layout Plain Layout
14234 0
14235 \end_layout
14236
14237 \end_inset
14238
14239
14240 \emph default
14241
14242 \begin_inset Flex Code
14243 status collapsed
14244
14245 \begin_layout Plain Layout
14246 1
14247 \end_layout
14248
14249 \end_inset
14250
14251 ] Indicates whether the float is already defined in the document class or
14252  if we instead need to load 
14253 \begin_inset Flex Code
14254 status collapsed
14255
14256 \begin_layout Plain Layout
14257 float.sty
14258 \end_layout
14259
14260 \end_inset
14261
14262  and use what it provides to define it on-the-fly.
14263  The default is 
14264 \begin_inset Flex Code
14265 status collapsed
14266
14267 \begin_layout Plain Layout
14268 0
14269 \end_layout
14270
14271 \end_inset
14272
14273 , which means: use 
14274 \begin_inset Flex Code
14275 status collapsed
14276
14277 \begin_layout Plain Layout
14278 float.sty
14279 \end_layout
14280
14281 \end_inset
14282
14283 .
14284  It should be set to 
14285 \begin_inset Flex Code
14286 status collapsed
14287
14288 \begin_layout Plain Layout
14289 1
14290 \end_layout
14291
14292 \end_inset
14293
14294  if the float is already defined by the LaTeX document class.
14295 \end_layout
14296
14297 \begin_layout Description
14298 \begin_inset Flex Code
14299 status collapsed
14300
14301 \begin_layout Plain Layout
14302 ListCommand
14303 \end_layout
14304
14305 \end_inset
14306
14307  [
14308 \begin_inset Flex Code
14309 status collapsed
14310
14311 \begin_layout Plain Layout
14312 string
14313 \end_layout
14314
14315 \end_inset
14316
14317 =
14318 \begin_inset Quotes erd
14319 \end_inset
14320
14321
14322 \begin_inset Quotes erd
14323 \end_inset
14324
14325 ] The command used to generate a list of floats of this type; the leading
14326  `
14327 \backslash
14328 ' should be omitted.
14329  This 
14330 \emph on
14331 must
14332 \emph default
14333  be given if 
14334 \begin_inset Flex Code
14335 status collapsed
14336
14337 \begin_layout Plain Layout
14338 UsesFloatPkg
14339 \end_layout
14340
14341 \end_inset
14342
14343  is false, since there is no standard way to generate this command.
14344  It is ignored if 
14345 \begin_inset Flex Code
14346 status collapsed
14347
14348 \begin_layout Plain Layout
14349 UsesFloatPkg
14350 \end_layout
14351
14352 \end_inset
14353
14354  is true, since in that case there is a standard way to define the command.
14355 \end_layout
14356
14357 \begin_layout Description
14358 \begin_inset Flex Code
14359 status collapsed
14360
14361 \begin_layout Plain Layout
14362 ListName
14363 \end_layout
14364
14365 \end_inset
14366
14367  [
14368 \begin_inset Flex Code
14369 status collapsed
14370
14371 \begin_layout Plain Layout
14372 string
14373 \end_layout
14374
14375 \end_inset
14376
14377 =
14378 \begin_inset Quotes erd
14379 \end_inset
14380
14381
14382 \begin_inset Quotes erd
14383 \end_inset
14384
14385 ] A title for a list of floats of this kind (list of figures, tables, or
14386  whatever).
14387  It is used for the screen label within LyX; it is passed to LaTeX for use
14388  as the title there; and it is used as the title in XHTML output.
14389  It will be translated to the document language.
14390 \end_layout
14391
14392 \begin_layout Description
14393 \begin_inset Flex Code
14394 status collapsed
14395
14396 \begin_layout Plain Layout
14397 NumberWithin
14398 \end_layout
14399
14400 \end_inset
14401
14402  [
14403 \begin_inset Flex Code
14404 status collapsed
14405
14406 \begin_layout Plain Layout
14407 string
14408 \end_layout
14409
14410 \end_inset
14411
14412 =
14413 \begin_inset Quotes erd
14414 \end_inset
14415
14416
14417 \begin_inset Quotes erd
14418 \end_inset
14419
14420 ] This (optional) argument determines whether floats of this class will
14421  be numbered within some sectional unit of the document.
14422  For example, if within is equal to 
14423 \begin_inset Flex Code
14424 status collapsed
14425
14426 \begin_layout Plain Layout
14427 chapter
14428 \end_layout
14429
14430 \end_inset
14431
14432 , the floats will be numbered within chapters.
14433  
14434 \end_layout
14435
14436 \begin_layout Description
14437 \begin_inset Flex Code
14438 status collapsed
14439
14440 \begin_layout Plain Layout
14441 Placement
14442 \end_layout
14443
14444 \end_inset
14445
14446  [
14447 \begin_inset Flex Code
14448 status collapsed
14449
14450 \begin_layout Plain Layout
14451 string
14452 \end_layout
14453
14454 \end_inset
14455
14456 =
14457 \begin_inset Quotes erd
14458 \end_inset
14459
14460
14461 \begin_inset Quotes erd
14462 \end_inset
14463
14464 ] The default placement for the given class of floats.
14465  The string should be as in standard LaTeX: 
14466 \begin_inset Flex Code
14467 status collapsed
14468
14469 \begin_layout Plain Layout
14470 t
14471 \end_layout
14472
14473 \end_inset
14474
14475
14476 \begin_inset Flex Code
14477 status collapsed
14478
14479 \begin_layout Plain Layout
14480 b
14481 \end_layout
14482
14483 \end_inset
14484
14485
14486 \begin_inset Flex Code
14487 status collapsed
14488
14489 \begin_layout Plain Layout
14490 p
14491 \end_layout
14492
14493 \end_inset
14494
14495  and 
14496 \begin_inset Flex Code
14497 status collapsed
14498
14499 \begin_layout Plain Layout
14500 h
14501 \end_layout
14502
14503 \end_inset
14504
14505  for top, bottom, page, and here, respectively.
14506 \begin_inset Foot
14507 status collapsed
14508
14509 \begin_layout Plain Layout
14510 Note that the order of these letters in the string is irrelevant, like in
14511  LaTeX.
14512 \end_layout
14513
14514 \end_inset
14515
14516  On top of that there is a new type, 
14517 \begin_inset Flex Code
14518 status collapsed
14519
14520 \begin_layout Plain Layout
14521 H
14522 \end_layout
14523
14524 \end_inset
14525
14526 , which does not really correspond to a float, since it means: put it 
14527 \begin_inset Quotes eld
14528 \end_inset
14529
14530 here
14531 \begin_inset Quotes erd
14532 \end_inset
14533
14534  and nowhere else.
14535  Note however that the 
14536 \begin_inset Flex Code
14537 status collapsed
14538
14539 \begin_layout Plain Layout
14540 H
14541 \end_layout
14542
14543 \end_inset
14544
14545  specifier is special and, because of implementation details, cannot be
14546  used in non-built in float types.
14547  If you do not understand what this means, just use 
14548 \begin_inset Quotes eld
14549 \end_inset
14550
14551
14552 \begin_inset Flex Code
14553 status collapsed
14554
14555 \begin_layout Plain Layout
14556 tbp
14557 \end_layout
14558
14559 \end_inset
14560
14561
14562 \begin_inset Quotes erd
14563 \end_inset
14564
14565 .
14566 \end_layout
14567
14568 \begin_layout Description
14569 \begin_inset Flex Code
14570 status collapsed
14571
14572 \begin_layout Plain Layout
14573 RefPrefix
14574 \end_layout
14575
14576 \end_inset
14577
14578  [
14579 \begin_inset Flex Code
14580 status collapsed
14581
14582 \begin_layout Plain Layout
14583 string
14584 \end_layout
14585
14586 \end_inset
14587
14588 ] The prefix to use when creating labels referring to floats of this type.
14589  This allows the use of formatted references.
14590  Note that you can remove any 
14591 \begin_inset Flex Code
14592 status collapsed
14593
14594 \begin_layout Plain Layout
14595 RefPrefix
14596 \end_layout
14597
14598 \end_inset
14599
14600  set by a copied style by using the special value 
14601 \begin_inset Quotes eld
14602 \end_inset
14603
14604 OFF
14605 \begin_inset Quotes erd
14606 \end_inset
14607
14608 , which must be all caps.
14609 \end_layout
14610
14611 \begin_layout Description
14612 \begin_inset Flex Code
14613 status collapsed
14614
14615 \begin_layout Plain Layout
14616 Style
14617 \end_layout
14618
14619 \end_inset
14620
14621  [
14622 \begin_inset Flex Code
14623 status collapsed
14624
14625 \begin_layout Plain Layout
14626 string
14627 \end_layout
14628
14629 \end_inset
14630
14631 =
14632 \begin_inset Quotes erd
14633 \end_inset
14634
14635
14636 \begin_inset Quotes erd
14637 \end_inset
14638
14639 ] The style used when defining the float using 
14640 \begin_inset Flex Code
14641 status collapsed
14642
14643 \begin_layout Plain Layout
14644
14645 \backslash
14646 newfloat
14647 \end_layout
14648
14649 \end_inset
14650
14651 .
14652 \end_layout
14653
14654 \begin_layout Description
14655 \begin_inset Flex Code
14656 status collapsed
14657
14658 \begin_layout Plain Layout
14659 Type
14660 \end_layout
14661
14662 \end_inset
14663
14664  [
14665 \begin_inset Flex Code
14666 status collapsed
14667
14668 \begin_layout Plain Layout
14669 string
14670 \end_layout
14671
14672 \end_inset
14673
14674 =
14675 \begin_inset Quotes erd
14676 \end_inset
14677
14678
14679 \begin_inset Quotes erd
14680 \end_inset
14681
14682 ] The 
14683 \begin_inset Quotes eld
14684 \end_inset
14685
14686 type
14687 \begin_inset Quotes erd
14688 \end_inset
14689
14690  of the new class of floats, like program or algorithm.
14691  After the appropriate 
14692 \begin_inset Flex Code
14693 status collapsed
14694
14695 \begin_layout Plain Layout
14696
14697 \backslash
14698 newfloat
14699 \end_layout
14700
14701 \end_inset
14702
14703 , commands such as 
14704 \begin_inset Flex Code
14705 status collapsed
14706
14707 \begin_layout Plain Layout
14708
14709 \backslash
14710 begin{program}
14711 \end_layout
14712
14713 \end_inset
14714
14715  or 
14716 \begin_inset Flex Code
14717 status collapsed
14718
14719 \begin_layout Plain Layout
14720
14721 \backslash
14722 end{algorithm*}
14723 \end_layout
14724
14725 \end_inset
14726
14727  will be available.
14728 \end_layout
14729
14730 \begin_layout Description
14731 \begin_inset Flex Code
14732 status collapsed
14733
14734 \begin_layout Plain Layout
14735 UsesFloatPkg
14736 \end_layout
14737
14738 \end_inset
14739
14740  [
14741 \begin_inset Flex Code
14742 status open
14743
14744 \begin_layout Plain Layout
14745 0
14746 \end_layout
14747
14748 \end_inset
14749
14750
14751 \begin_inset Flex Code
14752 status collapsed
14753
14754 \begin_layout Plain Layout
14755
14756 \emph on
14757 1
14758 \end_layout
14759
14760 \end_inset
14761
14762 ] Tells us whether this float is defined using the facilities provided by
14763  
14764 \begin_inset Flex Code
14765 status collapsed
14766
14767 \begin_layout Plain Layout
14768 float.sty
14769 \end_layout
14770
14771 \end_inset
14772
14773 , either by the class file or a package, or on-the-fly by LyX itself.
14774 \end_layout
14775
14776 \begin_layout Standard
14777 Note that defining a float with type 
14778 \begin_inset Flex Code
14779 status collapsed
14780
14781 \begin_layout Plain Layout
14782
14783 \emph on
14784 type
14785 \end_layout
14786
14787 \end_inset
14788
14789  automatically defines the corresponding counter with name 
14790 \begin_inset Flex Code
14791 status collapsed
14792
14793 \begin_layout Plain Layout
14794
14795 \emph on
14796 type
14797 \end_layout
14798
14799 \end_inset
14800
14801 .
14802 \end_layout
14803
14804 \begin_layout Subsection
14805 Flex insets and InsetLayout
14806 \begin_inset CommandInset label
14807 LatexCommand label
14808 name "sub:Flex-insets-and"
14809
14810 \end_inset
14811
14812
14813 \end_layout
14814
14815 \begin_layout Standard
14816 LyX has supported character styles since version 1.4.0; as of version 1.6.0,
14817  these are called Flex insets.
14818  
14819 \end_layout
14820
14821 \begin_layout Standard
14822 Flex insets come in three different kinds: 
14823 \end_layout
14824
14825 \begin_layout Itemize
14826 character style (
14827 \begin_inset Flex Code
14828 status collapsed
14829
14830 \begin_layout Plain Layout
14831 CharStyle
14832 \end_layout
14833
14834 \end_inset
14835
14836 ): These define semantic markup corresponding to such LaTeX commands as
14837  
14838 \begin_inset Flex Code
14839 status collapsed
14840
14841 \begin_layout Plain Layout
14842
14843 \backslash
14844 noun
14845 \end_layout
14846
14847 \end_inset
14848
14849  and 
14850 \begin_inset Flex Code
14851 status collapsed
14852
14853 \begin_layout Plain Layout
14854
14855 \backslash
14856 code
14857 \end_layout
14858
14859 \end_inset
14860
14861 .
14862 \end_layout
14863
14864 \begin_layout Itemize
14865 user custom (
14866 \begin_inset Flex Code
14867 status collapsed
14868
14869 \begin_layout Plain Layout
14870 Custom
14871 \end_layout
14872
14873 \end_inset
14874
14875 ): These can be used to define custom collapsible insets, similar to TeX
14876  code, footnote, and the like.
14877  An obvious example is an endnote inset, which is defined in the 
14878 \begin_inset Flex Code
14879 status collapsed
14880
14881 \begin_layout Plain Layout
14882 endnote
14883 \end_layout
14884
14885 \end_inset
14886
14887  module.
14888 \end_layout
14889
14890 \begin_layout Itemize
14891 XML elements (
14892 \begin_inset Flex Code
14893 status collapsed
14894
14895 \begin_layout Plain Layout
14896 Element
14897 \end_layout
14898
14899 \end_inset
14900
14901 ): For use with DocBook classes.
14902 \end_layout
14903
14904 \begin_layout Standard
14905 Flex insets are defined using the 
14906 \begin_inset Flex Code
14907 status collapsed
14908
14909 \begin_layout Plain Layout
14910 InsetLayout
14911 \end_layout
14912
14913 \end_inset
14914
14915  tag, which shall be explained in a moment.
14916 \end_layout
14917
14918 \begin_layout Standard
14919 The 
14920 \begin_inset Flex Code
14921 status collapsed
14922
14923 \begin_layout Plain Layout
14924 InsetLayout
14925 \end_layout
14926
14927 \end_inset
14928
14929  tag also serves another function: It can be used to customize the general
14930  layout of many different types of insets.
14931  Currently, 
14932 \begin_inset Flex Code
14933 status collapsed
14934
14935 \begin_layout Plain Layout
14936 InsetLayout
14937 \end_layout
14938
14939 \end_inset
14940
14941  can be used to customize the layout parameters for footnotes, marginal
14942  notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
14943  boxes, tables, algorithms, URLs, and optional arguments, as well as to
14944  define Flex insets.
14945 \end_layout
14946
14947 \begin_layout Standard
14948 The 
14949 \begin_inset Flex Code
14950 status collapsed
14951
14952 \begin_layout Plain Layout
14953 InsetLayout
14954 \end_layout
14955
14956 \end_inset
14957
14958  definition must begin with a line of the form:
14959 \end_layout
14960
14961 \begin_layout LyX-Code
14962 InsetLayout <Type>
14963 \end_layout
14964
14965 \begin_layout Standard
14966 Here 
14967 \begin_inset Flex Code
14968 status collapsed
14969
14970 \begin_layout Plain Layout
14971 <Type>
14972 \end_layout
14973
14974 \end_inset
14975
14976  indicates the inset whose layout is being defined, and here there are 
14977 \change_inserted 5863208 1334489266
14978 three
14979 \change_deleted 5863208 1334489267
14980 two
14981 \change_unchanged
14982  cases.
14983 \end_layout
14984
14985 \begin_layout Enumerate
14986 The layout for a pre-existing inset is being modified.
14987  In this case, can be 
14988 \begin_inset Flex Code
14989 status collapsed
14990
14991 \begin_layout Plain Layout
14992 <Type>
14993 \end_layout
14994
14995 \end_inset
14996
14997  any one of the following: 
14998 \begin_inset Flex Code
14999 status collapsed
15000
15001 \begin_layout Plain Layout
15002 Algorithm
15003 \end_layout
15004
15005 \end_inset
15006
15007
15008 \begin_inset Flex Code
15009 status collapsed
15010
15011 \begin_layout Plain Layout
15012 Branch
15013 \end_layout
15014
15015 \end_inset
15016
15017
15018 \begin_inset Flex Code
15019 status collapsed
15020
15021 \begin_layout Plain Layout
15022 Box
15023 \end_layout
15024
15025 \end_inset
15026
15027
15028 \begin_inset Flex Code
15029 status collapsed
15030
15031 \begin_layout Plain Layout
15032 Box:shaded
15033 \end_layout
15034
15035 \end_inset
15036
15037
15038 \begin_inset Flex Code
15039 status collapsed
15040
15041 \begin_layout Plain Layout
15042 ERT
15043 \end_layout
15044
15045 \end_inset
15046
15047
15048 \begin_inset Flex Code
15049 status collapsed
15050
15051 \begin_layout Plain Layout
15052 Figure
15053 \end_layout
15054
15055 \end_inset
15056
15057
15058 \begin_inset Flex Code
15059 status collapsed
15060
15061 \begin_layout Plain Layout
15062 Foot
15063 \end_layout
15064
15065 \end_inset
15066
15067
15068 \begin_inset Flex Code
15069 status collapsed
15070
15071 \begin_layout Plain Layout
15072 Index
15073 \end_layout
15074
15075 \end_inset
15076
15077
15078 \begin_inset Flex Code
15079 status collapsed
15080
15081 \begin_layout Plain Layout
15082 Info
15083 \end_layout
15084
15085 \end_inset
15086
15087
15088 \begin_inset Flex Code
15089 status collapsed
15090
15091 \begin_layout Plain Layout
15092 Info:menu
15093 \end_layout
15094
15095 \end_inset
15096
15097
15098 \begin_inset Flex Code
15099 status collapsed
15100
15101 \begin_layout Plain Layout
15102 Info:shortcut
15103 \end_layout
15104
15105 \end_inset
15106
15107
15108 \begin_inset Flex Code
15109 status collapsed
15110
15111 \begin_layout Plain Layout
15112 Info:shortcuts
15113 \end_layout
15114
15115 \end_inset
15116
15117
15118 \begin_inset Flex Code
15119 status collapsed
15120
15121 \begin_layout Plain Layout
15122 Listings
15123 \end_layout
15124
15125 \end_inset
15126
15127
15128 \begin_inset Flex Code
15129 status collapsed
15130
15131 \begin_layout Plain Layout
15132 Marginal
15133 \end_layout
15134
15135 \end_inset
15136
15137
15138 \begin_inset Flex Code
15139 status collapsed
15140
15141 \begin_layout Plain Layout
15142 Note:Comment
15143 \end_layout
15144
15145 \end_inset
15146
15147
15148 \begin_inset Flex Code
15149 status collapsed
15150
15151 \begin_layout Plain Layout
15152 Note:Note
15153 \end_layout
15154
15155 \end_inset
15156
15157
15158 \begin_inset Flex Code
15159 status collapsed
15160
15161 \begin_layout Plain Layout
15162 Note:Greyedout
15163 \end_layout
15164
15165 \end_inset
15166
15167
15168 \begin_inset Flex Code
15169 status collapsed
15170
15171 \begin_layout Plain Layout
15172 OptArg
15173 \end_layout
15174
15175 \end_inset
15176
15177
15178 \begin_inset Flex Code
15179 status collapsed
15180
15181 \begin_layout Plain Layout
15182 Table
15183 \end_layout
15184
15185 \end_inset
15186
15187 , or 
15188 \begin_inset Flex Code
15189 status collapsed
15190
15191 \begin_layout Plain Layout
15192 URL
15193 \end_layout
15194
15195 \end_inset
15196
15197 .
15198 \end_layout
15199
15200 \begin_layout Enumerate
15201 The layout for a Flex inset is being defined.
15202  In this case, 
15203 \begin_inset Flex Code
15204 status collapsed
15205
15206 \begin_layout Plain Layout
15207 <Type>
15208 \end_layout
15209
15210 \end_inset
15211
15212  must be of the form 
15213 \begin_inset Quotes eld
15214 \end_inset
15215
15216
15217 \begin_inset Flex Code
15218 status collapsed
15219
15220 \begin_layout Plain Layout
15221 Flex:<name>
15222 \end_layout
15223
15224 \end_inset
15225
15226
15227 \begin_inset Quotes erd
15228 \end_inset
15229
15230 , where 
15231 \begin_inset Flex Code
15232 status collapsed
15233
15234 \begin_layout Plain Layout
15235 name
15236 \end_layout
15237
15238 \end_inset
15239
15240  may be be any valid identifier not used by a pre-existing Flex inset.
15241  The identifier may include spaces, but in that case the whole thing must
15242  be wrapped in quotes.
15243  Note that the definition of a flex inset 
15244 \emph on
15245 must 
15246 \emph default
15247 also include a 
15248 \begin_inset Flex Code
15249 status collapsed
15250
15251 \begin_layout Plain Layout
15252 LyXType
15253 \end_layout
15254
15255 \end_inset
15256
15257  entry, declaring which type of inset it defines.
15258 \change_inserted 5863208 1334489312
15259
15260 \end_layout
15261
15262 \begin_layout Enumerate
15263
15264 \change_inserted 5863208 1334492248
15265 The layout for user specific branch is being defined.
15266  In this case, 
15267 \begin_inset Flex Code
15268 status collapsed
15269
15270 \begin_layout Plain Layout
15271
15272 \change_inserted 5863208 1334489384
15273 <Type>
15274 \end_layout
15275
15276 \end_inset
15277
15278  must be of the form 
15279 \begin_inset Quotes eld
15280 \end_inset
15281
15282
15283 \begin_inset Flex Code
15284 status collapsed
15285
15286 \begin_layout Plain Layout
15287
15288 \change_inserted 5863208 1334489392
15289 Branch:<name>
15290 \end_layout
15291
15292 \end_inset
15293
15294
15295 \begin_inset Quotes erd
15296 \end_inset
15297
15298 , where 
15299 \begin_inset Flex Code
15300 status collapsed
15301
15302 \begin_layout Plain Layout
15303
15304 \change_inserted 5863208 1334489384
15305 name
15306 \end_layout
15307
15308 \end_inset
15309
15310  may be be any valid identifier of branch defined in user's document.
15311  The identifier may include spaces, but in that case the whole thing must
15312  be wrapped in quotes.
15313  The main purpose of this feature is to allow LaTeX wrapping around specific
15314  branches as user needs.
15315 \change_unchanged
15316
15317 \end_layout
15318
15319 \begin_layout Standard
15320 The 
15321 \begin_inset Flex Code
15322 status collapsed
15323
15324 \begin_layout Plain Layout
15325 InsetLayout
15326 \end_layout
15327
15328 \end_inset
15329
15330  definition can contain the following entries:
15331 \end_layout
15332
15333 \begin_layout Description
15334
15335 \change_inserted -712698321 1353681390
15336 \begin_inset Flex Code
15337 status collapsed
15338
15339 \begin_layout Plain Layout
15340
15341 \change_inserted -712698321 1353681344
15342 Argument
15343 \end_layout
15344
15345 \end_inset
15346
15347  [
15348 \begin_inset Flex Code
15349 status collapsed
15350
15351 \begin_layout Plain Layout
15352
15353 \change_inserted -712698321 1353681344
15354 int
15355 \end_layout
15356
15357 \end_inset
15358
15359 ] Defines argument number <int> of a command\SpecialChar \slash{}
15360 environment associated with
15361  the current layout.
15362  The definition must end with 
15363 \begin_inset Flex Code
15364 status collapsed
15365
15366 \begin_layout Plain Layout
15367
15368 \change_inserted -712698321 1353681344
15369 EndArgument
15370 \end_layout
15371
15372 \end_inset
15373
15374 .
15375  See section
15376 \begin_inset space ~
15377 \end_inset
15378
15379
15380 \begin_inset CommandInset ref
15381 LatexCommand ref
15382 reference "sub:Paragraph-Styles"
15383
15384 \end_inset
15385
15386  for details.
15387 \end_layout
15388
15389 \begin_layout Description
15390
15391 \change_inserted -195340706 1333913893
15392 \begin_inset Flex Code
15393 status collapsed
15394
15395 \begin_layout Plain Layout
15396 BabelPreamble
15397 \end_layout
15398
15399 \end_inset
15400
15401  Preamble for changing languages.
15402  See section
15403 \begin_inset space ~
15404 \end_inset
15405
15406
15407 \begin_inset CommandInset ref
15408 LatexCommand ref
15409 reference "sub:I18n"
15410
15411 \end_inset
15412
15413 .
15414 \end_layout
15415
15416 \begin_layout Description
15417 \begin_inset Flex Code
15418 status collapsed
15419
15420 \begin_layout Plain Layout
15421 BgColor
15422 \end_layout
15423
15424 \end_inset
15425
15426  The color for the inset's background.
15427  The valid colors are defined in 
15428 \begin_inset Flex Code
15429 status collapsed
15430
15431 \begin_layout Plain Layout
15432 src/ColorCode.h
15433 \end_layout
15434
15435 \end_inset
15436
15437 .
15438 \end_layout
15439
15440 \begin_layout Description
15441 \begin_inset Flex Code
15442 status collapsed
15443
15444 \begin_layout Plain Layout
15445 ContentAsLabel
15446 \end_layout
15447
15448 \end_inset
15449
15450  [
15451 \begin_inset Flex Code
15452 status collapsed
15453
15454 \begin_layout Plain Layout
15455
15456 \emph on
15457 0
15458 \end_layout
15459
15460 \end_inset
15461
15462 ,
15463 \begin_inset Flex Code
15464 status collapsed
15465
15466 \begin_layout Plain Layout
15467 1
15468 \end_layout
15469
15470 \end_inset
15471
15472 ] Whether to use the content of the inset as the label, when the inset is
15473  closed.
15474  Default is false.
15475 \end_layout
15476
15477 \begin_layout Description
15478 \begin_inset Flex Code
15479 status collapsed
15480
15481 \begin_layout Plain Layout
15482 CopyStyle
15483 \end_layout
15484
15485 \end_inset
15486
15487  
15488 \begin_inset Flex Code
15489 status collapsed
15490
15491 \begin_layout Plain Layout
15492 [string]
15493 \end_layout
15494
15495 \end_inset
15496
15497  Copies all the features of an existing style into the current one.
15498  
15499 \end_layout
15500
15501 \begin_layout Description
15502 \begin_inset Flex Code
15503 status collapsed
15504
15505 \begin_layout Plain Layout
15506 CustomPars
15507 \end_layout
15508
15509 \end_inset
15510
15511  [
15512 \begin_inset Flex Code
15513 status collapsed
15514
15515 \begin_layout Plain Layout
15516
15517 \emph on
15518 0
15519 \end_layout
15520
15521 \end_inset
15522
15523 ,
15524 \begin_inset Flex Code
15525 status collapsed
15526
15527 \begin_layout Plain Layout
15528 1
15529 \end_layout
15530
15531 \end_inset
15532
15533 ] Indicates whether the user may employ the Paragraph Settings dialog to
15534  customize the paragraph.
15535 \end_layout
15536
15537 \begin_layout Description
15538 \begin_inset Flex Code
15539 status collapsed
15540
15541 \begin_layout Plain Layout
15542 Decoration
15543 \end_layout
15544
15545 \end_inset
15546
15547  can be 
15548 \begin_inset Flex Code
15549 status collapsed
15550
15551 \begin_layout Plain Layout
15552 Classic
15553 \end_layout
15554
15555 \end_inset
15556
15557
15558 \begin_inset Flex Code
15559 status collapsed
15560
15561 \begin_layout Plain Layout
15562 Minimalistic
15563 \end_layout
15564
15565 \end_inset
15566
15567 , or 
15568 \begin_inset Flex Code
15569 status collapsed
15570
15571 \begin_layout Plain Layout
15572 Conglomerate
15573 \end_layout
15574
15575 \end_inset
15576
15577 , describing the rendering style used for the inset's frame and buttons.
15578  Footnotes generally use 
15579 \begin_inset Flex Code
15580 status collapsed
15581
15582 \begin_layout Plain Layout
15583 Classic
15584 \end_layout
15585
15586 \end_inset
15587
15588 , ERT insets generally 
15589 \begin_inset Flex Code
15590 status collapsed
15591
15592 \begin_layout Plain Layout
15593 Minimalistic
15594 \end_layout
15595
15596 \end_inset
15597
15598 , and character styles 
15599 \begin_inset Flex Code
15600 status collapsed
15601
15602 \begin_layout Plain Layout
15603 Conglomerate
15604 \end_layout
15605
15606 \end_inset
15607
15608 .
15609 \end_layout
15610
15611 \begin_layout Description
15612 \begin_inset Flex Code
15613 status collapsed
15614
15615 \begin_layout Plain Layout
15616 Display
15617 \end_layout
15618
15619 \end_inset
15620
15621  [
15622 \begin_inset Flex Code
15623 status collapsed
15624
15625 \begin_layout Plain Layout
15626 0
15627 \end_layout
15628
15629 \end_inset
15630
15631 ,
15632 \begin_inset Flex Code
15633 status collapsed
15634
15635 \begin_layout Plain Layout
15636
15637 \emph on
15638 1
15639 \end_layout
15640
15641 \end_inset
15642
15643 ] Only useful if 
15644 \begin_inset Flex Code
15645 status collapsed
15646
15647 \begin_layout Plain Layout
15648 LatexType
15649 \end_layout
15650
15651 \end_inset
15652
15653  is 
15654 \begin_inset Flex Code
15655 status collapsed
15656
15657 \begin_layout Plain Layout
15658 Environment
15659 \end_layout
15660
15661 \end_inset
15662
15663 .
15664  Indicates whether the environment will stand on its own in LaTeX output
15665  or will appear inline with the surrounding text.
15666  If set to false, it is supposed that the LaTeX environment ignores white
15667  space (including one newline character) after the 
15668 \begin_inset Flex Code
15669 status collapsed
15670
15671 \begin_layout Plain Layout
15672
15673 \backslash
15674 begin{
15675 \emph on
15676 LatexName
15677 \emph default
15678 }
15679 \end_layout
15680
15681 \end_inset
15682
15683  and 
15684 \begin_inset Flex Code
15685 status collapsed
15686
15687 \begin_layout Plain Layout
15688
15689 \backslash
15690 end{
15691 \emph on
15692 LatexName
15693 \emph default
15694 }
15695 \end_layout
15696
15697 \end_inset
15698
15699  tags.
15700  Default is true.
15701 \end_layout
15702
15703 \begin_layout Description
15704 \begin_inset Flex Code
15705 status collapsed
15706
15707 \begin_layout Plain Layout
15708 End
15709 \end_layout
15710
15711 \end_inset
15712
15713  Required at the end of the InsetLayout declarations.
15714 \end_layout
15715
15716 \begin_layout Description
15717 \begin_inset Flex Code
15718 status collapsed
15719
15720 \begin_layout Plain Layout
15721 Font
15722 \end_layout
15723
15724 \end_inset
15725
15726  The font used for both the text body 
15727 \emph on
15728 and
15729 \emph default
15730  the label.
15731  See section
15732 \begin_inset space ~
15733 \end_inset
15734
15735
15736 \begin_inset CommandInset ref
15737 LatexCommand ref
15738 reference "sub:Font-description"
15739
15740 \end_inset
15741
15742 .
15743  Note that defining this font automatically defines the 
15744 \begin_inset Flex Code
15745 status collapsed
15746
15747 \begin_layout Plain Layout
15748 LabelFont
15749 \end_layout
15750
15751 \end_inset
15752
15753  to the same value, so define this first and define 
15754 \begin_inset Flex Code
15755 status collapsed
15756
15757 \begin_layout Plain Layout
15758 LabelFont
15759 \end_layout
15760
15761 \end_inset
15762
15763  later if you want them to be different.
15764 \end_layout
15765
15766 \begin_layout Description
15767 \begin_inset Flex Code
15768 status collapsed
15769
15770 \begin_layout Plain Layout
15771 ForceLTR
15772 \end_layout
15773
15774 \end_inset
15775
15776  Force the 
15777 \begin_inset Quotes eld
15778 \end_inset
15779
15780 latex
15781 \begin_inset Quotes erd
15782 \end_inset
15783
15784  language, leading to Left-to-Right (latin) output, e.
15785 \begin_inset space \thinspace{}
15786 \end_inset
15787
15788 g.
15789 \begin_inset space \space{}
15790 \end_inset
15791
15792 in TeX code or URL.
15793  A kludge.
15794 \end_layout
15795
15796 \begin_layout Description
15797 \begin_inset Flex Code
15798 status collapsed
15799
15800 \begin_layout Plain Layout
15801 ForcePlain
15802 \end_layout
15803
15804 \end_inset
15805
15806  [
15807 \begin_inset Flex Code
15808 status collapsed
15809
15810 \begin_layout Plain Layout
15811
15812 \emph on
15813 0
15814 \end_layout
15815
15816 \end_inset
15817
15818 ,
15819 \begin_inset Flex Code
15820 status collapsed
15821
15822 \begin_layout Plain Layout
15823 1
15824 \end_layout
15825
15826 \end_inset
15827
15828 ] Indicates whether the 
15829 \begin_inset Flex Code
15830 status collapsed
15831
15832 \begin_layout Plain Layout
15833 PlainLayout
15834 \end_layout
15835
15836 \end_inset
15837
15838  should be used or, instead, the user can change the paragraph style used
15839  in the inset.
15840  Default is false.
15841 \end_layout
15842
15843 \begin_layout Description
15844 \begin_inset Flex Code
15845 status collapsed
15846
15847 \begin_layout Plain Layout
15848 FreeSpacing
15849 \end_layout
15850
15851 \end_inset
15852
15853  [
15854 \begin_inset Flex Code
15855 status collapsed
15856
15857 \begin_layout Plain Layout
15858
15859 \emph on
15860 0
15861 \end_layout
15862
15863 \end_inset
15864
15865
15866 \begin_inset Flex Code
15867 status collapsed
15868
15869 \begin_layout Plain Layout
15870 1
15871 \end_layout
15872
15873 \end_inset
15874
15875 ] Usually LyX doesn't allow you to insert more than one space between words,
15876  since a space is considered as the separation between two words, not a
15877  character or symbol of its own.
15878  This is a very fine thing but sometimes annoying, for example, when typing
15879  program code or plain LaTeX code.
15880  For this reason, 
15881 \begin_inset Flex Code
15882 status collapsed
15883
15884 \begin_layout Plain Layout
15885 FreeSpacing
15886 \end_layout
15887
15888 \end_inset
15889
15890  can be enabled.
15891  Note that LyX will create protected blanks for the additional blanks when
15892  in another mode than LaTeX-mode.
15893  Default is false.
15894 \end_layout
15895
15896 \begin_layout Description
15897 \begin_inset Flex Code
15898 status collapsed
15899
15900 \begin_layout Plain Layout
15901 HTML*
15902 \end_layout
15903
15904 \end_inset
15905
15906  These tags control XHTML output.
15907  See section 
15908 \begin_inset CommandInset ref
15909 LatexCommand ref
15910 reference "sec:Tags-for-XHTML"
15911
15912 \end_inset
15913
15914 .
15915 \end_layout
15916
15917 \begin_layout Description
15918 \begin_inset Flex Code
15919 status collapsed
15920
15921 \begin_layout Plain Layout
15922 InToc
15923 \end_layout
15924
15925 \end_inset
15926
15927  [
15928 \begin_inset Flex Code
15929 status collapsed
15930
15931 \begin_layout Plain Layout
15932
15933 \emph on
15934 0
15935 \end_layout
15936
15937 \end_inset
15938
15939 ,
15940 \begin_inset Flex Code
15941 status collapsed
15942
15943 \begin_layout Plain Layout
15944 1
15945 \end_layout
15946
15947 \end_inset
15948
15949 ] Whether to include the contents of this inset in the strings generated
15950  for the `Outline' pane.
15951  One would not, for example, want the content of a footnote in a section
15952  header to be included in the TOC displayed in the outline, but one would
15953  normally want the content of a character style displayed.
15954  Default is false: not to include.
15955 \end_layout
15956
15957 \begin_layout Description
15958 \begin_inset Flex Code
15959 status collapsed
15960
15961 \begin_layout Plain Layout
15962 KeepEmpty
15963 \end_layout
15964
15965 \end_inset
15966
15967  [
15968 \begin_inset Flex Code
15969 status collapsed
15970
15971 \begin_layout Plain Layout
15972
15973 \emph on
15974 0
15975 \end_layout
15976
15977 \end_inset
15978
15979
15980 \begin_inset Flex Code
15981 status collapsed
15982
15983 \begin_layout Plain Layout
15984 1
15985 \end_layout
15986
15987 \end_inset
15988
15989 ] Usually LyX does not allow you to leave a paragraph empty, since it would
15990  lead to empty LaTeX output.
15991  There are some cases where this could be desirable however: in a letter
15992  template, the required fields can be provided as empty fields, so that
15993  people do not forget them; in some special classes, a style can be used
15994  as some kind of break, which does not contain actual text.
15995  Default is false.
15996 \end_layout
15997
15998 \begin_layout Description
15999 \begin_inset Flex Code
16000 status collapsed
16001
16002 \begin_layout Plain Layout
16003 LabelFont
16004 \end_layout
16005
16006 \end_inset
16007
16008  The font used for the label.
16009  See section
16010 \begin_inset space ~
16011 \end_inset
16012
16013
16014 \begin_inset CommandInset ref
16015 LatexCommand ref
16016 reference "sub:Font-description"
16017
16018 \end_inset
16019
16020 .
16021  Note that this definition can never appear before 
16022 \begin_inset Flex Code
16023 status collapsed
16024
16025 \begin_layout Plain Layout
16026 Font
16027 \end_layout
16028
16029 \end_inset
16030
16031 , lest it be ineffective.
16032 \end_layout
16033
16034 \begin_layout Description
16035 \begin_inset Flex Code
16036 status collapsed
16037
16038 \begin_layout Plain Layout
16039 LabelString
16040 \end_layout
16041
16042 \end_inset
16043
16044  What will be displayed on the button or elsewhere as the inset label.
16045  Some inset types (
16046 \begin_inset Flex Code
16047 status collapsed
16048
16049 \begin_layout Plain Layout
16050 TeX code
16051 \end_layout
16052
16053 \end_inset
16054
16055  and 
16056 \begin_inset Flex Code
16057 status collapsed
16058
16059 \begin_layout Plain Layout
16060 Branch
16061 \end_layout
16062
16063 \end_inset
16064
16065 ) modify this label on the fly.
16066 \end_layout
16067
16068 \begin_layout Description
16069
16070 \change_inserted -195340706 1333913893
16071 \begin_inset Flex Code
16072 status collapsed
16073
16074 \begin_layout Plain Layout
16075 LangPreamble
16076 \end_layout
16077
16078 \end_inset
16079
16080  Language dependent preamble.
16081  See section
16082 \begin_inset space ~
16083 \end_inset
16084
16085
16086 \begin_inset CommandInset ref
16087 LatexCommand ref
16088 reference "sub:I18n"
16089
16090 \end_inset
16091
16092 .
16093 \end_layout
16094
16095 \begin_layout Description
16096 \begin_inset Flex Code
16097 status collapsed
16098
16099 \begin_layout Plain Layout
16100 LatexName
16101 \end_layout
16102
16103 \end_inset
16104
16105  The name of the corresponding LaTeX stuff.
16106  Either the environment or command name.
16107 \end_layout
16108
16109 \begin_layout Description
16110 \begin_inset Flex Code
16111 status collapsed
16112
16113 \begin_layout Plain Layout
16114 LatexParam
16115 \end_layout
16116
16117 \end_inset
16118
16119  The optional parameter for the corresponding 
16120 \begin_inset Flex Code
16121 status collapsed
16122
16123 \begin_layout Plain Layout
16124 LatexName
16125 \end_layout
16126
16127 \end_inset
16128
16129  stuff, including possible bracket pairs like 
16130 \begin_inset Flex Code
16131 status collapsed
16132
16133 \begin_layout Plain Layout
16134 []
16135 \end_layout
16136
16137 \end_inset
16138
16139 .
16140  This parameter cannot be changed from within LyX.
16141 \end_layout
16142
16143 \begin_layout Description
16144 \begin_inset Flex Code
16145 status collapsed
16146
16147 \begin_layout Plain Layout
16148 LatexType
16149 \end_layout
16150
16151 \end_inset
16152
16153  [
16154 \begin_inset Flex Code
16155 status collapsed
16156
16157 \begin_layout Plain Layout
16158
16159 \emph on
16160 Paragraph
16161 \emph default
16162 , Command, Environment, Item_Environment,
16163 \end_layout
16164
16165 \end_inset
16166
16167  
16168 \begin_inset Flex Code
16169 status collapsed
16170
16171 \begin_layout Plain Layout
16172 List_Environment, Bib_Environment
16173 \end_layout
16174
16175 \end_inset
16176
16177 ] How the style should be translated into LaTeX.
16178 \begin_inset Foot
16179 status collapsed
16180
16181 \begin_layout Plain Layout
16182 \begin_inset Flex Code
16183 status collapsed
16184
16185 \begin_layout Plain Layout
16186 LatexType
16187 \end_layout
16188
16189 \end_inset
16190
16191  is perhaps a bit misleading, since these rules apply to SGML classes, too.
16192  Visit the SGML class files for specific examples.
16193 \end_layout
16194
16195 \end_inset
16196
16197
16198 \end_layout
16199
16200 \begin_deeper
16201 \begin_layout Itemize
16202 \begin_inset Flex Code
16203 status collapsed
16204
16205 \begin_layout Plain Layout
16206 Paragraph
16207 \end_layout
16208
16209 \end_inset
16210
16211  means nothing special.
16212  
16213 \end_layout
16214
16215 \begin_layout Itemize
16216 \begin_inset Flex Code
16217 status collapsed
16218
16219 \begin_layout Plain Layout
16220 Command
16221 \end_layout
16222
16223 \end_inset
16224
16225  means 
16226 \begin_inset Flex Code
16227 status collapsed
16228
16229 \begin_layout Plain Layout
16230
16231 \backslash
16232
16233 \emph on
16234 LatexName
16235 \emph default
16236 {\SpecialChar \ldots{}
16237 }
16238 \end_layout
16239
16240 \end_inset
16241
16242 .
16243 \end_layout
16244
16245 \begin_layout Itemize
16246 \begin_inset Flex Code
16247 status collapsed
16248
16249 \begin_layout Plain Layout
16250 Environment
16251 \end_layout
16252
16253 \end_inset
16254
16255  means 
16256 \begin_inset Flex Code
16257 status collapsed
16258
16259 \begin_layout Plain Layout
16260
16261 \backslash
16262 begin{
16263 \emph on
16264 LatexName
16265 \emph default
16266 }\SpecialChar \ldots{}
16267
16268 \backslash
16269 end{
16270 \emph on
16271 LatexName
16272 \emph default
16273 }
16274 \end_layout
16275
16276 \end_inset
16277
16278 .
16279  
16280 \end_layout
16281
16282 \begin_layout Itemize
16283 \begin_inset Flex Code
16284 status collapsed
16285
16286 \begin_layout Plain Layout
16287 Item_Environment
16288 \end_layout
16289
16290 \end_inset
16291
16292  is the same as 
16293 \begin_inset Flex Code
16294 status collapsed
16295
16296 \begin_layout Plain Layout
16297 Environment
16298 \end_layout
16299
16300 \end_inset
16301
16302 , except that an 
16303 \begin_inset Flex Code
16304 status collapsed
16305
16306 \begin_layout Plain Layout
16307
16308 \backslash
16309 item
16310 \end_layout
16311
16312 \end_inset
16313
16314  is generated for each paragraph of this environment.
16315  
16316 \end_layout
16317
16318 \begin_layout Itemize
16319 \begin_inset Flex Code
16320 status collapsed
16321
16322 \begin_layout Plain Layout
16323 List_Environment
16324 \end_layout
16325
16326 \end_inset
16327
16328  is the same as 
16329 \begin_inset Flex Code
16330 status collapsed
16331
16332 \begin_layout Plain Layout
16333 Item_Environment
16334 \end_layout
16335
16336 \end_inset
16337
16338 , except that 
16339 \begin_inset Flex Code
16340 status collapsed
16341
16342 \begin_layout Plain Layout
16343 LabelWidthString
16344 \end_layout
16345
16346 \end_inset
16347
16348  is passed as an argument to the environment.
16349  
16350 \begin_inset Flex Code
16351 status collapsed
16352
16353 \begin_layout Plain Layout
16354 LabelWidthString
16355 \end_layout
16356
16357 \end_inset
16358
16359  can be defined in the 
16360 \begin_inset Flex MenuItem
16361 status collapsed
16362
16363 \begin_layout Plain Layout
16364
16365 \bar under
16366 Edit
16367 \bar default
16368 \SpecialChar \menuseparator
16369
16370 \bar under
16371 P
16372 \bar default
16373 aragraph
16374 \begin_inset space ~
16375 \end_inset
16376
16377 settings
16378 \end_layout
16379
16380 \end_inset
16381
16382  dialog.
16383  
16384 \end_layout
16385
16386 \begin_layout Standard
16387 Putting the last few things together, the LaTeX output will be either: 
16388 \end_layout
16389
16390 \begin_layout LyX-Code
16391
16392 \backslash
16393 latexname[latexparam]{\SpecialChar \ldots{}
16394 }
16395 \end_layout
16396
16397 \begin_layout Standard
16398 or: 
16399 \end_layout
16400
16401 \begin_layout LyX-Code
16402
16403 \backslash
16404 begin{latexname}[latexparam] \SpecialChar \ldots{}
16405  
16406 \backslash
16407 end{latexname}.
16408 \end_layout
16409
16410 \begin_layout Standard
16411 depending upon the LaTeX type.
16412 \end_layout
16413
16414 \end_deeper
16415 \begin_layout Description
16416 \begin_inset Flex Code
16417 status collapsed
16418
16419 \begin_layout Plain Layout
16420 LyxType
16421 \end_layout
16422
16423 \end_inset
16424
16425  Can be 
16426 \begin_inset Flex Code
16427 status collapsed
16428
16429 \begin_layout Plain Layout
16430 charstyle
16431 \end_layout
16432
16433 \end_inset
16434
16435
16436 \begin_inset Flex Code
16437 status collapsed
16438
16439 \begin_layout Plain Layout
16440 custom
16441 \end_layout
16442
16443 \end_inset
16444
16445
16446 \begin_inset Flex Code
16447 status collapsed
16448
16449 \begin_layout Plain Layout
16450 element
16451 \end_layout
16452
16453 \end_inset
16454
16455 , or 
16456 \begin_inset Flex Code
16457 status collapsed
16458
16459 \begin_layout Plain Layout
16460 end
16461 \end_layout
16462
16463 \end_inset
16464
16465  (indicating a dummy definition ending definitions of charstyles, etc).
16466  This entry is required in and is only meaningful for Flex insets.
16467  Among other things, it determines on which menu this inset will appear.
16468  Setting 
16469 \begin_inset Flex Code
16470 status collapsed
16471
16472 \begin_layout Plain Layout
16473 LyXType
16474 \end_layout
16475
16476 \end_inset
16477
16478  to 
16479 \begin_inset Flex Code
16480 status collapsed
16481
16482 \begin_layout Plain Layout
16483 charstyle
16484 \end_layout
16485
16486 \end_inset
16487
16488  will set 
16489 \begin_inset Flex Code
16490 status collapsed
16491
16492 \begin_layout Plain Layout
16493 MultiPar
16494 \end_layout
16495
16496 \end_inset
16497
16498  to false.
16499  
16500 \begin_inset Flex Code
16501 status collapsed
16502
16503 \begin_layout Plain Layout
16504 MultiPar
16505 \end_layout
16506
16507 \end_inset
16508
16509  can be set to true for charstyle insets, if you wish, by setting it 
16510 \emph on
16511 after
16512 \emph default
16513  you set the 
16514 \begin_inset Flex Code
16515 status collapsed
16516
16517 \begin_layout Plain Layout
16518 LyXType
16519 \end_layout
16520
16521 \end_inset
16522
16523 .
16524 \end_layout
16525
16526 \begin_layout Description
16527 \begin_inset Flex Code
16528 status collapsed
16529
16530 \begin_layout Plain Layout
16531 MultiPar
16532 \end_layout
16533
16534 \end_inset
16535
16536  [
16537 \begin_inset Flex Code
16538 status collapsed
16539
16540 \begin_layout Plain Layout
16541
16542 \emph on
16543 0
16544 \end_layout
16545
16546 \end_inset
16547
16548 ,
16549 \begin_inset Flex Code
16550 status collapsed
16551
16552 \begin_layout Plain Layout
16553 1
16554 \end_layout
16555
16556 \end_inset
16557
16558 ] Whether multiple paragraphs are permitted in this inset.
16559  This will also set 
16560 \begin_inset Flex Code
16561 status collapsed
16562
16563 \begin_layout Plain Layout
16564 CustomPars
16565 \end_layout
16566
16567 \end_inset
16568
16569  to the same value and 
16570 \begin_inset Flex Code
16571 status collapsed
16572
16573 \begin_layout Plain Layout
16574 ForcePlain
16575 \end_layout
16576
16577 \end_inset
16578
16579  to the opposite value.
16580  These can be reset to other values, if they are used 
16581 \emph on
16582 after
16583 \emph default
16584  
16585 \begin_inset Flex Code
16586 status collapsed
16587
16588 \begin_layout Plain Layout
16589 MultiPar
16590 \end_layout
16591
16592 \end_inset
16593
16594 .
16595  Default is true.
16596 \end_layout
16597
16598 \begin_layout Description
16599 \begin_inset Flex Code
16600 status collapsed
16601
16602 \begin_layout Plain Layout
16603 NeedProtect
16604 \end_layout
16605
16606 \end_inset
16607
16608  [
16609 \begin_inset Flex Code
16610 status collapsed
16611
16612 \begin_layout Plain Layout
16613
16614 \emph on
16615 0
16616 \end_layout
16617
16618 \end_inset
16619
16620 ,
16621 \begin_inset Flex Code
16622 status collapsed
16623
16624 \begin_layout Plain Layout
16625 1
16626 \end_layout
16627
16628 \end_inset
16629
16630 ] Whether fragile commands in this inset should be 
16631 \begin_inset Flex Code
16632 status collapsed
16633
16634 \begin_layout Plain Layout
16635
16636 \backslash
16637 protect
16638 \end_layout
16639
16640 \end_inset
16641
16642 'ed.
16643  (Note: This is 
16644 \emph on
16645 not
16646 \emph default
16647  whether the command should itself be protected.) Default is false.
16648 \end_layout
16649
16650 \begin_layout Description
16651 \begin_inset Flex Code
16652 status collapsed
16653
16654 \begin_layout Plain Layout
16655 ParbreakIsNewline
16656 \end_layout
16657
16658 \end_inset
16659
16660  [
16661 \begin_inset Flex Code
16662 status collapsed
16663
16664 \begin_layout Plain Layout
16665
16666 \emph on
16667 0
16668 \end_layout
16669
16670 \end_inset
16671
16672
16673 \begin_inset Flex Code
16674 status collapsed
16675
16676 \begin_layout Plain Layout
16677 1
16678 \end_layout
16679
16680 \end_inset
16681
16682 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
16683  output, but only by a line break; together with 
16684 \begin_inset Flex Code
16685 status collapsed
16686
16687 \begin_layout Plain Layout
16688 PassThru 1
16689 \end_layout
16690
16691 \end_inset
16692
16693 , this allows to emulate a plain text editor (like the ERT inset).
16694  Default is false.
16695 \end_layout
16696
16697 \begin_layout Description
16698 \begin_inset Flex Code
16699 status collapsed
16700
16701 \begin_layout Plain Layout
16702 PassThru
16703 \end_layout
16704
16705 \end_inset
16706
16707  [
16708 \begin_inset Flex Code
16709 status collapsed
16710
16711 \begin_layout Plain Layout
16712
16713 \emph on
16714 0
16715 \end_layout
16716
16717 \end_inset
16718
16719
16720 \begin_inset Flex Code
16721 status collapsed
16722
16723 \begin_layout Plain Layout
16724 1
16725 \end_layout
16726
16727 \end_inset
16728
16729 ] Whether the contents of this paragraph should be output in raw form, meaning
16730  without special translations that LaTeX would require.
16731 \end_layout
16732
16733 \begin_layout Description
16734 \begin_inset Flex Code
16735 status collapsed
16736
16737 \begin_layout Plain Layout
16738 Preamble
16739 \end_layout
16740
16741 \end_inset
16742
16743  Information to be included in the LaTeX preamble when this style is used.
16744  Used to define macros, load packages, etc., required by this particular
16745  style.
16746  Must end with 
16747 \begin_inset Quotes eld
16748 \end_inset
16749
16750
16751 \begin_inset Flex Code
16752 status collapsed
16753
16754 \begin_layout Plain Layout
16755 EndPreamble
16756 \end_layout
16757
16758 \end_inset
16759
16760
16761 \begin_inset Quotes erd
16762 \end_inset
16763
16764 .
16765 \end_layout
16766
16767 \begin_layout Description
16768 \begin_inset Flex Code
16769 status collapsed
16770
16771 \begin_layout Plain Layout
16772 RefPrefix
16773 \end_layout
16774
16775 \end_inset
16776
16777  [
16778 \begin_inset Flex Code
16779 status collapsed
16780
16781 \begin_layout Plain Layout
16782 string
16783 \end_layout
16784
16785 \end_inset
16786
16787 ] The prefix to use when creating labels referring to insets of this type.
16788  This allows the use of formatted references.
16789 \end_layout
16790
16791 \begin_layout Description
16792 \begin_inset Flex Code
16793 status collapsed
16794
16795 \begin_layout Plain Layout
16796 Requires
16797 \end_layout
16798
16799 \end_inset
16800
16801  [
16802 \begin_inset Flex Code
16803 status collapsed
16804
16805 \begin_layout Plain Layout
16806 string
16807 \end_layout
16808
16809 \end_inset
16810
16811 ] Whether the style requires the feature 
16812 \begin_inset Flex Code
16813 status collapsed
16814
16815 \begin_layout Plain Layout
16816 string
16817 \end_layout
16818
16819 \end_inset
16820
16821 .
16822  See the description of 
16823 \begin_inset Flex Code
16824 status collapsed
16825
16826 \begin_layout Plain Layout
16827 Provides
16828 \end_layout
16829
16830 \end_inset
16831
16832  above (page 
16833 \begin_inset CommandInset ref
16834 LatexCommand pageref
16835 reference "des:FreeSpacing"
16836
16837 \end_inset
16838
16839 ) for information on `features'.
16840  
16841 \end_layout
16842
16843 \begin_layout Description
16844 \begin_inset Flex Code
16845 status collapsed
16846
16847 \begin_layout Plain Layout
16848 ResetsFont
16849 \end_layout
16850
16851 \end_inset
16852
16853  [
16854 \begin_inset Flex Code
16855 status collapsed
16856
16857 \begin_layout Plain Layout
16858 0
16859 \end_layout
16860
16861 \end_inset
16862
16863 ,
16864 \begin_inset Flex Code
16865 status collapsed
16866
16867 \begin_layout Plain Layout
16868
16869 \emph on
16870 1
16871 \end_layout
16872
16873 \end_inset
16874
16875 ] Whether this inset should use the font of its surrounding environment
16876  or uses its own.
16877  Default is true: uses its own.
16878 \end_layout
16879
16880 \begin_layout Description
16881 \begin_inset Flex Code
16882 status collapsed
16883
16884 \begin_layout Plain Layout
16885 Spellcheck
16886 \end_layout
16887
16888 \end_inset
16889
16890  [
16891 \begin_inset Flex Code
16892 status collapsed
16893
16894 \begin_layout Plain Layout
16895 0
16896 \end_layout
16897
16898 \end_inset
16899
16900 ,
16901 \begin_inset Flex Code
16902 status collapsed
16903
16904 \begin_layout Plain Layout
16905
16906 \emph on
16907 1
16908 \end_layout
16909
16910 \end_inset
16911
16912 ] Spellcheck the contents of this inset.
16913  Default is true.
16914 \end_layout
16915
16916 \begin_layout Subsection
16917 Counters
16918 \begin_inset CommandInset label
16919 LatexCommand label
16920 name "sub:Counters"
16921
16922 \end_inset
16923
16924
16925 \end_layout
16926
16927 \begin_layout Standard
16928 Since version 1.3.0 of LyX, it is both possible and necessary to define the
16929  counters (
16930 \begin_inset Flex MenuItem
16931 status collapsed
16932
16933 \begin_layout Plain Layout
16934 chapter
16935 \end_layout
16936
16937 \end_inset
16938
16939
16940 \begin_inset Flex MenuItem
16941 status collapsed
16942
16943 \begin_layout Plain Layout
16944 figure
16945 \end_layout
16946
16947 \end_inset
16948
16949 , \SpecialChar \ldots{}
16950 ) in the text class itself.
16951  The standard counters are defined in the file 
16952 \begin_inset Flex Code
16953 status collapsed
16954
16955 \begin_layout Plain Layout
16956 stdcounters.inc
16957 \end_layout
16958
16959 \end_inset
16960
16961 , so you may have to do no more than add
16962 \end_layout
16963
16964 \begin_layout LyX-Code
16965 Input stdcounters.inc
16966 \end_layout
16967
16968 \begin_layout Standard
16969 to your layout file to get them to work.
16970  But if you want to define custom counters, then you can do so.
16971  The counter declaration must begin with:
16972 \end_layout
16973
16974 \begin_layout LyX-Code
16975 Counter CounterName
16976 \end_layout
16977
16978 \begin_layout Standard
16979 where of course `
16980 \begin_inset Flex Code
16981 status collapsed
16982
16983 \begin_layout Plain Layout
16984 CounterName
16985 \end_layout
16986
16987 \end_inset
16988
16989 ' is replaced by the name of the counter.
16990  And it must end with 
16991 \begin_inset Quotes eld
16992 \end_inset
16993
16994
16995 \begin_inset Flex Code
16996 status collapsed
16997
16998 \begin_layout Plain Layout
16999 End
17000 \end_layout
17001
17002 \end_inset
17003
17004
17005 \begin_inset Quotes erd
17006 \end_inset
17007
17008 .
17009  The following parameters can also be used:
17010 \end_layout
17011
17012 \begin_layout Description
17013 \begin_inset Flex Code
17014 status collapsed
17015
17016 \begin_layout Plain Layout
17017 LabelString
17018 \end_layout
17019
17020 \end_inset
17021
17022  [
17023 \begin_inset Flex Code
17024 status collapsed
17025
17026 \begin_layout Plain Layout
17027 string
17028 \end_layout
17029
17030 \end_inset
17031
17032 =
17033 \begin_inset Quotes erd
17034 \end_inset
17035
17036
17037 \begin_inset Quotes erd
17038 \end_inset
17039
17040 ] When defined, this string defines how the counter is displayed.
17041  Setting this value sets 
17042 \begin_inset Flex Code
17043 status collapsed
17044
17045 \begin_layout Plain Layout
17046 LabelStringAppendix
17047 \end_layout
17048
17049 \end_inset
17050
17051  to the same value.
17052  The following special constructs can be used in the string:
17053 \end_layout
17054
17055 \begin_deeper
17056 \begin_layout Itemize
17057 \begin_inset Flex Code
17058 status collapsed
17059
17060 \begin_layout Plain Layout
17061
17062 \backslash
17063 thecounter
17064 \end_layout
17065
17066 \end_inset
17067
17068  will be replaced by the expansion of the 
17069 \begin_inset Flex Code
17070 status collapsed
17071
17072 \begin_layout Plain Layout
17073 LabelString
17074 \end_layout
17075
17076 \end_inset
17077
17078  (or 
17079 \begin_inset Flex Code
17080 status collapsed
17081
17082 \begin_layout Plain Layout
17083 LabelStringAppendix
17084 \end_layout
17085
17086 \end_inset
17087
17088 ) of the counter 
17089 \begin_inset Flex Code
17090 status collapsed
17091
17092 \begin_layout Plain Layout
17093 counter
17094 \end_layout
17095
17096 \end_inset
17097
17098 .
17099  
17100 \end_layout
17101
17102 \begin_layout Itemize
17103 counter values can be expressed using LaTeX-like macros 
17104 \begin_inset Flex Code
17105 status collapsed
17106
17107 \begin_layout Plain Layout
17108
17109 \backslash
17110
17111 \emph on
17112 numbertype
17113 \emph default
17114 {
17115 \emph on
17116 counter
17117 \emph default
17118 }
17119 \end_layout
17120
17121 \end_inset
17122
17123 , where 
17124 \begin_inset Flex Code
17125 status collapsed
17126
17127 \begin_layout Plain Layout
17128
17129 \emph on
17130 numbertype
17131 \end_layout
17132
17133 \end_inset
17134
17135  can be:
17136 \begin_inset Foot
17137 status collapsed
17138
17139 \begin_layout Plain Layout
17140
17141 \family roman
17142 \series medium
17143 \shape up
17144 \size normal
17145 \emph off
17146 \bar no
17147 \noun off
17148 \color none
17149 Actually, the situation is a bit more complicated: any
17150 \family default
17151 \series default
17152 \shape default
17153 \emph default
17154 \bar default
17155  
17156 \size default
17157 \emph on
17158 \noun default
17159 \color inherit
17160 numbertype
17161 \family roman
17162 \series medium
17163 \shape up
17164 \size normal
17165 \emph off
17166 \bar no
17167 \noun off
17168  other than those described below will produce arabic numerals.
17169  It would not be surprising to see this change in the future.
17170 \end_layout
17171
17172 \end_inset
17173
17174  
17175 \begin_inset Flex Code
17176 status collapsed
17177
17178 \begin_layout Plain Layout
17179 arabic
17180 \end_layout
17181
17182 \end_inset
17183
17184 : 1, 2, 3,\SpecialChar \ldots{}
17185
17186 \begin_inset Flex Code
17187 status collapsed
17188
17189 \begin_layout Plain Layout
17190 alph
17191 \end_layout
17192
17193 \end_inset
17194
17195  for lower-case letters: a, b, c, \SpecialChar \ldots{}
17196
17197 \begin_inset Flex Code
17198 status collapsed
17199
17200 \begin_layout Plain Layout
17201 Alph
17202 \end_layout
17203
17204 \end_inset
17205
17206  for upper-case letters: A, B, C, \SpecialChar \ldots{}
17207
17208 \begin_inset Flex Code
17209 status collapsed
17210
17211 \begin_layout Plain Layout
17212 roman
17213 \end_layout
17214
17215 \end_inset
17216
17217  for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
17218
17219 \begin_inset Flex Code
17220 status collapsed
17221
17222 \begin_layout Plain Layout
17223 Roman
17224 \end_layout
17225
17226 \end_inset
17227
17228  for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
17229
17230 \begin_inset Flex Code
17231 status collapsed
17232
17233 \begin_layout Plain Layout
17234 hebrew
17235 \end_layout
17236
17237 \end_inset
17238
17239  for hebrew numerals.
17240 \end_layout
17241
17242 \end_deeper
17243 \begin_layout Standard
17244 If LabelString is not defined, a default value is constructed as follows:
17245  if the counter has a master counter 
17246 \begin_inset Flex Code
17247 status collapsed
17248
17249 \begin_layout Plain Layout
17250 master
17251 \end_layout
17252
17253 \end_inset
17254
17255  (defined via 
17256 \begin_inset Flex Code
17257 status collapsed
17258
17259 \begin_layout Plain Layout
17260 Within
17261 \end_layout
17262
17263 \end_inset
17264
17265 ), the string 
17266 \begin_inset Flex Code
17267 status collapsed
17268
17269 \begin_layout Plain Layout
17270
17271 \backslash
17272 themaster.
17273 \backslash
17274 arabic{counter}
17275 \end_layout
17276
17277 \end_inset
17278
17279  is used; otherwise the string 
17280 \begin_inset Flex Code
17281 status collapsed
17282
17283 \begin_layout Plain Layout
17284
17285 \backslash
17286 arabic{counter}
17287 \end_layout
17288
17289 \end_inset
17290
17291  is used.
17292 \end_layout
17293
17294 \begin_layout Description
17295 \begin_inset Flex Code
17296 status collapsed
17297
17298 \begin_layout Plain Layout
17299 LabelStringAppendix
17300 \end_layout
17301
17302 \end_inset
17303
17304  [
17305 \begin_inset Flex Code
17306 status collapsed
17307
17308 \begin_layout Plain Layout
17309 string
17310 \end_layout
17311
17312 \end_inset
17313
17314 =
17315 \begin_inset Quotes erd
17316 \end_inset
17317
17318
17319 \begin_inset Quotes erd
17320 \end_inset
17321
17322 ] Same as 
17323 \begin_inset Flex Code
17324 status collapsed
17325
17326 \begin_layout Plain Layout
17327 LabelString
17328 \end_layout
17329
17330 \end_inset
17331
17332 , but for use in the Appendix.
17333 \end_layout
17334
17335 \begin_layout Description
17336 \begin_inset Flex Code
17337 status collapsed
17338
17339 \begin_layout Plain Layout
17340 PrettyFormat
17341 \end_layout
17342
17343 \end_inset
17344
17345  [
17346 \begin_inset Flex Code
17347 status collapsed
17348
17349 \begin_layout Plain Layout
17350 string
17351 \end_layout
17352
17353 \end_inset
17354
17355 =
17356 \begin_inset Quotes erd
17357 \end_inset
17358
17359
17360 \begin_inset Quotes erd
17361 \end_inset
17362
17363 ] A format for use with formatted references to this counter.
17364  For example, one might want to have references to section numbers appear
17365  as 
17366 \begin_inset Quotes eld
17367 \end_inset
17368
17369 Section 2.4
17370 \begin_inset Quotes erd
17371 \end_inset
17372
17373 .
17374  The string should contain 
17375 \begin_inset Quotes eld
17376 \end_inset
17377
17378 ##
17379 \begin_inset Quotes erd
17380 \end_inset
17381
17382 .
17383  This will be replaced by the counter number itself.
17384  So, for sections, it would be: Section ##.
17385 \end_layout
17386
17387 \begin_layout Description
17388 \begin_inset Flex Code
17389 status collapsed
17390
17391 \begin_layout Plain Layout
17392 Within
17393 \end_layout
17394
17395 \end_inset
17396
17397  [
17398 \begin_inset Flex Code
17399 status collapsed
17400
17401 \begin_layout Plain Layout
17402 string
17403 \end_layout
17404
17405 \end_inset
17406
17407 =
17408 \begin_inset Quotes erd
17409 \end_inset
17410
17411
17412 \begin_inset Quotes erd
17413 \end_inset
17414
17415 ] If this is set to the name of another counter, the present counter will
17416  be reset every time the other one is increased.
17417  For example, 
17418 \begin_inset Flex Code
17419 status collapsed
17420
17421 \begin_layout Plain Layout
17422 subsection
17423 \end_layout
17424
17425 \end_inset
17426
17427  is numbered inside 
17428 \begin_inset Flex Code
17429 status collapsed
17430
17431 \begin_layout Plain Layout
17432 section
17433 \end_layout
17434
17435 \end_inset
17436
17437 .
17438 \end_layout
17439
17440 \begin_layout Subsection
17441 Font description
17442 \begin_inset CommandInset label
17443 LatexCommand label
17444 name "sub:Font-description"
17445
17446 \end_inset
17447
17448
17449 \end_layout
17450
17451 \begin_layout Standard
17452 A font description looks like this:
17453 \end_layout
17454
17455 \begin_layout LyX-Code
17456 Font 
17457 \family roman
17458 \emph on
17459 or
17460 \family default
17461 \emph default
17462  LabelFont
17463 \end_layout
17464
17465 \begin_layout LyX-Code
17466  ...
17467 \end_layout
17468
17469 \begin_layout LyX-Code
17470 EndFont
17471 \end_layout
17472
17473 \begin_layout Standard
17474 The following commands are available:
17475 \end_layout
17476
17477 \begin_layout Description
17478 \begin_inset Flex Code
17479 status collapsed
17480
17481 \begin_layout Plain Layout
17482 Color
17483 \end_layout
17484
17485 \end_inset
17486
17487  [
17488 \begin_inset Flex Code
17489 status collapsed
17490
17491 \begin_layout Plain Layout
17492
17493 \emph on
17494 none
17495 \end_layout
17496
17497 \end_inset
17498
17499
17500 \begin_inset Flex Code
17501 status collapsed
17502
17503 \begin_layout Plain Layout
17504 black
17505 \end_layout
17506
17507 \end_inset
17508
17509
17510 \begin_inset Flex Code
17511 status collapsed
17512
17513 \begin_layout Plain Layout
17514 white
17515 \end_layout
17516
17517 \end_inset
17518
17519
17520 \begin_inset Flex Code
17521 status collapsed
17522
17523 \begin_layout Plain Layout
17524 red
17525 \end_layout
17526
17527 \end_inset
17528
17529
17530 \begin_inset Flex Code
17531 status collapsed
17532
17533 \begin_layout Plain Layout
17534 green
17535 \end_layout
17536
17537 \end_inset
17538
17539
17540 \begin_inset Flex Code
17541 status collapsed
17542
17543 \begin_layout Plain Layout
17544 blue
17545 \end_layout
17546
17547 \end_inset
17548
17549
17550 \begin_inset Flex Code
17551 status collapsed
17552
17553 \begin_layout Plain Layout
17554 cyan
17555 \end_layout
17556
17557 \end_inset
17558
17559
17560 \begin_inset Flex Code
17561 status collapsed
17562
17563 \begin_layout Plain Layout
17564 magenta
17565 \end_layout
17566
17567 \end_inset
17568
17569
17570 \begin_inset Flex Code
17571 status collapsed
17572
17573 \begin_layout Plain Layout
17574 yellow
17575 \end_layout
17576
17577 \end_inset
17578
17579 ]
17580 \end_layout
17581
17582 \begin_layout Description
17583 \begin_inset Flex Code
17584 status collapsed
17585
17586 \begin_layout Plain Layout
17587 Family
17588 \end_layout
17589
17590 \end_inset
17591
17592  [
17593 \begin_inset Flex Code
17594 status collapsed
17595
17596 \begin_layout Plain Layout
17597
17598 \emph on
17599 Roman
17600 \end_layout
17601
17602 \end_inset
17603
17604
17605 \begin_inset Flex Code
17606 status collapsed
17607
17608 \begin_layout Plain Layout
17609 Sans
17610 \end_layout
17611
17612 \end_inset
17613
17614
17615 \begin_inset Flex Code
17616 status collapsed
17617
17618 \begin_layout Plain Layout
17619 Typewriter
17620 \end_layout
17621
17622 \end_inset
17623
17624 ]
17625 \end_layout
17626
17627 \begin_layout Description
17628 \begin_inset Flex Code
17629 status collapsed
17630
17631 \begin_layout Plain Layout
17632 Misc
17633 \end_layout
17634
17635 \end_inset
17636
17637  [
17638 \begin_inset Flex Code
17639 status collapsed
17640
17641 \begin_layout Plain Layout
17642 string
17643 \end_layout
17644
17645 \end_inset
17646
17647 ] Valid arguments are: 
17648 \begin_inset Flex Code
17649 status collapsed
17650
17651 \begin_layout Plain Layout
17652 emph
17653 \end_layout
17654
17655 \end_inset
17656
17657
17658 \begin_inset Flex Code
17659 status collapsed
17660
17661 \begin_layout Plain Layout
17662 noun
17663 \end_layout
17664
17665 \end_inset
17666
17667
17668 \begin_inset Flex Code
17669 status collapsed
17670
17671 \begin_layout Plain Layout
17672 strikeout
17673 \end_layout
17674
17675 \end_inset
17676
17677
17678 \begin_inset Flex Code
17679 status collapsed
17680
17681 \begin_layout Plain Layout
17682 underbar
17683 \end_layout
17684
17685 \end_inset
17686
17687
17688 \begin_inset Flex Code
17689 status collapsed
17690
17691 \begin_layout Plain Layout
17692 uuline
17693 \end_layout
17694
17695 \end_inset
17696
17697
17698 \begin_inset Flex Code
17699 status collapsed
17700
17701 \begin_layout Plain Layout
17702 uwave
17703 \end_layout
17704
17705 \end_inset
17706
17707
17708 \begin_inset Flex Code
17709 status collapsed
17710
17711 \begin_layout Plain Layout
17712 no_emph
17713 \end_layout
17714
17715 \end_inset
17716
17717
17718 \begin_inset Flex Code
17719 status collapsed
17720
17721 \begin_layout Plain Layout
17722 no_noun
17723 \end_layout
17724
17725 \end_inset
17726
17727
17728 \begin_inset Flex Code
17729 status collapsed
17730
17731 \begin_layout Plain Layout
17732 no_strikeout
17733 \end_layout
17734
17735 \end_inset
17736
17737
17738 \begin_inset Flex Code
17739 status collapsed
17740
17741 \begin_layout Plain Layout
17742 no_bar
17743 \end_layout
17744
17745 \end_inset
17746
17747
17748 \begin_inset Flex Code
17749 status collapsed
17750
17751 \begin_layout Plain Layout
17752 no_uuline
17753 \end_layout
17754
17755 \end_inset
17756
17757  and 
17758 \begin_inset Flex Code
17759 status collapsed
17760
17761 \begin_layout Plain Layout
17762 no_uwave
17763 \end_layout
17764
17765 \end_inset
17766
17767 .
17768  Each of these turns on or off the corresponding attribute.
17769  For example, 
17770 \begin_inset Flex Code
17771 status collapsed
17772
17773 \begin_layout Plain Layout
17774 emph
17775 \end_layout
17776
17777 \end_inset
17778
17779  turns on emphasis, and 
17780 \begin_inset Flex Code
17781 status collapsed
17782
17783 \begin_layout Plain Layout
17784 no_emph
17785 \end_layout
17786
17787 \end_inset
17788
17789  turns it off.
17790  
17791 \begin_inset Newline newline
17792 \end_inset
17793
17794 If the latter seems puzzling, remember that the font settings for the present
17795  context are generally inherited from the surrounding context.
17796  So 
17797 \begin_inset Flex Code
17798 status collapsed
17799
17800 \begin_layout Plain Layout
17801 no_emph
17802 \end_layout
17803
17804 \end_inset
17805
17806  would turn off the emphasis that was anyway in effect, say, in a theorem
17807  environment.
17808 \end_layout
17809
17810 \begin_layout Description
17811 \begin_inset Flex Code
17812 status collapsed
17813
17814 \begin_layout Plain Layout
17815 Series
17816 \end_layout
17817
17818 \end_inset
17819
17820  [
17821 \begin_inset Flex Code
17822 status collapsed
17823
17824 \begin_layout Plain Layout
17825
17826 \emph on
17827 Medium
17828 \end_layout
17829
17830 \end_inset
17831
17832
17833 \begin_inset Flex Code
17834 status collapsed
17835
17836 \begin_layout Plain Layout
17837 Bold
17838 \end_layout
17839
17840 \end_inset
17841
17842
17843 \end_layout
17844
17845 \begin_layout Description
17846 \begin_inset Flex Code
17847 status collapsed
17848
17849 \begin_layout Plain Layout
17850 Shape
17851 \end_layout
17852
17853 \end_inset
17854
17855  [
17856 \begin_inset Flex Code
17857 status collapsed
17858
17859 \begin_layout Plain Layout
17860
17861 \emph on
17862 Up
17863 \end_layout
17864
17865 \end_inset
17866
17867
17868 \begin_inset Flex Code
17869 status collapsed
17870
17871 \begin_layout Plain Layout
17872 Italic
17873 \end_layout
17874
17875 \end_inset
17876
17877
17878 \begin_inset Flex Code
17879 status collapsed
17880
17881 \begin_layout Plain Layout
17882 SmallCaps
17883 \end_layout
17884
17885 \end_inset
17886
17887
17888 \begin_inset Flex Code
17889 status collapsed
17890
17891 \begin_layout Plain Layout
17892 Slanted
17893 \end_layout
17894
17895 \end_inset
17896
17897
17898 \end_layout
17899
17900 \begin_layout Description
17901 \begin_inset Flex Code
17902 status collapsed
17903
17904 \begin_layout Plain Layout
17905 Size
17906 \end_layout
17907
17908 \end_inset
17909
17910  [
17911 \begin_inset Flex Code
17912 status collapsed
17913
17914 \begin_layout Plain Layout
17915 tiny
17916 \end_layout
17917
17918 \end_inset
17919
17920
17921 \begin_inset Flex Code
17922 status collapsed
17923
17924 \begin_layout Plain Layout
17925 small
17926 \end_layout
17927
17928 \end_inset
17929
17930
17931 \begin_inset Flex Code
17932 status collapsed
17933
17934 \begin_layout Plain Layout
17935
17936 \emph on
17937 normal
17938 \end_layout
17939
17940 \end_inset
17941
17942
17943 \begin_inset Flex Code
17944 status collapsed
17945
17946 \begin_layout Plain Layout
17947 large
17948 \end_layout
17949
17950 \end_inset
17951
17952
17953 \begin_inset Flex Code
17954 status collapsed
17955
17956 \begin_layout Plain Layout
17957 larger
17958 \end_layout
17959
17960 \end_inset
17961
17962
17963 \begin_inset Flex Code
17964 status collapsed
17965
17966 \begin_layout Plain Layout
17967 largest
17968 \end_layout
17969
17970 \end_inset
17971
17972
17973 \begin_inset Flex Code
17974 status collapsed
17975
17976 \begin_layout Plain Layout
17977 huge
17978 \end_layout
17979
17980 \end_inset
17981
17982
17983 \begin_inset Flex Code
17984 status collapsed
17985
17986 \begin_layout Plain Layout
17987 giant
17988 \end_layout
17989
17990 \end_inset
17991
17992 ]
17993 \end_layout
17994
17995 \begin_layout Subsection
17996 \begin_inset CommandInset label
17997 LatexCommand label
17998 name "sub:Citation-format-description"
17999
18000 \end_inset
18001
18002 Citation format description
18003 \end_layout
18004
18005 \begin_layout Standard
18006 The 
18007 \begin_inset Flex Code
18008 status collapsed
18009
18010 \begin_layout Plain Layout
18011 CiteFormat
18012 \end_layout
18013
18014 \end_inset
18015
18016  blocks are used to describe how bibliographic information should be displayed,
18017  both within LyX itself (in the citation dialog and in tooltips, for example)
18018  and in XHTML output.
18019  Such a block might look like this:
18020 \end_layout
18021
18022 \begin_layout LyX-Code
18023 CiteFormat
18024 \end_layout
18025
18026 \begin_layout LyX-Code
18027  article ...
18028 \end_layout
18029
18030 \begin_layout LyX-Code
18031  book ...
18032 \end_layout
18033
18034 \begin_layout LyX-Code
18035 End
18036 \end_layout
18037
18038 \begin_layout Standard
18039 The individual lines define how the bibliographic information associated
18040  with an article or book, respectively, is to be displayed, and such a definitio
18041 n can be given for any `entry type' that might be present in a BibTeX file.
18042  LyX defines a default format in the source code that will be used if no
18043  specific definition has been given.
18044  LyX predefines several formats in the file 
18045 \begin_inset Flex Code
18046 status collapsed
18047
18048 \begin_layout Plain Layout
18049 stdciteformats.inc
18050 \end_layout
18051
18052 \end_inset
18053
18054 , which is included in most of LyX's document classes.
18055 \end_layout
18056
18057 \begin_layout Standard
18058 The definitions use a simple language that allows BibTeX keys to be replaced
18059  with their values.
18060  Keys should be enclosed in 
18061 \begin_inset Flex Code
18062 status collapsed
18063
18064 \begin_layout Plain Layout
18065 %
18066 \end_layout
18067
18068 \end_inset
18069
18070  signs, e.g.: 
18071 \begin_inset Flex Code
18072 status collapsed
18073
18074 \begin_layout Plain Layout
18075 %author%
18076 \end_layout
18077
18078 \end_inset
18079
18080 .
18081  So a simple definition might look like this:
18082 \end_layout
18083
18084 \begin_layout LyX-Code
18085 misc %author%, 
18086 \begin_inset Quotes eld
18087 \end_inset
18088
18089 %title
18090 \begin_inset Quotes erd
18091 \end_inset
18092
18093 .
18094 \end_layout
18095
18096 \begin_layout Standard
18097 This would print the author, followed by a comma, followed by the title,
18098  in quotes, followed by a period.
18099 \end_layout
18100
18101 \begin_layout Standard
18102 Of course, sometimes you may want to print a key only if it exists.
18103  This can be done by using a conditional construction, such as: 
18104 \begin_inset Flex Code
18105 status collapsed
18106
18107 \begin_layout Plain Layout
18108 {%volume%[[vol.
18109 \begin_inset space ~
18110 \end_inset
18111
18112 %volume%]]}
18113 \end_layout
18114
18115 \end_inset
18116
18117 .
18118  This says: If the 
18119 \begin_inset Flex Code
18120 status collapsed
18121
18122 \begin_layout Plain Layout
18123 volume
18124 \end_layout
18125
18126 \end_inset
18127
18128  key exists, then print 
18129 \begin_inset Quotes eld
18130 \end_inset
18131
18132 vol.
18133 \begin_inset space ~
18134 \end_inset
18135
18136
18137 \begin_inset Quotes erd
18138 \end_inset
18139
18140  followed by the volume key.
18141  It is also possible to have an else clause in the conditional, such as:
18142  
18143 \begin_inset Flex Code
18144 status collapsed
18145
18146 \begin_layout Plain Layout
18147 {%author%[[%author%]][[%editor%, ed.]]}
18148 \end_layout
18149
18150 \end_inset
18151
18152 .
18153  Here, the 
18154 \begin_inset Flex Code
18155 status collapsed
18156
18157 \begin_layout Plain Layout
18158 author
18159 \end_layout
18160
18161 \end_inset
18162
18163  key is printed if it exists; otherwise, the editor key is printed, followed
18164  by 
18165 \begin_inset Quotes eld
18166 \end_inset
18167
18168 ,
18169 \begin_inset space ~
18170 \end_inset
18171
18172 ed.
18173 \begin_inset Quotes erd
18174 \end_inset
18175
18176  Note that the key is again enclosed in 
18177 \begin_inset Flex Code
18178 status collapsed
18179
18180 \begin_layout Plain Layout
18181 %
18182 \end_layout
18183
18184 \end_inset
18185
18186  signs; the entire conditional is enclosed in braces; and the if and else
18187  clauses are enclosed in double brackets, 
18188 \begin_inset Quotes eld
18189 \end_inset
18190
18191
18192 \begin_inset Flex Code
18193 status collapsed
18194
18195 \begin_layout Plain Layout
18196 [[
18197 \end_layout
18198
18199 \end_inset
18200
18201
18202 \begin_inset Quotes eld
18203 \end_inset
18204
18205  and 
18206 \begin_inset Quotes eld
18207 \end_inset
18208
18209
18210 \begin_inset Flex Code
18211 status collapsed
18212
18213 \begin_layout Plain Layout
18214 ]]
18215 \end_layout
18216
18217 \end_inset
18218
18219
18220 \begin_inset Quotes erd
18221 \end_inset
18222
18223 .
18224  There must be no space between any of these.
18225 \end_layout
18226
18227 \begin_layout Standard
18228 There is one other piece of syntax available in definitions, which looks
18229  like this: 
18230 \begin_inset Flex Code
18231 status collapsed
18232
18233 \begin_layout Plain Layout
18234 {!<i>!}
18235 \end_layout
18236
18237 \end_inset
18238
18239 .
18240  This defines a piece of formatting information that is to be used when
18241  creating 
18242 \begin_inset Quotes eld
18243 \end_inset
18244
18245 rich text
18246 \begin_inset Quotes erd
18247 \end_inset
18248
18249 .
18250  Obviously, we do not want to output HTML tags when writing plain text,
18251  so they should be wrapped in 
18252 \begin_inset Quotes eld
18253 \end_inset
18254
18255 {!
18256 \begin_inset Quotes erd
18257 \end_inset
18258
18259  and 
18260 \begin_inset Quotes eld
18261 \end_inset
18262
18263 !}
18264 \begin_inset Quotes erd
18265 \end_inset
18266
18267 .
18268 \end_layout
18269
18270 \begin_layout Standard
18271 Two special sorts of definitions are also possible in a 
18272 \begin_inset Flex Code
18273 status collapsed
18274
18275 \begin_layout Plain Layout
18276 CiteFormat
18277 \end_layout
18278
18279 \end_inset
18280
18281  block.
18282  An example of the first would be:
18283 \end_layout
18284
18285 \begin_layout LyX-Code
18286 !quotetitle 
18287 \begin_inset Quotes eld
18288 \end_inset
18289
18290 %title%
18291 \begin_inset Quotes erd
18292 \end_inset
18293
18294
18295 \end_layout
18296
18297 \begin_layout Standard
18298 This is an abbreviation, or macro, and it can be used by treating it as
18299  if it were a key: 
18300 \begin_inset Flex Code
18301 status collapsed
18302
18303 \begin_layout Plain Layout
18304 %!quotetitle%
18305 \end_layout
18306
18307 \end_inset
18308
18309 .
18310  LyX will treat 
18311 \begin_inset Flex Code
18312 status collapsed
18313
18314 \begin_layout Plain Layout
18315 %!quotetitle%
18316 \end_layout
18317
18318 \end_inset
18319
18320  exactly as it would treat its definition.
18321  So, let us issue the obvious 
18322 \emph on
18323 warning
18324 \emph default
18325 .
18326  Do not do this:
18327 \end_layout
18328
18329 \begin_layout LyX-Code
18330 !funfun %funfun%
18331 \end_layout
18332
18333 \begin_layout Standard
18334 or anything like it.
18335  LyX shouldn't go into an infinite loop, but it may go into a long one before
18336  it gives up.
18337 \end_layout
18338
18339 \begin_layout Standard
18340 The second sort of special definition might look like this:
18341 \end_layout
18342
18343 \begin_layout LyX-Code
18344 _pptext pp.
18345 \end_layout
18346
18347 \begin_layout Standard
18348 This defines a translatable piece of text, which allows relevant parts of
18349  the bibliography to be translated.
18350  It can be included in a definition by treating it as a key: 
18351 \begin_inset Flex Code
18352 status collapsed
18353
18354 \begin_layout Plain Layout
18355 %_pptext%
18356 \end_layout
18357
18358 \end_inset
18359
18360 .
18361  Several of these are predefined in 
18362 \begin_inset Flex Code
18363 status collapsed
18364
18365 \begin_layout Plain Layout
18366 stdciteformats.inc
18367 \end_layout
18368
18369 \end_inset
18370
18371 .
18372  Note that these are not macros, in the sense just defined.
18373  They will not be expanded.
18374 \end_layout
18375
18376 \begin_layout Standard
18377 So here then is an example that use all these features:
18378 \end_layout
18379
18380 \begin_layout LyX-Code
18381 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
18382 \end_layout
18383
18384 \begin_layout Standard
18385 This defines a macro that prints the author, followed by a comma, if the
18386  
18387 \begin_inset Flex Code
18388 status collapsed
18389
18390 \begin_layout Plain Layout
18391 author
18392 \end_layout
18393
18394 \end_inset
18395
18396  key is defined, or else prints the name of the editor, followed by the
18397  
18398 \begin_inset Flex Code
18399 status collapsed
18400
18401 \begin_layout Plain Layout
18402 _edtext
18403 \end_layout
18404
18405 \end_inset
18406
18407  or its translation (it is by default 
18408 \begin_inset Quotes eld
18409 \end_inset
18410
18411 ed.
18412 \begin_inset Quotes erd
18413 \end_inset
18414
18415 ), if the 
18416 \begin_inset Flex Code
18417 status collapsed
18418
18419 \begin_layout Plain Layout
18420 editor
18421 \end_layout
18422
18423 \end_inset
18424
18425  key is defined.
18426  Note that this is in fact defined in 
18427 \begin_inset Flex Code
18428 status collapsed
18429
18430 \begin_layout Plain Layout
18431 stdciteformats.inc
18432 \end_layout
18433
18434 \end_inset
18435
18436 , so you can use it in your own definitions, or re-definitions, if you load
18437  that file first.
18438 \end_layout
18439
18440 \begin_layout Section
18441 \begin_inset CommandInset label
18442 LatexCommand label
18443 name "sec:Tags-for-XHTML"
18444
18445 \end_inset
18446
18447 Tags for XHTML output
18448 \end_layout
18449
18450 \begin_layout Standard
18451 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
18452  by layout information.
18453  In general, LyX provides sensible defaults and, as mentioned earlier, it
18454  will even construct default CSS style rules from the other layout tags.
18455  For example, LyX will attempt to use the information provided in the 
18456 \begin_inset Flex Code
18457 status collapsed
18458
18459 \begin_layout Plain Layout
18460 Font
18461 \end_layout
18462
18463 \end_inset
18464
18465  declaration for the Chapter style to write CSS that will appropriately
18466  format chapter headings.
18467 \end_layout
18468
18469 \begin_layout Standard
18470 In many cases, then, you may not have to do anything at all to get acceptable
18471  XHTML output for your own environments, custom insets, and so forth.
18472  But in some cases you will, and so LyX provides a number of layout tags
18473  that can be used to customize the XHTML and CSS that are generated.
18474 \end_layout
18475
18476 \begin_layout Standard
18477 Note that there are two tags, 
18478 \begin_inset Flex Code
18479 status collapsed
18480
18481 \begin_layout Plain Layout
18482 HTMLPreamble
18483 \end_layout
18484
18485 \end_inset
18486
18487  and 
18488 \begin_inset Flex Code
18489 status collapsed
18490
18491 \begin_layout Plain Layout
18492 AddToHTMLPreamble
18493 \end_layout
18494
18495 \end_inset
18496
18497  that may appear outside style and inset declarations.
18498  See 
18499 \begin_inset CommandInset ref
18500 LatexCommand ref
18501 reference "sub:General-text-class"
18502
18503 \end_inset
18504
18505  for details on these.
18506 \end_layout
18507
18508 \begin_layout Subsection
18509 \begin_inset CommandInset label
18510 LatexCommand label
18511 name "sub:Paragraph-Style-XHTML"
18512
18513 \end_inset
18514
18515 Paragraph styles
18516 \end_layout
18517
18518 \begin_layout Standard
18519 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
18520  dealing with a normal paragraph, a command, or an environment, where this
18521  is itself determined by the contents of the corresponding 
18522 \begin_inset Flex Code
18523 status collapsed
18524
18525 \begin_layout Plain Layout
18526 LaTeXType
18527 \end_layout
18528
18529 \end_inset
18530
18531  tag.
18532  
18533 \end_layout
18534
18535 \begin_layout Standard
18536 For a command or normal paragraph, the output XHTML has the following form:
18537 \end_layout
18538
18539 \begin_layout LyX-Code
18540 <tag attr=
18541 \begin_inset Quotes erd
18542 \end_inset
18543
18544 value
18545 \begin_inset Quotes erd
18546 \end_inset
18547
18548 >
18549 \end_layout
18550
18551 \begin_layout LyX-Code
18552 <labeltag attr=
18553 \begin_inset Quotes erd
18554 \end_inset
18555
18556 value
18557 \begin_inset Quotes erd
18558 \end_inset
18559
18560 >Label</labeltag>
18561 \end_layout
18562
18563 \begin_layout LyX-Code
18564 Contents of the paragraph.
18565 \end_layout
18566
18567 \begin_layout LyX-Code
18568 </tag>
18569 \end_layout
18570
18571 \begin_layout Standard
18572 The label tags are of course omitted if the paragraph does not have a label.
18573 \end_layout
18574
18575 \begin_layout Standard
18576 For an environment that is not some sort of list, the XHTML takes this form:
18577 \end_layout
18578
18579 \begin_layout LyX-Code
18580 <tag attr=
18581 \begin_inset Quotes erd
18582 \end_inset
18583
18584 value
18585 \begin_inset Quotes erd
18586 \end_inset
18587
18588 >
18589 \end_layout
18590
18591 \begin_layout LyX-Code
18592 <itemtag attr=
18593 \begin_inset Quotes erd
18594 \end_inset
18595
18596 value
18597 \begin_inset Quotes erd
18598 \end_inset
18599
18600 ><labeltag attr=
18601 \begin_inset Quotes erd
18602 \end_inset
18603
18604 value
18605 \begin_inset Quotes erd
18606 \end_inset
18607
18608 >Environment Label</labeltag>First paragraph.</itemtag>
18609 \end_layout
18610
18611 \begin_layout LyX-Code
18612 <itemtag>Second paragraph.</itemtag>
18613 \end_layout
18614
18615 \begin_layout LyX-Code
18616 </tag>
18617 \end_layout
18618
18619 \begin_layout Standard
18620 Note that the label is output only for the first paragraph, as it should
18621  be for a theorem, for example.
18622  
18623 \end_layout
18624
18625 \begin_layout Standard
18626 For a list, we have one of these forms:
18627 \end_layout
18628
18629 \begin_layout LyX-Code
18630 <tag attr=
18631 \begin_inset Quotes erd
18632 \end_inset
18633
18634 value
18635 \begin_inset Quotes erd
18636 \end_inset
18637
18638 >
18639 \end_layout
18640
18641 \begin_layout LyX-Code
18642 <itemtag attr=
18643 \begin_inset Quotes erd
18644 \end_inset
18645
18646 value
18647 \begin_inset Quotes erd
18648 \end_inset
18649
18650 ><labeltag attr=
18651 \begin_inset Quotes erd
18652 \end_inset
18653
18654 value
18655 \begin_inset Quotes erd
18656 \end_inset
18657
18658 >List Label</labeltag>First item.</itemtag>
18659 \end_layout
18660
18661 \begin_layout LyX-Code
18662 <itemtag attr=
18663 \begin_inset Quotes erd
18664 \end_inset
18665
18666 value
18667 \begin_inset Quotes erd
18668 \end_inset
18669
18670 ><labeltag attr=
18671 \begin_inset Quotes erd
18672 \end_inset
18673
18674 value
18675 \begin_inset Quotes erd
18676 \end_inset
18677
18678 >List Label</labeltag>Second item.</itemtag>
18679 \end_layout
18680
18681 \begin_layout LyX-Code
18682 </tag>
18683 \end_layout
18684
18685 \begin_layout LyX-Code
18686
18687 \end_layout
18688
18689 \begin_layout LyX-Code
18690 <tag attr=
18691 \begin_inset Quotes erd
18692 \end_inset
18693
18694 value
18695 \begin_inset Quotes erd
18696 \end_inset
18697
18698 >
18699 \end_layout
18700
18701 \begin_layout LyX-Code
18702 <labeltag attr=
18703 \begin_inset Quotes erd
18704 \end_inset
18705
18706 value
18707 \begin_inset Quotes erd
18708 \end_inset
18709
18710 >List Label</labeltag><itemtag attr=
18711 \begin_inset Quotes erd
18712 \end_inset
18713
18714 value
18715 \begin_inset Quotes erd
18716 \end_inset
18717
18718 >First item.</itemtag>
18719 \end_layout
18720
18721 \begin_layout LyX-Code
18722 <labeltag attr=
18723 \begin_inset Quotes erd
18724 \end_inset
18725
18726 value
18727 \begin_inset Quotes erd
18728 \end_inset
18729
18730 >List Label</labeltag><itemtag attr=
18731 \begin_inset Quotes erd
18732 \end_inset
18733
18734 value
18735 \begin_inset Quotes erd
18736 \end_inset
18737
18738 >Second item.</itemtag>
18739 \end_layout
18740
18741 \begin_layout LyX-Code
18742 </tag>
18743 \end_layout
18744
18745 \begin_layout Standard
18746 Note the different orders of 
18747 \begin_inset Flex Code
18748 status collapsed
18749
18750 \begin_layout Plain Layout
18751 labeltag
18752 \end_layout
18753
18754 \end_inset
18755
18756  and 
18757 \begin_inset Flex Code
18758 status collapsed
18759
18760 \begin_layout Plain Layout
18761 itemtag
18762 \end_layout
18763
18764 \end_inset
18765
18766 .
18767  Which order we get depends upon the setting of 
18768 \begin_inset Flex Code
18769 status collapsed
18770
18771 \begin_layout Plain Layout
18772 HTMLLabelFirst
18773 \end_layout
18774
18775 \end_inset
18776
18777 : If 
18778 \begin_inset Flex Code
18779 status collapsed
18780
18781 \begin_layout Plain Layout
18782 HTMLLabelFirst
18783 \end_layout
18784
18785 \end_inset
18786
18787  is false (the default), you get the first of these, with the label within
18788  the item; if true, you get the second, with the label outside the item.
18789 \end_layout
18790
18791 \begin_layout Standard
18792 The specific tags and attributes output for each paragraph type can be controlle
18793 d by means of the layout tags we are about to describe.
18794  As mentioned earlier, however, LyX uses sensible defaults for many of these,
18795  so you often may not need to do very much to get good XHTML output.
18796  Think of the available tags as there so you can tweak things to your liking.
18797 \end_layout
18798
18799 \begin_layout Description
18800 \begin_inset Flex Code
18801 status collapsed
18802
18803 \begin_layout Plain Layout
18804 HTMLAttr
18805 \end_layout
18806
18807 \end_inset
18808
18809  [
18810 \begin_inset Flex Code
18811 status collapsed
18812
18813 \begin_layout Plain Layout
18814 string
18815 \end_layout
18816
18817 \end_inset
18818
18819 ] Specifies attribute information to be output with the main tag.
18820  For example, 
18821 \begin_inset Quotes eld
18822 \end_inset
18823
18824
18825 \begin_inset Flex Code
18826 status collapsed
18827
18828 \begin_layout Plain Layout
18829 class=`mydiv'
18830 \end_layout
18831
18832 \end_inset
18833
18834
18835 \begin_inset Quotes erd
18836 \end_inset
18837
18838 .
18839  By default, LyX will output 
18840 \begin_inset Quotes eld
18841 \end_inset
18842
18843
18844 \begin_inset Flex Code
18845 status collapsed
18846
18847 \begin_layout Plain Layout
18848 class=`layoutname'
18849 \end_layout
18850
18851 \end_inset
18852
18853
18854 \begin_inset Quotes erd
18855 \end_inset
18856
18857 , where 
18858 \begin_inset Flex Code
18859 status collapsed
18860
18861 \begin_layout Plain Layout
18862 layoutname
18863 \end_layout
18864
18865 \end_inset
18866
18867  is the LyX name of the layout, made lowercase, for example: chapter.
18868  This should 
18869 \emph on
18870 not
18871 \emph default
18872  contain any style information.
18873  Use 
18874 \begin_inset Flex Code
18875 status collapsed
18876
18877 \begin_layout Plain Layout
18878 HTMLStyle
18879 \end_layout
18880
18881 \end_inset
18882
18883  for that purpose.
18884 \end_layout
18885
18886 \begin_layout Description
18887 \begin_inset Flex Code
18888 status collapsed
18889
18890 \begin_layout Plain Layout
18891 HTMLForceCSS
18892 \end_layout
18893
18894 \end_inset
18895
18896  [
18897 \begin_inset Flex Code
18898 status collapsed
18899
18900 \begin_layout Plain Layout
18901
18902 \emph on
18903 0
18904 \emph default
18905 ,1
18906 \end_layout
18907
18908 \end_inset
18909
18910 ] Whether to output the default CSS information LyX generates for this layout,
18911  even if additional information is explicitly provided via 
18912 \begin_inset Flex Code
18913 status collapsed
18914
18915 \begin_layout Plain Layout
18916 HTMLStyle
18917 \end_layout
18918
18919 \end_inset
18920
18921 .
18922  Setting this to 
18923 \begin_inset Flex Code
18924 status collapsed
18925
18926 \begin_layout Plain Layout
18927 1
18928 \end_layout
18929
18930 \end_inset
18931
18932  allows you to alter or augment the generated CSS, rather than to override
18933  it completely.
18934  Default is 
18935 \begin_inset Flex Code
18936 status collapsed
18937
18938 \begin_layout Plain Layout
18939 0
18940 \end_layout
18941
18942 \end_inset
18943
18944 .
18945 \end_layout
18946
18947 \begin_layout Description
18948 \begin_inset Flex Code
18949 status collapsed
18950
18951 \begin_layout Plain Layout
18952 HTMLItem
18953 \end_layout
18954
18955 \end_inset
18956
18957  [
18958 \begin_inset Flex Code
18959 status collapsed
18960
18961 \begin_layout Plain Layout
18962 string
18963 \end_layout
18964
18965 \end_inset
18966
18967 ] The tag to be used for individual paragraphs of environments, replacing
18968  
18969 \begin_inset Flex Code
18970 status collapsed
18971
18972 \begin_layout Plain Layout
18973 itemtag
18974 \end_layout
18975
18976 \end_inset
18977
18978  in the examples above.
18979  Defaults to 
18980 \begin_inset Flex Code
18981 status collapsed
18982
18983 \begin_layout Plain Layout
18984 div
18985 \end_layout
18986
18987 \end_inset
18988
18989 .
18990 \end_layout
18991
18992 \begin_layout Description
18993 \begin_inset Flex Code
18994 status collapsed
18995
18996 \begin_layout Plain Layout
18997 HTMLItemAttr
18998 \end_layout
18999
19000 \end_inset
19001
19002  [
19003 \begin_inset Flex Code
19004 status collapsed
19005
19006 \begin_layout Plain Layout
19007 string
19008 \end_layout
19009
19010 \end_inset
19011
19012 ] Attributes for the item tag.
19013  Defaults to 
19014 \begin_inset Quotes eld
19015 \end_inset
19016
19017
19018 \begin_inset Flex Code
19019 status collapsed
19020
19021 \begin_layout Plain Layout
19022 class=`layoutname_item'
19023 \end_layout
19024
19025 \end_inset
19026
19027
19028 \begin_inset Quotes erd
19029 \end_inset
19030
19031 .
19032  This should 
19033 \emph on
19034 not
19035 \emph default
19036  contain any style information.
19037  Use 
19038 \begin_inset Flex Code
19039 status collapsed
19040
19041 \begin_layout Plain Layout
19042 HTMLStyle
19043 \end_layout
19044
19045 \end_inset
19046
19047  for that purpose.
19048 \end_layout
19049
19050 \begin_layout Description
19051 \begin_inset Flex Code
19052 status collapsed
19053
19054 \begin_layout Plain Layout
19055 HTMLLabel
19056 \end_layout
19057
19058 \end_inset
19059
19060  [
19061 \begin_inset Flex Code
19062 status collapsed
19063
19064 \begin_layout Plain Layout
19065 string
19066 \end_layout
19067
19068 \end_inset
19069
19070 ] The tag to be used for paragraph and item labels, replacing 
19071 \begin_inset Flex Code
19072 status collapsed
19073
19074 \begin_layout Plain Layout
19075 labeltag
19076 \end_layout
19077
19078 \end_inset
19079
19080  in the examples above.
19081  Defaults to 
19082 \begin_inset Flex Code
19083 status collapsed
19084
19085 \begin_layout Plain Layout
19086 span
19087 \end_layout
19088
19089 \end_inset
19090
19091 , unless 
19092 \begin_inset Flex Code
19093 status collapsed
19094
19095 \begin_layout Plain Layout
19096 LabelType
19097 \end_layout
19098
19099 \end_inset
19100
19101  is either 
19102 \begin_inset Flex Code
19103 status collapsed
19104
19105 \begin_layout Plain Layout
19106 Top_Environment
19107 \end_layout
19108
19109 \end_inset
19110
19111  or 
19112 \begin_inset Flex Code
19113 status collapsed
19114
19115 \begin_layout Plain Layout
19116 Centered_Top_Environment
19117 \end_layout
19118
19119 \end_inset
19120
19121 , in which case it defaults to 
19122 \begin_inset Flex Code
19123 status collapsed
19124
19125 \begin_layout Plain Layout
19126 div
19127 \end_layout
19128
19129 \end_inset
19130
19131 .
19132 \end_layout
19133
19134 \begin_layout Description
19135 \begin_inset Flex Code
19136 status collapsed
19137
19138 \begin_layout Plain Layout
19139 HTMLLabelAttr
19140 \end_layout
19141
19142 \end_inset
19143
19144  [
19145 \begin_inset Flex Code
19146 status collapsed
19147
19148 \begin_layout Plain Layout
19149 string
19150 \end_layout
19151
19152 \end_inset
19153
19154 ] Attributes for the label tag.
19155  Defaults to 
19156 \begin_inset Quotes eld
19157 \end_inset
19158
19159
19160 \begin_inset Flex Code
19161 status collapsed
19162
19163 \begin_layout Plain Layout
19164 class=`layoutname_label'
19165 \end_layout
19166
19167 \end_inset
19168
19169
19170 \begin_inset Quotes erd
19171 \end_inset
19172
19173 .
19174  This should 
19175 \emph on
19176 not
19177 \emph default
19178  contain any style information.
19179  Use 
19180 \begin_inset Flex Code
19181 status collapsed
19182
19183 \begin_layout Plain Layout
19184 HTMLStyle
19185 \end_layout
19186
19187 \end_inset
19188
19189  for that purpose.
19190 \end_layout
19191
19192 \begin_layout Description
19193 \begin_inset Flex Code
19194 status collapsed
19195
19196 \begin_layout Plain Layout
19197 HTMLLabelFirst
19198 \end_layout
19199
19200 \end_inset
19201
19202  [
19203 \begin_inset Flex Code
19204 status collapsed
19205
19206 \begin_layout Plain Layout
19207
19208 \emph on
19209 0
19210 \emph default
19211 ,1
19212 \end_layout
19213
19214 \end_inset
19215
19216 ] Meaningful only for list-like environments, this tag controls whether
19217  the label tag is output before or inside the item tag.
19218  This is used, for example, in the description environment, where we want
19219  `
19220 \begin_inset Flex Code
19221 status collapsed
19222
19223 \begin_layout Plain Layout
19224 <dt>\SpecialChar \ldots{}
19225 </dt><dd>\SpecialChar \ldots{}
19226 </dd>
19227 \end_layout
19228
19229 \end_inset
19230
19231 .
19232  Default is 
19233 \begin_inset Flex Code
19234 status collapsed
19235
19236 \begin_layout Plain Layout
19237 0
19238 \end_layout
19239
19240 \end_inset
19241
19242 : The label tag is output inside the item tag.
19243 \end_layout
19244
19245 \begin_layout Description
19246 \begin_inset Flex Code
19247 status collapsed
19248
19249 \begin_layout Plain Layout
19250 HTMLPreamble
19251 \end_layout
19252
19253 \end_inset
19254
19255  Information to be output in the 
19256 \begin_inset Flex Code
19257 status collapsed
19258
19259 \begin_layout Plain Layout
19260 <head>
19261 \end_layout
19262
19263 \end_inset
19264
19265  section when this style is used.
19266  This might, for example, be used to include a 
19267 \begin_inset Flex Code
19268 status collapsed
19269
19270 \begin_layout Plain Layout
19271 <script>
19272 \end_layout
19273
19274 \end_inset
19275
19276  block defining an 
19277 \begin_inset Flex Code
19278 status collapsed
19279
19280 \begin_layout Plain Layout
19281 onclick
19282 \end_layout
19283
19284 \end_inset
19285
19286  handler.
19287 \end_layout
19288
19289 \begin_layout Description
19290 \begin_inset Flex Code
19291 status collapsed
19292
19293 \begin_layout Plain Layout
19294 HTMLStyle
19295 \end_layout
19296
19297 \end_inset
19298
19299  CSS style information to be included when this style is used.
19300  Note that this will automatically be wrapped in a layout-generated 
19301 \begin_inset Flex Code
19302 status collapsed
19303
19304 \begin_layout Plain Layout
19305 <style>
19306 \end_layout
19307
19308 \end_inset
19309
19310  block, so only the CSS itself need be included.
19311 \end_layout
19312
19313 \begin_layout Description
19314 \begin_inset Flex Code
19315 status collapsed
19316
19317 \begin_layout Plain Layout
19318 HTMLTag
19319 \end_layout
19320
19321 \end_inset
19322
19323  [
19324 \begin_inset Flex Code
19325 status collapsed
19326
19327 \begin_layout Plain Layout
19328 string
19329 \end_layout
19330
19331 \end_inset
19332
19333 ] The tag to be used for the main label, replacing 
19334 \begin_inset Flex Code
19335 status collapsed
19336
19337 \begin_layout Plain Layout
19338 tag
19339 \end_layout
19340
19341 \end_inset
19342
19343  in the examples above.
19344  Defaults to 
19345 \begin_inset Flex Code
19346 status collapsed
19347
19348 \begin_layout Plain Layout
19349 div
19350 \end_layout
19351
19352 \end_inset
19353
19354 .
19355 \end_layout
19356
19357 \begin_layout Description
19358 \begin_inset Flex Code
19359 status collapsed
19360
19361 \begin_layout Plain Layout
19362 HTMLTitle
19363 \end_layout
19364
19365 \end_inset
19366
19367  [
19368 \begin_inset Flex Code
19369 status collapsed
19370
19371 \begin_layout Plain Layout
19372
19373 \emph on
19374 0
19375 \emph default
19376 ,1
19377 \end_layout
19378
19379 \end_inset
19380
19381 ] Marks this style as the one to be used to generate the 
19382 \begin_inset Flex Code
19383 status collapsed
19384
19385 \begin_layout Plain Layout
19386 <title>
19387 \end_layout
19388
19389 \end_inset
19390
19391  tag for the XHTML file.
19392  By default, it is false.
19393  The 
19394 \begin_inset Flex Code
19395 status collapsed
19396
19397 \begin_layout Plain Layout
19398 stdtitle.inc
19399 \end_layout
19400
19401 \end_inset
19402
19403  file sets it to true for the 
19404 \begin_inset Flex Code
19405 status collapsed
19406
19407 \begin_layout Plain Layout
19408 title
19409 \end_layout
19410
19411 \end_inset
19412
19413  environment.
19414  
19415 \end_layout
19416
19417 \begin_layout Subsection
19418 InsetLayout XHTML
19419 \end_layout
19420
19421 \begin_layout Standard
19422 The XHTML output of insets can also be controlled by information in layout
19423  files.
19424 \begin_inset Foot
19425 status collapsed
19426
19427 \begin_layout Plain Layout
19428 At present, this is true only for 
19429 \begin_inset Quotes eld
19430 \end_inset
19431
19432 text
19433 \begin_inset Quotes erd
19434 \end_inset
19435
19436  insets (insets you can type into) and is not true for 
19437 \begin_inset Quotes eld
19438 \end_inset
19439
19440 command
19441 \begin_inset Quotes erd
19442 \end_inset
19443
19444  insets (insets that are associated with dialog boxes).
19445 \end_layout
19446
19447 \end_inset
19448
19449  Here, too, LyX tries to provide sensible defaults, and it constructs default
19450  CSS style rules.
19451  But everything can be customized.
19452 \end_layout
19453
19454 \begin_layout Standard
19455 The XHTML LyX outputs for an inset has the following form:
19456 \end_layout
19457
19458 \begin_layout LyX-Code
19459 <tag attr=
19460 \begin_inset Quotes erd
19461 \end_inset
19462
19463 value
19464 \begin_inset Quotes erd
19465 \end_inset
19466
19467 >
19468 \end_layout
19469
19470 \begin_layout LyX-Code
19471 <labeltag>Label</labeltag>
19472 \end_layout
19473
19474 \begin_layout LyX-Code
19475 <innertag attr=
19476 \begin_inset Quotes erd
19477 \end_inset
19478
19479 value
19480 \begin_inset Quotes erd
19481 \end_inset
19482
19483 >Contents of the inset.</innertag>
19484 \end_layout
19485
19486 \begin_layout LyX-Code
19487 </tag>
19488 \end_layout
19489
19490 \begin_layout Standard
19491 If the inset permits multiple paragraphs---that is, if 
19492 \begin_inset Flex Code
19493 status collapsed
19494
19495 \begin_layout Plain Layout
19496 MultiPar
19497 \end_layout
19498
19499 \end_inset
19500
19501  is true---then the contents of the inset will itself be output as paragraphs
19502  formatted according to the styles used for those paragraphs (standard,
19503  quote, and the like).
19504  The label tag is of course omitted if the paragraph does not have a label
19505  and, at present, is always 
19506 \begin_inset Flex Code
19507 status collapsed
19508
19509 \begin_layout Plain Layout
19510 span
19511 \end_layout
19512
19513 \end_inset
19514
19515 .
19516  The inner tag is optional and, by default, does not appear.
19517 \end_layout
19518
19519 \begin_layout Standard
19520 The specific tags and attributes output for each inset can be controlled
19521  by means of the following layout tags.
19522 \end_layout
19523
19524 \begin_layout Description
19525 \begin_inset Flex Code
19526 status collapsed
19527
19528 \begin_layout Plain Layout
19529 HTMLAttr
19530 \end_layout
19531
19532 \end_inset
19533
19534  [
19535 \begin_inset Flex Code
19536 status collapsed
19537
19538 \begin_layout Plain Layout
19539 string
19540 \end_layout
19541
19542 \end_inset
19543
19544 ] Specifies attribute information to be output with the main tag.
19545  For example, 
19546 \begin_inset Quotes eld
19547 \end_inset
19548
19549
19550 \begin_inset Flex Code
19551 status collapsed
19552
19553 \begin_layout Plain Layout
19554 class=`myinset' onclick=`\SpecialChar \ldots{}
19555 '
19556 \end_layout
19557
19558 \end_inset
19559
19560
19561 \begin_inset Quotes erd
19562 \end_inset
19563
19564 .
19565  By default, LyX will output 
19566 \begin_inset Quotes eld
19567 \end_inset
19568
19569
19570 \begin_inset Flex Code
19571 status collapsed
19572
19573 \begin_layout Plain Layout
19574 class=`insetname'
19575 \end_layout
19576
19577 \end_inset
19578
19579
19580 \begin_inset Quotes erd
19581 \end_inset
19582
19583 , where 
19584 \begin_inset Flex Code
19585 status collapsed
19586
19587 \begin_layout Plain Layout
19588 insetname
19589 \end_layout
19590
19591 \end_inset
19592
19593  is the LyX name of the inset, made lowercase and with non-alphanumeric
19594  characters converted to underscores, for example: footnote.
19595 \end_layout
19596
19597 \begin_layout Description
19598 \begin_inset Flex Code
19599 status collapsed
19600
19601 \begin_layout Plain Layout
19602 HTMLForceCSS
19603 \end_layout
19604
19605 \end_inset
19606
19607  [
19608 \begin_inset Flex Code
19609 status collapsed
19610
19611 \begin_layout Plain Layout
19612
19613 \emph on
19614 0
19615 \emph default
19616 ,1
19617 \end_layout
19618
19619 \end_inset
19620
19621 ] Whether to output the default CSS information LyX generates for this layout,
19622  even if additional information is explicitly provided via 
19623 \begin_inset Flex Code
19624 status collapsed
19625
19626 \begin_layout Plain Layout
19627 HTMLStyle
19628 \end_layout
19629
19630 \end_inset
19631
19632 .
19633  Setting this to 
19634 \begin_inset Flex Code
19635 status collapsed
19636
19637 \begin_layout Plain Layout
19638 1
19639 \end_layout
19640
19641 \end_inset
19642
19643  allows you to alter or augment the generated CSS, rather than to override
19644  it completely.
19645  Default is 0.
19646 \end_layout
19647
19648 \begin_layout Description
19649 \begin_inset Flex Code
19650 status collapsed
19651
19652 \begin_layout Plain Layout
19653 HTMLInnerAttr
19654 \end_layout
19655
19656 \end_inset
19657
19658  [
19659 \begin_inset Flex Code
19660 status collapsed
19661
19662 \begin_layout Plain Layout
19663 string
19664 \end_layout
19665
19666 \end_inset
19667
19668 ] Attributes for the inner tag.
19669  Defaults to 
19670 \begin_inset Quotes eld
19671 \end_inset
19672
19673
19674 \begin_inset Flex Code
19675 status collapsed
19676
19677 \begin_layout Plain Layout
19678 class=`insetname_inner'
19679 \end_layout
19680
19681 \end_inset
19682
19683
19684 \begin_inset Quotes erd
19685 \end_inset
19686
19687 .
19688 \end_layout
19689
19690 \begin_layout Description
19691 \begin_inset Flex Code
19692 status collapsed
19693
19694 \begin_layout Plain Layout
19695 HTMLInnerTag
19696 \end_layout
19697
19698 \end_inset
19699
19700  [
19701 \begin_inset Flex Code
19702 status collapsed
19703
19704 \begin_layout Plain Layout
19705 string
19706 \end_layout
19707
19708 \end_inset
19709
19710 ] The inner tag, replacing 
19711 \begin_inset Flex Code
19712 status collapsed
19713
19714 \begin_layout Plain Layout
19715 innertag
19716 \end_layout
19717
19718 \end_inset
19719
19720  in the examples above.
19721  By default, there is none.
19722 \end_layout
19723
19724 \begin_layout Description
19725 \begin_inset Flex Code
19726 status collapsed
19727
19728 \begin_layout Plain Layout
19729 HTMLIsBlock
19730 \end_layout
19731
19732 \end_inset
19733
19734  [
19735 \begin_inset Flex Code
19736 status collapsed
19737
19738 \begin_layout Plain Layout
19739 0,
19740 \emph on
19741 1
19742 \end_layout
19743
19744 \end_inset
19745
19746 ] Whether this inset represents a standalone block of text (such as a footnote)
19747  or instead represents material that is included in the surrounding text
19748  (such as a branch).
19749  Defaults to 1.
19750 \end_layout
19751
19752 \begin_layout Description
19753 \begin_inset Flex Code
19754 status collapsed
19755
19756 \begin_layout Plain Layout
19757 HTMLLabel
19758 \end_layout
19759
19760 \end_inset
19761
19762  [
19763 \begin_inset Flex Code
19764 status collapsed
19765
19766 \begin_layout Plain Layout
19767 string
19768 \end_layout
19769
19770 \end_inset
19771
19772 ] A label for this inset, possibly including a reference to a counter.
19773  For example, for footnote, it might be: 
19774 \begin_inset Flex Code
19775 status collapsed
19776
19777 \begin_layout Plain Layout
19778
19779 \backslash
19780 arabic{footnote}
19781 \end_layout
19782
19783 \end_inset
19784
19785 .
19786  This is optional, and there is no default.
19787 \end_layout
19788
19789 \begin_layout Description
19790 \begin_inset Flex Code
19791 status collapsed
19792
19793 \begin_layout Plain Layout
19794 HTMLPreamble
19795 \end_layout
19796
19797 \end_inset
19798
19799  Information to be output in the 
19800 \begin_inset Flex Code
19801 status collapsed
19802
19803 \begin_layout Plain Layout
19804 <head>
19805 \end_layout
19806
19807 \end_inset
19808
19809  section when this style is used.
19810  This might, for example, be used to include a 
19811 \begin_inset Flex Code
19812 status collapsed
19813
19814 \begin_layout Plain Layout
19815 <script>
19816 \end_layout
19817
19818 \end_inset
19819
19820  block defining an 
19821 \begin_inset Flex Code
19822 status collapsed
19823
19824 \begin_layout Plain Layout
19825 onclick
19826 \end_layout
19827
19828 \end_inset
19829
19830  handler.
19831 \end_layout
19832
19833 \begin_layout Description
19834 \begin_inset Flex Code
19835 status collapsed
19836
19837 \begin_layout Plain Layout
19838 HTMLStyle
19839 \end_layout
19840
19841 \end_inset
19842
19843  CSS style information to be included when this style is used.
19844  Note that this will automatically be wrapped in a layout-generated 
19845 \begin_inset Flex Code
19846 status collapsed
19847
19848 \begin_layout Plain Layout
19849 <style>
19850 \end_layout
19851
19852 \end_inset
19853
19854  block, so only the CSS itself need be included.
19855 \end_layout
19856
19857 \begin_layout Description
19858 \begin_inset Flex Code
19859 status collapsed
19860
19861 \begin_layout Plain Layout
19862 HTMLTag
19863 \end_layout
19864
19865 \end_inset
19866
19867  [
19868 \begin_inset Flex Code
19869 status collapsed
19870
19871 \begin_layout Plain Layout
19872 string
19873 \end_layout
19874
19875 \end_inset
19876
19877 ] The tag to be used for the main label, replacing 
19878 \begin_inset Flex Code
19879 status collapsed
19880
19881 \begin_layout Plain Layout
19882 tag
19883 \end_layout
19884
19885 \end_inset
19886
19887  in the examples above.
19888  The default depends upon the setting of 
19889 \begin_inset Flex Code
19890 status collapsed
19891
19892 \begin_layout Plain Layout
19893 MultiPar
19894 \end_layout
19895
19896 \end_inset
19897
19898 : If 
19899 \begin_inset Flex Code
19900 status collapsed
19901
19902 \begin_layout Plain Layout
19903 MultiPar
19904 \end_layout
19905
19906 \end_inset
19907
19908  is true, the default is 
19909 \begin_inset Flex Code
19910 status collapsed
19911
19912 \begin_layout Plain Layout
19913 div
19914 \end_layout
19915
19916 \end_inset
19917
19918 ; if it is false, the default is 
19919 \begin_inset Flex Code
19920 status collapsed
19921
19922 \begin_layout Plain Layout
19923 span
19924 \end_layout
19925
19926 \end_inset
19927
19928 .
19929 \end_layout
19930
19931 \begin_layout Subsection
19932 Float XHTML
19933 \end_layout
19934
19935 \begin_layout Standard
19936 The XHTML output for floats too can be controlled by layout information.
19937  The output has the following form:
19938 \end_layout
19939
19940 \begin_layout LyX-Code
19941 <tag attr=
19942 \begin_inset Quotes erd
19943 \end_inset
19944
19945 value
19946 \begin_inset Quotes erd
19947 \end_inset
19948
19949 >
19950 \end_layout
19951
19952 \begin_layout LyX-Code
19953 Contents of the float.
19954 \end_layout
19955
19956 \begin_layout LyX-Code
19957 </tag>
19958 \end_layout
19959
19960 \begin_layout Standard
19961 The caption, if there is one, is a separate inset and will be output as
19962  such.
19963  Its appearance can be controlled via the InsetLayout for caption insets.
19964  
19965 \end_layout
19966
19967 \begin_layout Description
19968 \begin_inset Flex Code
19969 status collapsed
19970
19971 \begin_layout Plain Layout
19972 HTMLAttr
19973 \end_layout
19974
19975 \end_inset
19976
19977  [
19978 \begin_inset Flex Code
19979 status collapsed
19980
19981 \begin_layout Plain Layout
19982 string
19983 \end_layout
19984
19985 \end_inset
19986
19987 ] Specifies attribute information to be output with the main tag.
19988  For example, 
19989 \begin_inset Quotes eld
19990 \end_inset
19991
19992
19993 \begin_inset Flex Code
19994 status collapsed
19995
19996 \begin_layout Plain Layout
19997 class=`myfloat' onclick=`\SpecialChar \ldots{}
19998 '
19999 \end_layout
20000
20001 \end_inset
20002
20003
20004 \begin_inset Quotes erd
20005 \end_inset
20006
20007 .
20008  By default, LyX will output 
20009 \begin_inset Quotes eld
20010 \end_inset
20011
20012
20013 \begin_inset Flex Code
20014 status collapsed
20015
20016 \begin_layout Plain Layout
20017 class=`float float-floattype'
20018 \end_layout
20019
20020 \end_inset
20021
20022
20023 \begin_inset Quotes erd
20024 \end_inset
20025
20026 , where 
20027 \begin_inset Flex Code
20028 status collapsed
20029
20030 \begin_layout Plain Layout
20031 floattype
20032 \end_layout
20033
20034 \end_inset
20035
20036  is LyX's name for this type of float, as determined by the float declaration
20037  (see 
20038 \begin_inset CommandInset ref
20039 LatexCommand ref
20040 reference "sub:Floats"
20041
20042 \end_inset
20043
20044 ), though made lowercase and with non-alphanumeric characters converted
20045  to underscores, for example: float-table.
20046 \end_layout
20047
20048 \begin_layout Description
20049 \begin_inset Flex Code
20050 status collapsed
20051
20052 \begin_layout Plain Layout
20053 HTMLStyle
20054 \end_layout
20055
20056 \end_inset
20057
20058  CSS style information to be included when this float is used.
20059  Note that this will automatically be wrapped in a layout-generated 
20060 \begin_inset Flex Code
20061 status collapsed
20062
20063 \begin_layout Plain Layout
20064 <style>
20065 \end_layout
20066
20067 \end_inset
20068
20069  block, so only the CSS itself need be included.
20070 \end_layout
20071
20072 \begin_layout Description
20073 \begin_inset Flex Code
20074 status collapsed
20075
20076 \begin_layout Plain Layout
20077 HTMLTag
20078 \end_layout
20079
20080 \end_inset
20081
20082  [
20083 \begin_inset Flex Code
20084 status collapsed
20085
20086 \begin_layout Plain Layout
20087 string
20088 \end_layout
20089
20090 \end_inset
20091
20092 ] The tag to be used for this float, replacing 
20093 \begin_inset Quotes eld
20094 \end_inset
20095
20096
20097 \begin_inset Flex Code
20098 status collapsed
20099
20100 \begin_layout Plain Layout
20101 tag
20102 \end_layout
20103
20104 \end_inset
20105
20106
20107 \begin_inset Quotes erd
20108 \end_inset
20109
20110  in the example above.
20111  The default is 
20112 \begin_inset Flex Code
20113 status collapsed
20114
20115 \begin_layout Plain Layout
20116 div
20117 \end_layout
20118
20119 \end_inset
20120
20121  and will rarely need changing.
20122 \end_layout
20123
20124 \begin_layout Subsection
20125 Bibliography formatting
20126 \end_layout
20127
20128 \begin_layout Standard
20129 The bibliography can be formatted using 
20130 \begin_inset Flex Code
20131 status collapsed
20132
20133 \begin_layout Plain Layout
20134 CiteFormat
20135 \end_layout
20136
20137 \end_inset
20138
20139  blocks.
20140  See Section 
20141 \begin_inset CommandInset ref
20142 LatexCommand ref
20143 reference "sub:Citation-format-description"
20144
20145 \end_inset
20146
20147  for the details.
20148 \end_layout
20149
20150 \begin_layout Subsection
20151 LyX-generated CSS
20152 \end_layout
20153
20154 \begin_layout Standard
20155 We have several times mentioned that LyX will generate default CSS style
20156  rules for both insets and paragraph styles, based upon the other layout
20157  information that is provided.
20158  In this section, we shall say a word about which layout information LyX
20159  uses and how.
20160 \end_layout
20161
20162 \begin_layout Standard
20163 At present, LyX auto-generates CSS only for font information, making use
20164  of the 
20165 \begin_inset Flex Code
20166 status collapsed
20167
20168 \begin_layout Plain Layout
20169 Family
20170 \end_layout
20171
20172 \end_inset
20173
20174
20175 \begin_inset Flex Code
20176 status collapsed
20177
20178 \begin_layout Plain Layout
20179 Series
20180 \end_layout
20181
20182 \end_inset
20183
20184
20185 \begin_inset Flex Code
20186 status collapsed
20187
20188 \begin_layout Plain Layout
20189 Shape
20190 \end_layout
20191
20192 \end_inset
20193
20194 , and 
20195 \begin_inset Flex Code
20196 status collapsed
20197
20198 \begin_layout Plain Layout
20199 Size
20200 \end_layout
20201
20202 \end_inset
20203
20204  specified in the 
20205 \begin_inset Flex Code
20206 status collapsed
20207
20208 \begin_layout Plain Layout
20209 Font
20210 \end_layout
20211
20212 \end_inset
20213
20214  declaration.
20215  (See 
20216 \begin_inset CommandInset ref
20217 LatexCommand ref
20218 reference "sub:Font-description"
20219
20220 \end_inset
20221
20222 .) The translation is mostly straightforward and obvious.
20223  For example, 
20224 \begin_inset Quotes eld
20225 \end_inset
20226
20227
20228 \begin_inset Flex Code
20229 status collapsed
20230
20231 \begin_layout Plain Layout
20232 Family Sans
20233 \end_layout
20234
20235 \end_inset
20236
20237
20238 \begin_inset Quotes erd
20239 \end_inset
20240
20241  becomes 
20242 \begin_inset Quotes eld
20243 \end_inset
20244
20245
20246 \begin_inset Flex Code
20247 status collapsed
20248
20249 \begin_layout Plain Layout
20250 font-family: sans-serif;
20251 \end_layout
20252
20253 \end_inset
20254
20255
20256 \begin_inset Quotes erd
20257 \end_inset
20258
20259 .
20260  The correspondence of LyX sizes and CSS sizes is a little less obvious
20261  but nonetheless intuitive.
20262  See the 
20263 \begin_inset Flex Code
20264 status collapsed
20265
20266 \begin_layout Plain Layout
20267 getSizeCSS()
20268 \end_layout
20269
20270 \end_inset
20271
20272  function in 
20273 \begin_inset Flex URL
20274 status collapsed
20275
20276 \begin_layout Plain Layout
20277
20278 src/FontInfo.cpp
20279 \end_layout
20280
20281 \end_inset
20282
20283  for the details.
20284 \end_layout
20285
20286 \begin_layout Chapter
20287 Including External Material
20288 \end_layout
20289
20290 \begin_layout Standard
20291 \begin_inset Box Shadowbox
20292 position "t"
20293 hor_pos "c"
20294 has_inner_box 1
20295 inner_pos "t"
20296 use_parbox 0
20297 use_makebox 0
20298 width "100col%"
20299 special "none"
20300 height "1in"
20301 height_special "totalheight"
20302 status open
20303
20304 \begin_layout Plain Layout
20305 WARNING: This portion of the documentation has not been updated for some
20306  time.
20307  We certainly hope that it is still accurate, but there are no guarantees.
20308 \end_layout
20309
20310 \end_inset
20311
20312
20313 \end_layout
20314
20315 \begin_layout Standard
20316 The use of material from sources external to LyX is covered in detail in
20317  the 
20318 \emph on
20319 Embedded Objects
20320 \emph default
20321  manual.
20322  This part of the manual covers what needs to happen behind the scenes for
20323  new sorts of material to be included.
20324 \end_layout
20325
20326 \begin_layout Section
20327 How does it work?
20328 \end_layout
20329
20330 \begin_layout Standard
20331 The external material feature is based on the concept of a 
20332 \emph on
20333 template
20334 \emph default
20335 .
20336  A template is a specification of how LyX should interface with a certain
20337  kind of material.
20338  As bundled, LyX comes with predefined templates for Xfig figures, various
20339  raster format images, chess diagrams, and LilyPond music notation.
20340  You can check the actual list by using the menu 
20341 \begin_inset Flex MenuItem
20342 status collapsed
20343
20344 \begin_layout Plain Layout
20345 Insert\SpecialChar \menuseparator
20346 File\SpecialChar \menuseparator
20347 External Material
20348 \end_layout
20349
20350 \end_inset
20351
20352 .
20353  Furthermore, it is possible to roll your own template to support a specific
20354  kind of material.
20355  Later we'll describe in more detail what is involved, and hopefully you
20356  will submit all the templates you create so we can include them in a later
20357  LyX version.
20358 \end_layout
20359
20360 \begin_layout Standard
20361 Another basic idea of the external material feature is to distinguish between
20362  the original file that serves as a base for final material and the produced
20363  file that is included in your exported or printed document.
20364  For example, consider the case of a figure produced with 
20365 \begin_inset Flex Code
20366 status collapsed
20367
20368 \begin_layout Plain Layout
20369 Xfig
20370 \end_layout
20371
20372 \end_inset
20373
20374 .
20375  The Xfig application itself works on an original file with the 
20376 \begin_inset Flex Code
20377 status collapsed
20378
20379 \begin_layout Plain Layout
20380 .fig
20381 \end_layout
20382
20383 \end_inset
20384
20385  extension.
20386  Within Xfig, you create and change your figure, and when you are done,
20387  you save the 
20388 \begin_inset Flex Code
20389 status collapsed
20390
20391 \begin_layout Plain Layout
20392 fig
20393 \end_layout
20394
20395 \end_inset
20396
20397 -file.
20398  When you want to include the figure in your document, you invoke 
20399 \begin_inset Flex Code
20400 status collapsed
20401
20402 \begin_layout Plain Layout
20403 transfig
20404 \end_layout
20405
20406 \end_inset
20407
20408  in order to create a PostScript file that can readily be included in your
20409  LaTeX file.
20410  In this case, the 
20411 \begin_inset Flex Code
20412 status collapsed
20413
20414 \begin_layout Plain Layout
20415 .fig
20416 \end_layout
20417
20418 \end_inset
20419
20420  file is the original file, and the PostScript file is the produced file.
20421 \end_layout
20422
20423 \begin_layout Standard
20424 This distinction is important in order to allow updating of the material
20425  while you are in the process of writing the document.
20426  Furthermore, it provides us with the flexibility that is needed to support
20427  multiple export formats.
20428  For instance, in the case of a plain text file, it is not exactly an award-winn
20429 ing idea to include the figure as raw PostScript.
20430  Instead, you would either prefer to just include a reference to the figure
20431  or try to invoke some graphics to ASCII converter to make the final result
20432  look similar to the real graphics.
20433  The external material management allows you to do this, because it is parametri
20434 zed on the different export formats that LyX supports.
20435 \end_layout
20436
20437 \begin_layout Standard
20438 Besides supporting the production of different products according to the
20439  exported format, it supports tight integration with editing and viewing
20440  applications.
20441  In the case of an Xfig figure, you are able to invoke Xfig on the original
20442  file with a single click from within the external material dialog in LyX,
20443  and also preview the produced PostScript file with Ghostview with another
20444  click.
20445  No more fiddling around with the command line and/or file browsers to locate
20446  and manipulate the original or produced files.
20447  In this way, you are finally able to take full advantage of the many different
20448  applications that are relevant to use when you write your documents, and
20449  ultimately be more productive.
20450 \end_layout
20451
20452 \begin_layout Section
20453 The external template configuration file
20454 \end_layout
20455
20456 \begin_layout Standard
20457 It is relatively easy to add custom external template definitions to LyX.
20458  However, be aware that doing this in an careless manner most probably 
20459 \emph on
20460 will
20461 \emph default
20462  introduce an easily exploitable security hole.
20463  So before you do this, please read the discussion about security in section
20464  
20465 \begin_inset CommandInset ref
20466 LatexCommand ref
20467 reference "sec:Security-discussion"
20468
20469 \end_inset
20470
20471 .
20472 \end_layout
20473
20474 \begin_layout Standard
20475 Having said that, we encourage you to submit any interesting templates that
20476  you create.
20477  
20478 \end_layout
20479
20480 \begin_layout Standard
20481 The external templates are defined in the 
20482 \begin_inset Flex Code
20483 status collapsed
20484
20485 \begin_layout Plain Layout
20486 LyXDir/lib/external_templates
20487 \end_layout
20488
20489 \end_inset
20490
20491  file.
20492  You can place your own version in 
20493 \begin_inset Flex Code
20494 status collapsed
20495
20496 \begin_layout Plain Layout
20497 UserDir/external_templates
20498 \end_layout
20499
20500 \end_inset
20501
20502 .
20503 \end_layout
20504
20505 \begin_layout Standard
20506 A typical template looks like this:
20507 \end_layout
20508
20509 \begin_layout LyX-Code
20510 Template XFig
20511 \end_layout
20512
20513 \begin_layout LyX-Code
20514 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
20515 \end_layout
20516
20517 \begin_layout LyX-Code
20518 HelpText
20519 \end_layout
20520
20521 \begin_layout LyX-Code
20522 An XFig figure.
20523 \end_layout
20524
20525 \begin_layout LyX-Code
20526 HelpTextEnd
20527 \end_layout
20528
20529 \begin_layout LyX-Code
20530 InputFormat fig
20531 \end_layout
20532
20533 \begin_layout LyX-Code
20534 FileFilter "*.fig"
20535 \end_layout
20536
20537 \begin_layout LyX-Code
20538 AutomaticProduction true
20539 \end_layout
20540
20541 \begin_layout LyX-Code
20542 Transform Rotate
20543 \end_layout
20544
20545 \begin_layout LyX-Code
20546 Transform Resize
20547 \end_layout
20548
20549 \begin_layout LyX-Code
20550 Format LaTeX
20551 \end_layout
20552
20553 \begin_layout LyX-Code
20554 TransformCommand Rotate RotationLatexCommand
20555 \end_layout
20556
20557 \begin_layout LyX-Code
20558 TransformCommand Resize ResizeLatexCommand
20559 \end_layout
20560
20561 \begin_layout LyX-Code
20562 Product "$$RotateFront$$ResizeFront
20563 \end_layout
20564
20565 \begin_layout LyX-Code
20566          
20567 \backslash
20568
20569 \backslash
20570 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
20571 \end_layout
20572
20573 \begin_layout LyX-Code
20574          $$ResizeBack$$RotateBack"
20575 \end_layout
20576
20577 \begin_layout LyX-Code
20578 UpdateFormat pstex
20579 \end_layout
20580
20581 \begin_layout LyX-Code
20582 UpdateResult "$$AbsPath$$Basename.pstex_t"
20583 \end_layout
20584
20585 \begin_layout LyX-Code
20586 Requirement "graphicx"
20587 \end_layout
20588
20589 \begin_layout LyX-Code
20590 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
20591 \end_layout
20592
20593 \begin_layout LyX-Code
20594 ReferencedFile latex "$$AbsPath$$Basename.eps"
20595 \end_layout
20596
20597 \begin_layout LyX-Code
20598 ReferencedFile dvi "$$AbsPath$$Basename.eps"
20599 \end_layout
20600
20601 \begin_layout LyX-Code
20602 FormatEnd
20603 \end_layout
20604
20605 \begin_layout LyX-Code
20606 Format PDFLaTeX
20607 \end_layout
20608
20609 \begin_layout LyX-Code
20610 TransformCommand Rotate RotationLatexCommand
20611 \end_layout
20612
20613 \begin_layout LyX-Code
20614 TransformCommand Resize ResizeLatexCommand
20615 \end_layout
20616
20617 \begin_layout LyX-Code
20618 Product "$$RotateFront$$ResizeFront
20619 \end_layout
20620
20621 \begin_layout LyX-Code
20622          
20623 \backslash
20624
20625 \backslash
20626 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
20627 \end_layout
20628
20629 \begin_layout LyX-Code
20630          $$ResizeBack$$RotateBack"
20631 \end_layout
20632
20633 \begin_layout LyX-Code
20634 UpdateFormat pdftex
20635 \end_layout
20636
20637 \begin_layout LyX-Code
20638 UpdateResult "$$AbsPath$$Basename.pdftex_t"
20639 \end_layout
20640
20641 \begin_layout LyX-Code
20642 Requirement "graphicx"
20643 \end_layout
20644
20645 \begin_layout LyX-Code
20646 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
20647 \end_layout
20648
20649 \begin_layout LyX-Code
20650 ReferencedFile latex "$$AbsPath$$Basename.pdf"
20651 \end_layout
20652
20653 \begin_layout LyX-Code
20654 FormatEnd
20655 \end_layout
20656
20657 \begin_layout LyX-Code
20658 Format Ascii
20659 \end_layout
20660
20661 \begin_layout LyX-Code
20662 Product "$$Contents(
20663 \backslash
20664 "$$AbsPath$$Basename.asc
20665 \backslash
20666 ")"
20667 \end_layout
20668
20669 \begin_layout LyX-Code
20670 UpdateFormat asciixfig
20671 \end_layout
20672
20673 \begin_layout LyX-Code
20674 UpdateResult "$$AbsPath$$Basename.asc"
20675 \end_layout
20676
20677 \begin_layout LyX-Code
20678 FormatEnd
20679 \end_layout
20680
20681 \begin_layout LyX-Code
20682 Format DocBook
20683 \end_layout
20684
20685 \begin_layout LyX-Code
20686 Product "<graphic fileref=
20687 \backslash
20688 "$$AbsOrRelPathMaster$$Basename.eps
20689 \backslash
20690 ">
20691 \end_layout
20692
20693 \begin_layout LyX-Code
20694          </graphic>"
20695 \end_layout
20696
20697 \begin_layout LyX-Code
20698 UpdateFormat eps
20699 \end_layout
20700
20701 \begin_layout LyX-Code
20702 UpdateResult "$$AbsPath$$Basename.eps"
20703 \end_layout
20704
20705 \begin_layout LyX-Code
20706 ReferencedFile docbook "$$AbsPath$$Basename.eps"
20707 \end_layout
20708
20709 \begin_layout LyX-Code
20710 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
20711 \end_layout
20712
20713 \begin_layout LyX-Code
20714 FormatEnd
20715 \end_layout
20716
20717 \begin_layout LyX-Code
20718 Product "[XFig: $$FName]"
20719 \end_layout
20720
20721 \begin_layout LyX-Code
20722 FormatEnd
20723 \end_layout
20724
20725 \begin_layout LyX-Code
20726 TemplateEnd
20727 \end_layout
20728
20729 \begin_layout Standard
20730 As you can see, the template is enclosed in 
20731 \begin_inset Flex Code
20732 status collapsed
20733
20734 \begin_layout Plain Layout
20735 Template
20736 \end_layout
20737
20738 \end_inset
20739
20740  \SpecialChar \ldots{}
20741  
20742 \begin_inset Flex Code
20743 status collapsed
20744
20745 \begin_layout Plain Layout
20746 TemplateEnd
20747 \end_layout
20748
20749 \end_inset
20750
20751 .
20752  It contains a header specifying some general settings and, for each supported
20753  primary document file format, a section 
20754 \begin_inset Flex Code
20755 status collapsed
20756
20757 \begin_layout Plain Layout
20758 Format
20759 \end_layout
20760
20761 \end_inset
20762
20763  \SpecialChar \ldots{}
20764  
20765 \begin_inset Flex Code
20766 status collapsed
20767
20768 \begin_layout Plain Layout
20769 FormatEnd
20770 \end_layout
20771
20772 \end_inset
20773
20774 .
20775 \end_layout
20776
20777 \begin_layout Subsection
20778 The template header
20779 \end_layout
20780
20781 \begin_layout Description
20782 \begin_inset Flex Code
20783 status collapsed
20784
20785 \begin_layout Plain Layout
20786 AutomaticProduction
20787 \begin_inset space ~
20788 \end_inset
20789
20790 true|false
20791 \end_layout
20792
20793 \end_inset
20794
20795  Whether the file represented by the template must be generated by LyX.
20796  This command must occur exactly once.
20797 \end_layout
20798
20799 \begin_layout Description
20800 \begin_inset Flex Code
20801 status collapsed
20802
20803 \begin_layout Plain Layout
20804 FileFilter
20805 \begin_inset space ~
20806 \end_inset
20807
20808 <pattern>
20809 \end_layout
20810
20811 \end_inset
20812
20813  A glob pattern that is used in the file dialog to filter out the desired
20814  files.
20815  If there is more than one possible file extension (e.
20816 \begin_inset space \thinspace{}
20817 \end_inset
20818
20819 g.
20820 \begin_inset space \space{}
20821 \end_inset
20822
20823 tgif has 
20824 \begin_inset Flex Code
20825 status collapsed
20826
20827 \begin_layout Plain Layout
20828 .obj
20829 \end_layout
20830
20831 \end_inset
20832
20833  and 
20834 \begin_inset Flex Code
20835 status collapsed
20836
20837 \begin_layout Plain Layout
20838 .tgo
20839 \end_layout
20840
20841 \end_inset
20842
20843 ), use something like 
20844 \begin_inset Flex Code
20845 status collapsed
20846
20847 \begin_layout Plain Layout
20848 "*.{obj,tgo}"
20849 \end_layout
20850
20851 \end_inset
20852
20853 .
20854  This command must occur exactly once.
20855 \end_layout
20856
20857 \begin_layout Description
20858 \begin_inset Flex Code
20859 status collapsed
20860
20861 \begin_layout Plain Layout
20862 GuiName
20863 \begin_inset space ~
20864 \end_inset
20865
20866 <guiname>
20867 \end_layout
20868
20869 \end_inset
20870
20871  The text that is displayed on the button.
20872  This command must occur exactly once.
20873 \end_layout
20874
20875 \begin_layout Description
20876 \begin_inset Flex Code
20877 status collapsed
20878
20879 \begin_layout Plain Layout
20880 HelpText
20881 \begin_inset space ~
20882 \end_inset
20883
20884 <text>
20885 \begin_inset space ~
20886 \end_inset
20887
20888 HelpTextEnd
20889 \end_layout
20890
20891 \end_inset
20892
20893  The help text that is used in the External dialog.
20894  Provide enough information to explain to the user just what the template
20895  can provide him with.
20896  This command must occur exactly once.
20897 \end_layout
20898
20899 \begin_layout Description
20900 \begin_inset Flex Code
20901 status collapsed
20902
20903 \begin_layout Plain Layout
20904 InputFormat
20905 \begin_inset space ~
20906 \end_inset
20907
20908 <format>
20909 \end_layout
20910
20911 \end_inset
20912
20913  The file format of the original file.
20914  This must be the name of a format that is known to LyX (see section
20915 \begin_inset space ~
20916 \end_inset
20917
20918
20919 \begin_inset CommandInset ref
20920 LatexCommand ref
20921 reference "sec:Formats"
20922
20923 \end_inset
20924
20925 ).
20926  Use 
20927 \begin_inset Quotes eld
20928 \end_inset
20929
20930
20931 \begin_inset Flex Code
20932 status collapsed
20933
20934 \begin_layout Plain Layout
20935 *
20936 \end_layout
20937
20938 \end_inset
20939
20940
20941 \begin_inset Quotes erd
20942 \end_inset
20943
20944  if the template can handle original files of more than one format.
20945  LyX will attempt to interrogate the file itself in order to deduce its
20946  format in this case.
20947  This command must occur exactly once.
20948 \end_layout
20949
20950 \begin_layout Description
20951 \begin_inset Flex Code
20952 status collapsed
20953
20954 \begin_layout Plain Layout
20955 Template
20956 \begin_inset space ~
20957 \end_inset
20958
20959 <id>
20960 \end_layout
20961
20962 \end_inset
20963
20964  A unique name for the template.
20965  It must not contain substitution macros (see below).
20966 \end_layout
20967
20968 \begin_layout Description
20969 \begin_inset Flex Code
20970 status collapsed
20971
20972 \begin_layout Plain Layout
20973 Transform
20974 \begin_inset space ~
20975 \end_inset
20976
20977 Rotate|Resize|Clip|Extra
20978 \end_layout
20979
20980 \end_inset
20981
20982  This command specifies which transformations are supported by this template.
20983  It may occur zero or more times.
20984  This command enables the corresponding tabs in the external dialog.
20985  Each 
20986 \begin_inset Flex Code
20987 status collapsed
20988
20989 \begin_layout Plain Layout
20990 Transform
20991 \end_layout
20992
20993 \end_inset
20994
20995  command must have either a corresponding 
20996 \begin_inset Flex Code
20997 status collapsed
20998
20999 \begin_layout Plain Layout
21000 TransformCommand
21001 \end_layout
21002
21003 \end_inset
21004
21005  or a 
21006 \begin_inset Flex Code
21007 status collapsed
21008
21009 \begin_layout Plain Layout
21010 TransformOption
21011 \end_layout
21012
21013 \end_inset
21014
21015  command in the 
21016 \begin_inset Flex Code
21017 status collapsed
21018
21019 \begin_layout Plain Layout
21020 Format
21021 \end_layout
21022
21023 \end_inset
21024
21025  section.
21026  Otherwise the transformation will not be supported by that format.
21027 \end_layout
21028
21029 \begin_layout Subsection
21030 The Format section
21031 \end_layout
21032
21033 \begin_layout Description
21034 \begin_inset Flex Code
21035 status collapsed
21036
21037 \begin_layout Plain Layout
21038 Format
21039 \begin_inset space ~
21040 \end_inset
21041
21042 LaTeX|PDFLaTeX|PlainText|DocBook
21043 \end_layout
21044
21045 \end_inset
21046
21047  The primary document file format that this format definition is for.
21048  Not every template has a sensible representation in all document file formats.
21049  Please define nevertheless a 
21050 \begin_inset Flex Code
21051 status collapsed
21052
21053 \begin_layout Plain Layout
21054 Format
21055 \end_layout
21056
21057 \end_inset
21058
21059  section for all templates.
21060  Use a dummy text when no representation is available.
21061  Then you can at least see a reference to the external material in the exported
21062  document.
21063 \end_layout
21064
21065 \begin_layout Description
21066 \begin_inset Flex Code
21067 status collapsed
21068
21069 \begin_layout Plain Layout
21070 Option
21071 \begin_inset space ~
21072 \end_inset
21073
21074 <name>
21075 \begin_inset space ~
21076 \end_inset
21077
21078 <value>
21079 \end_layout
21080
21081 \end_inset
21082
21083  This command defines an additional macro 
21084 \begin_inset Flex Code
21085 status collapsed
21086
21087 \begin_layout Plain Layout
21088 $$<name>
21089 \end_layout
21090
21091 \end_inset
21092
21093  for substitution in 
21094 \begin_inset Flex Code
21095 status collapsed
21096
21097 \begin_layout Plain Layout
21098 Product
21099 \end_layout
21100
21101 \end_inset
21102
21103 .
21104  
21105 \begin_inset Flex Code
21106 status collapsed
21107
21108 \begin_layout Plain Layout
21109 <value>
21110 \end_layout
21111
21112 \end_inset
21113
21114  itself may contain substitution macros.
21115  The advantage over using 
21116 \begin_inset Flex Code
21117 status collapsed
21118
21119 \begin_layout Plain Layout
21120 <value>
21121 \end_layout
21122
21123 \end_inset
21124
21125  directly in 
21126 \begin_inset Flex Code
21127 status collapsed
21128
21129 \begin_layout Plain Layout
21130 Product
21131 \end_layout
21132
21133 \end_inset
21134
21135  is that the substituted value of 
21136 \begin_inset Flex Code
21137 status collapsed
21138
21139 \begin_layout Plain Layout
21140 $$<name>
21141 \end_layout
21142
21143 \end_inset
21144
21145  is sanitized so that it is a valid optional argument in the document format.
21146  This command may occur zero or more times.
21147 \end_layout
21148
21149 \begin_layout Description
21150 \begin_inset Flex Code
21151 status collapsed
21152
21153 \begin_layout Plain Layout
21154 Product
21155 \begin_inset space ~
21156 \end_inset
21157
21158 <text>
21159 \end_layout
21160
21161 \end_inset
21162
21163  The text that is inserted in the exported document.
21164  This is actually the most important command and can be quite complex.
21165  This command must occur exactly once.
21166 \end_layout
21167
21168 \begin_layout Description
21169 \begin_inset Flex Code
21170 status collapsed
21171
21172 \begin_layout Plain Layout
21173 Preamble
21174 \begin_inset space ~
21175 \end_inset
21176
21177 <name>
21178 \end_layout
21179
21180 \end_inset
21181
21182  This command specifies a preamble snippet that will be included in the
21183  LaTeX preamble.
21184  It has to be defined using 
21185 \begin_inset Flex Code
21186 status collapsed
21187
21188 \begin_layout Plain Layout
21189 PreambleDef
21190 \end_layout
21191
21192 \end_inset
21193
21194  \SpecialChar \ldots{}
21195  
21196 \begin_inset Flex Code
21197 status collapsed
21198
21199 \begin_layout Plain Layout
21200 PreambleDefEnd
21201 \end_layout
21202
21203 \end_inset
21204
21205 .
21206  This command may occur zero or more times.
21207 \end_layout
21208
21209 \begin_layout Description
21210 \begin_inset Flex Code
21211 status collapsed
21212
21213 \begin_layout Plain Layout
21214 ReferencedFile
21215 \begin_inset space ~
21216 \end_inset
21217
21218 <format>
21219 \begin_inset space ~
21220 \end_inset
21221
21222 <filename>
21223 \end_layout
21224
21225 \end_inset
21226
21227  This command denotes files that are created by the conversion process and
21228  are needed for a particular export format.
21229  If the filename is relative, it is interpreted relative to the master document.
21230  This command may be given zero or more times.
21231 \end_layout
21232
21233 \begin_layout Description
21234 \begin_inset Flex Code
21235 status collapsed
21236
21237 \begin_layout Plain Layout
21238 Requirement
21239 \begin_inset space ~
21240 \end_inset
21241
21242 <package>
21243 \end_layout
21244
21245 \end_inset
21246
21247  The name of a required LaTeX package.
21248  The package is included via 
21249 \begin_inset Flex Code
21250 status collapsed
21251
21252 \begin_layout Plain Layout
21253
21254 \backslash
21255 usepackage{}
21256 \end_layout
21257
21258 \end_inset
21259
21260  in the LaTeX preamble.
21261  This command may occur zero or more times.
21262 \end_layout
21263
21264 \begin_layout Description
21265 \begin_inset Flex Code
21266 status collapsed
21267
21268 \begin_layout Plain Layout
21269 TransformCommand
21270 \begin_inset space ~
21271 \end_inset
21272
21273 Rotate
21274 \begin_inset space ~
21275 \end_inset
21276
21277 RotationLatexCommand
21278 \end_layout
21279
21280 \end_inset
21281
21282  This command specifies that the built in LaTeX command should be used for
21283  rotation.
21284  This command may occur once or not at all.
21285 \end_layout
21286
21287 \begin_layout Description
21288 \begin_inset Flex Code
21289 status collapsed
21290
21291 \begin_layout Plain Layout
21292 TransformCommand
21293 \begin_inset space ~
21294 \end_inset
21295
21296 Resize
21297 \begin_inset space ~
21298 \end_inset
21299
21300 ResizeLatexCommand
21301 \end_layout
21302
21303 \end_inset
21304
21305  This command specifies that the built in LaTeX command should be used for
21306  resizing.
21307  This command may occur once or not at all.
21308 \end_layout
21309
21310 \begin_layout Description
21311 \begin_inset Flex Code
21312 status collapsed
21313
21314 \begin_layout Plain Layout
21315 TransformOption
21316 \begin_inset space ~
21317 \end_inset
21318
21319 Rotate
21320 \begin_inset space ~
21321 \end_inset
21322
21323 RotationLatexOption
21324 \end_layout
21325
21326 \end_inset
21327
21328  This command specifies that rotation is done via an optional argument.
21329  This command may occur once or not at all.
21330 \end_layout
21331
21332 \begin_layout Description
21333 \begin_inset Flex Code
21334 status collapsed
21335
21336 \begin_layout Plain Layout
21337 TransformOption
21338 \begin_inset space ~
21339 \end_inset
21340
21341 Resize
21342 \begin_inset space ~
21343 \end_inset
21344
21345 ResizeLatexOption
21346 \end_layout
21347
21348 \end_inset
21349
21350  This command specifies that resizing is done via an optional argument.
21351  This command may occur once or not at all.
21352 \end_layout
21353
21354 \begin_layout Description
21355 \begin_inset Flex Code
21356 status collapsed
21357
21358 \begin_layout Plain Layout
21359 TransformOption
21360 \begin_inset space ~
21361 \end_inset
21362
21363 Clip
21364 \begin_inset space ~
21365 \end_inset
21366
21367 ClipLatexOption
21368 \end_layout
21369
21370 \end_inset
21371
21372  This command specifies that clipping is done via an optional argument.
21373  This command may occur once or not at all.
21374 \end_layout
21375
21376 \begin_layout Description
21377 \begin_inset Flex Code
21378 status collapsed
21379
21380 \begin_layout Plain Layout
21381 TransformOption
21382 \begin_inset space ~
21383 \end_inset
21384
21385 Extra
21386 \begin_inset space ~
21387 \end_inset
21388
21389 ExtraLatexOption
21390 \end_layout
21391
21392 \end_inset
21393
21394  This command specifies that an extra optional argument is used.
21395  This command may occur once or not at all.
21396 \end_layout
21397
21398 \begin_layout Description
21399 \begin_inset Flex Code
21400 status collapsed
21401
21402 \begin_layout Plain Layout
21403 UpdateFormat
21404 \begin_inset space ~
21405 \end_inset
21406
21407 <format>
21408 \end_layout
21409
21410 \end_inset
21411
21412  The file format of the converted file.
21413  This must be the name of a format that is known to LyX (see the 
21414 \begin_inset Flex MenuItem
21415 status collapsed
21416
21417 \begin_layout Plain Layout
21418
21419 \bar under
21420 T
21421 \bar default
21422 ools\SpecialChar \menuseparator
21423
21424 \bar under
21425 P
21426 \bar default
21427 references\SpecialChar \menuseparator
21428 File Handling\SpecialChar \menuseparator
21429 File Format
21430 \end_layout
21431
21432 \end_inset
21433
21434  dialog).
21435  This command must occur exactly once.
21436 \end_layout
21437
21438 \begin_layout Description
21439 \begin_inset Flex Code
21440 status collapsed
21441
21442 \begin_layout Plain Layout
21443 UpdateResult
21444 \begin_inset space ~
21445 \end_inset
21446
21447 <filename>
21448 \end_layout
21449
21450 \end_inset
21451
21452  The file name of the converted file.
21453  The file name must be absolute.
21454  This command must occur exactly once.
21455 \end_layout
21456
21457 \begin_layout Subsection
21458 Preamble definitions
21459 \end_layout
21460
21461 \begin_layout Standard
21462 The external template configuration file may contain additional preamble
21463  definitions enclosed by 
21464 \begin_inset Flex Code
21465 status collapsed
21466
21467 \begin_layout Plain Layout
21468 PreambleDef
21469 \end_layout
21470
21471 \end_inset
21472
21473  \SpecialChar \ldots{}
21474  
21475 \begin_inset Flex Code
21476 status collapsed
21477
21478 \begin_layout Plain Layout
21479 PreambleDefEnd
21480 \end_layout
21481
21482 \end_inset
21483
21484 .
21485  They can be used by the templates in the 
21486 \begin_inset Flex Code
21487 status collapsed
21488
21489 \begin_layout Plain Layout
21490 Format
21491 \end_layout
21492
21493 \end_inset
21494
21495  section.
21496 \end_layout
21497
21498 \begin_layout Section
21499 The substitution mechanism
21500 \end_layout
21501
21502 \begin_layout Standard
21503 When the external material facility invokes an external program, it is done
21504  on the basis of a command defined in the template configuration file.
21505  These commands can contain various macros that are expanded before execution.
21506  Execution always take place in the directory of the containing document.
21507 \end_layout
21508
21509 \begin_layout Standard
21510 Also, whenever external material is to be displayed, the name will be produced
21511  by the substitution mechanism, and most other commands in the template
21512  definition support substitution as well.
21513 \end_layout
21514
21515 \begin_layout Standard
21516 The available macros are the following:
21517 \end_layout
21518
21519 \begin_layout Description
21520 \begin_inset Flex Code
21521 status collapsed
21522
21523 \begin_layout Plain Layout
21524 $$AbsOrRelPathMaster
21525 \end_layout
21526
21527 \end_inset
21528
21529  The file path, absolute or relative to the master LyX document.
21530 \end_layout
21531
21532 \begin_layout Description
21533 \begin_inset Flex Code
21534 status collapsed
21535
21536 \begin_layout Plain Layout
21537 $$AbsOrRelPathParent
21538 \end_layout
21539
21540 \end_inset
21541
21542  The file path, absolute or relative to the LyX document.
21543 \end_layout
21544
21545 \begin_layout Description
21546 \begin_inset Flex Code
21547 status collapsed
21548
21549 \begin_layout Plain Layout
21550 $$AbsPath
21551 \end_layout
21552
21553 \end_inset
21554
21555  The absolute file path.
21556 \end_layout
21557
21558 \begin_layout Description
21559 \begin_inset Flex Code
21560 status collapsed
21561
21562 \begin_layout Plain Layout
21563 $$Basename
21564 \end_layout
21565
21566 \end_inset
21567
21568  The filename without path and without the extension.
21569 \end_layout
21570
21571 \begin_layout Description
21572 \begin_inset Flex Code
21573 status collapsed
21574
21575 \begin_layout Plain Layout
21576 $$Contents(
21577 \begin_inset Quotes eld
21578 \end_inset
21579
21580 filename.ext
21581 \begin_inset Quotes erd
21582 \end_inset
21583
21584 )
21585 \end_layout
21586
21587 \end_inset
21588
21589  This macro will expand to the contents of the file with the name 
21590 \begin_inset Flex Code
21591 status collapsed
21592
21593 \begin_layout Plain Layout
21594 filename.ext
21595 \end_layout
21596
21597 \end_inset
21598
21599 .
21600 \end_layout
21601
21602 \begin_layout Description
21603 \begin_inset Flex Code
21604 status collapsed
21605
21606 \begin_layout Plain Layout
21607 $$Extension
21608 \end_layout
21609
21610 \end_inset
21611
21612  The file extension (including the dot).
21613 \end_layout
21614
21615 \begin_layout Description
21616 \begin_inset Flex Code
21617 status collapsed
21618
21619 \begin_layout Plain Layout
21620 $$FName
21621 \end_layout
21622
21623 \end_inset
21624
21625  The filename of the file specified in the external material dialog.
21626  This is either an absolute name, or it is relative to the LyX document.
21627 \end_layout
21628
21629 \begin_layout Description
21630 \begin_inset Flex Code
21631 status collapsed
21632
21633 \begin_layout Plain Layout
21634 $$FPath
21635 \end_layout
21636
21637 \end_inset
21638
21639  The path part of 
21640 \begin_inset Flex Code
21641 status collapsed
21642
21643 \begin_layout Plain Layout
21644 $$FName
21645 \end_layout
21646
21647 \end_inset
21648
21649  (absolute name or relative to the LyX document).
21650 \end_layout
21651
21652 \begin_layout Description
21653 \begin_inset Flex Code
21654 status collapsed
21655
21656 \begin_layout Plain Layout
21657 $$RelPathMaster
21658 \end_layout
21659
21660 \end_inset
21661
21662  The file path, relative to the master LyX document.
21663 \end_layout
21664
21665 \begin_layout Description
21666 \begin_inset Flex Code
21667 status collapsed
21668
21669 \begin_layout Plain Layout
21670 $$RelPathParent
21671 \end_layout
21672
21673 \end_inset
21674
21675  The file path, relative to the LyX document.
21676 \end_layout
21677
21678 \begin_layout Description
21679 \begin_inset Flex Code
21680 status collapsed
21681
21682 \begin_layout Plain Layout
21683 $$Sysdir
21684 \end_layout
21685
21686 \end_inset
21687
21688  This macro will expand to the absolute path of the system directory.
21689  This is typically used to point to the various helper scripts that are
21690  bundled with LyX.
21691 \end_layout
21692
21693 \begin_layout Description
21694 \begin_inset Flex Code
21695 status collapsed
21696
21697 \begin_layout Plain Layout
21698 $$Tempname
21699 \end_layout
21700
21701 \end_inset
21702
21703  A name and full path to a temporary file which will be automatically deleted
21704  whenever the containing document is closed, or the external material insertion
21705  deleted.
21706 \end_layout
21707
21708 \begin_layout Standard
21709 All path macros contain a trailing directory separator, so you can construct
21710  e.
21711 \begin_inset space \thinspace{}
21712 \end_inset
21713
21714 g.
21715 \begin_inset space \space{}
21716 \end_inset
21717
21718 the absolute filename with 
21719 \begin_inset Flex Code
21720 status collapsed
21721
21722 \begin_layout Plain Layout
21723 $$AbsPath$$Basename$$Extension
21724 \end_layout
21725
21726 \end_inset
21727
21728 .
21729 \end_layout
21730
21731 \begin_layout Standard
21732 The macros above are substituted in all commands unless otherwise noted.
21733  The command 
21734 \begin_inset Flex Code
21735 status collapsed
21736
21737 \begin_layout Plain Layout
21738 Product
21739 \end_layout
21740
21741 \end_inset
21742
21743  supports additionally the following substitutions if they are enabled by
21744  the 
21745 \begin_inset Flex Code
21746 status collapsed
21747
21748 \begin_layout Plain Layout
21749 Transform
21750 \end_layout
21751
21752 \end_inset
21753
21754  and 
21755 \begin_inset Flex Code
21756 status collapsed
21757
21758 \begin_layout Plain Layout
21759 TransformCommand
21760 \end_layout
21761
21762 \end_inset
21763
21764  commands:
21765 \end_layout
21766
21767 \begin_layout Description
21768 \begin_inset Flex Code
21769 status collapsed
21770
21771 \begin_layout Plain Layout
21772 $$ResizeFront
21773 \end_layout
21774
21775 \end_inset
21776
21777  The front part of the resize command.
21778 \end_layout
21779
21780 \begin_layout Description
21781 \begin_inset Flex Code
21782 status collapsed
21783
21784 \begin_layout Plain Layout
21785 $$ResizeBack
21786 \end_layout
21787
21788 \end_inset
21789
21790  The back part of the resize command.
21791 \end_layout
21792
21793 \begin_layout Description
21794 \begin_inset Flex Code
21795 status collapsed
21796
21797 \begin_layout Plain Layout
21798 $$RotateFront
21799 \end_layout
21800
21801 \end_inset
21802
21803  The front part of the rotation command.
21804 \end_layout
21805
21806 \begin_layout Description
21807 \begin_inset Flex Code
21808 status collapsed
21809
21810 \begin_layout Plain Layout
21811 $$RotateBack
21812 \end_layout
21813
21814 \end_inset
21815
21816  The back part of the rotation command.
21817 \end_layout
21818
21819 \begin_layout Standard
21820 The value string of the 
21821 \begin_inset Flex Code
21822 status collapsed
21823
21824 \begin_layout Plain Layout
21825 Option
21826 \end_layout
21827
21828 \end_inset
21829
21830  command supports additionally the following substitutions if they are enabled
21831  by the 
21832 \begin_inset Flex Code
21833 status collapsed
21834
21835 \begin_layout Plain Layout
21836 Transform
21837 \end_layout
21838
21839 \end_inset
21840
21841  and 
21842 \begin_inset Flex Code
21843 status collapsed
21844
21845 \begin_layout Plain Layout
21846 TransformOption
21847 \end_layout
21848
21849 \end_inset
21850
21851  commands:
21852 \end_layout
21853
21854 \begin_layout Description
21855 \begin_inset Flex Code
21856 status collapsed
21857
21858 \begin_layout Plain Layout
21859 $$Clip
21860 \end_layout
21861
21862 \end_inset
21863
21864  The clip option.
21865 \end_layout
21866
21867 \begin_layout Description
21868 \begin_inset Flex Code
21869 status collapsed
21870
21871 \begin_layout Plain Layout
21872 $$Extra
21873 \end_layout
21874
21875 \end_inset
21876
21877  The extra option.
21878 \end_layout
21879
21880 \begin_layout Description
21881 \begin_inset Flex Code
21882 status collapsed
21883
21884 \begin_layout Plain Layout
21885 $$Resize
21886 \end_layout
21887
21888 \end_inset
21889
21890  The resize option.
21891 \end_layout
21892
21893 \begin_layout Description
21894 \begin_inset Flex Code
21895 status collapsed
21896
21897 \begin_layout Plain Layout
21898 $$Rotate
21899 \end_layout
21900
21901 \end_inset
21902
21903  The rotation option.
21904 \end_layout
21905
21906 \begin_layout Standard
21907 You may ask why there are so many path macros.
21908  There are mainly two reasons:
21909 \end_layout
21910
21911 \begin_layout Enumerate
21912 Relative and absolute file names should remain relative or absolute, respectivel
21913 y.
21914  Users may have reasons to prefer either form.
21915  Relative names are useful for portable documents that should work on different
21916  machines, for example.
21917  Absolute names may be required by some programs.
21918 \end_layout
21919
21920 \begin_layout Enumerate
21921 LaTeX treats relative file names differently than LyX and other programs
21922  in nested included files.
21923  For LyX, a relative file name is always relative to the document that contains
21924  the file name.
21925  For LaTeX, it is always relative to the master document.
21926  These two definitions are identical if you have only one document, but
21927  differ if you have a master document that includes part documents.
21928  That means that relative filenames must be transformed when presented to
21929  LaTeX.
21930  Fortunately LyX does this automatically for you if you choose the right
21931  macros.
21932 \end_layout
21933
21934 \begin_layout Standard
21935 So which path macro should be used in new template definitions? The rule
21936  is not difficult:
21937 \end_layout
21938
21939 \begin_layout Itemize
21940 Use 
21941 \begin_inset Flex Code
21942 status collapsed
21943
21944 \begin_layout Plain Layout
21945 $$AbsPath
21946 \end_layout
21947
21948 \end_inset
21949
21950  if an absolute path is required.
21951 \end_layout
21952
21953 \begin_layout Itemize
21954 Use 
21955 \begin_inset Flex Code
21956 status collapsed
21957
21958 \begin_layout Plain Layout
21959 $$AbsOrRelPathMaster
21960 \end_layout
21961
21962 \end_inset
21963
21964  if the substituted string is some kind of LaTeX input.
21965 \end_layout
21966
21967 \begin_layout Itemize
21968 Else use 
21969 \begin_inset Flex Code
21970 status collapsed
21971
21972 \begin_layout Plain Layout
21973 $$AbsOrRelPathParent
21974 \end_layout
21975
21976 \end_inset
21977
21978  in order to preserve the user's choice.
21979 \end_layout
21980
21981 \begin_layout Standard
21982 There are special cases where this rule does not work and e.
21983 \begin_inset space \thinspace{}
21984 \end_inset
21985
21986 g.
21987 \begin_inset space \space{}
21988 \end_inset
21989
21990 relative names are needed, but normally it will work just fine.
21991  One example for such a case is the command 
21992 \begin_inset Flex Code
21993 status collapsed
21994
21995 \begin_layout Plain Layout
21996 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
21997 \end_layout
21998
21999 \end_inset
22000
22001  in the XFig template above: We can't use the absolute name because the
22002  copier for 
22003 \begin_inset Flex Code
22004 status collapsed
22005
22006 \begin_layout Plain Layout
22007 .pstex_t
22008 \end_layout
22009
22010 \end_inset
22011
22012  files needs the relative name in order to rewrite the file content.
22013 \end_layout
22014
22015 \begin_layout Section
22016 Security discussion
22017 \begin_inset CommandInset label
22018 LatexCommand label
22019 name "sec:Security-discussion"
22020
22021 \end_inset
22022
22023
22024 \end_layout
22025
22026 \begin_layout Standard
22027 The external material feature interfaces with a lot of external programs
22028  and does so automatically, so we have to consider the security implications
22029  of this.
22030  In particular, since you have the option of including your own filenames
22031  and/or parameter strings and those are expanded into a command, it seems
22032  that it would be possible to create a malicious document which executes
22033  arbitrary commands when a user views or prints the document.
22034  This is something we definitely want to avoid.
22035 \end_layout
22036
22037 \begin_layout Standard
22038 However, since the external program commands are specified in the template
22039  configuration file only, there are no security issues if LyX is properly
22040  configured with safe templates only.
22041  This is so because the external programs are invoked with the 
22042 \begin_inset Flex Code
22043 status collapsed
22044
22045 \begin_layout Plain Layout
22046 execvp
22047 \end_layout
22048
22049 \end_inset
22050
22051 -system call rather than the 
22052 \begin_inset Flex Code
22053 status collapsed
22054
22055 \begin_layout Plain Layout
22056 system
22057 \end_layout
22058
22059 \end_inset
22060
22061  system-call, so it's not possible to execute arbitrary commands from the
22062  filename or parameter section via the shell.
22063 \end_layout
22064
22065 \begin_layout Standard
22066 This also implies that you are restricted in what command strings you can
22067  use in the external material templates.
22068  In particular, pipes and redirection are not readily available.
22069  This has to be so if LyX should remain safe.
22070  If you want to use some of the shell features, you should write a safe
22071  script to do this in a controlled manner, and then invoke the script from
22072  the command string.
22073  
22074 \end_layout
22075
22076 \begin_layout Standard
22077 It is possible to design a template that interacts directly with the shell,
22078  but since this would allow a malicious user to execute arbitrary commands
22079  by writing clever filenames and/or parameters, we generally recommend that
22080  you only use safe scripts that work with the 
22081 \begin_inset Flex Code
22082 status collapsed
22083
22084 \begin_layout Plain Layout
22085 execvp
22086 \end_layout
22087
22088 \end_inset
22089
22090  system call in a controlled manner.
22091  Of course, for use in a controlled environment, it can be tempting to just
22092  fall back to use ordinary shell scripts.
22093  If you do so, be aware that you 
22094 \emph on
22095 will
22096 \emph default
22097  provide an easily exploitable security hole in your system.
22098  Of course it stands to reason that such unsafe templates will never be
22099  included in the standard LyX distribution, although we do encourage people
22100  to submit new templates in the open source tradition.
22101  But LyX as shipped from the official distribution channels will never have
22102  unsafe templates.
22103 \end_layout
22104
22105 \begin_layout Standard
22106 Including external material provides a lot of power, and you have to be
22107  careful not to introduce security hazards with this power.
22108  A subtle error in a single line in an innocent looking script can open
22109  the door to huge security problems.
22110  So if you do not fully understand the issues, we recommend that you consult
22111  a knowledgeable security professional or the LyX development team if you
22112  have any questions about whether a given template is safe or not.
22113  And do this before you use it in an uncontrolled environment.
22114 \end_layout
22115
22116 \end_body
22117 \end_document