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