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