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