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