]> git.lyx.org Git - lyx.git/blob - lib/doc/Customization.lyx
2802dc013c0c6afb21ebdbc638df5e7dbdb3abcf
[lyx.git] / lib / doc / Customization.lyx
1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 455
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 -712698321 1356689813
11025 By default, the text entered in the LyX workarea in the respective layout
11026  is the last (mandatory) argument of a command if the 
11027 \begin_inset Flex Code
11028 status collapsed
11029
11030 \begin_layout Plain Layout
11031
11032 \change_inserted -712698321 1356689619
11033 LatexType
11034 \change_unchanged
11035
11036 \end_layout
11037
11038 \end_inset
11039
11040  is 
11041 \begin_inset Flex Code
11042 status collapsed
11043
11044 \begin_layout Plain Layout
11045
11046 \change_inserted -712698321 1356689629
11047 Command
11048 \change_unchanged
11049
11050 \end_layout
11051
11052 \end_inset
11053
11054 .
11055  However, arguments with the prefix 
11056 \begin_inset Flex Code
11057 status collapsed
11058
11059 \begin_layout Plain Layout
11060
11061 \change_inserted -712698321 1356689679
11062 post:
11063 \change_unchanged
11064
11065 \end_layout
11066
11067 \end_inset
11068
11069  are output after this workarea argument.
11070  Note that post-argument numbering restarts at 1, so the first argument
11071  following the workarea argument is 
11072 \begin_inset Flex Code
11073 status collapsed
11074
11075 \begin_layout Plain Layout
11076
11077 \change_inserted -712698321 1356689813
11078 post:1
11079 \change_unchanged
11080
11081 \end_layout
11082
11083 \end_inset
11084
11085 .
11086  Post-arguments are ignored in any other 
11087 \begin_inset Flex Code
11088 status collapsed
11089
11090 \begin_layout Plain Layout
11091
11092 \change_inserted -712698321 1356689801
11093 LatexType
11094 \end_layout
11095
11096 \end_inset
11097
11098  than 
11099 \begin_inset Flex Code
11100 status collapsed
11101
11102 \begin_layout Plain Layout
11103
11104 \change_inserted -712698321 1356689801
11105 Command
11106 \end_layout
11107
11108 \end_inset
11109
11110 .
11111 \change_unchanged
11112
11113 \end_layout
11114
11115 \begin_layout Standard
11116
11117 \change_inserted 155139281 1354199102
11118 Arguments for list 
11119 \begin_inset Flex Code
11120 status collapsed
11121
11122 \begin_layout Plain Layout
11123
11124 \change_inserted 155139281 1354199013
11125
11126 \backslash
11127 item
11128 \change_unchanged
11129
11130 \end_layout
11131
11132 \end_inset
11133
11134 s (as in 
11135 \begin_inset Flex Code
11136 status collapsed
11137
11138 \begin_layout Plain Layout
11139
11140 \change_inserted 155139281 1354199102
11141
11142 \backslash
11143 item[foo]
11144 \change_unchanged
11145
11146 \end_layout
11147
11148 \end_inset
11149
11150 ) have the prefix 
11151 \begin_inset Flex Code
11152 status collapsed
11153
11154 \begin_layout Plain Layout
11155
11156 \change_inserted 155139281 1354199044
11157 item:
11158 \change_unchanged
11159
11160 \end_layout
11161
11162 \end_inset
11163
11164  followed by the number (e.
11165 \begin_inset space \thinspace{}
11166 \end_inset
11167
11168 g.
11169  
11170 \begin_inset Flex Code
11171 status collapsed
11172
11173 \begin_layout Plain Layout
11174
11175 \change_inserted 155139281 1354199064
11176 Argument item:1
11177 \change_unchanged
11178
11179 \end_layout
11180
11181 \end_inset
11182
11183 )
11184 \change_unchanged
11185
11186 \end_layout
11187
11188 \end_deeper
11189 \begin_layout Description
11190 \begin_inset Flex Code
11191 status collapsed
11192
11193 \begin_layout Plain Layout
11194 BabelPreamble
11195 \end_layout
11196
11197 \end_inset
11198
11199  Note that this will completely override any prior 
11200 \begin_inset Flex Code
11201 status collapsed
11202
11203 \begin_layout Plain Layout
11204 BabelPreamble
11205 \end_layout
11206
11207 \end_inset
11208
11209  declaration for this style.
11210  Must end with 
11211 \begin_inset Quotes eld
11212 \end_inset
11213
11214
11215 \begin_inset Flex Code
11216 status collapsed
11217
11218 \begin_layout Plain Layout
11219 EndBabelPreamble
11220 \end_layout
11221
11222 \end_inset
11223
11224
11225 \begin_inset Quotes erd
11226 \end_inset
11227
11228 .
11229  See section 
11230 \begin_inset CommandInset ref
11231 LatexCommand ref
11232 reference "sub:I18n"
11233
11234 \end_inset
11235
11236  for details on its use.
11237 \end_layout
11238
11239 \begin_layout Description
11240 \begin_inset Flex Code
11241 status collapsed
11242
11243 \begin_layout Plain Layout
11244 BottomSep
11245 \end_layout
11246
11247 \end_inset
11248
11249  [
11250 \begin_inset Flex Code
11251 status collapsed
11252
11253 \begin_layout Plain Layout
11254 float=0
11255 \end_layout
11256
11257 \end_inset
11258
11259 ]
11260 \begin_inset Foot
11261 status collapsed
11262
11263 \begin_layout Plain Layout
11264 Note that a `float' here is a real number, such as: 1.5.
11265 \end_layout
11266
11267 \end_inset
11268
11269  The vertical space with which the last of a chain of paragraphs with this
11270  style is separated from the following paragraph.
11271  If the next paragraph has another style, the separations are not simply
11272  added, but the maximum is taken.
11273 \end_layout
11274
11275 \begin_layout Description
11276 \begin_inset Flex Code
11277 status collapsed
11278
11279 \begin_layout Plain Layout
11280 Category
11281 \end_layout
11282
11283 \end_inset
11284
11285  
11286 \begin_inset Flex Code
11287 status collapsed
11288
11289 \begin_layout Plain Layout
11290 [string]
11291 \end_layout
11292
11293 \end_inset
11294
11295  The category for this style.
11296  This is used to group related styles in the style combobox on the toolbar.
11297  Any string can be used, but you may want to use existing categories with
11298  your own styles.
11299  
11300 \end_layout
11301
11302 \begin_layout Description
11303 \begin_inset Flex Code
11304 status collapsed
11305
11306 \begin_layout Plain Layout
11307 CommandDepth
11308 \end_layout
11309
11310 \end_inset
11311
11312  Depth of XML command.
11313  Used only with XML-type formats.
11314 \end_layout
11315
11316 \begin_layout Description
11317 \begin_inset Flex Code
11318 status collapsed
11319
11320 \begin_layout Plain Layout
11321 CopyStyle
11322 \end_layout
11323
11324 \end_inset
11325
11326  
11327 \begin_inset Flex Code
11328 status collapsed
11329
11330 \begin_layout Plain Layout
11331 [string]
11332 \end_layout
11333
11334 \end_inset
11335
11336  Copies all the features of an existing style into the current one.
11337  
11338 \end_layout
11339
11340 \begin_layout Description
11341 \begin_inset Flex Code
11342 status collapsed
11343
11344 \begin_layout Plain Layout
11345 DependsOn
11346 \end_layout
11347
11348 \end_inset
11349
11350  The name of a style whose preamble should be output 
11351 \emph on
11352 before
11353 \emph default
11354  this one.
11355  This allows to ensure some ordering of the preamble snippets when macros
11356  definitions depend on one another.
11357 \begin_inset Foot
11358 status collapsed
11359
11360 \begin_layout Plain Layout
11361 Note that, besides that functionality, there is no way to ensure any ordering
11362  of preambles.
11363  The ordering that you see in a given version of LyX may change without
11364  warning in later versions.
11365 \end_layout
11366
11367 \end_inset
11368
11369
11370 \end_layout
11371
11372 \begin_layout Description
11373 \begin_inset Flex Code
11374 status collapsed
11375
11376 \begin_layout Plain Layout
11377 EndLabeltype
11378 \end_layout
11379
11380 \end_inset
11381
11382  [
11383 \begin_inset Flex Code
11384 status collapsed
11385
11386 \begin_layout Plain Layout
11387
11388 \emph on
11389 No_Label
11390 \emph default
11391 , Box, Filled_Box, Static
11392 \end_layout
11393
11394 \end_inset
11395
11396 ] The type of label that stands at the end of the paragraph (or sequence
11397  of paragraphs if 
11398 \begin_inset Flex Code
11399 status collapsed
11400
11401 \begin_layout Plain Layout
11402 LatexType
11403 \end_layout
11404
11405 \end_inset
11406
11407  is 
11408 \begin_inset Flex Code
11409 status collapsed
11410
11411 \begin_layout Plain Layout
11412 Environment
11413 \end_layout
11414
11415 \end_inset
11416
11417
11418 \begin_inset Flex Code
11419 status collapsed
11420
11421 \begin_layout Plain Layout
11422 Item_Environment
11423 \end_layout
11424
11425 \end_inset
11426
11427  or 
11428 \begin_inset Flex Code
11429 status collapsed
11430
11431 \begin_layout Plain Layout
11432 List_Environment
11433 \end_layout
11434
11435 \end_inset
11436
11437 ).
11438  
11439 \begin_inset Flex Code
11440 status collapsed
11441
11442 \begin_layout Plain Layout
11443 No_Label
11444 \end_layout
11445
11446 \end_inset
11447
11448  means 
11449 \begin_inset Quotes eld
11450 \end_inset
11451
11452 nothing
11453 \begin_inset Quotes erd
11454 \end_inset
11455
11456
11457 \begin_inset Flex Code
11458 status collapsed
11459
11460 \begin_layout Plain Layout
11461 Box
11462 \end_layout
11463
11464 \end_inset
11465
11466  (resp.
11467 \begin_inset Flex Code
11468 status collapsed
11469
11470 \begin_layout Plain Layout
11471 \begin_inset space ~
11472 \end_inset
11473
11474 Filled_Box
11475 \end_layout
11476
11477 \end_inset
11478
11479 ) is a white (resp.
11480 \begin_inset space ~
11481 \end_inset
11482
11483 black) square suitable for end of proof markers, 
11484 \begin_inset Flex Code
11485 status collapsed
11486
11487 \begin_layout Plain Layout
11488 Static
11489 \end_layout
11490
11491 \end_inset
11492
11493  is an explicit text string.
11494 \end_layout
11495
11496 \begin_layout Description
11497 \begin_inset Flex Code
11498 status collapsed
11499
11500 \begin_layout Plain Layout
11501 EndLabelString
11502 \end_layout
11503
11504 \end_inset
11505
11506  [
11507 \begin_inset Flex Code
11508 status collapsed
11509
11510 \begin_layout Plain Layout
11511 string=""
11512 \end_layout
11513
11514 \end_inset
11515
11516 ] The string used for a label with a 
11517 \begin_inset Flex Code
11518 status collapsed
11519
11520 \begin_layout Plain Layout
11521 Static
11522 \end_layout
11523
11524 \end_inset
11525
11526  
11527 \begin_inset Flex Code
11528 status collapsed
11529
11530 \begin_layout Plain Layout
11531 EndLabelType
11532 \end_layout
11533
11534 \end_inset
11535
11536 .
11537  
11538 \end_layout
11539
11540 \begin_layout Description
11541 \begin_inset Flex Code
11542 status collapsed
11543
11544 \begin_layout Plain Layout
11545 Font
11546 \end_layout
11547
11548 \end_inset
11549
11550  The font used for both the text body 
11551 \emph on
11552 and
11553 \emph default
11554  the label.
11555  See section
11556 \begin_inset space ~
11557 \end_inset
11558
11559
11560 \begin_inset CommandInset ref
11561 LatexCommand ref
11562 reference "sub:Font-description"
11563
11564 \end_inset
11565
11566 .
11567  Note that defining this font automatically defines the 
11568 \begin_inset Flex Code
11569 status collapsed
11570
11571 \begin_layout Plain Layout
11572 LabelFont
11573 \end_layout
11574
11575 \end_inset
11576
11577  to the same value.
11578  So you should define this one first if you also want to define 
11579 \begin_inset Flex Code
11580 status collapsed
11581
11582 \begin_layout Plain Layout
11583 LabelFont
11584 \end_layout
11585
11586 \end_inset
11587
11588 .
11589 \end_layout
11590
11591 \begin_layout Description
11592 \begin_inset Flex Code
11593 status collapsed
11594
11595 \begin_layout Plain Layout
11596 FreeSpacing
11597 \end_layout
11598
11599 \end_inset
11600
11601  
11602 \begin_inset CommandInset label
11603 LatexCommand label
11604 name "des:FreeSpacing"
11605
11606 \end_inset
11607
11608 [
11609 \begin_inset Flex Code
11610 status collapsed
11611
11612 \begin_layout Plain Layout
11613
11614 \emph on
11615 0
11616 \end_layout
11617
11618 \end_inset
11619
11620
11621 \begin_inset Flex Code
11622 status collapsed
11623
11624 \begin_layout Plain Layout
11625 1
11626 \end_layout
11627
11628 \end_inset
11629
11630 ] Usually LyX doesn't allow you to insert more than one space between words,
11631  since a space is considered as the separation between two words, not a
11632  character or symbol of its own.
11633  This is a very fine thing but sometimes annoying, for example, when typing
11634  program code or plain LaTeX code.
11635  For this reason, 
11636 \begin_inset Flex Code
11637 status collapsed
11638
11639 \begin_layout Plain Layout
11640 FreeSpacing
11641 \end_layout
11642
11643 \end_inset
11644
11645  can be enabled.
11646  Note that LyX will create protected blanks for the additional blanks when
11647  in another mode than LaTeX-mode.
11648 \end_layout
11649
11650 \begin_layout Description
11651 \begin_inset Flex Code
11652 status collapsed
11653
11654 \begin_layout Plain Layout
11655 HTML*
11656 \end_layout
11657
11658 \end_inset
11659
11660  These tags are used with XHTML output.
11661  See 
11662 \begin_inset CommandInset ref
11663 LatexCommand ref
11664 reference "sub:Paragraph-Style-XHTML"
11665
11666 \end_inset
11667
11668 .
11669 \end_layout
11670
11671 \begin_layout Description
11672 \begin_inset Flex Code
11673 status collapsed
11674
11675 \begin_layout Plain Layout
11676 InnerTag
11677 \end_layout
11678
11679 \end_inset
11680
11681  [[FIXME]] (Used only with XML-type formats.)
11682 \end_layout
11683
11684 \begin_layout Description
11685 \begin_inset Flex Code
11686 status collapsed
11687
11688 \begin_layout Plain Layout
11689 InPreamble
11690 \end_layout
11691
11692 \end_inset
11693
11694  
11695 \begin_inset Flex Code
11696 status collapsed
11697
11698 \begin_layout Plain Layout
11699 [1, 0]
11700 \end_layout
11701
11702 \end_inset
11703
11704  If 1, marks the style as to be included in the document preamble rather
11705  than in the document body.
11706  This is useful for document classes that want such information as the title
11707  and author to appear in the preamble.
11708  Note that this works only for styles for which the 
11709 \begin_inset Flex Code
11710 status collapsed
11711
11712 \begin_layout Plain Layout
11713 LatexType
11714 \end_layout
11715
11716 \end_inset
11717
11718  is 
11719 \begin_inset Flex Code
11720 status collapsed
11721
11722 \begin_layout Plain Layout
11723 Command
11724 \end_layout
11725
11726 \end_inset
11727
11728  or 
11729 \begin_inset Flex Code
11730 status collapsed
11731
11732 \begin_layout Plain Layout
11733 Paragraph
11734 \end_layout
11735
11736 \end_inset
11737
11738 .
11739 \end_layout
11740
11741 \begin_layout Description
11742 \begin_inset Flex Code
11743 status collapsed
11744
11745 \begin_layout Plain Layout
11746 InTitle
11747 \end_layout
11748
11749 \end_inset
11750
11751  
11752 \begin_inset Flex Code
11753 status collapsed
11754
11755 \begin_layout Plain Layout
11756 [1, 0]
11757 \end_layout
11758
11759 \end_inset
11760
11761  If 1, marks the style as being part of a title block (see also the 
11762 \begin_inset Flex Code
11763 status collapsed
11764
11765 \begin_layout Plain Layout
11766 TitleLatexType
11767 \end_layout
11768
11769 \end_inset
11770
11771  and 
11772 \begin_inset Flex Code
11773 status collapsed
11774
11775 \begin_layout Plain Layout
11776 TitleLatexName
11777 \end_layout
11778
11779 \end_inset
11780
11781  global entries).
11782 \end_layout
11783
11784 \begin_layout Description
11785
11786 \change_inserted -712698321 1355932296
11787 \begin_inset Flex Code
11788 status collapsed
11789
11790 \begin_layout Plain Layout
11791
11792 \change_inserted -712698321 1355932178
11793 ItemCommand
11794 \end_layout
11795
11796 \end_inset
11797
11798  [
11799 \begin_inset Flex Code
11800 status collapsed
11801
11802 \begin_layout Plain Layout
11803
11804 \change_inserted -712698321 1355932181
11805 string="item"
11806 \end_layout
11807
11808 \end_inset
11809
11810 ] The LaTeX command sequence declaring an item in a list.
11811  The command is to be defined without the preceding backslash (the default
11812  is 
11813 \begin_inset Quotes eld
11814 \end_inset
11815
11816 item
11817 \begin_inset Quotes erd
11818 \end_inset
11819
11820 , resulting in 
11821 \begin_inset Flex Code
11822 status collapsed
11823
11824 \begin_layout Plain Layout
11825
11826 \change_inserted -712698321 1355932279
11827
11828 \backslash
11829 item
11830 \change_unchanged
11831
11832 \end_layout
11833
11834 \end_inset
11835
11836  in the LaTeX output).
11837 \end_layout
11838
11839 \begin_layout Description
11840 \begin_inset Flex Code
11841 status collapsed
11842
11843 \begin_layout Plain Layout
11844 ItemSep
11845 \end_layout
11846
11847 \end_inset
11848
11849  [
11850 \begin_inset Flex Code
11851 status collapsed
11852
11853 \begin_layout Plain Layout
11854 float=0
11855 \end_layout
11856
11857 \end_inset
11858
11859 ] This provides extra space between paragraphs that have the same style.
11860  If you put other styles into an environment, each is separated with the
11861  environment's 
11862 \begin_inset Flex Code
11863 status collapsed
11864
11865 \begin_layout Plain Layout
11866 Parsep
11867 \end_layout
11868
11869 \end_inset
11870
11871 .
11872  But the whole items of the environment are additionally separated with
11873  this 
11874 \begin_inset Flex Code
11875 status collapsed
11876
11877 \begin_layout Plain Layout
11878 Itemsep
11879 \end_layout
11880
11881 \end_inset
11882
11883 .
11884  Note that this is a
11885 \emph on
11886  multiplier.
11887 \end_layout
11888
11889 \begin_layout Description
11890 \begin_inset Flex Code
11891 status collapsed
11892
11893 \begin_layout Plain Layout
11894 ItemTag
11895 \end_layout
11896
11897 \end_inset
11898
11899  [[FIXME]] (Used only with XML-type formats.)
11900 \end_layout
11901
11902 \begin_layout Description
11903 \begin_inset Flex Code
11904 status collapsed
11905
11906 \begin_layout Plain Layout
11907 KeepEmpty
11908 \end_layout
11909
11910 \end_inset
11911
11912  [
11913 \begin_inset Flex Code
11914 status collapsed
11915
11916 \begin_layout Plain Layout
11917
11918 \emph on
11919 0
11920 \end_layout
11921
11922 \end_inset
11923
11924
11925 \begin_inset Flex Code
11926 status collapsed
11927
11928 \begin_layout Plain Layout
11929 1
11930 \end_layout
11931
11932 \end_inset
11933
11934 ] Usually LyX does not allow you to leave a paragraph empty, since it would
11935  lead to empty LaTeX output.
11936  There are some cases where this could be desirable however: in a letter
11937  template, the required fields can be provided as empty fields, so that
11938  people do not forget them; in some special classes, a style can be used
11939  as some kind of break, which does not contain actual text.
11940 \end_layout
11941
11942 \begin_layout Description
11943 \begin_inset Flex Code
11944 status collapsed
11945
11946 \begin_layout Plain Layout
11947 LabelBottomsep
11948 \end_layout
11949
11950 \end_inset
11951
11952  [float=0] The vertical space between the label and the text body.
11953  Only used for labels that are above the text body (
11954 \begin_inset Flex Code
11955 status collapsed
11956
11957 \begin_layout Plain Layout
11958 Top_Environment
11959 \end_layout
11960
11961 \end_inset
11962
11963
11964 \begin_inset Flex Code
11965 status collapsed
11966
11967 \begin_layout Plain Layout
11968 Centered_Top_Environment
11969 \end_layout
11970
11971 \end_inset
11972
11973 ).
11974 \end_layout
11975
11976 \begin_layout Description
11977 \begin_inset Flex Code
11978 status collapsed
11979
11980 \begin_layout Plain Layout
11981 LabelCounter
11982 \end_layout
11983
11984 \end_inset
11985
11986  [
11987 \begin_inset Flex Code
11988 status collapsed
11989
11990 \begin_layout Plain Layout
11991 string=""
11992 \end_layout
11993
11994 \end_inset
11995
11996 ]
11997 \begin_inset Newline newline
11998 \end_inset
11999
12000 The name of the counter for automatic numbering.
12001  
12002 \begin_inset Newline newline
12003 \end_inset
12004
12005 This 
12006 \emph on
12007 must
12008 \emph default
12009  be given if 
12010 \begin_inset Flex Code
12011 status collapsed
12012
12013 \begin_layout Plain Layout
12014 LabelType
12015 \end_layout
12016
12017 \end_inset
12018
12019  is 
12020 \begin_inset Flex Code
12021 status collapsed
12022
12023 \begin_layout Plain Layout
12024 Counter
12025 \end_layout
12026
12027 \end_inset
12028
12029 .
12030  In that case, the counter will be stepped each time the style appears.
12031  
12032 \begin_inset Newline newline
12033 \end_inset
12034
12035 This 
12036 \emph on
12037 may
12038 \emph default
12039  also be given if 
12040 \begin_inset Flex Code
12041 status collapsed
12042
12043 \begin_layout Plain Layout
12044 LabelType
12045 \end_layout
12046
12047 \end_inset
12048
12049  is 
12050 \begin_inset Flex Code
12051 status collapsed
12052
12053 \begin_layout Plain Layout
12054 Enumerate
12055 \end_layout
12056
12057 \end_inset
12058
12059 , though this case is a bit complicated.
12060  Suppose you declare 
12061 \begin_inset Quotes eld
12062 \end_inset
12063
12064
12065 \begin_inset Flex Code
12066 status collapsed
12067
12068 \begin_layout Plain Layout
12069 LabelCounter myenum
12070 \end_layout
12071
12072 \end_inset
12073
12074
12075 \begin_inset Quotes erd
12076 \end_inset
12077
12078 .
12079  Then the actual counters used are 
12080 \begin_inset Flex Code
12081 status collapsed
12082
12083 \begin_layout Plain Layout
12084 myenumi
12085 \end_layout
12086
12087 \end_inset
12088
12089
12090 \begin_inset Flex Code
12091 status collapsed
12092
12093 \begin_layout Plain Layout
12094 myenumii
12095 \end_layout
12096
12097 \end_inset
12098
12099
12100 \begin_inset Flex Code
12101 status collapsed
12102
12103 \begin_layout Plain Layout
12104 myenumiii
12105 \end_layout
12106
12107 \end_inset
12108
12109 , and 
12110 \begin_inset Flex Code
12111 status collapsed
12112
12113 \begin_layout Plain Layout
12114 myenumiv
12115 \end_layout
12116
12117 \end_inset
12118
12119 , much as in LaTeX.
12120  These counters must all be declared separately.
12121 \begin_inset Newline newline
12122 \end_inset
12123
12124 See Section 
12125 \begin_inset CommandInset ref
12126 LatexCommand ref
12127 reference "sub:Counters"
12128
12129 \end_inset
12130
12131  for details on counters.
12132 \end_layout
12133
12134 \begin_layout Description
12135 \begin_inset Flex Code
12136 status collapsed
12137
12138 \begin_layout Plain Layout
12139 LabelFont
12140 \end_layout
12141
12142 \end_inset
12143
12144  The font used for the label.
12145  See section
12146 \begin_inset space ~
12147 \end_inset
12148
12149
12150 \begin_inset CommandInset ref
12151 LatexCommand ref
12152 reference "sub:Font-description"
12153
12154 \end_inset
12155
12156 .
12157 \end_layout
12158
12159 \begin_layout Description
12160 \begin_inset Flex Code
12161 status collapsed
12162
12163 \begin_layout Plain Layout
12164 LabelIndent
12165 \end_layout
12166
12167 \end_inset
12168
12169  Text that indicates how far a label should be indented.
12170 \end_layout
12171
12172 \begin_layout Description
12173 \begin_inset Flex Code
12174 status collapsed
12175
12176 \begin_layout Plain Layout
12177 Labelsep
12178 \end_layout
12179
12180 \end_inset
12181
12182  [
12183 \begin_inset Flex Code
12184 status collapsed
12185
12186 \begin_layout Plain Layout
12187 string=""
12188 \end_layout
12189
12190 \end_inset
12191
12192 ] The horizontal space between the label and the text body.
12193  Only used for labels that are not above the text body.
12194 \end_layout
12195
12196 \begin_layout Description
12197 \begin_inset Flex Code
12198 status collapsed
12199
12200 \begin_layout Plain Layout
12201 LabelString
12202 \end_layout
12203
12204 \end_inset
12205
12206  [
12207 \begin_inset Flex Code
12208 status collapsed
12209
12210 \begin_layout Plain Layout
12211 string=""
12212 \end_layout
12213
12214 \end_inset
12215
12216 ] The string used for a label with a 
12217 \begin_inset Flex Code
12218 status collapsed
12219
12220 \begin_layout Plain Layout
12221 Static
12222 \end_layout
12223
12224 \end_inset
12225
12226  labeltype.
12227  When 
12228 \begin_inset Flex Code
12229 status collapsed
12230
12231 \begin_layout Plain Layout
12232 LabelCounter
12233 \end_layout
12234
12235 \end_inset
12236
12237  is set, this string can be contain the special formatting commands described
12238  in Section 
12239 \begin_inset CommandInset ref
12240 LatexCommand ref
12241 reference "sub:Counters"
12242
12243 \end_inset
12244
12245 .
12246 \begin_inset Foot
12247 status collapsed
12248
12249 \begin_layout Plain Layout
12250 For the sake of backwards compatibility, the string 
12251 \begin_inset Flex Code
12252 status collapsed
12253
12254 \begin_layout Plain Layout
12255 @
12256 \emph on
12257 style-name
12258 \emph default
12259 @
12260 \end_layout
12261
12262 \end_inset
12263
12264  will be replaced by the expanded 
12265 \begin_inset Flex Code
12266 status collapsed
12267
12268 \begin_layout Plain Layout
12269 LabelString
12270 \end_layout
12271
12272 \end_inset
12273
12274  of style 
12275 \begin_inset Flex Code
12276 status collapsed
12277
12278 \begin_layout Plain Layout
12279
12280 \emph on
12281 style-name
12282 \end_layout
12283
12284 \end_inset
12285
12286 .
12287  This feature is now obsolete and should be replaced by the mechanisms of
12288  Section 
12289 \begin_inset CommandInset ref
12290 LatexCommand ref
12291 reference "sub:Counters"
12292
12293 \end_inset
12294
12295 .
12296 \end_layout
12297
12298 \end_inset
12299
12300
12301 \end_layout
12302
12303 \begin_layout Description
12304 \begin_inset Flex Code
12305 status collapsed
12306
12307 \begin_layout Plain Layout
12308 LabelStringAppendix
12309 \end_layout
12310
12311 \end_inset
12312
12313  [
12314 \begin_inset Flex Code
12315 status collapsed
12316
12317 \begin_layout Plain Layout
12318 string=""
12319 \end_layout
12320
12321 \end_inset
12322
12323 ] This is used inside the appendix instead of 
12324 \begin_inset Flex Code
12325 status collapsed
12326
12327 \begin_layout Plain Layout
12328 LabelString
12329 \end_layout
12330
12331 \end_inset
12332
12333 .
12334  Note that every 
12335 \begin_inset Flex Code
12336 status collapsed
12337
12338 \begin_layout Plain Layout
12339 LabelString
12340 \end_layout
12341
12342 \end_inset
12343
12344  statement resets 
12345 \begin_inset Flex Code
12346 status collapsed
12347
12348 \begin_layout Plain Layout
12349 LabelStringAppendix
12350 \end_layout
12351
12352 \end_inset
12353
12354  too.
12355 \end_layout
12356
12357 \begin_layout Description
12358 \begin_inset Flex Code
12359 status collapsed
12360
12361 \begin_layout Plain Layout
12362 LabelTag
12363 \end_layout
12364
12365 \end_inset
12366
12367  [FIXME] (Used only with XML-type formats.)
12368 \end_layout
12369
12370 \begin_layout Description
12371 \begin_inset Flex Code
12372 status collapsed
12373
12374 \begin_layout Plain Layout
12375 LabelType
12376 \end_layout
12377
12378 \end_inset
12379
12380  [
12381 \begin_inset Flex Code
12382 status collapsed
12383
12384 \begin_layout Plain Layout
12385
12386 \emph on
12387 No_Label
12388 \emph default
12389 , Manual, Static, Top_Environment, Centered_Top_Environment, Counter, Sensitive,
12390  Enumerate, Itemize, Bibliography
12391 \end_layout
12392
12393 \end_inset
12394
12395
12396 \end_layout
12397
12398 \begin_deeper
12399 \begin_layout Itemize
12400 \begin_inset Flex Code
12401 status collapsed
12402
12403 \begin_layout Plain Layout
12404 Manual
12405 \end_layout
12406
12407 \end_inset
12408
12409  means the label is the very first word (up to the first real blank).
12410  Use protected spaces (like
12411 \begin_inset space ~
12412 \end_inset
12413
12414 that one) if you want more than one word as the label.
12415  
12416 \end_layout
12417
12418 \begin_layout Itemize
12419 \begin_inset Flex Code
12420 status collapsed
12421
12422 \begin_layout Plain Layout
12423 Static
12424 \end_layout
12425
12426 \end_inset
12427
12428  means the label is simply whatever 
12429 \begin_inset Flex Code
12430 status collapsed
12431
12432 \begin_layout Plain Layout
12433 LabelString
12434 \end_layout
12435
12436 \end_inset
12437
12438  declares it to be.
12439  Note that this really is `static'.
12440 \end_layout
12441
12442 \begin_layout Itemize
12443 \begin_inset Flex Code
12444 status collapsed
12445
12446 \begin_layout Plain Layout
12447 Top_Environment
12448 \end_layout
12449
12450 \end_inset
12451
12452  and 
12453 \begin_inset Flex Code
12454 status collapsed
12455
12456 \begin_layout Plain Layout
12457 Centered_Top_Environment
12458 \end_layout
12459
12460 \end_inset
12461
12462  are special cases of 
12463 \begin_inset Flex Code
12464 status collapsed
12465
12466 \begin_layout Plain Layout
12467 Static
12468 \end_layout
12469
12470 \end_inset
12471
12472 .
12473  The label will be printed above the paragraph, but only at the top of an
12474  environment or the top of a chain of paragraphs with this style.
12475  This might be used with the 
12476 \begin_inset Flex MenuItem
12477 status collapsed
12478
12479 \begin_layout Plain Layout
12480 Abstract
12481 \end_layout
12482
12483 \end_inset
12484
12485  style, for example.
12486 \end_layout
12487
12488 \begin_layout Itemize
12489 \begin_inset Flex Code
12490 status collapsed
12491
12492 \begin_layout Plain Layout
12493 Sensitive
12494 \end_layout
12495
12496 \end_inset
12497
12498  is a special case for the caption-labels 
12499 \begin_inset Quotes eld
12500 \end_inset
12501
12502 Figure
12503 \begin_inset Quotes erd
12504 \end_inset
12505
12506  and 
12507 \begin_inset Quotes eld
12508 \end_inset
12509
12510 Table
12511 \begin_inset Quotes erd
12512 \end_inset
12513
12514 .
12515  
12516 \begin_inset Flex Code
12517 status collapsed
12518
12519 \begin_layout Plain Layout
12520 Sensitive
12521 \end_layout
12522
12523 \end_inset
12524
12525  means the (hardcoded) label string depends on the kind of float: It is
12526  hardcoded to be `FloatType N', where N is the value of the counter associated
12527  with the float.
12528 \end_layout
12529
12530 \begin_layout Itemize
12531 The 
12532 \begin_inset Flex Code
12533 status collapsed
12534
12535 \begin_layout Plain Layout
12536 Counter
12537 \end_layout
12538
12539 \end_inset
12540
12541  label type defines automatically numbered labels.
12542  The 
12543 \begin_inset Flex Code
12544 status collapsed
12545
12546 \begin_layout Plain Layout
12547 LabelString
12548 \end_layout
12549
12550 \end_inset
12551
12552  will be expanded to resolve any counter references it contains: For example,
12553  it might be 
12554 \begin_inset Quotes eld
12555 \end_inset
12556
12557
12558 \begin_inset Flex Code
12559 status collapsed
12560
12561 \begin_layout Plain Layout
12562 Section 
12563 \backslash
12564 thechapter.
12565 \backslash
12566 thesection
12567 \end_layout
12568
12569 \end_inset
12570
12571
12572 \begin_inset Quotes erd
12573 \end_inset
12574
12575 .
12576  See Section 
12577 \begin_inset CommandInset ref
12578 LatexCommand ref
12579 reference "sub:Counters"
12580
12581 \end_inset
12582
12583  for more information on counters.
12584 \end_layout
12585
12586 \begin_layout Itemize
12587 \begin_inset Flex Code
12588 status collapsed
12589
12590 \begin_layout Plain Layout
12591 Enumerate
12592 \end_layout
12593
12594 \end_inset
12595
12596  produces the usual sort of enumeration labels.
12597  At present, it is hardcoded to use Arabic numerals, lowercase letters,
12598  small Roman numerals, and uppercase letters for the four possible depths.
12599 \end_layout
12600
12601 \begin_layout Itemize
12602 \begin_inset Flex Code
12603 status collapsed
12604
12605 \begin_layout Plain Layout
12606 Itemize
12607 \end_layout
12608
12609 \end_inset
12610
12611  produces various bullets at the different levels.
12612  It is also hardcoded.
12613 \end_layout
12614
12615 \begin_layout Itemize
12616 \begin_inset Flex Code
12617 status collapsed
12618
12619 \begin_layout Plain Layout
12620 Bibliography
12621 \end_layout
12622
12623 \end_inset
12624
12625  is used internally by LyX and should be used only with 
12626 \begin_inset Flex Code
12627 status collapsed
12628
12629 \begin_layout Plain Layout
12630 LatexType BibEnvironment
12631 \end_layout
12632
12633 \end_inset
12634
12635 .
12636 \end_layout
12637
12638 \end_deeper
12639 \begin_layout Description
12640 \begin_inset Flex Code
12641 status collapsed
12642
12643 \begin_layout Plain Layout
12644 LangPreamble
12645 \end_layout
12646
12647 \end_inset
12648
12649  Note that this will completely override any prior 
12650 \begin_inset Flex Code
12651 status collapsed
12652
12653 \begin_layout Plain Layout
12654 LangPreamble
12655 \end_layout
12656
12657 \end_inset
12658
12659  declaration for this style.
12660  Must end with 
12661 \begin_inset Quotes eld
12662 \end_inset
12663
12664
12665 \begin_inset Flex Code
12666 status collapsed
12667
12668 \begin_layout Plain Layout
12669 EndLangPreamble
12670 \end_layout
12671
12672 \end_inset
12673
12674
12675 \begin_inset Quotes erd
12676 \end_inset
12677
12678 .
12679  See section 
12680 \begin_inset CommandInset ref
12681 LatexCommand ref
12682 reference "sub:I18n"
12683
12684 \end_inset
12685
12686  for details on its use.
12687 \end_layout
12688
12689 \begin_layout Description
12690 \begin_inset Flex Code
12691 status collapsed
12692
12693 \begin_layout Plain Layout
12694 LatexName
12695 \end_layout
12696
12697 \end_inset
12698
12699  The name of the corresponding LaTeX stuff.
12700  Either the environment or command name.
12701 \end_layout
12702
12703 \begin_layout Description
12704 \begin_inset Flex Code
12705 status collapsed
12706
12707 \begin_layout Plain Layout
12708 LatexParam
12709 \end_layout
12710
12711 \end_inset
12712
12713  An optional parameter for the corresponding 
12714 \begin_inset Flex Code
12715 status collapsed
12716
12717 \begin_layout Plain Layout
12718 LatexName
12719 \end_layout
12720
12721 \end_inset
12722
12723  stuff.
12724  This parameter cannot be changed from within LyX
12725 \change_inserted -712698321 1355144804
12726  (use 
12727 \begin_inset Flex Code
12728 status collapsed
12729
12730 \begin_layout Plain Layout
12731
12732 \change_inserted -712698321 1355144804
12733 Argument
12734 \end_layout
12735
12736 \end_inset
12737
12738  for customizable parameters)
12739 \change_unchanged
12740 .
12741
12742 \change_inserted -712698321 1355144804
12743  This will be output as is after all LaTeX 
12744 \begin_inset Flex Code
12745 status collapsed
12746
12747 \begin_layout Plain Layout
12748
12749 \change_inserted -712698321 1355144658
12750 Arguments
12751 \change_unchanged
12752
12753 \end_layout
12754
12755 \end_inset
12756
12757 .
12758 \change_unchanged
12759
12760 \end_layout
12761
12762 \begin_layout Description
12763 \begin_inset Flex Code
12764 status collapsed
12765
12766 \begin_layout Plain Layout
12767 LatexType
12768 \end_layout
12769
12770 \end_inset
12771
12772  [
12773 \begin_inset Flex Code
12774 status collapsed
12775
12776 \begin_layout Plain Layout
12777
12778 \emph on
12779 Paragraph
12780 \emph default
12781 , Command, Environment, Item_Environment,
12782 \end_layout
12783
12784 \end_inset
12785
12786  
12787 \begin_inset Flex Code
12788 status collapsed
12789
12790 \begin_layout Plain Layout
12791 List_Environment, Bib_Environment
12792 \end_layout
12793
12794 \end_inset
12795
12796 ] How the style should be translated into LaTeX.
12797 \begin_inset Foot
12798 status collapsed
12799
12800 \begin_layout Plain Layout
12801 \begin_inset Flex Code
12802 status collapsed
12803
12804 \begin_layout Plain Layout
12805 LatexType
12806 \end_layout
12807
12808 \end_inset
12809
12810  is perhaps a bit misleading, since these rules apply to SGML classes, too.
12811  Visit the SGML class files for specific examples.
12812 \end_layout
12813
12814 \end_inset
12815
12816
12817 \end_layout
12818
12819 \begin_deeper
12820 \begin_layout Itemize
12821 \begin_inset Flex Code
12822 status collapsed
12823
12824 \begin_layout Plain Layout
12825 Paragraph
12826 \end_layout
12827
12828 \end_inset
12829
12830  means nothing special.
12831  
12832 \end_layout
12833
12834 \begin_layout Itemize
12835 \begin_inset Flex Code
12836 status collapsed
12837
12838 \begin_layout Plain Layout
12839 Command
12840 \end_layout
12841
12842 \end_inset
12843
12844  means 
12845 \begin_inset Flex Code
12846 status collapsed
12847
12848 \begin_layout Plain Layout
12849
12850 \backslash
12851
12852 \emph on
12853 LatexName
12854 \emph default
12855 {\SpecialChar \ldots{}
12856 }
12857 \end_layout
12858
12859 \end_inset
12860
12861 .
12862 \end_layout
12863
12864 \begin_layout Itemize
12865 \begin_inset Flex Code
12866 status collapsed
12867
12868 \begin_layout Plain Layout
12869 Environment
12870 \end_layout
12871
12872 \end_inset
12873
12874  means 
12875 \begin_inset Flex Code
12876 status collapsed
12877
12878 \begin_layout Plain Layout
12879
12880 \backslash
12881 begin{
12882 \emph on
12883 LatexName
12884 \emph default
12885 }\SpecialChar \ldots{}
12886
12887 \backslash
12888 end{
12889 \emph on
12890 LatexName
12891 \emph default
12892 }
12893 \end_layout
12894
12895 \end_inset
12896
12897 .
12898  
12899 \end_layout
12900
12901 \begin_layout Itemize
12902 \begin_inset Flex Code
12903 status collapsed
12904
12905 \begin_layout Plain Layout
12906 Item_Environment
12907 \end_layout
12908
12909 \end_inset
12910
12911  is the same as 
12912 \begin_inset Flex Code
12913 status collapsed
12914
12915 \begin_layout Plain Layout
12916 Environment
12917 \end_layout
12918
12919 \end_inset
12920
12921 , except that an 
12922 \begin_inset Flex Code
12923 status collapsed
12924
12925 \begin_layout Plain Layout
12926
12927 \backslash
12928 item
12929 \end_layout
12930
12931 \end_inset
12932
12933  is generated for each paragraph of this environment.
12934  
12935 \end_layout
12936
12937 \begin_layout Itemize
12938 \begin_inset Flex Code
12939 status collapsed
12940
12941 \begin_layout Plain Layout
12942 List_Environment
12943 \end_layout
12944
12945 \end_inset
12946
12947  is the same as 
12948 \begin_inset Flex Code
12949 status collapsed
12950
12951 \begin_layout Plain Layout
12952 Item_Environment
12953 \end_layout
12954
12955 \end_inset
12956
12957 , except that 
12958 \begin_inset Flex Code
12959 status collapsed
12960
12961 \begin_layout Plain Layout
12962 LabelWidthString
12963 \end_layout
12964
12965 \end_inset
12966
12967  is passed as an argument to the environment.
12968  
12969 \begin_inset Flex Code
12970 status collapsed
12971
12972 \begin_layout Plain Layout
12973 LabelWidthString
12974 \end_layout
12975
12976 \end_inset
12977
12978  can be defined in the 
12979 \begin_inset Flex MenuItem
12980 status collapsed
12981
12982 \begin_layout Plain Layout
12983 Edit\SpecialChar \menuseparator
12984 Paragraph
12985 \begin_inset space ~
12986 \end_inset
12987
12988 settings
12989 \end_layout
12990
12991 \end_inset
12992
12993  dialog.
12994  
12995 \end_layout
12996
12997 \begin_layout Standard
12998 Putting the last few things together, the LaTeX output will be either: 
12999 \end_layout
13000
13001 \begin_layout LyX-Code
13002
13003 \backslash
13004 latexname[latexparam]{\SpecialChar \ldots{}
13005 }
13006 \end_layout
13007
13008 \begin_layout Standard
13009 or: 
13010 \end_layout
13011
13012 \begin_layout LyX-Code
13013
13014 \backslash
13015 begin{latexname}[latexparam] \SpecialChar \ldots{}
13016  
13017 \backslash
13018 end{latexname}.
13019 \end_layout
13020
13021 \begin_layout Standard
13022 depending upon the LaTeX type.
13023 \end_layout
13024
13025 \end_deeper
13026 \begin_layout Description
13027
13028 \change_inserted -712698321 1354263086
13029 \begin_inset Flex Code
13030 status collapsed
13031
13032 \begin_layout Plain Layout
13033
13034 \change_inserted -712698321 1353866852
13035 LeftDelim
13036 \end_layout
13037
13038 \end_inset
13039
13040  [
13041 \begin_inset Flex Code
13042 status collapsed
13043
13044 \begin_layout Plain Layout
13045
13046 \change_inserted -712698321 1353866852
13047 string
13048 \end_layout
13049
13050 \end_inset
13051
13052 ] A string that is put at the beginning of the style content.
13053  A line break in the output can be indicated by 
13054 \begin_inset Flex Code
13055 status collapsed
13056
13057 \begin_layout Plain Layout
13058
13059 \change_inserted -712698321 1354263086
13060 <br/>
13061 \end_layout
13062
13063 \end_inset
13064
13065 .
13066 \change_unchanged
13067
13068 \end_layout
13069
13070 \begin_layout Description
13071 \begin_inset Flex Code
13072 status collapsed
13073
13074 \begin_layout Plain Layout
13075 LeftMargin
13076 \end_layout
13077
13078 \end_inset
13079
13080  [
13081 \begin_inset Flex Code
13082 status collapsed
13083
13084 \begin_layout Plain Layout
13085 string=""
13086 \end_layout
13087
13088 \end_inset
13089
13090 ] If you put styles into environments, the leftmargins are not simply added,
13091  but added with a factor 
13092 \begin_inset Formula $\frac{4}{depth+4}$
13093 \end_inset
13094
13095 .
13096  Note that this parameter is also used when the margin is defined as 
13097 \begin_inset Flex Code
13098 status collapsed
13099
13100 \begin_layout Plain Layout
13101 Manual
13102 \end_layout
13103
13104 \end_inset
13105
13106  or 
13107 \begin_inset Flex Code
13108 status collapsed
13109
13110 \begin_layout Plain Layout
13111 Dynamic
13112 \end_layout
13113
13114 \end_inset
13115
13116 .
13117  Then it is added to the manual or dynamic margin.
13118  
13119 \begin_inset Newline newline
13120 \end_inset
13121
13122 The argument is passed as a string.
13123  For example 
13124 \begin_inset Quotes eld
13125 \end_inset
13126
13127
13128 \begin_inset Flex Code
13129 status collapsed
13130
13131 \begin_layout Plain Layout
13132 MM
13133 \end_layout
13134
13135 \end_inset
13136
13137
13138 \begin_inset Quotes erd
13139 \end_inset
13140
13141  means that the paragraph is indented with the width of 
13142 \begin_inset Quotes eld
13143 \end_inset
13144
13145
13146 \begin_inset Flex Code
13147 status collapsed
13148
13149 \begin_layout Plain Layout
13150 MM
13151 \end_layout
13152
13153 \end_inset
13154
13155
13156 \begin_inset Quotes erd
13157 \end_inset
13158
13159  in the normal font.
13160  You can get a negative width by prefixing the string with 
13161 \begin_inset Quotes eld
13162 \end_inset
13163
13164
13165 \begin_inset Flex Code
13166 status collapsed
13167
13168 \begin_layout Plain Layout
13169 -
13170 \end_layout
13171
13172 \end_inset
13173
13174
13175 \begin_inset Quotes erd
13176 \end_inset
13177
13178 .
13179  This way was chosen so that the look is the same with each used screen
13180  font.
13181  
13182 \end_layout
13183
13184 \begin_layout Description
13185 \begin_inset Flex Code
13186 status collapsed
13187
13188 \begin_layout Plain Layout
13189 Margin
13190 \end_layout
13191
13192 \end_inset
13193
13194  [
13195 \begin_inset Flex Code
13196 status collapsed
13197
13198 \begin_layout Plain Layout
13199
13200 \emph on
13201 Static
13202 \emph default
13203 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13204 \end_layout
13205
13206 \end_inset
13207
13208
13209 \begin_inset Newline newline
13210 \end_inset
13211
13212 The kind of margin that the style has on the left side.
13213  
13214 \begin_inset Flex Code
13215 status collapsed
13216
13217 \begin_layout Plain Layout
13218 Static
13219 \end_layout
13220
13221 \end_inset
13222
13223  just means a fixed margin.
13224  
13225 \begin_inset Flex Code
13226 status collapsed
13227
13228 \begin_layout Plain Layout
13229 Manual
13230 \end_layout
13231
13232 \end_inset
13233
13234  means that the left margin depends on the string entered in the 
13235 \begin_inset Flex MenuItem
13236 status collapsed
13237
13238 \begin_layout Plain Layout
13239 Edit\SpecialChar \menuseparator
13240 Paragraph
13241 \begin_inset space ~
13242 \end_inset
13243
13244 Settings
13245 \end_layout
13246
13247 \end_inset
13248
13249  dialog.
13250  This is used to typeset nice lists without tabulators.
13251  
13252 \begin_inset Flex Code
13253 status collapsed
13254
13255 \begin_layout Plain Layout
13256 Dynamic
13257 \end_layout
13258
13259 \end_inset
13260
13261  means that the margin depends on the size of the label.
13262  This is used for automatic enumerated headlines.
13263  It is obvious that the headline 
13264 \begin_inset Quotes eld
13265 \end_inset
13266
13267 5.4.3.2.1 Very long headline
13268 \begin_inset Quotes erd
13269 \end_inset
13270
13271  must have a wider left margin (as wide as 
13272 \begin_inset Quotes eld
13273 \end_inset
13274
13275 5.4.3.2.1
13276 \begin_inset Quotes erd
13277 \end_inset
13278
13279  plus the space) than 
13280 \begin_inset Quotes eld
13281 \end_inset
13282
13283 3.2 Very long headline
13284 \begin_inset Quotes erd
13285 \end_inset
13286
13287 , even if standard 
13288 \begin_inset Quotes eld
13289 \end_inset
13290
13291 word processors
13292 \begin_inset Quotes erd
13293 \end_inset
13294
13295  are not able to do this.
13296  
13297 \begin_inset Flex Code
13298 status collapsed
13299
13300 \begin_layout Plain Layout
13301 First_Dynamic
13302 \end_layout
13303
13304 \end_inset
13305
13306  is similar, but only the very first row of the paragraph is dynamic, while
13307  the others are static; this is used, for example, for descriptions.
13308  
13309 \begin_inset Flex Code
13310 status collapsed
13311
13312 \begin_layout Plain Layout
13313 Right_Address_Box
13314 \end_layout
13315
13316 \end_inset
13317
13318  means the margin is chosen in a way that the longest row of this paragraph
13319  fits to the right margin.
13320  This is used to typeset an address on the right edge of the page.
13321 \end_layout
13322
13323 \begin_layout Description
13324 \begin_inset Flex Code
13325 status collapsed
13326
13327 \begin_layout Plain Layout
13328 NeedProtect
13329 \end_layout
13330
13331 \end_inset
13332
13333  [
13334 \begin_inset Flex Code
13335 status collapsed
13336
13337 \begin_layout Plain Layout
13338
13339 \emph on
13340 0
13341 \end_layout
13342
13343 \end_inset
13344
13345 ,
13346 \begin_inset Flex Code
13347 status collapsed
13348
13349 \begin_layout Plain Layout
13350 1
13351 \end_layout
13352
13353 \end_inset
13354
13355 ] Whether fragile commands in this style should be 
13356 \begin_inset Flex Code
13357 status collapsed
13358
13359 \begin_layout Plain Layout
13360
13361 \backslash
13362 protect
13363 \end_layout
13364
13365 \end_inset
13366
13367 'ed.
13368  (Note: This is 
13369 \emph on
13370 not
13371 \emph default
13372  whether this command should itself be protected.)
13373 \end_layout
13374
13375 \begin_layout Description
13376 \begin_inset Flex Code
13377 status collapsed
13378
13379 \begin_layout Plain Layout
13380 Newline
13381 \end_layout
13382
13383 \end_inset
13384
13385  [
13386 \begin_inset Flex Code
13387 status collapsed
13388
13389 \begin_layout Plain Layout
13390 0
13391 \end_layout
13392
13393 \end_inset
13394
13395
13396 \begin_inset Flex Code
13397 status collapsed
13398
13399 \begin_layout Plain Layout
13400
13401 \emph on
13402 1
13403 \end_layout
13404
13405 \end_inset
13406
13407 ] Whether newlines are translated into LaTeX newlines (
13408 \begin_inset Flex Code
13409 status collapsed
13410
13411 \begin_layout Plain Layout
13412
13413 \backslash
13414
13415 \backslash
13416
13417 \end_layout
13418
13419 \end_inset
13420
13421 ) or not.
13422  The translation can be switched off to allow more comfortable LaTeX editing
13423  inside LyX.
13424 \end_layout
13425
13426 \begin_layout Description
13427 \begin_inset Flex Code
13428 status collapsed
13429
13430 \begin_layout Plain Layout
13431 NextNoIndent
13432 \end_layout
13433
13434 \end_inset
13435
13436  [
13437 \begin_inset Flex Code
13438 status collapsed
13439
13440 \begin_layout Plain Layout
13441 1
13442 \end_layout
13443
13444 \end_inset
13445
13446
13447 \begin_inset Flex Code
13448 status collapsed
13449
13450 \begin_layout Plain Layout
13451
13452 \emph on
13453 0
13454 \end_layout
13455
13456 \end_inset
13457
13458 ] If set to true, and if 
13459 \begin_inset Flex Code
13460 status collapsed
13461
13462 \begin_layout Plain Layout
13463 DefaultStyle
13464 \end_layout
13465
13466 \end_inset
13467
13468  (usually 
13469 \begin_inset Flex Code
13470 status collapsed
13471
13472 \begin_layout Plain Layout
13473 Standard
13474 \end_layout
13475
13476 \end_inset
13477
13478 ) paragraphs are being indented, then the indentation of such a paragraph
13479  following one of this type will be suppressed.
13480  (So this will not affect the display of non-default paragraphs.)
13481 \end_layout
13482
13483 \begin_layout Description
13484 \begin_inset Flex Code
13485 status collapsed
13486
13487 \begin_layout Plain Layout
13488 ObsoletedBy
13489 \end_layout
13490
13491 \end_inset
13492
13493  Name of a style that has replaced this style.
13494  This is used to rename a style, while keeping backward compatibility.
13495 \end_layout
13496
13497 \begin_layout Description
13498
13499 \change_deleted -712698321 1353679722
13500 \begin_inset Flex Code
13501 status collapsed
13502
13503 \begin_layout Plain Layout
13504 OptionalArgs
13505 \end_layout
13506
13507 \end_inset
13508
13509  [
13510 \begin_inset Flex Code
13511 status collapsed
13512
13513 \begin_layout Plain Layout
13514 int=0
13515 \end_layout
13516
13517 \end_inset
13518
13519 ] The number of optional arguments that can be used with this style.
13520  This is useful for things like section headings, and only makes sense with
13521  LaTeX.
13522  Note that, on output, the optional arguments will all precede any required
13523  arguments (see below).
13524  So one can have constructs like:
13525 \end_layout
13526
13527 \begin_deeper
13528 \begin_layout LyX-Code
13529
13530 \change_deleted -712698321 1353679722
13531
13532 \backslash
13533 mycmd[opt1]{req1}{contents of paragraph}
13534 \end_layout
13535
13536 \begin_layout Standard
13537
13538 \change_deleted -712698321 1353679722
13539 but one cannot have things like: 
13540 \end_layout
13541
13542 \begin_layout LyX-Code
13543
13544 \change_deleted -712698321 1353679722
13545
13546 \backslash
13547 mycmd[opt1]{req1}[opt2]{contents of paragraph}
13548 \end_layout
13549
13550 \begin_layout Standard
13551
13552 \change_deleted -712698321 1353679722
13553 at least, not without ERT (with which you can have anything).
13554  
13555 \change_unchanged
13556
13557 \end_layout
13558
13559 \end_deeper
13560 \begin_layout Description
13561 \begin_inset Flex Code
13562 status collapsed
13563
13564 \begin_layout Plain Layout
13565 ParbreakIsNewline
13566 \end_layout
13567
13568 \end_inset
13569
13570  [
13571 \begin_inset Flex Code
13572 status collapsed
13573
13574 \begin_layout Plain Layout
13575
13576 \emph on
13577 0
13578 \end_layout
13579
13580 \end_inset
13581
13582
13583 \begin_inset Flex Code
13584 status collapsed
13585
13586 \begin_layout Plain Layout
13587 1
13588 \end_layout
13589
13590 \end_inset
13591
13592 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
13593  output, but only by a line break; together with 
13594 \begin_inset Flex Code
13595 status collapsed
13596
13597 \begin_layout Plain Layout
13598 PassThru 1
13599 \end_layout
13600
13601 \end_inset
13602
13603 , this allows to emulate a plain text editor (like the ERT inset).
13604 \end_layout
13605
13606 \begin_layout Description
13607 \begin_inset Flex Code
13608 status collapsed
13609
13610 \begin_layout Plain Layout
13611 ParIndent
13612 \end_layout
13613
13614 \end_inset
13615
13616  [
13617 \begin_inset Flex Code
13618 status collapsed
13619
13620 \begin_layout Plain Layout
13621 string=""
13622 \end_layout
13623
13624 \end_inset
13625
13626 ] The indent of the very first line of a paragraph.
13627  The 
13628 \begin_inset Flex Code
13629 status collapsed
13630
13631 \begin_layout Plain Layout
13632 Parindent
13633 \end_layout
13634
13635 \end_inset
13636
13637  will be fixed for a certain style.
13638  The exception is the default style, since the indentation for these paragraphs
13639  can be prohibited with 
13640 \begin_inset Flex Code
13641 status collapsed
13642
13643 \begin_layout Plain Layout
13644 NextNoIndent
13645 \end_layout
13646
13647 \end_inset
13648
13649 .
13650  Also, 
13651 \begin_inset Flex Code
13652 status collapsed
13653
13654 \begin_layout Plain Layout
13655 Standard
13656 \end_layout
13657
13658 \end_inset
13659
13660  style paragraphs inside environments use the 
13661 \begin_inset Flex Code
13662 status collapsed
13663
13664 \begin_layout Plain Layout
13665 Parindent
13666 \end_layout
13667
13668 \end_inset
13669
13670  of the environment, not their native one.
13671  For example, 
13672 \begin_inset Flex Code
13673 status collapsed
13674
13675 \begin_layout Plain Layout
13676 Standard
13677 \end_layout
13678
13679 \end_inset
13680
13681  paragraphs inside an enumeration are not indented.
13682 \end_layout
13683
13684 \begin_layout Description
13685 \begin_inset Flex Code
13686 status collapsed
13687
13688 \begin_layout Plain Layout
13689 Parsep
13690 \end_layout
13691
13692 \end_inset
13693
13694  [
13695 \begin_inset Flex Code
13696 status collapsed
13697
13698 \begin_layout Plain Layout
13699 float=0
13700 \end_layout
13701
13702 \end_inset
13703
13704 ] The vertical space between two paragraphs of this style.
13705 \end_layout
13706
13707 \begin_layout Description
13708 \begin_inset Flex Code
13709 status collapsed
13710
13711 \begin_layout Plain Layout
13712 Parskip
13713 \end_layout
13714
13715 \end_inset
13716
13717  [
13718 \begin_inset Flex Code
13719 status collapsed
13720
13721 \begin_layout Plain Layout
13722 float=0
13723 \end_layout
13724
13725 \end_inset
13726
13727 ] LyX allows the user to choose either 
13728 \begin_inset Quotes eld
13729 \end_inset
13730
13731 indent
13732 \begin_inset Quotes erd
13733 \end_inset
13734
13735  or 
13736 \begin_inset Quotes eld
13737 \end_inset
13738
13739 skip
13740 \begin_inset Quotes erd
13741 \end_inset
13742
13743  to typeset a document.
13744  When 
13745 \begin_inset Quotes eld
13746 \end_inset
13747
13748 indent
13749 \begin_inset Quotes erd
13750 \end_inset
13751
13752  is chosen, this value is completely ignored.
13753  When 
13754 \begin_inset Quotes eld
13755 \end_inset
13756
13757 skip
13758 \begin_inset Quotes erd
13759 \end_inset
13760
13761  is chosen, the parindent of a LaTeXtype 
13762 \begin_inset Quotes eld
13763 \end_inset
13764
13765 Paragraph
13766 \begin_inset Quotes erd
13767 \end_inset
13768
13769  style is ignored and all paragraphs are separated by this parskip argument.
13770  The vertical space is calculated with 
13771 \begin_inset Flex Code
13772 status collapsed
13773
13774 \begin_layout Plain Layout
13775 value
13776 \begin_inset space ~
13777 \end_inset
13778
13779 * DefaultHeight
13780 \end_layout
13781
13782 \end_inset
13783
13784  where 
13785 \begin_inset Flex Code
13786 status collapsed
13787
13788 \begin_layout Plain Layout
13789 DefaultHeight
13790 \end_layout
13791
13792 \end_inset
13793
13794  is the height of a row with the normal font.
13795  This way, the look stays the same with different screen fonts.
13796 \end_layout
13797
13798 \begin_layout Description
13799 \begin_inset Flex Code
13800 status collapsed
13801
13802 \begin_layout Plain Layout
13803 PassThru
13804 \end_layout
13805
13806 \end_inset
13807
13808  [
13809 \begin_inset Flex Code
13810 status collapsed
13811
13812 \begin_layout Plain Layout
13813
13814 \emph on
13815 0
13816 \end_layout
13817
13818 \end_inset
13819
13820
13821 \begin_inset Flex Code
13822 status collapsed
13823
13824 \begin_layout Plain Layout
13825 1
13826 \end_layout
13827
13828 \end_inset
13829
13830 ] Whether the contents of this paragraph should be output in raw form, meaning
13831  without special translations that LaTeX would require.
13832 \end_layout
13833
13834 \begin_layout Description
13835 \begin_inset Flex Code
13836 status collapsed
13837
13838 \begin_layout Plain Layout
13839 Preamble
13840 \end_layout
13841
13842 \end_inset
13843
13844  Information to be included in the LaTeX preamble when this style is used.
13845  Used to define macros, load packages, etc., required by this particular
13846  style.
13847  Must end with 
13848 \begin_inset Quotes eld
13849 \end_inset
13850
13851
13852 \begin_inset Flex Code
13853 status collapsed
13854
13855 \begin_layout Plain Layout
13856 EndPreamble
13857 \end_layout
13858
13859 \end_inset
13860
13861
13862 \begin_inset Quotes erd
13863 \end_inset
13864
13865 .
13866 \end_layout
13867
13868 \begin_layout Description
13869 \begin_inset Flex Code
13870 status collapsed
13871
13872 \begin_layout Plain Layout
13873 RefPrefix
13874 \end_layout
13875
13876 \end_inset
13877
13878  [
13879 \begin_inset Flex Code
13880 status collapsed
13881
13882 \begin_layout Plain Layout
13883 string
13884 \end_layout
13885
13886 \end_inset
13887
13888 ] The prefix to use when creating labels referring to paragraphs of this
13889  type.
13890  This allows the use of formatted references.
13891 \end_layout
13892
13893 \begin_layout Description
13894
13895 \change_deleted -712698321 1353681258
13896 \begin_inset Flex Code
13897 status collapsed
13898
13899 \begin_layout Plain Layout
13900 RequiredArgs
13901 \end_layout
13902
13903 \end_inset
13904
13905  [
13906 \begin_inset Flex Code
13907 status collapsed
13908
13909 \begin_layout Plain Layout
13910 int=0
13911 \end_layout
13912
13913 \end_inset
13914
13915 ] The number of required arguments that the LaTeX command or environment
13916  corresponding to this style expects.
13917  In the case of a command, these are required arguments 
13918 \emph on
13919 other than
13920 \emph default
13921  that associated with the content of the paragraph itself.
13922  These do not actually have to be provided: LyX will output empty arguments
13923  if necessary.
13924  Note that optional arguments will be output before required arguments.
13925  See the discussion of the 
13926 \begin_inset Flex Code
13927 status collapsed
13928
13929 \begin_layout Plain Layout
13930 OptionalArgs
13931 \end_layout
13932
13933 \end_inset
13934
13935  tag above for more information.
13936 \change_unchanged
13937
13938 \end_layout
13939
13940 \begin_layout Description
13941 \begin_inset Flex Code
13942 status collapsed
13943
13944 \begin_layout Plain Layout
13945 Requires 
13946 \end_layout
13947
13948 \end_inset
13949
13950  [
13951 \begin_inset Flex Code
13952 status collapsed
13953
13954 \begin_layout Plain Layout
13955 string
13956 \end_layout
13957
13958 \end_inset
13959
13960 ] Whether the style requires the feature 
13961 \begin_inset Flex Code
13962 status collapsed
13963
13964 \begin_layout Plain Layout
13965 string
13966 \end_layout
13967
13968 \end_inset
13969
13970 .
13971  See the description of 
13972 \begin_inset Flex Code
13973 status collapsed
13974
13975 \begin_layout Plain Layout
13976 Provides
13977 \end_layout
13978
13979 \end_inset
13980
13981  above (page 
13982 \begin_inset CommandInset ref
13983 LatexCommand pageref
13984 reference "des:FreeSpacing"
13985
13986 \end_inset
13987
13988 ) for information on `features'.
13989  
13990 \change_inserted -712698321 1353693134
13991
13992 \end_layout
13993
13994 \begin_layout Description
13995
13996 \change_inserted -712698321 1353693371
13997 \begin_inset Flex Code
13998 status collapsed
13999
14000 \begin_layout Plain Layout
14001
14002 \change_inserted -712698321 1353693146
14003 ResetArgs
14004 \change_unchanged
14005
14006 \end_layout
14007
14008 \end_inset
14009
14010  [
14011 \begin_inset Flex Code
14012 status collapsed
14013
14014 \begin_layout Plain Layout
14015
14016 \change_inserted -712698321 1353693235
14017
14018 \emph on
14019 0
14020 \end_layout
14021
14022 \end_inset
14023
14024 ,
14025 \begin_inset Flex Code
14026 status collapsed
14027
14028 \begin_layout Plain Layout
14029
14030 \change_inserted -712698321 1353693235
14031 1
14032 \end_layout
14033
14034 \end_inset
14035
14036 ] Resets the LaTeX arguments of this style (as defined via the 
14037 \begin_inset Flex Code
14038 status collapsed
14039
14040 \begin_layout Plain Layout
14041
14042 \change_inserted -712698321 1353693371
14043 Argument
14044 \change_unchanged
14045
14046 \end_layout
14047
14048 \end_inset
14049
14050  tag).
14051  This is useful if you have copied a style via 
14052 \begin_inset Flex Code
14053 status collapsed
14054
14055 \begin_layout Plain Layout
14056
14057 \change_inserted -712698321 1353693302
14058 CopyStyle
14059 \change_unchanged
14060
14061 \end_layout
14062
14063 \end_inset
14064
14065 , but you do not want to inherit its (required and optional) arguments.
14066 \change_unchanged
14067
14068 \end_layout
14069
14070 \begin_layout Description
14071
14072 \change_inserted -712698321 1354263074
14073 \begin_inset Flex Code
14074 status collapsed
14075
14076 \begin_layout Plain Layout
14077
14078 \change_inserted -712698321 1353866876
14079 RightDelim
14080 \end_layout
14081
14082 \end_inset
14083
14084  [
14085 \begin_inset Flex Code
14086 status collapsed
14087
14088 \begin_layout Plain Layout
14089
14090 \change_inserted -712698321 1353866873
14091 string
14092 \end_layout
14093
14094 \end_inset
14095
14096 ] A string that is put at the end of the layout content.
14097  A line break in the output can be indicated by 
14098 \begin_inset Flex Code
14099 status collapsed
14100
14101 \begin_layout Plain Layout
14102
14103 \change_inserted -712698321 1354263069
14104 <br/>
14105 \change_unchanged
14106
14107 \end_layout
14108
14109 \end_inset
14110
14111 .
14112 \end_layout
14113
14114 \begin_layout Description
14115 \begin_inset Flex Code
14116 status collapsed
14117
14118 \begin_layout Plain Layout
14119 RightMargin
14120 \end_layout
14121
14122 \end_inset
14123
14124  [
14125 \begin_inset Flex Code
14126 status collapsed
14127
14128 \begin_layout Plain Layout
14129 string=""
14130 \end_layout
14131
14132 \end_inset
14133
14134 ] Similar to 
14135 \begin_inset Flex Code
14136 status collapsed
14137
14138 \begin_layout Plain Layout
14139 LeftMargin
14140 \end_layout
14141
14142 \end_inset
14143
14144 .
14145 \end_layout
14146
14147 \begin_layout Description
14148 \begin_inset Flex Code
14149 status collapsed
14150
14151 \begin_layout Plain Layout
14152 Spacing
14153 \end_layout
14154
14155 \end_inset
14156
14157  [
14158 \begin_inset Flex Code
14159 status collapsed
14160
14161 \begin_layout Plain Layout
14162
14163 \emph on
14164 single
14165 \emph default
14166 , onehalf, double, other
14167 \end_layout
14168
14169 \end_inset
14170
14171  
14172 \emph on
14173 value
14174 \emph default
14175 ] This defines what the default spacing should be in the style.
14176  The arguments 
14177 \begin_inset Flex Code
14178 status collapsed
14179
14180 \begin_layout Plain Layout
14181 single
14182 \end_layout
14183
14184 \end_inset
14185
14186
14187 \begin_inset Flex Code
14188 status collapsed
14189
14190 \begin_layout Plain Layout
14191 onehalf
14192 \end_layout
14193
14194 \end_inset
14195
14196  and 
14197 \begin_inset Flex Code
14198 status collapsed
14199
14200 \begin_layout Plain Layout
14201 double
14202 \end_layout
14203
14204 \end_inset
14205
14206  correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14207  If you specify the argument 
14208 \begin_inset Flex Code
14209 status collapsed
14210
14211 \begin_layout Plain Layout
14212 other
14213 \end_layout
14214
14215 \end_inset
14216
14217 , then you should also provide a numerical argument which will be the actual
14218  multiplier value.
14219  Note that, contrary to other parameters, 
14220 \begin_inset Flex Code
14221 status collapsed
14222
14223 \begin_layout Plain Layout
14224 Spacing
14225 \end_layout
14226
14227 \end_inset
14228
14229  implies the generation of specific LaTeX code, using the package 
14230 \family roman
14231
14232 \begin_inset Flex Code
14233 status collapsed
14234
14235 \begin_layout Plain Layout
14236 setspace.sty
14237 \end_layout
14238
14239 \end_inset
14240
14241 .
14242 \end_layout
14243
14244 \begin_layout Description
14245 \begin_inset Flex Code
14246 status collapsed
14247
14248 \begin_layout Plain Layout
14249 Spellcheck
14250 \end_layout
14251
14252 \end_inset
14253
14254  [
14255 \begin_inset Flex Code
14256 status collapsed
14257
14258 \begin_layout Plain Layout
14259 0
14260 \end_layout
14261
14262 \end_inset
14263
14264 ,
14265 \begin_inset Flex Code
14266 status collapsed
14267
14268 \begin_layout Plain Layout
14269
14270 \emph on
14271 1
14272 \end_layout
14273
14274 \end_inset
14275
14276 ] Spellcheck paragraphs of this style.
14277  Default is true.
14278 \end_layout
14279
14280 \begin_layout Description
14281 \begin_inset Flex Code
14282 status collapsed
14283
14284 \begin_layout Plain Layout
14285 TextFont
14286 \end_layout
14287
14288 \end_inset
14289
14290  The font used for the text body .
14291  See section 
14292 \begin_inset CommandInset ref
14293 LatexCommand ref
14294 reference "sub:Font-description"
14295
14296 \end_inset
14297
14298 .
14299 \end_layout
14300
14301 \begin_layout Description
14302 \begin_inset Flex Code
14303 status collapsed
14304
14305 \begin_layout Plain Layout
14306 TocLevel
14307 \end_layout
14308
14309 \end_inset
14310
14311
14312 \series medium
14313  
14314 \begin_inset Flex Code
14315 status collapsed
14316
14317 \begin_layout Plain Layout
14318
14319 \series medium
14320 [int]
14321 \end_layout
14322
14323 \end_inset
14324
14325
14326 \series default
14327  The level of the style in the table of contents.
14328  This is used for automatic numbering of section headings.
14329 \end_layout
14330
14331 \begin_layout Description
14332 \begin_inset Flex Code
14333 status collapsed
14334
14335 \begin_layout Plain Layout
14336 TopSep
14337 \end_layout
14338
14339 \end_inset
14340
14341  [
14342 \begin_inset Flex Code
14343 status collapsed
14344
14345 \begin_layout Plain Layout
14346 float=0
14347 \end_layout
14348
14349 \end_inset
14350
14351 ] The vertical space with which the very first of a chain of paragraphs
14352  with this style is separated from the previous paragraph.
14353  If the previous paragraph has another style, the separations are not simply
14354  added, but the maximum is taken.
14355 \end_layout
14356
14357 \begin_layout Subsection
14358 \begin_inset CommandInset label
14359 LatexCommand label
14360 name "sub:I18n"
14361
14362 \end_inset
14363
14364 Internationalization of Paragraph Styles
14365 \end_layout
14366
14367 \begin_layout Standard
14368 LyX has long supported internationalization of layout information, but,
14369  until version 2.0, this applied only to the user interface and not to, say,
14370  PDF output.
14371  Thus, French authors were forced to resort to ugly hacks if they wanted
14372  `
14373 \lang french
14374 Théorème
14375 \lang english
14376  1' instead of `Theorem 1'.
14377  Thanks to Georg Baum, that is no longer the case.
14378 \end_layout
14379
14380 \begin_layout Standard
14381 If a 
14382 \begin_inset Flex Code
14383 status collapsed
14384
14385 \begin_layout Plain Layout
14386 Style
14387 \end_layout
14388
14389 \end_inset
14390
14391  defines text that is to appear in the typeset document, it may use 
14392 \begin_inset Flex Code
14393 status collapsed
14394
14395 \begin_layout Plain Layout
14396 LangPreamble
14397 \end_layout
14398
14399 \end_inset
14400
14401  and 
14402 \begin_inset Flex Code
14403 status collapsed
14404
14405 \begin_layout Plain Layout
14406 BabelPreamble
14407 \end_layout
14408
14409 \end_inset
14410
14411  to support non-English and even multi-language documents correctly.
14412  The following excerpt (from the 
14413 \begin_inset Flex Code
14414 status collapsed
14415
14416 \begin_layout Plain Layout
14417 theorems-ams.inc
14418 \end_layout
14419
14420 \end_inset
14421
14422  file) shows how this works:
14423 \end_layout
14424
14425 \begin_layout LyX-Code
14426 Preamble
14427 \end_layout
14428
14429 \begin_deeper
14430 \begin_layout LyX-Code
14431   
14432 \backslash
14433 theoremstyle{remark}
14434 \end_layout
14435
14436 \begin_layout LyX-Code
14437   
14438 \backslash
14439 newtheorem{claim}[thm]{
14440 \backslash
14441 protect
14442 \backslash
14443 claimname}
14444 \end_layout
14445
14446 \begin_layout LyX-Code
14447 EndPreamble
14448 \end_layout
14449
14450 \begin_layout LyX-Code
14451 LangPreamble
14452 \end_layout
14453
14454 \begin_layout LyX-Code
14455   
14456 \backslash
14457 providecommand{
14458 \backslash
14459 claimname}{_(Claim)}
14460 \end_layout
14461
14462 \begin_layout LyX-Code
14463 EndLangPreamble
14464 \end_layout
14465
14466 \begin_layout LyX-Code
14467 BabelPreamble
14468 \end_layout
14469
14470 \begin_layout LyX-Code
14471     
14472 \backslash
14473 addto
14474 \backslash
14475 captions$$lang{
14476 \backslash
14477 renewcommand{
14478 \backslash
14479 claimname}{_(Claim)}}
14480 \end_layout
14481
14482 \begin_layout LyX-Code
14483 EndBabelPreamble
14484 \end_layout
14485
14486 \end_deeper
14487 \begin_layout Standard
14488 In principle, any legal LaTeX may appear in the 
14489 \begin_inset Flex Code
14490 status collapsed
14491
14492 \begin_layout Plain Layout
14493 LangPreamble
14494 \end_layout
14495
14496 \end_inset
14497
14498  and 
14499 \begin_inset Flex Code
14500 status collapsed
14501
14502 \begin_layout Plain Layout
14503 BabelPreamble
14504 \end_layout
14505
14506 \end_inset
14507
14508  tags, but in practice they will typically look as they do here.
14509  The key to correct translation of the typeset text is the definition of
14510  the LaTeX command 
14511 \begin_inset Flex Code
14512 status collapsed
14513
14514 \begin_layout Plain Layout
14515
14516 \backslash
14517 claimname
14518 \end_layout
14519
14520 \end_inset
14521
14522  and its use in 
14523 \begin_inset Flex Code
14524 status collapsed
14525
14526 \begin_layout Plain Layout
14527
14528 \backslash
14529 newtheorem
14530 \end_layout
14531
14532 \end_inset
14533
14534 .
14535  
14536 \end_layout
14537
14538 \begin_layout Standard
14539 The 
14540 \begin_inset Flex Code
14541 status collapsed
14542
14543 \begin_layout Plain Layout
14544 LangPreamble
14545 \end_layout
14546
14547 \end_inset
14548
14549  tag provides for internationalization based upon the overall language of
14550  the document.
14551  The contents of the tag will be included in the preamble, just as with
14552  the 
14553 \begin_inset Flex Code
14554 status collapsed
14555
14556 \begin_layout Plain Layout
14557 Preamble
14558 \end_layout
14559
14560 \end_inset
14561
14562  tag.
14563  What makes it special is the use of the 
14564 \begin_inset Quotes eld
14565 \end_inset
14566
14567 function
14568 \begin_inset Quotes erd
14569 \end_inset
14570
14571  
14572 \begin_inset Flex Code
14573 status collapsed
14574
14575 \begin_layout Plain Layout
14576 _()
14577 \end_layout
14578
14579 \end_inset
14580
14581 , which will be replaced, when LyX produces LaTeX output, with the translation
14582  of its argument into the document language.
14583 \end_layout
14584
14585 \begin_layout Standard
14586 The 
14587 \begin_inset Flex Code
14588 status collapsed
14589
14590 \begin_layout Plain Layout
14591 BabelPreamble
14592 \end_layout
14593
14594 \end_inset
14595
14596  tag is more complex, since it is meant to provide support for multi-language
14597  documents and so offers an interface to the 
14598 \begin_inset Flex Code
14599 status collapsed
14600
14601 \begin_layout Plain Layout
14602 babel
14603 \end_layout
14604
14605 \end_inset
14606
14607  package.
14608  Its contents will be added to the preamble once for each language that
14609  appears in the document.
14610  In this case, the argument to 
14611 \begin_inset Flex Code
14612 status collapsed
14613
14614 \begin_layout Plain Layout
14615 _()
14616 \end_layout
14617
14618 \end_inset
14619
14620  will be replaced with its translation into the language in question; the
14621  expression 
14622 \begin_inset Flex Code
14623 status collapsed
14624
14625 \begin_layout Plain Layout
14626 $$lang
14627 \end_layout
14628
14629 \end_inset
14630
14631  is replaced by the language name (as used by the babel package).
14632 \end_layout
14633
14634 \begin_layout Standard
14635 A German document that also included a French section would thus have the
14636  following in the preamble:
14637 \end_layout
14638
14639 \begin_layout LyX-Code
14640
14641 \backslash
14642 addto
14643 \backslash
14644 captionsfrench{
14645 \backslash
14646 renewcommand{
14647 \backslash
14648 claimname}{Affirmation}}   
14649 \backslash
14650 addto
14651 \backslash
14652 captionsngerman{
14653 \backslash
14654 renewcommand{
14655 \backslash
14656 claimname}{Behauptung}}   
14657 \backslash
14658 providecommand{
14659 \backslash
14660 claimname}{Behauptung}
14661 \end_layout
14662
14663 \begin_layout Standard
14664 LaTeX and 
14665 \begin_inset Flex Code
14666 status collapsed
14667
14668 \begin_layout Plain Layout
14669 babel
14670 \end_layout
14671
14672 \end_inset
14673
14674  will then conspire to produce the correct text in the output.
14675 \end_layout
14676
14677 \begin_layout Standard
14678 One important point to note here is that the translations are provided by
14679  LyX itself, through the 
14680 \change_inserted -195340706 1334775793
14681 file 
14682 \begin_inset Flex Code
14683 status collapsed
14684
14685 \begin_layout Plain Layout
14686
14687 \change_inserted -195340706 1334775793
14688 layouttranslations
14689 \end_layout
14690
14691 \end_inset
14692
14693
14694 \change_deleted -195340706 1334775793
14695 same mechanism it uses for internationalization of the user interface
14696 \change_unchanged
14697 .
14698  This means, in effect, that 
14699 \begin_inset Flex Code
14700 status collapsed
14701
14702 \begin_layout Plain Layout
14703 LangPreamble
14704 \end_layout
14705
14706 \end_inset
14707
14708  and 
14709 \begin_inset Flex Code
14710 status collapsed
14711
14712 \begin_layout Plain Layout
14713 BabelPreamble
14714 \end_layout
14715
14716 \end_inset
14717
14718  are really only of use in layout files that are provided with LyX, since
14719  text entered in user-created layout files will not be seen by LyX's internation
14720 alization routines
14721 \change_inserted -195340706 1334775793
14722  unless the 
14723 \begin_inset Flex Code
14724 status collapsed
14725
14726 \begin_layout Plain Layout
14727
14728 \change_inserted -195340706 1334775793
14729 layouttranslations
14730 \end_layout
14731
14732 \end_inset
14733
14734  file is modified accordingly
14735 \change_unchanged
14736 .
14737  That said, however, any layout created with the intention that it will
14738  be included with LyX should use these tags where appropriate.
14739
14740 \change_inserted -195340706 1334775793
14741  Please note that the paragraph style translations provided by LyX will
14742  never change with a minor update (e.g.
14743  from version 2.1.x to 2.1.y).
14744  It is however quite likely that a major update (e.g.
14745  from 2.0.x to 2.1.y) will introduce new translations or corrections.
14746 \change_unchanged
14747
14748 \end_layout
14749
14750 \begin_layout Subsection
14751 Floats
14752 \begin_inset CommandInset label
14753 LatexCommand label
14754 name "sub:Floats"
14755
14756 \end_inset
14757
14758
14759 \end_layout
14760
14761 \begin_layout Standard
14762 Since version 1.3.0 of LyX, it is has been both possible and necessary to
14763  define the floats (
14764 \begin_inset Flex MenuItem
14765 status collapsed
14766
14767 \begin_layout Plain Layout
14768 figure
14769 \end_layout
14770
14771 \end_inset
14772
14773
14774 \begin_inset Flex MenuItem
14775 status collapsed
14776
14777 \begin_layout Plain Layout
14778 table
14779 \end_layout
14780
14781 \end_inset
14782
14783 , \SpecialChar \ldots{}
14784 ) in the text class itself.
14785  Standard floats are included in the file 
14786 \begin_inset Flex Code
14787 status collapsed
14788
14789 \begin_layout Plain Layout
14790 stdfloats.inc
14791 \end_layout
14792
14793 \end_inset
14794
14795 , so you may have to do no more than add
14796 \end_layout
14797
14798 \begin_layout LyX-Code
14799 Input stdfloats.inc
14800 \end_layout
14801
14802 \begin_layout Standard
14803 to your layout file.
14804  If you want to implement a text class that proposes some other float types
14805  (like the AGU class bundled with LyX), the information below will hopefully
14806  help you:
14807 \end_layout
14808
14809 \begin_layout Description
14810 \begin_inset Flex Code
14811 status collapsed
14812
14813 \begin_layout Plain Layout
14814 Extension
14815 \end_layout
14816
14817 \end_inset
14818
14819  [
14820 \begin_inset Flex Code
14821 status collapsed
14822
14823 \begin_layout Plain Layout
14824 string
14825 \end_layout
14826
14827 \end_inset
14828
14829 =
14830 \begin_inset Quotes erd
14831 \end_inset
14832
14833
14834 \begin_inset Quotes erd
14835 \end_inset
14836
14837 ] The file name extension of an auxiliary file for the list of figures (or
14838  whatever).
14839  LaTeX writes the captions to this file.
14840 \end_layout
14841
14842 \begin_layout Description
14843 \begin_inset Flex Code
14844 status collapsed
14845
14846 \begin_layout Plain Layout
14847 GuiName
14848 \end_layout
14849
14850 \end_inset
14851
14852  [
14853 \begin_inset Flex Code
14854 status collapsed
14855
14856 \begin_layout Plain Layout
14857 string
14858 \end_layout
14859
14860 \end_inset
14861
14862 =
14863 \begin_inset Quotes erd
14864 \end_inset
14865
14866
14867 \begin_inset Quotes erd
14868 \end_inset
14869
14870 ] The string that will be used in the menus and also for the caption.
14871  This is translated to the current language if babel is used.
14872 \end_layout
14873
14874 \begin_layout Description
14875 \begin_inset Flex Code
14876 status collapsed
14877
14878 \begin_layout Plain Layout
14879 HTML*
14880 \end_layout
14881
14882 \end_inset
14883
14884  These are used for XHTML output.
14885  See 
14886 \begin_inset CommandInset ref
14887 LatexCommand ref
14888 reference "sec:Tags-for-XHTML"
14889
14890 \end_inset
14891
14892 .
14893 \end_layout
14894
14895 \begin_layout Description
14896 \begin_inset Flex Code
14897 status collapsed
14898
14899 \begin_layout Plain Layout
14900 IsPredefined
14901 \end_layout
14902
14903 \end_inset
14904
14905  [
14906 \emph on
14907
14908 \begin_inset Flex Code
14909 status open
14910
14911 \begin_layout Plain Layout
14912 0
14913 \end_layout
14914
14915 \end_inset
14916
14917
14918 \emph default
14919
14920 \begin_inset Flex Code
14921 status collapsed
14922
14923 \begin_layout Plain Layout
14924 1
14925 \end_layout
14926
14927 \end_inset
14928
14929 ] Indicates whether the float is already defined in the document class or
14930  if we instead need to load 
14931 \begin_inset Flex Code
14932 status collapsed
14933
14934 \begin_layout Plain Layout
14935 float.sty
14936 \end_layout
14937
14938 \end_inset
14939
14940  and use what it provides to define it on-the-fly.
14941  The default is 
14942 \begin_inset Flex Code
14943 status collapsed
14944
14945 \begin_layout Plain Layout
14946 0
14947 \end_layout
14948
14949 \end_inset
14950
14951 , which means: use 
14952 \begin_inset Flex Code
14953 status collapsed
14954
14955 \begin_layout Plain Layout
14956 float.sty
14957 \end_layout
14958
14959 \end_inset
14960
14961 .
14962  It should be set to 
14963 \begin_inset Flex Code
14964 status collapsed
14965
14966 \begin_layout Plain Layout
14967 1
14968 \end_layout
14969
14970 \end_inset
14971
14972  if the float is already defined by the LaTeX document class.
14973 \end_layout
14974
14975 \begin_layout Description
14976 \begin_inset Flex Code
14977 status collapsed
14978
14979 \begin_layout Plain Layout
14980 ListCommand
14981 \end_layout
14982
14983 \end_inset
14984
14985  [
14986 \begin_inset Flex Code
14987 status collapsed
14988
14989 \begin_layout Plain Layout
14990 string
14991 \end_layout
14992
14993 \end_inset
14994
14995 =
14996 \begin_inset Quotes erd
14997 \end_inset
14998
14999
15000 \begin_inset Quotes erd
15001 \end_inset
15002
15003 ] The command used to generate a list of floats of this type; the leading
15004  `
15005 \backslash
15006 ' should be omitted.
15007  This 
15008 \emph on
15009 must
15010 \emph default
15011  be given if 
15012 \begin_inset Flex Code
15013 status collapsed
15014
15015 \begin_layout Plain Layout
15016 UsesFloatPkg
15017 \end_layout
15018
15019 \end_inset
15020
15021  is false, since there is no standard way to generate this command.
15022  It is ignored if 
15023 \begin_inset Flex Code
15024 status collapsed
15025
15026 \begin_layout Plain Layout
15027 UsesFloatPkg
15028 \end_layout
15029
15030 \end_inset
15031
15032  is true, since in that case there is a standard way to define the command.
15033 \end_layout
15034
15035 \begin_layout Description
15036 \begin_inset Flex Code
15037 status collapsed
15038
15039 \begin_layout Plain Layout
15040 ListName
15041 \end_layout
15042
15043 \end_inset
15044
15045  [
15046 \begin_inset Flex Code
15047 status collapsed
15048
15049 \begin_layout Plain Layout
15050 string
15051 \end_layout
15052
15053 \end_inset
15054
15055 =
15056 \begin_inset Quotes erd
15057 \end_inset
15058
15059
15060 \begin_inset Quotes erd
15061 \end_inset
15062
15063 ] A title for a list of floats of this kind (list of figures, tables, or
15064  whatever).
15065  It is used for the screen label within LyX; it is passed to LaTeX for use
15066  as the title there; and it is used as the title in XHTML output.
15067  It will be translated to the document language.
15068 \end_layout
15069
15070 \begin_layout Description
15071 \begin_inset Flex Code
15072 status collapsed
15073
15074 \begin_layout Plain Layout
15075 NumberWithin
15076 \end_layout
15077
15078 \end_inset
15079
15080  [
15081 \begin_inset Flex Code
15082 status collapsed
15083
15084 \begin_layout Plain Layout
15085 string
15086 \end_layout
15087
15088 \end_inset
15089
15090 =
15091 \begin_inset Quotes erd
15092 \end_inset
15093
15094
15095 \begin_inset Quotes erd
15096 \end_inset
15097
15098 ] This (optional) argument determines whether floats of this class will
15099  be numbered within some sectional unit of the document.
15100  For example, if within is equal to 
15101 \begin_inset Flex Code
15102 status collapsed
15103
15104 \begin_layout Plain Layout
15105 chapter
15106 \end_layout
15107
15108 \end_inset
15109
15110 , the floats will be numbered within chapters.
15111  
15112 \end_layout
15113
15114 \begin_layout Description
15115 \begin_inset Flex Code
15116 status collapsed
15117
15118 \begin_layout Plain Layout
15119 Placement
15120 \end_layout
15121
15122 \end_inset
15123
15124  [
15125 \begin_inset Flex Code
15126 status collapsed
15127
15128 \begin_layout Plain Layout
15129 string
15130 \end_layout
15131
15132 \end_inset
15133
15134 =
15135 \begin_inset Quotes erd
15136 \end_inset
15137
15138
15139 \begin_inset Quotes erd
15140 \end_inset
15141
15142 ] The default placement for the given class of floats.
15143  The string should be as in standard LaTeX: 
15144 \begin_inset Flex Code
15145 status collapsed
15146
15147 \begin_layout Plain Layout
15148 t
15149 \end_layout
15150
15151 \end_inset
15152
15153
15154 \begin_inset Flex Code
15155 status collapsed
15156
15157 \begin_layout Plain Layout
15158 b
15159 \end_layout
15160
15161 \end_inset
15162
15163
15164 \begin_inset Flex Code
15165 status collapsed
15166
15167 \begin_layout Plain Layout
15168 p
15169 \end_layout
15170
15171 \end_inset
15172
15173  and 
15174 \begin_inset Flex Code
15175 status collapsed
15176
15177 \begin_layout Plain Layout
15178 h
15179 \end_layout
15180
15181 \end_inset
15182
15183  for top, bottom, page, and here, respectively.
15184 \begin_inset Foot
15185 status collapsed
15186
15187 \begin_layout Plain Layout
15188 Note that the order of these letters in the string is irrelevant, like in
15189  LaTeX.
15190 \end_layout
15191
15192 \end_inset
15193
15194  On top of that there is a new type, 
15195 \begin_inset Flex Code
15196 status collapsed
15197
15198 \begin_layout Plain Layout
15199 H
15200 \end_layout
15201
15202 \end_inset
15203
15204 , which does not really correspond to a float, since it means: put it 
15205 \begin_inset Quotes eld
15206 \end_inset
15207
15208 here
15209 \begin_inset Quotes erd
15210 \end_inset
15211
15212  and nowhere else.
15213  Note however that the 
15214 \begin_inset Flex Code
15215 status collapsed
15216
15217 \begin_layout Plain Layout
15218 H
15219 \end_layout
15220
15221 \end_inset
15222
15223  specifier is special and, because of implementation details, cannot be
15224  used in non-built in float types.
15225  If you do not understand what this means, just use 
15226 \begin_inset Quotes eld
15227 \end_inset
15228
15229
15230 \begin_inset Flex Code
15231 status collapsed
15232
15233 \begin_layout Plain Layout
15234 tbp
15235 \end_layout
15236
15237 \end_inset
15238
15239
15240 \begin_inset Quotes erd
15241 \end_inset
15242
15243 .
15244 \end_layout
15245
15246 \begin_layout Description
15247 \begin_inset Flex Code
15248 status collapsed
15249
15250 \begin_layout Plain Layout
15251 RefPrefix
15252 \end_layout
15253
15254 \end_inset
15255
15256  [
15257 \begin_inset Flex Code
15258 status collapsed
15259
15260 \begin_layout Plain Layout
15261 string
15262 \end_layout
15263
15264 \end_inset
15265
15266 ] The prefix to use when creating labels referring to floats of this type.
15267  This allows the use of formatted references.
15268  Note that you can remove any 
15269 \begin_inset Flex Code
15270 status collapsed
15271
15272 \begin_layout Plain Layout
15273 RefPrefix
15274 \end_layout
15275
15276 \end_inset
15277
15278  set by a copied style by using the special value 
15279 \begin_inset Quotes eld
15280 \end_inset
15281
15282 OFF
15283 \begin_inset Quotes erd
15284 \end_inset
15285
15286 , which must be all caps.
15287 \end_layout
15288
15289 \begin_layout Description
15290 \begin_inset Flex Code
15291 status collapsed
15292
15293 \begin_layout Plain Layout
15294 Style
15295 \end_layout
15296
15297 \end_inset
15298
15299  [
15300 \begin_inset Flex Code
15301 status collapsed
15302
15303 \begin_layout Plain Layout
15304 string
15305 \end_layout
15306
15307 \end_inset
15308
15309 =
15310 \begin_inset Quotes erd
15311 \end_inset
15312
15313
15314 \begin_inset Quotes erd
15315 \end_inset
15316
15317 ] The style used when defining the float using 
15318 \begin_inset Flex Code
15319 status collapsed
15320
15321 \begin_layout Plain Layout
15322
15323 \backslash
15324 newfloat
15325 \end_layout
15326
15327 \end_inset
15328
15329 .
15330 \end_layout
15331
15332 \begin_layout Description
15333 \begin_inset Flex Code
15334 status collapsed
15335
15336 \begin_layout Plain Layout
15337 Type
15338 \end_layout
15339
15340 \end_inset
15341
15342  [
15343 \begin_inset Flex Code
15344 status collapsed
15345
15346 \begin_layout Plain Layout
15347 string
15348 \end_layout
15349
15350 \end_inset
15351
15352 =
15353 \begin_inset Quotes erd
15354 \end_inset
15355
15356
15357 \begin_inset Quotes erd
15358 \end_inset
15359
15360 ] The 
15361 \begin_inset Quotes eld
15362 \end_inset
15363
15364 type
15365 \begin_inset Quotes erd
15366 \end_inset
15367
15368  of the new class of floats, like program or algorithm.
15369  After the appropriate 
15370 \begin_inset Flex Code
15371 status collapsed
15372
15373 \begin_layout Plain Layout
15374
15375 \backslash
15376 newfloat
15377 \end_layout
15378
15379 \end_inset
15380
15381 , commands such as 
15382 \begin_inset Flex Code
15383 status collapsed
15384
15385 \begin_layout Plain Layout
15386
15387 \backslash
15388 begin{program}
15389 \end_layout
15390
15391 \end_inset
15392
15393  or 
15394 \begin_inset Flex Code
15395 status collapsed
15396
15397 \begin_layout Plain Layout
15398
15399 \backslash
15400 end{algorithm*}
15401 \end_layout
15402
15403 \end_inset
15404
15405  will be available.
15406 \end_layout
15407
15408 \begin_layout Description
15409 \begin_inset Flex Code
15410 status collapsed
15411
15412 \begin_layout Plain Layout
15413 UsesFloatPkg
15414 \end_layout
15415
15416 \end_inset
15417
15418  [
15419 \begin_inset Flex Code
15420 status open
15421
15422 \begin_layout Plain Layout
15423 0
15424 \end_layout
15425
15426 \end_inset
15427
15428
15429 \begin_inset Flex Code
15430 status collapsed
15431
15432 \begin_layout Plain Layout
15433
15434 \emph on
15435 1
15436 \end_layout
15437
15438 \end_inset
15439
15440 ] Tells us whether this float is defined using the facilities provided by
15441  
15442 \begin_inset Flex Code
15443 status collapsed
15444
15445 \begin_layout Plain Layout
15446 float.sty
15447 \end_layout
15448
15449 \end_inset
15450
15451 , either by the class file or a package, or on-the-fly by LyX itself.
15452 \end_layout
15453
15454 \begin_layout Standard
15455 Note that defining a float with type 
15456 \begin_inset Flex Code
15457 status collapsed
15458
15459 \begin_layout Plain Layout
15460
15461 \emph on
15462 type
15463 \end_layout
15464
15465 \end_inset
15466
15467  automatically defines the corresponding counter with name 
15468 \begin_inset Flex Code
15469 status collapsed
15470
15471 \begin_layout Plain Layout
15472
15473 \emph on
15474 type
15475 \end_layout
15476
15477 \end_inset
15478
15479 .
15480 \end_layout
15481
15482 \begin_layout Subsection
15483 Flex insets and InsetLayout
15484 \begin_inset CommandInset label
15485 LatexCommand label
15486 name "sub:Flex-insets-and"
15487
15488 \end_inset
15489
15490
15491 \end_layout
15492
15493 \begin_layout Standard
15494 LyX has supported character styles since version 1.4.0; as of version 1.6.0,
15495  these are called Flex insets.
15496  
15497 \end_layout
15498
15499 \begin_layout Standard
15500 Flex insets come in three different kinds: 
15501 \end_layout
15502
15503 \begin_layout Itemize
15504 character style (
15505 \begin_inset Flex Code
15506 status collapsed
15507
15508 \begin_layout Plain Layout
15509 CharStyle
15510 \end_layout
15511
15512 \end_inset
15513
15514 ): These define semantic markup corresponding to such LaTeX commands as
15515  
15516 \begin_inset Flex Code
15517 status collapsed
15518
15519 \begin_layout Plain Layout
15520
15521 \backslash
15522 noun
15523 \end_layout
15524
15525 \end_inset
15526
15527  and 
15528 \begin_inset Flex Code
15529 status collapsed
15530
15531 \begin_layout Plain Layout
15532
15533 \backslash
15534 code
15535 \end_layout
15536
15537 \end_inset
15538
15539 .
15540 \end_layout
15541
15542 \begin_layout Itemize
15543 user custom (
15544 \begin_inset Flex Code
15545 status collapsed
15546
15547 \begin_layout Plain Layout
15548 Custom
15549 \end_layout
15550
15551 \end_inset
15552
15553 ): These can be used to define custom collapsible insets, similar to TeX
15554  code, footnote, and the like.
15555  An obvious example is an endnote inset, which is defined in the 
15556 \begin_inset Flex Code
15557 status collapsed
15558
15559 \begin_layout Plain Layout
15560 endnote
15561 \end_layout
15562
15563 \end_inset
15564
15565  module.
15566 \end_layout
15567
15568 \begin_layout Itemize
15569 XML elements (
15570 \begin_inset Flex Code
15571 status collapsed
15572
15573 \begin_layout Plain Layout
15574 Element
15575 \end_layout
15576
15577 \end_inset
15578
15579 ): For use with DocBook classes.
15580 \end_layout
15581
15582 \begin_layout Standard
15583 Flex insets are defined using the 
15584 \begin_inset Flex Code
15585 status collapsed
15586
15587 \begin_layout Plain Layout
15588 InsetLayout
15589 \end_layout
15590
15591 \end_inset
15592
15593  tag, which shall be explained in a moment.
15594 \end_layout
15595
15596 \begin_layout Standard
15597 The 
15598 \begin_inset Flex Code
15599 status collapsed
15600
15601 \begin_layout Plain Layout
15602 InsetLayout
15603 \end_layout
15604
15605 \end_inset
15606
15607  tag also serves another function: It can be used to customize the general
15608  layout of many different types of insets.
15609  Currently, 
15610 \begin_inset Flex Code
15611 status collapsed
15612
15613 \begin_layout Plain Layout
15614 InsetLayout
15615 \end_layout
15616
15617 \end_inset
15618
15619  can be used to customize the layout parameters for footnotes, marginal
15620  notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
15621  boxes, tables, algorithms, URLs, and optional arguments, as well as to
15622  define Flex insets.
15623 \end_layout
15624
15625 \begin_layout Standard
15626 The 
15627 \begin_inset Flex Code
15628 status collapsed
15629
15630 \begin_layout Plain Layout
15631 InsetLayout
15632 \end_layout
15633
15634 \end_inset
15635
15636  definition must begin with a line of the form:
15637 \end_layout
15638
15639 \begin_layout LyX-Code
15640 InsetLayout <Type>
15641 \end_layout
15642
15643 \begin_layout Standard
15644 Here 
15645 \begin_inset Flex Code
15646 status collapsed
15647
15648 \begin_layout Plain Layout
15649 <Type>
15650 \end_layout
15651
15652 \end_inset
15653
15654  indicates the inset whose layout is being defined, and here there are 
15655 \change_inserted 5863208 1334489266
15656 three
15657 \change_deleted 5863208 1334489267
15658 two
15659 \change_unchanged
15660  cases.
15661 \end_layout
15662
15663 \begin_layout Enumerate
15664 The layout for a pre-existing inset is being modified.
15665  In this case, can be 
15666 \begin_inset Flex Code
15667 status collapsed
15668
15669 \begin_layout Plain Layout
15670 <Type>
15671 \end_layout
15672
15673 \end_inset
15674
15675  any one of the following: 
15676 \begin_inset Flex Code
15677 status collapsed
15678
15679 \begin_layout Plain Layout
15680 Algorithm
15681 \end_layout
15682
15683 \end_inset
15684
15685
15686 \begin_inset Flex Code
15687 status collapsed
15688
15689 \begin_layout Plain Layout
15690 Branch
15691 \end_layout
15692
15693 \end_inset
15694
15695
15696 \begin_inset Flex Code
15697 status collapsed
15698
15699 \begin_layout Plain Layout
15700 Box
15701 \end_layout
15702
15703 \end_inset
15704
15705
15706 \begin_inset Flex Code
15707 status collapsed
15708
15709 \begin_layout Plain Layout
15710 Box:shaded
15711 \end_layout
15712
15713 \end_inset
15714
15715
15716 \begin_inset Flex Code
15717 status collapsed
15718
15719 \begin_layout Plain Layout
15720 ERT
15721 \end_layout
15722
15723 \end_inset
15724
15725
15726 \begin_inset Flex Code
15727 status collapsed
15728
15729 \begin_layout Plain Layout
15730 Figure
15731 \end_layout
15732
15733 \end_inset
15734
15735
15736 \begin_inset Flex Code
15737 status collapsed
15738
15739 \begin_layout Plain Layout
15740 Foot
15741 \end_layout
15742
15743 \end_inset
15744
15745
15746 \begin_inset Flex Code
15747 status collapsed
15748
15749 \begin_layout Plain Layout
15750 Index
15751 \end_layout
15752
15753 \end_inset
15754
15755
15756 \begin_inset Flex Code
15757 status collapsed
15758
15759 \begin_layout Plain Layout
15760 Info
15761 \end_layout
15762
15763 \end_inset
15764
15765
15766 \begin_inset Flex Code
15767 status collapsed
15768
15769 \begin_layout Plain Layout
15770 Info:menu
15771 \end_layout
15772
15773 \end_inset
15774
15775
15776 \begin_inset Flex Code
15777 status collapsed
15778
15779 \begin_layout Plain Layout
15780 Info:shortcut
15781 \end_layout
15782
15783 \end_inset
15784
15785
15786 \begin_inset Flex Code
15787 status collapsed
15788
15789 \begin_layout Plain Layout
15790 Info:shortcuts
15791 \end_layout
15792
15793 \end_inset
15794
15795
15796 \begin_inset Flex Code
15797 status collapsed
15798
15799 \begin_layout Plain Layout
15800 Listings
15801 \end_layout
15802
15803 \end_inset
15804
15805
15806 \begin_inset Flex Code
15807 status collapsed
15808
15809 \begin_layout Plain Layout
15810 Marginal
15811 \end_layout
15812
15813 \end_inset
15814
15815
15816 \begin_inset Flex Code
15817 status collapsed
15818
15819 \begin_layout Plain Layout
15820 Note:Comment
15821 \end_layout
15822
15823 \end_inset
15824
15825
15826 \begin_inset Flex Code
15827 status collapsed
15828
15829 \begin_layout Plain Layout
15830 Note:Note
15831 \end_layout
15832
15833 \end_inset
15834
15835
15836 \begin_inset Flex Code
15837 status collapsed
15838
15839 \begin_layout Plain Layout
15840 Note:Greyedout
15841 \end_layout
15842
15843 \end_inset
15844
15845
15846 \begin_inset Flex Code
15847 status collapsed
15848
15849 \begin_layout Plain Layout
15850
15851 \change_deleted -712698321 1353866704
15852 Opt
15853 \change_unchanged
15854 Arg
15855 \change_inserted -712698321 1353866707
15856 ument
15857 \change_unchanged
15858
15859 \end_layout
15860
15861 \end_inset
15862
15863
15864 \begin_inset Flex Code
15865 status collapsed
15866
15867 \begin_layout Plain Layout
15868 Table
15869 \end_layout
15870
15871 \end_inset
15872
15873 , or 
15874 \begin_inset Flex Code
15875 status collapsed
15876
15877 \begin_layout Plain Layout
15878 URL
15879 \end_layout
15880
15881 \end_inset
15882
15883 .
15884 \end_layout
15885
15886 \begin_layout Enumerate
15887 The layout for a Flex inset is being defined.
15888  In this case, 
15889 \begin_inset Flex Code
15890 status collapsed
15891
15892 \begin_layout Plain Layout
15893 <Type>
15894 \end_layout
15895
15896 \end_inset
15897
15898  must be of the form 
15899 \begin_inset Quotes eld
15900 \end_inset
15901
15902
15903 \begin_inset Flex Code
15904 status collapsed
15905
15906 \begin_layout Plain Layout
15907 Flex:<name>
15908 \end_layout
15909
15910 \end_inset
15911
15912
15913 \begin_inset Quotes erd
15914 \end_inset
15915
15916 , where 
15917 \begin_inset Flex Code
15918 status collapsed
15919
15920 \begin_layout Plain Layout
15921 name
15922 \end_layout
15923
15924 \end_inset
15925
15926  may be be any valid identifier not used by a pre-existing Flex inset.
15927  The identifier may include spaces, but in that case the whole thing must
15928  be wrapped in quotes.
15929  Note that the definition of a flex inset 
15930 \emph on
15931 must 
15932 \emph default
15933 also include a 
15934 \begin_inset Flex Code
15935 status collapsed
15936
15937 \begin_layout Plain Layout
15938 LyXType
15939 \end_layout
15940
15941 \end_inset
15942
15943  entry, declaring which type of inset it defines.
15944 \change_inserted 5863208 1334489312
15945
15946 \end_layout
15947
15948 \begin_layout Enumerate
15949
15950 \change_inserted 5863208 1334492248
15951 The layout for user specific branch is being defined.
15952  In this case, 
15953 \begin_inset Flex Code
15954 status collapsed
15955
15956 \begin_layout Plain Layout
15957
15958 \change_inserted 5863208 1334489384
15959 <Type>
15960 \end_layout
15961
15962 \end_inset
15963
15964  must be of the form 
15965 \begin_inset Quotes eld
15966 \end_inset
15967
15968
15969 \begin_inset Flex Code
15970 status collapsed
15971
15972 \begin_layout Plain Layout
15973
15974 \change_inserted 5863208 1334489392
15975 Branch:<name>
15976 \end_layout
15977
15978 \end_inset
15979
15980
15981 \begin_inset Quotes erd
15982 \end_inset
15983
15984 , where 
15985 \begin_inset Flex Code
15986 status collapsed
15987
15988 \begin_layout Plain Layout
15989
15990 \change_inserted 5863208 1334489384
15991 name
15992 \end_layout
15993
15994 \end_inset
15995
15996  may be be any valid identifier of branch defined in user's document.
15997  The identifier may include spaces, but in that case the whole thing must
15998  be wrapped in quotes.
15999  The main purpose of this feature is to allow LaTeX wrapping around specific
16000  branches as user needs.
16001 \change_unchanged
16002
16003 \end_layout
16004
16005 \begin_layout Standard
16006 The 
16007 \begin_inset Flex Code
16008 status collapsed
16009
16010 \begin_layout Plain Layout
16011 InsetLayout
16012 \end_layout
16013
16014 \end_inset
16015
16016  definition can contain the following entries:
16017 \end_layout
16018
16019 \begin_layout Description
16020
16021 \change_inserted -712698321 1353681390
16022 \begin_inset Flex Code
16023 status collapsed
16024
16025 \begin_layout Plain Layout
16026
16027 \change_inserted -712698321 1353681344
16028 Argument
16029 \end_layout
16030
16031 \end_inset
16032
16033  [
16034 \begin_inset Flex Code
16035 status collapsed
16036
16037 \begin_layout Plain Layout
16038
16039 \change_inserted -712698321 1353681344
16040 int
16041 \end_layout
16042
16043 \end_inset
16044
16045 ] Defines argument number <int> of a command\SpecialChar \slash{}
16046 environment associated with
16047  the current layout.
16048  The definition must end with 
16049 \begin_inset Flex Code
16050 status collapsed
16051
16052 \begin_layout Plain Layout
16053
16054 \change_inserted -712698321 1353681344
16055 EndArgument
16056 \end_layout
16057
16058 \end_inset
16059
16060 .
16061  See section
16062 \begin_inset space ~
16063 \end_inset
16064
16065
16066 \begin_inset CommandInset ref
16067 LatexCommand ref
16068 reference "sub:Paragraph-Styles"
16069
16070 \end_inset
16071
16072  for details.
16073 \end_layout
16074
16075 \begin_layout Description
16076
16077 \change_inserted -195340706 1333913893
16078 \begin_inset Flex Code
16079 status collapsed
16080
16081 \begin_layout Plain Layout
16082 BabelPreamble
16083 \end_layout
16084
16085 \end_inset
16086
16087  Preamble for changing languages.
16088  See section
16089 \begin_inset space ~
16090 \end_inset
16091
16092
16093 \begin_inset CommandInset ref
16094 LatexCommand ref
16095 reference "sub:I18n"
16096
16097 \end_inset
16098
16099 .
16100 \end_layout
16101
16102 \begin_layout Description
16103 \begin_inset Flex Code
16104 status collapsed
16105
16106 \begin_layout Plain Layout
16107 BgColor
16108 \end_layout
16109
16110 \end_inset
16111
16112  The color for the inset's background.
16113  The valid colors are defined in 
16114 \begin_inset Flex Code
16115 status collapsed
16116
16117 \begin_layout Plain Layout
16118 src/ColorCode.h
16119 \end_layout
16120
16121 \end_inset
16122
16123 .
16124 \end_layout
16125
16126 \begin_layout Description
16127 \begin_inset Flex Code
16128 status collapsed
16129
16130 \begin_layout Plain Layout
16131 ContentAsLabel
16132 \end_layout
16133
16134 \end_inset
16135
16136  [
16137 \begin_inset Flex Code
16138 status collapsed
16139
16140 \begin_layout Plain Layout
16141
16142 \emph on
16143 0
16144 \end_layout
16145
16146 \end_inset
16147
16148 ,
16149 \begin_inset Flex Code
16150 status collapsed
16151
16152 \begin_layout Plain Layout
16153 1
16154 \end_layout
16155
16156 \end_inset
16157
16158 ] Whether to use the content of the inset as the label, when the inset is
16159  closed.
16160  Default is false.
16161 \end_layout
16162
16163 \begin_layout Description
16164 \begin_inset Flex Code
16165 status collapsed
16166
16167 \begin_layout Plain Layout
16168 CopyStyle
16169 \end_layout
16170
16171 \end_inset
16172
16173  
16174 \begin_inset Flex Code
16175 status collapsed
16176
16177 \begin_layout Plain Layout
16178 [string]
16179 \end_layout
16180
16181 \end_inset
16182
16183  Copies all the features of an existing style into the current one.
16184  
16185 \end_layout
16186
16187 \begin_layout Description
16188 \begin_inset Flex Code
16189 status collapsed
16190
16191 \begin_layout Plain Layout
16192 CustomPars
16193 \end_layout
16194
16195 \end_inset
16196
16197  [
16198 \begin_inset Flex Code
16199 status collapsed
16200
16201 \begin_layout Plain Layout
16202
16203 \emph on
16204 0
16205 \end_layout
16206
16207 \end_inset
16208
16209 ,
16210 \begin_inset Flex Code
16211 status collapsed
16212
16213 \begin_layout Plain Layout
16214 1
16215 \end_layout
16216
16217 \end_inset
16218
16219 ] Indicates whether the user may employ the Paragraph Settings dialog to
16220  customize the paragraph.
16221 \end_layout
16222
16223 \begin_layout Description
16224 \begin_inset Flex Code
16225 status collapsed
16226
16227 \begin_layout Plain Layout
16228 Decoration
16229 \end_layout
16230
16231 \end_inset
16232
16233  can be 
16234 \begin_inset Flex Code
16235 status collapsed
16236
16237 \begin_layout Plain Layout
16238 Classic
16239 \end_layout
16240
16241 \end_inset
16242
16243
16244 \begin_inset Flex Code
16245 status collapsed
16246
16247 \begin_layout Plain Layout
16248 Minimalistic
16249 \end_layout
16250
16251 \end_inset
16252
16253 , or 
16254 \begin_inset Flex Code
16255 status collapsed
16256
16257 \begin_layout Plain Layout
16258 Conglomerate
16259 \end_layout
16260
16261 \end_inset
16262
16263 , describing the rendering style used for the inset's frame and buttons.
16264  Footnotes generally use 
16265 \begin_inset Flex Code
16266 status collapsed
16267
16268 \begin_layout Plain Layout
16269 Classic
16270 \end_layout
16271
16272 \end_inset
16273
16274 , ERT insets generally 
16275 \begin_inset Flex Code
16276 status collapsed
16277
16278 \begin_layout Plain Layout
16279 Minimalistic
16280 \end_layout
16281
16282 \end_inset
16283
16284 , and character styles 
16285 \begin_inset Flex Code
16286 status collapsed
16287
16288 \begin_layout Plain Layout
16289 Conglomerate
16290 \end_layout
16291
16292 \end_inset
16293
16294 .
16295 \end_layout
16296
16297 \begin_layout Description
16298 \begin_inset Flex Code
16299 status collapsed
16300
16301 \begin_layout Plain Layout
16302 Display
16303 \end_layout
16304
16305 \end_inset
16306
16307  [
16308 \begin_inset Flex Code
16309 status collapsed
16310
16311 \begin_layout Plain Layout
16312 0
16313 \end_layout
16314
16315 \end_inset
16316
16317 ,
16318 \begin_inset Flex Code
16319 status collapsed
16320
16321 \begin_layout Plain Layout
16322
16323 \emph on
16324 1
16325 \end_layout
16326
16327 \end_inset
16328
16329 ] Only useful if 
16330 \begin_inset Flex Code
16331 status collapsed
16332
16333 \begin_layout Plain Layout
16334 LatexType
16335 \end_layout
16336
16337 \end_inset
16338
16339  is 
16340 \begin_inset Flex Code
16341 status collapsed
16342
16343 \begin_layout Plain Layout
16344 Environment
16345 \end_layout
16346
16347 \end_inset
16348
16349 .
16350  Indicates whether the environment will stand on its own in LaTeX output
16351  or will appear inline with the surrounding text.
16352  If set to false, it is supposed that the LaTeX environment ignores white
16353  space (including one newline character) after the 
16354 \begin_inset Flex Code
16355 status collapsed
16356
16357 \begin_layout Plain Layout
16358
16359 \backslash
16360 begin{
16361 \emph on
16362 LatexName
16363 \emph default
16364 }
16365 \end_layout
16366
16367 \end_inset
16368
16369  and 
16370 \begin_inset Flex Code
16371 status collapsed
16372
16373 \begin_layout Plain Layout
16374
16375 \backslash
16376 end{
16377 \emph on
16378 LatexName
16379 \emph default
16380 }
16381 \end_layout
16382
16383 \end_inset
16384
16385  tags.
16386  Default is true.
16387 \end_layout
16388
16389 \begin_layout Description
16390 \begin_inset Flex Code
16391 status collapsed
16392
16393 \begin_layout Plain Layout
16394 End
16395 \end_layout
16396
16397 \end_inset
16398
16399  Required at the end of the InsetLayout declarations.
16400 \end_layout
16401
16402 \begin_layout Description
16403 \begin_inset Flex Code
16404 status collapsed
16405
16406 \begin_layout Plain Layout
16407 Font
16408 \end_layout
16409
16410 \end_inset
16411
16412  The font used for both the text body 
16413 \emph on
16414 and
16415 \emph default
16416  the label.
16417  See section
16418 \begin_inset space ~
16419 \end_inset
16420
16421
16422 \begin_inset CommandInset ref
16423 LatexCommand ref
16424 reference "sub:Font-description"
16425
16426 \end_inset
16427
16428 .
16429  Note that defining this font automatically defines the 
16430 \begin_inset Flex Code
16431 status collapsed
16432
16433 \begin_layout Plain Layout
16434 LabelFont
16435 \end_layout
16436
16437 \end_inset
16438
16439  to the same value, so define this first and define 
16440 \begin_inset Flex Code
16441 status collapsed
16442
16443 \begin_layout Plain Layout
16444 LabelFont
16445 \end_layout
16446
16447 \end_inset
16448
16449  later if you want them to be different.
16450 \change_inserted 155139281 1354130923
16451
16452 \end_layout
16453
16454 \begin_layout Description
16455
16456 \change_inserted 155139281 1354130923
16457 \begin_inset Flex Code
16458 status collapsed
16459
16460 \begin_layout Plain Layout
16461
16462 \change_inserted 155139281 1354130923
16463 ForceLocalFontSwitch
16464 \end_layout
16465
16466 \end_inset
16467
16468  [
16469 \begin_inset Flex Code
16470 status collapsed
16471
16472 \begin_layout Plain Layout
16473
16474 \change_inserted 155139281 1354130923
16475
16476 \emph on
16477 0
16478 \end_layout
16479
16480 \end_inset
16481
16482 ,
16483 \begin_inset Flex Code
16484 status collapsed
16485
16486 \begin_layout Plain Layout
16487
16488 \change_inserted 155139281 1354130923
16489 1
16490 \end_layout
16491
16492 \end_inset
16493
16494 ] When using babel, always use a local font switch (
16495 \begin_inset Flex Code
16496 status collapsed
16497
16498 \begin_layout Plain Layout
16499
16500 \change_inserted 155139281 1354130923
16501
16502 \backslash
16503 foreignlanguage
16504 \end_layout
16505
16506 \end_inset
16507
16508 ), never a global one (such as 
16509 \begin_inset Flex Code
16510 status collapsed
16511
16512 \begin_layout Plain Layout
16513
16514 \change_inserted 155139281 1354130923
16515
16516 \backslash
16517 selectlanguage
16518 \end_layout
16519
16520 \end_inset
16521
16522 ).
16523 \change_unchanged
16524
16525 \end_layout
16526
16527 \begin_layout Description
16528 \begin_inset Flex Code
16529 status collapsed
16530
16531 \begin_layout Plain Layout
16532 ForceLTR
16533 \end_layout
16534
16535 \end_inset
16536
16537  Force the 
16538 \begin_inset Quotes eld
16539 \end_inset
16540
16541 latex
16542 \begin_inset Quotes erd
16543 \end_inset
16544
16545  language, leading to Left-to-Right (latin) output, e.
16546 \begin_inset space \thinspace{}
16547 \end_inset
16548
16549 g.
16550 \begin_inset space \space{}
16551 \end_inset
16552
16553 in TeX code or URL.
16554  A kludge.
16555 \end_layout
16556
16557 \begin_layout Description
16558 \begin_inset Flex Code
16559 status collapsed
16560
16561 \begin_layout Plain Layout
16562 ForcePlain
16563 \end_layout
16564
16565 \end_inset
16566
16567  [
16568 \begin_inset Flex Code
16569 status collapsed
16570
16571 \begin_layout Plain Layout
16572
16573 \emph on
16574 0
16575 \end_layout
16576
16577 \end_inset
16578
16579 ,
16580 \begin_inset Flex Code
16581 status collapsed
16582
16583 \begin_layout Plain Layout
16584 1
16585 \end_layout
16586
16587 \end_inset
16588
16589 ] Indicates whether the 
16590 \begin_inset Flex Code
16591 status collapsed
16592
16593 \begin_layout Plain Layout
16594 PlainLayout
16595 \end_layout
16596
16597 \end_inset
16598
16599  should be used or, instead, the user can change the paragraph style used
16600  in the inset.
16601  Default is false.
16602 \end_layout
16603
16604 \begin_layout Description
16605 \begin_inset Flex Code
16606 status collapsed
16607
16608 \begin_layout Plain Layout
16609 FreeSpacing
16610 \end_layout
16611
16612 \end_inset
16613
16614  [
16615 \begin_inset Flex Code
16616 status collapsed
16617
16618 \begin_layout Plain Layout
16619
16620 \emph on
16621 0
16622 \end_layout
16623
16624 \end_inset
16625
16626
16627 \begin_inset Flex Code
16628 status collapsed
16629
16630 \begin_layout Plain Layout
16631 1
16632 \end_layout
16633
16634 \end_inset
16635
16636 ] Usually LyX doesn't allow you to insert more than one space between words,
16637  since a space is considered as the separation between two words, not a
16638  character or symbol of its own.
16639  This is a very fine thing but sometimes annoying, for example, when typing
16640  program code or plain LaTeX code.
16641  For this reason, 
16642 \begin_inset Flex Code
16643 status collapsed
16644
16645 \begin_layout Plain Layout
16646 FreeSpacing
16647 \end_layout
16648
16649 \end_inset
16650
16651  can be enabled.
16652  Note that LyX will create protected blanks for the additional blanks when
16653  in another mode than LaTeX-mode.
16654  Default is false.
16655 \end_layout
16656
16657 \begin_layout Description
16658 \begin_inset Flex Code
16659 status collapsed
16660
16661 \begin_layout Plain Layout
16662 HTML*
16663 \end_layout
16664
16665 \end_inset
16666
16667  These tags control XHTML output.
16668  See section 
16669 \begin_inset CommandInset ref
16670 LatexCommand ref
16671 reference "sec:Tags-for-XHTML"
16672
16673 \end_inset
16674
16675 .
16676 \end_layout
16677
16678 \begin_layout Description
16679 \begin_inset Flex Code
16680 status collapsed
16681
16682 \begin_layout Plain Layout
16683 InToc
16684 \end_layout
16685
16686 \end_inset
16687
16688  [
16689 \begin_inset Flex Code
16690 status collapsed
16691
16692 \begin_layout Plain Layout
16693
16694 \emph on
16695 0
16696 \end_layout
16697
16698 \end_inset
16699
16700 ,
16701 \begin_inset Flex Code
16702 status collapsed
16703
16704 \begin_layout Plain Layout
16705 1
16706 \end_layout
16707
16708 \end_inset
16709
16710 ] Whether to include the contents of this inset in the strings generated
16711  for the `Outline' pane.
16712  One would not, for example, want the content of a footnote in a section
16713  header to be included in the TOC displayed in the outline, but one would
16714  normally want the content of a character style displayed.
16715  Default is false: not to include.
16716 \end_layout
16717
16718 \begin_layout Description
16719 \begin_inset Flex Code
16720 status collapsed
16721
16722 \begin_layout Plain Layout
16723 KeepEmpty
16724 \end_layout
16725
16726 \end_inset
16727
16728  [
16729 \begin_inset Flex Code
16730 status collapsed
16731
16732 \begin_layout Plain Layout
16733
16734 \emph on
16735 0
16736 \end_layout
16737
16738 \end_inset
16739
16740
16741 \begin_inset Flex Code
16742 status collapsed
16743
16744 \begin_layout Plain Layout
16745 1
16746 \end_layout
16747
16748 \end_inset
16749
16750 ] Usually LyX does not allow you to leave a paragraph empty, since it would
16751  lead to empty LaTeX output.
16752  There are some cases where this could be desirable however: in a letter
16753  template, the required fields can be provided as empty fields, so that
16754  people do not forget them; in some special classes, a style can be used
16755  as some kind of break, which does not contain actual text.
16756  Default is false.
16757 \end_layout
16758
16759 \begin_layout Description
16760 \begin_inset Flex Code
16761 status collapsed
16762
16763 \begin_layout Plain Layout
16764 LabelFont
16765 \end_layout
16766
16767 \end_inset
16768
16769  The font used for the label.
16770  See section
16771 \begin_inset space ~
16772 \end_inset
16773
16774
16775 \begin_inset CommandInset ref
16776 LatexCommand ref
16777 reference "sub:Font-description"
16778
16779 \end_inset
16780
16781 .
16782  Note that this definition can never appear before 
16783 \begin_inset Flex Code
16784 status collapsed
16785
16786 \begin_layout Plain Layout
16787 Font
16788 \end_layout
16789
16790 \end_inset
16791
16792 , lest it be ineffective.
16793 \end_layout
16794
16795 \begin_layout Description
16796 \begin_inset Flex Code
16797 status collapsed
16798
16799 \begin_layout Plain Layout
16800 LabelString
16801 \end_layout
16802
16803 \end_inset
16804
16805  What will be displayed on the button or elsewhere as the inset label.
16806  Some inset types (
16807 \begin_inset Flex Code
16808 status collapsed
16809
16810 \begin_layout Plain Layout
16811 TeX code
16812 \end_layout
16813
16814 \end_inset
16815
16816  and 
16817 \begin_inset Flex Code
16818 status collapsed
16819
16820 \begin_layout Plain Layout
16821 Branch
16822 \end_layout
16823
16824 \end_inset
16825
16826 ) modify this label on the fly.
16827 \end_layout
16828
16829 \begin_layout Description
16830
16831 \change_inserted -195340706 1333913893
16832 \begin_inset Flex Code
16833 status collapsed
16834
16835 \begin_layout Plain Layout
16836 LangPreamble
16837 \end_layout
16838
16839 \end_inset
16840
16841  Language dependent preamble.
16842  See section
16843 \begin_inset space ~
16844 \end_inset
16845
16846
16847 \begin_inset CommandInset ref
16848 LatexCommand ref
16849 reference "sub:I18n"
16850
16851 \end_inset
16852
16853 .
16854 \end_layout
16855
16856 \begin_layout Description
16857 \begin_inset Flex Code
16858 status collapsed
16859
16860 \begin_layout Plain Layout
16861 LatexName
16862 \end_layout
16863
16864 \end_inset
16865
16866  The name of the corresponding LaTeX stuff.
16867  Either the environment or command name.
16868 \end_layout
16869
16870 \begin_layout Description
16871 \begin_inset Flex Code
16872 status collapsed
16873
16874 \begin_layout Plain Layout
16875 LatexParam
16876 \end_layout
16877
16878 \end_inset
16879
16880  The optional parameter for the corresponding 
16881 \begin_inset Flex Code
16882 status collapsed
16883
16884 \begin_layout Plain Layout
16885 LatexName
16886 \end_layout
16887
16888 \end_inset
16889
16890  stuff, including possible bracket pairs like 
16891 \begin_inset Flex Code
16892 status collapsed
16893
16894 \begin_layout Plain Layout
16895 []
16896 \end_layout
16897
16898 \end_inset
16899
16900 .
16901  
16902 \change_inserted -712698321 1355144715
16903 This will be output as is after all LaTeX 
16904 \begin_inset Flex Code
16905 status collapsed
16906
16907 \begin_layout Plain Layout
16908
16909 \change_inserted -712698321 1355144713
16910 Arguments
16911 \end_layout
16912
16913 \end_inset
16914
16915 .
16916  
16917 \change_unchanged
16918 This parameter cannot be changed from within LyX
16919 \change_inserted -712698321 1355144775
16920  (use 
16921 \begin_inset Flex Code
16922 status collapsed
16923
16924 \begin_layout Plain Layout
16925
16926 \change_inserted -712698321 1355144747
16927 Argument
16928 \end_layout
16929
16930 \end_inset
16931
16932  for customizable parameters)
16933 \change_unchanged
16934 .
16935 \end_layout
16936
16937 \begin_layout Description
16938 \begin_inset Flex Code
16939 status collapsed
16940
16941 \begin_layout Plain Layout
16942 LatexType
16943 \end_layout
16944
16945 \end_inset
16946
16947  [
16948 \begin_inset Flex Code
16949 status collapsed
16950
16951 \begin_layout Plain Layout
16952
16953 \change_deleted -712698321 1353867544
16954
16955 \emph on
16956 Paragraph
16957 \emph default
16958
16959 \change_unchanged
16960 Command, Environment, 
16961 \change_inserted -712698321 1353867573
16962 None
16963 \change_deleted -712698321 1353867557
16964 Item_Environment,
16965 \change_unchanged
16966
16967 \end_layout
16968
16969 \end_inset
16970
16971  
16972 \begin_inset Flex Code
16973 status collapsed
16974
16975 \begin_layout Plain Layout
16976
16977 \change_deleted -712698321 1353867564
16978 List_Environment
16979 \change_unchanged
16980
16981 \change_deleted -712698321 1353867569
16982 Bib_Environment
16983 \change_unchanged
16984
16985 \end_layout
16986
16987 \end_inset
16988
16989 ] How the style should be translated into LaTeX.
16990 \begin_inset Foot
16991 status collapsed
16992
16993 \begin_layout Plain Layout
16994 \begin_inset Flex Code
16995 status collapsed
16996
16997 \begin_layout Plain Layout
16998 LatexType
16999 \end_layout
17000
17001 \end_inset
17002
17003  is perhaps a bit misleading, since these rules apply to SGML classes, too.
17004  Visit the SGML class files for specific examples.
17005 \end_layout
17006
17007 \end_inset
17008
17009
17010 \end_layout
17011
17012 \begin_deeper
17013 \begin_layout Itemize
17014 \begin_inset Flex Code
17015 status collapsed
17016
17017 \begin_layout Plain Layout
17018
17019 \change_deleted -712698321 1353867582
17020 Paragraph
17021 \change_inserted -712698321 1353867583
17022 None
17023 \change_unchanged
17024
17025 \end_layout
17026
17027 \end_inset
17028
17029  means nothing special.
17030  
17031 \end_layout
17032
17033 \begin_layout Itemize
17034 \begin_inset Flex Code
17035 status collapsed
17036
17037 \begin_layout Plain Layout
17038 Command
17039 \end_layout
17040
17041 \end_inset
17042
17043  means 
17044 \begin_inset Flex Code
17045 status collapsed
17046
17047 \begin_layout Plain Layout
17048
17049 \backslash
17050
17051 \emph on
17052 LatexName
17053 \emph default
17054 {\SpecialChar \ldots{}
17055 }
17056 \end_layout
17057
17058 \end_inset
17059
17060 .
17061 \end_layout
17062
17063 \begin_layout Itemize
17064 \begin_inset Flex Code
17065 status collapsed
17066
17067 \begin_layout Plain Layout
17068 Environment
17069 \end_layout
17070
17071 \end_inset
17072
17073  means 
17074 \begin_inset Flex Code
17075 status collapsed
17076
17077 \begin_layout Plain Layout
17078
17079 \backslash
17080 begin{
17081 \emph on
17082 LatexName
17083 \emph default
17084 }\SpecialChar \ldots{}
17085
17086 \backslash
17087 end{
17088 \emph on
17089 LatexName
17090 \emph default
17091 }
17092 \end_layout
17093
17094 \end_inset
17095
17096 .
17097  
17098 \end_layout
17099
17100 \begin_layout Itemize
17101
17102 \change_deleted -712698321 1353867600
17103 \begin_inset Flex Code
17104 status collapsed
17105
17106 \begin_layout Plain Layout
17107 Item_Environment
17108 \end_layout
17109
17110 \end_inset
17111
17112  is the same as 
17113 \begin_inset Flex Code
17114 status collapsed
17115
17116 \begin_layout Plain Layout
17117 Environment
17118 \end_layout
17119
17120 \end_inset
17121
17122 , except that an 
17123 \begin_inset Flex Code
17124 status collapsed
17125
17126 \begin_layout Plain Layout
17127
17128 \backslash
17129 item
17130 \end_layout
17131
17132 \end_inset
17133
17134  is generated for each paragraph of this environment.
17135  
17136 \end_layout
17137
17138 \begin_layout Itemize
17139
17140 \change_deleted -712698321 1353867600
17141 \begin_inset Flex Code
17142 status collapsed
17143
17144 \begin_layout Plain Layout
17145 List_Environment
17146 \end_layout
17147
17148 \end_inset
17149
17150  is the same as 
17151 \begin_inset Flex Code
17152 status collapsed
17153
17154 \begin_layout Plain Layout
17155 Item_Environment
17156 \end_layout
17157
17158 \end_inset
17159
17160 , except that 
17161 \begin_inset Flex Code
17162 status collapsed
17163
17164 \begin_layout Plain Layout
17165 LabelWidthString
17166 \end_layout
17167
17168 \end_inset
17169
17170  is passed as an argument to the environment.
17171  
17172 \begin_inset Flex Code
17173 status collapsed
17174
17175 \begin_layout Plain Layout
17176 LabelWidthString
17177 \end_layout
17178
17179 \end_inset
17180
17181  can be defined in the 
17182 \begin_inset Flex MenuItem
17183 status collapsed
17184
17185 \begin_layout Plain Layout
17186
17187 \bar under
17188 Edit
17189 \bar default
17190 \SpecialChar \menuseparator
17191
17192 \bar under
17193 P
17194 \bar default
17195 aragraph
17196 \begin_inset space ~
17197 \end_inset
17198
17199 settings
17200 \end_layout
17201
17202 \end_inset
17203
17204  dialog.
17205  
17206 \change_unchanged
17207
17208 \end_layout
17209
17210 \begin_layout Standard
17211 Putting the last few things together, the LaTeX output will be either: 
17212 \end_layout
17213
17214 \begin_layout LyX-Code
17215
17216 \backslash
17217 latexname[latexparam]{\SpecialChar \ldots{}
17218 }
17219 \end_layout
17220
17221 \begin_layout Standard
17222 or: 
17223 \end_layout
17224
17225 \begin_layout LyX-Code
17226
17227 \backslash
17228 begin{latexname}[latexparam] \SpecialChar \ldots{}
17229  
17230 \backslash
17231 end{latexname}.
17232 \end_layout
17233
17234 \begin_layout Standard
17235 depending upon the LaTeX type.
17236 \end_layout
17237
17238 \end_deeper
17239 \begin_layout Description
17240
17241 \change_inserted -712698321 1354263128
17242 \begin_inset Flex Code
17243 status collapsed
17244
17245 \begin_layout Plain Layout
17246
17247 \change_inserted -712698321 1353866742
17248 LeftDelim
17249 \change_unchanged
17250
17251 \end_layout
17252
17253 \end_inset
17254
17255  [
17256 \begin_inset Flex Code
17257 status collapsed
17258
17259 \begin_layout Plain Layout
17260
17261 \change_inserted -712698321 1353866752
17262 string
17263 \end_layout
17264
17265 \end_inset
17266
17267 ] A string that is put at the beginning of the layout content.
17268  A line break in the output can be indicated by 
17269 \begin_inset Flex Code
17270 status collapsed
17271
17272 \begin_layout Plain Layout
17273
17274 \change_inserted -712698321 1354263128
17275 <br/>
17276 \end_layout
17277
17278 \end_inset
17279
17280 .
17281 \change_unchanged
17282
17283 \end_layout
17284
17285 \begin_layout Description
17286 \begin_inset Flex Code
17287 status collapsed
17288
17289 \begin_layout Plain Layout
17290 LyxType
17291 \end_layout
17292
17293 \end_inset
17294
17295  Can be 
17296 \begin_inset Flex Code
17297 status collapsed
17298
17299 \begin_layout Plain Layout
17300 charstyle
17301 \end_layout
17302
17303 \end_inset
17304
17305
17306 \begin_inset Flex Code
17307 status collapsed
17308
17309 \begin_layout Plain Layout
17310 custom
17311 \end_layout
17312
17313 \end_inset
17314
17315
17316 \begin_inset Flex Code
17317 status collapsed
17318
17319 \begin_layout Plain Layout
17320 element
17321 \end_layout
17322
17323 \end_inset
17324
17325 , or 
17326 \begin_inset Flex Code
17327 status collapsed
17328
17329 \begin_layout Plain Layout
17330 end
17331 \end_layout
17332
17333 \end_inset
17334
17335  (indicating a dummy definition ending definitions of charstyles, etc).
17336  This entry is required in and is only meaningful for Flex insets.
17337  Among other things, it determines on which menu this inset will appear.
17338  Setting 
17339 \begin_inset Flex Code
17340 status collapsed
17341
17342 \begin_layout Plain Layout
17343 LyXType
17344 \end_layout
17345
17346 \end_inset
17347
17348  to 
17349 \begin_inset Flex Code
17350 status collapsed
17351
17352 \begin_layout Plain Layout
17353 charstyle
17354 \end_layout
17355
17356 \end_inset
17357
17358  will set 
17359 \begin_inset Flex Code
17360 status collapsed
17361
17362 \begin_layout Plain Layout
17363 MultiPar
17364 \end_layout
17365
17366 \end_inset
17367
17368  to false.
17369  
17370 \begin_inset Flex Code
17371 status collapsed
17372
17373 \begin_layout Plain Layout
17374 MultiPar
17375 \end_layout
17376
17377 \end_inset
17378
17379  can be set to true for charstyle insets, if you wish, by setting it 
17380 \emph on
17381 after
17382 \emph default
17383  you set the 
17384 \begin_inset Flex Code
17385 status collapsed
17386
17387 \begin_layout Plain Layout
17388 LyXType
17389 \end_layout
17390
17391 \end_inset
17392
17393 .
17394 \end_layout
17395
17396 \begin_layout Description
17397 \begin_inset Flex Code
17398 status collapsed
17399
17400 \begin_layout Plain Layout
17401 MultiPar
17402 \end_layout
17403
17404 \end_inset
17405
17406  [
17407 \begin_inset Flex Code
17408 status collapsed
17409
17410 \begin_layout Plain Layout
17411
17412 \emph on
17413 0
17414 \end_layout
17415
17416 \end_inset
17417
17418 ,
17419 \begin_inset Flex Code
17420 status collapsed
17421
17422 \begin_layout Plain Layout
17423 1
17424 \end_layout
17425
17426 \end_inset
17427
17428 ] Whether multiple paragraphs are permitted in this inset.
17429  This will also set 
17430 \begin_inset Flex Code
17431 status collapsed
17432
17433 \begin_layout Plain Layout
17434 CustomPars
17435 \end_layout
17436
17437 \end_inset
17438
17439  to the same value and 
17440 \begin_inset Flex Code
17441 status collapsed
17442
17443 \begin_layout Plain Layout
17444 ForcePlain
17445 \end_layout
17446
17447 \end_inset
17448
17449  to the opposite value.
17450  These can be reset to other values, if they are used 
17451 \emph on
17452 after
17453 \emph default
17454  
17455 \begin_inset Flex Code
17456 status collapsed
17457
17458 \begin_layout Plain Layout
17459 MultiPar
17460 \end_layout
17461
17462 \end_inset
17463
17464 .
17465  Default is true.
17466 \end_layout
17467
17468 \begin_layout Description
17469 \begin_inset Flex Code
17470 status collapsed
17471
17472 \begin_layout Plain Layout
17473 NeedProtect
17474 \end_layout
17475
17476 \end_inset
17477
17478  [
17479 \begin_inset Flex Code
17480 status collapsed
17481
17482 \begin_layout Plain Layout
17483
17484 \emph on
17485 0
17486 \end_layout
17487
17488 \end_inset
17489
17490 ,
17491 \begin_inset Flex Code
17492 status collapsed
17493
17494 \begin_layout Plain Layout
17495 1
17496 \end_layout
17497
17498 \end_inset
17499
17500 ] Whether fragile commands in this inset should be 
17501 \begin_inset Flex Code
17502 status collapsed
17503
17504 \begin_layout Plain Layout
17505
17506 \backslash
17507 protect
17508 \end_layout
17509
17510 \end_inset
17511
17512 'ed.
17513  (Note: This is 
17514 \emph on
17515 not
17516 \emph default
17517  whether the command should itself be protected.) Default is false.
17518 \end_layout
17519
17520 \begin_layout Description
17521 \begin_inset Flex Code
17522 status collapsed
17523
17524 \begin_layout Plain Layout
17525 ParbreakIsNewline
17526 \end_layout
17527
17528 \end_inset
17529
17530  [
17531 \begin_inset Flex Code
17532 status collapsed
17533
17534 \begin_layout Plain Layout
17535
17536 \emph on
17537 0
17538 \end_layout
17539
17540 \end_inset
17541
17542
17543 \begin_inset Flex Code
17544 status collapsed
17545
17546 \begin_layout Plain Layout
17547 1
17548 \end_layout
17549
17550 \end_inset
17551
17552 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
17553  output, but only by a line break; together with 
17554 \begin_inset Flex Code
17555 status collapsed
17556
17557 \begin_layout Plain Layout
17558 PassThru 1
17559 \end_layout
17560
17561 \end_inset
17562
17563 , this allows to emulate a plain text editor (like the ERT inset).
17564  Default is false.
17565 \end_layout
17566
17567 \begin_layout Description
17568 \begin_inset Flex Code
17569 status collapsed
17570
17571 \begin_layout Plain Layout
17572 PassThru
17573 \end_layout
17574
17575 \end_inset
17576
17577  [
17578 \begin_inset Flex Code
17579 status collapsed
17580
17581 \begin_layout Plain Layout
17582
17583 \emph on
17584 0
17585 \end_layout
17586
17587 \end_inset
17588
17589
17590 \begin_inset Flex Code
17591 status collapsed
17592
17593 \begin_layout Plain Layout
17594 1
17595 \end_layout
17596
17597 \end_inset
17598
17599 ] Whether the contents of this paragraph should be output in raw form, meaning
17600  without special translations that LaTeX would require.
17601 \end_layout
17602
17603 \begin_layout Description
17604 \begin_inset Flex Code
17605 status collapsed
17606
17607 \begin_layout Plain Layout
17608 Preamble
17609 \end_layout
17610
17611 \end_inset
17612
17613  Information to be included in the LaTeX preamble when this style is used.
17614  Used to define macros, load packages, etc., required by this particular
17615  style.
17616  Must end with 
17617 \begin_inset Quotes eld
17618 \end_inset
17619
17620
17621 \begin_inset Flex Code
17622 status collapsed
17623
17624 \begin_layout Plain Layout
17625 EndPreamble
17626 \end_layout
17627
17628 \end_inset
17629
17630
17631 \begin_inset Quotes erd
17632 \end_inset
17633
17634 .
17635 \end_layout
17636
17637 \begin_layout Description
17638 \begin_inset Flex Code
17639 status collapsed
17640
17641 \begin_layout Plain Layout
17642 RefPrefix
17643 \end_layout
17644
17645 \end_inset
17646
17647  [
17648 \begin_inset Flex Code
17649 status collapsed
17650
17651 \begin_layout Plain Layout
17652 string
17653 \end_layout
17654
17655 \end_inset
17656
17657 ] The prefix to use when creating labels referring to insets of this type.
17658  This allows the use of formatted references.
17659 \end_layout
17660
17661 \begin_layout Description
17662 \begin_inset Flex Code
17663 status collapsed
17664
17665 \begin_layout Plain Layout
17666 Requires
17667 \end_layout
17668
17669 \end_inset
17670
17671  [
17672 \begin_inset Flex Code
17673 status collapsed
17674
17675 \begin_layout Plain Layout
17676 string
17677 \end_layout
17678
17679 \end_inset
17680
17681 ] Whether the style requires the feature 
17682 \begin_inset Flex Code
17683 status collapsed
17684
17685 \begin_layout Plain Layout
17686 string
17687 \end_layout
17688
17689 \end_inset
17690
17691 .
17692  See the description of 
17693 \begin_inset Flex Code
17694 status collapsed
17695
17696 \begin_layout Plain Layout
17697 Provides
17698 \end_layout
17699
17700 \end_inset
17701
17702  above (page 
17703 \begin_inset CommandInset ref
17704 LatexCommand pageref
17705 reference "des:FreeSpacing"
17706
17707 \end_inset
17708
17709 ) for information on `features'.
17710 \change_inserted -712698321 1354439699
17711
17712 \end_layout
17713
17714 \begin_layout Description
17715
17716 \change_inserted -712698321 1354439705
17717 \begin_inset Flex Code
17718 status collapsed
17719
17720 \begin_layout Plain Layout
17721
17722 \change_inserted -712698321 1354439699
17723 ResetArgs
17724 \end_layout
17725
17726 \end_inset
17727
17728  [
17729 \begin_inset Flex Code
17730 status collapsed
17731
17732 \begin_layout Plain Layout
17733
17734 \change_inserted -712698321 1354439699
17735
17736 \emph on
17737 0
17738 \end_layout
17739
17740 \end_inset
17741
17742 ,
17743 \begin_inset Flex Code
17744 status collapsed
17745
17746 \begin_layout Plain Layout
17747
17748 \change_inserted -712698321 1354439699
17749 1
17750 \end_layout
17751
17752 \end_inset
17753
17754 ] Resets the LaTeX arguments of this layout (as defined via the 
17755 \begin_inset Flex Code
17756 status collapsed
17757
17758 \begin_layout Plain Layout
17759
17760 \change_inserted -712698321 1354439699
17761 Argument
17762 \end_layout
17763
17764 \end_inset
17765
17766  tag).
17767  This is useful if you have copied a style via 
17768 \begin_inset Flex Code
17769 status collapsed
17770
17771 \begin_layout Plain Layout
17772
17773 \change_inserted -712698321 1354439699
17774 CopyStyle
17775 \end_layout
17776
17777 \end_inset
17778
17779 , but you do not want to inherit its (required and optional) arguments.
17780
17781 \change_deleted -712698321 1354439698
17782  
17783 \change_unchanged
17784
17785 \end_layout
17786
17787 \begin_layout Description
17788 \begin_inset Flex Code
17789 status collapsed
17790
17791 \begin_layout Plain Layout
17792 ResetsFont
17793 \end_layout
17794
17795 \end_inset
17796
17797  [
17798 \begin_inset Flex Code
17799 status collapsed
17800
17801 \begin_layout Plain Layout
17802 0
17803 \end_layout
17804
17805 \end_inset
17806
17807 ,
17808 \begin_inset Flex Code
17809 status collapsed
17810
17811 \begin_layout Plain Layout
17812
17813 \emph on
17814 1
17815 \end_layout
17816
17817 \end_inset
17818
17819 ] Whether this inset should use the font of its surrounding environment
17820  or uses its own.
17821  Default is true: uses its own.
17822 \change_inserted -712698321 1353866806
17823
17824 \end_layout
17825
17826 \begin_layout Description
17827
17828 \change_inserted -712698321 1354263134
17829 \begin_inset Flex Code
17830 status collapsed
17831
17832 \begin_layout Plain Layout
17833
17834 \change_inserted -712698321 1353866810
17835 RightDelim
17836 \end_layout
17837
17838 \end_inset
17839
17840  [
17841 \begin_inset Flex Code
17842 status collapsed
17843
17844 \begin_layout Plain Layout
17845
17846 \change_inserted -712698321 1353866806
17847 string
17848 \end_layout
17849
17850 \end_inset
17851
17852 ] A string that is put at the end of the layout content.
17853  A line break in the output can be indicated by 
17854 \begin_inset Flex Code
17855 status collapsed
17856
17857 \begin_layout Plain Layout
17858
17859 \change_inserted -712698321 1354263134
17860 <br/>
17861 \end_layout
17862
17863 \end_inset
17864
17865 .
17866 \change_unchanged
17867
17868 \end_layout
17869
17870 \begin_layout Description
17871 \begin_inset Flex Code
17872 status collapsed
17873
17874 \begin_layout Plain Layout
17875 Spellcheck
17876 \end_layout
17877
17878 \end_inset
17879
17880  [
17881 \begin_inset Flex Code
17882 status collapsed
17883
17884 \begin_layout Plain Layout
17885 0
17886 \end_layout
17887
17888 \end_inset
17889
17890 ,
17891 \begin_inset Flex Code
17892 status collapsed
17893
17894 \begin_layout Plain Layout
17895
17896 \emph on
17897 1
17898 \end_layout
17899
17900 \end_inset
17901
17902 ] Spellcheck the contents of this inset.
17903  Default is true.
17904 \end_layout
17905
17906 \begin_layout Subsection
17907 Counters
17908 \begin_inset CommandInset label
17909 LatexCommand label
17910 name "sub:Counters"
17911
17912 \end_inset
17913
17914
17915 \end_layout
17916
17917 \begin_layout Standard
17918 Since version 1.3.0 of LyX, it is both possible and necessary to define the
17919  counters (
17920 \begin_inset Flex MenuItem
17921 status collapsed
17922
17923 \begin_layout Plain Layout
17924 chapter
17925 \end_layout
17926
17927 \end_inset
17928
17929
17930 \begin_inset Flex MenuItem
17931 status collapsed
17932
17933 \begin_layout Plain Layout
17934 figure
17935 \end_layout
17936
17937 \end_inset
17938
17939 , \SpecialChar \ldots{}
17940 ) in the text class itself.
17941  The standard counters are defined in the file 
17942 \begin_inset Flex Code
17943 status collapsed
17944
17945 \begin_layout Plain Layout
17946 stdcounters.inc
17947 \end_layout
17948
17949 \end_inset
17950
17951 , so you may have to do no more than add
17952 \end_layout
17953
17954 \begin_layout LyX-Code
17955 Input stdcounters.inc
17956 \end_layout
17957
17958 \begin_layout Standard
17959 to your layout file to get them to work.
17960  But if you want to define custom counters, then you can do so.
17961  The counter declaration must begin with:
17962 \end_layout
17963
17964 \begin_layout LyX-Code
17965 Counter CounterName
17966 \end_layout
17967
17968 \begin_layout Standard
17969 where of course `
17970 \begin_inset Flex Code
17971 status collapsed
17972
17973 \begin_layout Plain Layout
17974 CounterName
17975 \end_layout
17976
17977 \end_inset
17978
17979 ' is replaced by the name of the counter.
17980  And it must end with 
17981 \begin_inset Quotes eld
17982 \end_inset
17983
17984
17985 \begin_inset Flex Code
17986 status collapsed
17987
17988 \begin_layout Plain Layout
17989 End
17990 \end_layout
17991
17992 \end_inset
17993
17994
17995 \begin_inset Quotes erd
17996 \end_inset
17997
17998 .
17999  The following parameters can also be used:
18000 \end_layout
18001
18002 \begin_layout Description
18003 \begin_inset Flex Code
18004 status collapsed
18005
18006 \begin_layout Plain Layout
18007 LabelString
18008 \end_layout
18009
18010 \end_inset
18011
18012  [
18013 \begin_inset Flex Code
18014 status collapsed
18015
18016 \begin_layout Plain Layout
18017 string
18018 \end_layout
18019
18020 \end_inset
18021
18022 =
18023 \begin_inset Quotes erd
18024 \end_inset
18025
18026
18027 \begin_inset Quotes erd
18028 \end_inset
18029
18030 ] When defined, this string defines how the counter is displayed.
18031  Setting this value sets 
18032 \begin_inset Flex Code
18033 status collapsed
18034
18035 \begin_layout Plain Layout
18036 LabelStringAppendix
18037 \end_layout
18038
18039 \end_inset
18040
18041  to the same value.
18042  The following special constructs can be used in the string:
18043 \end_layout
18044
18045 \begin_deeper
18046 \begin_layout Itemize
18047 \begin_inset Flex Code
18048 status collapsed
18049
18050 \begin_layout Plain Layout
18051
18052 \backslash
18053 thecounter
18054 \end_layout
18055
18056 \end_inset
18057
18058  will be replaced by the expansion of the 
18059 \begin_inset Flex Code
18060 status collapsed
18061
18062 \begin_layout Plain Layout
18063 LabelString
18064 \end_layout
18065
18066 \end_inset
18067
18068  (or 
18069 \begin_inset Flex Code
18070 status collapsed
18071
18072 \begin_layout Plain Layout
18073 LabelStringAppendix
18074 \end_layout
18075
18076 \end_inset
18077
18078 ) of the counter 
18079 \begin_inset Flex Code
18080 status collapsed
18081
18082 \begin_layout Plain Layout
18083 counter
18084 \end_layout
18085
18086 \end_inset
18087
18088 .
18089  
18090 \end_layout
18091
18092 \begin_layout Itemize
18093 counter values can be expressed using LaTeX-like macros 
18094 \begin_inset Flex Code
18095 status collapsed
18096
18097 \begin_layout Plain Layout
18098
18099 \backslash
18100
18101 \emph on
18102 numbertype
18103 \emph default
18104 {
18105 \emph on
18106 counter
18107 \emph default
18108 }
18109 \end_layout
18110
18111 \end_inset
18112
18113 , where 
18114 \begin_inset Flex Code
18115 status collapsed
18116
18117 \begin_layout Plain Layout
18118
18119 \emph on
18120 numbertype
18121 \end_layout
18122
18123 \end_inset
18124
18125  can be:
18126 \begin_inset Foot
18127 status collapsed
18128
18129 \begin_layout Plain Layout
18130
18131 \family roman
18132 \series medium
18133 \shape up
18134 \size normal
18135 \emph off
18136 \bar no
18137 \noun off
18138 \color none
18139 Actually, the situation is a bit more complicated: any
18140 \family default
18141 \series default
18142 \shape default
18143 \emph default
18144 \bar default
18145  
18146 \size default
18147 \emph on
18148 \noun default
18149 \color inherit
18150 numbertype
18151 \family roman
18152 \series medium
18153 \shape up
18154 \size normal
18155 \emph off
18156 \bar no
18157 \noun off
18158  other than those described below will produce arabic numerals.
18159  It would not be surprising to see this change in the future.
18160 \end_layout
18161
18162 \end_inset
18163
18164  
18165 \begin_inset Flex Code
18166 status collapsed
18167
18168 \begin_layout Plain Layout
18169 arabic
18170 \end_layout
18171
18172 \end_inset
18173
18174 : 1, 2, 3,\SpecialChar \ldots{}
18175
18176 \begin_inset Flex Code
18177 status collapsed
18178
18179 \begin_layout Plain Layout
18180 alph
18181 \end_layout
18182
18183 \end_inset
18184
18185  for lower-case letters: a, b, c, \SpecialChar \ldots{}
18186
18187 \begin_inset Flex Code
18188 status collapsed
18189
18190 \begin_layout Plain Layout
18191 Alph
18192 \end_layout
18193
18194 \end_inset
18195
18196  for upper-case letters: A, B, C, \SpecialChar \ldots{}
18197
18198 \begin_inset Flex Code
18199 status collapsed
18200
18201 \begin_layout Plain Layout
18202 roman
18203 \end_layout
18204
18205 \end_inset
18206
18207  for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
18208
18209 \begin_inset Flex Code
18210 status collapsed
18211
18212 \begin_layout Plain Layout
18213 Roman
18214 \end_layout
18215
18216 \end_inset
18217
18218  for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
18219
18220 \begin_inset Flex Code
18221 status collapsed
18222
18223 \begin_layout Plain Layout
18224 hebrew
18225 \end_layout
18226
18227 \end_inset
18228
18229  for hebrew numerals.
18230 \end_layout
18231
18232 \end_deeper
18233 \begin_layout Standard
18234 If LabelString is not defined, a default value is constructed as follows:
18235  if the counter has a master counter 
18236 \begin_inset Flex Code
18237 status collapsed
18238
18239 \begin_layout Plain Layout
18240 master
18241 \end_layout
18242
18243 \end_inset
18244
18245  (defined via 
18246 \begin_inset Flex Code
18247 status collapsed
18248
18249 \begin_layout Plain Layout
18250 Within
18251 \end_layout
18252
18253 \end_inset
18254
18255 ), the string 
18256 \begin_inset Flex Code
18257 status collapsed
18258
18259 \begin_layout Plain Layout
18260
18261 \backslash
18262 themaster.
18263 \backslash
18264 arabic{counter}
18265 \end_layout
18266
18267 \end_inset
18268
18269  is used; otherwise the string 
18270 \begin_inset Flex Code
18271 status collapsed
18272
18273 \begin_layout Plain Layout
18274
18275 \backslash
18276 arabic{counter}
18277 \end_layout
18278
18279 \end_inset
18280
18281  is used.
18282 \end_layout
18283
18284 \begin_layout Description
18285 \begin_inset Flex Code
18286 status collapsed
18287
18288 \begin_layout Plain Layout
18289 LabelStringAppendix
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 ] Same as 
18313 \begin_inset Flex Code
18314 status collapsed
18315
18316 \begin_layout Plain Layout
18317 LabelString
18318 \end_layout
18319
18320 \end_inset
18321
18322 , but for use in the Appendix.
18323 \end_layout
18324
18325 \begin_layout Description
18326 \begin_inset Flex Code
18327 status collapsed
18328
18329 \begin_layout Plain Layout
18330 PrettyFormat
18331 \end_layout
18332
18333 \end_inset
18334
18335  [
18336 \begin_inset Flex Code
18337 status collapsed
18338
18339 \begin_layout Plain Layout
18340 string
18341 \end_layout
18342
18343 \end_inset
18344
18345 =
18346 \begin_inset Quotes erd
18347 \end_inset
18348
18349
18350 \begin_inset Quotes erd
18351 \end_inset
18352
18353 ] A format for use with formatted references to this counter.
18354  For example, one might want to have references to section numbers appear
18355  as 
18356 \begin_inset Quotes eld
18357 \end_inset
18358
18359 Section 2.4
18360 \begin_inset Quotes erd
18361 \end_inset
18362
18363 .
18364  The string should contain 
18365 \begin_inset Quotes eld
18366 \end_inset
18367
18368 ##
18369 \begin_inset Quotes erd
18370 \end_inset
18371
18372 .
18373  This will be replaced by the counter number itself.
18374  So, for sections, it would be: Section ##.
18375 \end_layout
18376
18377 \begin_layout Description
18378 \begin_inset Flex Code
18379 status collapsed
18380
18381 \begin_layout Plain Layout
18382 Within
18383 \end_layout
18384
18385 \end_inset
18386
18387  [
18388 \begin_inset Flex Code
18389 status collapsed
18390
18391 \begin_layout Plain Layout
18392 string
18393 \end_layout
18394
18395 \end_inset
18396
18397 =
18398 \begin_inset Quotes erd
18399 \end_inset
18400
18401
18402 \begin_inset Quotes erd
18403 \end_inset
18404
18405 ] If this is set to the name of another counter, the present counter will
18406  be reset every time the other one is increased.
18407  For example, 
18408 \begin_inset Flex Code
18409 status collapsed
18410
18411 \begin_layout Plain Layout
18412 subsection
18413 \end_layout
18414
18415 \end_inset
18416
18417  is numbered inside 
18418 \begin_inset Flex Code
18419 status collapsed
18420
18421 \begin_layout Plain Layout
18422 section
18423 \end_layout
18424
18425 \end_inset
18426
18427 .
18428 \end_layout
18429
18430 \begin_layout Subsection
18431 Font description
18432 \begin_inset CommandInset label
18433 LatexCommand label
18434 name "sub:Font-description"
18435
18436 \end_inset
18437
18438
18439 \end_layout
18440
18441 \begin_layout Standard
18442 A font description looks like this:
18443 \end_layout
18444
18445 \begin_layout LyX-Code
18446 Font 
18447 \family roman
18448 \emph on
18449 or
18450 \family default
18451 \emph default
18452  LabelFont
18453 \end_layout
18454
18455 \begin_layout LyX-Code
18456  ...
18457 \end_layout
18458
18459 \begin_layout LyX-Code
18460 EndFont
18461 \end_layout
18462
18463 \begin_layout Standard
18464 The following commands are available:
18465 \end_layout
18466
18467 \begin_layout Description
18468 \begin_inset Flex Code
18469 status collapsed
18470
18471 \begin_layout Plain Layout
18472 Color
18473 \end_layout
18474
18475 \end_inset
18476
18477  [
18478 \begin_inset Flex Code
18479 status collapsed
18480
18481 \begin_layout Plain Layout
18482
18483 \emph on
18484 none
18485 \end_layout
18486
18487 \end_inset
18488
18489
18490 \begin_inset Flex Code
18491 status collapsed
18492
18493 \begin_layout Plain Layout
18494 black
18495 \end_layout
18496
18497 \end_inset
18498
18499
18500 \begin_inset Flex Code
18501 status collapsed
18502
18503 \begin_layout Plain Layout
18504 white
18505 \end_layout
18506
18507 \end_inset
18508
18509
18510 \begin_inset Flex Code
18511 status collapsed
18512
18513 \begin_layout Plain Layout
18514 red
18515 \end_layout
18516
18517 \end_inset
18518
18519
18520 \begin_inset Flex Code
18521 status collapsed
18522
18523 \begin_layout Plain Layout
18524 green
18525 \end_layout
18526
18527 \end_inset
18528
18529
18530 \begin_inset Flex Code
18531 status collapsed
18532
18533 \begin_layout Plain Layout
18534 blue
18535 \end_layout
18536
18537 \end_inset
18538
18539
18540 \begin_inset Flex Code
18541 status collapsed
18542
18543 \begin_layout Plain Layout
18544 cyan
18545 \end_layout
18546
18547 \end_inset
18548
18549
18550 \begin_inset Flex Code
18551 status collapsed
18552
18553 \begin_layout Plain Layout
18554 magenta
18555 \end_layout
18556
18557 \end_inset
18558
18559
18560 \begin_inset Flex Code
18561 status collapsed
18562
18563 \begin_layout Plain Layout
18564 yellow
18565 \end_layout
18566
18567 \end_inset
18568
18569 ]
18570 \end_layout
18571
18572 \begin_layout Description
18573 \begin_inset Flex Code
18574 status collapsed
18575
18576 \begin_layout Plain Layout
18577 Family
18578 \end_layout
18579
18580 \end_inset
18581
18582  [
18583 \begin_inset Flex Code
18584 status collapsed
18585
18586 \begin_layout Plain Layout
18587
18588 \emph on
18589 Roman
18590 \end_layout
18591
18592 \end_inset
18593
18594
18595 \begin_inset Flex Code
18596 status collapsed
18597
18598 \begin_layout Plain Layout
18599 Sans
18600 \end_layout
18601
18602 \end_inset
18603
18604
18605 \begin_inset Flex Code
18606 status collapsed
18607
18608 \begin_layout Plain Layout
18609 Typewriter
18610 \end_layout
18611
18612 \end_inset
18613
18614 ]
18615 \end_layout
18616
18617 \begin_layout Description
18618 \begin_inset Flex Code
18619 status collapsed
18620
18621 \begin_layout Plain Layout
18622 Misc
18623 \end_layout
18624
18625 \end_inset
18626
18627  [
18628 \begin_inset Flex Code
18629 status collapsed
18630
18631 \begin_layout Plain Layout
18632 string
18633 \end_layout
18634
18635 \end_inset
18636
18637 ] Valid arguments are: 
18638 \begin_inset Flex Code
18639 status collapsed
18640
18641 \begin_layout Plain Layout
18642 emph
18643 \end_layout
18644
18645 \end_inset
18646
18647
18648 \begin_inset Flex Code
18649 status collapsed
18650
18651 \begin_layout Plain Layout
18652 noun
18653 \end_layout
18654
18655 \end_inset
18656
18657
18658 \begin_inset Flex Code
18659 status collapsed
18660
18661 \begin_layout Plain Layout
18662 strikeout
18663 \end_layout
18664
18665 \end_inset
18666
18667
18668 \begin_inset Flex Code
18669 status collapsed
18670
18671 \begin_layout Plain Layout
18672 underbar
18673 \end_layout
18674
18675 \end_inset
18676
18677
18678 \begin_inset Flex Code
18679 status collapsed
18680
18681 \begin_layout Plain Layout
18682 uuline
18683 \end_layout
18684
18685 \end_inset
18686
18687
18688 \begin_inset Flex Code
18689 status collapsed
18690
18691 \begin_layout Plain Layout
18692 uwave
18693 \end_layout
18694
18695 \end_inset
18696
18697
18698 \begin_inset Flex Code
18699 status collapsed
18700
18701 \begin_layout Plain Layout
18702 no_emph
18703 \end_layout
18704
18705 \end_inset
18706
18707
18708 \begin_inset Flex Code
18709 status collapsed
18710
18711 \begin_layout Plain Layout
18712 no_noun
18713 \end_layout
18714
18715 \end_inset
18716
18717
18718 \begin_inset Flex Code
18719 status collapsed
18720
18721 \begin_layout Plain Layout
18722 no_strikeout
18723 \end_layout
18724
18725 \end_inset
18726
18727
18728 \begin_inset Flex Code
18729 status collapsed
18730
18731 \begin_layout Plain Layout
18732 no_bar
18733 \end_layout
18734
18735 \end_inset
18736
18737
18738 \begin_inset Flex Code
18739 status collapsed
18740
18741 \begin_layout Plain Layout
18742 no_uuline
18743 \end_layout
18744
18745 \end_inset
18746
18747  and 
18748 \begin_inset Flex Code
18749 status collapsed
18750
18751 \begin_layout Plain Layout
18752 no_uwave
18753 \end_layout
18754
18755 \end_inset
18756
18757 .
18758  Each of these turns on or off the corresponding attribute.
18759  For example, 
18760 \begin_inset Flex Code
18761 status collapsed
18762
18763 \begin_layout Plain Layout
18764 emph
18765 \end_layout
18766
18767 \end_inset
18768
18769  turns on emphasis, and 
18770 \begin_inset Flex Code
18771 status collapsed
18772
18773 \begin_layout Plain Layout
18774 no_emph
18775 \end_layout
18776
18777 \end_inset
18778
18779  turns it off.
18780  
18781 \begin_inset Newline newline
18782 \end_inset
18783
18784 If the latter seems puzzling, remember that the font settings for the present
18785  context are generally inherited from the surrounding context.
18786  So 
18787 \begin_inset Flex Code
18788 status collapsed
18789
18790 \begin_layout Plain Layout
18791 no_emph
18792 \end_layout
18793
18794 \end_inset
18795
18796  would turn off the emphasis that was anyway in effect, say, in a theorem
18797  environment.
18798 \end_layout
18799
18800 \begin_layout Description
18801 \begin_inset Flex Code
18802 status collapsed
18803
18804 \begin_layout Plain Layout
18805 Series
18806 \end_layout
18807
18808 \end_inset
18809
18810  [
18811 \begin_inset Flex Code
18812 status collapsed
18813
18814 \begin_layout Plain Layout
18815
18816 \emph on
18817 Medium
18818 \end_layout
18819
18820 \end_inset
18821
18822
18823 \begin_inset Flex Code
18824 status collapsed
18825
18826 \begin_layout Plain Layout
18827 Bold
18828 \end_layout
18829
18830 \end_inset
18831
18832
18833 \end_layout
18834
18835 \begin_layout Description
18836 \begin_inset Flex Code
18837 status collapsed
18838
18839 \begin_layout Plain Layout
18840 Shape
18841 \end_layout
18842
18843 \end_inset
18844
18845  [
18846 \begin_inset Flex Code
18847 status collapsed
18848
18849 \begin_layout Plain Layout
18850
18851 \emph on
18852 Up
18853 \end_layout
18854
18855 \end_inset
18856
18857
18858 \begin_inset Flex Code
18859 status collapsed
18860
18861 \begin_layout Plain Layout
18862 Italic
18863 \end_layout
18864
18865 \end_inset
18866
18867
18868 \begin_inset Flex Code
18869 status collapsed
18870
18871 \begin_layout Plain Layout
18872 SmallCaps
18873 \end_layout
18874
18875 \end_inset
18876
18877
18878 \begin_inset Flex Code
18879 status collapsed
18880
18881 \begin_layout Plain Layout
18882 Slanted
18883 \end_layout
18884
18885 \end_inset
18886
18887
18888 \end_layout
18889
18890 \begin_layout Description
18891 \begin_inset Flex Code
18892 status collapsed
18893
18894 \begin_layout Plain Layout
18895 Size
18896 \end_layout
18897
18898 \end_inset
18899
18900  [
18901 \begin_inset Flex Code
18902 status collapsed
18903
18904 \begin_layout Plain Layout
18905 tiny
18906 \end_layout
18907
18908 \end_inset
18909
18910
18911 \begin_inset Flex Code
18912 status collapsed
18913
18914 \begin_layout Plain Layout
18915 small
18916 \end_layout
18917
18918 \end_inset
18919
18920
18921 \begin_inset Flex Code
18922 status collapsed
18923
18924 \begin_layout Plain Layout
18925
18926 \emph on
18927 normal
18928 \end_layout
18929
18930 \end_inset
18931
18932
18933 \begin_inset Flex Code
18934 status collapsed
18935
18936 \begin_layout Plain Layout
18937 large
18938 \end_layout
18939
18940 \end_inset
18941
18942
18943 \begin_inset Flex Code
18944 status collapsed
18945
18946 \begin_layout Plain Layout
18947 larger
18948 \end_layout
18949
18950 \end_inset
18951
18952
18953 \begin_inset Flex Code
18954 status collapsed
18955
18956 \begin_layout Plain Layout
18957 largest
18958 \end_layout
18959
18960 \end_inset
18961
18962
18963 \begin_inset Flex Code
18964 status collapsed
18965
18966 \begin_layout Plain Layout
18967 huge
18968 \end_layout
18969
18970 \end_inset
18971
18972
18973 \begin_inset Flex Code
18974 status collapsed
18975
18976 \begin_layout Plain Layout
18977 giant
18978 \end_layout
18979
18980 \end_inset
18981
18982 ]
18983 \end_layout
18984
18985 \begin_layout Subsection
18986 \begin_inset CommandInset label
18987 LatexCommand label
18988 name "sub:Citation-format-description"
18989
18990 \end_inset
18991
18992 Citation format description
18993 \end_layout
18994
18995 \begin_layout Standard
18996 The 
18997 \begin_inset Flex Code
18998 status collapsed
18999
19000 \begin_layout Plain Layout
19001 CiteFormat
19002 \end_layout
19003
19004 \end_inset
19005
19006  blocks are used to describe how bibliographic information should be displayed,
19007  both within LyX itself (in the citation dialog and in tooltips, for example)
19008  and in XHTML output.
19009  Such a block might look like this:
19010 \end_layout
19011
19012 \begin_layout LyX-Code
19013 CiteFormat
19014 \end_layout
19015
19016 \begin_layout LyX-Code
19017  article ...
19018 \end_layout
19019
19020 \begin_layout LyX-Code
19021  book ...
19022 \end_layout
19023
19024 \begin_layout LyX-Code
19025 End
19026 \end_layout
19027
19028 \begin_layout Standard
19029 The individual lines define how the bibliographic information associated
19030  with an article or book, respectively, is to be displayed, and such a definitio
19031 n can be given for any `entry type' that might be present in a BibTeX file.
19032  LyX defines a default format in the source code that will be used if no
19033  specific definition has been given.
19034  LyX predefines several formats in the file 
19035 \begin_inset Flex Code
19036 status collapsed
19037
19038 \begin_layout Plain Layout
19039 stdciteformats.inc
19040 \end_layout
19041
19042 \end_inset
19043
19044 , which is included in most of LyX's document classes.
19045 \end_layout
19046
19047 \begin_layout Standard
19048 The definitions use a simple language that allows BibTeX keys to be replaced
19049  with their values.
19050  Keys should be enclosed in 
19051 \begin_inset Flex Code
19052 status collapsed
19053
19054 \begin_layout Plain Layout
19055 %
19056 \end_layout
19057
19058 \end_inset
19059
19060  signs, e.g.: 
19061 \begin_inset Flex Code
19062 status collapsed
19063
19064 \begin_layout Plain Layout
19065 %author%
19066 \end_layout
19067
19068 \end_inset
19069
19070 .
19071  So a simple definition might look like this:
19072 \end_layout
19073
19074 \begin_layout LyX-Code
19075 misc %author%, 
19076 \begin_inset Quotes eld
19077 \end_inset
19078
19079 %title
19080 \begin_inset Quotes erd
19081 \end_inset
19082
19083 .
19084 \end_layout
19085
19086 \begin_layout Standard
19087 This would print the author, followed by a comma, followed by the title,
19088  in quotes, followed by a period.
19089 \end_layout
19090
19091 \begin_layout Standard
19092 Of course, sometimes you may want to print a key only if it exists.
19093  This can be done by using a conditional construction, such as: 
19094 \begin_inset Flex Code
19095 status collapsed
19096
19097 \begin_layout Plain Layout
19098 {%volume%[[vol.
19099 \begin_inset space ~
19100 \end_inset
19101
19102 %volume%]]}
19103 \end_layout
19104
19105 \end_inset
19106
19107 .
19108  This says: If the 
19109 \begin_inset Flex Code
19110 status collapsed
19111
19112 \begin_layout Plain Layout
19113 volume
19114 \end_layout
19115
19116 \end_inset
19117
19118  key exists, then print 
19119 \begin_inset Quotes eld
19120 \end_inset
19121
19122 vol.
19123 \begin_inset space ~
19124 \end_inset
19125
19126
19127 \begin_inset Quotes erd
19128 \end_inset
19129
19130  followed by the volume key.
19131  It is also possible to have an else clause in the conditional, such as:
19132  
19133 \begin_inset Flex Code
19134 status collapsed
19135
19136 \begin_layout Plain Layout
19137 {%author%[[%author%]][[%editor%, ed.]]}
19138 \end_layout
19139
19140 \end_inset
19141
19142 .
19143  Here, the 
19144 \begin_inset Flex Code
19145 status collapsed
19146
19147 \begin_layout Plain Layout
19148 author
19149 \end_layout
19150
19151 \end_inset
19152
19153  key is printed if it exists; otherwise, the editor key is printed, followed
19154  by 
19155 \begin_inset Quotes eld
19156 \end_inset
19157
19158 ,
19159 \begin_inset space ~
19160 \end_inset
19161
19162 ed.
19163 \begin_inset Quotes erd
19164 \end_inset
19165
19166  Note that the key is again enclosed in 
19167 \begin_inset Flex Code
19168 status collapsed
19169
19170 \begin_layout Plain Layout
19171 %
19172 \end_layout
19173
19174 \end_inset
19175
19176  signs; the entire conditional is enclosed in braces; and the if and else
19177  clauses are enclosed in double brackets, 
19178 \begin_inset Quotes eld
19179 \end_inset
19180
19181
19182 \begin_inset Flex Code
19183 status collapsed
19184
19185 \begin_layout Plain Layout
19186 [[
19187 \end_layout
19188
19189 \end_inset
19190
19191
19192 \begin_inset Quotes eld
19193 \end_inset
19194
19195  and 
19196 \begin_inset Quotes eld
19197 \end_inset
19198
19199
19200 \begin_inset Flex Code
19201 status collapsed
19202
19203 \begin_layout Plain Layout
19204 ]]
19205 \end_layout
19206
19207 \end_inset
19208
19209
19210 \begin_inset Quotes erd
19211 \end_inset
19212
19213 .
19214  There must be no space between any of these.
19215 \end_layout
19216
19217 \begin_layout Standard
19218 There is one other piece of syntax available in definitions, which looks
19219  like this: 
19220 \begin_inset Flex Code
19221 status collapsed
19222
19223 \begin_layout Plain Layout
19224 {!<i>!}
19225 \end_layout
19226
19227 \end_inset
19228
19229 .
19230  This defines a piece of formatting information that is to be used when
19231  creating 
19232 \begin_inset Quotes eld
19233 \end_inset
19234
19235 rich text
19236 \begin_inset Quotes erd
19237 \end_inset
19238
19239 .
19240  Obviously, we do not want to output HTML tags when writing plain text,
19241  so they should be wrapped in 
19242 \begin_inset Quotes eld
19243 \end_inset
19244
19245 {!
19246 \begin_inset Quotes erd
19247 \end_inset
19248
19249  and 
19250 \begin_inset Quotes eld
19251 \end_inset
19252
19253 !}
19254 \begin_inset Quotes erd
19255 \end_inset
19256
19257 .
19258 \end_layout
19259
19260 \begin_layout Standard
19261 Two special sorts of definitions are also possible in a 
19262 \begin_inset Flex Code
19263 status collapsed
19264
19265 \begin_layout Plain Layout
19266 CiteFormat
19267 \end_layout
19268
19269 \end_inset
19270
19271  block.
19272  An example of the first would be:
19273 \end_layout
19274
19275 \begin_layout LyX-Code
19276 !quotetitle 
19277 \begin_inset Quotes eld
19278 \end_inset
19279
19280 %title%
19281 \begin_inset Quotes erd
19282 \end_inset
19283
19284
19285 \end_layout
19286
19287 \begin_layout Standard
19288 This is an abbreviation, or macro, and it can be used by treating it as
19289  if it were a key: 
19290 \begin_inset Flex Code
19291 status collapsed
19292
19293 \begin_layout Plain Layout
19294 %!quotetitle%
19295 \end_layout
19296
19297 \end_inset
19298
19299 .
19300  LyX will treat 
19301 \begin_inset Flex Code
19302 status collapsed
19303
19304 \begin_layout Plain Layout
19305 %!quotetitle%
19306 \end_layout
19307
19308 \end_inset
19309
19310  exactly as it would treat its definition.
19311  So, let us issue the obvious 
19312 \emph on
19313 warning
19314 \emph default
19315 .
19316  Do not do this:
19317 \end_layout
19318
19319 \begin_layout LyX-Code
19320 !funfun %funfun%
19321 \end_layout
19322
19323 \begin_layout Standard
19324 or anything like it.
19325  LyX shouldn't go into an infinite loop, but it may go into a long one before
19326  it gives up.
19327 \end_layout
19328
19329 \begin_layout Standard
19330 The second sort of special definition might look like this:
19331 \end_layout
19332
19333 \begin_layout LyX-Code
19334 _pptext pp.
19335 \end_layout
19336
19337 \begin_layout Standard
19338 This defines a translatable piece of text, which allows relevant parts of
19339  the bibliography to be translated.
19340  It can be included in a definition by treating it as a key: 
19341 \begin_inset Flex Code
19342 status collapsed
19343
19344 \begin_layout Plain Layout
19345 %_pptext%
19346 \end_layout
19347
19348 \end_inset
19349
19350 .
19351  Several of these are predefined in 
19352 \begin_inset Flex Code
19353 status collapsed
19354
19355 \begin_layout Plain Layout
19356 stdciteformats.inc
19357 \end_layout
19358
19359 \end_inset
19360
19361 .
19362  Note that these are not macros, in the sense just defined.
19363  They will not be expanded.
19364 \end_layout
19365
19366 \begin_layout Standard
19367 So here then is an example that use all these features:
19368 \end_layout
19369
19370 \begin_layout LyX-Code
19371 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
19372 \end_layout
19373
19374 \begin_layout Standard
19375 This defines a macro that prints the author, followed by a comma, if the
19376  
19377 \begin_inset Flex Code
19378 status collapsed
19379
19380 \begin_layout Plain Layout
19381 author
19382 \end_layout
19383
19384 \end_inset
19385
19386  key is defined, or else prints the name of the editor, followed by the
19387  
19388 \begin_inset Flex Code
19389 status collapsed
19390
19391 \begin_layout Plain Layout
19392 _edtext
19393 \end_layout
19394
19395 \end_inset
19396
19397  or its translation (it is by default 
19398 \begin_inset Quotes eld
19399 \end_inset
19400
19401 ed.
19402 \begin_inset Quotes erd
19403 \end_inset
19404
19405 ), if the 
19406 \begin_inset Flex Code
19407 status collapsed
19408
19409 \begin_layout Plain Layout
19410 editor
19411 \end_layout
19412
19413 \end_inset
19414
19415  key is defined.
19416  Note that this is in fact defined in 
19417 \begin_inset Flex Code
19418 status collapsed
19419
19420 \begin_layout Plain Layout
19421 stdciteformats.inc
19422 \end_layout
19423
19424 \end_inset
19425
19426 , so you can use it in your own definitions, or re-definitions, if you load
19427  that file first.
19428 \end_layout
19429
19430 \begin_layout Section
19431 \begin_inset CommandInset label
19432 LatexCommand label
19433 name "sec:Tags-for-XHTML"
19434
19435 \end_inset
19436
19437 Tags for XHTML output
19438 \end_layout
19439
19440 \begin_layout Standard
19441 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
19442  by layout information.
19443  In general, LyX provides sensible defaults and, as mentioned earlier, it
19444  will even construct default CSS style rules from the other layout tags.
19445  For example, LyX will attempt to use the information provided in the 
19446 \begin_inset Flex Code
19447 status collapsed
19448
19449 \begin_layout Plain Layout
19450 Font
19451 \end_layout
19452
19453 \end_inset
19454
19455  declaration for the Chapter style to write CSS that will appropriately
19456  format chapter headings.
19457 \end_layout
19458
19459 \begin_layout Standard
19460 In many cases, then, you may not have to do anything at all to get acceptable
19461  XHTML output for your own environments, custom insets, and so forth.
19462  But in some cases you will, and so LyX provides a number of layout tags
19463  that can be used to customize the XHTML and CSS that are generated.
19464 \end_layout
19465
19466 \begin_layout Standard
19467 Note that there are two tags, 
19468 \begin_inset Flex Code
19469 status collapsed
19470
19471 \begin_layout Plain Layout
19472 HTMLPreamble
19473 \end_layout
19474
19475 \end_inset
19476
19477  and 
19478 \begin_inset Flex Code
19479 status collapsed
19480
19481 \begin_layout Plain Layout
19482 AddToHTMLPreamble
19483 \end_layout
19484
19485 \end_inset
19486
19487  that may appear outside style and inset declarations.
19488  See 
19489 \begin_inset CommandInset ref
19490 LatexCommand ref
19491 reference "sub:General-text-class"
19492
19493 \end_inset
19494
19495  for details on these.
19496 \end_layout
19497
19498 \begin_layout Subsection
19499 \begin_inset CommandInset label
19500 LatexCommand label
19501 name "sub:Paragraph-Style-XHTML"
19502
19503 \end_inset
19504
19505 Paragraph styles
19506 \end_layout
19507
19508 \begin_layout Standard
19509 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
19510  dealing with a normal paragraph, a command, or an environment, where this
19511  is itself determined by the contents of the corresponding 
19512 \begin_inset Flex Code
19513 status collapsed
19514
19515 \begin_layout Plain Layout
19516 LaTeXType
19517 \end_layout
19518
19519 \end_inset
19520
19521  tag.
19522  
19523 \end_layout
19524
19525 \begin_layout Standard
19526 For a command or normal paragraph, the output XHTML has the following form:
19527 \end_layout
19528
19529 \begin_layout LyX-Code
19530 <tag attr=
19531 \begin_inset Quotes erd
19532 \end_inset
19533
19534 value
19535 \begin_inset Quotes erd
19536 \end_inset
19537
19538 >
19539 \end_layout
19540
19541 \begin_layout LyX-Code
19542 <labeltag attr=
19543 \begin_inset Quotes erd
19544 \end_inset
19545
19546 value
19547 \begin_inset Quotes erd
19548 \end_inset
19549
19550 >Label</labeltag>
19551 \end_layout
19552
19553 \begin_layout LyX-Code
19554 Contents of the paragraph.
19555 \end_layout
19556
19557 \begin_layout LyX-Code
19558 </tag>
19559 \end_layout
19560
19561 \begin_layout Standard
19562 The label tags are of course omitted if the paragraph does not have a label.
19563 \end_layout
19564
19565 \begin_layout Standard
19566 For an environment that is not some sort of list, the XHTML takes this form:
19567 \end_layout
19568
19569 \begin_layout LyX-Code
19570 <tag attr=
19571 \begin_inset Quotes erd
19572 \end_inset
19573
19574 value
19575 \begin_inset Quotes erd
19576 \end_inset
19577
19578 >
19579 \end_layout
19580
19581 \begin_layout LyX-Code
19582 <itemtag attr=
19583 \begin_inset Quotes erd
19584 \end_inset
19585
19586 value
19587 \begin_inset Quotes erd
19588 \end_inset
19589
19590 ><labeltag attr=
19591 \begin_inset Quotes erd
19592 \end_inset
19593
19594 value
19595 \begin_inset Quotes erd
19596 \end_inset
19597
19598 >Environment Label</labeltag>First paragraph.</itemtag>
19599 \end_layout
19600
19601 \begin_layout LyX-Code
19602 <itemtag>Second paragraph.</itemtag>
19603 \end_layout
19604
19605 \begin_layout LyX-Code
19606 </tag>
19607 \end_layout
19608
19609 \begin_layout Standard
19610 Note that the label is output only for the first paragraph, as it should
19611  be for a theorem, for example.
19612  
19613 \end_layout
19614
19615 \begin_layout Standard
19616 For a list, we have one of these forms:
19617 \end_layout
19618
19619 \begin_layout LyX-Code
19620 <tag attr=
19621 \begin_inset Quotes erd
19622 \end_inset
19623
19624 value
19625 \begin_inset Quotes erd
19626 \end_inset
19627
19628 >
19629 \end_layout
19630
19631 \begin_layout LyX-Code
19632 <itemtag attr=
19633 \begin_inset Quotes erd
19634 \end_inset
19635
19636 value
19637 \begin_inset Quotes erd
19638 \end_inset
19639
19640 ><labeltag attr=
19641 \begin_inset Quotes erd
19642 \end_inset
19643
19644 value
19645 \begin_inset Quotes erd
19646 \end_inset
19647
19648 >List Label</labeltag>First item.</itemtag>
19649 \end_layout
19650
19651 \begin_layout LyX-Code
19652 <itemtag attr=
19653 \begin_inset Quotes erd
19654 \end_inset
19655
19656 value
19657 \begin_inset Quotes erd
19658 \end_inset
19659
19660 ><labeltag attr=
19661 \begin_inset Quotes erd
19662 \end_inset
19663
19664 value
19665 \begin_inset Quotes erd
19666 \end_inset
19667
19668 >List Label</labeltag>Second item.</itemtag>
19669 \end_layout
19670
19671 \begin_layout LyX-Code
19672 </tag>
19673 \end_layout
19674
19675 \begin_layout LyX-Code
19676
19677 \end_layout
19678
19679 \begin_layout LyX-Code
19680 <tag attr=
19681 \begin_inset Quotes erd
19682 \end_inset
19683
19684 value
19685 \begin_inset Quotes erd
19686 \end_inset
19687
19688 >
19689 \end_layout
19690
19691 \begin_layout LyX-Code
19692 <labeltag attr=
19693 \begin_inset Quotes erd
19694 \end_inset
19695
19696 value
19697 \begin_inset Quotes erd
19698 \end_inset
19699
19700 >List Label</labeltag><itemtag attr=
19701 \begin_inset Quotes erd
19702 \end_inset
19703
19704 value
19705 \begin_inset Quotes erd
19706 \end_inset
19707
19708 >First item.</itemtag>
19709 \end_layout
19710
19711 \begin_layout LyX-Code
19712 <labeltag attr=
19713 \begin_inset Quotes erd
19714 \end_inset
19715
19716 value
19717 \begin_inset Quotes erd
19718 \end_inset
19719
19720 >List Label</labeltag><itemtag attr=
19721 \begin_inset Quotes erd
19722 \end_inset
19723
19724 value
19725 \begin_inset Quotes erd
19726 \end_inset
19727
19728 >Second item.</itemtag>
19729 \end_layout
19730
19731 \begin_layout LyX-Code
19732 </tag>
19733 \end_layout
19734
19735 \begin_layout Standard
19736 Note the different orders of 
19737 \begin_inset Flex Code
19738 status collapsed
19739
19740 \begin_layout Plain Layout
19741 labeltag
19742 \end_layout
19743
19744 \end_inset
19745
19746  and 
19747 \begin_inset Flex Code
19748 status collapsed
19749
19750 \begin_layout Plain Layout
19751 itemtag
19752 \end_layout
19753
19754 \end_inset
19755
19756 .
19757  Which order we get depends upon the setting of 
19758 \begin_inset Flex Code
19759 status collapsed
19760
19761 \begin_layout Plain Layout
19762 HTMLLabelFirst
19763 \end_layout
19764
19765 \end_inset
19766
19767 : If 
19768 \begin_inset Flex Code
19769 status collapsed
19770
19771 \begin_layout Plain Layout
19772 HTMLLabelFirst
19773 \end_layout
19774
19775 \end_inset
19776
19777  is false (the default), you get the first of these, with the label within
19778  the item; if true, you get the second, with the label outside the item.
19779 \end_layout
19780
19781 \begin_layout Standard
19782 The specific tags and attributes output for each paragraph type can be controlle
19783 d by means of the layout tags we are about to describe.
19784  As mentioned earlier, however, LyX uses sensible defaults for many of these,
19785  so you often may not need to do very much to get good XHTML output.
19786  Think of the available tags as there so you can tweak things to your liking.
19787 \end_layout
19788
19789 \begin_layout Description
19790 \begin_inset Flex Code
19791 status collapsed
19792
19793 \begin_layout Plain Layout
19794 HTMLAttr
19795 \end_layout
19796
19797 \end_inset
19798
19799  [
19800 \begin_inset Flex Code
19801 status collapsed
19802
19803 \begin_layout Plain Layout
19804 string
19805 \end_layout
19806
19807 \end_inset
19808
19809 ] Specifies attribute information to be output with the main tag.
19810  For example, 
19811 \begin_inset Quotes eld
19812 \end_inset
19813
19814
19815 \begin_inset Flex Code
19816 status collapsed
19817
19818 \begin_layout Plain Layout
19819 class=`mydiv'
19820 \end_layout
19821
19822 \end_inset
19823
19824
19825 \begin_inset Quotes erd
19826 \end_inset
19827
19828 .
19829  By default, LyX will output 
19830 \begin_inset Quotes eld
19831 \end_inset
19832
19833
19834 \begin_inset Flex Code
19835 status collapsed
19836
19837 \begin_layout Plain Layout
19838 class=`layoutname'
19839 \end_layout
19840
19841 \end_inset
19842
19843
19844 \begin_inset Quotes erd
19845 \end_inset
19846
19847 , where 
19848 \begin_inset Flex Code
19849 status collapsed
19850
19851 \begin_layout Plain Layout
19852 layoutname
19853 \end_layout
19854
19855 \end_inset
19856
19857  is the LyX name of the layout, made lowercase, for example: chapter.
19858  This should 
19859 \emph on
19860 not
19861 \emph default
19862  contain any style information.
19863  Use 
19864 \begin_inset Flex Code
19865 status collapsed
19866
19867 \begin_layout Plain Layout
19868 HTMLStyle
19869 \end_layout
19870
19871 \end_inset
19872
19873  for that purpose.
19874 \end_layout
19875
19876 \begin_layout Description
19877 \begin_inset Flex Code
19878 status collapsed
19879
19880 \begin_layout Plain Layout
19881 HTMLForceCSS
19882 \end_layout
19883
19884 \end_inset
19885
19886  [
19887 \begin_inset Flex Code
19888 status collapsed
19889
19890 \begin_layout Plain Layout
19891
19892 \emph on
19893 0
19894 \emph default
19895 ,1
19896 \end_layout
19897
19898 \end_inset
19899
19900 ] Whether to output the default CSS information LyX generates for this layout,
19901  even if additional information is explicitly provided via 
19902 \begin_inset Flex Code
19903 status collapsed
19904
19905 \begin_layout Plain Layout
19906 HTMLStyle
19907 \end_layout
19908
19909 \end_inset
19910
19911 .
19912  Setting this to 
19913 \begin_inset Flex Code
19914 status collapsed
19915
19916 \begin_layout Plain Layout
19917 1
19918 \end_layout
19919
19920 \end_inset
19921
19922  allows you to alter or augment the generated CSS, rather than to override
19923  it completely.
19924  Default is 
19925 \begin_inset Flex Code
19926 status collapsed
19927
19928 \begin_layout Plain Layout
19929 0
19930 \end_layout
19931
19932 \end_inset
19933
19934 .
19935 \end_layout
19936
19937 \begin_layout Description
19938 \begin_inset Flex Code
19939 status collapsed
19940
19941 \begin_layout Plain Layout
19942 HTMLItem
19943 \end_layout
19944
19945 \end_inset
19946
19947  [
19948 \begin_inset Flex Code
19949 status collapsed
19950
19951 \begin_layout Plain Layout
19952 string
19953 \end_layout
19954
19955 \end_inset
19956
19957 ] The tag to be used for individual paragraphs of environments, replacing
19958  
19959 \begin_inset Flex Code
19960 status collapsed
19961
19962 \begin_layout Plain Layout
19963 itemtag
19964 \end_layout
19965
19966 \end_inset
19967
19968  in the examples above.
19969  Defaults to 
19970 \begin_inset Flex Code
19971 status collapsed
19972
19973 \begin_layout Plain Layout
19974 div
19975 \end_layout
19976
19977 \end_inset
19978
19979 .
19980 \end_layout
19981
19982 \begin_layout Description
19983 \begin_inset Flex Code
19984 status collapsed
19985
19986 \begin_layout Plain Layout
19987 HTMLItemAttr
19988 \end_layout
19989
19990 \end_inset
19991
19992  [
19993 \begin_inset Flex Code
19994 status collapsed
19995
19996 \begin_layout Plain Layout
19997 string
19998 \end_layout
19999
20000 \end_inset
20001
20002 ] Attributes for the item tag.
20003  Defaults to 
20004 \begin_inset Quotes eld
20005 \end_inset
20006
20007
20008 \begin_inset Flex Code
20009 status collapsed
20010
20011 \begin_layout Plain Layout
20012 class=`layoutname_item'
20013 \end_layout
20014
20015 \end_inset
20016
20017
20018 \begin_inset Quotes erd
20019 \end_inset
20020
20021 .
20022  This should 
20023 \emph on
20024 not
20025 \emph default
20026  contain any style information.
20027  Use 
20028 \begin_inset Flex Code
20029 status collapsed
20030
20031 \begin_layout Plain Layout
20032 HTMLStyle
20033 \end_layout
20034
20035 \end_inset
20036
20037  for that purpose.
20038 \end_layout
20039
20040 \begin_layout Description
20041 \begin_inset Flex Code
20042 status collapsed
20043
20044 \begin_layout Plain Layout
20045 HTMLLabel
20046 \end_layout
20047
20048 \end_inset
20049
20050  [
20051 \begin_inset Flex Code
20052 status collapsed
20053
20054 \begin_layout Plain Layout
20055 string
20056 \end_layout
20057
20058 \end_inset
20059
20060 ] The tag to be used for paragraph and item labels, replacing 
20061 \begin_inset Flex Code
20062 status collapsed
20063
20064 \begin_layout Plain Layout
20065 labeltag
20066 \end_layout
20067
20068 \end_inset
20069
20070  in the examples above.
20071  Defaults to 
20072 \begin_inset Flex Code
20073 status collapsed
20074
20075 \begin_layout Plain Layout
20076 span
20077 \end_layout
20078
20079 \end_inset
20080
20081 , unless 
20082 \begin_inset Flex Code
20083 status collapsed
20084
20085 \begin_layout Plain Layout
20086 LabelType
20087 \end_layout
20088
20089 \end_inset
20090
20091  is either 
20092 \begin_inset Flex Code
20093 status collapsed
20094
20095 \begin_layout Plain Layout
20096 Top_Environment
20097 \end_layout
20098
20099 \end_inset
20100
20101  or 
20102 \begin_inset Flex Code
20103 status collapsed
20104
20105 \begin_layout Plain Layout
20106 Centered_Top_Environment
20107 \end_layout
20108
20109 \end_inset
20110
20111 , in which case it defaults to 
20112 \begin_inset Flex Code
20113 status collapsed
20114
20115 \begin_layout Plain Layout
20116 div
20117 \end_layout
20118
20119 \end_inset
20120
20121 .
20122 \end_layout
20123
20124 \begin_layout Description
20125 \begin_inset Flex Code
20126 status collapsed
20127
20128 \begin_layout Plain Layout
20129 HTMLLabelAttr
20130 \end_layout
20131
20132 \end_inset
20133
20134  [
20135 \begin_inset Flex Code
20136 status collapsed
20137
20138 \begin_layout Plain Layout
20139 string
20140 \end_layout
20141
20142 \end_inset
20143
20144 ] Attributes for the label tag.
20145  Defaults to 
20146 \begin_inset Quotes eld
20147 \end_inset
20148
20149
20150 \begin_inset Flex Code
20151 status collapsed
20152
20153 \begin_layout Plain Layout
20154 class=`layoutname_label'
20155 \end_layout
20156
20157 \end_inset
20158
20159
20160 \begin_inset Quotes erd
20161 \end_inset
20162
20163 .
20164  This should 
20165 \emph on
20166 not
20167 \emph default
20168  contain any style information.
20169  Use 
20170 \begin_inset Flex Code
20171 status collapsed
20172
20173 \begin_layout Plain Layout
20174 HTMLStyle
20175 \end_layout
20176
20177 \end_inset
20178
20179  for that purpose.
20180 \end_layout
20181
20182 \begin_layout Description
20183 \begin_inset Flex Code
20184 status collapsed
20185
20186 \begin_layout Plain Layout
20187 HTMLLabelFirst
20188 \end_layout
20189
20190 \end_inset
20191
20192  [
20193 \begin_inset Flex Code
20194 status collapsed
20195
20196 \begin_layout Plain Layout
20197
20198 \emph on
20199 0
20200 \emph default
20201 ,1
20202 \end_layout
20203
20204 \end_inset
20205
20206 ] Meaningful only for list-like environments, this tag controls whether
20207  the label tag is output before or inside the item tag.
20208  This is used, for example, in the description environment, where we want
20209  `
20210 \begin_inset Flex Code
20211 status collapsed
20212
20213 \begin_layout Plain Layout
20214 <dt>\SpecialChar \ldots{}
20215 </dt><dd>\SpecialChar \ldots{}
20216 </dd>
20217 \end_layout
20218
20219 \end_inset
20220
20221 .
20222  Default is 
20223 \begin_inset Flex Code
20224 status collapsed
20225
20226 \begin_layout Plain Layout
20227 0
20228 \end_layout
20229
20230 \end_inset
20231
20232 : The label tag is output inside the item tag.
20233 \end_layout
20234
20235 \begin_layout Description
20236 \begin_inset Flex Code
20237 status collapsed
20238
20239 \begin_layout Plain Layout
20240 HTMLPreamble
20241 \end_layout
20242
20243 \end_inset
20244
20245  Information to be output in the 
20246 \begin_inset Flex Code
20247 status collapsed
20248
20249 \begin_layout Plain Layout
20250 <head>
20251 \end_layout
20252
20253 \end_inset
20254
20255  section when this style is used.
20256  This might, for example, be used to include a 
20257 \begin_inset Flex Code
20258 status collapsed
20259
20260 \begin_layout Plain Layout
20261 <script>
20262 \end_layout
20263
20264 \end_inset
20265
20266  block defining an 
20267 \begin_inset Flex Code
20268 status collapsed
20269
20270 \begin_layout Plain Layout
20271 onclick
20272 \end_layout
20273
20274 \end_inset
20275
20276  handler.
20277 \end_layout
20278
20279 \begin_layout Description
20280 \begin_inset Flex Code
20281 status collapsed
20282
20283 \begin_layout Plain Layout
20284 HTMLStyle
20285 \end_layout
20286
20287 \end_inset
20288
20289  CSS style information to be included when this style is used.
20290  Note that this will automatically be wrapped in a layout-generated 
20291 \begin_inset Flex Code
20292 status collapsed
20293
20294 \begin_layout Plain Layout
20295 <style>
20296 \end_layout
20297
20298 \end_inset
20299
20300  block, so only the CSS itself need be included.
20301 \end_layout
20302
20303 \begin_layout Description
20304 \begin_inset Flex Code
20305 status collapsed
20306
20307 \begin_layout Plain Layout
20308 HTMLTag
20309 \end_layout
20310
20311 \end_inset
20312
20313  [
20314 \begin_inset Flex Code
20315 status collapsed
20316
20317 \begin_layout Plain Layout
20318 string
20319 \end_layout
20320
20321 \end_inset
20322
20323 ] The tag to be used for the main label, replacing 
20324 \begin_inset Flex Code
20325 status collapsed
20326
20327 \begin_layout Plain Layout
20328 tag
20329 \end_layout
20330
20331 \end_inset
20332
20333  in the examples above.
20334  Defaults to 
20335 \begin_inset Flex Code
20336 status collapsed
20337
20338 \begin_layout Plain Layout
20339 div
20340 \end_layout
20341
20342 \end_inset
20343
20344 .
20345 \end_layout
20346
20347 \begin_layout Description
20348 \begin_inset Flex Code
20349 status collapsed
20350
20351 \begin_layout Plain Layout
20352 HTMLTitle
20353 \end_layout
20354
20355 \end_inset
20356
20357  [
20358 \begin_inset Flex Code
20359 status collapsed
20360
20361 \begin_layout Plain Layout
20362
20363 \emph on
20364 0
20365 \emph default
20366 ,1
20367 \end_layout
20368
20369 \end_inset
20370
20371 ] Marks this style as the one to be used to generate the 
20372 \begin_inset Flex Code
20373 status collapsed
20374
20375 \begin_layout Plain Layout
20376 <title>
20377 \end_layout
20378
20379 \end_inset
20380
20381  tag for the XHTML file.
20382  By default, it is false.
20383  The 
20384 \begin_inset Flex Code
20385 status collapsed
20386
20387 \begin_layout Plain Layout
20388 stdtitle.inc
20389 \end_layout
20390
20391 \end_inset
20392
20393  file sets it to true for the 
20394 \begin_inset Flex Code
20395 status collapsed
20396
20397 \begin_layout Plain Layout
20398 title
20399 \end_layout
20400
20401 \end_inset
20402
20403  environment.
20404  
20405 \end_layout
20406
20407 \begin_layout Subsection
20408 InsetLayout XHTML
20409 \end_layout
20410
20411 \begin_layout Standard
20412 The XHTML output of insets can also be controlled by information in layout
20413  files.
20414 \begin_inset Foot
20415 status collapsed
20416
20417 \begin_layout Plain Layout
20418 At present, this is true only for 
20419 \begin_inset Quotes eld
20420 \end_inset
20421
20422 text
20423 \begin_inset Quotes erd
20424 \end_inset
20425
20426  insets (insets you can type into) and is not true for 
20427 \begin_inset Quotes eld
20428 \end_inset
20429
20430 command
20431 \begin_inset Quotes erd
20432 \end_inset
20433
20434  insets (insets that are associated with dialog boxes).
20435 \end_layout
20436
20437 \end_inset
20438
20439  Here, too, LyX tries to provide sensible defaults, and it constructs default
20440  CSS style rules.
20441  But everything can be customized.
20442 \end_layout
20443
20444 \begin_layout Standard
20445 The XHTML LyX outputs for an inset has the following form:
20446 \end_layout
20447
20448 \begin_layout LyX-Code
20449 <tag attr=
20450 \begin_inset Quotes erd
20451 \end_inset
20452
20453 value
20454 \begin_inset Quotes erd
20455 \end_inset
20456
20457 >
20458 \end_layout
20459
20460 \begin_layout LyX-Code
20461 <labeltag>Label</labeltag>
20462 \end_layout
20463
20464 \begin_layout LyX-Code
20465 <innertag attr=
20466 \begin_inset Quotes erd
20467 \end_inset
20468
20469 value
20470 \begin_inset Quotes erd
20471 \end_inset
20472
20473 >Contents of the inset.</innertag>
20474 \end_layout
20475
20476 \begin_layout LyX-Code
20477 </tag>
20478 \end_layout
20479
20480 \begin_layout Standard
20481 If the inset permits multiple paragraphs---that is, if 
20482 \begin_inset Flex Code
20483 status collapsed
20484
20485 \begin_layout Plain Layout
20486 MultiPar
20487 \end_layout
20488
20489 \end_inset
20490
20491  is true---then the contents of the inset will itself be output as paragraphs
20492  formatted according to the styles used for those paragraphs (standard,
20493  quote, and the like).
20494  The label tag is of course omitted if the paragraph does not have a label
20495  and, at present, is always 
20496 \begin_inset Flex Code
20497 status collapsed
20498
20499 \begin_layout Plain Layout
20500 span
20501 \end_layout
20502
20503 \end_inset
20504
20505 .
20506  The inner tag is optional and, by default, does not appear.
20507 \end_layout
20508
20509 \begin_layout Standard
20510 The specific tags and attributes output for each inset can be controlled
20511  by means of the following layout tags.
20512 \end_layout
20513
20514 \begin_layout Description
20515 \begin_inset Flex Code
20516 status collapsed
20517
20518 \begin_layout Plain Layout
20519 HTMLAttr
20520 \end_layout
20521
20522 \end_inset
20523
20524  [
20525 \begin_inset Flex Code
20526 status collapsed
20527
20528 \begin_layout Plain Layout
20529 string
20530 \end_layout
20531
20532 \end_inset
20533
20534 ] Specifies attribute information to be output with the main tag.
20535  For example, 
20536 \begin_inset Quotes eld
20537 \end_inset
20538
20539
20540 \begin_inset Flex Code
20541 status collapsed
20542
20543 \begin_layout Plain Layout
20544 class=`myinset' onclick=`\SpecialChar \ldots{}
20545 '
20546 \end_layout
20547
20548 \end_inset
20549
20550
20551 \begin_inset Quotes erd
20552 \end_inset
20553
20554 .
20555  By default, LyX will output 
20556 \begin_inset Quotes eld
20557 \end_inset
20558
20559
20560 \begin_inset Flex Code
20561 status collapsed
20562
20563 \begin_layout Plain Layout
20564 class=`insetname'
20565 \end_layout
20566
20567 \end_inset
20568
20569
20570 \begin_inset Quotes erd
20571 \end_inset
20572
20573 , where 
20574 \begin_inset Flex Code
20575 status collapsed
20576
20577 \begin_layout Plain Layout
20578 insetname
20579 \end_layout
20580
20581 \end_inset
20582
20583  is the LyX name of the inset, made lowercase and with non-alphanumeric
20584  characters converted to underscores, for example: footnote.
20585 \end_layout
20586
20587 \begin_layout Description
20588 \begin_inset Flex Code
20589 status collapsed
20590
20591 \begin_layout Plain Layout
20592 HTMLForceCSS
20593 \end_layout
20594
20595 \end_inset
20596
20597  [
20598 \begin_inset Flex Code
20599 status collapsed
20600
20601 \begin_layout Plain Layout
20602
20603 \emph on
20604 0
20605 \emph default
20606 ,1
20607 \end_layout
20608
20609 \end_inset
20610
20611 ] Whether to output the default CSS information LyX generates for this layout,
20612  even if additional information is explicitly provided via 
20613 \begin_inset Flex Code
20614 status collapsed
20615
20616 \begin_layout Plain Layout
20617 HTMLStyle
20618 \end_layout
20619
20620 \end_inset
20621
20622 .
20623  Setting this to 
20624 \begin_inset Flex Code
20625 status collapsed
20626
20627 \begin_layout Plain Layout
20628 1
20629 \end_layout
20630
20631 \end_inset
20632
20633  allows you to alter or augment the generated CSS, rather than to override
20634  it completely.
20635  Default is 0.
20636 \end_layout
20637
20638 \begin_layout Description
20639 \begin_inset Flex Code
20640 status collapsed
20641
20642 \begin_layout Plain Layout
20643 HTMLInnerAttr
20644 \end_layout
20645
20646 \end_inset
20647
20648  [
20649 \begin_inset Flex Code
20650 status collapsed
20651
20652 \begin_layout Plain Layout
20653 string
20654 \end_layout
20655
20656 \end_inset
20657
20658 ] Attributes for the inner tag.
20659  Defaults to 
20660 \begin_inset Quotes eld
20661 \end_inset
20662
20663
20664 \begin_inset Flex Code
20665 status collapsed
20666
20667 \begin_layout Plain Layout
20668 class=`insetname_inner'
20669 \end_layout
20670
20671 \end_inset
20672
20673
20674 \begin_inset Quotes erd
20675 \end_inset
20676
20677 .
20678 \end_layout
20679
20680 \begin_layout Description
20681 \begin_inset Flex Code
20682 status collapsed
20683
20684 \begin_layout Plain Layout
20685 HTMLInnerTag
20686 \end_layout
20687
20688 \end_inset
20689
20690  [
20691 \begin_inset Flex Code
20692 status collapsed
20693
20694 \begin_layout Plain Layout
20695 string
20696 \end_layout
20697
20698 \end_inset
20699
20700 ] The inner tag, replacing 
20701 \begin_inset Flex Code
20702 status collapsed
20703
20704 \begin_layout Plain Layout
20705 innertag
20706 \end_layout
20707
20708 \end_inset
20709
20710  in the examples above.
20711  By default, there is none.
20712 \end_layout
20713
20714 \begin_layout Description
20715 \begin_inset Flex Code
20716 status collapsed
20717
20718 \begin_layout Plain Layout
20719 HTMLIsBlock
20720 \end_layout
20721
20722 \end_inset
20723
20724  [
20725 \begin_inset Flex Code
20726 status collapsed
20727
20728 \begin_layout Plain Layout
20729 0,
20730 \emph on
20731 1
20732 \end_layout
20733
20734 \end_inset
20735
20736 ] Whether this inset represents a standalone block of text (such as a footnote)
20737  or instead represents material that is included in the surrounding text
20738  (such as a branch).
20739  Defaults to 1.
20740 \end_layout
20741
20742 \begin_layout Description
20743 \begin_inset Flex Code
20744 status collapsed
20745
20746 \begin_layout Plain Layout
20747 HTMLLabel
20748 \end_layout
20749
20750 \end_inset
20751
20752  [
20753 \begin_inset Flex Code
20754 status collapsed
20755
20756 \begin_layout Plain Layout
20757 string
20758 \end_layout
20759
20760 \end_inset
20761
20762 ] A label for this inset, possibly including a reference to a counter.
20763  For example, for footnote, it might be: 
20764 \begin_inset Flex Code
20765 status collapsed
20766
20767 \begin_layout Plain Layout
20768
20769 \backslash
20770 arabic{footnote}
20771 \end_layout
20772
20773 \end_inset
20774
20775 .
20776  This is optional, and there is no default.
20777 \end_layout
20778
20779 \begin_layout Description
20780 \begin_inset Flex Code
20781 status collapsed
20782
20783 \begin_layout Plain Layout
20784 HTMLPreamble
20785 \end_layout
20786
20787 \end_inset
20788
20789  Information to be output in the 
20790 \begin_inset Flex Code
20791 status collapsed
20792
20793 \begin_layout Plain Layout
20794 <head>
20795 \end_layout
20796
20797 \end_inset
20798
20799  section when this style is used.
20800  This might, for example, be used to include a 
20801 \begin_inset Flex Code
20802 status collapsed
20803
20804 \begin_layout Plain Layout
20805 <script>
20806 \end_layout
20807
20808 \end_inset
20809
20810  block defining an 
20811 \begin_inset Flex Code
20812 status collapsed
20813
20814 \begin_layout Plain Layout
20815 onclick
20816 \end_layout
20817
20818 \end_inset
20819
20820  handler.
20821 \end_layout
20822
20823 \begin_layout Description
20824 \begin_inset Flex Code
20825 status collapsed
20826
20827 \begin_layout Plain Layout
20828 HTMLStyle
20829 \end_layout
20830
20831 \end_inset
20832
20833  CSS style information to be included when this style is used.
20834  Note that this will automatically be wrapped in a layout-generated 
20835 \begin_inset Flex Code
20836 status collapsed
20837
20838 \begin_layout Plain Layout
20839 <style>
20840 \end_layout
20841
20842 \end_inset
20843
20844  block, so only the CSS itself need be included.
20845 \end_layout
20846
20847 \begin_layout Description
20848 \begin_inset Flex Code
20849 status collapsed
20850
20851 \begin_layout Plain Layout
20852 HTMLTag
20853 \end_layout
20854
20855 \end_inset
20856
20857  [
20858 \begin_inset Flex Code
20859 status collapsed
20860
20861 \begin_layout Plain Layout
20862 string
20863 \end_layout
20864
20865 \end_inset
20866
20867 ] The tag to be used for the main label, replacing 
20868 \begin_inset Flex Code
20869 status collapsed
20870
20871 \begin_layout Plain Layout
20872 tag
20873 \end_layout
20874
20875 \end_inset
20876
20877  in the examples above.
20878  The default depends upon the setting of 
20879 \begin_inset Flex Code
20880 status collapsed
20881
20882 \begin_layout Plain Layout
20883 MultiPar
20884 \end_layout
20885
20886 \end_inset
20887
20888 : If 
20889 \begin_inset Flex Code
20890 status collapsed
20891
20892 \begin_layout Plain Layout
20893 MultiPar
20894 \end_layout
20895
20896 \end_inset
20897
20898  is true, the default is 
20899 \begin_inset Flex Code
20900 status collapsed
20901
20902 \begin_layout Plain Layout
20903 div
20904 \end_layout
20905
20906 \end_inset
20907
20908 ; if it is false, the default is 
20909 \begin_inset Flex Code
20910 status collapsed
20911
20912 \begin_layout Plain Layout
20913 span
20914 \end_layout
20915
20916 \end_inset
20917
20918 .
20919 \end_layout
20920
20921 \begin_layout Subsection
20922 Float XHTML
20923 \end_layout
20924
20925 \begin_layout Standard
20926 The XHTML output for floats too can be controlled by layout information.
20927  The output has the following form:
20928 \end_layout
20929
20930 \begin_layout LyX-Code
20931 <tag attr=
20932 \begin_inset Quotes erd
20933 \end_inset
20934
20935 value
20936 \begin_inset Quotes erd
20937 \end_inset
20938
20939 >
20940 \end_layout
20941
20942 \begin_layout LyX-Code
20943 Contents of the float.
20944 \end_layout
20945
20946 \begin_layout LyX-Code
20947 </tag>
20948 \end_layout
20949
20950 \begin_layout Standard
20951 The caption, if there is one, is a separate inset and will be output as
20952  such.
20953  Its appearance can be controlled via the InsetLayout for caption insets.
20954  
20955 \end_layout
20956
20957 \begin_layout Description
20958 \begin_inset Flex Code
20959 status collapsed
20960
20961 \begin_layout Plain Layout
20962 HTMLAttr
20963 \end_layout
20964
20965 \end_inset
20966
20967  [
20968 \begin_inset Flex Code
20969 status collapsed
20970
20971 \begin_layout Plain Layout
20972 string
20973 \end_layout
20974
20975 \end_inset
20976
20977 ] Specifies attribute information to be output with the main tag.
20978  For example, 
20979 \begin_inset Quotes eld
20980 \end_inset
20981
20982
20983 \begin_inset Flex Code
20984 status collapsed
20985
20986 \begin_layout Plain Layout
20987 class=`myfloat' onclick=`\SpecialChar \ldots{}
20988 '
20989 \end_layout
20990
20991 \end_inset
20992
20993
20994 \begin_inset Quotes erd
20995 \end_inset
20996
20997 .
20998  By default, LyX will output 
20999 \begin_inset Quotes eld
21000 \end_inset
21001
21002
21003 \begin_inset Flex Code
21004 status collapsed
21005
21006 \begin_layout Plain Layout
21007 class=`float float-floattype'
21008 \end_layout
21009
21010 \end_inset
21011
21012
21013 \begin_inset Quotes erd
21014 \end_inset
21015
21016 , where 
21017 \begin_inset Flex Code
21018 status collapsed
21019
21020 \begin_layout Plain Layout
21021 floattype
21022 \end_layout
21023
21024 \end_inset
21025
21026  is LyX's name for this type of float, as determined by the float declaration
21027  (see 
21028 \begin_inset CommandInset ref
21029 LatexCommand ref
21030 reference "sub:Floats"
21031
21032 \end_inset
21033
21034 ), though made lowercase and with non-alphanumeric characters converted
21035  to underscores, for example: float-table.
21036 \end_layout
21037
21038 \begin_layout Description
21039 \begin_inset Flex Code
21040 status collapsed
21041
21042 \begin_layout Plain Layout
21043 HTMLStyle
21044 \end_layout
21045
21046 \end_inset
21047
21048  CSS style information to be included when this float is used.
21049  Note that this will automatically be wrapped in a layout-generated 
21050 \begin_inset Flex Code
21051 status collapsed
21052
21053 \begin_layout Plain Layout
21054 <style>
21055 \end_layout
21056
21057 \end_inset
21058
21059  block, so only the CSS itself need be included.
21060 \end_layout
21061
21062 \begin_layout Description
21063 \begin_inset Flex Code
21064 status collapsed
21065
21066 \begin_layout Plain Layout
21067 HTMLTag
21068 \end_layout
21069
21070 \end_inset
21071
21072  [
21073 \begin_inset Flex Code
21074 status collapsed
21075
21076 \begin_layout Plain Layout
21077 string
21078 \end_layout
21079
21080 \end_inset
21081
21082 ] The tag to be used for this float, replacing 
21083 \begin_inset Quotes eld
21084 \end_inset
21085
21086
21087 \begin_inset Flex Code
21088 status collapsed
21089
21090 \begin_layout Plain Layout
21091 tag
21092 \end_layout
21093
21094 \end_inset
21095
21096
21097 \begin_inset Quotes erd
21098 \end_inset
21099
21100  in the example above.
21101  The default is 
21102 \begin_inset Flex Code
21103 status collapsed
21104
21105 \begin_layout Plain Layout
21106 div
21107 \end_layout
21108
21109 \end_inset
21110
21111  and will rarely need changing.
21112 \end_layout
21113
21114 \begin_layout Subsection
21115 Bibliography formatting
21116 \end_layout
21117
21118 \begin_layout Standard
21119 The bibliography can be formatted using 
21120 \begin_inset Flex Code
21121 status collapsed
21122
21123 \begin_layout Plain Layout
21124 CiteFormat
21125 \end_layout
21126
21127 \end_inset
21128
21129  blocks.
21130  See Section 
21131 \begin_inset CommandInset ref
21132 LatexCommand ref
21133 reference "sub:Citation-format-description"
21134
21135 \end_inset
21136
21137  for the details.
21138 \end_layout
21139
21140 \begin_layout Subsection
21141 LyX-generated CSS
21142 \end_layout
21143
21144 \begin_layout Standard
21145 We have several times mentioned that LyX will generate default CSS style
21146  rules for both insets and paragraph styles, based upon the other layout
21147  information that is provided.
21148  In this section, we shall say a word about which layout information LyX
21149  uses and how.
21150 \end_layout
21151
21152 \begin_layout Standard
21153 At present, LyX auto-generates CSS only for font information, making use
21154  of the 
21155 \begin_inset Flex Code
21156 status collapsed
21157
21158 \begin_layout Plain Layout
21159 Family
21160 \end_layout
21161
21162 \end_inset
21163
21164
21165 \begin_inset Flex Code
21166 status collapsed
21167
21168 \begin_layout Plain Layout
21169 Series
21170 \end_layout
21171
21172 \end_inset
21173
21174
21175 \begin_inset Flex Code
21176 status collapsed
21177
21178 \begin_layout Plain Layout
21179 Shape
21180 \end_layout
21181
21182 \end_inset
21183
21184 , and 
21185 \begin_inset Flex Code
21186 status collapsed
21187
21188 \begin_layout Plain Layout
21189 Size
21190 \end_layout
21191
21192 \end_inset
21193
21194  specified in the 
21195 \begin_inset Flex Code
21196 status collapsed
21197
21198 \begin_layout Plain Layout
21199 Font
21200 \end_layout
21201
21202 \end_inset
21203
21204  declaration.
21205  (See 
21206 \begin_inset CommandInset ref
21207 LatexCommand ref
21208 reference "sub:Font-description"
21209
21210 \end_inset
21211
21212 .) The translation is mostly straightforward and obvious.
21213  For example, 
21214 \begin_inset Quotes eld
21215 \end_inset
21216
21217
21218 \begin_inset Flex Code
21219 status collapsed
21220
21221 \begin_layout Plain Layout
21222 Family Sans
21223 \end_layout
21224
21225 \end_inset
21226
21227
21228 \begin_inset Quotes erd
21229 \end_inset
21230
21231  becomes 
21232 \begin_inset Quotes eld
21233 \end_inset
21234
21235
21236 \begin_inset Flex Code
21237 status collapsed
21238
21239 \begin_layout Plain Layout
21240 font-family: sans-serif;
21241 \end_layout
21242
21243 \end_inset
21244
21245
21246 \begin_inset Quotes erd
21247 \end_inset
21248
21249 .
21250  The correspondence of LyX sizes and CSS sizes is a little less obvious
21251  but nonetheless intuitive.
21252  See the 
21253 \begin_inset Flex Code
21254 status collapsed
21255
21256 \begin_layout Plain Layout
21257 getSizeCSS()
21258 \end_layout
21259
21260 \end_inset
21261
21262  function in 
21263 \begin_inset Flex URL
21264 status collapsed
21265
21266 \begin_layout Plain Layout
21267
21268 src/FontInfo.cpp
21269 \end_layout
21270
21271 \end_inset
21272
21273  for the details.
21274 \end_layout
21275
21276 \begin_layout Chapter
21277 Including External Material
21278 \end_layout
21279
21280 \begin_layout Standard
21281 \begin_inset Box Shadowbox
21282 position "t"
21283 hor_pos "c"
21284 has_inner_box 1
21285 inner_pos "t"
21286 use_parbox 0
21287 use_makebox 0
21288 width "100col%"
21289 special "none"
21290 height "1in"
21291 height_special "totalheight"
21292 status open
21293
21294 \begin_layout Plain Layout
21295 WARNING: This portion of the documentation has not been updated for some
21296  time.
21297  We certainly hope that it is still accurate, but there are no guarantees.
21298 \end_layout
21299
21300 \end_inset
21301
21302
21303 \end_layout
21304
21305 \begin_layout Standard
21306 The use of material from sources external to LyX is covered in detail in
21307  the 
21308 \emph on
21309 Embedded Objects
21310 \emph default
21311  manual.
21312  This part of the manual covers what needs to happen behind the scenes for
21313  new sorts of material to be included.
21314 \end_layout
21315
21316 \begin_layout Section
21317 How does it work?
21318 \end_layout
21319
21320 \begin_layout Standard
21321 The external material feature is based on the concept of a 
21322 \emph on
21323 template
21324 \emph default
21325 .
21326  A template is a specification of how LyX should interface with a certain
21327  kind of material.
21328  As bundled, LyX comes with predefined templates for Xfig figures, various
21329  raster format images, chess diagrams, and LilyPond music notation.
21330  You can check the actual list by using the menu 
21331 \begin_inset Flex MenuItem
21332 status collapsed
21333
21334 \begin_layout Plain Layout
21335 Insert\SpecialChar \menuseparator
21336 File\SpecialChar \menuseparator
21337 External Material
21338 \end_layout
21339
21340 \end_inset
21341
21342 .
21343  Furthermore, it is possible to roll your own template to support a specific
21344  kind of material.
21345  Later we'll describe in more detail what is involved, and hopefully you
21346  will submit all the templates you create so we can include them in a later
21347  LyX version.
21348 \end_layout
21349
21350 \begin_layout Standard
21351 Another basic idea of the external material feature is to distinguish between
21352  the original file that serves as a base for final material and the produced
21353  file that is included in your exported or printed document.
21354  For example, consider the case of a figure produced with 
21355 \begin_inset Flex Code
21356 status collapsed
21357
21358 \begin_layout Plain Layout
21359 Xfig
21360 \end_layout
21361
21362 \end_inset
21363
21364 .
21365  The Xfig application itself works on an original file with the 
21366 \begin_inset Flex Code
21367 status collapsed
21368
21369 \begin_layout Plain Layout
21370 .fig
21371 \end_layout
21372
21373 \end_inset
21374
21375  extension.
21376  Within Xfig, you create and change your figure, and when you are done,
21377  you save the 
21378 \begin_inset Flex Code
21379 status collapsed
21380
21381 \begin_layout Plain Layout
21382 fig
21383 \end_layout
21384
21385 \end_inset
21386
21387 -file.
21388  When you want to include the figure in your document, you invoke 
21389 \begin_inset Flex Code
21390 status collapsed
21391
21392 \begin_layout Plain Layout
21393 transfig
21394 \end_layout
21395
21396 \end_inset
21397
21398  in order to create a PostScript file that can readily be included in your
21399  LaTeX file.
21400  In this case, the 
21401 \begin_inset Flex Code
21402 status collapsed
21403
21404 \begin_layout Plain Layout
21405 .fig
21406 \end_layout
21407
21408 \end_inset
21409
21410  file is the original file, and the PostScript file is the produced file.
21411 \end_layout
21412
21413 \begin_layout Standard
21414 This distinction is important in order to allow updating of the material
21415  while you are in the process of writing the document.
21416  Furthermore, it provides us with the flexibility that is needed to support
21417  multiple export formats.
21418  For instance, in the case of a plain text file, it is not exactly an award-winn
21419 ing idea to include the figure as raw PostScript.
21420  Instead, you would either prefer to just include a reference to the figure
21421  or try to invoke some graphics to ASCII converter to make the final result
21422  look similar to the real graphics.
21423  The external material management allows you to do this, because it is parametri
21424 zed on the different export formats that LyX supports.
21425 \end_layout
21426
21427 \begin_layout Standard
21428 Besides supporting the production of different products according to the
21429  exported format, it supports tight integration with editing and viewing
21430  applications.
21431  In the case of an Xfig figure, you are able to invoke Xfig on the original
21432  file with a single click from within the external material dialog in LyX,
21433  and also preview the produced PostScript file with Ghostview with another
21434  click.
21435  No more fiddling around with the command line and/or file browsers to locate
21436  and manipulate the original or produced files.
21437  In this way, you are finally able to take full advantage of the many different
21438  applications that are relevant to use when you write your documents, and
21439  ultimately be more productive.
21440 \end_layout
21441
21442 \begin_layout Section
21443 The external template configuration file
21444 \end_layout
21445
21446 \begin_layout Standard
21447 It is relatively easy to add custom external template definitions to LyX.
21448  However, be aware that doing this in an careless manner most probably 
21449 \emph on
21450 will
21451 \emph default
21452  introduce an easily exploitable security hole.
21453  So before you do this, please read the discussion about security in section
21454  
21455 \begin_inset CommandInset ref
21456 LatexCommand ref
21457 reference "sec:Security-discussion"
21458
21459 \end_inset
21460
21461 .
21462 \end_layout
21463
21464 \begin_layout Standard
21465 Having said that, we encourage you to submit any interesting templates that
21466  you create.
21467  
21468 \end_layout
21469
21470 \begin_layout Standard
21471 The external templates are defined in the 
21472 \begin_inset Flex Code
21473 status collapsed
21474
21475 \begin_layout Plain Layout
21476 LyXDir/lib/external_templates
21477 \end_layout
21478
21479 \end_inset
21480
21481  file.
21482  You can place your own version in 
21483 \begin_inset Flex Code
21484 status collapsed
21485
21486 \begin_layout Plain Layout
21487 UserDir/external_templates
21488 \end_layout
21489
21490 \end_inset
21491
21492 .
21493 \end_layout
21494
21495 \begin_layout Standard
21496 A typical template looks like this:
21497 \end_layout
21498
21499 \begin_layout LyX-Code
21500 Template XFig
21501 \end_layout
21502
21503 \begin_layout LyX-Code
21504 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
21505 \end_layout
21506
21507 \begin_layout LyX-Code
21508 HelpText
21509 \end_layout
21510
21511 \begin_layout LyX-Code
21512 An XFig figure.
21513 \end_layout
21514
21515 \begin_layout LyX-Code
21516 HelpTextEnd
21517 \end_layout
21518
21519 \begin_layout LyX-Code
21520 InputFormat fig
21521 \end_layout
21522
21523 \begin_layout LyX-Code
21524 FileFilter "*.fig"
21525 \end_layout
21526
21527 \begin_layout LyX-Code
21528 AutomaticProduction true
21529 \end_layout
21530
21531 \begin_layout LyX-Code
21532 Transform Rotate
21533 \end_layout
21534
21535 \begin_layout LyX-Code
21536 Transform Resize
21537 \end_layout
21538
21539 \begin_layout LyX-Code
21540 Format LaTeX
21541 \end_layout
21542
21543 \begin_layout LyX-Code
21544 TransformCommand Rotate RotationLatexCommand
21545 \end_layout
21546
21547 \begin_layout LyX-Code
21548 TransformCommand Resize ResizeLatexCommand
21549 \end_layout
21550
21551 \begin_layout LyX-Code
21552 Product "$$RotateFront$$ResizeFront
21553 \end_layout
21554
21555 \begin_layout LyX-Code
21556          
21557 \backslash
21558
21559 \backslash
21560 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
21561 \end_layout
21562
21563 \begin_layout LyX-Code
21564          $$ResizeBack$$RotateBack"
21565 \end_layout
21566
21567 \begin_layout LyX-Code
21568 UpdateFormat pstex
21569 \end_layout
21570
21571 \begin_layout LyX-Code
21572 UpdateResult "$$AbsPath$$Basename.pstex_t"
21573 \end_layout
21574
21575 \begin_layout LyX-Code
21576 Requirement "graphicx"
21577 \end_layout
21578
21579 \begin_layout LyX-Code
21580 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
21581 \end_layout
21582
21583 \begin_layout LyX-Code
21584 ReferencedFile latex "$$AbsPath$$Basename.eps"
21585 \end_layout
21586
21587 \begin_layout LyX-Code
21588 ReferencedFile dvi "$$AbsPath$$Basename.eps"
21589 \end_layout
21590
21591 \begin_layout LyX-Code
21592 FormatEnd
21593 \end_layout
21594
21595 \begin_layout LyX-Code
21596 Format PDFLaTeX
21597 \end_layout
21598
21599 \begin_layout LyX-Code
21600 TransformCommand Rotate RotationLatexCommand
21601 \end_layout
21602
21603 \begin_layout LyX-Code
21604 TransformCommand Resize ResizeLatexCommand
21605 \end_layout
21606
21607 \begin_layout LyX-Code
21608 Product "$$RotateFront$$ResizeFront
21609 \end_layout
21610
21611 \begin_layout LyX-Code
21612          
21613 \backslash
21614
21615 \backslash
21616 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
21617 \end_layout
21618
21619 \begin_layout LyX-Code
21620          $$ResizeBack$$RotateBack"
21621 \end_layout
21622
21623 \begin_layout LyX-Code
21624 UpdateFormat pdftex
21625 \end_layout
21626
21627 \begin_layout LyX-Code
21628 UpdateResult "$$AbsPath$$Basename.pdftex_t"
21629 \end_layout
21630
21631 \begin_layout LyX-Code
21632 Requirement "graphicx"
21633 \end_layout
21634
21635 \begin_layout LyX-Code
21636 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
21637 \end_layout
21638
21639 \begin_layout LyX-Code
21640 ReferencedFile latex "$$AbsPath$$Basename.pdf"
21641 \end_layout
21642
21643 \begin_layout LyX-Code
21644 FormatEnd
21645 \end_layout
21646
21647 \begin_layout LyX-Code
21648 Format Ascii
21649 \end_layout
21650
21651 \begin_layout LyX-Code
21652 Product "$$Contents(
21653 \backslash
21654 "$$AbsPath$$Basename.asc
21655 \backslash
21656 ")"
21657 \end_layout
21658
21659 \begin_layout LyX-Code
21660 UpdateFormat asciixfig
21661 \end_layout
21662
21663 \begin_layout LyX-Code
21664 UpdateResult "$$AbsPath$$Basename.asc"
21665 \end_layout
21666
21667 \begin_layout LyX-Code
21668 FormatEnd
21669 \end_layout
21670
21671 \begin_layout LyX-Code
21672 Format DocBook
21673 \end_layout
21674
21675 \begin_layout LyX-Code
21676 Product "<graphic fileref=
21677 \backslash
21678 "$$AbsOrRelPathMaster$$Basename.eps
21679 \backslash
21680 ">
21681 \end_layout
21682
21683 \begin_layout LyX-Code
21684          </graphic>"
21685 \end_layout
21686
21687 \begin_layout LyX-Code
21688 UpdateFormat eps
21689 \end_layout
21690
21691 \begin_layout LyX-Code
21692 UpdateResult "$$AbsPath$$Basename.eps"
21693 \end_layout
21694
21695 \begin_layout LyX-Code
21696 ReferencedFile docbook "$$AbsPath$$Basename.eps"
21697 \end_layout
21698
21699 \begin_layout LyX-Code
21700 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
21701 \end_layout
21702
21703 \begin_layout LyX-Code
21704 FormatEnd
21705 \end_layout
21706
21707 \begin_layout LyX-Code
21708 Product "[XFig: $$FName]"
21709 \end_layout
21710
21711 \begin_layout LyX-Code
21712 FormatEnd
21713 \end_layout
21714
21715 \begin_layout LyX-Code
21716 TemplateEnd
21717 \end_layout
21718
21719 \begin_layout Standard
21720 As you can see, the template is enclosed in 
21721 \begin_inset Flex Code
21722 status collapsed
21723
21724 \begin_layout Plain Layout
21725 Template
21726 \end_layout
21727
21728 \end_inset
21729
21730  \SpecialChar \ldots{}
21731  
21732 \begin_inset Flex Code
21733 status collapsed
21734
21735 \begin_layout Plain Layout
21736 TemplateEnd
21737 \end_layout
21738
21739 \end_inset
21740
21741 .
21742  It contains a header specifying some general settings and, for each supported
21743  primary document file format, a section 
21744 \begin_inset Flex Code
21745 status collapsed
21746
21747 \begin_layout Plain Layout
21748 Format
21749 \end_layout
21750
21751 \end_inset
21752
21753  \SpecialChar \ldots{}
21754  
21755 \begin_inset Flex Code
21756 status collapsed
21757
21758 \begin_layout Plain Layout
21759 FormatEnd
21760 \end_layout
21761
21762 \end_inset
21763
21764 .
21765 \end_layout
21766
21767 \begin_layout Subsection
21768 The template header
21769 \end_layout
21770
21771 \begin_layout Description
21772 \begin_inset Flex Code
21773 status collapsed
21774
21775 \begin_layout Plain Layout
21776 AutomaticProduction
21777 \begin_inset space ~
21778 \end_inset
21779
21780 true|false
21781 \end_layout
21782
21783 \end_inset
21784
21785  Whether the file represented by the template must be generated by LyX.
21786  This command must occur exactly once.
21787 \end_layout
21788
21789 \begin_layout Description
21790 \begin_inset Flex Code
21791 status collapsed
21792
21793 \begin_layout Plain Layout
21794 FileFilter
21795 \begin_inset space ~
21796 \end_inset
21797
21798 <pattern>
21799 \end_layout
21800
21801 \end_inset
21802
21803  A glob pattern that is used in the file dialog to filter out the desired
21804  files.
21805  If there is more than one possible file extension (e.
21806 \begin_inset space \thinspace{}
21807 \end_inset
21808
21809 g.
21810 \begin_inset space \space{}
21811 \end_inset
21812
21813 tgif has 
21814 \begin_inset Flex Code
21815 status collapsed
21816
21817 \begin_layout Plain Layout
21818 .obj
21819 \end_layout
21820
21821 \end_inset
21822
21823  and 
21824 \begin_inset Flex Code
21825 status collapsed
21826
21827 \begin_layout Plain Layout
21828 .tgo
21829 \end_layout
21830
21831 \end_inset
21832
21833 ), use something like 
21834 \begin_inset Flex Code
21835 status collapsed
21836
21837 \begin_layout Plain Layout
21838 "*.{obj,tgo}"
21839 \end_layout
21840
21841 \end_inset
21842
21843 .
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 GuiName
21853 \begin_inset space ~
21854 \end_inset
21855
21856 <guiname>
21857 \end_layout
21858
21859 \end_inset
21860
21861  The text that is displayed on the button.
21862  This command must occur exactly once.
21863 \end_layout
21864
21865 \begin_layout Description
21866 \begin_inset Flex Code
21867 status collapsed
21868
21869 \begin_layout Plain Layout
21870 HelpText
21871 \begin_inset space ~
21872 \end_inset
21873
21874 <text>
21875 \begin_inset space ~
21876 \end_inset
21877
21878 HelpTextEnd
21879 \end_layout
21880
21881 \end_inset
21882
21883  The help text that is used in the External dialog.
21884  Provide enough information to explain to the user just what the template
21885  can provide him with.
21886  This command must occur exactly once.
21887 \end_layout
21888
21889 \begin_layout Description
21890 \begin_inset Flex Code
21891 status collapsed
21892
21893 \begin_layout Plain Layout
21894 InputFormat
21895 \begin_inset space ~
21896 \end_inset
21897
21898 <format>
21899 \end_layout
21900
21901 \end_inset
21902
21903  The file format of the original file.
21904  This must be the name of a format that is known to LyX (see section
21905 \begin_inset space ~
21906 \end_inset
21907
21908
21909 \begin_inset CommandInset ref
21910 LatexCommand ref
21911 reference "sec:Formats"
21912
21913 \end_inset
21914
21915 ).
21916  Use 
21917 \begin_inset Quotes eld
21918 \end_inset
21919
21920
21921 \begin_inset Flex Code
21922 status collapsed
21923
21924 \begin_layout Plain Layout
21925 *
21926 \end_layout
21927
21928 \end_inset
21929
21930
21931 \begin_inset Quotes erd
21932 \end_inset
21933
21934  if the template can handle original files of more than one format.
21935  LyX will attempt to interrogate the file itself in order to deduce its
21936  format in this case.
21937  This command must occur exactly once.
21938 \end_layout
21939
21940 \begin_layout Description
21941 \begin_inset Flex Code
21942 status collapsed
21943
21944 \begin_layout Plain Layout
21945 Template
21946 \begin_inset space ~
21947 \end_inset
21948
21949 <id>
21950 \end_layout
21951
21952 \end_inset
21953
21954  A unique name for the template.
21955  It must not contain substitution macros (see below).
21956 \end_layout
21957
21958 \begin_layout Description
21959 \begin_inset Flex Code
21960 status collapsed
21961
21962 \begin_layout Plain Layout
21963 Transform
21964 \begin_inset space ~
21965 \end_inset
21966
21967 Rotate|Resize|Clip|Extra
21968 \end_layout
21969
21970 \end_inset
21971
21972  This command specifies which transformations are supported by this template.
21973  It may occur zero or more times.
21974  This command enables the corresponding tabs in the external dialog.
21975  Each 
21976 \begin_inset Flex Code
21977 status collapsed
21978
21979 \begin_layout Plain Layout
21980 Transform
21981 \end_layout
21982
21983 \end_inset
21984
21985  command must have either a corresponding 
21986 \begin_inset Flex Code
21987 status collapsed
21988
21989 \begin_layout Plain Layout
21990 TransformCommand
21991 \end_layout
21992
21993 \end_inset
21994
21995  or a 
21996 \begin_inset Flex Code
21997 status collapsed
21998
21999 \begin_layout Plain Layout
22000 TransformOption
22001 \end_layout
22002
22003 \end_inset
22004
22005  command in the 
22006 \begin_inset Flex Code
22007 status collapsed
22008
22009 \begin_layout Plain Layout
22010 Format
22011 \end_layout
22012
22013 \end_inset
22014
22015  section.
22016  Otherwise the transformation will not be supported by that format.
22017 \end_layout
22018
22019 \begin_layout Subsection
22020 The Format section
22021 \end_layout
22022
22023 \begin_layout Description
22024 \begin_inset Flex Code
22025 status collapsed
22026
22027 \begin_layout Plain Layout
22028 Format
22029 \begin_inset space ~
22030 \end_inset
22031
22032 LaTeX|PDFLaTeX|PlainText|DocBook
22033 \end_layout
22034
22035 \end_inset
22036
22037  The primary document file format that this format definition is for.
22038  Not every template has a sensible representation in all document file formats.
22039  Please define nevertheless a 
22040 \begin_inset Flex Code
22041 status collapsed
22042
22043 \begin_layout Plain Layout
22044 Format
22045 \end_layout
22046
22047 \end_inset
22048
22049  section for all templates.
22050  Use a dummy text when no representation is available.
22051  Then you can at least see a reference to the external material in the exported
22052  document.
22053 \end_layout
22054
22055 \begin_layout Description
22056 \begin_inset Flex Code
22057 status collapsed
22058
22059 \begin_layout Plain Layout
22060 Option
22061 \begin_inset space ~
22062 \end_inset
22063
22064 <name>
22065 \begin_inset space ~
22066 \end_inset
22067
22068 <value>
22069 \end_layout
22070
22071 \end_inset
22072
22073  This command defines an additional macro 
22074 \begin_inset Flex Code
22075 status collapsed
22076
22077 \begin_layout Plain Layout
22078 $$<name>
22079 \end_layout
22080
22081 \end_inset
22082
22083  for substitution in 
22084 \begin_inset Flex Code
22085 status collapsed
22086
22087 \begin_layout Plain Layout
22088 Product
22089 \end_layout
22090
22091 \end_inset
22092
22093 .
22094  
22095 \begin_inset Flex Code
22096 status collapsed
22097
22098 \begin_layout Plain Layout
22099 <value>
22100 \end_layout
22101
22102 \end_inset
22103
22104  itself may contain substitution macros.
22105  The advantage over using 
22106 \begin_inset Flex Code
22107 status collapsed
22108
22109 \begin_layout Plain Layout
22110 <value>
22111 \end_layout
22112
22113 \end_inset
22114
22115  directly in 
22116 \begin_inset Flex Code
22117 status collapsed
22118
22119 \begin_layout Plain Layout
22120 Product
22121 \end_layout
22122
22123 \end_inset
22124
22125  is that the substituted value of 
22126 \begin_inset Flex Code
22127 status collapsed
22128
22129 \begin_layout Plain Layout
22130 $$<name>
22131 \end_layout
22132
22133 \end_inset
22134
22135  is sanitized so that it is a valid optional argument in the document format.
22136  This command may occur zero or more times.
22137 \end_layout
22138
22139 \begin_layout Description
22140 \begin_inset Flex Code
22141 status collapsed
22142
22143 \begin_layout Plain Layout
22144 Product
22145 \begin_inset space ~
22146 \end_inset
22147
22148 <text>
22149 \end_layout
22150
22151 \end_inset
22152
22153  The text that is inserted in the exported document.
22154  This is actually the most important command and can be quite complex.
22155  This command must occur exactly once.
22156 \end_layout
22157
22158 \begin_layout Description
22159 \begin_inset Flex Code
22160 status collapsed
22161
22162 \begin_layout Plain Layout
22163 Preamble
22164 \begin_inset space ~
22165 \end_inset
22166
22167 <name>
22168 \end_layout
22169
22170 \end_inset
22171
22172  This command specifies a preamble snippet that will be included in the
22173  LaTeX preamble.
22174  It has to be defined using 
22175 \begin_inset Flex Code
22176 status collapsed
22177
22178 \begin_layout Plain Layout
22179 PreambleDef
22180 \end_layout
22181
22182 \end_inset
22183
22184  \SpecialChar \ldots{}
22185  
22186 \begin_inset Flex Code
22187 status collapsed
22188
22189 \begin_layout Plain Layout
22190 PreambleDefEnd
22191 \end_layout
22192
22193 \end_inset
22194
22195 .
22196  This command may occur zero or more times.
22197 \end_layout
22198
22199 \begin_layout Description
22200 \begin_inset Flex Code
22201 status collapsed
22202
22203 \begin_layout Plain Layout
22204 ReferencedFile
22205 \begin_inset space ~
22206 \end_inset
22207
22208 <format>
22209 \begin_inset space ~
22210 \end_inset
22211
22212 <filename>
22213 \end_layout
22214
22215 \end_inset
22216
22217  This command denotes files that are created by the conversion process and
22218  are needed for a particular export format.
22219  If the filename is relative, it is interpreted relative to the master document.
22220  This command may be given zero or more times.
22221 \end_layout
22222
22223 \begin_layout Description
22224 \begin_inset Flex Code
22225 status collapsed
22226
22227 \begin_layout Plain Layout
22228 Requirement
22229 \begin_inset space ~
22230 \end_inset
22231
22232 <package>
22233 \end_layout
22234
22235 \end_inset
22236
22237  The name of a required LaTeX package.
22238  The package is included via 
22239 \begin_inset Flex Code
22240 status collapsed
22241
22242 \begin_layout Plain Layout
22243
22244 \backslash
22245 usepackage{}
22246 \end_layout
22247
22248 \end_inset
22249
22250  in the LaTeX preamble.
22251  This command may occur zero or more times.
22252 \end_layout
22253
22254 \begin_layout Description
22255 \begin_inset Flex Code
22256 status collapsed
22257
22258 \begin_layout Plain Layout
22259 TransformCommand
22260 \begin_inset space ~
22261 \end_inset
22262
22263 Rotate
22264 \begin_inset space ~
22265 \end_inset
22266
22267 RotationLatexCommand
22268 \end_layout
22269
22270 \end_inset
22271
22272  This command specifies that the built in LaTeX command should be used for
22273  rotation.
22274  This command may occur once or not at all.
22275 \end_layout
22276
22277 \begin_layout Description
22278 \begin_inset Flex Code
22279 status collapsed
22280
22281 \begin_layout Plain Layout
22282 TransformCommand
22283 \begin_inset space ~
22284 \end_inset
22285
22286 Resize
22287 \begin_inset space ~
22288 \end_inset
22289
22290 ResizeLatexCommand
22291 \end_layout
22292
22293 \end_inset
22294
22295  This command specifies that the built in LaTeX command should be used for
22296  resizing.
22297  This command may occur once or not at all.
22298 \end_layout
22299
22300 \begin_layout Description
22301 \begin_inset Flex Code
22302 status collapsed
22303
22304 \begin_layout Plain Layout
22305 TransformOption
22306 \begin_inset space ~
22307 \end_inset
22308
22309 Rotate
22310 \begin_inset space ~
22311 \end_inset
22312
22313 RotationLatexOption
22314 \end_layout
22315
22316 \end_inset
22317
22318  This command specifies that rotation is done via an optional argument.
22319  This command may occur once or not at all.
22320 \end_layout
22321
22322 \begin_layout Description
22323 \begin_inset Flex Code
22324 status collapsed
22325
22326 \begin_layout Plain Layout
22327 TransformOption
22328 \begin_inset space ~
22329 \end_inset
22330
22331 Resize
22332 \begin_inset space ~
22333 \end_inset
22334
22335 ResizeLatexOption
22336 \end_layout
22337
22338 \end_inset
22339
22340  This command specifies that resizing is done via an optional argument.
22341  This command may occur once or not at all.
22342 \end_layout
22343
22344 \begin_layout Description
22345 \begin_inset Flex Code
22346 status collapsed
22347
22348 \begin_layout Plain Layout
22349 TransformOption
22350 \begin_inset space ~
22351 \end_inset
22352
22353 Clip
22354 \begin_inset space ~
22355 \end_inset
22356
22357 ClipLatexOption
22358 \end_layout
22359
22360 \end_inset
22361
22362  This command specifies that clipping is done via an optional argument.
22363  This command may occur once or not at all.
22364 \end_layout
22365
22366 \begin_layout Description
22367 \begin_inset Flex Code
22368 status collapsed
22369
22370 \begin_layout Plain Layout
22371 TransformOption
22372 \begin_inset space ~
22373 \end_inset
22374
22375 Extra
22376 \begin_inset space ~
22377 \end_inset
22378
22379 ExtraLatexOption
22380 \end_layout
22381
22382 \end_inset
22383
22384  This command specifies that an extra optional argument is used.
22385  This command may occur once or not at all.
22386 \end_layout
22387
22388 \begin_layout Description
22389 \begin_inset Flex Code
22390 status collapsed
22391
22392 \begin_layout Plain Layout
22393 UpdateFormat
22394 \begin_inset space ~
22395 \end_inset
22396
22397 <format>
22398 \end_layout
22399
22400 \end_inset
22401
22402  The file format of the converted file.
22403  This must be the name of a format that is known to LyX (see the 
22404 \begin_inset Flex MenuItem
22405 status collapsed
22406
22407 \begin_layout Plain Layout
22408
22409 \bar under
22410 T
22411 \bar default
22412 ools\SpecialChar \menuseparator
22413
22414 \bar under
22415 P
22416 \bar default
22417 references\SpecialChar \menuseparator
22418 File Handling\SpecialChar \menuseparator
22419 File Format
22420 \end_layout
22421
22422 \end_inset
22423
22424  dialog).
22425  This command must occur exactly once.
22426 \end_layout
22427
22428 \begin_layout Description
22429 \begin_inset Flex Code
22430 status collapsed
22431
22432 \begin_layout Plain Layout
22433 UpdateResult
22434 \begin_inset space ~
22435 \end_inset
22436
22437 <filename>
22438 \end_layout
22439
22440 \end_inset
22441
22442  The file name of the converted file.
22443  The file name must be absolute.
22444  This command must occur exactly once.
22445 \end_layout
22446
22447 \begin_layout Subsection
22448 Preamble definitions
22449 \end_layout
22450
22451 \begin_layout Standard
22452 The external template configuration file may contain additional preamble
22453  definitions enclosed by 
22454 \begin_inset Flex Code
22455 status collapsed
22456
22457 \begin_layout Plain Layout
22458 PreambleDef
22459 \end_layout
22460
22461 \end_inset
22462
22463  \SpecialChar \ldots{}
22464  
22465 \begin_inset Flex Code
22466 status collapsed
22467
22468 \begin_layout Plain Layout
22469 PreambleDefEnd
22470 \end_layout
22471
22472 \end_inset
22473
22474 .
22475  They can be used by the templates in the 
22476 \begin_inset Flex Code
22477 status collapsed
22478
22479 \begin_layout Plain Layout
22480 Format
22481 \end_layout
22482
22483 \end_inset
22484
22485  section.
22486 \end_layout
22487
22488 \begin_layout Section
22489 The substitution mechanism
22490 \end_layout
22491
22492 \begin_layout Standard
22493 When the external material facility invokes an external program, it is done
22494  on the basis of a command defined in the template configuration file.
22495  These commands can contain various macros that are expanded before execution.
22496  Execution always take place in the directory of the containing document.
22497 \end_layout
22498
22499 \begin_layout Standard
22500 Also, whenever external material is to be displayed, the name will be produced
22501  by the substitution mechanism, and most other commands in the template
22502  definition support substitution as well.
22503 \end_layout
22504
22505 \begin_layout Standard
22506 The available macros are the following:
22507 \end_layout
22508
22509 \begin_layout Description
22510 \begin_inset Flex Code
22511 status collapsed
22512
22513 \begin_layout Plain Layout
22514 $$AbsOrRelPathMaster
22515 \end_layout
22516
22517 \end_inset
22518
22519  The file path, absolute or relative to the master LyX document.
22520 \end_layout
22521
22522 \begin_layout Description
22523 \begin_inset Flex Code
22524 status collapsed
22525
22526 \begin_layout Plain Layout
22527 $$AbsOrRelPathParent
22528 \end_layout
22529
22530 \end_inset
22531
22532  The file path, absolute or relative to the LyX document.
22533 \end_layout
22534
22535 \begin_layout Description
22536 \begin_inset Flex Code
22537 status collapsed
22538
22539 \begin_layout Plain Layout
22540 $$AbsPath
22541 \end_layout
22542
22543 \end_inset
22544
22545  The absolute file path.
22546 \end_layout
22547
22548 \begin_layout Description
22549 \begin_inset Flex Code
22550 status collapsed
22551
22552 \begin_layout Plain Layout
22553 $$Basename
22554 \end_layout
22555
22556 \end_inset
22557
22558  The filename without path and without the extension.
22559 \end_layout
22560
22561 \begin_layout Description
22562 \begin_inset Flex Code
22563 status collapsed
22564
22565 \begin_layout Plain Layout
22566 $$Contents(
22567 \begin_inset Quotes eld
22568 \end_inset
22569
22570 filename.ext
22571 \begin_inset Quotes erd
22572 \end_inset
22573
22574 )
22575 \end_layout
22576
22577 \end_inset
22578
22579  This macro will expand to the contents of the file with the name 
22580 \begin_inset Flex Code
22581 status collapsed
22582
22583 \begin_layout Plain Layout
22584 filename.ext
22585 \end_layout
22586
22587 \end_inset
22588
22589 .
22590 \end_layout
22591
22592 \begin_layout Description
22593 \begin_inset Flex Code
22594 status collapsed
22595
22596 \begin_layout Plain Layout
22597 $$Extension
22598 \end_layout
22599
22600 \end_inset
22601
22602  The file extension (including the dot).
22603 \end_layout
22604
22605 \begin_layout Description
22606 \begin_inset Flex Code
22607 status collapsed
22608
22609 \begin_layout Plain Layout
22610 $$FName
22611 \end_layout
22612
22613 \end_inset
22614
22615  The filename of the file specified in the external material dialog.
22616  This is either an absolute name, or it is relative to the LyX document.
22617 \end_layout
22618
22619 \begin_layout Description
22620 \begin_inset Flex Code
22621 status collapsed
22622
22623 \begin_layout Plain Layout
22624 $$FPath
22625 \end_layout
22626
22627 \end_inset
22628
22629  The path part of 
22630 \begin_inset Flex Code
22631 status collapsed
22632
22633 \begin_layout Plain Layout
22634 $$FName
22635 \end_layout
22636
22637 \end_inset
22638
22639  (absolute name or relative to the LyX document).
22640 \end_layout
22641
22642 \begin_layout Description
22643 \begin_inset Flex Code
22644 status collapsed
22645
22646 \begin_layout Plain Layout
22647 $$RelPathMaster
22648 \end_layout
22649
22650 \end_inset
22651
22652  The file path, relative to the master LyX document.
22653 \end_layout
22654
22655 \begin_layout Description
22656 \begin_inset Flex Code
22657 status collapsed
22658
22659 \begin_layout Plain Layout
22660 $$RelPathParent
22661 \end_layout
22662
22663 \end_inset
22664
22665  The file path, relative to the LyX document.
22666 \end_layout
22667
22668 \begin_layout Description
22669 \begin_inset Flex Code
22670 status collapsed
22671
22672 \begin_layout Plain Layout
22673 $$Sysdir
22674 \end_layout
22675
22676 \end_inset
22677
22678  This macro will expand to the absolute path of the system directory.
22679  This is typically used to point to the various helper scripts that are
22680  bundled with LyX.
22681 \end_layout
22682
22683 \begin_layout Description
22684 \begin_inset Flex Code
22685 status collapsed
22686
22687 \begin_layout Plain Layout
22688 $$Tempname
22689 \end_layout
22690
22691 \end_inset
22692
22693  A name and full path to a temporary file which will be automatically deleted
22694  whenever the containing document is closed, or the external material insertion
22695  deleted.
22696 \end_layout
22697
22698 \begin_layout Standard
22699 All path macros contain a trailing directory separator, so you can construct
22700  e.
22701 \begin_inset space \thinspace{}
22702 \end_inset
22703
22704 g.
22705 \begin_inset space \space{}
22706 \end_inset
22707
22708 the absolute filename with 
22709 \begin_inset Flex Code
22710 status collapsed
22711
22712 \begin_layout Plain Layout
22713 $$AbsPath$$Basename$$Extension
22714 \end_layout
22715
22716 \end_inset
22717
22718 .
22719 \end_layout
22720
22721 \begin_layout Standard
22722 The macros above are substituted in all commands unless otherwise noted.
22723  The command 
22724 \begin_inset Flex Code
22725 status collapsed
22726
22727 \begin_layout Plain Layout
22728 Product
22729 \end_layout
22730
22731 \end_inset
22732
22733  supports additionally the following substitutions if they are enabled by
22734  the 
22735 \begin_inset Flex Code
22736 status collapsed
22737
22738 \begin_layout Plain Layout
22739 Transform
22740 \end_layout
22741
22742 \end_inset
22743
22744  and 
22745 \begin_inset Flex Code
22746 status collapsed
22747
22748 \begin_layout Plain Layout
22749 TransformCommand
22750 \end_layout
22751
22752 \end_inset
22753
22754  commands:
22755 \end_layout
22756
22757 \begin_layout Description
22758 \begin_inset Flex Code
22759 status collapsed
22760
22761 \begin_layout Plain Layout
22762 $$ResizeFront
22763 \end_layout
22764
22765 \end_inset
22766
22767  The front part of the resize command.
22768 \end_layout
22769
22770 \begin_layout Description
22771 \begin_inset Flex Code
22772 status collapsed
22773
22774 \begin_layout Plain Layout
22775 $$ResizeBack
22776 \end_layout
22777
22778 \end_inset
22779
22780  The back part of the resize command.
22781 \end_layout
22782
22783 \begin_layout Description
22784 \begin_inset Flex Code
22785 status collapsed
22786
22787 \begin_layout Plain Layout
22788 $$RotateFront
22789 \end_layout
22790
22791 \end_inset
22792
22793  The front part of the rotation command.
22794 \end_layout
22795
22796 \begin_layout Description
22797 \begin_inset Flex Code
22798 status collapsed
22799
22800 \begin_layout Plain Layout
22801 $$RotateBack
22802 \end_layout
22803
22804 \end_inset
22805
22806  The back part of the rotation command.
22807 \end_layout
22808
22809 \begin_layout Standard
22810 The value string of the 
22811 \begin_inset Flex Code
22812 status collapsed
22813
22814 \begin_layout Plain Layout
22815 Option
22816 \end_layout
22817
22818 \end_inset
22819
22820  command supports additionally the following substitutions if they are enabled
22821  by the 
22822 \begin_inset Flex Code
22823 status collapsed
22824
22825 \begin_layout Plain Layout
22826 Transform
22827 \end_layout
22828
22829 \end_inset
22830
22831  and 
22832 \begin_inset Flex Code
22833 status collapsed
22834
22835 \begin_layout Plain Layout
22836 TransformOption
22837 \end_layout
22838
22839 \end_inset
22840
22841  commands:
22842 \end_layout
22843
22844 \begin_layout Description
22845 \begin_inset Flex Code
22846 status collapsed
22847
22848 \begin_layout Plain Layout
22849 $$Clip
22850 \end_layout
22851
22852 \end_inset
22853
22854  The clip option.
22855 \end_layout
22856
22857 \begin_layout Description
22858 \begin_inset Flex Code
22859 status collapsed
22860
22861 \begin_layout Plain Layout
22862 $$Extra
22863 \end_layout
22864
22865 \end_inset
22866
22867  The extra option.
22868 \end_layout
22869
22870 \begin_layout Description
22871 \begin_inset Flex Code
22872 status collapsed
22873
22874 \begin_layout Plain Layout
22875 $$Resize
22876 \end_layout
22877
22878 \end_inset
22879
22880  The resize option.
22881 \end_layout
22882
22883 \begin_layout Description
22884 \begin_inset Flex Code
22885 status collapsed
22886
22887 \begin_layout Plain Layout
22888 $$Rotate
22889 \end_layout
22890
22891 \end_inset
22892
22893  The rotation option.
22894 \end_layout
22895
22896 \begin_layout Standard
22897 You may ask why there are so many path macros.
22898  There are mainly two reasons:
22899 \end_layout
22900
22901 \begin_layout Enumerate
22902 Relative and absolute file names should remain relative or absolute, respectivel
22903 y.
22904  Users may have reasons to prefer either form.
22905  Relative names are useful for portable documents that should work on different
22906  machines, for example.
22907  Absolute names may be required by some programs.
22908 \end_layout
22909
22910 \begin_layout Enumerate
22911 LaTeX treats relative file names differently than LyX and other programs
22912  in nested included files.
22913  For LyX, a relative file name is always relative to the document that contains
22914  the file name.
22915  For LaTeX, it is always relative to the master document.
22916  These two definitions are identical if you have only one document, but
22917  differ if you have a master document that includes part documents.
22918  That means that relative filenames must be transformed when presented to
22919  LaTeX.
22920  Fortunately LyX does this automatically for you if you choose the right
22921  macros.
22922 \end_layout
22923
22924 \begin_layout Standard
22925 So which path macro should be used in new template definitions? The rule
22926  is not difficult:
22927 \end_layout
22928
22929 \begin_layout Itemize
22930 Use 
22931 \begin_inset Flex Code
22932 status collapsed
22933
22934 \begin_layout Plain Layout
22935 $$AbsPath
22936 \end_layout
22937
22938 \end_inset
22939
22940  if an absolute path is required.
22941 \end_layout
22942
22943 \begin_layout Itemize
22944 Use 
22945 \begin_inset Flex Code
22946 status collapsed
22947
22948 \begin_layout Plain Layout
22949 $$AbsOrRelPathMaster
22950 \end_layout
22951
22952 \end_inset
22953
22954  if the substituted string is some kind of LaTeX input.
22955 \end_layout
22956
22957 \begin_layout Itemize
22958 Else use 
22959 \begin_inset Flex Code
22960 status collapsed
22961
22962 \begin_layout Plain Layout
22963 $$AbsOrRelPathParent
22964 \end_layout
22965
22966 \end_inset
22967
22968  in order to preserve the user's choice.
22969 \end_layout
22970
22971 \begin_layout Standard
22972 There are special cases where this rule does not work and e.
22973 \begin_inset space \thinspace{}
22974 \end_inset
22975
22976 g.
22977 \begin_inset space \space{}
22978 \end_inset
22979
22980 relative names are needed, but normally it will work just fine.
22981  One example for such a case is the command 
22982 \begin_inset Flex Code
22983 status collapsed
22984
22985 \begin_layout Plain Layout
22986 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22987 \end_layout
22988
22989 \end_inset
22990
22991  in the XFig template above: We can't use the absolute name because the
22992  copier for 
22993 \begin_inset Flex Code
22994 status collapsed
22995
22996 \begin_layout Plain Layout
22997 .pstex_t
22998 \end_layout
22999
23000 \end_inset
23001
23002  files needs the relative name in order to rewrite the file content.
23003 \end_layout
23004
23005 \begin_layout Section
23006 Security discussion
23007 \begin_inset CommandInset label
23008 LatexCommand label
23009 name "sec:Security-discussion"
23010
23011 \end_inset
23012
23013
23014 \end_layout
23015
23016 \begin_layout Standard
23017 The external material feature interfaces with a lot of external programs
23018  and does so automatically, so we have to consider the security implications
23019  of this.
23020  In particular, since you have the option of including your own filenames
23021  and/or parameter strings and those are expanded into a command, it seems
23022  that it would be possible to create a malicious document which executes
23023  arbitrary commands when a user views or prints the document.
23024  This is something we definitely want to avoid.
23025 \end_layout
23026
23027 \begin_layout Standard
23028 However, since the external program commands are specified in the template
23029  configuration file only, there are no security issues if LyX is properly
23030  configured with safe templates only.
23031  This is so because the external programs are invoked with the 
23032 \begin_inset Flex Code
23033 status collapsed
23034
23035 \begin_layout Plain Layout
23036 execvp
23037 \end_layout
23038
23039 \end_inset
23040
23041 -system call rather than the 
23042 \begin_inset Flex Code
23043 status collapsed
23044
23045 \begin_layout Plain Layout
23046 system
23047 \end_layout
23048
23049 \end_inset
23050
23051  system-call, so it's not possible to execute arbitrary commands from the
23052  filename or parameter section via the shell.
23053 \end_layout
23054
23055 \begin_layout Standard
23056 This also implies that you are restricted in what command strings you can
23057  use in the external material templates.
23058  In particular, pipes and redirection are not readily available.
23059  This has to be so if LyX should remain safe.
23060  If you want to use some of the shell features, you should write a safe
23061  script to do this in a controlled manner, and then invoke the script from
23062  the command string.
23063  
23064 \end_layout
23065
23066 \begin_layout Standard
23067 It is possible to design a template that interacts directly with the shell,
23068  but since this would allow a malicious user to execute arbitrary commands
23069  by writing clever filenames and/or parameters, we generally recommend that
23070  you only use safe scripts that work with the 
23071 \begin_inset Flex Code
23072 status collapsed
23073
23074 \begin_layout Plain Layout
23075 execvp
23076 \end_layout
23077
23078 \end_inset
23079
23080  system call in a controlled manner.
23081  Of course, for use in a controlled environment, it can be tempting to just
23082  fall back to use ordinary shell scripts.
23083  If you do so, be aware that you 
23084 \emph on
23085 will
23086 \emph default
23087  provide an easily exploitable security hole in your system.
23088  Of course it stands to reason that such unsafe templates will never be
23089  included in the standard LyX distribution, although we do encourage people
23090  to submit new templates in the open source tradition.
23091  But LyX as shipped from the official distribution channels will never have
23092  unsafe templates.
23093 \end_layout
23094
23095 \begin_layout Standard
23096 Including external material provides a lot of power, and you have to be
23097  careful not to introduce security hazards with this power.
23098  A subtle error in a single line in an innocent looking script can open
23099  the door to huge security problems.
23100  So if you do not fully understand the issues, we recommend that you consult
23101  a knowledgeable security professional or the LyX development team if you
23102  have any questions about whether a given template is safe or not.
23103  And do this before you use it in an uncontrolled environment.
23104 \end_layout
23105
23106 \end_body
23107 \end_document