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