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