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