]> git.lyx.org Git - lyx.git/blob - lib/doc/Customization.lyx
37fe8388bef42b2ad448eb334047e4fded78771b
[lyx.git] / lib / doc / Customization.lyx
1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 458
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 optional arguments, as well as to
15980  define Flex insets.
15981 \end_layout
15982
15983 \begin_layout Standard
15984 The 
15985 \begin_inset Flex Code
15986 status collapsed
15987
15988 \begin_layout Plain Layout
15989 InsetLayout
15990 \end_layout
15991
15992 \end_inset
15993
15994  definition must begin with a line of the form:
15995 \end_layout
15996
15997 \begin_layout LyX-Code
15998 InsetLayout <type>
15999 \end_layout
16000
16001 \begin_layout Standard
16002 Here 
16003 \begin_inset Flex Code
16004 status collapsed
16005
16006 \begin_layout Plain Layout
16007 <Type>
16008 \end_layout
16009
16010 \end_inset
16011
16012  indicates the inset whose layout is being defined, and here there are 
16013 \change_inserted 5863208 1334489266
16014 three
16015 \change_deleted 5863208 1334489267
16016 two
16017 \change_unchanged
16018  cases.
16019 \end_layout
16020
16021 \begin_layout Enumerate
16022 The layout for a pre-existing inset is being modified.
16023  In this case, can be 
16024 \begin_inset Flex Code
16025 status collapsed
16026
16027 \begin_layout Plain Layout
16028 <Type>
16029 \end_layout
16030
16031 \end_inset
16032
16033  any one of the following: 
16034 \begin_inset Flex Code
16035 status collapsed
16036
16037 \begin_layout Plain Layout
16038 Algorithm
16039 \end_layout
16040
16041 \end_inset
16042
16043
16044 \begin_inset Flex Code
16045 status collapsed
16046
16047 \begin_layout Plain Layout
16048 Branch
16049 \end_layout
16050
16051 \end_inset
16052
16053
16054 \begin_inset Flex Code
16055 status collapsed
16056
16057 \begin_layout Plain Layout
16058 Box
16059 \end_layout
16060
16061 \end_inset
16062
16063
16064 \begin_inset Flex Code
16065 status collapsed
16066
16067 \begin_layout Plain Layout
16068 Box:shaded
16069 \end_layout
16070
16071 \end_inset
16072
16073
16074 \begin_inset Flex Code
16075 status collapsed
16076
16077 \begin_layout Plain Layout
16078 ERT
16079 \end_layout
16080
16081 \end_inset
16082
16083
16084 \begin_inset Flex Code
16085 status collapsed
16086
16087 \begin_layout Plain Layout
16088 Figure
16089 \end_layout
16090
16091 \end_inset
16092
16093
16094 \begin_inset Flex Code
16095 status collapsed
16096
16097 \begin_layout Plain Layout
16098 Foot
16099 \end_layout
16100
16101 \end_inset
16102
16103
16104 \begin_inset Flex Code
16105 status collapsed
16106
16107 \begin_layout Plain Layout
16108 Index
16109 \end_layout
16110
16111 \end_inset
16112
16113
16114 \begin_inset Flex Code
16115 status collapsed
16116
16117 \begin_layout Plain Layout
16118 Info
16119 \end_layout
16120
16121 \end_inset
16122
16123
16124 \begin_inset Flex Code
16125 status collapsed
16126
16127 \begin_layout Plain Layout
16128 Info:menu
16129 \end_layout
16130
16131 \end_inset
16132
16133
16134 \begin_inset Flex Code
16135 status collapsed
16136
16137 \begin_layout Plain Layout
16138 Info:shortcut
16139 \end_layout
16140
16141 \end_inset
16142
16143
16144 \begin_inset Flex Code
16145 status collapsed
16146
16147 \begin_layout Plain Layout
16148 Info:shortcuts
16149 \end_layout
16150
16151 \end_inset
16152
16153
16154 \begin_inset Flex Code
16155 status collapsed
16156
16157 \begin_layout Plain Layout
16158 Listings
16159 \end_layout
16160
16161 \end_inset
16162
16163
16164 \begin_inset Flex Code
16165 status collapsed
16166
16167 \begin_layout Plain Layout
16168 Marginal
16169 \end_layout
16170
16171 \end_inset
16172
16173
16174 \begin_inset Flex Code
16175 status collapsed
16176
16177 \begin_layout Plain Layout
16178 Note:Comment
16179 \end_layout
16180
16181 \end_inset
16182
16183
16184 \begin_inset Flex Code
16185 status collapsed
16186
16187 \begin_layout Plain Layout
16188 Note:Note
16189 \end_layout
16190
16191 \end_inset
16192
16193
16194 \begin_inset Flex Code
16195 status collapsed
16196
16197 \begin_layout Plain Layout
16198 Note:Greyedout
16199 \end_layout
16200
16201 \end_inset
16202
16203
16204 \begin_inset Flex Code
16205 status collapsed
16206
16207 \begin_layout Plain Layout
16208
16209 \change_deleted -712698321 1353866704
16210 Opt
16211 \change_unchanged
16212 Arg
16213 \change_inserted -712698321 1353866707
16214 ument
16215 \change_unchanged
16216
16217 \end_layout
16218
16219 \end_inset
16220
16221
16222 \begin_inset Flex Code
16223 status collapsed
16224
16225 \begin_layout Plain Layout
16226 Table
16227 \end_layout
16228
16229 \end_inset
16230
16231 , or 
16232 \begin_inset Flex Code
16233 status collapsed
16234
16235 \begin_layout Plain Layout
16236 URL
16237 \end_layout
16238
16239 \end_inset
16240
16241 .
16242 \end_layout
16243
16244 \begin_layout Enumerate
16245 The layout for a Flex inset is being defined.
16246  In this case, 
16247 \begin_inset Flex Code
16248 status collapsed
16249
16250 \begin_layout Plain Layout
16251 <Type>
16252 \end_layout
16253
16254 \end_inset
16255
16256  must be of the form 
16257 \begin_inset Quotes eld
16258 \end_inset
16259
16260
16261 \begin_inset Flex Code
16262 status collapsed
16263
16264 \begin_layout Plain Layout
16265 Flex:<name>
16266 \end_layout
16267
16268 \end_inset
16269
16270
16271 \begin_inset Quotes erd
16272 \end_inset
16273
16274 , where 
16275 \begin_inset Flex Code
16276 status collapsed
16277
16278 \begin_layout Plain Layout
16279 name
16280 \end_layout
16281
16282 \end_inset
16283
16284  may be be any valid identifier not used by a pre-existing Flex inset.
16285  The identifier may include spaces, but in that case the whole thing must
16286  be wrapped in quotes.
16287  Note that the definition of a flex inset 
16288 \emph on
16289 must 
16290 \emph default
16291 also include a 
16292 \begin_inset Flex Code
16293 status collapsed
16294
16295 \begin_layout Plain Layout
16296 LyXType
16297 \end_layout
16298
16299 \end_inset
16300
16301  entry, declaring which type of inset it defines.
16302 \change_inserted 5863208 1334489312
16303
16304 \end_layout
16305
16306 \begin_layout Enumerate
16307
16308 \change_inserted 5863208 1334492248
16309 The layout for user specific branch is being defined.
16310  In this case, 
16311 \begin_inset Flex Code
16312 status collapsed
16313
16314 \begin_layout Plain Layout
16315
16316 \change_inserted 5863208 1334489384
16317 <Type>
16318 \end_layout
16319
16320 \end_inset
16321
16322  must be of the form 
16323 \begin_inset Quotes eld
16324 \end_inset
16325
16326
16327 \begin_inset Flex Code
16328 status collapsed
16329
16330 \begin_layout Plain Layout
16331
16332 \change_inserted 5863208 1334489392
16333 Branch:<name>
16334 \end_layout
16335
16336 \end_inset
16337
16338
16339 \begin_inset Quotes erd
16340 \end_inset
16341
16342 , where 
16343 \begin_inset Flex Code
16344 status collapsed
16345
16346 \begin_layout Plain Layout
16347
16348 \change_inserted 5863208 1334489384
16349 name
16350 \end_layout
16351
16352 \end_inset
16353
16354  may be be any valid identifier of branch defined in user's document.
16355  The identifier may include spaces, but in that case the whole thing must
16356  be wrapped in quotes.
16357  The main purpose of this feature is to allow LaTeX wrapping around specific
16358  branches as user needs.
16359 \change_unchanged
16360
16361 \end_layout
16362
16363 \begin_layout Standard
16364 The 
16365 \begin_inset Flex Code
16366 status collapsed
16367
16368 \begin_layout Plain Layout
16369 InsetLayout
16370 \end_layout
16371
16372 \end_inset
16373
16374  definition can contain the following entries:
16375 \end_layout
16376
16377 \begin_layout Description
16378
16379 \change_inserted -712698321 1353681390
16380 \begin_inset Flex Code
16381 status collapsed
16382
16383 \begin_layout Plain Layout
16384
16385 \change_inserted -712698321 1353681344
16386 Argument
16387 \end_layout
16388
16389 \end_inset
16390
16391  [
16392 \begin_inset Flex Code
16393 status collapsed
16394
16395 \begin_layout Plain Layout
16396
16397 \change_inserted -712698321 1353681344
16398 int
16399 \end_layout
16400
16401 \end_inset
16402
16403 ] Defines argument number <int> of a command\SpecialChar \slash{}
16404 environment associated with
16405  the current layout.
16406  The definition must end with 
16407 \begin_inset Flex Code
16408 status collapsed
16409
16410 \begin_layout Plain Layout
16411
16412 \change_inserted -712698321 1353681344
16413 EndArgument
16414 \end_layout
16415
16416 \end_inset
16417
16418 .
16419  See section
16420 \begin_inset space ~
16421 \end_inset
16422
16423
16424 \begin_inset CommandInset ref
16425 LatexCommand ref
16426 reference "sub:Paragraph-Styles"
16427
16428 \end_inset
16429
16430  for details.
16431 \end_layout
16432
16433 \begin_layout Description
16434
16435 \change_inserted -195340706 1333913893
16436 \begin_inset Flex Code
16437 status collapsed
16438
16439 \begin_layout Plain Layout
16440 BabelPreamble
16441 \end_layout
16442
16443 \end_inset
16444
16445  Preamble for changing languages.
16446  See section
16447 \begin_inset space ~
16448 \end_inset
16449
16450
16451 \begin_inset CommandInset ref
16452 LatexCommand ref
16453 reference "sub:I18n"
16454
16455 \end_inset
16456
16457 .
16458 \end_layout
16459
16460 \begin_layout Description
16461 \begin_inset Flex Code
16462 status collapsed
16463
16464 \begin_layout Plain Layout
16465 BgColor
16466 \end_layout
16467
16468 \end_inset
16469
16470  [
16471 \begin_inset Flex Code
16472 status collapsed
16473
16474 \begin_layout Plain Layout
16475 <name>
16476 \end_layout
16477
16478 \end_inset
16479
16480 ] The color for the inset's background.
16481  See chapter
16482 \begin_inset space ~
16483 \end_inset
16484
16485
16486 \begin_inset CommandInset ref
16487 LatexCommand ref
16488 reference "chap:Names-of-colors"
16489
16490 \end_inset
16491
16492  for a list of the available color names.
16493 \end_layout
16494
16495 \begin_layout Description
16496 \begin_inset Flex Code
16497 status collapsed
16498
16499 \begin_layout Plain Layout
16500 ContentAsLabel
16501 \end_layout
16502
16503 \end_inset
16504
16505  [
16506 \begin_inset Flex Code
16507 status collapsed
16508
16509 \begin_layout Plain Layout
16510
16511 \emph on
16512 0
16513 \end_layout
16514
16515 \end_inset
16516
16517 ,
16518 \begin_inset space \thinspace{}
16519 \end_inset
16520
16521
16522 \begin_inset Flex Code
16523 status collapsed
16524
16525 \begin_layout Plain Layout
16526 1
16527 \end_layout
16528
16529 \end_inset
16530
16531 ] Whether to use the content of the inset as the label, when the inset is
16532  closed.
16533  Default is false.
16534 \end_layout
16535
16536 \begin_layout Description
16537 \begin_inset Flex Code
16538 status collapsed
16539
16540 \begin_layout Plain Layout
16541 CopyStyle
16542 \end_layout
16543
16544 \end_inset
16545
16546  [
16547 \begin_inset Flex Code
16548 status collapsed
16549
16550 \begin_layout Plain Layout
16551 <type>
16552 \end_layout
16553
16554 \end_inset
16555
16556 ] As with paragraph styles, see sec.
16557 \begin_inset space ~
16558 \end_inset
16559
16560
16561 \begin_inset CommandInset ref
16562 LatexCommand ref
16563 reference "sub:Paragraph-Styles"
16564
16565 \end_inset
16566
16567 .
16568  Note that you need to specify the complete type, e.
16569 \begin_inset space \thinspace{}
16570 \end_inset
16571
16572 g.
16573 \begin_inset space ~
16574 \end_inset
16575
16576
16577 \begin_inset Flex Code
16578 status collapsed
16579
16580 \begin_layout Plain Layout
16581 CopyStyle Flex:<name>
16582 \end_layout
16583
16584 \end_inset
16585
16586 .
16587 \end_layout
16588
16589 \begin_layout Description
16590 \begin_inset Flex Code
16591 status collapsed
16592
16593 \begin_layout Plain Layout
16594 CustomPars
16595 \end_layout
16596
16597 \end_inset
16598
16599  [
16600 \begin_inset Flex Code
16601 status collapsed
16602
16603 \begin_layout Plain Layout
16604
16605 \emph on
16606 0
16607 \end_layout
16608
16609 \end_inset
16610
16611 ,
16612 \begin_inset space \thinspace{}
16613 \end_inset
16614
16615
16616 \begin_inset Flex Code
16617 status collapsed
16618
16619 \begin_layout Plain Layout
16620 1
16621 \end_layout
16622
16623 \end_inset
16624
16625 ] Indicates whether the user may employ the Paragraph Settings dialog to
16626  customize the paragraph.
16627 \end_layout
16628
16629 \begin_layout Description
16630 \begin_inset Flex Code
16631 status collapsed
16632
16633 \begin_layout Plain Layout
16634 Decoration
16635 \end_layout
16636
16637 \end_inset
16638
16639  can be 
16640 \begin_inset Flex Code
16641 status collapsed
16642
16643 \begin_layout Plain Layout
16644 Classic
16645 \end_layout
16646
16647 \end_inset
16648
16649
16650 \begin_inset Flex Code
16651 status collapsed
16652
16653 \begin_layout Plain Layout
16654 Minimalistic
16655 \end_layout
16656
16657 \end_inset
16658
16659 , or 
16660 \begin_inset Flex Code
16661 status collapsed
16662
16663 \begin_layout Plain Layout
16664 Conglomerate
16665 \end_layout
16666
16667 \end_inset
16668
16669 , describing the rendering style used for the inset's frame and buttons.
16670  Footnotes generally use 
16671 \begin_inset Flex Code
16672 status collapsed
16673
16674 \begin_layout Plain Layout
16675 Classic
16676 \end_layout
16677
16678 \end_inset
16679
16680 , ERT insets generally 
16681 \begin_inset Flex Code
16682 status collapsed
16683
16684 \begin_layout Plain Layout
16685 Minimalistic
16686 \end_layout
16687
16688 \end_inset
16689
16690 , and character styles 
16691 \begin_inset Flex Code
16692 status collapsed
16693
16694 \begin_layout Plain Layout
16695 Conglomerate
16696 \end_layout
16697
16698 \end_inset
16699
16700 .
16701 \end_layout
16702
16703 \begin_layout Description
16704 \begin_inset Flex Code
16705 status collapsed
16706
16707 \begin_layout Plain Layout
16708 Display
16709 \end_layout
16710
16711 \end_inset
16712
16713  [
16714 \begin_inset Flex Code
16715 status collapsed
16716
16717 \begin_layout Plain Layout
16718 0
16719 \end_layout
16720
16721 \end_inset
16722
16723 ,
16724 \emph on
16725
16726 \begin_inset space \thinspace{}
16727 \end_inset
16728
16729
16730 \emph default
16731
16732 \begin_inset Flex Code
16733 status collapsed
16734
16735 \begin_layout Plain Layout
16736
16737 \emph on
16738 1
16739 \end_layout
16740
16741 \end_inset
16742
16743 ] Only useful if 
16744 \begin_inset Flex Code
16745 status collapsed
16746
16747 \begin_layout Plain Layout
16748 LatexType
16749 \end_layout
16750
16751 \end_inset
16752
16753  is 
16754 \begin_inset Flex Code
16755 status collapsed
16756
16757 \begin_layout Plain Layout
16758 Environment
16759 \end_layout
16760
16761 \end_inset
16762
16763 .
16764  Indicates whether the environment will stand on its own in the output or
16765  will appear inline with the surrounding text.
16766  If set to false, it is supposed that the LaTeX environment ignores white
16767  space (including one newline character) after the 
16768 \begin_inset Flex Code
16769 status collapsed
16770
16771 \begin_layout Plain Layout
16772
16773 \backslash
16774 begin{
16775 \emph on
16776 LatexName
16777 \emph default
16778 }
16779 \end_layout
16780
16781 \end_inset
16782
16783  and 
16784 \begin_inset Flex Code
16785 status collapsed
16786
16787 \begin_layout Plain Layout
16788
16789 \backslash
16790 end{
16791 \emph on
16792 LatexName
16793 \emph default
16794 }
16795 \end_layout
16796
16797 \end_inset
16798
16799  tags.
16800  Default is true.
16801 \end_layout
16802
16803 \begin_layout Description
16804 \begin_inset Flex Code
16805 status collapsed
16806
16807 \begin_layout Plain Layout
16808 End
16809 \end_layout
16810
16811 \end_inset
16812
16813  Required at the end of the 
16814 \begin_inset Flex Code
16815 status collapsed
16816
16817 \begin_layout Plain Layout
16818 InsetLayout
16819 \end_layout
16820
16821 \end_inset
16822
16823  declarations.
16824 \end_layout
16825
16826 \begin_layout Description
16827 \begin_inset Flex Code
16828 status collapsed
16829
16830 \begin_layout Plain Layout
16831 Font
16832 \end_layout
16833
16834 \end_inset
16835
16836  The font used for both the text body 
16837 \emph on
16838 and
16839 \emph default
16840  the label.
16841  See section
16842 \begin_inset space ~
16843 \end_inset
16844
16845
16846 \begin_inset CommandInset ref
16847 LatexCommand ref
16848 reference "sub:Font-description"
16849
16850 \end_inset
16851
16852 .
16853  Note that defining this font automatically defines the 
16854 \begin_inset Flex Code
16855 status collapsed
16856
16857 \begin_layout Plain Layout
16858 LabelFont
16859 \end_layout
16860
16861 \end_inset
16862
16863  to the same value, so define this first and define 
16864 \begin_inset Flex Code
16865 status collapsed
16866
16867 \begin_layout Plain Layout
16868 LabelFont
16869 \end_layout
16870
16871 \end_inset
16872
16873  later if you want them to be different.
16874 \change_inserted 155139281 1354130923
16875
16876 \end_layout
16877
16878 \begin_layout Description
16879
16880 \change_inserted 155139281 1354130923
16881 \begin_inset Flex Code
16882 status collapsed
16883
16884 \begin_layout Plain Layout
16885
16886 \change_inserted 155139281 1354130923
16887 ForceLocalFontSwitch
16888 \end_layout
16889
16890 \end_inset
16891
16892  [
16893 \begin_inset Flex Code
16894 status collapsed
16895
16896 \begin_layout Plain Layout
16897
16898 \change_inserted 155139281 1354130923
16899
16900 \emph on
16901 0
16902 \end_layout
16903
16904 \end_inset
16905
16906 ,
16907 \begin_inset Flex Code
16908 status collapsed
16909
16910 \begin_layout Plain Layout
16911
16912 \change_inserted 155139281 1354130923
16913 1
16914 \end_layout
16915
16916 \end_inset
16917
16918 ] When using babel, always use a local font switch (
16919 \begin_inset Flex Code
16920 status collapsed
16921
16922 \begin_layout Plain Layout
16923
16924 \change_inserted 155139281 1354130923
16925
16926 \backslash
16927 foreignlanguage
16928 \end_layout
16929
16930 \end_inset
16931
16932 ), never a global one (such as 
16933 \begin_inset Flex Code
16934 status collapsed
16935
16936 \begin_layout Plain Layout
16937
16938 \change_inserted 155139281 1354130923
16939
16940 \backslash
16941 selectlanguage
16942 \end_layout
16943
16944 \end_inset
16945
16946 ).
16947 \change_unchanged
16948
16949 \end_layout
16950
16951 \begin_layout Description
16952 \begin_inset Flex Code
16953 status collapsed
16954
16955 \begin_layout Plain Layout
16956 ForceLTR
16957 \end_layout
16958
16959 \end_inset
16960
16961  [
16962 \begin_inset Flex Code
16963 status collapsed
16964
16965 \begin_layout Plain Layout
16966
16967 \emph on
16968 0
16969 \end_layout
16970
16971 \end_inset
16972
16973 ,
16974 \begin_inset space \thinspace{}
16975 \end_inset
16976
16977
16978 \begin_inset Flex Code
16979 status collapsed
16980
16981 \begin_layout Plain Layout
16982 1
16983 \end_layout
16984
16985 \end_inset
16986
16987 ] Force the 
16988 \begin_inset Quotes eld
16989 \end_inset
16990
16991 latex
16992 \begin_inset Quotes erd
16993 \end_inset
16994
16995  language, leading to Left-to-Right (Latin) output, e.
16996 \begin_inset space \thinspace{}
16997 \end_inset
16998
16999 g.
17000 \begin_inset space \space{}
17001 \end_inset
17002
17003 in TeX code or URL.
17004  A kludge.
17005 \end_layout
17006
17007 \begin_layout Description
17008 \begin_inset Flex Code
17009 status collapsed
17010
17011 \begin_layout Plain Layout
17012 ForcePlain
17013 \end_layout
17014
17015 \end_inset
17016
17017  [
17018 \begin_inset Flex Code
17019 status collapsed
17020
17021 \begin_layout Plain Layout
17022
17023 \emph on
17024 0
17025 \end_layout
17026
17027 \end_inset
17028
17029 ,
17030 \begin_inset space \thinspace{}
17031 \end_inset
17032
17033
17034 \begin_inset Flex Code
17035 status collapsed
17036
17037 \begin_layout Plain Layout
17038 1
17039 \end_layout
17040
17041 \end_inset
17042
17043 ] Indicates whether the 
17044 \begin_inset Flex Code
17045 status collapsed
17046
17047 \begin_layout Plain Layout
17048 PlainLayout
17049 \end_layout
17050
17051 \end_inset
17052
17053  should be used or, instead, the user can change the paragraph style used
17054  in the inset.
17055  Default is false.
17056 \end_layout
17057
17058 \begin_layout Description
17059 \begin_inset Flex Code
17060 status collapsed
17061
17062 \begin_layout Plain Layout
17063 FreeSpacing
17064 \end_layout
17065
17066 \end_inset
17067
17068  [
17069 \begin_inset Flex Code
17070 status collapsed
17071
17072 \begin_layout Plain Layout
17073
17074 \emph on
17075 0
17076 \end_layout
17077
17078 \end_inset
17079
17080 ,
17081 \begin_inset space \thinspace{}
17082 \end_inset
17083
17084
17085 \begin_inset Flex Code
17086 status collapsed
17087
17088 \begin_layout Plain Layout
17089 1
17090 \end_layout
17091
17092 \end_inset
17093
17094 ] As with paragraph styles, see sec.
17095 \begin_inset space ~
17096 \end_inset
17097
17098
17099 \begin_inset CommandInset ref
17100 LatexCommand ref
17101 reference "sub:Paragraph-Styles"
17102
17103 \end_inset
17104
17105 .
17106 \end_layout
17107
17108 \begin_layout Description
17109 \begin_inset Flex Code
17110 status collapsed
17111
17112 \begin_layout Plain Layout
17113 HTML*
17114 \end_layout
17115
17116 \end_inset
17117
17118  These tags control the XHTML output.
17119  See section
17120 \begin_inset space ~
17121 \end_inset
17122
17123
17124 \begin_inset CommandInset ref
17125 LatexCommand ref
17126 reference "sec:Tags-for-XHTML"
17127
17128 \end_inset
17129
17130 .
17131 \end_layout
17132
17133 \begin_layout Description
17134 \begin_inset Flex Code
17135 status collapsed
17136
17137 \begin_layout Plain Layout
17138 InToc
17139 \end_layout
17140
17141 \end_inset
17142
17143  [
17144 \begin_inset Flex Code
17145 status collapsed
17146
17147 \begin_layout Plain Layout
17148
17149 \emph on
17150 0
17151 \end_layout
17152
17153 \end_inset
17154
17155 ,
17156 \begin_inset space \thinspace{}
17157 \end_inset
17158
17159
17160 \begin_inset Flex Code
17161 status collapsed
17162
17163 \begin_layout Plain Layout
17164 1
17165 \end_layout
17166
17167 \end_inset
17168
17169 ] Whether to include the contents of this inset in the strings generated
17170  for the `Outline' pane.
17171  One would not, for example, want the content of a footnote in a section
17172  header to be included in the TOC displayed in the outline, but one would
17173  normally want the content of a character style displayed.
17174  Default is false: not to include.
17175 \end_layout
17176
17177 \begin_layout Description
17178 \begin_inset Flex Code
17179 status collapsed
17180
17181 \begin_layout Plain Layout
17182 KeepEmpty
17183 \end_layout
17184
17185 \end_inset
17186
17187  [
17188 \emph on
17189
17190 \begin_inset Flex Code
17191 status collapsed
17192
17193 \begin_layout Plain Layout
17194 0
17195 \end_layout
17196
17197 \end_inset
17198
17199
17200 \emph default
17201 ,
17202 \begin_inset space \thinspace{}
17203 \end_inset
17204
17205
17206 \begin_inset Flex Code
17207 status collapsed
17208
17209 \begin_layout Plain Layout
17210 1
17211 \end_layout
17212
17213 \end_inset
17214
17215 ] As with paragraph styles, see sec.
17216 \begin_inset space ~
17217 \end_inset
17218
17219
17220 \begin_inset CommandInset ref
17221 LatexCommand ref
17222 reference "sub:Paragraph-Styles"
17223
17224 \end_inset
17225
17226 .
17227 \end_layout
17228
17229 \begin_layout Description
17230 \begin_inset Flex Code
17231 status collapsed
17232
17233 \begin_layout Plain Layout
17234 LabelFont
17235 \end_layout
17236
17237 \end_inset
17238
17239  The font used for the label.
17240  See section
17241 \begin_inset space ~
17242 \end_inset
17243
17244
17245 \begin_inset CommandInset ref
17246 LatexCommand ref
17247 reference "sub:Font-description"
17248
17249 \end_inset
17250
17251 .
17252  Note that this definition can never appear before 
17253 \begin_inset Flex Code
17254 status collapsed
17255
17256 \begin_layout Plain Layout
17257 Font
17258 \end_layout
17259
17260 \end_inset
17261
17262 , lest it be ineffective.
17263 \end_layout
17264
17265 \begin_layout Description
17266 \begin_inset Flex Code
17267 status collapsed
17268
17269 \begin_layout Plain Layout
17270 LabelString
17271 \end_layout
17272
17273 \end_inset
17274
17275  [
17276 \begin_inset Flex Code
17277 status collapsed
17278
17279 \begin_layout Plain Layout
17280 string
17281 \end_layout
17282
17283 \end_inset
17284
17285 =
17286 \begin_inset Quotes erd
17287 \end_inset
17288
17289
17290 \begin_inset Quotes erd
17291 \end_inset
17292
17293 ] What will be displayed on the button or elsewhere as the inset label.
17294  Some inset types (
17295 \begin_inset Flex Code
17296 status collapsed
17297
17298 \begin_layout Plain Layout
17299 TeX code
17300 \end_layout
17301
17302 \end_inset
17303
17304  and 
17305 \begin_inset Flex Code
17306 status collapsed
17307
17308 \begin_layout Plain Layout
17309 Branch
17310 \end_layout
17311
17312 \end_inset
17313
17314 ) modify this label on the fly.
17315 \end_layout
17316
17317 \begin_layout Description
17318
17319 \change_inserted -195340706 1333913893
17320 \begin_inset Flex Code
17321 status collapsed
17322
17323 \begin_layout Plain Layout
17324 LangPreamble
17325 \end_layout
17326
17327 \end_inset
17328
17329  Language dependent preamble.
17330  See section
17331 \begin_inset space ~
17332 \end_inset
17333
17334
17335 \begin_inset CommandInset ref
17336 LatexCommand ref
17337 reference "sub:I18n"
17338
17339 \end_inset
17340
17341 .
17342 \end_layout
17343
17344 \begin_layout Description
17345 \begin_inset Flex Code
17346 status collapsed
17347
17348 \begin_layout Plain Layout
17349 LatexName
17350 \end_layout
17351
17352 \end_inset
17353
17354  [
17355 \begin_inset Flex Code
17356 status collapsed
17357
17358 \begin_layout Plain Layout
17359 <name>
17360 \end_layout
17361
17362 \end_inset
17363
17364 ] The name of the corresponding LaTeX stuff.
17365  Either the environment or command name.
17366 \end_layout
17367
17368 \begin_layout Description
17369 \begin_inset Flex Code
17370 status collapsed
17371
17372 \begin_layout Plain Layout
17373 LatexParam
17374 \end_layout
17375
17376 \end_inset
17377
17378  [
17379 \begin_inset Flex Code
17380 status collapsed
17381
17382 \begin_layout Plain Layout
17383 <parameter>
17384 \end_layout
17385
17386 \end_inset
17387
17388 ] The optional parameter for the corresponding 
17389 \begin_inset Flex Code
17390 status collapsed
17391
17392 \begin_layout Plain Layout
17393 LatexName
17394 \end_layout
17395
17396 \end_inset
17397
17398  stuff, including possible bracket pairs like 
17399 \begin_inset Flex Code
17400 status collapsed
17401
17402 \begin_layout Plain Layout
17403 []
17404 \end_layout
17405
17406 \end_inset
17407
17408 .
17409  
17410 \change_inserted -712698321 1355144715
17411 This will be output as is after all LaTeX 
17412 \begin_inset Flex Code
17413 status collapsed
17414
17415 \begin_layout Plain Layout
17416
17417 \change_inserted -712698321 1355144713
17418 Arguments
17419 \end_layout
17420
17421 \end_inset
17422
17423 .
17424  
17425 \change_unchanged
17426 This parameter cannot be changed from within LyX
17427 \change_inserted -712698321 1355144775
17428  (use 
17429 \begin_inset Flex Code
17430 status collapsed
17431
17432 \begin_layout Plain Layout
17433
17434 \change_inserted -712698321 1355144747
17435 Argument
17436 \end_layout
17437
17438 \end_inset
17439
17440  for customizable parameters)
17441 \change_unchanged
17442 .
17443 \end_layout
17444
17445 \begin_layout Description
17446 \begin_inset Flex Code
17447 status collapsed
17448
17449 \begin_layout Plain Layout
17450 LatexType
17451 \end_layout
17452
17453 \end_inset
17454
17455  [
17456 \begin_inset Flex Code
17457 status collapsed
17458
17459 \begin_layout Plain Layout
17460
17461 \change_deleted -712698321 1353867544
17462
17463 \emph on
17464 Paragraph
17465 \emph default
17466
17467 \change_unchanged
17468 Command, Environment, 
17469 \change_inserted -712698321 1353867573
17470 None
17471 \change_deleted -712698321 1353867557
17472 Item_Environment,
17473 \change_unchanged
17474
17475 \end_layout
17476
17477 \end_inset
17478
17479  
17480 \begin_inset Flex Code
17481 status collapsed
17482
17483 \begin_layout Plain Layout
17484
17485 \change_deleted -712698321 1353867564
17486 List_Environment
17487 \change_unchanged
17488
17489 \change_deleted -712698321 1353867569
17490 Bib_Environment
17491 \change_unchanged
17492
17493 \end_layout
17494
17495 \end_inset
17496
17497 ] How the style should be translated into LaTeX.
17498 \begin_inset Foot
17499 status collapsed
17500
17501 \begin_layout Plain Layout
17502 \begin_inset Flex Code
17503 status collapsed
17504
17505 \begin_layout Plain Layout
17506 LatexType
17507 \end_layout
17508
17509 \end_inset
17510
17511  is perhaps a bit misleading, since these rules apply to SGML classes, too.
17512  Visit the SGML class files for specific examples.
17513 \end_layout
17514
17515 \end_inset
17516
17517
17518 \end_layout
17519
17520 \begin_deeper
17521 \begin_layout Description
17522 \begin_inset Flex Code
17523 status collapsed
17524
17525 \begin_layout Plain Layout
17526
17527 \change_deleted -712698321 1353867582
17528 Paragraph
17529 \change_inserted -712698321 1353867583
17530 None
17531 \change_unchanged
17532
17533 \end_layout
17534
17535 \end_inset
17536
17537  means nothing special.
17538  
17539 \end_layout
17540
17541 \begin_layout Description
17542 \begin_inset Flex Code
17543 status collapsed
17544
17545 \begin_layout Plain Layout
17546 Command
17547 \end_layout
17548
17549 \end_inset
17550
17551  means 
17552 \begin_inset Flex Code
17553 status collapsed
17554
17555 \begin_layout Plain Layout
17556
17557 \backslash
17558
17559 \emph on
17560 LatexName
17561 \emph default
17562 {\SpecialChar \ldots{}
17563 }
17564 \end_layout
17565
17566 \end_inset
17567
17568 .
17569 \end_layout
17570
17571 \begin_layout Description
17572 \begin_inset Flex Code
17573 status collapsed
17574
17575 \begin_layout Plain Layout
17576 Environment
17577 \end_layout
17578
17579 \end_inset
17580
17581  means 
17582 \begin_inset Flex Code
17583 status collapsed
17584
17585 \begin_layout Plain Layout
17586
17587 \backslash
17588 begin{
17589 \emph on
17590 LatexName
17591 \emph default
17592 }\SpecialChar \ldots{}
17593
17594 \backslash
17595 end{
17596 \emph on
17597 LatexName
17598 \emph default
17599 }
17600 \end_layout
17601
17602 \end_inset
17603
17604 .
17605  
17606 \end_layout
17607
17608 \begin_layout Description
17609
17610 \change_deleted -712698321 1353867600
17611 \begin_inset Flex Code
17612 status collapsed
17613
17614 \begin_layout Plain Layout
17615 Item_Environment
17616 \end_layout
17617
17618 \end_inset
17619
17620  is the same as 
17621 \begin_inset Flex Code
17622 status collapsed
17623
17624 \begin_layout Plain Layout
17625 Environment
17626 \end_layout
17627
17628 \end_inset
17629
17630 , except that an 
17631 \begin_inset Flex Code
17632 status collapsed
17633
17634 \begin_layout Plain Layout
17635
17636 \backslash
17637 item
17638 \end_layout
17639
17640 \end_inset
17641
17642  is generated for each paragraph of this environment.
17643  
17644 \end_layout
17645
17646 \begin_layout Description
17647
17648 \change_deleted -712698321 1353867600
17649 \begin_inset Flex Code
17650 status collapsed
17651
17652 \begin_layout Plain Layout
17653 List_Environment
17654 \end_layout
17655
17656 \end_inset
17657
17658  is the same as 
17659 \begin_inset Flex Code
17660 status collapsed
17661
17662 \begin_layout Plain Layout
17663 Item_Environment
17664 \end_layout
17665
17666 \end_inset
17667
17668 , except that 
17669 \begin_inset Flex Code
17670 status collapsed
17671
17672 \begin_layout Plain Layout
17673 LabelWidthString
17674 \end_layout
17675
17676 \end_inset
17677
17678  is passed as an argument to the environment.
17679  
17680 \begin_inset Flex Code
17681 status collapsed
17682
17683 \begin_layout Plain Layout
17684 LabelWidthString
17685 \end_layout
17686
17687 \end_inset
17688
17689  can be defined in the 
17690 \begin_inset Flex MenuItem
17691 status collapsed
17692
17693 \begin_layout Plain Layout
17694
17695 \bar under
17696 Edit
17697 \bar default
17698 \SpecialChar \menuseparator
17699
17700 \bar under
17701 P
17702 \bar default
17703 aragraph
17704 \begin_inset space ~
17705 \end_inset
17706
17707 settings
17708 \end_layout
17709
17710 \end_inset
17711
17712  dialog.
17713  
17714 \change_unchanged
17715
17716 \end_layout
17717
17718 \begin_layout Standard
17719 Putting the last few things together, the LaTeX output will be either: 
17720 \end_layout
17721
17722 \begin_layout LyX-Code
17723
17724 \backslash
17725
17726 \change_deleted 2090807402 1356919073
17727 latexname
17728 \change_inserted 2090807402 1356919073
17729 LatexName
17730 \change_unchanged
17731 [
17732 \change_deleted 2090807402 1356919073
17733 latexparam
17734 \change_inserted 2090807402 1356919002
17735 LatexParam
17736 \change_unchanged
17737 ]{\SpecialChar \ldots{}
17738 }
17739 \end_layout
17740
17741 \begin_layout Standard
17742 or: 
17743 \end_layout
17744
17745 \begin_layout LyX-Code
17746
17747 \backslash
17748 begin{
17749 \change_deleted 2090807402 1356919013
17750 latexname
17751 \change_inserted 2090807402 1356919014
17752 LatexName
17753 \change_unchanged
17754 }[
17755 \change_deleted 2090807402 1356919013
17756 latexparam
17757 \change_inserted 2090807402 1356919008
17758 LatexParam
17759 \change_unchanged
17760 ] \SpecialChar \ldots{}
17761  
17762 \backslash
17763 end{
17764 \change_deleted 2090807402 1356919016
17765 latexname
17766 \change_inserted 2090807402 1356919016
17767 LatexName
17768 \change_unchanged
17769 }.
17770 \end_layout
17771
17772 \begin_layout Standard
17773 depending upon the LaTeX type.
17774 \end_layout
17775
17776 \end_deeper
17777 \begin_layout Description
17778
17779 \change_inserted -712698321 1354263128
17780 \begin_inset Flex Code
17781 status collapsed
17782
17783 \begin_layout Plain Layout
17784
17785 \change_inserted -712698321 1353866742
17786 LeftDelim
17787 \change_unchanged
17788
17789 \end_layout
17790
17791 \end_inset
17792
17793  [
17794 \begin_inset Flex Code
17795 status collapsed
17796
17797 \begin_layout Plain Layout
17798
17799 \change_inserted -712698321 1353866752
17800 string
17801 \end_layout
17802
17803 \end_inset
17804
17805 ] A string that is put at the beginning of the layout content.
17806  A line break in the output can be indicated by 
17807 \begin_inset Flex Code
17808 status collapsed
17809
17810 \begin_layout Plain Layout
17811
17812 \change_inserted -712698321 1354263128
17813 <br/>
17814 \end_layout
17815
17816 \end_inset
17817
17818 .
17819 \change_unchanged
17820
17821 \end_layout
17822
17823 \begin_layout Description
17824 \begin_inset Flex Code
17825 status collapsed
17826
17827 \begin_layout Plain Layout
17828 LyxType
17829 \end_layout
17830
17831 \end_inset
17832
17833  Can be 
17834 \begin_inset Flex Code
17835 status collapsed
17836
17837 \begin_layout Plain Layout
17838 charstyle
17839 \end_layout
17840
17841 \end_inset
17842
17843
17844 \begin_inset Flex Code
17845 status collapsed
17846
17847 \begin_layout Plain Layout
17848 custom
17849 \end_layout
17850
17851 \end_inset
17852
17853
17854 \begin_inset Flex Code
17855 status collapsed
17856
17857 \begin_layout Plain Layout
17858 element
17859 \end_layout
17860
17861 \end_inset
17862
17863  or 
17864 \begin_inset Flex Code
17865 status collapsed
17866
17867 \begin_layout Plain Layout
17868 end
17869 \end_layout
17870
17871 \end_inset
17872
17873  (indicating a dummy definition ending definitions of charstyles, etc).
17874  This entry is required in and is only meaningful for Flex insets.
17875  Among other things, it determines on which menu this inset will appear.
17876  Setting 
17877 \begin_inset Flex Code
17878 status collapsed
17879
17880 \begin_layout Plain Layout
17881 LyXType
17882 \end_layout
17883
17884 \end_inset
17885
17886  to 
17887 \begin_inset Flex Code
17888 status collapsed
17889
17890 \begin_layout Plain Layout
17891 charstyle
17892 \end_layout
17893
17894 \end_inset
17895
17896  will automatically set 
17897 \begin_inset Flex Code
17898 status collapsed
17899
17900 \begin_layout Plain Layout
17901 MultiPar
17902 \end_layout
17903
17904 \end_inset
17905
17906  to false.
17907  
17908 \begin_inset Flex Code
17909 status collapsed
17910
17911 \begin_layout Plain Layout
17912 MultiPar
17913 \end_layout
17914
17915 \end_inset
17916
17917  can be set to true for 
17918 \begin_inset Flex Code
17919 status collapsed
17920
17921 \begin_layout Plain Layout
17922 charstyle
17923 \end_layout
17924
17925 \end_inset
17926
17927  insets by setting it 
17928 \emph on
17929 after
17930 \emph default
17931  you set the 
17932 \begin_inset Flex Code
17933 status collapsed
17934
17935 \begin_layout Plain Layout
17936 LyXType
17937 \end_layout
17938
17939 \end_inset
17940
17941 .
17942 \end_layout
17943
17944 \begin_layout Description
17945 \begin_inset Flex Code
17946 status collapsed
17947
17948 \begin_layout Plain Layout
17949 MultiPar
17950 \end_layout
17951
17952 \end_inset
17953
17954  [
17955 \begin_inset Flex Code
17956 status collapsed
17957
17958 \begin_layout Plain Layout
17959
17960 \emph on
17961 0
17962 \end_layout
17963
17964 \end_inset
17965
17966 ,
17967 \begin_inset space \thinspace{}
17968 \end_inset
17969
17970
17971 \begin_inset Flex Code
17972 status collapsed
17973
17974 \begin_layout Plain Layout
17975 1
17976 \end_layout
17977
17978 \end_inset
17979
17980 ] Whether multiple paragraphs are permitted in this inset.
17981  This will also set 
17982 \begin_inset Flex Code
17983 status collapsed
17984
17985 \begin_layout Plain Layout
17986 CustomPars
17987 \end_layout
17988
17989 \end_inset
17990
17991  to the same value and 
17992 \begin_inset Flex Code
17993 status collapsed
17994
17995 \begin_layout Plain Layout
17996 ForcePlain
17997 \end_layout
17998
17999 \end_inset
18000
18001  to the opposite value.
18002  These can be reset to other values, if they are used 
18003 \emph on
18004 after
18005 \emph default
18006  
18007 \begin_inset Flex Code
18008 status collapsed
18009
18010 \begin_layout Plain Layout
18011 MultiPar
18012 \end_layout
18013
18014 \end_inset
18015
18016 .
18017  Default is true.
18018 \end_layout
18019
18020 \begin_layout Description
18021 \begin_inset Flex Code
18022 status collapsed
18023
18024 \begin_layout Plain Layout
18025 NeedProtect
18026 \end_layout
18027
18028 \end_inset
18029
18030  [
18031 \begin_inset Flex Code
18032 status collapsed
18033
18034 \begin_layout Plain Layout
18035
18036 \emph on
18037 0
18038 \end_layout
18039
18040 \end_inset
18041
18042 ,
18043 \begin_inset space \thinspace{}
18044 \end_inset
18045
18046
18047 \begin_inset Flex Code
18048 status collapsed
18049
18050 \begin_layout Plain Layout
18051 1
18052 \end_layout
18053
18054 \end_inset
18055
18056 ] Whether fragile commands in this inset should be 
18057 \begin_inset Flex Code
18058 status collapsed
18059
18060 \begin_layout Plain Layout
18061
18062 \backslash
18063 protect
18064 \end_layout
18065
18066 \end_inset
18067
18068 'ed.
18069  (Note: This is 
18070 \emph on
18071 not
18072 \emph default
18073  whether the command should itself be protected.) Default is false.
18074 \end_layout
18075
18076 \begin_layout Description
18077 \begin_inset Flex Code
18078 status collapsed
18079
18080 \begin_layout Plain Layout
18081 ParbreakIsNewline
18082 \end_layout
18083
18084 \end_inset
18085
18086  [
18087 \begin_inset Flex Code
18088 status collapsed
18089
18090 \begin_layout Plain Layout
18091
18092 \emph on
18093 0
18094 \end_layout
18095
18096 \end_inset
18097
18098 ,
18099 \begin_inset space \thinspace{}
18100 \end_inset
18101
18102
18103 \begin_inset Flex Code
18104 status collapsed
18105
18106 \begin_layout Plain Layout
18107 1
18108 \end_layout
18109
18110 \end_inset
18111
18112 ] As with paragraph styles, see sec.
18113 \begin_inset space ~
18114 \end_inset
18115
18116
18117 \begin_inset CommandInset ref
18118 LatexCommand ref
18119 reference "sub:Paragraph-Styles"
18120
18121 \end_inset
18122
18123 .
18124  Default is false.
18125 \end_layout
18126
18127 \begin_layout Description
18128 \begin_inset Flex Code
18129 status collapsed
18130
18131 \begin_layout Plain Layout
18132 PassThru
18133 \end_layout
18134
18135 \end_inset
18136
18137  [
18138 \begin_inset Flex Code
18139 status collapsed
18140
18141 \begin_layout Plain Layout
18142
18143 \emph on
18144 0
18145 \end_layout
18146
18147 \end_inset
18148
18149 ,
18150 \begin_inset space \thinspace{}
18151 \end_inset
18152
18153
18154 \begin_inset Flex Code
18155 status collapsed
18156
18157 \begin_layout Plain Layout
18158 1
18159 \end_layout
18160
18161 \end_inset
18162
18163 ] As with paragraph styles, see sec.
18164 \begin_inset space ~
18165 \end_inset
18166
18167
18168 \begin_inset CommandInset ref
18169 LatexCommand ref
18170 reference "sub:Paragraph-Styles"
18171
18172 \end_inset
18173
18174 .
18175  Default is false.
18176 \end_layout
18177
18178 \begin_layout Description
18179 \begin_inset Flex Code
18180 status collapsed
18181
18182 \begin_layout Plain Layout
18183 Preamble
18184 \end_layout
18185
18186 \end_inset
18187
18188  As with paragraph styles, see sec.
18189 \begin_inset space ~
18190 \end_inset
18191
18192
18193 \begin_inset CommandInset ref
18194 LatexCommand ref
18195 reference "sub:Paragraph-Styles"
18196
18197 \end_inset
18198
18199 .
18200 \end_layout
18201
18202 \begin_layout Description
18203 \begin_inset Flex Code
18204 status collapsed
18205
18206 \begin_layout Plain Layout
18207 RefPrefix
18208 \end_layout
18209
18210 \end_inset
18211
18212  [
18213 \begin_inset Flex Code
18214 status collapsed
18215
18216 \begin_layout Plain Layout
18217 string
18218 \end_layout
18219
18220 \end_inset
18221
18222 ] The prefix to use when creating labels referring to insets of this type.
18223  This allows the use of formatted references.
18224 \end_layout
18225
18226 \begin_layout Description
18227 \begin_inset Flex Code
18228 status collapsed
18229
18230 \begin_layout Plain Layout
18231 Requires
18232 \end_layout
18233
18234 \end_inset
18235
18236  [
18237 \begin_inset Flex Code
18238 status collapsed
18239
18240 \begin_layout Plain Layout
18241 string
18242 \end_layout
18243
18244 \end_inset
18245
18246 ] As with paragraph styles, see sec.
18247 \begin_inset space ~
18248 \end_inset
18249
18250
18251 \begin_inset CommandInset ref
18252 LatexCommand ref
18253 reference "sub:Paragraph-Styles"
18254
18255 \end_inset
18256
18257 .
18258 \change_inserted -712698321 1354439699
18259
18260 \end_layout
18261
18262 \begin_layout Description
18263
18264 \change_inserted -712698321 1354439705
18265 \begin_inset Flex Code
18266 status collapsed
18267
18268 \begin_layout Plain Layout
18269
18270 \change_inserted -712698321 1354439699
18271 ResetArgs
18272 \end_layout
18273
18274 \end_inset
18275
18276  [
18277 \begin_inset Flex Code
18278 status collapsed
18279
18280 \begin_layout Plain Layout
18281
18282 \change_inserted -712698321 1354439699
18283
18284 \emph on
18285 0
18286 \end_layout
18287
18288 \end_inset
18289
18290 ,
18291 \begin_inset Flex Code
18292 status collapsed
18293
18294 \begin_layout Plain Layout
18295
18296 \change_inserted -712698321 1354439699
18297 1
18298 \end_layout
18299
18300 \end_inset
18301
18302 ] Resets the LaTeX arguments of this layout (as defined via the 
18303 \begin_inset Flex Code
18304 status collapsed
18305
18306 \begin_layout Plain Layout
18307
18308 \change_inserted -712698321 1354439699
18309 Argument
18310 \end_layout
18311
18312 \end_inset
18313
18314  tag).
18315  This is useful if you have copied a style via 
18316 \begin_inset Flex Code
18317 status collapsed
18318
18319 \begin_layout Plain Layout
18320
18321 \change_inserted -712698321 1354439699
18322 CopyStyle
18323 \end_layout
18324
18325 \end_inset
18326
18327 , but you do not want to inherit its (required and optional) arguments.
18328
18329 \change_deleted -712698321 1354439698
18330  
18331 \change_unchanged
18332
18333 \end_layout
18334
18335 \begin_layout Description
18336 \begin_inset Flex Code
18337 status collapsed
18338
18339 \begin_layout Plain Layout
18340 ResetsFont
18341 \end_layout
18342
18343 \end_inset
18344
18345  [
18346 \begin_inset Flex Code
18347 status collapsed
18348
18349 \begin_layout Plain Layout
18350 0
18351 \end_layout
18352
18353 \end_inset
18354
18355 ,
18356 \begin_inset space \thinspace{}
18357 \end_inset
18358
18359
18360 \begin_inset Flex Code
18361 status collapsed
18362
18363 \begin_layout Plain Layout
18364
18365 \emph on
18366 1
18367 \end_layout
18368
18369 \end_inset
18370
18371 ] Whether this inset should use the font of its surrounding environment
18372  or uses its own.
18373  Default is true: uses its own.
18374 \end_layout
18375
18376 \begin_layout Description
18377
18378 \change_inserted -712698321 1354263134
18379 \begin_inset Flex Code
18380 status collapsed
18381
18382 \begin_layout Plain Layout
18383
18384 \change_inserted -712698321 1353866810
18385 RightDelim
18386 \end_layout
18387
18388 \end_inset
18389
18390  [
18391 \begin_inset Flex Code
18392 status collapsed
18393
18394 \begin_layout Plain Layout
18395
18396 \change_inserted -712698321 1353866806
18397 string
18398 \end_layout
18399
18400 \end_inset
18401
18402 ] A string that is put at the end of the layout content.
18403  A line break in the output can be indicated by 
18404 \begin_inset Flex Code
18405 status collapsed
18406
18407 \begin_layout Plain Layout
18408
18409 \change_inserted -712698321 1354263134
18410 <br/>
18411 \end_layout
18412
18413 \end_inset
18414
18415 .
18416 \change_unchanged
18417
18418 \end_layout
18419
18420 \begin_layout Description
18421 \begin_inset Flex Code
18422 status collapsed
18423
18424 \begin_layout Plain Layout
18425 Spellcheck
18426 \end_layout
18427
18428 \end_inset
18429
18430  [
18431 \begin_inset Flex Code
18432 status collapsed
18433
18434 \begin_layout Plain Layout
18435 0
18436 \end_layout
18437
18438 \end_inset
18439
18440 ,
18441 \begin_inset space \thinspace{}
18442 \end_inset
18443
18444
18445 \begin_inset Flex Code
18446 status collapsed
18447
18448 \begin_layout Plain Layout
18449
18450 \emph on
18451 1
18452 \end_layout
18453
18454 \end_inset
18455
18456 ] Allow spell-checking the contents of this inset.
18457  Default is true.
18458 \end_layout
18459
18460 \begin_layout Subsection
18461 Counters
18462 \begin_inset CommandInset label
18463 LatexCommand label
18464 name "sub:Counters"
18465
18466 \end_inset
18467
18468
18469 \end_layout
18470
18471 \begin_layout Standard
18472 It is necessary to define the counters (
18473 \begin_inset Flex MenuItem
18474 status collapsed
18475
18476 \begin_layout Plain Layout
18477 chapter
18478 \end_layout
18479
18480 \end_inset
18481
18482
18483 \begin_inset Flex MenuItem
18484 status collapsed
18485
18486 \begin_layout Plain Layout
18487 figure
18488 \end_layout
18489
18490 \end_inset
18491
18492 , \SpecialChar \ldots{}
18493 ) in the text class itself.
18494  The standard counters are defined in the file 
18495 \begin_inset Flex Code
18496 status collapsed
18497
18498 \begin_layout Plain Layout
18499 stdcounters.inc
18500 \end_layout
18501
18502 \end_inset
18503
18504 , so you may have to do no more than add
18505 \end_layout
18506
18507 \begin_layout LyX-Code
18508 Input stdcounters.inc
18509 \end_layout
18510
18511 \begin_layout Standard
18512 to your layout file to get them to work.
18513  But if you want to define custom counters, then you can do so.
18514  The counter declaration must begin with:
18515 \end_layout
18516
18517 \begin_layout LyX-Code
18518 Counter CounterName
18519 \end_layout
18520
18521 \begin_layout Standard
18522 where of course `
18523 \begin_inset Flex Code
18524 status collapsed
18525
18526 \begin_layout Plain Layout
18527 CounterName
18528 \end_layout
18529
18530 \end_inset
18531
18532 ' is replaced by the name of the counter.
18533  And it must end with 
18534 \begin_inset Quotes eld
18535 \end_inset
18536
18537
18538 \begin_inset Flex Code
18539 status collapsed
18540
18541 \begin_layout Plain Layout
18542 End
18543 \end_layout
18544
18545 \end_inset
18546
18547
18548 \begin_inset Quotes erd
18549 \end_inset
18550
18551 .
18552  The following parameters can also be used:
18553 \end_layout
18554
18555 \begin_layout Description
18556 \begin_inset Flex Code
18557 status collapsed
18558
18559 \begin_layout Plain Layout
18560 LabelString
18561 \end_layout
18562
18563 \end_inset
18564
18565  [
18566 \begin_inset Flex Code
18567 status collapsed
18568
18569 \begin_layout Plain Layout
18570 string
18571 \end_layout
18572
18573 \end_inset
18574
18575 =
18576 \begin_inset Quotes erd
18577 \end_inset
18578
18579
18580 \begin_inset Quotes erd
18581 \end_inset
18582
18583 ] When defined, this string defines how the counter is displayed.
18584  Setting this value sets 
18585 \begin_inset Flex Code
18586 status collapsed
18587
18588 \begin_layout Plain Layout
18589 LabelStringAppendix
18590 \end_layout
18591
18592 \end_inset
18593
18594  to the same value.
18595  The following special constructs can be used in the string:
18596 \end_layout
18597
18598 \begin_deeper
18599 \begin_layout Itemize
18600 \begin_inset Flex Code
18601 status collapsed
18602
18603 \begin_layout Plain Layout
18604
18605 \backslash
18606 thecounter
18607 \end_layout
18608
18609 \end_inset
18610
18611  will be replaced by the expansion of the 
18612 \begin_inset Flex Code
18613 status collapsed
18614
18615 \begin_layout Plain Layout
18616 LabelString
18617 \end_layout
18618
18619 \end_inset
18620
18621  (or 
18622 \begin_inset Flex Code
18623 status collapsed
18624
18625 \begin_layout Plain Layout
18626 LabelStringAppendix
18627 \end_layout
18628
18629 \end_inset
18630
18631 ) of the counter 
18632 \begin_inset Flex Code
18633 status collapsed
18634
18635 \begin_layout Plain Layout
18636 counter
18637 \end_layout
18638
18639 \end_inset
18640
18641 .
18642  
18643 \end_layout
18644
18645 \begin_layout Itemize
18646 counter values can be expressed using LaTeX-like macros
18647 \begin_inset Newline newline
18648 \end_inset
18649
18650
18651 \begin_inset Flex Code
18652 status collapsed
18653
18654 \begin_layout Plain Layout
18655
18656 \backslash
18657
18658 \emph on
18659 numbertype
18660 \emph default
18661 {
18662 \emph on
18663 counter
18664 \emph default
18665 }
18666 \end_layout
18667
18668 \end_inset
18669
18670 , where 
18671 \begin_inset Flex Code
18672 status collapsed
18673
18674 \begin_layout Plain Layout
18675
18676 \emph on
18677 numbertype
18678 \end_layout
18679
18680 \end_inset
18681
18682  can be:
18683 \begin_inset Foot
18684 status collapsed
18685
18686 \begin_layout Plain Layout
18687
18688 \family roman
18689 \series medium
18690 \shape up
18691 \size normal
18692 \emph off
18693 \bar no
18694 \noun off
18695 \color none
18696 Actually, the situation is a bit more complicated: any
18697 \family default
18698 \series default
18699 \shape default
18700 \emph default
18701 \bar default
18702  
18703 \size default
18704 \emph on
18705 \noun default
18706 \color inherit
18707 numbertype
18708 \family roman
18709 \series medium
18710 \shape up
18711 \size normal
18712 \emph off
18713 \bar no
18714 \noun off
18715  other than those described below will produce arabic numerals.
18716  It would not be surprising to see this change in the future.
18717 \end_layout
18718
18719 \end_inset
18720
18721  
18722 \begin_inset Flex Code
18723 status collapsed
18724
18725 \begin_layout Plain Layout
18726 arabic
18727 \end_layout
18728
18729 \end_inset
18730
18731 : 1, 2, 3,\SpecialChar \ldots{}
18732
18733 \begin_inset Flex Code
18734 status collapsed
18735
18736 \begin_layout Plain Layout
18737 alph
18738 \end_layout
18739
18740 \end_inset
18741
18742  for lower-case letters: a, b, c, \SpecialChar \ldots{}
18743
18744 \begin_inset Flex Code
18745 status collapsed
18746
18747 \begin_layout Plain Layout
18748 Alph
18749 \end_layout
18750
18751 \end_inset
18752
18753  for upper-case letters: A, B, C, \SpecialChar \ldots{}
18754
18755 \begin_inset Flex Code
18756 status collapsed
18757
18758 \begin_layout Plain Layout
18759 roman
18760 \end_layout
18761
18762 \end_inset
18763
18764  for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
18765
18766 \begin_inset Flex Code
18767 status collapsed
18768
18769 \begin_layout Plain Layout
18770 Roman
18771 \end_layout
18772
18773 \end_inset
18774
18775  for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
18776
18777 \begin_inset Flex Code
18778 status collapsed
18779
18780 \begin_layout Plain Layout
18781 hebrew
18782 \end_layout
18783
18784 \end_inset
18785
18786  for hebrew numerals.
18787 \end_layout
18788
18789 \end_deeper
18790 \begin_layout Standard
18791 If LabelString is not defined, a default value is constructed as follows:
18792  if the counter has a master counter 
18793 \begin_inset Flex Code
18794 status collapsed
18795
18796 \begin_layout Plain Layout
18797 master
18798 \end_layout
18799
18800 \end_inset
18801
18802  (defined via 
18803 \begin_inset Flex Code
18804 status collapsed
18805
18806 \begin_layout Plain Layout
18807 Within
18808 \end_layout
18809
18810 \end_inset
18811
18812 ), the string
18813 \begin_inset Newline newline
18814 \end_inset
18815
18816
18817 \begin_inset Flex Code
18818 status collapsed
18819
18820 \begin_layout Plain Layout
18821
18822 \backslash
18823 themaster.
18824 \backslash
18825 arabic{counter}
18826 \end_layout
18827
18828 \end_inset
18829
18830  is used; otherwise the string 
18831 \begin_inset Flex Code
18832 status collapsed
18833
18834 \begin_layout Plain Layout
18835
18836 \backslash
18837 arabic{counter}
18838 \end_layout
18839
18840 \end_inset
18841
18842  is used.
18843 \end_layout
18844
18845 \begin_layout Description
18846 \begin_inset Flex Code
18847 status collapsed
18848
18849 \begin_layout Plain Layout
18850 LabelStringAppendix
18851 \end_layout
18852
18853 \end_inset
18854
18855  [
18856 \begin_inset Flex Code
18857 status collapsed
18858
18859 \begin_layout Plain Layout
18860 string
18861 \end_layout
18862
18863 \end_inset
18864
18865 =
18866 \begin_inset Quotes erd
18867 \end_inset
18868
18869
18870 \begin_inset Quotes erd
18871 \end_inset
18872
18873 ] Same as 
18874 \begin_inset Flex Code
18875 status collapsed
18876
18877 \begin_layout Plain Layout
18878 LabelString
18879 \end_layout
18880
18881 \end_inset
18882
18883 , but for use in the Appendix.
18884 \end_layout
18885
18886 \begin_layout Description
18887 \begin_inset Flex Code
18888 status collapsed
18889
18890 \begin_layout Plain Layout
18891 PrettyFormat
18892 \end_layout
18893
18894 \end_inset
18895
18896  [
18897 \begin_inset Flex Code
18898 status collapsed
18899
18900 \begin_layout Plain Layout
18901 string
18902 \end_layout
18903
18904 \end_inset
18905
18906 =
18907 \begin_inset Quotes erd
18908 \end_inset
18909
18910
18911 \begin_inset Quotes erd
18912 \end_inset
18913
18914 ] A format for use with formatted references to this counter.
18915  For example, one might want to have references to section numbers appear
18916  as 
18917 \begin_inset Quotes eld
18918 \end_inset
18919
18920 Section 2.4
18921 \begin_inset Quotes erd
18922 \end_inset
18923
18924 .
18925  The string should contain 
18926 \begin_inset Quotes eld
18927 \end_inset
18928
18929 ##
18930 \begin_inset Quotes erd
18931 \end_inset
18932
18933 .
18934  This will be replaced by the counter number itself.
18935  So, for sections, it would be: Section ##.
18936 \end_layout
18937
18938 \begin_layout Description
18939 \begin_inset Flex Code
18940 status collapsed
18941
18942 \begin_layout Plain Layout
18943 Within
18944 \end_layout
18945
18946 \end_inset
18947
18948  [
18949 \begin_inset Flex Code
18950 status collapsed
18951
18952 \begin_layout Plain Layout
18953 string
18954 \end_layout
18955
18956 \end_inset
18957
18958 =
18959 \begin_inset Quotes erd
18960 \end_inset
18961
18962
18963 \begin_inset Quotes erd
18964 \end_inset
18965
18966 ] If this is set to the name of another counter, the present counter will
18967  be reset every time the other one is increased.
18968  For example, 
18969 \begin_inset Flex Code
18970 status collapsed
18971
18972 \begin_layout Plain Layout
18973 subsection
18974 \end_layout
18975
18976 \end_inset
18977
18978  is numbered inside 
18979 \begin_inset Flex Code
18980 status collapsed
18981
18982 \begin_layout Plain Layout
18983 section
18984 \end_layout
18985
18986 \end_inset
18987
18988 .
18989 \end_layout
18990
18991 \begin_layout Subsection
18992 Font description
18993 \begin_inset CommandInset label
18994 LatexCommand label
18995 name "sub:Font-description"
18996
18997 \end_inset
18998
18999
19000 \end_layout
19001
19002 \begin_layout Standard
19003 A font description looks like this:
19004 \end_layout
19005
19006 \begin_layout LyX-Code
19007 Font 
19008 \family roman
19009 \emph on
19010 or
19011 \family default
19012 \emph default
19013  LabelFont
19014 \end_layout
19015
19016 \begin_layout LyX-Code
19017  ...
19018 \end_layout
19019
19020 \begin_layout LyX-Code
19021 EndFont
19022 \end_layout
19023
19024 \begin_layout Standard
19025 The following commands are available:
19026 \end_layout
19027
19028 \begin_layout Description
19029 \begin_inset Flex Code
19030 status collapsed
19031
19032 \begin_layout Plain Layout
19033 Color
19034 \end_layout
19035
19036 \end_inset
19037
19038  [
19039 \begin_inset Flex Code
19040 status collapsed
19041
19042 \begin_layout Plain Layout
19043
19044 \emph on
19045 none
19046 \end_layout
19047
19048 \end_inset
19049
19050
19051 \begin_inset Flex Code
19052 status collapsed
19053
19054 \begin_layout Plain Layout
19055 black
19056 \end_layout
19057
19058 \end_inset
19059
19060
19061 \begin_inset Flex Code
19062 status collapsed
19063
19064 \begin_layout Plain Layout
19065 white
19066 \end_layout
19067
19068 \end_inset
19069
19070
19071 \begin_inset Flex Code
19072 status collapsed
19073
19074 \begin_layout Plain Layout
19075 red
19076 \end_layout
19077
19078 \end_inset
19079
19080
19081 \begin_inset Flex Code
19082 status collapsed
19083
19084 \begin_layout Plain Layout
19085 green
19086 \end_layout
19087
19088 \end_inset
19089
19090
19091 \begin_inset Flex Code
19092 status collapsed
19093
19094 \begin_layout Plain Layout
19095 blue
19096 \end_layout
19097
19098 \end_inset
19099
19100
19101 \begin_inset Flex Code
19102 status collapsed
19103
19104 \begin_layout Plain Layout
19105 cyan
19106 \end_layout
19107
19108 \end_inset
19109
19110
19111 \begin_inset Flex Code
19112 status collapsed
19113
19114 \begin_layout Plain Layout
19115 magenta
19116 \end_layout
19117
19118 \end_inset
19119
19120
19121 \begin_inset Flex Code
19122 status collapsed
19123
19124 \begin_layout Plain Layout
19125 yellow
19126 \end_layout
19127
19128 \end_inset
19129
19130 ]
19131 \end_layout
19132
19133 \begin_layout Description
19134 \begin_inset Flex Code
19135 status collapsed
19136
19137 \begin_layout Plain Layout
19138 Family
19139 \end_layout
19140
19141 \end_inset
19142
19143  [
19144 \begin_inset Flex Code
19145 status collapsed
19146
19147 \begin_layout Plain Layout
19148
19149 \emph on
19150 Roman
19151 \end_layout
19152
19153 \end_inset
19154
19155
19156 \begin_inset Flex Code
19157 status collapsed
19158
19159 \begin_layout Plain Layout
19160 Sans
19161 \end_layout
19162
19163 \end_inset
19164
19165
19166 \begin_inset Flex Code
19167 status collapsed
19168
19169 \begin_layout Plain Layout
19170 Typewriter
19171 \end_layout
19172
19173 \end_inset
19174
19175 ]
19176 \end_layout
19177
19178 \begin_layout Description
19179 \begin_inset Flex Code
19180 status collapsed
19181
19182 \begin_layout Plain Layout
19183 Misc
19184 \end_layout
19185
19186 \end_inset
19187
19188  [
19189 \begin_inset Flex Code
19190 status collapsed
19191
19192 \begin_layout Plain Layout
19193 string
19194 \end_layout
19195
19196 \end_inset
19197
19198 ] Valid arguments are: 
19199 \begin_inset Flex Code
19200 status collapsed
19201
19202 \begin_layout Plain Layout
19203 emph
19204 \end_layout
19205
19206 \end_inset
19207
19208
19209 \begin_inset Flex Code
19210 status collapsed
19211
19212 \begin_layout Plain Layout
19213 noun
19214 \end_layout
19215
19216 \end_inset
19217
19218
19219 \begin_inset Flex Code
19220 status collapsed
19221
19222 \begin_layout Plain Layout
19223 strikeout
19224 \end_layout
19225
19226 \end_inset
19227
19228
19229 \begin_inset Flex Code
19230 status collapsed
19231
19232 \begin_layout Plain Layout
19233 underbar
19234 \end_layout
19235
19236 \end_inset
19237
19238
19239 \begin_inset Flex Code
19240 status collapsed
19241
19242 \begin_layout Plain Layout
19243 uuline
19244 \end_layout
19245
19246 \end_inset
19247
19248
19249 \begin_inset Flex Code
19250 status collapsed
19251
19252 \begin_layout Plain Layout
19253 uwave
19254 \end_layout
19255
19256 \end_inset
19257
19258
19259 \begin_inset Flex Code
19260 status collapsed
19261
19262 \begin_layout Plain Layout
19263 no_emph
19264 \end_layout
19265
19266 \end_inset
19267
19268
19269 \begin_inset Flex Code
19270 status collapsed
19271
19272 \begin_layout Plain Layout
19273 no_noun
19274 \end_layout
19275
19276 \end_inset
19277
19278
19279 \begin_inset Flex Code
19280 status collapsed
19281
19282 \begin_layout Plain Layout
19283 no_strikeout
19284 \end_layout
19285
19286 \end_inset
19287
19288
19289 \begin_inset Flex Code
19290 status collapsed
19291
19292 \begin_layout Plain Layout
19293 no_bar
19294 \end_layout
19295
19296 \end_inset
19297
19298
19299 \begin_inset Flex Code
19300 status collapsed
19301
19302 \begin_layout Plain Layout
19303 no_uuline
19304 \end_layout
19305
19306 \end_inset
19307
19308  and 
19309 \begin_inset Flex Code
19310 status collapsed
19311
19312 \begin_layout Plain Layout
19313 no_uwave
19314 \end_layout
19315
19316 \end_inset
19317
19318 .
19319  Each of these turns on or off the corresponding attribute.
19320  For example, 
19321 \begin_inset Flex Code
19322 status collapsed
19323
19324 \begin_layout Plain Layout
19325 emph
19326 \end_layout
19327
19328 \end_inset
19329
19330  turns on emphasis, and 
19331 \begin_inset Flex Code
19332 status collapsed
19333
19334 \begin_layout Plain Layout
19335 no_emph
19336 \end_layout
19337
19338 \end_inset
19339
19340  turns it off.
19341  
19342 \begin_inset Newline newline
19343 \end_inset
19344
19345 If the latter seems puzzling, remember that the font settings for the present
19346  context are generally inherited from the surrounding context.
19347  So 
19348 \begin_inset Flex Code
19349 status collapsed
19350
19351 \begin_layout Plain Layout
19352 no_emph
19353 \end_layout
19354
19355 \end_inset
19356
19357  would turn off the emphasis that was anyway in effect, say, in a theorem
19358  environment.
19359 \end_layout
19360
19361 \begin_layout Description
19362 \begin_inset Flex Code
19363 status collapsed
19364
19365 \begin_layout Plain Layout
19366 Series
19367 \end_layout
19368
19369 \end_inset
19370
19371  [
19372 \begin_inset Flex Code
19373 status collapsed
19374
19375 \begin_layout Plain Layout
19376
19377 \emph on
19378 Medium
19379 \end_layout
19380
19381 \end_inset
19382
19383
19384 \begin_inset Flex Code
19385 status collapsed
19386
19387 \begin_layout Plain Layout
19388 Bold
19389 \end_layout
19390
19391 \end_inset
19392
19393
19394 \end_layout
19395
19396 \begin_layout Description
19397 \begin_inset Flex Code
19398 status collapsed
19399
19400 \begin_layout Plain Layout
19401 Shape
19402 \end_layout
19403
19404 \end_inset
19405
19406  [
19407 \begin_inset Flex Code
19408 status collapsed
19409
19410 \begin_layout Plain Layout
19411
19412 \emph on
19413 Up
19414 \end_layout
19415
19416 \end_inset
19417
19418
19419 \begin_inset Flex Code
19420 status collapsed
19421
19422 \begin_layout Plain Layout
19423 Italic
19424 \end_layout
19425
19426 \end_inset
19427
19428
19429 \begin_inset Flex Code
19430 status collapsed
19431
19432 \begin_layout Plain Layout
19433 SmallCaps
19434 \end_layout
19435
19436 \end_inset
19437
19438
19439 \begin_inset Flex Code
19440 status collapsed
19441
19442 \begin_layout Plain Layout
19443 Slanted
19444 \end_layout
19445
19446 \end_inset
19447
19448
19449 \end_layout
19450
19451 \begin_layout Description
19452 \begin_inset Flex Code
19453 status collapsed
19454
19455 \begin_layout Plain Layout
19456 Size
19457 \end_layout
19458
19459 \end_inset
19460
19461  [
19462 \begin_inset Flex Code
19463 status collapsed
19464
19465 \begin_layout Plain Layout
19466 tiny
19467 \end_layout
19468
19469 \end_inset
19470
19471
19472 \begin_inset Flex Code
19473 status collapsed
19474
19475 \begin_layout Plain Layout
19476 small
19477 \end_layout
19478
19479 \end_inset
19480
19481
19482 \begin_inset Flex Code
19483 status collapsed
19484
19485 \begin_layout Plain Layout
19486
19487 \emph on
19488 normal
19489 \end_layout
19490
19491 \end_inset
19492
19493
19494 \begin_inset Flex Code
19495 status collapsed
19496
19497 \begin_layout Plain Layout
19498 large
19499 \end_layout
19500
19501 \end_inset
19502
19503
19504 \begin_inset Flex Code
19505 status collapsed
19506
19507 \begin_layout Plain Layout
19508 larger
19509 \end_layout
19510
19511 \end_inset
19512
19513
19514 \begin_inset Flex Code
19515 status collapsed
19516
19517 \begin_layout Plain Layout
19518 largest
19519 \end_layout
19520
19521 \end_inset
19522
19523
19524 \begin_inset Flex Code
19525 status collapsed
19526
19527 \begin_layout Plain Layout
19528 huge
19529 \end_layout
19530
19531 \end_inset
19532
19533
19534 \begin_inset Flex Code
19535 status collapsed
19536
19537 \begin_layout Plain Layout
19538 giant
19539 \end_layout
19540
19541 \end_inset
19542
19543 ]
19544 \end_layout
19545
19546 \begin_layout Subsection
19547 \begin_inset CommandInset label
19548 LatexCommand label
19549 name "sub:Citation-format-description"
19550
19551 \end_inset
19552
19553 Citation format description
19554 \end_layout
19555
19556 \begin_layout Standard
19557 The 
19558 \begin_inset Flex Code
19559 status collapsed
19560
19561 \begin_layout Plain Layout
19562 CiteFormat
19563 \end_layout
19564
19565 \end_inset
19566
19567  blocks are used to describe how bibliographic information should be displayed,
19568  both within LyX itself (in the citation dialog and in tooltips, for example)
19569  and in XHTML output.
19570  Such a block might look like this:
19571 \end_layout
19572
19573 \begin_layout LyX-Code
19574 CiteFormat
19575 \end_layout
19576
19577 \begin_layout LyX-Code
19578  article ...
19579 \end_layout
19580
19581 \begin_layout LyX-Code
19582  book ...
19583 \end_layout
19584
19585 \begin_layout LyX-Code
19586 End
19587 \end_layout
19588
19589 \begin_layout Standard
19590 The individual lines define how the bibliographic information associated
19591  with an article or book, respectively, is to be displayed, and such a definitio
19592 n can be given for any `entry type' that might be present in a BibTeX file.
19593  LyX defines a default format in the source code that will be used if no
19594  specific definition has been given.
19595  LyX predefines several formats in the file 
19596 \begin_inset Flex Code
19597 status collapsed
19598
19599 \begin_layout Plain Layout
19600 stdciteformats.inc
19601 \end_layout
19602
19603 \end_inset
19604
19605 , which is included in most of LyX's document classes.
19606 \end_layout
19607
19608 \begin_layout Standard
19609 The definitions use a simple language that allows BibTeX keys to be replaced
19610  with their values.
19611  Keys should be enclosed in 
19612 \begin_inset Flex Code
19613 status collapsed
19614
19615 \begin_layout Plain Layout
19616 %
19617 \end_layout
19618
19619 \end_inset
19620
19621  signs, e.g.: 
19622 \begin_inset Flex Code
19623 status collapsed
19624
19625 \begin_layout Plain Layout
19626 %author%
19627 \end_layout
19628
19629 \end_inset
19630
19631 .
19632  So a simple definition might look like this:
19633 \end_layout
19634
19635 \begin_layout LyX-Code
19636 misc %author%, 
19637 \begin_inset Quotes eld
19638 \end_inset
19639
19640 %title
19641 \begin_inset Quotes erd
19642 \end_inset
19643
19644 .
19645 \end_layout
19646
19647 \begin_layout Standard
19648 This would print the author, followed by a comma, followed by the title,
19649  in quotes, followed by a period.
19650 \end_layout
19651
19652 \begin_layout Standard
19653 Of course, sometimes you may want to print a key only if it exists.
19654  This can be done by using a conditional construction, such as: 
19655 \begin_inset Flex Code
19656 status collapsed
19657
19658 \begin_layout Plain Layout
19659 {%volume%[[vol.
19660 \begin_inset space ~
19661 \end_inset
19662
19663 %volume%]]}
19664 \end_layout
19665
19666 \end_inset
19667
19668 .
19669  This says: If the 
19670 \begin_inset Flex Code
19671 status collapsed
19672
19673 \begin_layout Plain Layout
19674 volume
19675 \end_layout
19676
19677 \end_inset
19678
19679  key exists, then print 
19680 \begin_inset Quotes eld
19681 \end_inset
19682
19683 vol.
19684 \begin_inset space ~
19685 \end_inset
19686
19687
19688 \begin_inset Quotes erd
19689 \end_inset
19690
19691  followed by the volume key.
19692  It is also possible to have an else clause in the conditional, such as:
19693 \begin_inset Newline newline
19694 \end_inset
19695
19696
19697 \begin_inset Flex Code
19698 status collapsed
19699
19700 \begin_layout Plain Layout
19701 {%author%[[%author%]][[%editor%, ed.]]}
19702 \end_layout
19703
19704 \end_inset
19705
19706 .
19707 \begin_inset Newline newline
19708 \end_inset
19709
19710 Here, the 
19711 \begin_inset Flex Code
19712 status collapsed
19713
19714 \begin_layout Plain Layout
19715 author
19716 \end_layout
19717
19718 \end_inset
19719
19720  key is printed if it exists; otherwise, the editor key is printed, followed
19721  by 
19722 \begin_inset Quotes eld
19723 \end_inset
19724
19725 ,
19726 \begin_inset space ~
19727 \end_inset
19728
19729 ed.
19730 \begin_inset Quotes erd
19731 \end_inset
19732
19733  Note that the key is again enclosed in 
19734 \begin_inset Flex Code
19735 status collapsed
19736
19737 \begin_layout Plain Layout
19738 %
19739 \end_layout
19740
19741 \end_inset
19742
19743  signs; the entire conditional is enclosed in braces; and the if and else
19744  clauses are enclosed in double brackets, 
19745 \begin_inset Quotes eld
19746 \end_inset
19747
19748
19749 \begin_inset Flex Code
19750 status collapsed
19751
19752 \begin_layout Plain Layout
19753 [[
19754 \end_layout
19755
19756 \end_inset
19757
19758
19759 \begin_inset Quotes eld
19760 \end_inset
19761
19762  and 
19763 \begin_inset Quotes eld
19764 \end_inset
19765
19766
19767 \begin_inset Flex Code
19768 status collapsed
19769
19770 \begin_layout Plain Layout
19771 ]]
19772 \end_layout
19773
19774 \end_inset
19775
19776
19777 \begin_inset Quotes erd
19778 \end_inset
19779
19780 .
19781  There must be no space between any of these.
19782 \end_layout
19783
19784 \begin_layout Standard
19785 There is one other piece of syntax available in definitions, which looks
19786  like this: 
19787 \begin_inset Flex Code
19788 status collapsed
19789
19790 \begin_layout Plain Layout
19791 {!<i>!}
19792 \end_layout
19793
19794 \end_inset
19795
19796 .
19797  This defines a piece of formatting information that is to be used when
19798  creating 
19799 \begin_inset Quotes eld
19800 \end_inset
19801
19802 rich text
19803 \begin_inset Quotes erd
19804 \end_inset
19805
19806 .
19807  Obviously, we do not want to output HTML tags when writing plain text,
19808  so they should be wrapped in 
19809 \begin_inset Quotes eld
19810 \end_inset
19811
19812 {!
19813 \begin_inset Quotes erd
19814 \end_inset
19815
19816  and 
19817 \begin_inset Quotes eld
19818 \end_inset
19819
19820 !}
19821 \begin_inset Quotes erd
19822 \end_inset
19823
19824 .
19825 \end_layout
19826
19827 \begin_layout Standard
19828 Two special sorts of definitions are also possible in a 
19829 \begin_inset Flex Code
19830 status collapsed
19831
19832 \begin_layout Plain Layout
19833 CiteFormat
19834 \end_layout
19835
19836 \end_inset
19837
19838  block.
19839  An example of the first would be:
19840 \end_layout
19841
19842 \begin_layout LyX-Code
19843 !quotetitle 
19844 \begin_inset Quotes eld
19845 \end_inset
19846
19847 %title%
19848 \begin_inset Quotes erd
19849 \end_inset
19850
19851
19852 \end_layout
19853
19854 \begin_layout Standard
19855 This is an abbreviation, or macro, and it can be used by treating it as
19856  if it were a key: 
19857 \begin_inset Flex Code
19858 status collapsed
19859
19860 \begin_layout Plain Layout
19861 %!quotetitle%
19862 \end_layout
19863
19864 \end_inset
19865
19866 .
19867  LyX will treat 
19868 \begin_inset Flex Code
19869 status collapsed
19870
19871 \begin_layout Plain Layout
19872 %!quotetitle%
19873 \end_layout
19874
19875 \end_inset
19876
19877  exactly as it would treat its definition.
19878  So, let us issue the obvious 
19879 \emph on
19880 warning
19881 \emph default
19882 .
19883  Do not do this:
19884 \end_layout
19885
19886 \begin_layout LyX-Code
19887 !funfun %funfun%
19888 \end_layout
19889
19890 \begin_layout Standard
19891 or anything like it.
19892  LyX shouldn't go into an infinite loop, but it may go into a long one before
19893  it gives up.
19894 \end_layout
19895
19896 \begin_layout Standard
19897 The second sort of special definition might look like this:
19898 \end_layout
19899
19900 \begin_layout LyX-Code
19901 _pptext pp.
19902 \end_layout
19903
19904 \begin_layout Standard
19905 This defines a translatable piece of text, which allows relevant parts of
19906  the bibliography to be translated.
19907  It can be included in a definition by treating it as a key: 
19908 \begin_inset Flex Code
19909 status collapsed
19910
19911 \begin_layout Plain Layout
19912 %_pptext%
19913 \end_layout
19914
19915 \end_inset
19916
19917 .
19918  Several of these are predefined in 
19919 \begin_inset Flex Code
19920 status collapsed
19921
19922 \begin_layout Plain Layout
19923 stdciteformats.inc
19924 \end_layout
19925
19926 \end_inset
19927
19928 .
19929  Note that these are not macros, in the sense just defined.
19930  They will not be expanded.
19931 \end_layout
19932
19933 \begin_layout Standard
19934 So here then is an example that use all these features:
19935 \begin_inset VSpace defskip
19936 \end_inset
19937
19938
19939 \end_layout
19940
19941 \begin_layout Standard
19942 \noindent
19943
19944 \family typewriter
19945 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
19946 \end_layout
19947
19948 \begin_layout Standard
19949 \begin_inset VSpace defskip
19950 \end_inset
19951
19952 This defines a macro that prints the author, followed by a comma, if the
19953  
19954 \begin_inset Flex Code
19955 status collapsed
19956
19957 \begin_layout Plain Layout
19958 author
19959 \end_layout
19960
19961 \end_inset
19962
19963  key is defined, or else prints the name of the editor, followed by the
19964  
19965 \begin_inset Flex Code
19966 status collapsed
19967
19968 \begin_layout Plain Layout
19969 _edtext
19970 \end_layout
19971
19972 \end_inset
19973
19974  or its translation (it is by default 
19975 \begin_inset Quotes eld
19976 \end_inset
19977
19978 ed.
19979 \begin_inset Quotes erd
19980 \end_inset
19981
19982 ), if the 
19983 \begin_inset Flex Code
19984 status collapsed
19985
19986 \begin_layout Plain Layout
19987 editor
19988 \end_layout
19989
19990 \end_inset
19991
19992  key is defined.
19993  Note that this is in fact defined in 
19994 \begin_inset Flex Code
19995 status collapsed
19996
19997 \begin_layout Plain Layout
19998 stdciteformats.inc
19999 \end_layout
20000
20001 \end_inset
20002
20003 , so you can use it in your own definitions, or re-definitions, if you load
20004  that file first.
20005 \end_layout
20006
20007 \begin_layout Section
20008 \begin_inset CommandInset label
20009 LatexCommand label
20010 name "sec:Tags-for-XHTML"
20011
20012 \end_inset
20013
20014 Tags for XHTML output
20015 \end_layout
20016
20017 \begin_layout Standard
20018 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
20019  by layout information.
20020  In general, LyX provides sensible defaults and, as mentioned earlier, it
20021  will even construct default CSS style rules from the other layout tags.
20022  For example, LyX will attempt to use the information provided in the 
20023 \begin_inset Flex Code
20024 status collapsed
20025
20026 \begin_layout Plain Layout
20027 Font
20028 \end_layout
20029
20030 \end_inset
20031
20032  declaration for the Chapter style to write CSS that will appropriately
20033  format chapter headings.
20034 \end_layout
20035
20036 \begin_layout Standard
20037 In many cases, then, you may not have to do anything at all to get acceptable
20038  XHTML output for your own environments, custom insets, and so forth.
20039  But in some cases you will, and so LyX provides a number of layout tags
20040  that can be used to customize the XHTML and CSS that are generated.
20041 \end_layout
20042
20043 \begin_layout Standard
20044 Note that there are two tags, 
20045 \begin_inset Flex Code
20046 status collapsed
20047
20048 \begin_layout Plain Layout
20049 HTMLPreamble
20050 \end_layout
20051
20052 \end_inset
20053
20054  and 
20055 \begin_inset Flex Code
20056 status collapsed
20057
20058 \begin_layout Plain Layout
20059 AddToHTMLPreamble
20060 \end_layout
20061
20062 \end_inset
20063
20064  that may appear outside style and inset declarations.
20065  See 
20066 \begin_inset CommandInset ref
20067 LatexCommand ref
20068 reference "sub:General-text-class"
20069
20070 \end_inset
20071
20072  for details on these.
20073 \end_layout
20074
20075 \begin_layout Subsection
20076 \begin_inset CommandInset label
20077 LatexCommand label
20078 name "sub:Paragraph-Style-XHTML"
20079
20080 \end_inset
20081
20082 Paragraph styles
20083 \end_layout
20084
20085 \begin_layout Standard
20086 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
20087  dealing with a normal paragraph, a command, or an environment, where this
20088  is itself determined by the contents of the corresponding 
20089 \begin_inset Flex Code
20090 status collapsed
20091
20092 \begin_layout Plain Layout
20093 LaTeXType
20094 \end_layout
20095
20096 \end_inset
20097
20098  tag.
20099  
20100 \end_layout
20101
20102 \begin_layout Standard
20103 For a command or normal paragraph, the output XHTML has the following form:
20104 \end_layout
20105
20106 \begin_layout LyX-Code
20107 <tag attr=
20108 \begin_inset Quotes erd
20109 \end_inset
20110
20111 value
20112 \begin_inset Quotes erd
20113 \end_inset
20114
20115 >
20116 \end_layout
20117
20118 \begin_layout LyX-Code
20119 <labeltag attr=
20120 \begin_inset Quotes erd
20121 \end_inset
20122
20123 value
20124 \begin_inset Quotes erd
20125 \end_inset
20126
20127 >Label</labeltag>
20128 \end_layout
20129
20130 \begin_layout LyX-Code
20131 Contents of the paragraph.
20132 \end_layout
20133
20134 \begin_layout LyX-Code
20135 </tag>
20136 \end_layout
20137
20138 \begin_layout Standard
20139 The label tags are of course omitted if the paragraph does not have a label.
20140 \end_layout
20141
20142 \begin_layout Standard
20143 For an environment that is not some sort of list, the XHTML takes this form:
20144 \end_layout
20145
20146 \begin_layout LyX-Code
20147 <tag attr=
20148 \begin_inset Quotes erd
20149 \end_inset
20150
20151 value
20152 \begin_inset Quotes erd
20153 \end_inset
20154
20155 >
20156 \end_layout
20157
20158 \begin_layout LyX-Code
20159 <itemtag attr=
20160 \begin_inset Quotes erd
20161 \end_inset
20162
20163 value
20164 \begin_inset Quotes erd
20165 \end_inset
20166
20167 ><labeltag attr=
20168 \begin_inset Quotes erd
20169 \end_inset
20170
20171 value
20172 \begin_inset Quotes erd
20173 \end_inset
20174
20175 >Environment Label</labeltag>First paragraph.</itemtag>
20176 \end_layout
20177
20178 \begin_layout LyX-Code
20179 <itemtag>Second paragraph.</itemtag>
20180 \end_layout
20181
20182 \begin_layout LyX-Code
20183 </tag>
20184 \end_layout
20185
20186 \begin_layout Standard
20187 Note that the label is output only for the first paragraph, as it should
20188  be for a theorem, for example.
20189  
20190 \end_layout
20191
20192 \begin_layout Standard
20193 For a list, we have one of these forms:
20194 \end_layout
20195
20196 \begin_layout LyX-Code
20197 <tag attr=
20198 \begin_inset Quotes erd
20199 \end_inset
20200
20201 value
20202 \begin_inset Quotes erd
20203 \end_inset
20204
20205 >
20206 \end_layout
20207
20208 \begin_layout LyX-Code
20209 <itemtag attr=
20210 \begin_inset Quotes erd
20211 \end_inset
20212
20213 value
20214 \begin_inset Quotes erd
20215 \end_inset
20216
20217 ><labeltag attr=
20218 \begin_inset Quotes erd
20219 \end_inset
20220
20221 value
20222 \begin_inset Quotes erd
20223 \end_inset
20224
20225 >List Label</labeltag>First item.</itemtag>
20226 \end_layout
20227
20228 \begin_layout LyX-Code
20229 <itemtag attr=
20230 \begin_inset Quotes erd
20231 \end_inset
20232
20233 value
20234 \begin_inset Quotes erd
20235 \end_inset
20236
20237 ><labeltag attr=
20238 \begin_inset Quotes erd
20239 \end_inset
20240
20241 value
20242 \begin_inset Quotes erd
20243 \end_inset
20244
20245 >List Label</labeltag>Second item.</itemtag>
20246 \end_layout
20247
20248 \begin_layout LyX-Code
20249 </tag>
20250 \end_layout
20251
20252 \begin_layout LyX-Code
20253
20254 \end_layout
20255
20256 \begin_layout LyX-Code
20257 <tag attr=
20258 \begin_inset Quotes erd
20259 \end_inset
20260
20261 value
20262 \begin_inset Quotes erd
20263 \end_inset
20264
20265 >
20266 \end_layout
20267
20268 \begin_layout LyX-Code
20269 <labeltag attr=
20270 \begin_inset Quotes erd
20271 \end_inset
20272
20273 value
20274 \begin_inset Quotes erd
20275 \end_inset
20276
20277 >List Label</labeltag><itemtag attr=
20278 \begin_inset Quotes erd
20279 \end_inset
20280
20281 value
20282 \begin_inset Quotes erd
20283 \end_inset
20284
20285 >First item.</itemtag>
20286 \end_layout
20287
20288 \begin_layout LyX-Code
20289 <labeltag attr=
20290 \begin_inset Quotes erd
20291 \end_inset
20292
20293 value
20294 \begin_inset Quotes erd
20295 \end_inset
20296
20297 >List Label</labeltag><itemtag attr=
20298 \begin_inset Quotes erd
20299 \end_inset
20300
20301 value
20302 \begin_inset Quotes erd
20303 \end_inset
20304
20305 >Second item.</itemtag>
20306 \end_layout
20307
20308 \begin_layout LyX-Code
20309 </tag>
20310 \end_layout
20311
20312 \begin_layout Standard
20313 Note the different orders of 
20314 \begin_inset Flex Code
20315 status collapsed
20316
20317 \begin_layout Plain Layout
20318 labeltag
20319 \end_layout
20320
20321 \end_inset
20322
20323  and 
20324 \begin_inset Flex Code
20325 status collapsed
20326
20327 \begin_layout Plain Layout
20328 itemtag
20329 \end_layout
20330
20331 \end_inset
20332
20333 .
20334  Which order we get depends upon the setting of 
20335 \begin_inset Flex Code
20336 status collapsed
20337
20338 \begin_layout Plain Layout
20339 HTMLLabelFirst
20340 \end_layout
20341
20342 \end_inset
20343
20344 : If 
20345 \begin_inset Flex Code
20346 status collapsed
20347
20348 \begin_layout Plain Layout
20349 HTMLLabelFirst
20350 \end_layout
20351
20352 \end_inset
20353
20354  is false (the default), you get the first of these, with the label within
20355  the item; if true, you get the second, with the label outside the item.
20356 \end_layout
20357
20358 \begin_layout Standard
20359 The specific tags and attributes output for each paragraph type can be controlle
20360 d by means of the layout tags we are about to describe.
20361  As mentioned earlier, however, LyX uses sensible defaults for many of these,
20362  so you often may not need to do very much to get good XHTML output.
20363  Think of the available tags as there so you can tweak things to your liking.
20364 \end_layout
20365
20366 \begin_layout Description
20367 \begin_inset Flex Code
20368 status collapsed
20369
20370 \begin_layout Plain Layout
20371 HTMLAttr
20372 \end_layout
20373
20374 \end_inset
20375
20376  [
20377 \begin_inset Flex Code
20378 status collapsed
20379
20380 \begin_layout Plain Layout
20381 string
20382 \end_layout
20383
20384 \end_inset
20385
20386 ] Specifies attribute information to be output with the main tag.
20387  For example, 
20388 \begin_inset Quotes eld
20389 \end_inset
20390
20391
20392 \begin_inset Flex Code
20393 status collapsed
20394
20395 \begin_layout Plain Layout
20396 class=`mydiv'
20397 \end_layout
20398
20399 \end_inset
20400
20401
20402 \begin_inset Quotes erd
20403 \end_inset
20404
20405 .
20406  By default, LyX will output 
20407 \begin_inset Quotes eld
20408 \end_inset
20409
20410
20411 \begin_inset Flex Code
20412 status collapsed
20413
20414 \begin_layout Plain Layout
20415 class=`layoutname'
20416 \end_layout
20417
20418 \end_inset
20419
20420
20421 \begin_inset Quotes erd
20422 \end_inset
20423
20424 , where 
20425 \begin_inset Flex Code
20426 status collapsed
20427
20428 \begin_layout Plain Layout
20429 layoutname
20430 \end_layout
20431
20432 \end_inset
20433
20434  is the LyX name of the layout, made lowercase, for example: chapter.
20435  This should 
20436 \emph on
20437 not
20438 \emph default
20439  contain any style information.
20440  Use 
20441 \begin_inset Flex Code
20442 status collapsed
20443
20444 \begin_layout Plain Layout
20445 HTMLStyle
20446 \end_layout
20447
20448 \end_inset
20449
20450  for that purpose.
20451 \end_layout
20452
20453 \begin_layout Description
20454 \begin_inset Flex Code
20455 status collapsed
20456
20457 \begin_layout Plain Layout
20458 HTMLForceCSS
20459 \end_layout
20460
20461 \end_inset
20462
20463  [
20464 \begin_inset Flex Code
20465 status collapsed
20466
20467 \begin_layout Plain Layout
20468
20469 \emph on
20470 0
20471 \emph default
20472 ,1
20473 \end_layout
20474
20475 \end_inset
20476
20477 ] Whether to output the default CSS information LyX generates for this layout,
20478  even if additional information is explicitly provided via 
20479 \begin_inset Flex Code
20480 status collapsed
20481
20482 \begin_layout Plain Layout
20483 HTMLStyle
20484 \end_layout
20485
20486 \end_inset
20487
20488 .
20489  Setting this to 
20490 \begin_inset Flex Code
20491 status collapsed
20492
20493 \begin_layout Plain Layout
20494 1
20495 \end_layout
20496
20497 \end_inset
20498
20499  allows you to alter or augment the generated CSS, rather than to override
20500  it completely.
20501  Default is 
20502 \begin_inset Flex Code
20503 status collapsed
20504
20505 \begin_layout Plain Layout
20506 0
20507 \end_layout
20508
20509 \end_inset
20510
20511 .
20512 \end_layout
20513
20514 \begin_layout Description
20515 \begin_inset Flex Code
20516 status collapsed
20517
20518 \begin_layout Plain Layout
20519 HTMLItem
20520 \end_layout
20521
20522 \end_inset
20523
20524  [
20525 \begin_inset Flex Code
20526 status collapsed
20527
20528 \begin_layout Plain Layout
20529 string
20530 \end_layout
20531
20532 \end_inset
20533
20534 ] The tag to be used for individual paragraphs of environments, replacing
20535  
20536 \begin_inset Flex Code
20537 status collapsed
20538
20539 \begin_layout Plain Layout
20540 itemtag
20541 \end_layout
20542
20543 \end_inset
20544
20545  in the examples above.
20546  Defaults to 
20547 \begin_inset Flex Code
20548 status collapsed
20549
20550 \begin_layout Plain Layout
20551 div
20552 \end_layout
20553
20554 \end_inset
20555
20556 .
20557 \end_layout
20558
20559 \begin_layout Description
20560 \begin_inset Flex Code
20561 status collapsed
20562
20563 \begin_layout Plain Layout
20564 HTMLItemAttr
20565 \end_layout
20566
20567 \end_inset
20568
20569  [
20570 \begin_inset Flex Code
20571 status collapsed
20572
20573 \begin_layout Plain Layout
20574 string
20575 \end_layout
20576
20577 \end_inset
20578
20579 ] Attributes for the item tag.
20580  Defaults to 
20581 \begin_inset Quotes eld
20582 \end_inset
20583
20584
20585 \begin_inset Flex Code
20586 status collapsed
20587
20588 \begin_layout Plain Layout
20589 class=`layoutname_item'
20590 \end_layout
20591
20592 \end_inset
20593
20594
20595 \begin_inset Quotes erd
20596 \end_inset
20597
20598 .
20599  This should 
20600 \emph on
20601 not
20602 \emph default
20603  contain any style information.
20604  Use 
20605 \begin_inset Flex Code
20606 status collapsed
20607
20608 \begin_layout Plain Layout
20609 HTMLStyle
20610 \end_layout
20611
20612 \end_inset
20613
20614  for that purpose.
20615 \end_layout
20616
20617 \begin_layout Description
20618 \begin_inset Flex Code
20619 status collapsed
20620
20621 \begin_layout Plain Layout
20622 HTMLLabel
20623 \end_layout
20624
20625 \end_inset
20626
20627  [
20628 \begin_inset Flex Code
20629 status collapsed
20630
20631 \begin_layout Plain Layout
20632 string
20633 \end_layout
20634
20635 \end_inset
20636
20637 ] The tag to be used for paragraph and item labels, replacing 
20638 \begin_inset Flex Code
20639 status collapsed
20640
20641 \begin_layout Plain Layout
20642 labeltag
20643 \end_layout
20644
20645 \end_inset
20646
20647  in the examples above.
20648  Defaults to 
20649 \begin_inset Flex Code
20650 status collapsed
20651
20652 \begin_layout Plain Layout
20653 span
20654 \end_layout
20655
20656 \end_inset
20657
20658 , unless 
20659 \begin_inset Flex Code
20660 status collapsed
20661
20662 \begin_layout Plain Layout
20663 LabelType
20664 \end_layout
20665
20666 \end_inset
20667
20668  is either 
20669 \begin_inset Flex Code
20670 status collapsed
20671
20672 \begin_layout Plain Layout
20673 Top_Environment
20674 \end_layout
20675
20676 \end_inset
20677
20678  or 
20679 \begin_inset Flex Code
20680 status collapsed
20681
20682 \begin_layout Plain Layout
20683 Centered_Top_Environment
20684 \end_layout
20685
20686 \end_inset
20687
20688 , in which case it defaults to 
20689 \begin_inset Flex Code
20690 status collapsed
20691
20692 \begin_layout Plain Layout
20693 div
20694 \end_layout
20695
20696 \end_inset
20697
20698 .
20699 \end_layout
20700
20701 \begin_layout Description
20702 \begin_inset Flex Code
20703 status collapsed
20704
20705 \begin_layout Plain Layout
20706 HTMLLabelAttr
20707 \end_layout
20708
20709 \end_inset
20710
20711  [
20712 \begin_inset Flex Code
20713 status collapsed
20714
20715 \begin_layout Plain Layout
20716 string
20717 \end_layout
20718
20719 \end_inset
20720
20721 ] Attributes for the label tag.
20722  Defaults to 
20723 \begin_inset Quotes eld
20724 \end_inset
20725
20726
20727 \begin_inset Flex Code
20728 status collapsed
20729
20730 \begin_layout Plain Layout
20731 class=`layoutname_label'
20732 \end_layout
20733
20734 \end_inset
20735
20736
20737 \begin_inset Quotes erd
20738 \end_inset
20739
20740 .
20741  This should 
20742 \emph on
20743 not
20744 \emph default
20745  contain any style information.
20746  Use 
20747 \begin_inset Flex Code
20748 status collapsed
20749
20750 \begin_layout Plain Layout
20751 HTMLStyle
20752 \end_layout
20753
20754 \end_inset
20755
20756  for that purpose.
20757 \end_layout
20758
20759 \begin_layout Description
20760 \begin_inset Flex Code
20761 status collapsed
20762
20763 \begin_layout Plain Layout
20764 HTMLLabelFirst
20765 \end_layout
20766
20767 \end_inset
20768
20769  [
20770 \begin_inset Flex Code
20771 status collapsed
20772
20773 \begin_layout Plain Layout
20774
20775 \emph on
20776 0
20777 \emph default
20778 ,1
20779 \end_layout
20780
20781 \end_inset
20782
20783 ] Meaningful only for list-like environments, this tag controls whether
20784  the label tag is output before or inside the item tag.
20785  This is used, for example, in the description environment, where we want
20786  `
20787 \begin_inset Flex Code
20788 status collapsed
20789
20790 \begin_layout Plain Layout
20791 <dt>\SpecialChar \ldots{}
20792 </dt><dd>\SpecialChar \ldots{}
20793 </dd>
20794 \end_layout
20795
20796 \end_inset
20797
20798 .
20799  Default is 
20800 \begin_inset Flex Code
20801 status collapsed
20802
20803 \begin_layout Plain Layout
20804 0
20805 \end_layout
20806
20807 \end_inset
20808
20809 : The label tag is output inside the item tag.
20810 \end_layout
20811
20812 \begin_layout Description
20813 \begin_inset Flex Code
20814 status collapsed
20815
20816 \begin_layout Plain Layout
20817 HTMLPreamble
20818 \end_layout
20819
20820 \end_inset
20821
20822  Information to be output in the 
20823 \begin_inset Flex Code
20824 status collapsed
20825
20826 \begin_layout Plain Layout
20827 <head>
20828 \end_layout
20829
20830 \end_inset
20831
20832  section when this style is used.
20833  This might, for example, be used to include a 
20834 \begin_inset Flex Code
20835 status collapsed
20836
20837 \begin_layout Plain Layout
20838 <script>
20839 \end_layout
20840
20841 \end_inset
20842
20843  block defining an 
20844 \begin_inset Flex Code
20845 status collapsed
20846
20847 \begin_layout Plain Layout
20848 onclick
20849 \end_layout
20850
20851 \end_inset
20852
20853  handler.
20854 \end_layout
20855
20856 \begin_layout Description
20857 \begin_inset Flex Code
20858 status collapsed
20859
20860 \begin_layout Plain Layout
20861 HTMLStyle
20862 \end_layout
20863
20864 \end_inset
20865
20866  CSS style information to be included when this style is used.
20867  Note that this will automatically be wrapped in a layout-generated 
20868 \begin_inset Flex Code
20869 status collapsed
20870
20871 \begin_layout Plain Layout
20872 <style>
20873 \end_layout
20874
20875 \end_inset
20876
20877  block, so only the CSS itself need be included.
20878 \end_layout
20879
20880 \begin_layout Description
20881 \begin_inset Flex Code
20882 status collapsed
20883
20884 \begin_layout Plain Layout
20885 HTMLTag
20886 \end_layout
20887
20888 \end_inset
20889
20890  [
20891 \begin_inset Flex Code
20892 status collapsed
20893
20894 \begin_layout Plain Layout
20895 string
20896 \end_layout
20897
20898 \end_inset
20899
20900 ] The tag to be used for the main label, replacing 
20901 \begin_inset Flex Code
20902 status collapsed
20903
20904 \begin_layout Plain Layout
20905 tag
20906 \end_layout
20907
20908 \end_inset
20909
20910  in the examples above.
20911  Defaults to 
20912 \begin_inset Flex Code
20913 status collapsed
20914
20915 \begin_layout Plain Layout
20916 div
20917 \end_layout
20918
20919 \end_inset
20920
20921 .
20922 \end_layout
20923
20924 \begin_layout Description
20925 \begin_inset Flex Code
20926 status collapsed
20927
20928 \begin_layout Plain Layout
20929 HTMLTitle
20930 \end_layout
20931
20932 \end_inset
20933
20934  [
20935 \begin_inset Flex Code
20936 status collapsed
20937
20938 \begin_layout Plain Layout
20939
20940 \emph on
20941 0
20942 \emph default
20943 ,1
20944 \end_layout
20945
20946 \end_inset
20947
20948 ] Marks this style as the one to be used to generate the 
20949 \begin_inset Flex Code
20950 status collapsed
20951
20952 \begin_layout Plain Layout
20953 <title>
20954 \end_layout
20955
20956 \end_inset
20957
20958  tag for the XHTML file.
20959  By default, it is false.
20960  The 
20961 \begin_inset Flex Code
20962 status collapsed
20963
20964 \begin_layout Plain Layout
20965 stdtitle.inc
20966 \end_layout
20967
20968 \end_inset
20969
20970  file sets it to true for the 
20971 \begin_inset Flex Code
20972 status collapsed
20973
20974 \begin_layout Plain Layout
20975 title
20976 \end_layout
20977
20978 \end_inset
20979
20980  environment.
20981  
20982 \end_layout
20983
20984 \begin_layout Subsection
20985 InsetLayout XHTML
20986 \end_layout
20987
20988 \begin_layout Standard
20989 The XHTML output of insets can also be controlled by information in layout
20990  files.
20991 \begin_inset Foot
20992 status collapsed
20993
20994 \begin_layout Plain Layout
20995 At present, this is true only for 
20996 \begin_inset Quotes eld
20997 \end_inset
20998
20999 text
21000 \begin_inset Quotes erd
21001 \end_inset
21002
21003  insets (insets you can type into) and is not true for 
21004 \begin_inset Quotes eld
21005 \end_inset
21006
21007 command
21008 \begin_inset Quotes erd
21009 \end_inset
21010
21011  insets (insets that are associated with dialog boxes).
21012 \end_layout
21013
21014 \end_inset
21015
21016  Here, too, LyX tries to provide sensible defaults, and it constructs default
21017  CSS style rules.
21018  But everything can be customized.
21019 \end_layout
21020
21021 \begin_layout Standard
21022 The XHTML LyX outputs for an inset has the following form:
21023 \end_layout
21024
21025 \begin_layout LyX-Code
21026 <tag attr=
21027 \begin_inset Quotes erd
21028 \end_inset
21029
21030 value
21031 \begin_inset Quotes erd
21032 \end_inset
21033
21034 >
21035 \end_layout
21036
21037 \begin_layout LyX-Code
21038 <labeltag>Label</labeltag>
21039 \end_layout
21040
21041 \begin_layout LyX-Code
21042 <innertag attr=
21043 \begin_inset Quotes erd
21044 \end_inset
21045
21046 value
21047 \begin_inset Quotes erd
21048 \end_inset
21049
21050 >Contents of the inset.</innertag>
21051 \end_layout
21052
21053 \begin_layout LyX-Code
21054 </tag>
21055 \end_layout
21056
21057 \begin_layout Standard
21058 If the inset permits multiple paragraphs---that is, if 
21059 \begin_inset Flex Code
21060 status collapsed
21061
21062 \begin_layout Plain Layout
21063 MultiPar
21064 \end_layout
21065
21066 \end_inset
21067
21068  is true---then the contents of the inset will itself be output as paragraphs
21069  formatted according to the styles used for those paragraphs (standard,
21070  quote, and the like).
21071  The label tag is of course omitted if the paragraph does not have a label
21072  and, at present, is always 
21073 \begin_inset Flex Code
21074 status collapsed
21075
21076 \begin_layout Plain Layout
21077 span
21078 \end_layout
21079
21080 \end_inset
21081
21082 .
21083  The inner tag is optional and, by default, does not appear.
21084 \end_layout
21085
21086 \begin_layout Standard
21087 The specific tags and attributes output for each inset can be controlled
21088  by means of the following layout tags.
21089 \end_layout
21090
21091 \begin_layout Description
21092 \begin_inset Flex Code
21093 status collapsed
21094
21095 \begin_layout Plain Layout
21096 HTMLAttr
21097 \end_layout
21098
21099 \end_inset
21100
21101  [
21102 \begin_inset Flex Code
21103 status collapsed
21104
21105 \begin_layout Plain Layout
21106 string
21107 \end_layout
21108
21109 \end_inset
21110
21111 ] Specifies attribute information to be output with the main tag.
21112  For example, 
21113 \begin_inset Quotes eld
21114 \end_inset
21115
21116
21117 \begin_inset Flex Code
21118 status collapsed
21119
21120 \begin_layout Plain Layout
21121 class=`myinset' onclick=`\SpecialChar \ldots{}
21122 '
21123 \end_layout
21124
21125 \end_inset
21126
21127
21128 \begin_inset Quotes erd
21129 \end_inset
21130
21131 .
21132  By default, LyX will output 
21133 \begin_inset Quotes eld
21134 \end_inset
21135
21136
21137 \begin_inset Flex Code
21138 status collapsed
21139
21140 \begin_layout Plain Layout
21141 class=`insetname'
21142 \end_layout
21143
21144 \end_inset
21145
21146
21147 \begin_inset Quotes erd
21148 \end_inset
21149
21150 , where 
21151 \begin_inset Flex Code
21152 status collapsed
21153
21154 \begin_layout Plain Layout
21155 insetname
21156 \end_layout
21157
21158 \end_inset
21159
21160  is the LyX name of the inset, made lowercase and with non-alphanumeric
21161  characters converted to underscores, for example: footnote.
21162 \end_layout
21163
21164 \begin_layout Description
21165 \begin_inset Flex Code
21166 status collapsed
21167
21168 \begin_layout Plain Layout
21169 HTMLForceCSS
21170 \end_layout
21171
21172 \end_inset
21173
21174  [
21175 \begin_inset Flex Code
21176 status collapsed
21177
21178 \begin_layout Plain Layout
21179
21180 \emph on
21181 0
21182 \emph default
21183 ,1
21184 \end_layout
21185
21186 \end_inset
21187
21188 ] Whether to output the default CSS information LyX generates for this layout,
21189  even if additional information is explicitly provided via 
21190 \begin_inset Flex Code
21191 status collapsed
21192
21193 \begin_layout Plain Layout
21194 HTMLStyle
21195 \end_layout
21196
21197 \end_inset
21198
21199 .
21200  Setting this to 
21201 \begin_inset Flex Code
21202 status collapsed
21203
21204 \begin_layout Plain Layout
21205 1
21206 \end_layout
21207
21208 \end_inset
21209
21210  allows you to alter or augment the generated CSS, rather than to override
21211  it completely.
21212  Default is 0.
21213 \end_layout
21214
21215 \begin_layout Description
21216 \begin_inset Flex Code
21217 status collapsed
21218
21219 \begin_layout Plain Layout
21220 HTMLInnerAttr
21221 \end_layout
21222
21223 \end_inset
21224
21225  [
21226 \begin_inset Flex Code
21227 status collapsed
21228
21229 \begin_layout Plain Layout
21230 string
21231 \end_layout
21232
21233 \end_inset
21234
21235 ] Attributes for the inner tag.
21236  Defaults to 
21237 \begin_inset Quotes eld
21238 \end_inset
21239
21240
21241 \begin_inset Flex Code
21242 status collapsed
21243
21244 \begin_layout Plain Layout
21245 class=`insetname_inner'
21246 \end_layout
21247
21248 \end_inset
21249
21250
21251 \begin_inset Quotes erd
21252 \end_inset
21253
21254 .
21255 \end_layout
21256
21257 \begin_layout Description
21258 \begin_inset Flex Code
21259 status collapsed
21260
21261 \begin_layout Plain Layout
21262 HTMLInnerTag
21263 \end_layout
21264
21265 \end_inset
21266
21267  [
21268 \begin_inset Flex Code
21269 status collapsed
21270
21271 \begin_layout Plain Layout
21272 string
21273 \end_layout
21274
21275 \end_inset
21276
21277 ] The inner tag, replacing 
21278 \begin_inset Flex Code
21279 status collapsed
21280
21281 \begin_layout Plain Layout
21282 innertag
21283 \end_layout
21284
21285 \end_inset
21286
21287  in the examples above.
21288  By default, there is none.
21289 \end_layout
21290
21291 \begin_layout Description
21292 \begin_inset Flex Code
21293 status collapsed
21294
21295 \begin_layout Plain Layout
21296 HTMLIsBlock
21297 \end_layout
21298
21299 \end_inset
21300
21301  [
21302 \begin_inset Flex Code
21303 status collapsed
21304
21305 \begin_layout Plain Layout
21306 0,
21307 \emph on
21308 1
21309 \end_layout
21310
21311 \end_inset
21312
21313 ] Whether this inset represents a standalone block of text (such as a footnote)
21314  or instead represents material that is included in the surrounding text
21315  (such as a branch).
21316  Defaults to 1.
21317 \end_layout
21318
21319 \begin_layout Description
21320 \begin_inset Flex Code
21321 status collapsed
21322
21323 \begin_layout Plain Layout
21324 HTMLLabel
21325 \end_layout
21326
21327 \end_inset
21328
21329  [
21330 \begin_inset Flex Code
21331 status collapsed
21332
21333 \begin_layout Plain Layout
21334 string
21335 \end_layout
21336
21337 \end_inset
21338
21339 ] A label for this inset, possibly including a reference to a counter.
21340  For example, for footnote, it might be: 
21341 \begin_inset Flex Code
21342 status collapsed
21343
21344 \begin_layout Plain Layout
21345
21346 \backslash
21347 arabic{footnote}
21348 \end_layout
21349
21350 \end_inset
21351
21352 .
21353  This is optional, and there is no default.
21354 \end_layout
21355
21356 \begin_layout Description
21357 \begin_inset Flex Code
21358 status collapsed
21359
21360 \begin_layout Plain Layout
21361 HTMLPreamble
21362 \end_layout
21363
21364 \end_inset
21365
21366  Information to be output in the 
21367 \begin_inset Flex Code
21368 status collapsed
21369
21370 \begin_layout Plain Layout
21371 <head>
21372 \end_layout
21373
21374 \end_inset
21375
21376  section when this style is used.
21377  This might, for example, be used to include a 
21378 \begin_inset Flex Code
21379 status collapsed
21380
21381 \begin_layout Plain Layout
21382 <script>
21383 \end_layout
21384
21385 \end_inset
21386
21387  block defining an 
21388 \begin_inset Flex Code
21389 status collapsed
21390
21391 \begin_layout Plain Layout
21392 onclick
21393 \end_layout
21394
21395 \end_inset
21396
21397  handler.
21398 \end_layout
21399
21400 \begin_layout Description
21401 \begin_inset Flex Code
21402 status collapsed
21403
21404 \begin_layout Plain Layout
21405 HTMLStyle
21406 \end_layout
21407
21408 \end_inset
21409
21410  CSS style information to be included when this style is used.
21411  Note that this will automatically be wrapped in a layout-generated 
21412 \begin_inset Flex Code
21413 status collapsed
21414
21415 \begin_layout Plain Layout
21416 <style>
21417 \end_layout
21418
21419 \end_inset
21420
21421  block, so only the CSS itself need be included.
21422 \end_layout
21423
21424 \begin_layout Description
21425 \begin_inset Flex Code
21426 status collapsed
21427
21428 \begin_layout Plain Layout
21429 HTMLTag
21430 \end_layout
21431
21432 \end_inset
21433
21434  [
21435 \begin_inset Flex Code
21436 status collapsed
21437
21438 \begin_layout Plain Layout
21439 string
21440 \end_layout
21441
21442 \end_inset
21443
21444 ] The tag to be used for the main label, replacing 
21445 \begin_inset Flex Code
21446 status collapsed
21447
21448 \begin_layout Plain Layout
21449 tag
21450 \end_layout
21451
21452 \end_inset
21453
21454  in the examples above.
21455  The default depends upon the setting of 
21456 \begin_inset Flex Code
21457 status collapsed
21458
21459 \begin_layout Plain Layout
21460 MultiPar
21461 \end_layout
21462
21463 \end_inset
21464
21465 : If 
21466 \begin_inset Flex Code
21467 status collapsed
21468
21469 \begin_layout Plain Layout
21470 MultiPar
21471 \end_layout
21472
21473 \end_inset
21474
21475  is true, the default is 
21476 \begin_inset Flex Code
21477 status collapsed
21478
21479 \begin_layout Plain Layout
21480 div
21481 \end_layout
21482
21483 \end_inset
21484
21485 ; if it is false, the default is 
21486 \begin_inset Flex Code
21487 status collapsed
21488
21489 \begin_layout Plain Layout
21490 span
21491 \end_layout
21492
21493 \end_inset
21494
21495 .
21496 \end_layout
21497
21498 \begin_layout Subsection
21499 Float XHTML
21500 \end_layout
21501
21502 \begin_layout Standard
21503 The XHTML output for floats too can be controlled by layout information.
21504  The output has the following form:
21505 \end_layout
21506
21507 \begin_layout LyX-Code
21508 <tag attr=
21509 \begin_inset Quotes erd
21510 \end_inset
21511
21512 value
21513 \begin_inset Quotes erd
21514 \end_inset
21515
21516 >
21517 \end_layout
21518
21519 \begin_layout LyX-Code
21520 Contents of the float.
21521 \end_layout
21522
21523 \begin_layout LyX-Code
21524 </tag>
21525 \end_layout
21526
21527 \begin_layout Standard
21528 The caption, if there is one, is a separate inset and will be output as
21529  such.
21530  Its appearance can be controlled via the InsetLayout for caption insets.
21531  
21532 \end_layout
21533
21534 \begin_layout Description
21535 \begin_inset Flex Code
21536 status collapsed
21537
21538 \begin_layout Plain Layout
21539 HTMLAttr
21540 \end_layout
21541
21542 \end_inset
21543
21544  [
21545 \begin_inset Flex Code
21546 status collapsed
21547
21548 \begin_layout Plain Layout
21549 string
21550 \end_layout
21551
21552 \end_inset
21553
21554 ] Specifies attribute information to be output with the main tag.
21555  For example, 
21556 \begin_inset Quotes eld
21557 \end_inset
21558
21559
21560 \begin_inset Flex Code
21561 status collapsed
21562
21563 \begin_layout Plain Layout
21564 class=`myfloat' onclick=`\SpecialChar \ldots{}
21565 '
21566 \end_layout
21567
21568 \end_inset
21569
21570
21571 \begin_inset Quotes erd
21572 \end_inset
21573
21574 .
21575  By default, LyX will output 
21576 \begin_inset Quotes eld
21577 \end_inset
21578
21579
21580 \begin_inset Flex Code
21581 status collapsed
21582
21583 \begin_layout Plain Layout
21584 class=`float float-floattype'
21585 \end_layout
21586
21587 \end_inset
21588
21589
21590 \begin_inset Quotes erd
21591 \end_inset
21592
21593 , where 
21594 \begin_inset Flex Code
21595 status collapsed
21596
21597 \begin_layout Plain Layout
21598 floattype
21599 \end_layout
21600
21601 \end_inset
21602
21603  is LyX's name for this type of float, as determined by the float declaration
21604  (see 
21605 \begin_inset CommandInset ref
21606 LatexCommand ref
21607 reference "sub:Floats"
21608
21609 \end_inset
21610
21611 ), though made lowercase and with non-alphanumeric characters converted
21612  to underscores, for example: float-table.
21613 \end_layout
21614
21615 \begin_layout Description
21616 \begin_inset Flex Code
21617 status collapsed
21618
21619 \begin_layout Plain Layout
21620 HTMLStyle
21621 \end_layout
21622
21623 \end_inset
21624
21625  CSS style information to be included when this float is used.
21626  Note that this will automatically be wrapped in a layout-generated 
21627 \begin_inset Flex Code
21628 status collapsed
21629
21630 \begin_layout Plain Layout
21631 <style>
21632 \end_layout
21633
21634 \end_inset
21635
21636  block, so only the CSS itself need be included.
21637 \end_layout
21638
21639 \begin_layout Description
21640 \begin_inset Flex Code
21641 status collapsed
21642
21643 \begin_layout Plain Layout
21644 HTMLTag
21645 \end_layout
21646
21647 \end_inset
21648
21649  [
21650 \begin_inset Flex Code
21651 status collapsed
21652
21653 \begin_layout Plain Layout
21654 string
21655 \end_layout
21656
21657 \end_inset
21658
21659 ] The tag to be used for this float, replacing 
21660 \begin_inset Quotes eld
21661 \end_inset
21662
21663
21664 \begin_inset Flex Code
21665 status collapsed
21666
21667 \begin_layout Plain Layout
21668 tag
21669 \end_layout
21670
21671 \end_inset
21672
21673
21674 \begin_inset Quotes erd
21675 \end_inset
21676
21677  in the example above.
21678  The default is 
21679 \begin_inset Flex Code
21680 status collapsed
21681
21682 \begin_layout Plain Layout
21683 div
21684 \end_layout
21685
21686 \end_inset
21687
21688  and will rarely need changing.
21689 \end_layout
21690
21691 \begin_layout Subsection
21692 Bibliography formatting
21693 \end_layout
21694
21695 \begin_layout Standard
21696 The bibliography can be formatted using 
21697 \begin_inset Flex Code
21698 status collapsed
21699
21700 \begin_layout Plain Layout
21701 CiteFormat
21702 \end_layout
21703
21704 \end_inset
21705
21706  blocks.
21707  See Section 
21708 \begin_inset CommandInset ref
21709 LatexCommand ref
21710 reference "sub:Citation-format-description"
21711
21712 \end_inset
21713
21714  for the details.
21715 \end_layout
21716
21717 \begin_layout Subsection
21718 LyX-generated CSS
21719 \end_layout
21720
21721 \begin_layout Standard
21722 We have several times mentioned that LyX will generate default CSS style
21723  rules for both insets and paragraph styles, based upon the other layout
21724  information that is provided.
21725  In this section, we shall say a word about which layout information LyX
21726  uses and how.
21727 \end_layout
21728
21729 \begin_layout Standard
21730 At present, LyX auto-generates CSS only for font information, making use
21731  of the 
21732 \begin_inset Flex Code
21733 status collapsed
21734
21735 \begin_layout Plain Layout
21736 Family
21737 \end_layout
21738
21739 \end_inset
21740
21741
21742 \begin_inset Flex Code
21743 status collapsed
21744
21745 \begin_layout Plain Layout
21746 Series
21747 \end_layout
21748
21749 \end_inset
21750
21751
21752 \begin_inset Flex Code
21753 status collapsed
21754
21755 \begin_layout Plain Layout
21756 Shape
21757 \end_layout
21758
21759 \end_inset
21760
21761 , and 
21762 \begin_inset Flex Code
21763 status collapsed
21764
21765 \begin_layout Plain Layout
21766 Size
21767 \end_layout
21768
21769 \end_inset
21770
21771  specified in the 
21772 \begin_inset Flex Code
21773 status collapsed
21774
21775 \begin_layout Plain Layout
21776 Font
21777 \end_layout
21778
21779 \end_inset
21780
21781  declaration.
21782  (See 
21783 \begin_inset CommandInset ref
21784 LatexCommand ref
21785 reference "sub:Font-description"
21786
21787 \end_inset
21788
21789 .) The translation is mostly straightforward and obvious.
21790  For example, 
21791 \begin_inset Quotes eld
21792 \end_inset
21793
21794
21795 \begin_inset Flex Code
21796 status collapsed
21797
21798 \begin_layout Plain Layout
21799 Family Sans
21800 \end_layout
21801
21802 \end_inset
21803
21804
21805 \begin_inset Quotes erd
21806 \end_inset
21807
21808  becomes 
21809 \begin_inset Quotes eld
21810 \end_inset
21811
21812
21813 \begin_inset Flex Code
21814 status collapsed
21815
21816 \begin_layout Plain Layout
21817 font-family: sans-serif;
21818 \end_layout
21819
21820 \end_inset
21821
21822
21823 \begin_inset Quotes erd
21824 \end_inset
21825
21826 .
21827  The correspondence of LyX sizes and CSS sizes is a little less obvious
21828  but nonetheless intuitive.
21829  See the 
21830 \begin_inset Flex Code
21831 status collapsed
21832
21833 \begin_layout Plain Layout
21834 getSizeCSS()
21835 \end_layout
21836
21837 \end_inset
21838
21839  function in 
21840 \begin_inset Flex URL
21841 status collapsed
21842
21843 \begin_layout Plain Layout
21844
21845 src/FontInfo.cpp
21846 \end_layout
21847
21848 \end_inset
21849
21850  for the details.
21851 \end_layout
21852
21853 \begin_layout Chapter
21854 Including External Material
21855 \end_layout
21856
21857 \begin_layout Standard
21858 \begin_inset Box Shadowbox
21859 position "t"
21860 hor_pos "c"
21861 has_inner_box 1
21862 inner_pos "t"
21863 use_parbox 0
21864 use_makebox 0
21865 width "100col%"
21866 special "none"
21867 height "1in"
21868 height_special "totalheight"
21869 status open
21870
21871 \begin_layout Plain Layout
21872 WARNING: This portion of the documentation has not been updated for some
21873  time.
21874  We certainly hope that it is still accurate, but there are no guarantees.
21875 \end_layout
21876
21877 \end_inset
21878
21879
21880 \end_layout
21881
21882 \begin_layout Standard
21883 The use of material from sources external to LyX is covered in detail in
21884  the 
21885 \emph on
21886 Embedded Objects
21887 \emph default
21888  manual.
21889  This part of the manual covers what needs to happen behind the scenes for
21890  new sorts of material to be included.
21891 \end_layout
21892
21893 \begin_layout Section
21894 How does it work?
21895 \end_layout
21896
21897 \begin_layout Standard
21898 The external material feature is based on the concept of a 
21899 \emph on
21900 template
21901 \emph default
21902 .
21903  A template is a specification of how LyX should interface with a certain
21904  kind of material.
21905  As bundled, LyX comes with predefined templates for Xfig figures, various
21906  raster format images, chess diagrams, and LilyPond music notation.
21907  You can check the actual list by using the menu 
21908 \begin_inset Flex MenuItem
21909 status collapsed
21910
21911 \begin_layout Plain Layout
21912 Insert\SpecialChar \menuseparator
21913 File\SpecialChar \menuseparator
21914 External Material
21915 \end_layout
21916
21917 \end_inset
21918
21919 .
21920  Furthermore, it is possible to roll your own template to support a specific
21921  kind of material.
21922  Later we'll describe in more detail what is involved, and hopefully you
21923  will submit all the templates you create so we can include them in a later
21924  LyX version.
21925 \end_layout
21926
21927 \begin_layout Standard
21928 Another basic idea of the external material feature is to distinguish between
21929  the original file that serves as a base for final material and the produced
21930  file that is included in your exported or printed document.
21931  For example, consider the case of a figure produced with 
21932 \begin_inset Flex Code
21933 status collapsed
21934
21935 \begin_layout Plain Layout
21936 Xfig
21937 \end_layout
21938
21939 \end_inset
21940
21941 .
21942  The Xfig application itself works on an original file with the 
21943 \begin_inset Flex Code
21944 status collapsed
21945
21946 \begin_layout Plain Layout
21947 .fig
21948 \end_layout
21949
21950 \end_inset
21951
21952  extension.
21953  Within Xfig, you create and change your figure, and when you are done,
21954  you save the 
21955 \begin_inset Flex Code
21956 status collapsed
21957
21958 \begin_layout Plain Layout
21959 fig
21960 \end_layout
21961
21962 \end_inset
21963
21964 -file.
21965  When you want to include the figure in your document, you invoke 
21966 \begin_inset Flex Code
21967 status collapsed
21968
21969 \begin_layout Plain Layout
21970 transfig
21971 \end_layout
21972
21973 \end_inset
21974
21975  in order to create a PostScript file that can readily be included in your
21976  LaTeX file.
21977  In this case, the 
21978 \begin_inset Flex Code
21979 status collapsed
21980
21981 \begin_layout Plain Layout
21982 .fig
21983 \end_layout
21984
21985 \end_inset
21986
21987  file is the original file, and the PostScript file is the produced file.
21988 \end_layout
21989
21990 \begin_layout Standard
21991 This distinction is important in order to allow updating of the material
21992  while you are in the process of writing the document.
21993  Furthermore, it provides us with the flexibility that is needed to support
21994  multiple export formats.
21995  For instance, in the case of a plain text file, it is not exactly an award-winn
21996 ing idea to include the figure as raw PostScript.
21997  Instead, you would either prefer to just include a reference to the figure
21998  or try to invoke some graphics to ASCII converter to make the final result
21999  look similar to the real graphics.
22000  The external material management allows you to do this, because it is parametri
22001 zed on the different export formats that LyX supports.
22002 \end_layout
22003
22004 \begin_layout Standard
22005 Besides supporting the production of different products according to the
22006  exported format, it supports tight integration with editing and viewing
22007  applications.
22008  In the case of an Xfig figure, you are able to invoke Xfig on the original
22009  file with a single click from within the external material dialog in LyX,
22010  and also preview the produced PostScript file with Ghostview with another
22011  click.
22012  No more fiddling around with the command line and/or file browsers to locate
22013  and manipulate the original or produced files.
22014  In this way, you are finally able to take full advantage of the many different
22015  applications that are relevant to use when you write your documents, and
22016  ultimately be more productive.
22017 \end_layout
22018
22019 \begin_layout Section
22020 The external template configuration file
22021 \end_layout
22022
22023 \begin_layout Standard
22024 It is relatively easy to add custom external template definitions to LyX.
22025  However, be aware that doing this in an careless manner most probably 
22026 \emph on
22027 will
22028 \emph default
22029  introduce an easily exploitable security hole.
22030  So before you do this, please read the discussion about security in section
22031  
22032 \begin_inset CommandInset ref
22033 LatexCommand ref
22034 reference "sec:Security-discussion"
22035
22036 \end_inset
22037
22038 .
22039 \end_layout
22040
22041 \begin_layout Standard
22042 Having said that, we encourage you to submit any interesting templates that
22043  you create.
22044  
22045 \end_layout
22046
22047 \begin_layout Standard
22048 The external templates are defined in the 
22049 \begin_inset Flex Code
22050 status collapsed
22051
22052 \begin_layout Plain Layout
22053 LyXDir/lib/external_templates
22054 \end_layout
22055
22056 \end_inset
22057
22058  file.
22059  You can place your own version in 
22060 \begin_inset Flex Code
22061 status collapsed
22062
22063 \begin_layout Plain Layout
22064 UserDir/external_templates
22065 \end_layout
22066
22067 \end_inset
22068
22069 .
22070 \end_layout
22071
22072 \begin_layout Standard
22073 A typical template looks like this:
22074 \end_layout
22075
22076 \begin_layout LyX-Code
22077 Template XFig
22078 \end_layout
22079
22080 \begin_layout LyX-Code
22081 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22082 \end_layout
22083
22084 \begin_layout LyX-Code
22085 HelpText
22086 \end_layout
22087
22088 \begin_layout LyX-Code
22089 An XFig figure.
22090 \end_layout
22091
22092 \begin_layout LyX-Code
22093 HelpTextEnd
22094 \end_layout
22095
22096 \begin_layout LyX-Code
22097 InputFormat fig
22098 \end_layout
22099
22100 \begin_layout LyX-Code
22101 FileFilter "*.fig"
22102 \end_layout
22103
22104 \begin_layout LyX-Code
22105 AutomaticProduction true
22106 \end_layout
22107
22108 \begin_layout LyX-Code
22109 Transform Rotate
22110 \end_layout
22111
22112 \begin_layout LyX-Code
22113 Transform Resize
22114 \end_layout
22115
22116 \begin_layout LyX-Code
22117 Format LaTeX
22118 \end_layout
22119
22120 \begin_layout LyX-Code
22121 TransformCommand Rotate RotationLatexCommand
22122 \end_layout
22123
22124 \begin_layout LyX-Code
22125 TransformCommand Resize ResizeLatexCommand
22126 \end_layout
22127
22128 \begin_layout LyX-Code
22129 Product "$$RotateFront$$ResizeFront
22130 \end_layout
22131
22132 \begin_layout LyX-Code
22133          
22134 \backslash
22135
22136 \backslash
22137 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22138 \end_layout
22139
22140 \begin_layout LyX-Code
22141          $$ResizeBack$$RotateBack"
22142 \end_layout
22143
22144 \begin_layout LyX-Code
22145 UpdateFormat pstex
22146 \end_layout
22147
22148 \begin_layout LyX-Code
22149 UpdateResult "$$AbsPath$$Basename.pstex_t"
22150 \end_layout
22151
22152 \begin_layout LyX-Code
22153 Requirement "graphicx"
22154 \end_layout
22155
22156 \begin_layout LyX-Code
22157 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22158 \end_layout
22159
22160 \begin_layout LyX-Code
22161 ReferencedFile latex "$$AbsPath$$Basename.eps"
22162 \end_layout
22163
22164 \begin_layout LyX-Code
22165 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22166 \end_layout
22167
22168 \begin_layout LyX-Code
22169 FormatEnd
22170 \end_layout
22171
22172 \begin_layout LyX-Code
22173 Format PDFLaTeX
22174 \end_layout
22175
22176 \begin_layout LyX-Code
22177 TransformCommand Rotate RotationLatexCommand
22178 \end_layout
22179
22180 \begin_layout LyX-Code
22181 TransformCommand Resize ResizeLatexCommand
22182 \end_layout
22183
22184 \begin_layout LyX-Code
22185 Product "$$RotateFront$$ResizeFront
22186 \end_layout
22187
22188 \begin_layout LyX-Code
22189          
22190 \backslash
22191
22192 \backslash
22193 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
22194 \end_layout
22195
22196 \begin_layout LyX-Code
22197          $$ResizeBack$$RotateBack"
22198 \end_layout
22199
22200 \begin_layout LyX-Code
22201 UpdateFormat pdftex
22202 \end_layout
22203
22204 \begin_layout LyX-Code
22205 UpdateResult "$$AbsPath$$Basename.pdftex_t"
22206 \end_layout
22207
22208 \begin_layout LyX-Code
22209 Requirement "graphicx"
22210 \end_layout
22211
22212 \begin_layout LyX-Code
22213 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
22214 \end_layout
22215
22216 \begin_layout LyX-Code
22217 ReferencedFile latex "$$AbsPath$$Basename.pdf"
22218 \end_layout
22219
22220 \begin_layout LyX-Code
22221 FormatEnd
22222 \end_layout
22223
22224 \begin_layout LyX-Code
22225 Format Ascii
22226 \end_layout
22227
22228 \begin_layout LyX-Code
22229 Product "$$Contents(
22230 \backslash
22231 "$$AbsPath$$Basename.asc
22232 \backslash
22233 ")"
22234 \end_layout
22235
22236 \begin_layout LyX-Code
22237 UpdateFormat asciixfig
22238 \end_layout
22239
22240 \begin_layout LyX-Code
22241 UpdateResult "$$AbsPath$$Basename.asc"
22242 \end_layout
22243
22244 \begin_layout LyX-Code
22245 FormatEnd
22246 \end_layout
22247
22248 \begin_layout LyX-Code
22249 Format DocBook
22250 \end_layout
22251
22252 \begin_layout LyX-Code
22253 Product "<graphic fileref=
22254 \backslash
22255 "$$AbsOrRelPathMaster$$Basename.eps
22256 \backslash
22257 ">
22258 \end_layout
22259
22260 \begin_layout LyX-Code
22261          </graphic>"
22262 \end_layout
22263
22264 \begin_layout LyX-Code
22265 UpdateFormat eps
22266 \end_layout
22267
22268 \begin_layout LyX-Code
22269 UpdateResult "$$AbsPath$$Basename.eps"
22270 \end_layout
22271
22272 \begin_layout LyX-Code
22273 ReferencedFile docbook "$$AbsPath$$Basename.eps"
22274 \end_layout
22275
22276 \begin_layout LyX-Code
22277 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
22278 \end_layout
22279
22280 \begin_layout LyX-Code
22281 FormatEnd
22282 \end_layout
22283
22284 \begin_layout LyX-Code
22285 Product "[XFig: $$FName]"
22286 \end_layout
22287
22288 \begin_layout LyX-Code
22289 FormatEnd
22290 \end_layout
22291
22292 \begin_layout LyX-Code
22293 TemplateEnd
22294 \end_layout
22295
22296 \begin_layout Standard
22297 As you can see, the template is enclosed in 
22298 \begin_inset Flex Code
22299 status collapsed
22300
22301 \begin_layout Plain Layout
22302 Template
22303 \end_layout
22304
22305 \end_inset
22306
22307  \SpecialChar \ldots{}
22308  
22309 \begin_inset Flex Code
22310 status collapsed
22311
22312 \begin_layout Plain Layout
22313 TemplateEnd
22314 \end_layout
22315
22316 \end_inset
22317
22318 .
22319  It contains a header specifying some general settings and, for each supported
22320  primary document file format, a section 
22321 \begin_inset Flex Code
22322 status collapsed
22323
22324 \begin_layout Plain Layout
22325 Format
22326 \end_layout
22327
22328 \end_inset
22329
22330  \SpecialChar \ldots{}
22331  
22332 \begin_inset Flex Code
22333 status collapsed
22334
22335 \begin_layout Plain Layout
22336 FormatEnd
22337 \end_layout
22338
22339 \end_inset
22340
22341 .
22342 \end_layout
22343
22344 \begin_layout Subsection
22345 The template header
22346 \end_layout
22347
22348 \begin_layout Description
22349 \begin_inset Flex Code
22350 status collapsed
22351
22352 \begin_layout Plain Layout
22353 AutomaticProduction
22354 \begin_inset space ~
22355 \end_inset
22356
22357 true|false
22358 \end_layout
22359
22360 \end_inset
22361
22362  Whether the file represented by the template must be generated by LyX.
22363  This command must occur exactly once.
22364 \end_layout
22365
22366 \begin_layout Description
22367 \begin_inset Flex Code
22368 status collapsed
22369
22370 \begin_layout Plain Layout
22371 FileFilter
22372 \begin_inset space ~
22373 \end_inset
22374
22375 <pattern>
22376 \end_layout
22377
22378 \end_inset
22379
22380  A glob pattern that is used in the file dialog to filter out the desired
22381  files.
22382  If there is more than one possible file extension (e.
22383 \begin_inset space \thinspace{}
22384 \end_inset
22385
22386 g.
22387 \begin_inset space \space{}
22388 \end_inset
22389
22390 tgif has 
22391 \begin_inset Flex Code
22392 status collapsed
22393
22394 \begin_layout Plain Layout
22395 .obj
22396 \end_layout
22397
22398 \end_inset
22399
22400  and 
22401 \begin_inset Flex Code
22402 status collapsed
22403
22404 \begin_layout Plain Layout
22405 .tgo
22406 \end_layout
22407
22408 \end_inset
22409
22410 ), use something like 
22411 \begin_inset Flex Code
22412 status collapsed
22413
22414 \begin_layout Plain Layout
22415 "*.{obj,tgo}"
22416 \end_layout
22417
22418 \end_inset
22419
22420 .
22421  This command must occur exactly once.
22422 \end_layout
22423
22424 \begin_layout Description
22425 \begin_inset Flex Code
22426 status collapsed
22427
22428 \begin_layout Plain Layout
22429 GuiName
22430 \begin_inset space ~
22431 \end_inset
22432
22433 <guiname>
22434 \end_layout
22435
22436 \end_inset
22437
22438  The text that is displayed on the button.
22439  This command must occur exactly once.
22440 \end_layout
22441
22442 \begin_layout Description
22443 \begin_inset Flex Code
22444 status collapsed
22445
22446 \begin_layout Plain Layout
22447 HelpText
22448 \begin_inset space ~
22449 \end_inset
22450
22451 <text>
22452 \begin_inset space ~
22453 \end_inset
22454
22455 HelpTextEnd
22456 \end_layout
22457
22458 \end_inset
22459
22460  The help text that is used in the External dialog.
22461  Provide enough information to explain to the user just what the template
22462  can provide him with.
22463  This command must occur exactly once.
22464 \end_layout
22465
22466 \begin_layout Description
22467 \begin_inset Flex Code
22468 status collapsed
22469
22470 \begin_layout Plain Layout
22471 InputFormat
22472 \begin_inset space ~
22473 \end_inset
22474
22475 <format>
22476 \end_layout
22477
22478 \end_inset
22479
22480  The file format of the original file.
22481  This must be the name of a format that is known to LyX (see section
22482 \begin_inset space ~
22483 \end_inset
22484
22485
22486 \begin_inset CommandInset ref
22487 LatexCommand ref
22488 reference "sec:Formats"
22489
22490 \end_inset
22491
22492 ).
22493  Use 
22494 \begin_inset Quotes eld
22495 \end_inset
22496
22497
22498 \begin_inset Flex Code
22499 status collapsed
22500
22501 \begin_layout Plain Layout
22502 *
22503 \end_layout
22504
22505 \end_inset
22506
22507
22508 \begin_inset Quotes erd
22509 \end_inset
22510
22511  if the template can handle original files of more than one format.
22512  LyX will attempt to interrogate the file itself in order to deduce its
22513  format in this case.
22514  This command must occur exactly once.
22515 \end_layout
22516
22517 \begin_layout Description
22518 \begin_inset Flex Code
22519 status collapsed
22520
22521 \begin_layout Plain Layout
22522 Template
22523 \begin_inset space ~
22524 \end_inset
22525
22526 <id>
22527 \end_layout
22528
22529 \end_inset
22530
22531  A unique name for the template.
22532  It must not contain substitution macros (see below).
22533 \end_layout
22534
22535 \begin_layout Description
22536 \begin_inset Flex Code
22537 status collapsed
22538
22539 \begin_layout Plain Layout
22540 Transform
22541 \begin_inset space ~
22542 \end_inset
22543
22544 Rotate|Resize|Clip|Extra
22545 \end_layout
22546
22547 \end_inset
22548
22549  This command specifies which transformations are supported by this template.
22550  It may occur zero or more times.
22551  This command enables the corresponding tabs in the external dialog.
22552  Each 
22553 \begin_inset Flex Code
22554 status collapsed
22555
22556 \begin_layout Plain Layout
22557 Transform
22558 \end_layout
22559
22560 \end_inset
22561
22562  command must have either a corresponding 
22563 \begin_inset Flex Code
22564 status collapsed
22565
22566 \begin_layout Plain Layout
22567 TransformCommand
22568 \end_layout
22569
22570 \end_inset
22571
22572  or a 
22573 \begin_inset Flex Code
22574 status collapsed
22575
22576 \begin_layout Plain Layout
22577 TransformOption
22578 \end_layout
22579
22580 \end_inset
22581
22582  command in the 
22583 \begin_inset Flex Code
22584 status collapsed
22585
22586 \begin_layout Plain Layout
22587 Format
22588 \end_layout
22589
22590 \end_inset
22591
22592  section.
22593  Otherwise the transformation will not be supported by that format.
22594 \end_layout
22595
22596 \begin_layout Subsection
22597 The Format section
22598 \end_layout
22599
22600 \begin_layout Description
22601 \begin_inset Flex Code
22602 status collapsed
22603
22604 \begin_layout Plain Layout
22605 Format
22606 \begin_inset space ~
22607 \end_inset
22608
22609 LaTeX|PDFLaTeX|PlainText|DocBook
22610 \end_layout
22611
22612 \end_inset
22613
22614  The primary document file format that this format definition is for.
22615  Not every template has a sensible representation in all document file formats.
22616  Please define nevertheless a 
22617 \begin_inset Flex Code
22618 status collapsed
22619
22620 \begin_layout Plain Layout
22621 Format
22622 \end_layout
22623
22624 \end_inset
22625
22626  section for all templates.
22627  Use a dummy text when no representation is available.
22628  Then you can at least see a reference to the external material in the exported
22629  document.
22630 \end_layout
22631
22632 \begin_layout Description
22633 \begin_inset Flex Code
22634 status collapsed
22635
22636 \begin_layout Plain Layout
22637 Option
22638 \begin_inset space ~
22639 \end_inset
22640
22641 <name>
22642 \begin_inset space ~
22643 \end_inset
22644
22645 <value>
22646 \end_layout
22647
22648 \end_inset
22649
22650  This command defines an additional macro 
22651 \begin_inset Flex Code
22652 status collapsed
22653
22654 \begin_layout Plain Layout
22655 $$<name>
22656 \end_layout
22657
22658 \end_inset
22659
22660  for substitution in 
22661 \begin_inset Flex Code
22662 status collapsed
22663
22664 \begin_layout Plain Layout
22665 Product
22666 \end_layout
22667
22668 \end_inset
22669
22670 .
22671  
22672 \begin_inset Flex Code
22673 status collapsed
22674
22675 \begin_layout Plain Layout
22676 <value>
22677 \end_layout
22678
22679 \end_inset
22680
22681  itself may contain substitution macros.
22682  The advantage over using 
22683 \begin_inset Flex Code
22684 status collapsed
22685
22686 \begin_layout Plain Layout
22687 <value>
22688 \end_layout
22689
22690 \end_inset
22691
22692  directly in 
22693 \begin_inset Flex Code
22694 status collapsed
22695
22696 \begin_layout Plain Layout
22697 Product
22698 \end_layout
22699
22700 \end_inset
22701
22702  is that the substituted value of 
22703 \begin_inset Flex Code
22704 status collapsed
22705
22706 \begin_layout Plain Layout
22707 $$<name>
22708 \end_layout
22709
22710 \end_inset
22711
22712  is sanitized so that it is a valid optional argument in the document format.
22713  This command may occur zero or more times.
22714 \end_layout
22715
22716 \begin_layout Description
22717 \begin_inset Flex Code
22718 status collapsed
22719
22720 \begin_layout Plain Layout
22721 Product
22722 \begin_inset space ~
22723 \end_inset
22724
22725 <text>
22726 \end_layout
22727
22728 \end_inset
22729
22730  The text that is inserted in the exported document.
22731  This is actually the most important command and can be quite complex.
22732  This command must occur exactly once.
22733 \end_layout
22734
22735 \begin_layout Description
22736 \begin_inset Flex Code
22737 status collapsed
22738
22739 \begin_layout Plain Layout
22740 Preamble
22741 \begin_inset space ~
22742 \end_inset
22743
22744 <name>
22745 \end_layout
22746
22747 \end_inset
22748
22749  This command specifies a preamble snippet that will be included in the
22750  LaTeX preamble.
22751  It has to be defined using 
22752 \begin_inset Flex Code
22753 status collapsed
22754
22755 \begin_layout Plain Layout
22756 PreambleDef
22757 \end_layout
22758
22759 \end_inset
22760
22761  \SpecialChar \ldots{}
22762  
22763 \begin_inset Flex Code
22764 status collapsed
22765
22766 \begin_layout Plain Layout
22767 PreambleDefEnd
22768 \end_layout
22769
22770 \end_inset
22771
22772 .
22773  This command may occur zero or more times.
22774 \end_layout
22775
22776 \begin_layout Description
22777 \begin_inset Flex Code
22778 status collapsed
22779
22780 \begin_layout Plain Layout
22781 ReferencedFile
22782 \begin_inset space ~
22783 \end_inset
22784
22785 <format>
22786 \begin_inset space ~
22787 \end_inset
22788
22789 <filename>
22790 \end_layout
22791
22792 \end_inset
22793
22794  This command denotes files that are created by the conversion process and
22795  are needed for a particular export format.
22796  If the filename is relative, it is interpreted relative to the master document.
22797  This command may be given zero or more times.
22798 \end_layout
22799
22800 \begin_layout Description
22801 \begin_inset Flex Code
22802 status collapsed
22803
22804 \begin_layout Plain Layout
22805 Requirement
22806 \begin_inset space ~
22807 \end_inset
22808
22809 <package>
22810 \end_layout
22811
22812 \end_inset
22813
22814  The name of a required LaTeX package.
22815  The package is included via 
22816 \begin_inset Flex Code
22817 status collapsed
22818
22819 \begin_layout Plain Layout
22820
22821 \backslash
22822 usepackage{}
22823 \end_layout
22824
22825 \end_inset
22826
22827  in the LaTeX preamble.
22828  This command may occur zero or more times.
22829 \end_layout
22830
22831 \begin_layout Description
22832 \begin_inset Flex Code
22833 status collapsed
22834
22835 \begin_layout Plain Layout
22836 TransformCommand
22837 \begin_inset space ~
22838 \end_inset
22839
22840 Rotate
22841 \begin_inset space ~
22842 \end_inset
22843
22844 RotationLatexCommand
22845 \end_layout
22846
22847 \end_inset
22848
22849  This command specifies that the built in LaTeX command should be used for
22850  rotation.
22851  This command may occur once or not at all.
22852 \end_layout
22853
22854 \begin_layout Description
22855 \begin_inset Flex Code
22856 status collapsed
22857
22858 \begin_layout Plain Layout
22859 TransformCommand
22860 \begin_inset space ~
22861 \end_inset
22862
22863 Resize
22864 \begin_inset space ~
22865 \end_inset
22866
22867 ResizeLatexCommand
22868 \end_layout
22869
22870 \end_inset
22871
22872  This command specifies that the built in LaTeX command should be used for
22873  resizing.
22874  This command may occur once or not at all.
22875 \end_layout
22876
22877 \begin_layout Description
22878 \begin_inset Flex Code
22879 status collapsed
22880
22881 \begin_layout Plain Layout
22882 TransformOption
22883 \begin_inset space ~
22884 \end_inset
22885
22886 Rotate
22887 \begin_inset space ~
22888 \end_inset
22889
22890 RotationLatexOption
22891 \end_layout
22892
22893 \end_inset
22894
22895  This command specifies that rotation is done via an optional argument.
22896  This command may occur once or not at all.
22897 \end_layout
22898
22899 \begin_layout Description
22900 \begin_inset Flex Code
22901 status collapsed
22902
22903 \begin_layout Plain Layout
22904 TransformOption
22905 \begin_inset space ~
22906 \end_inset
22907
22908 Resize
22909 \begin_inset space ~
22910 \end_inset
22911
22912 ResizeLatexOption
22913 \end_layout
22914
22915 \end_inset
22916
22917  This command specifies that resizing is done via an optional argument.
22918  This command may occur once or not at all.
22919 \end_layout
22920
22921 \begin_layout Description
22922 \begin_inset Flex Code
22923 status collapsed
22924
22925 \begin_layout Plain Layout
22926 TransformOption
22927 \begin_inset space ~
22928 \end_inset
22929
22930 Clip
22931 \begin_inset space ~
22932 \end_inset
22933
22934 ClipLatexOption
22935 \end_layout
22936
22937 \end_inset
22938
22939  This command specifies that clipping is done via an optional argument.
22940  This command may occur once or not at all.
22941 \end_layout
22942
22943 \begin_layout Description
22944 \begin_inset Flex Code
22945 status collapsed
22946
22947 \begin_layout Plain Layout
22948 TransformOption
22949 \begin_inset space ~
22950 \end_inset
22951
22952 Extra
22953 \begin_inset space ~
22954 \end_inset
22955
22956 ExtraLatexOption
22957 \end_layout
22958
22959 \end_inset
22960
22961  This command specifies that an extra optional argument is used.
22962  This command may occur once or not at all.
22963 \end_layout
22964
22965 \begin_layout Description
22966 \begin_inset Flex Code
22967 status collapsed
22968
22969 \begin_layout Plain Layout
22970 UpdateFormat
22971 \begin_inset space ~
22972 \end_inset
22973
22974 <format>
22975 \end_layout
22976
22977 \end_inset
22978
22979  The file format of the converted file.
22980  This must be the name of a format that is known to LyX (see the 
22981 \begin_inset Flex MenuItem
22982 status collapsed
22983
22984 \begin_layout Plain Layout
22985
22986 \bar under
22987 T
22988 \bar default
22989 ools\SpecialChar \menuseparator
22990
22991 \bar under
22992 P
22993 \bar default
22994 references\SpecialChar \menuseparator
22995 File Handling\SpecialChar \menuseparator
22996 File Format
22997 \end_layout
22998
22999 \end_inset
23000
23001  dialog).
23002  This command must occur exactly once.
23003 \end_layout
23004
23005 \begin_layout Description
23006 \begin_inset Flex Code
23007 status collapsed
23008
23009 \begin_layout Plain Layout
23010 UpdateResult
23011 \begin_inset space ~
23012 \end_inset
23013
23014 <filename>
23015 \end_layout
23016
23017 \end_inset
23018
23019  The file name of the converted file.
23020  The file name must be absolute.
23021  This command must occur exactly once.
23022 \end_layout
23023
23024 \begin_layout Subsection
23025 Preamble definitions
23026 \end_layout
23027
23028 \begin_layout Standard
23029 The external template configuration file may contain additional preamble
23030  definitions enclosed by 
23031 \begin_inset Flex Code
23032 status collapsed
23033
23034 \begin_layout Plain Layout
23035 PreambleDef
23036 \end_layout
23037
23038 \end_inset
23039
23040  \SpecialChar \ldots{}
23041  
23042 \begin_inset Flex Code
23043 status collapsed
23044
23045 \begin_layout Plain Layout
23046 PreambleDefEnd
23047 \end_layout
23048
23049 \end_inset
23050
23051 .
23052  They can be used by the templates in the 
23053 \begin_inset Flex Code
23054 status collapsed
23055
23056 \begin_layout Plain Layout
23057 Format
23058 \end_layout
23059
23060 \end_inset
23061
23062  section.
23063 \end_layout
23064
23065 \begin_layout Section
23066 The substitution mechanism
23067 \end_layout
23068
23069 \begin_layout Standard
23070 When the external material facility invokes an external program, it is done
23071  on the basis of a command defined in the template configuration file.
23072  These commands can contain various macros that are expanded before execution.
23073  Execution always take place in the directory of the containing document.
23074 \end_layout
23075
23076 \begin_layout Standard
23077 Also, whenever external material is to be displayed, the name will be produced
23078  by the substitution mechanism, and most other commands in the template
23079  definition support substitution as well.
23080 \end_layout
23081
23082 \begin_layout Standard
23083 The available macros are the following:
23084 \end_layout
23085
23086 \begin_layout Description
23087 \begin_inset Flex Code
23088 status collapsed
23089
23090 \begin_layout Plain Layout
23091 $$AbsOrRelPathMaster
23092 \end_layout
23093
23094 \end_inset
23095
23096  The file path, absolute or relative to the master LyX document.
23097 \end_layout
23098
23099 \begin_layout Description
23100 \begin_inset Flex Code
23101 status collapsed
23102
23103 \begin_layout Plain Layout
23104 $$AbsOrRelPathParent
23105 \end_layout
23106
23107 \end_inset
23108
23109  The file path, absolute or relative to the LyX document.
23110 \end_layout
23111
23112 \begin_layout Description
23113 \begin_inset Flex Code
23114 status collapsed
23115
23116 \begin_layout Plain Layout
23117 $$AbsPath
23118 \end_layout
23119
23120 \end_inset
23121
23122  The absolute file path.
23123 \end_layout
23124
23125 \begin_layout Description
23126 \begin_inset Flex Code
23127 status collapsed
23128
23129 \begin_layout Plain Layout
23130 $$Basename
23131 \end_layout
23132
23133 \end_inset
23134
23135  The filename without path and without the extension.
23136 \end_layout
23137
23138 \begin_layout Description
23139 \begin_inset Flex Code
23140 status collapsed
23141
23142 \begin_layout Plain Layout
23143 $$Contents(
23144 \begin_inset Quotes eld
23145 \end_inset
23146
23147 filename.ext
23148 \begin_inset Quotes erd
23149 \end_inset
23150
23151 )
23152 \end_layout
23153
23154 \end_inset
23155
23156  This macro will expand to the contents of the file with the name 
23157 \begin_inset Flex Code
23158 status collapsed
23159
23160 \begin_layout Plain Layout
23161 filename.ext
23162 \end_layout
23163
23164 \end_inset
23165
23166 .
23167 \end_layout
23168
23169 \begin_layout Description
23170 \begin_inset Flex Code
23171 status collapsed
23172
23173 \begin_layout Plain Layout
23174 $$Extension
23175 \end_layout
23176
23177 \end_inset
23178
23179  The file extension (including the dot).
23180 \end_layout
23181
23182 \begin_layout Description
23183 \begin_inset Flex Code
23184 status collapsed
23185
23186 \begin_layout Plain Layout
23187 $$FName
23188 \end_layout
23189
23190 \end_inset
23191
23192  The filename of the file specified in the external material dialog.
23193  This is either an absolute name, or it is relative to the LyX document.
23194 \end_layout
23195
23196 \begin_layout Description
23197 \begin_inset Flex Code
23198 status collapsed
23199
23200 \begin_layout Plain Layout
23201 $$FPath
23202 \end_layout
23203
23204 \end_inset
23205
23206  The path part of 
23207 \begin_inset Flex Code
23208 status collapsed
23209
23210 \begin_layout Plain Layout
23211 $$FName
23212 \end_layout
23213
23214 \end_inset
23215
23216  (absolute name or relative to the LyX document).
23217 \end_layout
23218
23219 \begin_layout Description
23220 \begin_inset Flex Code
23221 status collapsed
23222
23223 \begin_layout Plain Layout
23224 $$RelPathMaster
23225 \end_layout
23226
23227 \end_inset
23228
23229  The file path, relative to the master LyX document.
23230 \end_layout
23231
23232 \begin_layout Description
23233 \begin_inset Flex Code
23234 status collapsed
23235
23236 \begin_layout Plain Layout
23237 $$RelPathParent
23238 \end_layout
23239
23240 \end_inset
23241
23242  The file path, relative to the LyX document.
23243 \end_layout
23244
23245 \begin_layout Description
23246 \begin_inset Flex Code
23247 status collapsed
23248
23249 \begin_layout Plain Layout
23250 $$Sysdir
23251 \end_layout
23252
23253 \end_inset
23254
23255  This macro will expand to the absolute path of the system directory.
23256  This is typically used to point to the various helper scripts that are
23257  bundled with LyX.
23258 \end_layout
23259
23260 \begin_layout Description
23261 \begin_inset Flex Code
23262 status collapsed
23263
23264 \begin_layout Plain Layout
23265 $$Tempname
23266 \end_layout
23267
23268 \end_inset
23269
23270  A name and full path to a temporary file which will be automatically deleted
23271  whenever the containing document is closed, or the external material insertion
23272  deleted.
23273 \end_layout
23274
23275 \begin_layout Standard
23276 All path macros contain a trailing directory separator, so you can construct
23277  e.
23278 \begin_inset space \thinspace{}
23279 \end_inset
23280
23281 g.
23282 \begin_inset space \space{}
23283 \end_inset
23284
23285 the absolute filename with 
23286 \begin_inset Flex Code
23287 status collapsed
23288
23289 \begin_layout Plain Layout
23290 $$AbsPath$$Basename$$Extension
23291 \end_layout
23292
23293 \end_inset
23294
23295 .
23296 \end_layout
23297
23298 \begin_layout Standard
23299 The macros above are substituted in all commands unless otherwise noted.
23300  The command 
23301 \begin_inset Flex Code
23302 status collapsed
23303
23304 \begin_layout Plain Layout
23305 Product
23306 \end_layout
23307
23308 \end_inset
23309
23310  supports additionally the following substitutions if they are enabled by
23311  the 
23312 \begin_inset Flex Code
23313 status collapsed
23314
23315 \begin_layout Plain Layout
23316 Transform
23317 \end_layout
23318
23319 \end_inset
23320
23321  and 
23322 \begin_inset Flex Code
23323 status collapsed
23324
23325 \begin_layout Plain Layout
23326 TransformCommand
23327 \end_layout
23328
23329 \end_inset
23330
23331  commands:
23332 \end_layout
23333
23334 \begin_layout Description
23335 \begin_inset Flex Code
23336 status collapsed
23337
23338 \begin_layout Plain Layout
23339 $$ResizeFront
23340 \end_layout
23341
23342 \end_inset
23343
23344  The front part of the resize command.
23345 \end_layout
23346
23347 \begin_layout Description
23348 \begin_inset Flex Code
23349 status collapsed
23350
23351 \begin_layout Plain Layout
23352 $$ResizeBack
23353 \end_layout
23354
23355 \end_inset
23356
23357  The back part of the resize command.
23358 \end_layout
23359
23360 \begin_layout Description
23361 \begin_inset Flex Code
23362 status collapsed
23363
23364 \begin_layout Plain Layout
23365 $$RotateFront
23366 \end_layout
23367
23368 \end_inset
23369
23370  The front part of the rotation command.
23371 \end_layout
23372
23373 \begin_layout Description
23374 \begin_inset Flex Code
23375 status collapsed
23376
23377 \begin_layout Plain Layout
23378 $$RotateBack
23379 \end_layout
23380
23381 \end_inset
23382
23383  The back part of the rotation command.
23384 \end_layout
23385
23386 \begin_layout Standard
23387 The value string of the 
23388 \begin_inset Flex Code
23389 status collapsed
23390
23391 \begin_layout Plain Layout
23392 Option
23393 \end_layout
23394
23395 \end_inset
23396
23397  command supports additionally the following substitutions if they are enabled
23398  by the 
23399 \begin_inset Flex Code
23400 status collapsed
23401
23402 \begin_layout Plain Layout
23403 Transform
23404 \end_layout
23405
23406 \end_inset
23407
23408  and 
23409 \begin_inset Flex Code
23410 status collapsed
23411
23412 \begin_layout Plain Layout
23413 TransformOption
23414 \end_layout
23415
23416 \end_inset
23417
23418  commands:
23419 \end_layout
23420
23421 \begin_layout Description
23422 \begin_inset Flex Code
23423 status collapsed
23424
23425 \begin_layout Plain Layout
23426 $$Clip
23427 \end_layout
23428
23429 \end_inset
23430
23431  The clip option.
23432 \end_layout
23433
23434 \begin_layout Description
23435 \begin_inset Flex Code
23436 status collapsed
23437
23438 \begin_layout Plain Layout
23439 $$Extra
23440 \end_layout
23441
23442 \end_inset
23443
23444  The extra option.
23445 \end_layout
23446
23447 \begin_layout Description
23448 \begin_inset Flex Code
23449 status collapsed
23450
23451 \begin_layout Plain Layout
23452 $$Resize
23453 \end_layout
23454
23455 \end_inset
23456
23457  The resize option.
23458 \end_layout
23459
23460 \begin_layout Description
23461 \begin_inset Flex Code
23462 status collapsed
23463
23464 \begin_layout Plain Layout
23465 $$Rotate
23466 \end_layout
23467
23468 \end_inset
23469
23470  The rotation option.
23471 \end_layout
23472
23473 \begin_layout Standard
23474 You may ask why there are so many path macros.
23475  There are mainly two reasons:
23476 \end_layout
23477
23478 \begin_layout Enumerate
23479 Relative and absolute file names should remain relative or absolute, respectivel
23480 y.
23481  Users may have reasons to prefer either form.
23482  Relative names are useful for portable documents that should work on different
23483  machines, for example.
23484  Absolute names may be required by some programs.
23485 \end_layout
23486
23487 \begin_layout Enumerate
23488 LaTeX treats relative file names differently than LyX and other programs
23489  in nested included files.
23490  For LyX, a relative file name is always relative to the document that contains
23491  the file name.
23492  For LaTeX, it is always relative to the master document.
23493  These two definitions are identical if you have only one document, but
23494  differ if you have a master document that includes part documents.
23495  That means that relative filenames must be transformed when presented to
23496  LaTeX.
23497  Fortunately LyX does this automatically for you if you choose the right
23498  macros.
23499 \end_layout
23500
23501 \begin_layout Standard
23502 So which path macro should be used in new template definitions? The rule
23503  is not difficult:
23504 \end_layout
23505
23506 \begin_layout Itemize
23507 Use 
23508 \begin_inset Flex Code
23509 status collapsed
23510
23511 \begin_layout Plain Layout
23512 $$AbsPath
23513 \end_layout
23514
23515 \end_inset
23516
23517  if an absolute path is required.
23518 \end_layout
23519
23520 \begin_layout Itemize
23521 Use 
23522 \begin_inset Flex Code
23523 status collapsed
23524
23525 \begin_layout Plain Layout
23526 $$AbsOrRelPathMaster
23527 \end_layout
23528
23529 \end_inset
23530
23531  if the substituted string is some kind of LaTeX input.
23532 \end_layout
23533
23534 \begin_layout Itemize
23535 Else use 
23536 \begin_inset Flex Code
23537 status collapsed
23538
23539 \begin_layout Plain Layout
23540 $$AbsOrRelPathParent
23541 \end_layout
23542
23543 \end_inset
23544
23545  in order to preserve the user's choice.
23546 \end_layout
23547
23548 \begin_layout Standard
23549 There are special cases where this rule does not work and e.
23550 \begin_inset space \thinspace{}
23551 \end_inset
23552
23553 g.
23554 \begin_inset space \space{}
23555 \end_inset
23556
23557 relative names are needed, but normally it will work just fine.
23558  One example for such a case is the command 
23559 \begin_inset Flex Code
23560 status collapsed
23561
23562 \begin_layout Plain Layout
23563 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
23564 \end_layout
23565
23566 \end_inset
23567
23568  in the XFig template above: We can't use the absolute name because the
23569  copier for 
23570 \begin_inset Flex Code
23571 status collapsed
23572
23573 \begin_layout Plain Layout
23574 .pstex_t
23575 \end_layout
23576
23577 \end_inset
23578
23579  files needs the relative name in order to rewrite the file content.
23580 \end_layout
23581
23582 \begin_layout Section
23583 Security discussion
23584 \begin_inset CommandInset label
23585 LatexCommand label
23586 name "sec:Security-discussion"
23587
23588 \end_inset
23589
23590
23591 \end_layout
23592
23593 \begin_layout Standard
23594 The external material feature interfaces with a lot of external programs
23595  and does so automatically, so we have to consider the security implications
23596  of this.
23597  In particular, since you have the option of including your own filenames
23598  and/or parameter strings and those are expanded into a command, it seems
23599  that it would be possible to create a malicious document which executes
23600  arbitrary commands when a user views or prints the document.
23601  This is something we definitely want to avoid.
23602 \end_layout
23603
23604 \begin_layout Standard
23605 However, since the external program commands are specified in the template
23606  configuration file only, there are no security issues if LyX is properly
23607  configured with safe templates only.
23608  This is so because the external programs are invoked with the 
23609 \begin_inset Flex Code
23610 status collapsed
23611
23612 \begin_layout Plain Layout
23613 execvp
23614 \end_layout
23615
23616 \end_inset
23617
23618 -system call rather than the 
23619 \begin_inset Flex Code
23620 status collapsed
23621
23622 \begin_layout Plain Layout
23623 system
23624 \end_layout
23625
23626 \end_inset
23627
23628  system-call, so it's not possible to execute arbitrary commands from the
23629  filename or parameter section via the shell.
23630 \end_layout
23631
23632 \begin_layout Standard
23633 This also implies that you are restricted in what command strings you can
23634  use in the external material templates.
23635  In particular, pipes and redirection are not readily available.
23636  This has to be so if LyX should remain safe.
23637  If you want to use some of the shell features, you should write a safe
23638  script to do this in a controlled manner, and then invoke the script from
23639  the command string.
23640  
23641 \end_layout
23642
23643 \begin_layout Standard
23644 It is possible to design a template that interacts directly with the shell,
23645  but since this would allow a malicious user to execute arbitrary commands
23646  by writing clever filenames and/or parameters, we generally recommend that
23647  you only use safe scripts that work with the 
23648 \begin_inset Flex Code
23649 status collapsed
23650
23651 \begin_layout Plain Layout
23652 execvp
23653 \end_layout
23654
23655 \end_inset
23656
23657  system call in a controlled manner.
23658  Of course, for use in a controlled environment, it can be tempting to just
23659  fall back to use ordinary shell scripts.
23660  If you do so, be aware that you 
23661 \emph on
23662 will
23663 \emph default
23664  provide an easily exploitable security hole in your system.
23665  Of course it stands to reason that such unsafe templates will never be
23666  included in the standard LyX distribution, although we do encourage people
23667  to submit new templates in the open source tradition.
23668  But LyX as shipped from the official distribution channels will never have
23669  unsafe templates.
23670 \end_layout
23671
23672 \begin_layout Standard
23673 Including external material provides a lot of power, and you have to be
23674  careful not to introduce security hazards with this power.
23675  A subtle error in a single line in an innocent looking script can open
23676  the door to huge security problems.
23677  So if you do not fully understand the issues, we recommend that you consult
23678  a knowledgeable security professional or the LyX development team if you
23679  have any questions about whether a given template is safe or not.
23680  And do this before you use it in an uncontrolled environment.
23681 \end_layout
23682
23683 \begin_layout Chapter
23684 \start_of_appendix
23685 Names of available colors to be used in layouts
23686 \begin_inset CommandInset label
23687 LatexCommand label
23688 name "chap:Names-of-colors"
23689
23690 \end_inset
23691
23692
23693 \end_layout
23694
23695 \begin_layout Standard
23696 The colors listed here are the standard colors and the those that you can
23697  adjust in the LyX preferences.
23698 \end_layout
23699
23700 \begin_layout Description
23701 none
23702 \family roman
23703 \series medium
23704 \shape up
23705 \size normal
23706 \emph off
23707 \bar no
23708 \strikeout off
23709 \uuline off
23710 \uwave off
23711 \noun off
23712 \color none
23713  No particular color -- clear or default
23714 \end_layout
23715
23716 \begin_layout Description
23717 black
23718 \end_layout
23719
23720 \begin_layout Description
23721 white
23722 \end_layout
23723
23724 \begin_layout Description
23725 red
23726 \end_layout
23727
23728 \begin_layout Description
23729 green
23730 \end_layout
23731
23732 \begin_layout Description
23733 blue
23734 \end_layout
23735
23736 \begin_layout Description
23737 cyan
23738 \end_layout
23739
23740 \begin_layout Description
23741 magenta
23742 \end_layout
23743
23744 \begin_layout Description
23745 yellow
23746 \end_layout
23747
23748 \begin_layout Description
23749 cursor Cursor color
23750 \end_layout
23751
23752 \begin_layout Description
23753 background Background color
23754 \end_layout
23755
23756 \begin_layout Description
23757 foreground Foreground color
23758 \end_layout
23759
23760 \begin_layout Description
23761 selection Background color of selected text
23762 \end_layout
23763
23764 \begin_layout Description
23765 selectiontext Foreground color of selected text
23766 \end_layout
23767
23768 \begin_layout Description
23769 latex Text color in LaTeX mode 
23770 \end_layout
23771
23772 \begin_layout Description
23773 preview The color used for previews
23774 \end_layout
23775
23776 \begin_layout Description
23777 inlinecompletion Inline completion color 
23778 \end_layout
23779
23780 \begin_layout Description
23781 nonunique_inlinecompletion Inline completion color for the non-unique part
23782 \end_layout
23783
23784 \begin_layout Description
23785 notelabel Label color for notes
23786 \end_layout
23787
23788 \begin_layout Description
23789 notebg Background color of notes
23790 \end_layout
23791
23792 \begin_layout Description
23793 commentlabel Label color for comments
23794 \end_layout
23795
23796 \begin_layout Description
23797 commentbg Background color of comments
23798 \end_layout
23799
23800 \begin_layout Description
23801 greyedoutlabel Label color for greyedout insets
23802 \end_layout
23803
23804 \begin_layout Description
23805 greyedouttext Color for greyedout inset text
23806 \end_layout
23807
23808 \begin_layout Description
23809 greyedoutbg Background color of greyedout inset
23810 \end_layout
23811
23812 \begin_layout Description
23813 shadedbg Background color of shaded box
23814 \end_layout
23815
23816 \begin_layout Description
23817 listingsbg Background color of listings inset
23818 \end_layout
23819
23820 \begin_layout Description
23821 branchlabel Label color for branches
23822 \end_layout
23823
23824 \begin_layout Description
23825 footlabel Label color for footnotes
23826 \end_layout
23827
23828 \begin_layout Description
23829 indexlabel Label color for index insets 
23830 \end_layout
23831
23832 \begin_layout Description
23833 marginlabel Label color for margin notes 
23834 \end_layout
23835
23836 \begin_layout Description
23837 phantomtext Text color for phantom insets 
23838 \end_layout
23839
23840 \begin_layout Description
23841 urllabel Label color for URL insets
23842 \end_layout
23843
23844 \begin_layout Description
23845 urltext Color for URL inset text
23846 \end_layout
23847
23848 \begin_layout Description
23849 depthbar Color for the depth bars in the margin
23850 \end_layout
23851
23852 \begin_layout Description
23853 language Color for marking foreign language words
23854 \end_layout
23855
23856 \begin_layout Description
23857 command Text color for command insets
23858 \end_layout
23859
23860 \begin_layout Description
23861 commandbg Background color for command insets 
23862 \end_layout
23863
23864 \begin_layout Description
23865 commandframe Frame color for command insets
23866 \end_layout
23867
23868 \begin_layout Description
23869 special Special chars text color
23870 \end_layout
23871
23872 \begin_layout Description
23873 graphicsbg Graphics inset background color 
23874 \end_layout
23875
23876 \begin_layout Description
23877 math Math inset text color 
23878 \end_layout
23879
23880 \begin_layout Description
23881 mathbg Math inset background color
23882 \end_layout
23883
23884 \begin_layout Description
23885 mathmacrobg Macro math inset background color
23886 \end_layout
23887
23888 \begin_layout Description
23889 mathmacrohoverbg Macro math inset background color hovered
23890 \end_layout
23891
23892 \begin_layout Description
23893 mathmacrolabel Macro math label color
23894 \end_layout
23895
23896 \begin_layout Description
23897 mathmacroframe Macro math frame color
23898 \end_layout
23899
23900 \begin_layout Description
23901 mathmacroblend Macro math blended color
23902 \end_layout
23903
23904 \begin_layout Description
23905 mathmacrooldarg Macro template color for old parameters 
23906 \end_layout
23907
23908 \begin_layout Description
23909 mathmacronewarg Macro template color for new parameters
23910 \end_layout
23911
23912 \begin_layout Description
23913 mathframe Math inset frame color under focus 
23914 \end_layout
23915
23916 \begin_layout Description
23917 mathcorners Math inset frame color not under focus
23918 \end_layout
23919
23920 \begin_layout Description
23921 mathline Math line color
23922 \end_layout
23923
23924 \begin_layout Description
23925 collapsable Collapsable insets text 
23926 \end_layout
23927
23928 \begin_layout Description
23929 collapsableframe Collapsable insets frame
23930 \end_layout
23931
23932 \begin_layout Description
23933 insetbg Inset marker background color
23934 \end_layout
23935
23936 \begin_layout Description
23937 insetframe Inset marker frame color
23938 \end_layout
23939
23940 \begin_layout Description
23941 error Error box text color
23942 \end_layout
23943
23944 \begin_layout Description
23945 eolmarker End of line marker color
23946 \end_layout
23947
23948 \begin_layout Description
23949 added_space Added space colour
23950 \end_layout
23951
23952 \begin_layout Description
23953 appendix Appendix marker color
23954 \end_layout
23955
23956 \begin_layout Description
23957 changebar Changebar color
23958 \end_layout
23959
23960 \begin_layout Description
23961 deletedtext Deleted text color
23962 \end_layout
23963
23964 \begin_layout Description
23965 addedtext Added text color
23966 \end_layout
23967
23968 \begin_layout Description
23969 changedtextauthor1 Changed text color author 1
23970 \end_layout
23971
23972 \begin_layout Description
23973 changedtextauthor2 Changed text color author 2
23974 \end_layout
23975
23976 \begin_layout Description
23977 changedtextauthor3 Changed text color author 3
23978 \end_layout
23979
23980 \begin_layout Description
23981 changedtextauthor4 Changed text color author 4
23982 \end_layout
23983
23984 \begin_layout Description
23985 changedtextauthor5 Changed text color author 5
23986 \end_layout
23987
23988 \begin_layout Description
23989 deletedtextmodifier Deleted text modifying color
23990 \end_layout
23991
23992 \begin_layout Description
23993 tabularline Table line color
23994 \end_layout
23995
23996 \begin_layout Description
23997 tabularonoffline Table line color 
23998 \end_layout
23999
24000 \begin_layout Description
24001 bottomarea Bottom area color
24002 \end_layout
24003
24004 \begin_layout Description
24005 newpage New page color 
24006 \end_layout
24007
24008 \begin_layout Description
24009 pagebreak Page break color
24010 \end_layout
24011
24012 \begin_layout Description
24013 buttonframe Color used for button frame
24014 \end_layout
24015
24016 \begin_layout Description
24017 buttonbg Color used for bottom background
24018 \end_layout
24019
24020 \begin_layout Description
24021 buttonhoverbg Color used for buttom under focus 
24022 \end_layout
24023
24024 \begin_layout Description
24025 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
24026  
24027 \end_layout
24028
24029 \begin_layout Description
24030 previewframe Preview frame color
24031 \end_layout
24032
24033 \begin_layout Description
24034 inherit Color is inherited 
24035 \end_layout
24036
24037 \begin_layout Description
24038 regexpframe Color for regexp frame
24039 \end_layout
24040
24041 \begin_layout Description
24042 ignore For ignoring updates of a color
24043 \end_layout
24044
24045 \end_body
24046 \end_document