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