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