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