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