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