]> git.lyx.org Git - features.git/blob - lib/doc/Customization.lyx
f97cd15e4f2b3da879b81c09d1811223f94d0f7b
[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 \change_inserted -195340706 1333913893
14259 \begin_inset Flex Code
14260 status collapsed
14261
14262 \begin_layout Plain Layout
14263 BabelPreamble
14264 \end_layout
14265
14266 \end_inset
14267
14268  Preamble for changing languages. See section
14269 \begin_inset space ~
14270 \end_inset
14271
14272
14273 \begin_inset CommandInset ref
14274 LatexCommand ref
14275 reference "sub:I18n"
14276
14277 \end_inset
14278
14279 .
14280 \end_layout
14281
14282 \begin_layout Description
14283 \begin_inset Flex Code
14284 status collapsed
14285
14286 \begin_layout Plain Layout
14287 BgColor
14288 \end_layout
14289
14290 \end_inset
14291
14292  The color for the inset's background.
14293  The valid colors are defined in 
14294 \begin_inset Flex Code
14295 status collapsed
14296
14297 \begin_layout Plain Layout
14298 src/ColorCode.h
14299 \end_layout
14300
14301 \end_inset
14302
14303 .
14304 \end_layout
14305
14306 \begin_layout Description
14307 \begin_inset Flex Code
14308 status collapsed
14309
14310 \begin_layout Plain Layout
14311 ContentAsLabel
14312 \end_layout
14313
14314 \end_inset
14315
14316  [
14317 \begin_inset Flex Code
14318 status collapsed
14319
14320 \begin_layout Plain Layout
14321
14322 \emph on
14323 0
14324 \end_layout
14325
14326 \end_inset
14327
14328 ,
14329 \begin_inset Flex Code
14330 status collapsed
14331
14332 \begin_layout Plain Layout
14333 1
14334 \end_layout
14335
14336 \end_inset
14337
14338 ] Whether to use the content of the inset as the label, when the inset is
14339  closed.
14340  Default is false.
14341 \end_layout
14342
14343 \begin_layout Description
14344 \begin_inset Flex Code
14345 status collapsed
14346
14347 \begin_layout Plain Layout
14348 CopyStyle
14349 \end_layout
14350
14351 \end_inset
14352
14353  
14354 \begin_inset Flex Code
14355 status collapsed
14356
14357 \begin_layout Plain Layout
14358 [string]
14359 \end_layout
14360
14361 \end_inset
14362
14363  Copies all the features of an existing style into the current one.
14364  
14365 \end_layout
14366
14367 \begin_layout Description
14368 \begin_inset Flex Code
14369 status collapsed
14370
14371 \begin_layout Plain Layout
14372 CustomPars
14373 \end_layout
14374
14375 \end_inset
14376
14377  [
14378 \begin_inset Flex Code
14379 status collapsed
14380
14381 \begin_layout Plain Layout
14382
14383 \emph on
14384 0
14385 \end_layout
14386
14387 \end_inset
14388
14389 ,
14390 \begin_inset Flex Code
14391 status collapsed
14392
14393 \begin_layout Plain Layout
14394 1
14395 \end_layout
14396
14397 \end_inset
14398
14399 ] Indicates whether the user may employ the Paragraph Settings dialog to
14400  customize the paragraph.
14401 \end_layout
14402
14403 \begin_layout Description
14404 \begin_inset Flex Code
14405 status collapsed
14406
14407 \begin_layout Plain Layout
14408 Decoration
14409 \end_layout
14410
14411 \end_inset
14412
14413  can be 
14414 \begin_inset Flex Code
14415 status collapsed
14416
14417 \begin_layout Plain Layout
14418 Classic
14419 \end_layout
14420
14421 \end_inset
14422
14423
14424 \begin_inset Flex Code
14425 status collapsed
14426
14427 \begin_layout Plain Layout
14428 Minimalistic
14429 \end_layout
14430
14431 \end_inset
14432
14433 , or 
14434 \begin_inset Flex Code
14435 status collapsed
14436
14437 \begin_layout Plain Layout
14438 Conglomerate
14439 \end_layout
14440
14441 \end_inset
14442
14443 , describing the rendering style used for the inset's frame and buttons.
14444  Footnotes generally use 
14445 \begin_inset Flex Code
14446 status collapsed
14447
14448 \begin_layout Plain Layout
14449 Classic
14450 \end_layout
14451
14452 \end_inset
14453
14454 , ERT insets generally 
14455 \begin_inset Flex Code
14456 status collapsed
14457
14458 \begin_layout Plain Layout
14459 Minimalistic
14460 \end_layout
14461
14462 \end_inset
14463
14464 , and character styles 
14465 \begin_inset Flex Code
14466 status collapsed
14467
14468 \begin_layout Plain Layout
14469 Conglomerate
14470 \end_layout
14471
14472 \end_inset
14473
14474 .
14475 \end_layout
14476
14477 \begin_layout Description
14478 \begin_inset Flex Code
14479 status collapsed
14480
14481 \begin_layout Plain Layout
14482 Display
14483 \end_layout
14484
14485 \end_inset
14486
14487  [
14488 \begin_inset Flex Code
14489 status collapsed
14490
14491 \begin_layout Plain Layout
14492 0
14493 \end_layout
14494
14495 \end_inset
14496
14497 ,
14498 \begin_inset Flex Code
14499 status collapsed
14500
14501 \begin_layout Plain Layout
14502
14503 \emph on
14504 1
14505 \end_layout
14506
14507 \end_inset
14508
14509 ] Only useful if 
14510 \begin_inset Flex Code
14511 status collapsed
14512
14513 \begin_layout Plain Layout
14514 LatexType
14515 \end_layout
14516
14517 \end_inset
14518
14519  is 
14520 \begin_inset Flex Code
14521 status collapsed
14522
14523 \begin_layout Plain Layout
14524 Environment
14525 \end_layout
14526
14527 \end_inset
14528
14529 .
14530  Indicates whether the environment will stand on its own in LaTeX output
14531  or will appear inline with the surrounding text.
14532  If set to false, it is supposed that the LaTeX environment ignores white
14533  space (including one newline character) after the 
14534 \begin_inset Flex Code
14535 status collapsed
14536
14537 \begin_layout Plain Layout
14538
14539 \backslash
14540 begin{
14541 \emph on
14542 LatexName
14543 \emph default
14544 }
14545 \end_layout
14546
14547 \end_inset
14548
14549  and 
14550 \begin_inset Flex Code
14551 status collapsed
14552
14553 \begin_layout Plain Layout
14554
14555 \backslash
14556 end{
14557 \emph on
14558 LatexName
14559 \emph default
14560 }
14561 \end_layout
14562
14563 \end_inset
14564
14565  tags.
14566  Default is true.
14567 \end_layout
14568
14569 \begin_layout Description
14570 \begin_inset Flex Code
14571 status collapsed
14572
14573 \begin_layout Plain Layout
14574 End
14575 \end_layout
14576
14577 \end_inset
14578
14579  Required at the end of the InsetLayout declarations.
14580 \end_layout
14581
14582 \begin_layout Description
14583 \begin_inset Flex Code
14584 status collapsed
14585
14586 \begin_layout Plain Layout
14587 Font
14588 \end_layout
14589
14590 \end_inset
14591
14592  The font used for both the text body 
14593 \emph on
14594 and
14595 \emph default
14596  the label.
14597  See section
14598 \begin_inset space ~
14599 \end_inset
14600
14601
14602 \begin_inset CommandInset ref
14603 LatexCommand ref
14604 reference "sub:Font-description"
14605
14606 \end_inset
14607
14608 .
14609  Note that defining this font automatically defines the 
14610 \begin_inset Flex Code
14611 status collapsed
14612
14613 \begin_layout Plain Layout
14614 LabelFont
14615 \end_layout
14616
14617 \end_inset
14618
14619  to the same value, so define this first and define 
14620 \begin_inset Flex Code
14621 status collapsed
14622
14623 \begin_layout Plain Layout
14624 LabelFont
14625 \end_layout
14626
14627 \end_inset
14628
14629  later if you want them to be different.
14630 \end_layout
14631
14632 \begin_layout Description
14633 \begin_inset Flex Code
14634 status collapsed
14635
14636 \begin_layout Plain Layout
14637 ForceLTR
14638 \end_layout
14639
14640 \end_inset
14641
14642  Force the 
14643 \begin_inset Quotes eld
14644 \end_inset
14645
14646 latex
14647 \begin_inset Quotes erd
14648 \end_inset
14649
14650  language, leading to Left-to-Right (latin) output, e.
14651 \begin_inset space \thinspace{}
14652 \end_inset
14653
14654 g.
14655 \begin_inset space \space{}
14656 \end_inset
14657
14658 in TeX code or URL.
14659  A kludge.
14660 \end_layout
14661
14662 \begin_layout Description
14663 \begin_inset Flex Code
14664 status collapsed
14665
14666 \begin_layout Plain Layout
14667 ForcePlain
14668 \end_layout
14669
14670 \end_inset
14671
14672  [
14673 \begin_inset Flex Code
14674 status collapsed
14675
14676 \begin_layout Plain Layout
14677
14678 \emph on
14679 0
14680 \end_layout
14681
14682 \end_inset
14683
14684 ,
14685 \begin_inset Flex Code
14686 status collapsed
14687
14688 \begin_layout Plain Layout
14689 1
14690 \end_layout
14691
14692 \end_inset
14693
14694 ] Indicates whether the 
14695 \begin_inset Flex Code
14696 status collapsed
14697
14698 \begin_layout Plain Layout
14699 PlainLayout
14700 \end_layout
14701
14702 \end_inset
14703
14704  should be used or, instead, the user can change the paragraph style used
14705  in the inset.
14706  Default is false.
14707 \end_layout
14708
14709 \begin_layout Description
14710 \begin_inset Flex Code
14711 status collapsed
14712
14713 \begin_layout Plain Layout
14714 FreeSpacing
14715 \end_layout
14716
14717 \end_inset
14718
14719  [
14720 \begin_inset Flex Code
14721 status collapsed
14722
14723 \begin_layout Plain Layout
14724
14725 \emph on
14726 0
14727 \end_layout
14728
14729 \end_inset
14730
14731
14732 \begin_inset Flex Code
14733 status collapsed
14734
14735 \begin_layout Plain Layout
14736 1
14737 \end_layout
14738
14739 \end_inset
14740
14741 ] Usually LyX doesn't allow you to insert more than one space between words,
14742  since a space is considered as the separation between two words, not a
14743  character or symbol of its own.
14744  This is a very fine thing but sometimes annoying, for example, when typing
14745  program code or plain LaTeX code.
14746  For this reason, 
14747 \begin_inset Flex Code
14748 status collapsed
14749
14750 \begin_layout Plain Layout
14751 FreeSpacing
14752 \end_layout
14753
14754 \end_inset
14755
14756  can be enabled.
14757  Note that LyX will create protected blanks for the additional blanks when
14758  in another mode than LaTeX-mode.
14759  Default is false.
14760 \end_layout
14761
14762 \begin_layout Description
14763 \begin_inset Flex Code
14764 status collapsed
14765
14766 \begin_layout Plain Layout
14767 HTML*
14768 \end_layout
14769
14770 \end_inset
14771
14772  These tags control XHTML output.
14773  See section 
14774 \begin_inset CommandInset ref
14775 LatexCommand ref
14776 reference "sec:Tags-for-XHTML"
14777
14778 \end_inset
14779
14780 .
14781 \end_layout
14782
14783 \begin_layout Description
14784 \begin_inset Flex Code
14785 status collapsed
14786
14787 \begin_layout Plain Layout
14788 InToc
14789 \end_layout
14790
14791 \end_inset
14792
14793  [
14794 \begin_inset Flex Code
14795 status collapsed
14796
14797 \begin_layout Plain Layout
14798
14799 \emph on
14800 0
14801 \end_layout
14802
14803 \end_inset
14804
14805 ,
14806 \begin_inset Flex Code
14807 status collapsed
14808
14809 \begin_layout Plain Layout
14810 1
14811 \end_layout
14812
14813 \end_inset
14814
14815 ] Whether to include the contents of this inset in the strings generated
14816  for the `Outline' pane.
14817  One would not, for example, want the content of a footnote in a section
14818  header to be included in the TOC displayed in the outline, but one would
14819  normally want the content of a character style displayed.
14820  Default is false: not to include.
14821 \end_layout
14822
14823 \begin_layout Description
14824 \begin_inset Flex Code
14825 status collapsed
14826
14827 \begin_layout Plain Layout
14828 KeepEmpty
14829 \end_layout
14830
14831 \end_inset
14832
14833  [
14834 \begin_inset Flex Code
14835 status collapsed
14836
14837 \begin_layout Plain Layout
14838
14839 \emph on
14840 0
14841 \end_layout
14842
14843 \end_inset
14844
14845
14846 \begin_inset Flex Code
14847 status collapsed
14848
14849 \begin_layout Plain Layout
14850 1
14851 \end_layout
14852
14853 \end_inset
14854
14855 ] Usually LyX does not allow you to leave a paragraph empty, since it would
14856  lead to empty LaTeX output.
14857  There are some cases where this could be desirable however: in a letter
14858  template, the required fields can be provided as empty fields, so that
14859  people do not forget them; in some special classes, a style can be used
14860  as some kind of break, which does not contain actual text.
14861  Default is false.
14862 \end_layout
14863
14864 \begin_layout Description
14865 \begin_inset Flex Code
14866 status collapsed
14867
14868 \begin_layout Plain Layout
14869 LabelFont
14870 \end_layout
14871
14872 \end_inset
14873
14874  The font used for the label.
14875  See section
14876 \begin_inset space ~
14877 \end_inset
14878
14879
14880 \begin_inset CommandInset ref
14881 LatexCommand ref
14882 reference "sub:Font-description"
14883
14884 \end_inset
14885
14886 .
14887  Note that this definition can never appear before 
14888 \begin_inset Flex Code
14889 status collapsed
14890
14891 \begin_layout Plain Layout
14892 Font
14893 \end_layout
14894
14895 \end_inset
14896
14897 , lest it be ineffective.
14898 \end_layout
14899
14900 \begin_layout Description
14901 \begin_inset Flex Code
14902 status collapsed
14903
14904 \begin_layout Plain Layout
14905 LabelString
14906 \end_layout
14907
14908 \end_inset
14909
14910  What will be displayed on the button or elsewhere as the inset label.
14911  Some inset types (
14912 \begin_inset Flex Code
14913 status collapsed
14914
14915 \begin_layout Plain Layout
14916 TeX code
14917 \end_layout
14918
14919 \end_inset
14920
14921  and 
14922 \begin_inset Flex Code
14923 status collapsed
14924
14925 \begin_layout Plain Layout
14926 Branch
14927 \end_layout
14928
14929 \end_inset
14930
14931 ) modify this label on the fly.
14932
14933 \end_layout
14934
14935 \begin_layout Description
14936 \change_inserted -195340706 1333913893
14937 \begin_inset Flex Code
14938 status collapsed
14939
14940 \begin_layout Plain Layout
14941
14942 LangPreamble
14943 \end_layout
14944
14945 \end_inset
14946
14947  Language dependent preamble.  See section
14948 \begin_inset space ~
14949 \end_inset
14950
14951
14952 \begin_inset CommandInset ref
14953 LatexCommand ref
14954 reference "sub:I18n"
14955
14956 \end_inset
14957
14958 .
14959
14960 \end_layout
14961
14962 \begin_layout Description
14963 \begin_inset Flex Code
14964 status collapsed
14965
14966 \begin_layout Plain Layout
14967 LatexName
14968 \end_layout
14969
14970 \end_inset
14971
14972  The name of the corresponding LaTeX stuff.
14973  Either the environment or command name.
14974 \end_layout
14975
14976 \begin_layout Description
14977 \begin_inset Flex Code
14978 status collapsed
14979
14980 \begin_layout Plain Layout
14981 LatexParam
14982 \end_layout
14983
14984 \end_inset
14985
14986  The optional parameter for the corresponding 
14987 \begin_inset Flex Code
14988 status collapsed
14989
14990 \begin_layout Plain Layout
14991 LatexName
14992 \end_layout
14993
14994 \end_inset
14995
14996  stuff, including possible bracket pairs like 
14997 \begin_inset Flex Code
14998 status collapsed
14999
15000 \begin_layout Plain Layout
15001 []
15002 \end_layout
15003
15004 \end_inset
15005
15006 .
15007  This parameter cannot be changed from within LyX.
15008 \end_layout
15009
15010 \begin_layout Description
15011 \begin_inset Flex Code
15012 status collapsed
15013
15014 \begin_layout Plain Layout
15015 LatexType
15016 \end_layout
15017
15018 \end_inset
15019
15020  [
15021 \begin_inset Flex Code
15022 status collapsed
15023
15024 \begin_layout Plain Layout
15025
15026 \emph on
15027 Paragraph
15028 \emph default
15029 , Command, Environment, Item_Environment,
15030 \end_layout
15031
15032 \end_inset
15033
15034  
15035 \begin_inset Flex Code
15036 status collapsed
15037
15038 \begin_layout Plain Layout
15039 List_Environment, Bib_Environment
15040 \end_layout
15041
15042 \end_inset
15043
15044 ] How the style should be translated into LaTeX.
15045 \begin_inset Foot
15046 status collapsed
15047
15048 \begin_layout Plain Layout
15049 \begin_inset Flex Code
15050 status collapsed
15051
15052 \begin_layout Plain Layout
15053 LatexType
15054 \end_layout
15055
15056 \end_inset
15057
15058  is perhaps a bit misleading, since these rules apply to SGML classes, too.
15059  Visit the SGML class files for specific examples.
15060 \end_layout
15061
15062 \end_inset
15063
15064
15065 \end_layout
15066
15067 \begin_deeper
15068 \begin_layout Itemize
15069 \begin_inset Flex Code
15070 status collapsed
15071
15072 \begin_layout Plain Layout
15073 Paragraph
15074 \end_layout
15075
15076 \end_inset
15077
15078  means nothing special.
15079  
15080 \end_layout
15081
15082 \begin_layout Itemize
15083 \begin_inset Flex Code
15084 status collapsed
15085
15086 \begin_layout Plain Layout
15087 Command
15088 \end_layout
15089
15090 \end_inset
15091
15092  means 
15093 \begin_inset Flex Code
15094 status collapsed
15095
15096 \begin_layout Plain Layout
15097
15098 \backslash
15099
15100 \emph on
15101 LatexName
15102 \emph default
15103 {\SpecialChar \ldots{}
15104 }
15105 \end_layout
15106
15107 \end_inset
15108
15109 .
15110 \end_layout
15111
15112 \begin_layout Itemize
15113 \begin_inset Flex Code
15114 status collapsed
15115
15116 \begin_layout Plain Layout
15117 Environment
15118 \end_layout
15119
15120 \end_inset
15121
15122  means 
15123 \begin_inset Flex Code
15124 status collapsed
15125
15126 \begin_layout Plain Layout
15127
15128 \backslash
15129 begin{
15130 \emph on
15131 LatexName
15132 \emph default
15133 }\SpecialChar \ldots{}
15134
15135 \backslash
15136 end{
15137 \emph on
15138 LatexName
15139 \emph default
15140 }
15141 \end_layout
15142
15143 \end_inset
15144
15145 .
15146  
15147 \end_layout
15148
15149 \begin_layout Itemize
15150 \begin_inset Flex Code
15151 status collapsed
15152
15153 \begin_layout Plain Layout
15154 Item_Environment
15155 \end_layout
15156
15157 \end_inset
15158
15159  is the same as 
15160 \begin_inset Flex Code
15161 status collapsed
15162
15163 \begin_layout Plain Layout
15164 Environment
15165 \end_layout
15166
15167 \end_inset
15168
15169 , except that an 
15170 \begin_inset Flex Code
15171 status collapsed
15172
15173 \begin_layout Plain Layout
15174
15175 \backslash
15176 item
15177 \end_layout
15178
15179 \end_inset
15180
15181  is generated for each paragraph of this environment.
15182  
15183 \end_layout
15184
15185 \begin_layout Itemize
15186 \begin_inset Flex Code
15187 status collapsed
15188
15189 \begin_layout Plain Layout
15190 List_Environment
15191 \end_layout
15192
15193 \end_inset
15194
15195  is the same as 
15196 \begin_inset Flex Code
15197 status collapsed
15198
15199 \begin_layout Plain Layout
15200 Item_Environment
15201 \end_layout
15202
15203 \end_inset
15204
15205 , except that 
15206 \begin_inset Flex Code
15207 status collapsed
15208
15209 \begin_layout Plain Layout
15210 LabelWidthString
15211 \end_layout
15212
15213 \end_inset
15214
15215  is passed as an argument to the environment.
15216  
15217 \begin_inset Flex Code
15218 status collapsed
15219
15220 \begin_layout Plain Layout
15221 LabelWidthString
15222 \end_layout
15223
15224 \end_inset
15225
15226  can be defined in the 
15227 \begin_inset Flex MenuItem
15228 status collapsed
15229
15230 \begin_layout Plain Layout
15231
15232 \bar under
15233 Edit
15234 \bar default
15235 \SpecialChar \menuseparator
15236
15237 \bar under
15238 P
15239 \bar default
15240 aragraph
15241 \begin_inset space ~
15242 \end_inset
15243
15244 settings
15245 \end_layout
15246
15247 \end_inset
15248
15249  dialog.
15250  
15251 \end_layout
15252
15253 \begin_layout Standard
15254 Putting the last few things together, the LaTeX output will be either: 
15255 \end_layout
15256
15257 \begin_layout LyX-Code
15258
15259 \backslash
15260 latexname[latexparam]{\SpecialChar \ldots{}
15261 }
15262 \end_layout
15263
15264 \begin_layout Standard
15265 or: 
15266 \end_layout
15267
15268 \begin_layout LyX-Code
15269
15270 \backslash
15271 begin{latexname}[latexparam] \SpecialChar \ldots{}
15272  
15273 \backslash
15274 end{latexname}.
15275 \end_layout
15276
15277 \begin_layout Standard
15278 depending upon the LaTeX type.
15279 \end_layout
15280
15281 \end_deeper
15282 \begin_layout Description
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  Can be 
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
15303 \begin_inset Flex Code
15304 status collapsed
15305
15306 \begin_layout Plain Layout
15307 custom
15308 \end_layout
15309
15310 \end_inset
15311
15312
15313 \begin_inset Flex Code
15314 status collapsed
15315
15316 \begin_layout Plain Layout
15317 element
15318 \end_layout
15319
15320 \end_inset
15321
15322 , or 
15323 \begin_inset Flex Code
15324 status collapsed
15325
15326 \begin_layout Plain Layout
15327 end
15328 \end_layout
15329
15330 \end_inset
15331
15332  (indicating a dummy definition ending definitions of charstyles, etc).
15333  This entry is required in and is only meaningful for Flex insets.
15334  Among other things, it determines on which menu this inset will appear.
15335  Setting 
15336 \begin_inset Flex Code
15337 status collapsed
15338
15339 \begin_layout Plain Layout
15340 LyXType
15341 \end_layout
15342
15343 \end_inset
15344
15345  to 
15346 \begin_inset Flex Code
15347 status collapsed
15348
15349 \begin_layout Plain Layout
15350 charstyle
15351 \end_layout
15352
15353 \end_inset
15354
15355  will set 
15356 \begin_inset Flex Code
15357 status collapsed
15358
15359 \begin_layout Plain Layout
15360 MultiPar
15361 \end_layout
15362
15363 \end_inset
15364
15365  to false.
15366  
15367 \begin_inset Flex Code
15368 status collapsed
15369
15370 \begin_layout Plain Layout
15371 MultiPar
15372 \end_layout
15373
15374 \end_inset
15375
15376  can be set to true for charstyle insets, if you wish, by setting it 
15377 \emph on
15378 after
15379 \emph default
15380  you set the 
15381 \begin_inset Flex Code
15382 status collapsed
15383
15384 \begin_layout Plain Layout
15385 LyXType
15386 \end_layout
15387
15388 \end_inset
15389
15390 .
15391 \end_layout
15392
15393 \begin_layout Description
15394 \begin_inset Flex Code
15395 status collapsed
15396
15397 \begin_layout Plain Layout
15398 MultiPar
15399 \end_layout
15400
15401 \end_inset
15402
15403  [
15404 \begin_inset Flex Code
15405 status collapsed
15406
15407 \begin_layout Plain Layout
15408
15409 \emph on
15410 0
15411 \end_layout
15412
15413 \end_inset
15414
15415 ,
15416 \begin_inset Flex Code
15417 status collapsed
15418
15419 \begin_layout Plain Layout
15420 1
15421 \end_layout
15422
15423 \end_inset
15424
15425 ] Whether multiple paragraphs are permitted in this inset.
15426  This will also set 
15427 \begin_inset Flex Code
15428 status collapsed
15429
15430 \begin_layout Plain Layout
15431 CustomPars
15432 \end_layout
15433
15434 \end_inset
15435
15436  to the same value and 
15437 \begin_inset Flex Code
15438 status collapsed
15439
15440 \begin_layout Plain Layout
15441 ForcePlain
15442 \end_layout
15443
15444 \end_inset
15445
15446  to the opposite value.
15447  These can be reset to other values, if they are used 
15448 \emph on
15449 after
15450 \emph default
15451  
15452 \begin_inset Flex Code
15453 status collapsed
15454
15455 \begin_layout Plain Layout
15456 MultiPar
15457 \end_layout
15458
15459 \end_inset
15460
15461 .
15462  Default is true.
15463 \end_layout
15464
15465 \begin_layout Description
15466 \begin_inset Flex Code
15467 status collapsed
15468
15469 \begin_layout Plain Layout
15470 NeedProtect
15471 \end_layout
15472
15473 \end_inset
15474
15475  [
15476 \begin_inset Flex Code
15477 status collapsed
15478
15479 \begin_layout Plain Layout
15480
15481 \emph on
15482 0
15483 \end_layout
15484
15485 \end_inset
15486
15487 ,
15488 \begin_inset Flex Code
15489 status collapsed
15490
15491 \begin_layout Plain Layout
15492 1
15493 \end_layout
15494
15495 \end_inset
15496
15497 ] Whether fragile commands in this inset should be 
15498 \begin_inset Flex Code
15499 status collapsed
15500
15501 \begin_layout Plain Layout
15502
15503 \backslash
15504 protect
15505 \end_layout
15506
15507 \end_inset
15508
15509 'ed.
15510  (Note: This is 
15511 \emph on
15512 not
15513 \emph default
15514  whether the command should itself be protected.) Default is false.
15515 \end_layout
15516
15517 \begin_layout Description
15518 \begin_inset Flex Code
15519 status collapsed
15520
15521 \begin_layout Plain Layout
15522 ParbreakIsNewline
15523 \end_layout
15524
15525 \end_inset
15526
15527  [
15528 \begin_inset Flex Code
15529 status collapsed
15530
15531 \begin_layout Plain Layout
15532
15533 \emph on
15534 0
15535 \end_layout
15536
15537 \end_inset
15538
15539
15540 \begin_inset Flex Code
15541 status collapsed
15542
15543 \begin_layout Plain Layout
15544 1
15545 \end_layout
15546
15547 \end_inset
15548
15549 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
15550  output, but only by a line break; together with 
15551 \begin_inset Flex Code
15552 status collapsed
15553
15554 \begin_layout Plain Layout
15555 PassThru 1
15556 \end_layout
15557
15558 \end_inset
15559
15560 , this allows to emulate a plain text editor (like the ERT inset).
15561  Default is false.
15562 \end_layout
15563
15564 \begin_layout Description
15565 \begin_inset Flex Code
15566 status collapsed
15567
15568 \begin_layout Plain Layout
15569 PassThru
15570 \end_layout
15571
15572 \end_inset
15573
15574  [
15575 \begin_inset Flex Code
15576 status collapsed
15577
15578 \begin_layout Plain Layout
15579
15580 \emph on
15581 0
15582 \end_layout
15583
15584 \end_inset
15585
15586
15587 \begin_inset Flex Code
15588 status collapsed
15589
15590 \begin_layout Plain Layout
15591 1
15592 \end_layout
15593
15594 \end_inset
15595
15596 ] Whether the contents of this paragraph should be output in raw form, meaning
15597  without special translations that LaTeX would require.
15598 \end_layout
15599
15600 \begin_layout Description
15601 \begin_inset Flex Code
15602 status collapsed
15603
15604 \begin_layout Plain Layout
15605 Preamble
15606 \end_layout
15607
15608 \end_inset
15609
15610  Information to be included in the LaTeX preamble when this style is used.
15611  Used to define macros, load packages, etc., required by this particular
15612  style.
15613  Must end with 
15614 \begin_inset Quotes eld
15615 \end_inset
15616
15617
15618 \begin_inset Flex Code
15619 status collapsed
15620
15621 \begin_layout Plain Layout
15622 EndPreamble
15623 \end_layout
15624
15625 \end_inset
15626
15627
15628 \begin_inset Quotes erd
15629 \end_inset
15630
15631 .
15632 \end_layout
15633
15634 \begin_layout Description
15635 \begin_inset Flex Code
15636 status collapsed
15637
15638 \begin_layout Plain Layout
15639 RefPrefix
15640 \end_layout
15641
15642 \end_inset
15643
15644  [
15645 \begin_inset Flex Code
15646 status collapsed
15647
15648 \begin_layout Plain Layout
15649 string
15650 \end_layout
15651
15652 \end_inset
15653
15654 ] The prefix to use when creating labels referring to insets of this type.
15655  This allows the use of formatted references.
15656 \end_layout
15657
15658 \begin_layout Description
15659 \begin_inset Flex Code
15660 status collapsed
15661
15662 \begin_layout Plain Layout
15663 Requires
15664 \end_layout
15665
15666 \end_inset
15667
15668  [
15669 \begin_inset Flex Code
15670 status collapsed
15671
15672 \begin_layout Plain Layout
15673 string
15674 \end_layout
15675
15676 \end_inset
15677
15678 ] Whether the style requires the feature 
15679 \begin_inset Flex Code
15680 status collapsed
15681
15682 \begin_layout Plain Layout
15683 string
15684 \end_layout
15685
15686 \end_inset
15687
15688 .
15689  See the description of 
15690 \begin_inset Flex Code
15691 status collapsed
15692
15693 \begin_layout Plain Layout
15694 Provides
15695 \end_layout
15696
15697 \end_inset
15698
15699  above (page 
15700 \begin_inset CommandInset ref
15701 LatexCommand pageref
15702 reference "des:FreeSpacing"
15703
15704 \end_inset
15705
15706 ) for information on `features'.
15707  
15708 \end_layout
15709
15710 \begin_layout Description
15711 \begin_inset Flex Code
15712 status collapsed
15713
15714 \begin_layout Plain Layout
15715 ResetsFont
15716 \end_layout
15717
15718 \end_inset
15719
15720  [
15721 \begin_inset Flex Code
15722 status collapsed
15723
15724 \begin_layout Plain Layout
15725 0
15726 \end_layout
15727
15728 \end_inset
15729
15730 ,
15731 \begin_inset Flex Code
15732 status collapsed
15733
15734 \begin_layout Plain Layout
15735
15736 \emph on
15737 1
15738 \end_layout
15739
15740 \end_inset
15741
15742 ] Whether this inset should use the font of its surrounding environment
15743  or uses its own.
15744  Default is true: uses its own.
15745 \end_layout
15746
15747 \begin_layout Description
15748 \begin_inset Flex Code
15749 status collapsed
15750
15751 \begin_layout Plain Layout
15752 Spellcheck
15753 \end_layout
15754
15755 \end_inset
15756
15757  [
15758 \begin_inset Flex Code
15759 status collapsed
15760
15761 \begin_layout Plain Layout
15762 0
15763 \end_layout
15764
15765 \end_inset
15766
15767 ,
15768 \begin_inset Flex Code
15769 status collapsed
15770
15771 \begin_layout Plain Layout
15772
15773 \emph on
15774 1
15775 \end_layout
15776
15777 \end_inset
15778
15779 ] Spellcheck the contents of this inset.
15780  Default is true.
15781 \end_layout
15782
15783 \begin_layout Subsection
15784 Counters
15785 \begin_inset CommandInset label
15786 LatexCommand label
15787 name "sub:Counters"
15788
15789 \end_inset
15790
15791
15792 \end_layout
15793
15794 \begin_layout Standard
15795 Since version 1.3.0 of LyX, it is both possible and necessary to define the
15796  counters (
15797 \begin_inset Flex MenuItem
15798 status collapsed
15799
15800 \begin_layout Plain Layout
15801 chapter
15802 \end_layout
15803
15804 \end_inset
15805
15806
15807 \begin_inset Flex MenuItem
15808 status collapsed
15809
15810 \begin_layout Plain Layout
15811 figure
15812 \end_layout
15813
15814 \end_inset
15815
15816 , \SpecialChar \ldots{}
15817 ) in the text class itself.
15818  The standard counters are defined in the file 
15819 \begin_inset Flex Code
15820 status collapsed
15821
15822 \begin_layout Plain Layout
15823 stdcounters.inc
15824 \end_layout
15825
15826 \end_inset
15827
15828 , so you may have to do no more than add
15829 \end_layout
15830
15831 \begin_layout LyX-Code
15832 Input stdcounters.inc
15833 \end_layout
15834
15835 \begin_layout Standard
15836 to your layout file to get them to work.
15837  But if you want to define custom counters, then you can do so.
15838  The counter declaration must begin with:
15839 \end_layout
15840
15841 \begin_layout LyX-Code
15842 Counter CounterName
15843 \end_layout
15844
15845 \begin_layout Standard
15846 where of course `
15847 \begin_inset Flex Code
15848 status collapsed
15849
15850 \begin_layout Plain Layout
15851 CounterName
15852 \end_layout
15853
15854 \end_inset
15855
15856 ' is replaced by the name of the counter.
15857  And it must end with 
15858 \begin_inset Quotes eld
15859 \end_inset
15860
15861
15862 \begin_inset Flex Code
15863 status collapsed
15864
15865 \begin_layout Plain Layout
15866 End
15867 \end_layout
15868
15869 \end_inset
15870
15871
15872 \begin_inset Quotes erd
15873 \end_inset
15874
15875 .
15876  The following parameters can also be used:
15877 \end_layout
15878
15879 \begin_layout Description
15880 \begin_inset Flex Code
15881 status collapsed
15882
15883 \begin_layout Plain Layout
15884 LabelString
15885 \end_layout
15886
15887 \end_inset
15888
15889  [
15890 \begin_inset Flex Code
15891 status collapsed
15892
15893 \begin_layout Plain Layout
15894 string
15895 \end_layout
15896
15897 \end_inset
15898
15899 =
15900 \begin_inset Quotes erd
15901 \end_inset
15902
15903
15904 \begin_inset Quotes erd
15905 \end_inset
15906
15907 ] When defined, this string defines how the counter is displayed.
15908  Setting this value sets 
15909 \begin_inset Flex Code
15910 status collapsed
15911
15912 \begin_layout Plain Layout
15913 LabelStringAppendix
15914 \end_layout
15915
15916 \end_inset
15917
15918  to the same value.
15919  The following special constructs can be used in the string:
15920 \end_layout
15921
15922 \begin_deeper
15923 \begin_layout Itemize
15924 \begin_inset Flex Code
15925 status collapsed
15926
15927 \begin_layout Plain Layout
15928
15929 \backslash
15930 thecounter
15931 \end_layout
15932
15933 \end_inset
15934
15935  will be replaced by the expansion of the 
15936 \begin_inset Flex Code
15937 status collapsed
15938
15939 \begin_layout Plain Layout
15940 LabelString
15941 \end_layout
15942
15943 \end_inset
15944
15945  (or 
15946 \begin_inset Flex Code
15947 status collapsed
15948
15949 \begin_layout Plain Layout
15950 LabelStringAppendix
15951 \end_layout
15952
15953 \end_inset
15954
15955 ) of the counter 
15956 \begin_inset Flex Code
15957 status collapsed
15958
15959 \begin_layout Plain Layout
15960 counter
15961 \end_layout
15962
15963 \end_inset
15964
15965 .
15966  
15967 \end_layout
15968
15969 \begin_layout Itemize
15970 counter values can be expressed using LaTeX-like macros 
15971 \begin_inset Flex Code
15972 status collapsed
15973
15974 \begin_layout Plain Layout
15975
15976 \backslash
15977
15978 \emph on
15979 numbertype
15980 \emph default
15981 {
15982 \emph on
15983 counter
15984 \emph default
15985 }
15986 \end_layout
15987
15988 \end_inset
15989
15990 , where 
15991 \begin_inset Flex Code
15992 status collapsed
15993
15994 \begin_layout Plain Layout
15995
15996 \emph on
15997 numbertype
15998 \end_layout
15999
16000 \end_inset
16001
16002  can be:
16003 \begin_inset Foot
16004 status collapsed
16005
16006 \begin_layout Plain Layout
16007
16008 \family roman
16009 \series medium
16010 \shape up
16011 \size normal
16012 \emph off
16013 \bar no
16014 \noun off
16015 \color none
16016 Actually, the situation is a bit more complicated: any
16017 \family default
16018 \series default
16019 \shape default
16020 \emph default
16021 \bar default
16022  
16023 \size default
16024 \emph on
16025 \noun default
16026 \color inherit
16027 numbertype
16028 \family roman
16029 \series medium
16030 \shape up
16031 \size normal
16032 \emph off
16033 \bar no
16034 \noun off
16035  other than those described below will produce arabic numerals.
16036  It would not be surprising to see this change in the future.
16037 \end_layout
16038
16039 \end_inset
16040
16041  
16042 \begin_inset Flex Code
16043 status collapsed
16044
16045 \begin_layout Plain Layout
16046 arabic
16047 \end_layout
16048
16049 \end_inset
16050
16051 : 1, 2, 3,\SpecialChar \ldots{}
16052
16053 \begin_inset Flex Code
16054 status collapsed
16055
16056 \begin_layout Plain Layout
16057 alph
16058 \end_layout
16059
16060 \end_inset
16061
16062  for lower-case letters: a, b, c, \SpecialChar \ldots{}
16063
16064 \begin_inset Flex Code
16065 status collapsed
16066
16067 \begin_layout Plain Layout
16068 Alph
16069 \end_layout
16070
16071 \end_inset
16072
16073  for upper-case letters: A, B, C, \SpecialChar \ldots{}
16074
16075 \begin_inset Flex Code
16076 status collapsed
16077
16078 \begin_layout Plain Layout
16079 roman
16080 \end_layout
16081
16082 \end_inset
16083
16084  for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
16085
16086 \begin_inset Flex Code
16087 status collapsed
16088
16089 \begin_layout Plain Layout
16090 Roman
16091 \end_layout
16092
16093 \end_inset
16094
16095  for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
16096
16097 \begin_inset Flex Code
16098 status collapsed
16099
16100 \begin_layout Plain Layout
16101 hebrew
16102 \end_layout
16103
16104 \end_inset
16105
16106  for hebrew numerals.
16107 \end_layout
16108
16109 \end_deeper
16110 \begin_layout Standard
16111 If LabelString is not defined, a default value is constructed as follows:
16112  if the counter has a master counter 
16113 \begin_inset Flex Code
16114 status collapsed
16115
16116 \begin_layout Plain Layout
16117 master
16118 \end_layout
16119
16120 \end_inset
16121
16122  (defined via 
16123 \begin_inset Flex Code
16124 status collapsed
16125
16126 \begin_layout Plain Layout
16127 Within
16128 \end_layout
16129
16130 \end_inset
16131
16132 ), the string 
16133 \begin_inset Flex Code
16134 status collapsed
16135
16136 \begin_layout Plain Layout
16137
16138 \backslash
16139 themaster.
16140 \backslash
16141 arabic{counter}
16142 \end_layout
16143
16144 \end_inset
16145
16146  is used; otherwise the string 
16147 \begin_inset Flex Code
16148 status collapsed
16149
16150 \begin_layout Plain Layout
16151
16152 \backslash
16153 arabic{counter}
16154 \end_layout
16155
16156 \end_inset
16157
16158  is used.
16159 \end_layout
16160
16161 \begin_layout Description
16162 \begin_inset Flex Code
16163 status collapsed
16164
16165 \begin_layout Plain Layout
16166 LabelStringAppendix
16167 \end_layout
16168
16169 \end_inset
16170
16171  [
16172 \begin_inset Flex Code
16173 status collapsed
16174
16175 \begin_layout Plain Layout
16176 string
16177 \end_layout
16178
16179 \end_inset
16180
16181 =
16182 \begin_inset Quotes erd
16183 \end_inset
16184
16185
16186 \begin_inset Quotes erd
16187 \end_inset
16188
16189 ] Same as 
16190 \begin_inset Flex Code
16191 status collapsed
16192
16193 \begin_layout Plain Layout
16194 LabelString
16195 \end_layout
16196
16197 \end_inset
16198
16199 , but for use in the Appendix.
16200 \end_layout
16201
16202 \begin_layout Description
16203 \begin_inset Flex Code
16204 status collapsed
16205
16206 \begin_layout Plain Layout
16207 PrettyFormat
16208 \end_layout
16209
16210 \end_inset
16211
16212  [
16213 \begin_inset Flex Code
16214 status collapsed
16215
16216 \begin_layout Plain Layout
16217 string
16218 \end_layout
16219
16220 \end_inset
16221
16222 =
16223 \begin_inset Quotes erd
16224 \end_inset
16225
16226
16227 \begin_inset Quotes erd
16228 \end_inset
16229
16230 ] A format for use with formatted references to this counter.
16231  For example, one might want to have references to section numbers appear
16232  as 
16233 \begin_inset Quotes eld
16234 \end_inset
16235
16236 Section 2.4
16237 \begin_inset Quotes erd
16238 \end_inset
16239
16240 .
16241  The string should contain 
16242 \begin_inset Quotes eld
16243 \end_inset
16244
16245 ##
16246 \begin_inset Quotes erd
16247 \end_inset
16248
16249 .
16250  This will be replaced by the counter number itself.
16251  So, for sections, it would be: Section ##.
16252 \end_layout
16253
16254 \begin_layout Description
16255 \begin_inset Flex Code
16256 status collapsed
16257
16258 \begin_layout Plain Layout
16259 Within
16260 \end_layout
16261
16262 \end_inset
16263
16264  [
16265 \begin_inset Flex Code
16266 status collapsed
16267
16268 \begin_layout Plain Layout
16269 string
16270 \end_layout
16271
16272 \end_inset
16273
16274 =
16275 \begin_inset Quotes erd
16276 \end_inset
16277
16278
16279 \begin_inset Quotes erd
16280 \end_inset
16281
16282 ] If this is set to the name of another counter, the present counter will
16283  be reset every time the other one is increased.
16284  For example, 
16285 \begin_inset Flex Code
16286 status collapsed
16287
16288 \begin_layout Plain Layout
16289 subsection
16290 \end_layout
16291
16292 \end_inset
16293
16294  is numbered inside 
16295 \begin_inset Flex Code
16296 status collapsed
16297
16298 \begin_layout Plain Layout
16299 section
16300 \end_layout
16301
16302 \end_inset
16303
16304 .
16305 \end_layout
16306
16307 \begin_layout Subsection
16308 Font description
16309 \begin_inset CommandInset label
16310 LatexCommand label
16311 name "sub:Font-description"
16312
16313 \end_inset
16314
16315
16316 \end_layout
16317
16318 \begin_layout Standard
16319 A font description looks like this:
16320 \end_layout
16321
16322 \begin_layout LyX-Code
16323 Font 
16324 \family roman
16325 \emph on
16326 or
16327 \family default
16328 \emph default
16329  LabelFont
16330 \end_layout
16331
16332 \begin_layout LyX-Code
16333  ...
16334 \end_layout
16335
16336 \begin_layout LyX-Code
16337 EndFont
16338 \end_layout
16339
16340 \begin_layout Standard
16341 The following commands are available:
16342 \end_layout
16343
16344 \begin_layout Description
16345 \begin_inset Flex Code
16346 status collapsed
16347
16348 \begin_layout Plain Layout
16349 Color
16350 \end_layout
16351
16352 \end_inset
16353
16354  [
16355 \begin_inset Flex Code
16356 status collapsed
16357
16358 \begin_layout Plain Layout
16359
16360 \emph on
16361 none
16362 \end_layout
16363
16364 \end_inset
16365
16366
16367 \begin_inset Flex Code
16368 status collapsed
16369
16370 \begin_layout Plain Layout
16371 black
16372 \end_layout
16373
16374 \end_inset
16375
16376
16377 \begin_inset Flex Code
16378 status collapsed
16379
16380 \begin_layout Plain Layout
16381 white
16382 \end_layout
16383
16384 \end_inset
16385
16386
16387 \begin_inset Flex Code
16388 status collapsed
16389
16390 \begin_layout Plain Layout
16391 red
16392 \end_layout
16393
16394 \end_inset
16395
16396
16397 \begin_inset Flex Code
16398 status collapsed
16399
16400 \begin_layout Plain Layout
16401 green
16402 \end_layout
16403
16404 \end_inset
16405
16406
16407 \begin_inset Flex Code
16408 status collapsed
16409
16410 \begin_layout Plain Layout
16411 blue
16412 \end_layout
16413
16414 \end_inset
16415
16416
16417 \begin_inset Flex Code
16418 status collapsed
16419
16420 \begin_layout Plain Layout
16421 cyan
16422 \end_layout
16423
16424 \end_inset
16425
16426
16427 \begin_inset Flex Code
16428 status collapsed
16429
16430 \begin_layout Plain Layout
16431 magenta
16432 \end_layout
16433
16434 \end_inset
16435
16436
16437 \begin_inset Flex Code
16438 status collapsed
16439
16440 \begin_layout Plain Layout
16441 yellow
16442 \end_layout
16443
16444 \end_inset
16445
16446 ]
16447 \end_layout
16448
16449 \begin_layout Description
16450 \begin_inset Flex Code
16451 status collapsed
16452
16453 \begin_layout Plain Layout
16454 Family
16455 \end_layout
16456
16457 \end_inset
16458
16459  [
16460 \begin_inset Flex Code
16461 status collapsed
16462
16463 \begin_layout Plain Layout
16464
16465 \emph on
16466 Roman
16467 \end_layout
16468
16469 \end_inset
16470
16471
16472 \begin_inset Flex Code
16473 status collapsed
16474
16475 \begin_layout Plain Layout
16476 Sans
16477 \end_layout
16478
16479 \end_inset
16480
16481
16482 \begin_inset Flex Code
16483 status collapsed
16484
16485 \begin_layout Plain Layout
16486 Typewriter
16487 \end_layout
16488
16489 \end_inset
16490
16491 ]
16492 \end_layout
16493
16494 \begin_layout Description
16495 \begin_inset Flex Code
16496 status collapsed
16497
16498 \begin_layout Plain Layout
16499 Misc
16500 \end_layout
16501
16502 \end_inset
16503
16504  [
16505 \begin_inset Flex Code
16506 status collapsed
16507
16508 \begin_layout Plain Layout
16509 string
16510 \end_layout
16511
16512 \end_inset
16513
16514 ] Valid arguments are: 
16515 \begin_inset Flex Code
16516 status collapsed
16517
16518 \begin_layout Plain Layout
16519 emph
16520 \end_layout
16521
16522 \end_inset
16523
16524
16525 \begin_inset Flex Code
16526 status collapsed
16527
16528 \begin_layout Plain Layout
16529 noun
16530 \end_layout
16531
16532 \end_inset
16533
16534
16535 \begin_inset Flex Code
16536 status collapsed
16537
16538 \begin_layout Plain Layout
16539 strikeout
16540 \end_layout
16541
16542 \end_inset
16543
16544
16545 \begin_inset Flex Code
16546 status collapsed
16547
16548 \begin_layout Plain Layout
16549 underbar
16550 \end_layout
16551
16552 \end_inset
16553
16554
16555 \begin_inset Flex Code
16556 status collapsed
16557
16558 \begin_layout Plain Layout
16559 uuline
16560 \end_layout
16561
16562 \end_inset
16563
16564
16565 \begin_inset Flex Code
16566 status collapsed
16567
16568 \begin_layout Plain Layout
16569 uwave
16570 \end_layout
16571
16572 \end_inset
16573
16574
16575 \begin_inset Flex Code
16576 status collapsed
16577
16578 \begin_layout Plain Layout
16579 no_emph
16580 \end_layout
16581
16582 \end_inset
16583
16584
16585 \begin_inset Flex Code
16586 status collapsed
16587
16588 \begin_layout Plain Layout
16589 no_noun
16590 \end_layout
16591
16592 \end_inset
16593
16594
16595 \begin_inset Flex Code
16596 status collapsed
16597
16598 \begin_layout Plain Layout
16599 no_strikeout
16600 \end_layout
16601
16602 \end_inset
16603
16604
16605 \begin_inset Flex Code
16606 status collapsed
16607
16608 \begin_layout Plain Layout
16609 no_bar
16610 \end_layout
16611
16612 \end_inset
16613
16614
16615 \begin_inset Flex Code
16616 status collapsed
16617
16618 \begin_layout Plain Layout
16619 no_uuline
16620 \end_layout
16621
16622 \end_inset
16623
16624  and 
16625 \begin_inset Flex Code
16626 status collapsed
16627
16628 \begin_layout Plain Layout
16629 no_uwave
16630 \end_layout
16631
16632 \end_inset
16633
16634 .
16635  Each of these turns on or off the corresponding attribute.
16636  For example, 
16637 \begin_inset Flex Code
16638 status collapsed
16639
16640 \begin_layout Plain Layout
16641 emph
16642 \end_layout
16643
16644 \end_inset
16645
16646  turns on emphasis, and 
16647 \begin_inset Flex Code
16648 status collapsed
16649
16650 \begin_layout Plain Layout
16651 no_emph
16652 \end_layout
16653
16654 \end_inset
16655
16656  turns it off.
16657  
16658 \begin_inset Newline newline
16659 \end_inset
16660
16661 If the latter seems puzzling, remember that the font settings for the present
16662  context are generally inherited from the surrounding context.
16663  So 
16664 \begin_inset Flex Code
16665 status collapsed
16666
16667 \begin_layout Plain Layout
16668 no_emph
16669 \end_layout
16670
16671 \end_inset
16672
16673  would turn off the emphasis that was anyway in effect, say, in a theorem
16674  environment.
16675 \end_layout
16676
16677 \begin_layout Description
16678 \begin_inset Flex Code
16679 status collapsed
16680
16681 \begin_layout Plain Layout
16682 Series
16683 \end_layout
16684
16685 \end_inset
16686
16687  [
16688 \begin_inset Flex Code
16689 status collapsed
16690
16691 \begin_layout Plain Layout
16692
16693 \emph on
16694 Medium
16695 \end_layout
16696
16697 \end_inset
16698
16699
16700 \begin_inset Flex Code
16701 status collapsed
16702
16703 \begin_layout Plain Layout
16704 Bold
16705 \end_layout
16706
16707 \end_inset
16708
16709
16710 \end_layout
16711
16712 \begin_layout Description
16713 \begin_inset Flex Code
16714 status collapsed
16715
16716 \begin_layout Plain Layout
16717 Shape
16718 \end_layout
16719
16720 \end_inset
16721
16722  [
16723 \begin_inset Flex Code
16724 status collapsed
16725
16726 \begin_layout Plain Layout
16727
16728 \emph on
16729 Up
16730 \end_layout
16731
16732 \end_inset
16733
16734
16735 \begin_inset Flex Code
16736 status collapsed
16737
16738 \begin_layout Plain Layout
16739 Italic
16740 \end_layout
16741
16742 \end_inset
16743
16744
16745 \begin_inset Flex Code
16746 status collapsed
16747
16748 \begin_layout Plain Layout
16749 SmallCaps
16750 \end_layout
16751
16752 \end_inset
16753
16754
16755 \begin_inset Flex Code
16756 status collapsed
16757
16758 \begin_layout Plain Layout
16759 Slanted
16760 \end_layout
16761
16762 \end_inset
16763
16764
16765 \end_layout
16766
16767 \begin_layout Description
16768 \begin_inset Flex Code
16769 status collapsed
16770
16771 \begin_layout Plain Layout
16772 Size
16773 \end_layout
16774
16775 \end_inset
16776
16777  [
16778 \begin_inset Flex Code
16779 status collapsed
16780
16781 \begin_layout Plain Layout
16782 tiny
16783 \end_layout
16784
16785 \end_inset
16786
16787
16788 \begin_inset Flex Code
16789 status collapsed
16790
16791 \begin_layout Plain Layout
16792 small
16793 \end_layout
16794
16795 \end_inset
16796
16797
16798 \begin_inset Flex Code
16799 status collapsed
16800
16801 \begin_layout Plain Layout
16802
16803 \emph on
16804 normal
16805 \end_layout
16806
16807 \end_inset
16808
16809
16810 \begin_inset Flex Code
16811 status collapsed
16812
16813 \begin_layout Plain Layout
16814 large
16815 \end_layout
16816
16817 \end_inset
16818
16819
16820 \begin_inset Flex Code
16821 status collapsed
16822
16823 \begin_layout Plain Layout
16824 larger
16825 \end_layout
16826
16827 \end_inset
16828
16829
16830 \begin_inset Flex Code
16831 status collapsed
16832
16833 \begin_layout Plain Layout
16834 largest
16835 \end_layout
16836
16837 \end_inset
16838
16839
16840 \begin_inset Flex Code
16841 status collapsed
16842
16843 \begin_layout Plain Layout
16844 huge
16845 \end_layout
16846
16847 \end_inset
16848
16849
16850 \begin_inset Flex Code
16851 status collapsed
16852
16853 \begin_layout Plain Layout
16854 giant
16855 \end_layout
16856
16857 \end_inset
16858
16859 ]
16860 \end_layout
16861
16862 \begin_layout Subsection
16863 \begin_inset CommandInset label
16864 LatexCommand label
16865 name "sub:Citation-format-description"
16866
16867 \end_inset
16868
16869 Citation format description
16870 \end_layout
16871
16872 \begin_layout Standard
16873 The 
16874 \begin_inset Flex Code
16875 status collapsed
16876
16877 \begin_layout Plain Layout
16878 CiteFormat
16879 \end_layout
16880
16881 \end_inset
16882
16883  blocks are used to describe how bibliographic information should be displayed,
16884  both within LyX itself (in the citation dialog and in tooltips, for example)
16885  and in XHTML output.
16886  Such a block might look like this:
16887 \end_layout
16888
16889 \begin_layout LyX-Code
16890 CiteFormat
16891 \end_layout
16892
16893 \begin_layout LyX-Code
16894  article ...
16895 \end_layout
16896
16897 \begin_layout LyX-Code
16898  book ...
16899 \end_layout
16900
16901 \begin_layout LyX-Code
16902 End
16903 \end_layout
16904
16905 \begin_layout Standard
16906 The individual lines define how the bibliographic information associated
16907  with an article or book, respectively, is to be displayed, and such a definitio
16908 n can be given for any `entry type' that might be present in a BibTeX file.
16909  LyX defines a default format in the source code that will be used if no
16910  specific definition has been given.
16911  LyX predefines several formats in the file 
16912 \begin_inset Flex Code
16913 status collapsed
16914
16915 \begin_layout Plain Layout
16916 stdciteformats.inc
16917 \end_layout
16918
16919 \end_inset
16920
16921 , which is included in most of LyX's document classes.
16922 \end_layout
16923
16924 \begin_layout Standard
16925 The definitions use a simple language that allows BibTeX keys to be replaced
16926  with their values.
16927  Keys should be enclosed in 
16928 \begin_inset Flex Code
16929 status collapsed
16930
16931 \begin_layout Plain Layout
16932 %
16933 \end_layout
16934
16935 \end_inset
16936
16937  signs, e.g.: 
16938 \begin_inset Flex Code
16939 status collapsed
16940
16941 \begin_layout Plain Layout
16942 %author%
16943 \end_layout
16944
16945 \end_inset
16946
16947 .
16948  So a simple definition might look like this:
16949 \end_layout
16950
16951 \begin_layout LyX-Code
16952 misc %author%, 
16953 \begin_inset Quotes eld
16954 \end_inset
16955
16956 %title
16957 \begin_inset Quotes erd
16958 \end_inset
16959
16960 .
16961 \end_layout
16962
16963 \begin_layout Standard
16964 This would print the author, followed by a comma, followed by the title,
16965  in quotes, followed by a period.
16966 \end_layout
16967
16968 \begin_layout Standard
16969 Of course, sometimes you may want to print a key only if it exists.
16970  This can be done by using a conditional construction, such as: 
16971 \begin_inset Flex Code
16972 status collapsed
16973
16974 \begin_layout Plain Layout
16975 {%volume%[[vol.
16976 \begin_inset space ~
16977 \end_inset
16978
16979 %volume%]]}
16980 \end_layout
16981
16982 \end_inset
16983
16984 .
16985  This says: If the 
16986 \begin_inset Flex Code
16987 status collapsed
16988
16989 \begin_layout Plain Layout
16990 volume
16991 \end_layout
16992
16993 \end_inset
16994
16995  key exists, then print 
16996 \begin_inset Quotes eld
16997 \end_inset
16998
16999 vol.
17000 \begin_inset space ~
17001 \end_inset
17002
17003
17004 \begin_inset Quotes erd
17005 \end_inset
17006
17007  followed by the volume key.
17008  It is also possible to have an else clause in the conditional, such as:
17009  
17010 \begin_inset Flex Code
17011 status collapsed
17012
17013 \begin_layout Plain Layout
17014 {%author%[[%author%]][[%editor%, ed.]]}
17015 \end_layout
17016
17017 \end_inset
17018
17019 .
17020  Here, the 
17021 \begin_inset Flex Code
17022 status collapsed
17023
17024 \begin_layout Plain Layout
17025 author
17026 \end_layout
17027
17028 \end_inset
17029
17030  key is printed if it exists; otherwise, the editor key is printed, followed
17031  by 
17032 \begin_inset Quotes eld
17033 \end_inset
17034
17035 ,
17036 \begin_inset space ~
17037 \end_inset
17038
17039 ed.
17040 \begin_inset Quotes erd
17041 \end_inset
17042
17043  Note that the key is again enclosed in 
17044 \begin_inset Flex Code
17045 status collapsed
17046
17047 \begin_layout Plain Layout
17048 %
17049 \end_layout
17050
17051 \end_inset
17052
17053  signs; the entire conditional is enclosed in braces; and the if and else
17054  clauses are enclosed in double brackets, 
17055 \begin_inset Quotes eld
17056 \end_inset
17057
17058
17059 \begin_inset Flex Code
17060 status collapsed
17061
17062 \begin_layout Plain Layout
17063 [[
17064 \end_layout
17065
17066 \end_inset
17067
17068
17069 \begin_inset Quotes eld
17070 \end_inset
17071
17072  and 
17073 \begin_inset Quotes eld
17074 \end_inset
17075
17076
17077 \begin_inset Flex Code
17078 status collapsed
17079
17080 \begin_layout Plain Layout
17081 ]]
17082 \end_layout
17083
17084 \end_inset
17085
17086
17087 \begin_inset Quotes erd
17088 \end_inset
17089
17090 .
17091  There must be no space between any of these.
17092 \end_layout
17093
17094 \begin_layout Standard
17095 There is one other piece of syntax available in definitions, which looks
17096  like this: 
17097 \begin_inset Flex Code
17098 status collapsed
17099
17100 \begin_layout Plain Layout
17101 {!<i>!}
17102 \end_layout
17103
17104 \end_inset
17105
17106 .
17107  This defines a piece of formatting information that is to be used when
17108  creating 
17109 \begin_inset Quotes eld
17110 \end_inset
17111
17112 rich text
17113 \begin_inset Quotes erd
17114 \end_inset
17115
17116 .
17117  Obviously, we do not want to output HTML tags when writing plain text,
17118  so they should be wrapped in 
17119 \begin_inset Quotes eld
17120 \end_inset
17121
17122 {!
17123 \begin_inset Quotes erd
17124 \end_inset
17125
17126  and 
17127 \begin_inset Quotes eld
17128 \end_inset
17129
17130 !}
17131 \begin_inset Quotes erd
17132 \end_inset
17133
17134 .
17135 \end_layout
17136
17137 \begin_layout Standard
17138 Two special sorts of definitions are also possible in a 
17139 \begin_inset Flex Code
17140 status collapsed
17141
17142 \begin_layout Plain Layout
17143 CiteFormat
17144 \end_layout
17145
17146 \end_inset
17147
17148  block.
17149  An example of the first would be:
17150 \end_layout
17151
17152 \begin_layout LyX-Code
17153 !quotetitle 
17154 \begin_inset Quotes eld
17155 \end_inset
17156
17157 %title%
17158 \begin_inset Quotes erd
17159 \end_inset
17160
17161
17162 \end_layout
17163
17164 \begin_layout Standard
17165 This is an abbreviation, or macro, and it can be used by treating it as
17166  if it were a key: 
17167 \begin_inset Flex Code
17168 status collapsed
17169
17170 \begin_layout Plain Layout
17171 %!quotetitle%
17172 \end_layout
17173
17174 \end_inset
17175
17176 .
17177  LyX will treat 
17178 \begin_inset Flex Code
17179 status collapsed
17180
17181 \begin_layout Plain Layout
17182 %!quotetitle%
17183 \end_layout
17184
17185 \end_inset
17186
17187  exactly as it would treat its definition.
17188  So, let us issue the obvious 
17189 \emph on
17190 warning
17191 \emph default
17192 .
17193  Do not do this:
17194 \end_layout
17195
17196 \begin_layout LyX-Code
17197 !funfun %funfun%
17198 \end_layout
17199
17200 \begin_layout Standard
17201 or anything like it.
17202  LyX shouldn't go into an infinite loop, but it may go into a long one before
17203  it gives up.
17204 \end_layout
17205
17206 \begin_layout Standard
17207 The second sort of special definition might look like this:
17208 \end_layout
17209
17210 \begin_layout LyX-Code
17211 _pptext pp.
17212 \end_layout
17213
17214 \begin_layout Standard
17215 This defines a translatable piece of text, which allows relevant parts of
17216  the bibliography to be translated.
17217  It can be included in a definition by treating it as a key: 
17218 \begin_inset Flex Code
17219 status collapsed
17220
17221 \begin_layout Plain Layout
17222 %_pptext%
17223 \end_layout
17224
17225 \end_inset
17226
17227 .
17228  Several of these are predefined in 
17229 \begin_inset Flex Code
17230 status collapsed
17231
17232 \begin_layout Plain Layout
17233 stdciteformats.inc
17234 \end_layout
17235
17236 \end_inset
17237
17238 .
17239  Note that these are not macros, in the sense just defined.
17240  They will not be expanded.
17241 \end_layout
17242
17243 \begin_layout Standard
17244 So here then is an example that use all these features:
17245 \end_layout
17246
17247 \begin_layout LyX-Code
17248 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
17249 \end_layout
17250
17251 \begin_layout Standard
17252 This defines a macro that prints the author, followed by a comma, if the
17253  
17254 \begin_inset Flex Code
17255 status collapsed
17256
17257 \begin_layout Plain Layout
17258 author
17259 \end_layout
17260
17261 \end_inset
17262
17263  key is defined, or else prints the name of the editor, followed by the
17264  
17265 \begin_inset Flex Code
17266 status collapsed
17267
17268 \begin_layout Plain Layout
17269 _edtext
17270 \end_layout
17271
17272 \end_inset
17273
17274  or its translation (it is by default 
17275 \begin_inset Quotes eld
17276 \end_inset
17277
17278 ed.
17279 \begin_inset Quotes erd
17280 \end_inset
17281
17282 ), if the 
17283 \begin_inset Flex Code
17284 status collapsed
17285
17286 \begin_layout Plain Layout
17287 editor
17288 \end_layout
17289
17290 \end_inset
17291
17292  key is defined.
17293  Note that this is in fact defined in 
17294 \begin_inset Flex Code
17295 status collapsed
17296
17297 \begin_layout Plain Layout
17298 stdciteformats.inc
17299 \end_layout
17300
17301 \end_inset
17302
17303 , so you can use it in your own definitions, or re-definitions, if you load
17304  that file first.
17305 \end_layout
17306
17307 \begin_layout Section
17308 \begin_inset CommandInset label
17309 LatexCommand label
17310 name "sec:Tags-for-XHTML"
17311
17312 \end_inset
17313
17314 Tags for XHTML output
17315 \end_layout
17316
17317 \begin_layout Standard
17318 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
17319  by layout information.
17320  In general, LyX provides sensible defaults and, as mentioned earlier, it
17321  will even construct default CSS style rules from the other layout tags.
17322  For example, LyX will attempt to use the information provided in the 
17323 \begin_inset Flex Code
17324 status collapsed
17325
17326 \begin_layout Plain Layout
17327 Font
17328 \end_layout
17329
17330 \end_inset
17331
17332  declaration for the Chapter style to write CSS that will appropriately
17333  format chapter headings.
17334 \end_layout
17335
17336 \begin_layout Standard
17337 In many cases, then, you may not have to do anything at all to get acceptable
17338  XHTML output for your own environments, custom insets, and so forth.
17339  But in some cases you will, and so LyX provides a number of layout tags
17340  that can be used to customize the XHTML and CSS that are generated.
17341 \end_layout
17342
17343 \begin_layout Standard
17344 Note that there are two tags, 
17345 \begin_inset Flex Code
17346 status collapsed
17347
17348 \begin_layout Plain Layout
17349 HTMLPreamble
17350 \end_layout
17351
17352 \end_inset
17353
17354  and 
17355 \begin_inset Flex Code
17356 status collapsed
17357
17358 \begin_layout Plain Layout
17359 AddToHTMLPreamble
17360 \end_layout
17361
17362 \end_inset
17363
17364  that may appear outside style and inset declarations.
17365  See 
17366 \begin_inset CommandInset ref
17367 LatexCommand ref
17368 reference "sub:General-text-class"
17369
17370 \end_inset
17371
17372  for details on these.
17373 \end_layout
17374
17375 \begin_layout Subsection
17376 \begin_inset CommandInset label
17377 LatexCommand label
17378 name "sub:Paragraph-Style-XHTML"
17379
17380 \end_inset
17381
17382 Paragraph styles
17383 \end_layout
17384
17385 \begin_layout Standard
17386 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
17387  dealing with a normal paragraph, a command, or an environment, where this
17388  is itself determined by the contents of the corresponding 
17389 \begin_inset Flex Code
17390 status collapsed
17391
17392 \begin_layout Plain Layout
17393 LaTeXType
17394 \end_layout
17395
17396 \end_inset
17397
17398  tag.
17399  
17400 \end_layout
17401
17402 \begin_layout Standard
17403 For a command or normal paragraph, the output XHTML has the following form:
17404 \end_layout
17405
17406 \begin_layout LyX-Code
17407 <tag attr=
17408 \begin_inset Quotes erd
17409 \end_inset
17410
17411 value
17412 \begin_inset Quotes erd
17413 \end_inset
17414
17415 >
17416 \end_layout
17417
17418 \begin_layout LyX-Code
17419 <labeltag attr=
17420 \begin_inset Quotes erd
17421 \end_inset
17422
17423 value
17424 \begin_inset Quotes erd
17425 \end_inset
17426
17427 >Label</labeltag>
17428 \end_layout
17429
17430 \begin_layout LyX-Code
17431 Contents of the paragraph.
17432 \end_layout
17433
17434 \begin_layout LyX-Code
17435 </tag>
17436 \end_layout
17437
17438 \begin_layout Standard
17439 The label tags are of course omitted if the paragraph does not have a label.
17440 \end_layout
17441
17442 \begin_layout Standard
17443 For an environment that is not some sort of list, the XHTML takes this form:
17444 \end_layout
17445
17446 \begin_layout LyX-Code
17447 <tag attr=
17448 \begin_inset Quotes erd
17449 \end_inset
17450
17451 value
17452 \begin_inset Quotes erd
17453 \end_inset
17454
17455 >
17456 \end_layout
17457
17458 \begin_layout LyX-Code
17459 <itemtag attr=
17460 \begin_inset Quotes erd
17461 \end_inset
17462
17463 value
17464 \begin_inset Quotes erd
17465 \end_inset
17466
17467 ><labeltag attr=
17468 \begin_inset Quotes erd
17469 \end_inset
17470
17471 value
17472 \begin_inset Quotes erd
17473 \end_inset
17474
17475 >Environment Label</labeltag>First paragraph.</itemtag>
17476 \end_layout
17477
17478 \begin_layout LyX-Code
17479 <itemtag>Second paragraph.</itemtag>
17480 \end_layout
17481
17482 \begin_layout LyX-Code
17483 </tag>
17484 \end_layout
17485
17486 \begin_layout Standard
17487 Note that the label is output only for the first paragraph, as it should
17488  be for a theorem, for example.
17489  
17490 \end_layout
17491
17492 \begin_layout Standard
17493 For a list, we have one of these forms:
17494 \end_layout
17495
17496 \begin_layout LyX-Code
17497 <tag attr=
17498 \begin_inset Quotes erd
17499 \end_inset
17500
17501 value
17502 \begin_inset Quotes erd
17503 \end_inset
17504
17505 >
17506 \end_layout
17507
17508 \begin_layout LyX-Code
17509 <itemtag attr=
17510 \begin_inset Quotes erd
17511 \end_inset
17512
17513 value
17514 \begin_inset Quotes erd
17515 \end_inset
17516
17517 ><labeltag attr=
17518 \begin_inset Quotes erd
17519 \end_inset
17520
17521 value
17522 \begin_inset Quotes erd
17523 \end_inset
17524
17525 >List Label</labeltag>First item.</itemtag>
17526 \end_layout
17527
17528 \begin_layout LyX-Code
17529 <itemtag attr=
17530 \begin_inset Quotes erd
17531 \end_inset
17532
17533 value
17534 \begin_inset Quotes erd
17535 \end_inset
17536
17537 ><labeltag attr=
17538 \begin_inset Quotes erd
17539 \end_inset
17540
17541 value
17542 \begin_inset Quotes erd
17543 \end_inset
17544
17545 >List Label</labeltag>Second item.</itemtag>
17546 \end_layout
17547
17548 \begin_layout LyX-Code
17549 </tag>
17550 \end_layout
17551
17552 \begin_layout LyX-Code
17553
17554 \end_layout
17555
17556 \begin_layout LyX-Code
17557 <tag attr=
17558 \begin_inset Quotes erd
17559 \end_inset
17560
17561 value
17562 \begin_inset Quotes erd
17563 \end_inset
17564
17565 >
17566 \end_layout
17567
17568 \begin_layout LyX-Code
17569 <labeltag attr=
17570 \begin_inset Quotes erd
17571 \end_inset
17572
17573 value
17574 \begin_inset Quotes erd
17575 \end_inset
17576
17577 >List Label</labeltag><itemtag attr=
17578 \begin_inset Quotes erd
17579 \end_inset
17580
17581 value
17582 \begin_inset Quotes erd
17583 \end_inset
17584
17585 >First item.</itemtag>
17586 \end_layout
17587
17588 \begin_layout LyX-Code
17589 <labeltag attr=
17590 \begin_inset Quotes erd
17591 \end_inset
17592
17593 value
17594 \begin_inset Quotes erd
17595 \end_inset
17596
17597 >List Label</labeltag><itemtag attr=
17598 \begin_inset Quotes erd
17599 \end_inset
17600
17601 value
17602 \begin_inset Quotes erd
17603 \end_inset
17604
17605 >Second item.</itemtag>
17606 \end_layout
17607
17608 \begin_layout LyX-Code
17609 </tag>
17610 \end_layout
17611
17612 \begin_layout Standard
17613 Note the different orders of 
17614 \begin_inset Flex Code
17615 status collapsed
17616
17617 \begin_layout Plain Layout
17618 labeltag
17619 \end_layout
17620
17621 \end_inset
17622
17623  and 
17624 \begin_inset Flex Code
17625 status collapsed
17626
17627 \begin_layout Plain Layout
17628 itemtag
17629 \end_layout
17630
17631 \end_inset
17632
17633 .
17634  Which order we get depends upon the setting of 
17635 \begin_inset Flex Code
17636 status collapsed
17637
17638 \begin_layout Plain Layout
17639 HTMLLabelFirst
17640 \end_layout
17641
17642 \end_inset
17643
17644 : If 
17645 \begin_inset Flex Code
17646 status collapsed
17647
17648 \begin_layout Plain Layout
17649 HTMLLabelFirst
17650 \end_layout
17651
17652 \end_inset
17653
17654  is false (the default), you get the first of these, with the label within
17655  the item; if true, you get the second, with the label outside the item.
17656 \end_layout
17657
17658 \begin_layout Standard
17659 The specific tags and attributes output for each paragraph type can be controlle
17660 d by means of the layout tags we are about to describe.
17661  As mentioned earlier, however, LyX uses sensible defaults for many of these,
17662  so you often may not need to do very much to get good XHTML output.
17663  Think of the available tags as there so you can tweak things to your liking.
17664 \end_layout
17665
17666 \begin_layout Description
17667 \begin_inset Flex Code
17668 status collapsed
17669
17670 \begin_layout Plain Layout
17671 HTMLAttr
17672 \end_layout
17673
17674 \end_inset
17675
17676  [
17677 \begin_inset Flex Code
17678 status collapsed
17679
17680 \begin_layout Plain Layout
17681 string
17682 \end_layout
17683
17684 \end_inset
17685
17686 ] Specifies attribute information to be output with the main tag.
17687  For example, 
17688 \begin_inset Quotes eld
17689 \end_inset
17690
17691
17692 \begin_inset Flex Code
17693 status collapsed
17694
17695 \begin_layout Plain Layout
17696 class=`mydiv'
17697 \end_layout
17698
17699 \end_inset
17700
17701
17702 \begin_inset Quotes erd
17703 \end_inset
17704
17705 .
17706  By default, LyX will output 
17707 \begin_inset Quotes eld
17708 \end_inset
17709
17710
17711 \begin_inset Flex Code
17712 status collapsed
17713
17714 \begin_layout Plain Layout
17715 class=`layoutname'
17716 \end_layout
17717
17718 \end_inset
17719
17720
17721 \begin_inset Quotes erd
17722 \end_inset
17723
17724 , where 
17725 \begin_inset Flex Code
17726 status collapsed
17727
17728 \begin_layout Plain Layout
17729 layoutname
17730 \end_layout
17731
17732 \end_inset
17733
17734  is the LyX name of the layout, made lowercase, for example: chapter.
17735  This should 
17736 \emph on
17737 not
17738 \emph default
17739  contain any style information.
17740  Use 
17741 \begin_inset Flex Code
17742 status collapsed
17743
17744 \begin_layout Plain Layout
17745 HTMLStyle
17746 \end_layout
17747
17748 \end_inset
17749
17750  for that purpose.
17751 \end_layout
17752
17753 \begin_layout Description
17754 \begin_inset Flex Code
17755 status collapsed
17756
17757 \begin_layout Plain Layout
17758 HTMLForceCSS
17759 \end_layout
17760
17761 \end_inset
17762
17763  [
17764 \begin_inset Flex Code
17765 status collapsed
17766
17767 \begin_layout Plain Layout
17768
17769 \emph on
17770 0
17771 \emph default
17772 ,1
17773 \end_layout
17774
17775 \end_inset
17776
17777 ] Whether to output the default CSS information LyX generates for this layout,
17778  even if additional information is explicitly provided via 
17779 \begin_inset Flex Code
17780 status collapsed
17781
17782 \begin_layout Plain Layout
17783 HTMLStyle
17784 \end_layout
17785
17786 \end_inset
17787
17788 .
17789  Setting this to 
17790 \begin_inset Flex Code
17791 status collapsed
17792
17793 \begin_layout Plain Layout
17794 1
17795 \end_layout
17796
17797 \end_inset
17798
17799  allows you to alter or augment the generated CSS, rather than to override
17800  it completely.
17801  Default is 
17802 \begin_inset Flex Code
17803 status collapsed
17804
17805 \begin_layout Plain Layout
17806 0
17807 \end_layout
17808
17809 \end_inset
17810
17811 .
17812 \end_layout
17813
17814 \begin_layout Description
17815 \begin_inset Flex Code
17816 status collapsed
17817
17818 \begin_layout Plain Layout
17819 HTMLItem
17820 \end_layout
17821
17822 \end_inset
17823
17824  [
17825 \begin_inset Flex Code
17826 status collapsed
17827
17828 \begin_layout Plain Layout
17829 string
17830 \end_layout
17831
17832 \end_inset
17833
17834 ] The tag to be used for individual paragraphs of environments, replacing
17835  
17836 \begin_inset Flex Code
17837 status collapsed
17838
17839 \begin_layout Plain Layout
17840 itemtag
17841 \end_layout
17842
17843 \end_inset
17844
17845  in the examples above.
17846  Defaults to 
17847 \begin_inset Flex Code
17848 status collapsed
17849
17850 \begin_layout Plain Layout
17851 div
17852 \end_layout
17853
17854 \end_inset
17855
17856 .
17857 \end_layout
17858
17859 \begin_layout Description
17860 \begin_inset Flex Code
17861 status collapsed
17862
17863 \begin_layout Plain Layout
17864 HTMLItemAttr
17865 \end_layout
17866
17867 \end_inset
17868
17869  [
17870 \begin_inset Flex Code
17871 status collapsed
17872
17873 \begin_layout Plain Layout
17874 string
17875 \end_layout
17876
17877 \end_inset
17878
17879 ] Attributes for the item tag.
17880  Defaults to 
17881 \begin_inset Quotes eld
17882 \end_inset
17883
17884
17885 \begin_inset Flex Code
17886 status collapsed
17887
17888 \begin_layout Plain Layout
17889 class=`layoutname_item'
17890 \end_layout
17891
17892 \end_inset
17893
17894
17895 \begin_inset Quotes erd
17896 \end_inset
17897
17898 .
17899  This should 
17900 \emph on
17901 not
17902 \emph default
17903  contain any style information.
17904  Use 
17905 \begin_inset Flex Code
17906 status collapsed
17907
17908 \begin_layout Plain Layout
17909 HTMLStyle
17910 \end_layout
17911
17912 \end_inset
17913
17914  for that purpose.
17915 \end_layout
17916
17917 \begin_layout Description
17918 \begin_inset Flex Code
17919 status collapsed
17920
17921 \begin_layout Plain Layout
17922 HTMLLabel
17923 \end_layout
17924
17925 \end_inset
17926
17927  [
17928 \begin_inset Flex Code
17929 status collapsed
17930
17931 \begin_layout Plain Layout
17932 string
17933 \end_layout
17934
17935 \end_inset
17936
17937 ] The tag to be used for paragraph and item labels, replacing 
17938 \begin_inset Flex Code
17939 status collapsed
17940
17941 \begin_layout Plain Layout
17942 labeltag
17943 \end_layout
17944
17945 \end_inset
17946
17947  in the examples above.
17948  Defaults to 
17949 \begin_inset Flex Code
17950 status collapsed
17951
17952 \begin_layout Plain Layout
17953 span
17954 \end_layout
17955
17956 \end_inset
17957
17958 , unless 
17959 \begin_inset Flex Code
17960 status collapsed
17961
17962 \begin_layout Plain Layout
17963 LabelType
17964 \end_layout
17965
17966 \end_inset
17967
17968  is either 
17969 \begin_inset Flex Code
17970 status collapsed
17971
17972 \begin_layout Plain Layout
17973 Top_Environment
17974 \end_layout
17975
17976 \end_inset
17977
17978  or 
17979 \begin_inset Flex Code
17980 status collapsed
17981
17982 \begin_layout Plain Layout
17983 Centered_Top_Environment
17984 \end_layout
17985
17986 \end_inset
17987
17988 , in which case it defaults to 
17989 \begin_inset Flex Code
17990 status collapsed
17991
17992 \begin_layout Plain Layout
17993 div
17994 \end_layout
17995
17996 \end_inset
17997
17998 .
17999 \end_layout
18000
18001 \begin_layout Description
18002 \begin_inset Flex Code
18003 status collapsed
18004
18005 \begin_layout Plain Layout
18006 HTMLLabelAttr
18007 \end_layout
18008
18009 \end_inset
18010
18011  [
18012 \begin_inset Flex Code
18013 status collapsed
18014
18015 \begin_layout Plain Layout
18016 string
18017 \end_layout
18018
18019 \end_inset
18020
18021 ] Attributes for the label tag.
18022  Defaults to 
18023 \begin_inset Quotes eld
18024 \end_inset
18025
18026
18027 \begin_inset Flex Code
18028 status collapsed
18029
18030 \begin_layout Plain Layout
18031 class=`layoutname_label'
18032 \end_layout
18033
18034 \end_inset
18035
18036
18037 \begin_inset Quotes erd
18038 \end_inset
18039
18040 .
18041  This should 
18042 \emph on
18043 not
18044 \emph default
18045  contain any style information.
18046  Use 
18047 \begin_inset Flex Code
18048 status collapsed
18049
18050 \begin_layout Plain Layout
18051 HTMLStyle
18052 \end_layout
18053
18054 \end_inset
18055
18056  for that purpose.
18057 \end_layout
18058
18059 \begin_layout Description
18060 \begin_inset Flex Code
18061 status collapsed
18062
18063 \begin_layout Plain Layout
18064 HTMLLabelFirst
18065 \end_layout
18066
18067 \end_inset
18068
18069  [
18070 \begin_inset Flex Code
18071 status collapsed
18072
18073 \begin_layout Plain Layout
18074
18075 \emph on
18076 0
18077 \emph default
18078 ,1
18079 \end_layout
18080
18081 \end_inset
18082
18083 ] Meaningful only for list-like environments, this tag controls whether
18084  the label tag is output before or inside the item tag.
18085  This is used, for example, in the description environment, where we want
18086  `
18087 \begin_inset Flex Code
18088 status collapsed
18089
18090 \begin_layout Plain Layout
18091 <dt>\SpecialChar \ldots{}
18092 </dt><dd>\SpecialChar \ldots{}
18093 </dd>
18094 \end_layout
18095
18096 \end_inset
18097
18098 .
18099  Default is 
18100 \begin_inset Flex Code
18101 status collapsed
18102
18103 \begin_layout Plain Layout
18104 0
18105 \end_layout
18106
18107 \end_inset
18108
18109 : The label tag is output inside the item tag.
18110 \end_layout
18111
18112 \begin_layout Description
18113 \begin_inset Flex Code
18114 status collapsed
18115
18116 \begin_layout Plain Layout
18117 HTMLPreamble
18118 \end_layout
18119
18120 \end_inset
18121
18122  Information to be output in the 
18123 \begin_inset Flex Code
18124 status collapsed
18125
18126 \begin_layout Plain Layout
18127 <head>
18128 \end_layout
18129
18130 \end_inset
18131
18132  section when this style is used.
18133  This might, for example, be used to include a 
18134 \begin_inset Flex Code
18135 status collapsed
18136
18137 \begin_layout Plain Layout
18138 <script>
18139 \end_layout
18140
18141 \end_inset
18142
18143  block defining an 
18144 \begin_inset Flex Code
18145 status collapsed
18146
18147 \begin_layout Plain Layout
18148 onclick
18149 \end_layout
18150
18151 \end_inset
18152
18153  handler.
18154 \end_layout
18155
18156 \begin_layout Description
18157 \begin_inset Flex Code
18158 status collapsed
18159
18160 \begin_layout Plain Layout
18161 HTMLStyle
18162 \end_layout
18163
18164 \end_inset
18165
18166  CSS style information to be included when this style is used.
18167  Note that this will automatically be wrapped in a layout-generated 
18168 \begin_inset Flex Code
18169 status collapsed
18170
18171 \begin_layout Plain Layout
18172 <style>
18173 \end_layout
18174
18175 \end_inset
18176
18177  block, so only the CSS itself need be included.
18178 \end_layout
18179
18180 \begin_layout Description
18181 \begin_inset Flex Code
18182 status collapsed
18183
18184 \begin_layout Plain Layout
18185 HTMLTag
18186 \end_layout
18187
18188 \end_inset
18189
18190  [
18191 \begin_inset Flex Code
18192 status collapsed
18193
18194 \begin_layout Plain Layout
18195 string
18196 \end_layout
18197
18198 \end_inset
18199
18200 ] The tag to be used for the main label, replacing 
18201 \begin_inset Flex Code
18202 status collapsed
18203
18204 \begin_layout Plain Layout
18205 tag
18206 \end_layout
18207
18208 \end_inset
18209
18210  in the examples above.
18211  Defaults to 
18212 \begin_inset Flex Code
18213 status collapsed
18214
18215 \begin_layout Plain Layout
18216 div
18217 \end_layout
18218
18219 \end_inset
18220
18221 .
18222 \end_layout
18223
18224 \begin_layout Description
18225 \begin_inset Flex Code
18226 status collapsed
18227
18228 \begin_layout Plain Layout
18229 HTMLTitle
18230 \end_layout
18231
18232 \end_inset
18233
18234  [
18235 \begin_inset Flex Code
18236 status collapsed
18237
18238 \begin_layout Plain Layout
18239
18240 \emph on
18241 0
18242 \emph default
18243 ,1
18244 \end_layout
18245
18246 \end_inset
18247
18248 ] Marks this style as the one to be used to generate the 
18249 \begin_inset Flex Code
18250 status collapsed
18251
18252 \begin_layout Plain Layout
18253 <title>
18254 \end_layout
18255
18256 \end_inset
18257
18258  tag for the XHTML file.
18259  By default, it is false.
18260  The 
18261 \begin_inset Flex Code
18262 status collapsed
18263
18264 \begin_layout Plain Layout
18265 stdtitle.inc
18266 \end_layout
18267
18268 \end_inset
18269
18270  file sets it to true for the 
18271 \begin_inset Flex Code
18272 status collapsed
18273
18274 \begin_layout Plain Layout
18275 title
18276 \end_layout
18277
18278 \end_inset
18279
18280  environment.
18281  
18282 \end_layout
18283
18284 \begin_layout Subsection
18285 InsetLayout XHTML
18286 \end_layout
18287
18288 \begin_layout Standard
18289 The XHTML output of insets can also be controlled by information in layout
18290  files.
18291 \begin_inset Foot
18292 status collapsed
18293
18294 \begin_layout Plain Layout
18295 At present, this is true only for 
18296 \begin_inset Quotes eld
18297 \end_inset
18298
18299 text
18300 \begin_inset Quotes erd
18301 \end_inset
18302
18303  insets (insets you can type into) and is not true for 
18304 \begin_inset Quotes eld
18305 \end_inset
18306
18307 command
18308 \begin_inset Quotes erd
18309 \end_inset
18310
18311  insets (insets that are associated with dialog boxes).
18312 \end_layout
18313
18314 \end_inset
18315
18316  Here, too, LyX tries to provide sensible defaults, and it constructs default
18317  CSS style rules.
18318  But everything can be customized.
18319 \end_layout
18320
18321 \begin_layout Standard
18322 The XHTML LyX outputs for an inset has the following form:
18323 \end_layout
18324
18325 \begin_layout LyX-Code
18326 <tag attr=
18327 \begin_inset Quotes erd
18328 \end_inset
18329
18330 value
18331 \begin_inset Quotes erd
18332 \end_inset
18333
18334 >
18335 \end_layout
18336
18337 \begin_layout LyX-Code
18338 <labeltag>Label</labeltag>
18339 \end_layout
18340
18341 \begin_layout LyX-Code
18342 <innertag attr=
18343 \begin_inset Quotes erd
18344 \end_inset
18345
18346 value
18347 \begin_inset Quotes erd
18348 \end_inset
18349
18350 >Contents of the inset.</innertag>
18351 \end_layout
18352
18353 \begin_layout LyX-Code
18354 </tag>
18355 \end_layout
18356
18357 \begin_layout Standard
18358 If the inset permits multiple paragraphs---that is, if 
18359 \begin_inset Flex Code
18360 status collapsed
18361
18362 \begin_layout Plain Layout
18363 MultiPar
18364 \end_layout
18365
18366 \end_inset
18367
18368  is true---then the contents of the inset will itself be output as paragraphs
18369  formatted according to the styles used for those paragraphs (standard,
18370  quote, and the like).
18371  The label tag is of course omitted if the paragraph does not have a label
18372  and, at present, is always 
18373 \begin_inset Flex Code
18374 status collapsed
18375
18376 \begin_layout Plain Layout
18377 span
18378 \end_layout
18379
18380 \end_inset
18381
18382 .
18383  The inner tag is optional and, by default, does not appear.
18384 \end_layout
18385
18386 \begin_layout Standard
18387 The specific tags and attributes output for each inset can be controlled
18388  by means of the following layout tags.
18389 \end_layout
18390
18391 \begin_layout Description
18392 \begin_inset Flex Code
18393 status collapsed
18394
18395 \begin_layout Plain Layout
18396 HTMLAttr
18397 \end_layout
18398
18399 \end_inset
18400
18401  [
18402 \begin_inset Flex Code
18403 status collapsed
18404
18405 \begin_layout Plain Layout
18406 string
18407 \end_layout
18408
18409 \end_inset
18410
18411 ] Specifies attribute information to be output with the main tag.
18412  For example, 
18413 \begin_inset Quotes eld
18414 \end_inset
18415
18416
18417 \begin_inset Flex Code
18418 status collapsed
18419
18420 \begin_layout Plain Layout
18421 class=`myinset' onclick=`\SpecialChar \ldots{}
18422 '
18423 \end_layout
18424
18425 \end_inset
18426
18427
18428 \begin_inset Quotes erd
18429 \end_inset
18430
18431 .
18432  By default, LyX will output 
18433 \begin_inset Quotes eld
18434 \end_inset
18435
18436
18437 \begin_inset Flex Code
18438 status collapsed
18439
18440 \begin_layout Plain Layout
18441 class=`insetname'
18442 \end_layout
18443
18444 \end_inset
18445
18446
18447 \begin_inset Quotes erd
18448 \end_inset
18449
18450 , where 
18451 \begin_inset Flex Code
18452 status collapsed
18453
18454 \begin_layout Plain Layout
18455 insetname
18456 \end_layout
18457
18458 \end_inset
18459
18460  is the LyX name of the inset, made lowercase and with non-alphanumeric
18461  characters converted to underscores, for example: footnote.
18462 \end_layout
18463
18464 \begin_layout Description
18465 \begin_inset Flex Code
18466 status collapsed
18467
18468 \begin_layout Plain Layout
18469 HTMLForceCSS
18470 \end_layout
18471
18472 \end_inset
18473
18474  [
18475 \begin_inset Flex Code
18476 status collapsed
18477
18478 \begin_layout Plain Layout
18479
18480 \emph on
18481 0
18482 \emph default
18483 ,1
18484 \end_layout
18485
18486 \end_inset
18487
18488 ] Whether to output the default CSS information LyX generates for this layout,
18489  even if additional information is explicitly provided via 
18490 \begin_inset Flex Code
18491 status collapsed
18492
18493 \begin_layout Plain Layout
18494 HTMLStyle
18495 \end_layout
18496
18497 \end_inset
18498
18499 .
18500  Setting this to 
18501 \begin_inset Flex Code
18502 status collapsed
18503
18504 \begin_layout Plain Layout
18505 1
18506 \end_layout
18507
18508 \end_inset
18509
18510  allows you to alter or augment the generated CSS, rather than to override
18511  it completely.
18512  Default is 0.
18513 \end_layout
18514
18515 \begin_layout Description
18516 \begin_inset Flex Code
18517 status collapsed
18518
18519 \begin_layout Plain Layout
18520 HTMLInnerAttr
18521 \end_layout
18522
18523 \end_inset
18524
18525  [
18526 \begin_inset Flex Code
18527 status collapsed
18528
18529 \begin_layout Plain Layout
18530 string
18531 \end_layout
18532
18533 \end_inset
18534
18535 ] Attributes for the inner tag.
18536  Defaults to 
18537 \begin_inset Quotes eld
18538 \end_inset
18539
18540
18541 \begin_inset Flex Code
18542 status collapsed
18543
18544 \begin_layout Plain Layout
18545 class=`insetname_inner'
18546 \end_layout
18547
18548 \end_inset
18549
18550
18551 \begin_inset Quotes erd
18552 \end_inset
18553
18554 .
18555 \end_layout
18556
18557 \begin_layout Description
18558 \begin_inset Flex Code
18559 status collapsed
18560
18561 \begin_layout Plain Layout
18562 HTMLInnerTag
18563 \end_layout
18564
18565 \end_inset
18566
18567  [
18568 \begin_inset Flex Code
18569 status collapsed
18570
18571 \begin_layout Plain Layout
18572 string
18573 \end_layout
18574
18575 \end_inset
18576
18577 ] The inner tag, replacing 
18578 \begin_inset Flex Code
18579 status collapsed
18580
18581 \begin_layout Plain Layout
18582 innertag
18583 \end_layout
18584
18585 \end_inset
18586
18587  in the examples above.
18588  By default, there is none.
18589 \end_layout
18590
18591 \begin_layout Description
18592 \begin_inset Flex Code
18593 status collapsed
18594
18595 \begin_layout Plain Layout
18596 HTMLIsBlock
18597 \end_layout
18598
18599 \end_inset
18600
18601  [
18602 \begin_inset Flex Code
18603 status collapsed
18604
18605 \begin_layout Plain Layout
18606 0,
18607 \emph on
18608 1
18609 \end_layout
18610
18611 \end_inset
18612
18613 ] Whether this inset represents a standalone block of text (such as a footnote)
18614  or instead represents material that is included in the surrounding text
18615  (such as a branch).
18616  Defaults to 1.
18617 \end_layout
18618
18619 \begin_layout Description
18620 \begin_inset Flex Code
18621 status collapsed
18622
18623 \begin_layout Plain Layout
18624 HTMLLabel
18625 \end_layout
18626
18627 \end_inset
18628
18629  [
18630 \begin_inset Flex Code
18631 status collapsed
18632
18633 \begin_layout Plain Layout
18634 string
18635 \end_layout
18636
18637 \end_inset
18638
18639 ] A label for this inset, possibly including a reference to a counter.
18640  For example, for footnote, it might be: 
18641 \begin_inset Flex Code
18642 status collapsed
18643
18644 \begin_layout Plain Layout
18645
18646 \backslash
18647 arabic{footnote}
18648 \end_layout
18649
18650 \end_inset
18651
18652 .
18653  This is optional, and there is no default.
18654 \end_layout
18655
18656 \begin_layout Description
18657 \begin_inset Flex Code
18658 status collapsed
18659
18660 \begin_layout Plain Layout
18661 HTMLPreamble
18662 \end_layout
18663
18664 \end_inset
18665
18666  Information to be output in the 
18667 \begin_inset Flex Code
18668 status collapsed
18669
18670 \begin_layout Plain Layout
18671 <head>
18672 \end_layout
18673
18674 \end_inset
18675
18676  section when this style is used.
18677  This might, for example, be used to include a 
18678 \begin_inset Flex Code
18679 status collapsed
18680
18681 \begin_layout Plain Layout
18682 <script>
18683 \end_layout
18684
18685 \end_inset
18686
18687  block defining an 
18688 \begin_inset Flex Code
18689 status collapsed
18690
18691 \begin_layout Plain Layout
18692 onclick
18693 \end_layout
18694
18695 \end_inset
18696
18697  handler.
18698 \end_layout
18699
18700 \begin_layout Description
18701 \begin_inset Flex Code
18702 status collapsed
18703
18704 \begin_layout Plain Layout
18705 HTMLStyle
18706 \end_layout
18707
18708 \end_inset
18709
18710  CSS style information to be included when this style is used.
18711  Note that this will automatically be wrapped in a layout-generated 
18712 \begin_inset Flex Code
18713 status collapsed
18714
18715 \begin_layout Plain Layout
18716 <style>
18717 \end_layout
18718
18719 \end_inset
18720
18721  block, so only the CSS itself need be included.
18722 \end_layout
18723
18724 \begin_layout Description
18725 \begin_inset Flex Code
18726 status collapsed
18727
18728 \begin_layout Plain Layout
18729 HTMLTag
18730 \end_layout
18731
18732 \end_inset
18733
18734  [
18735 \begin_inset Flex Code
18736 status collapsed
18737
18738 \begin_layout Plain Layout
18739 string
18740 \end_layout
18741
18742 \end_inset
18743
18744 ] The tag to be used for the main label, replacing 
18745 \begin_inset Flex Code
18746 status collapsed
18747
18748 \begin_layout Plain Layout
18749 tag
18750 \end_layout
18751
18752 \end_inset
18753
18754  in the examples above.
18755  The default depends upon the setting of 
18756 \begin_inset Flex Code
18757 status collapsed
18758
18759 \begin_layout Plain Layout
18760 MultiPar
18761 \end_layout
18762
18763 \end_inset
18764
18765 : If 
18766 \begin_inset Flex Code
18767 status collapsed
18768
18769 \begin_layout Plain Layout
18770 MultiPar
18771 \end_layout
18772
18773 \end_inset
18774
18775  is true, the default is 
18776 \begin_inset Flex Code
18777 status collapsed
18778
18779 \begin_layout Plain Layout
18780 div
18781 \end_layout
18782
18783 \end_inset
18784
18785 ; if it is false, the default is 
18786 \begin_inset Flex Code
18787 status collapsed
18788
18789 \begin_layout Plain Layout
18790 span
18791 \end_layout
18792
18793 \end_inset
18794
18795 .
18796 \end_layout
18797
18798 \begin_layout Subsection
18799 Float XHTML
18800 \end_layout
18801
18802 \begin_layout Standard
18803 The XHTML output for floats too can be controlled by layout information.
18804  The output has the following form:
18805 \end_layout
18806
18807 \begin_layout LyX-Code
18808 <tag attr=
18809 \begin_inset Quotes erd
18810 \end_inset
18811
18812 value
18813 \begin_inset Quotes erd
18814 \end_inset
18815
18816 >
18817 \end_layout
18818
18819 \begin_layout LyX-Code
18820 Contents of the float.
18821 \end_layout
18822
18823 \begin_layout LyX-Code
18824 </tag>
18825 \end_layout
18826
18827 \begin_layout Standard
18828 The caption, if there is one, is a separate inset and will be output as
18829  such.
18830  Its appearance can be controlled via the InsetLayout for caption insets.
18831  
18832 \end_layout
18833
18834 \begin_layout Description
18835 \begin_inset Flex Code
18836 status collapsed
18837
18838 \begin_layout Plain Layout
18839 HTMLAttr
18840 \end_layout
18841
18842 \end_inset
18843
18844  [
18845 \begin_inset Flex Code
18846 status collapsed
18847
18848 \begin_layout Plain Layout
18849 string
18850 \end_layout
18851
18852 \end_inset
18853
18854 ] Specifies attribute information to be output with the main tag.
18855  For example, 
18856 \begin_inset Quotes eld
18857 \end_inset
18858
18859
18860 \begin_inset Flex Code
18861 status collapsed
18862
18863 \begin_layout Plain Layout
18864 class=`myfloat' onclick=`\SpecialChar \ldots{}
18865 '
18866 \end_layout
18867
18868 \end_inset
18869
18870
18871 \begin_inset Quotes erd
18872 \end_inset
18873
18874 .
18875  By default, LyX will output 
18876 \begin_inset Quotes eld
18877 \end_inset
18878
18879
18880 \begin_inset Flex Code
18881 status collapsed
18882
18883 \begin_layout Plain Layout
18884 class=`float float-floattype'
18885 \end_layout
18886
18887 \end_inset
18888
18889
18890 \begin_inset Quotes erd
18891 \end_inset
18892
18893 , where 
18894 \begin_inset Flex Code
18895 status collapsed
18896
18897 \begin_layout Plain Layout
18898 floattype
18899 \end_layout
18900
18901 \end_inset
18902
18903  is LyX's name for this type of float, as determined by the float declaration
18904  (see 
18905 \begin_inset CommandInset ref
18906 LatexCommand ref
18907 reference "sub:Floats"
18908
18909 \end_inset
18910
18911 ), though made lowercase and with non-alphanumeric characters converted
18912  to underscores, for example: float-table.
18913 \end_layout
18914
18915 \begin_layout Description
18916 \begin_inset Flex Code
18917 status collapsed
18918
18919 \begin_layout Plain Layout
18920 HTMLStyle
18921 \end_layout
18922
18923 \end_inset
18924
18925  CSS style information to be included when this float is used.
18926  Note that this will automatically be wrapped in a layout-generated 
18927 \begin_inset Flex Code
18928 status collapsed
18929
18930 \begin_layout Plain Layout
18931 <style>
18932 \end_layout
18933
18934 \end_inset
18935
18936  block, so only the CSS itself need be included.
18937 \end_layout
18938
18939 \begin_layout Description
18940 \begin_inset Flex Code
18941 status collapsed
18942
18943 \begin_layout Plain Layout
18944 HTMLTag
18945 \end_layout
18946
18947 \end_inset
18948
18949  [
18950 \begin_inset Flex Code
18951 status collapsed
18952
18953 \begin_layout Plain Layout
18954 string
18955 \end_layout
18956
18957 \end_inset
18958
18959 ] The tag to be used for this float, replacing 
18960 \begin_inset Quotes eld
18961 \end_inset
18962
18963
18964 \begin_inset Flex Code
18965 status collapsed
18966
18967 \begin_layout Plain Layout
18968 tag
18969 \end_layout
18970
18971 \end_inset
18972
18973
18974 \begin_inset Quotes erd
18975 \end_inset
18976
18977  in the example above.
18978  The default is 
18979 \begin_inset Flex Code
18980 status collapsed
18981
18982 \begin_layout Plain Layout
18983 div
18984 \end_layout
18985
18986 \end_inset
18987
18988  and will rarely need changing.
18989 \end_layout
18990
18991 \begin_layout Subsection
18992 Bibliography formatting
18993 \end_layout
18994
18995 \begin_layout Standard
18996 The bibliography can be formatted using 
18997 \begin_inset Flex Code
18998 status collapsed
18999
19000 \begin_layout Plain Layout
19001 CiteFormat
19002 \end_layout
19003
19004 \end_inset
19005
19006  blocks.
19007  See Section 
19008 \begin_inset CommandInset ref
19009 LatexCommand ref
19010 reference "sub:Citation-format-description"
19011
19012 \end_inset
19013
19014  for the details.
19015 \end_layout
19016
19017 \begin_layout Subsection
19018 LyX-generated CSS
19019 \end_layout
19020
19021 \begin_layout Standard
19022 We have several times mentioned that LyX will generate default CSS style
19023  rules for both insets and paragraph styles, based upon the other layout
19024  information that is provided.
19025  In this section, we shall say a word about which layout information LyX
19026  uses and how.
19027 \end_layout
19028
19029 \begin_layout Standard
19030 At present, LyX auto-generates CSS only for font information, making use
19031  of the 
19032 \begin_inset Flex Code
19033 status collapsed
19034
19035 \begin_layout Plain Layout
19036 Family
19037 \end_layout
19038
19039 \end_inset
19040
19041
19042 \begin_inset Flex Code
19043 status collapsed
19044
19045 \begin_layout Plain Layout
19046 Series
19047 \end_layout
19048
19049 \end_inset
19050
19051
19052 \begin_inset Flex Code
19053 status collapsed
19054
19055 \begin_layout Plain Layout
19056 Shape
19057 \end_layout
19058
19059 \end_inset
19060
19061 , and 
19062 \begin_inset Flex Code
19063 status collapsed
19064
19065 \begin_layout Plain Layout
19066 Size
19067 \end_layout
19068
19069 \end_inset
19070
19071  specified in the 
19072 \begin_inset Flex Code
19073 status collapsed
19074
19075 \begin_layout Plain Layout
19076 Font
19077 \end_layout
19078
19079 \end_inset
19080
19081  declaration.
19082  (See 
19083 \begin_inset CommandInset ref
19084 LatexCommand ref
19085 reference "sub:Font-description"
19086
19087 \end_inset
19088
19089 .) The translation is mostly straightforward and obvious.
19090  For example, 
19091 \begin_inset Quotes eld
19092 \end_inset
19093
19094
19095 \begin_inset Flex Code
19096 status collapsed
19097
19098 \begin_layout Plain Layout
19099 Family Sans
19100 \end_layout
19101
19102 \end_inset
19103
19104
19105 \begin_inset Quotes erd
19106 \end_inset
19107
19108  becomes 
19109 \begin_inset Quotes eld
19110 \end_inset
19111
19112
19113 \begin_inset Flex Code
19114 status collapsed
19115
19116 \begin_layout Plain Layout
19117 font-family: sans-serif;
19118 \end_layout
19119
19120 \end_inset
19121
19122
19123 \begin_inset Quotes erd
19124 \end_inset
19125
19126 .
19127  The correspondence of LyX sizes and CSS sizes is a little less obvious
19128  but nonetheless intuitive.
19129  See the 
19130 \begin_inset Flex Code
19131 status collapsed
19132
19133 \begin_layout Plain Layout
19134 getSizeCSS()
19135 \end_layout
19136
19137 \end_inset
19138
19139  function in 
19140 \begin_inset Flex URL
19141 status collapsed
19142
19143 \begin_layout Plain Layout
19144
19145 src/FontInfo.cpp
19146 \end_layout
19147
19148 \end_inset
19149
19150  for the details.
19151 \end_layout
19152
19153 \begin_layout Chapter
19154 Including External Material
19155 \end_layout
19156
19157 \begin_layout Standard
19158 \begin_inset Box Shadowbox
19159 position "t"
19160 hor_pos "c"
19161 has_inner_box 1
19162 inner_pos "t"
19163 use_parbox 0
19164 use_makebox 0
19165 width "100col%"
19166 special "none"
19167 height "1in"
19168 height_special "totalheight"
19169 status open
19170
19171 \begin_layout Plain Layout
19172 WARNING: This portion of the documentation has not been updated for some
19173  time.
19174  We certainly hope that it is still accurate, but there are no guarantees.
19175 \end_layout
19176
19177 \end_inset
19178
19179
19180 \end_layout
19181
19182 \begin_layout Standard
19183 The use of material from sources external to LyX is covered in detail in
19184  the 
19185 \emph on
19186 Embedded Objects
19187 \emph default
19188  manual.
19189  This part of the manual covers what needs to happen behind the scenes for
19190  new sorts of material to be included.
19191 \end_layout
19192
19193 \begin_layout Section
19194 How does it work?
19195 \end_layout
19196
19197 \begin_layout Standard
19198 The external material feature is based on the concept of a 
19199 \emph on
19200 template
19201 \emph default
19202 .
19203  A template is a specification of how LyX should interface with a certain
19204  kind of material.
19205  As bundled, LyX comes with predefined templates for Xfig figures, various
19206  raster format images, chess diagrams, and LilyPond music notation.
19207  You can check the actual list by using the menu 
19208 \begin_inset Flex MenuItem
19209 status collapsed
19210
19211 \begin_layout Plain Layout
19212 Insert\SpecialChar \menuseparator
19213 File\SpecialChar \menuseparator
19214 External Material
19215 \end_layout
19216
19217 \end_inset
19218
19219 .
19220  Furthermore, it is possible to roll your own template to support a specific
19221  kind of material.
19222  Later we'll describe in more detail what is involved, and hopefully you
19223  will submit all the templates you create so we can include them in a later
19224  LyX version.
19225 \end_layout
19226
19227 \begin_layout Standard
19228 Another basic idea of the external material feature is to distinguish between
19229  the original file that serves as a base for final material and the produced
19230  file that is included in your exported or printed document.
19231  For example, consider the case of a figure produced with 
19232 \begin_inset Flex Code
19233 status collapsed
19234
19235 \begin_layout Plain Layout
19236 Xfig
19237 \end_layout
19238
19239 \end_inset
19240
19241 .
19242  The Xfig application itself works on an original file with the 
19243 \begin_inset Flex Code
19244 status collapsed
19245
19246 \begin_layout Plain Layout
19247 .fig
19248 \end_layout
19249
19250 \end_inset
19251
19252  extension.
19253  Within Xfig, you create and change your figure, and when you are done,
19254  you save the 
19255 \begin_inset Flex Code
19256 status collapsed
19257
19258 \begin_layout Plain Layout
19259 fig
19260 \end_layout
19261
19262 \end_inset
19263
19264 -file.
19265  When you want to include the figure in your document, you invoke 
19266 \begin_inset Flex Code
19267 status collapsed
19268
19269 \begin_layout Plain Layout
19270 transfig
19271 \end_layout
19272
19273 \end_inset
19274
19275  in order to create a PostScript file that can readily be included in your
19276  LaTeX file.
19277  In this case, the 
19278 \begin_inset Flex Code
19279 status collapsed
19280
19281 \begin_layout Plain Layout
19282 .fig
19283 \end_layout
19284
19285 \end_inset
19286
19287  file is the original file, and the PostScript file is the produced file.
19288 \end_layout
19289
19290 \begin_layout Standard
19291 This distinction is important in order to allow updating of the material
19292  while you are in the process of writing the document.
19293  Furthermore, it provides us with the flexibility that is needed to support
19294  multiple export formats.
19295  For instance, in the case of a plain text file, it is not exactly an award-winn
19296 ing idea to include the figure as raw PostScript.
19297  Instead, you would either prefer to just include a reference to the figure
19298  or try to invoke some graphics to ASCII converter to make the final result
19299  look similar to the real graphics.
19300  The external material management allows you to do this, because it is parametri
19301 zed on the different export formats that LyX supports.
19302 \end_layout
19303
19304 \begin_layout Standard
19305 Besides supporting the production of different products according to the
19306  exported format, it supports tight integration with editing and viewing
19307  applications.
19308  In the case of an Xfig figure, you are able to invoke Xfig on the original
19309  file with a single click from within the external material dialog in LyX,
19310  and also preview the produced PostScript file with Ghostview with another
19311  click.
19312  No more fiddling around with the command line and/or file browsers to locate
19313  and manipulate the original or produced files.
19314  In this way, you are finally able to take full advantage of the many different
19315  applications that are relevant to use when you write your documents, and
19316  ultimately be more productive.
19317 \end_layout
19318
19319 \begin_layout Section
19320 The external template configuration file
19321 \end_layout
19322
19323 \begin_layout Standard
19324 It is relatively easy to add custom external template definitions to LyX.
19325  However, be aware that doing this in an careless manner most probably 
19326 \emph on
19327 will
19328 \emph default
19329  introduce an easily exploitable security hole.
19330  So before you do this, please read the discussion about security in section
19331  
19332 \begin_inset CommandInset ref
19333 LatexCommand ref
19334 reference "sec:Security-discussion"
19335
19336 \end_inset
19337
19338 .
19339 \end_layout
19340
19341 \begin_layout Standard
19342 Having said that, we encourage you to submit any interesting templates that
19343  you create.
19344  
19345 \end_layout
19346
19347 \begin_layout Standard
19348 The external templates are defined in the 
19349 \begin_inset Flex Code
19350 status collapsed
19351
19352 \begin_layout Plain Layout
19353 LyXDir/lib/external_templates
19354 \end_layout
19355
19356 \end_inset
19357
19358  file.
19359  You can place your own version in 
19360 \begin_inset Flex Code
19361 status collapsed
19362
19363 \begin_layout Plain Layout
19364 UserDir/external_templates
19365 \end_layout
19366
19367 \end_inset
19368
19369 .
19370 \end_layout
19371
19372 \begin_layout Standard
19373 A typical template looks like this:
19374 \end_layout
19375
19376 \begin_layout LyX-Code
19377 Template XFig
19378 \end_layout
19379
19380 \begin_layout LyX-Code
19381 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
19382 \end_layout
19383
19384 \begin_layout LyX-Code
19385 HelpText
19386 \end_layout
19387
19388 \begin_layout LyX-Code
19389 An XFig figure.
19390 \end_layout
19391
19392 \begin_layout LyX-Code
19393 HelpTextEnd
19394 \end_layout
19395
19396 \begin_layout LyX-Code
19397 InputFormat fig
19398 \end_layout
19399
19400 \begin_layout LyX-Code
19401 FileFilter "*.fig"
19402 \end_layout
19403
19404 \begin_layout LyX-Code
19405 AutomaticProduction true
19406 \end_layout
19407
19408 \begin_layout LyX-Code
19409 Transform Rotate
19410 \end_layout
19411
19412 \begin_layout LyX-Code
19413 Transform Resize
19414 \end_layout
19415
19416 \begin_layout LyX-Code
19417 Format LaTeX
19418 \end_layout
19419
19420 \begin_layout LyX-Code
19421 TransformCommand Rotate RotationLatexCommand
19422 \end_layout
19423
19424 \begin_layout LyX-Code
19425 TransformCommand Resize ResizeLatexCommand
19426 \end_layout
19427
19428 \begin_layout LyX-Code
19429 Product "$$RotateFront$$ResizeFront
19430 \end_layout
19431
19432 \begin_layout LyX-Code
19433          
19434 \backslash
19435
19436 \backslash
19437 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
19438 \end_layout
19439
19440 \begin_layout LyX-Code
19441          $$ResizeBack$$RotateBack"
19442 \end_layout
19443
19444 \begin_layout LyX-Code
19445 UpdateFormat pstex
19446 \end_layout
19447
19448 \begin_layout LyX-Code
19449 UpdateResult "$$AbsPath$$Basename.pstex_t"
19450 \end_layout
19451
19452 \begin_layout LyX-Code
19453 Requirement "graphicx"
19454 \end_layout
19455
19456 \begin_layout LyX-Code
19457 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
19458 \end_layout
19459
19460 \begin_layout LyX-Code
19461 ReferencedFile latex "$$AbsPath$$Basename.eps"
19462 \end_layout
19463
19464 \begin_layout LyX-Code
19465 ReferencedFile dvi "$$AbsPath$$Basename.eps"
19466 \end_layout
19467
19468 \begin_layout LyX-Code
19469 FormatEnd
19470 \end_layout
19471
19472 \begin_layout LyX-Code
19473 Format PDFLaTeX
19474 \end_layout
19475
19476 \begin_layout LyX-Code
19477 TransformCommand Rotate RotationLatexCommand
19478 \end_layout
19479
19480 \begin_layout LyX-Code
19481 TransformCommand Resize ResizeLatexCommand
19482 \end_layout
19483
19484 \begin_layout LyX-Code
19485 Product "$$RotateFront$$ResizeFront
19486 \end_layout
19487
19488 \begin_layout LyX-Code
19489          
19490 \backslash
19491
19492 \backslash
19493 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
19494 \end_layout
19495
19496 \begin_layout LyX-Code
19497          $$ResizeBack$$RotateBack"
19498 \end_layout
19499
19500 \begin_layout LyX-Code
19501 UpdateFormat pdftex
19502 \end_layout
19503
19504 \begin_layout LyX-Code
19505 UpdateResult "$$AbsPath$$Basename.pdftex_t"
19506 \end_layout
19507
19508 \begin_layout LyX-Code
19509 Requirement "graphicx"
19510 \end_layout
19511
19512 \begin_layout LyX-Code
19513 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
19514 \end_layout
19515
19516 \begin_layout LyX-Code
19517 ReferencedFile latex "$$AbsPath$$Basename.pdf"
19518 \end_layout
19519
19520 \begin_layout LyX-Code
19521 FormatEnd
19522 \end_layout
19523
19524 \begin_layout LyX-Code
19525 Format Ascii
19526 \end_layout
19527
19528 \begin_layout LyX-Code
19529 Product "$$Contents(
19530 \backslash
19531 "$$AbsPath$$Basename.asc
19532 \backslash
19533 ")"
19534 \end_layout
19535
19536 \begin_layout LyX-Code
19537 UpdateFormat asciixfig
19538 \end_layout
19539
19540 \begin_layout LyX-Code
19541 UpdateResult "$$AbsPath$$Basename.asc"
19542 \end_layout
19543
19544 \begin_layout LyX-Code
19545 FormatEnd
19546 \end_layout
19547
19548 \begin_layout LyX-Code
19549 Format DocBook
19550 \end_layout
19551
19552 \begin_layout LyX-Code
19553 Product "<graphic fileref=
19554 \backslash
19555 "$$AbsOrRelPathMaster$$Basename.eps
19556 \backslash
19557 ">
19558 \end_layout
19559
19560 \begin_layout LyX-Code
19561          </graphic>"
19562 \end_layout
19563
19564 \begin_layout LyX-Code
19565 UpdateFormat eps
19566 \end_layout
19567
19568 \begin_layout LyX-Code
19569 UpdateResult "$$AbsPath$$Basename.eps"
19570 \end_layout
19571
19572 \begin_layout LyX-Code
19573 ReferencedFile docbook "$$AbsPath$$Basename.eps"
19574 \end_layout
19575
19576 \begin_layout LyX-Code
19577 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
19578 \end_layout
19579
19580 \begin_layout LyX-Code
19581 FormatEnd
19582 \end_layout
19583
19584 \begin_layout LyX-Code
19585 Product "[XFig: $$FName]"
19586 \end_layout
19587
19588 \begin_layout LyX-Code
19589 FormatEnd
19590 \end_layout
19591
19592 \begin_layout LyX-Code
19593 TemplateEnd
19594 \end_layout
19595
19596 \begin_layout Standard
19597 As you can see, the template is enclosed in 
19598 \begin_inset Flex Code
19599 status collapsed
19600
19601 \begin_layout Plain Layout
19602 Template
19603 \end_layout
19604
19605 \end_inset
19606
19607  \SpecialChar \ldots{}
19608  
19609 \begin_inset Flex Code
19610 status collapsed
19611
19612 \begin_layout Plain Layout
19613 TemplateEnd
19614 \end_layout
19615
19616 \end_inset
19617
19618 .
19619  It contains a header specifying some general settings and, for each supported
19620  primary document file format, a section 
19621 \begin_inset Flex Code
19622 status collapsed
19623
19624 \begin_layout Plain Layout
19625 Format
19626 \end_layout
19627
19628 \end_inset
19629
19630  \SpecialChar \ldots{}
19631  
19632 \begin_inset Flex Code
19633 status collapsed
19634
19635 \begin_layout Plain Layout
19636 FormatEnd
19637 \end_layout
19638
19639 \end_inset
19640
19641 .
19642 \end_layout
19643
19644 \begin_layout Subsection
19645 The template header
19646 \end_layout
19647
19648 \begin_layout Description
19649 \begin_inset Flex Code
19650 status collapsed
19651
19652 \begin_layout Plain Layout
19653 AutomaticProduction
19654 \begin_inset space ~
19655 \end_inset
19656
19657 true|false
19658 \end_layout
19659
19660 \end_inset
19661
19662  Whether the file represented by the template must be generated by LyX.
19663  This command must occur exactly once.
19664 \end_layout
19665
19666 \begin_layout Description
19667 \begin_inset Flex Code
19668 status collapsed
19669
19670 \begin_layout Plain Layout
19671 FileFilter
19672 \begin_inset space ~
19673 \end_inset
19674
19675 <pattern>
19676 \end_layout
19677
19678 \end_inset
19679
19680  A glob pattern that is used in the file dialog to filter out the desired
19681  files.
19682  If there is more than one possible file extension (e.
19683 \begin_inset space \thinspace{}
19684 \end_inset
19685
19686 g.
19687 \begin_inset space \space{}
19688 \end_inset
19689
19690 tgif has 
19691 \begin_inset Flex Code
19692 status collapsed
19693
19694 \begin_layout Plain Layout
19695 .obj
19696 \end_layout
19697
19698 \end_inset
19699
19700  and 
19701 \begin_inset Flex Code
19702 status collapsed
19703
19704 \begin_layout Plain Layout
19705 .tgo
19706 \end_layout
19707
19708 \end_inset
19709
19710 ), use something like 
19711 \begin_inset Flex Code
19712 status collapsed
19713
19714 \begin_layout Plain Layout
19715 "*.{obj,tgo}"
19716 \end_layout
19717
19718 \end_inset
19719
19720 .
19721  This command must occur exactly once.
19722 \end_layout
19723
19724 \begin_layout Description
19725 \begin_inset Flex Code
19726 status collapsed
19727
19728 \begin_layout Plain Layout
19729 GuiName
19730 \begin_inset space ~
19731 \end_inset
19732
19733 <guiname>
19734 \end_layout
19735
19736 \end_inset
19737
19738  The text that is displayed on the button.
19739  This command must occur exactly once.
19740 \end_layout
19741
19742 \begin_layout Description
19743 \begin_inset Flex Code
19744 status collapsed
19745
19746 \begin_layout Plain Layout
19747 HelpText
19748 \begin_inset space ~
19749 \end_inset
19750
19751 <text>
19752 \begin_inset space ~
19753 \end_inset
19754
19755 HelpTextEnd
19756 \end_layout
19757
19758 \end_inset
19759
19760  The help text that is used in the External dialog.
19761  Provide enough information to explain to the user just what the template
19762  can provide him with.
19763  This command must occur exactly once.
19764 \end_layout
19765
19766 \begin_layout Description
19767 \begin_inset Flex Code
19768 status collapsed
19769
19770 \begin_layout Plain Layout
19771 InputFormat
19772 \begin_inset space ~
19773 \end_inset
19774
19775 <format>
19776 \end_layout
19777
19778 \end_inset
19779
19780  The file format of the original file.
19781  This must be the name of a format that is known to LyX (see section
19782 \begin_inset space ~
19783 \end_inset
19784
19785
19786 \begin_inset CommandInset ref
19787 LatexCommand ref
19788 reference "sec:Formats"
19789
19790 \end_inset
19791
19792 ).
19793  Use 
19794 \begin_inset Quotes eld
19795 \end_inset
19796
19797
19798 \begin_inset Flex Code
19799 status collapsed
19800
19801 \begin_layout Plain Layout
19802 *
19803 \end_layout
19804
19805 \end_inset
19806
19807
19808 \begin_inset Quotes erd
19809 \end_inset
19810
19811  if the template can handle original files of more than one format.
19812  LyX will attempt to interrogate the file itself in order to deduce its
19813  format in this case.
19814  This command must occur exactly once.
19815 \end_layout
19816
19817 \begin_layout Description
19818 \begin_inset Flex Code
19819 status collapsed
19820
19821 \begin_layout Plain Layout
19822 Template
19823 \begin_inset space ~
19824 \end_inset
19825
19826 <id>
19827 \end_layout
19828
19829 \end_inset
19830
19831  A unique name for the template.
19832  It must not contain substitution macros (see below).
19833 \end_layout
19834
19835 \begin_layout Description
19836 \begin_inset Flex Code
19837 status collapsed
19838
19839 \begin_layout Plain Layout
19840 Transform
19841 \begin_inset space ~
19842 \end_inset
19843
19844 Rotate|Resize|Clip|Extra
19845 \end_layout
19846
19847 \end_inset
19848
19849  This command specifies which transformations are supported by this template.
19850  It may occur zero or more times.
19851  This command enables the corresponding tabs in the external dialog.
19852  Each 
19853 \begin_inset Flex Code
19854 status collapsed
19855
19856 \begin_layout Plain Layout
19857 Transform
19858 \end_layout
19859
19860 \end_inset
19861
19862  command must have either a corresponding 
19863 \begin_inset Flex Code
19864 status collapsed
19865
19866 \begin_layout Plain Layout
19867 TransformCommand
19868 \end_layout
19869
19870 \end_inset
19871
19872  or a 
19873 \begin_inset Flex Code
19874 status collapsed
19875
19876 \begin_layout Plain Layout
19877 TransformOption
19878 \end_layout
19879
19880 \end_inset
19881
19882  command in the 
19883 \begin_inset Flex Code
19884 status collapsed
19885
19886 \begin_layout Plain Layout
19887 Format
19888 \end_layout
19889
19890 \end_inset
19891
19892  section.
19893  Otherwise the transformation will not be supported by that format.
19894 \end_layout
19895
19896 \begin_layout Subsection
19897 The Format section
19898 \end_layout
19899
19900 \begin_layout Description
19901 \begin_inset Flex Code
19902 status collapsed
19903
19904 \begin_layout Plain Layout
19905 Format
19906 \begin_inset space ~
19907 \end_inset
19908
19909 LaTeX|PDFLaTeX|PlainText|DocBook
19910 \end_layout
19911
19912 \end_inset
19913
19914  The primary document file format that this format definition is for.
19915  Not every template has a sensible representation in all document file formats.
19916  Please define nevertheless a 
19917 \begin_inset Flex Code
19918 status collapsed
19919
19920 \begin_layout Plain Layout
19921 Format
19922 \end_layout
19923
19924 \end_inset
19925
19926  section for all templates.
19927  Use a dummy text when no representation is available.
19928  Then you can at least see a reference to the external material in the exported
19929  document.
19930 \end_layout
19931
19932 \begin_layout Description
19933 \begin_inset Flex Code
19934 status collapsed
19935
19936 \begin_layout Plain Layout
19937 Option
19938 \begin_inset space ~
19939 \end_inset
19940
19941 <name>
19942 \begin_inset space ~
19943 \end_inset
19944
19945 <value>
19946 \end_layout
19947
19948 \end_inset
19949
19950  This command defines an additional macro 
19951 \begin_inset Flex Code
19952 status collapsed
19953
19954 \begin_layout Plain Layout
19955 $$<name>
19956 \end_layout
19957
19958 \end_inset
19959
19960  for substitution in 
19961 \begin_inset Flex Code
19962 status collapsed
19963
19964 \begin_layout Plain Layout
19965 Product
19966 \end_layout
19967
19968 \end_inset
19969
19970 .
19971  
19972 \begin_inset Flex Code
19973 status collapsed
19974
19975 \begin_layout Plain Layout
19976 <value>
19977 \end_layout
19978
19979 \end_inset
19980
19981  itself may contain substitution macros.
19982  The advantage over using 
19983 \begin_inset Flex Code
19984 status collapsed
19985
19986 \begin_layout Plain Layout
19987 <value>
19988 \end_layout
19989
19990 \end_inset
19991
19992  directly in 
19993 \begin_inset Flex Code
19994 status collapsed
19995
19996 \begin_layout Plain Layout
19997 Product
19998 \end_layout
19999
20000 \end_inset
20001
20002  is that the substituted value of 
20003 \begin_inset Flex Code
20004 status collapsed
20005
20006 \begin_layout Plain Layout
20007 $$<name>
20008 \end_layout
20009
20010 \end_inset
20011
20012  is sanitized so that it is a valid optional argument in the document format.
20013  This command may occur zero or more times.
20014 \end_layout
20015
20016 \begin_layout Description
20017 \begin_inset Flex Code
20018 status collapsed
20019
20020 \begin_layout Plain Layout
20021 Product
20022 \begin_inset space ~
20023 \end_inset
20024
20025 <text>
20026 \end_layout
20027
20028 \end_inset
20029
20030  The text that is inserted in the exported document.
20031  This is actually the most important command and can be quite complex.
20032  This command must occur exactly once.
20033 \end_layout
20034
20035 \begin_layout Description
20036 \begin_inset Flex Code
20037 status collapsed
20038
20039 \begin_layout Plain Layout
20040 Preamble
20041 \begin_inset space ~
20042 \end_inset
20043
20044 <name>
20045 \end_layout
20046
20047 \end_inset
20048
20049  This command specifies a preamble snippet that will be included in the
20050  LaTeX preamble.
20051  It has to be defined using 
20052 \begin_inset Flex Code
20053 status collapsed
20054
20055 \begin_layout Plain Layout
20056 PreambleDef
20057 \end_layout
20058
20059 \end_inset
20060
20061  \SpecialChar \ldots{}
20062  
20063 \begin_inset Flex Code
20064 status collapsed
20065
20066 \begin_layout Plain Layout
20067 PreambleDefEnd
20068 \end_layout
20069
20070 \end_inset
20071
20072 .
20073  This command may occur zero or more times.
20074 \end_layout
20075
20076 \begin_layout Description
20077 \begin_inset Flex Code
20078 status collapsed
20079
20080 \begin_layout Plain Layout
20081 ReferencedFile
20082 \begin_inset space ~
20083 \end_inset
20084
20085 <format>
20086 \begin_inset space ~
20087 \end_inset
20088
20089 <filename>
20090 \end_layout
20091
20092 \end_inset
20093
20094  This command denotes files that are created by the conversion process and
20095  are needed for a particular export format.
20096  If the filename is relative, it is interpreted relative to the master document.
20097  This command may be given zero or more times.
20098 \end_layout
20099
20100 \begin_layout Description
20101 \begin_inset Flex Code
20102 status collapsed
20103
20104 \begin_layout Plain Layout
20105 Requirement
20106 \begin_inset space ~
20107 \end_inset
20108
20109 <package>
20110 \end_layout
20111
20112 \end_inset
20113
20114  The name of a required LaTeX package.
20115  The package is included via 
20116 \begin_inset Flex Code
20117 status collapsed
20118
20119 \begin_layout Plain Layout
20120
20121 \backslash
20122 usepackage{}
20123 \end_layout
20124
20125 \end_inset
20126
20127  in the LaTeX preamble.
20128  This command may occur zero or more times.
20129 \end_layout
20130
20131 \begin_layout Description
20132 \begin_inset Flex Code
20133 status collapsed
20134
20135 \begin_layout Plain Layout
20136 TransformCommand
20137 \begin_inset space ~
20138 \end_inset
20139
20140 Rotate
20141 \begin_inset space ~
20142 \end_inset
20143
20144 RotationLatexCommand
20145 \end_layout
20146
20147 \end_inset
20148
20149  This command specifies that the built in LaTeX command should be used for
20150  rotation.
20151  This command may occur once or not at all.
20152 \end_layout
20153
20154 \begin_layout Description
20155 \begin_inset Flex Code
20156 status collapsed
20157
20158 \begin_layout Plain Layout
20159 TransformCommand
20160 \begin_inset space ~
20161 \end_inset
20162
20163 Resize
20164 \begin_inset space ~
20165 \end_inset
20166
20167 ResizeLatexCommand
20168 \end_layout
20169
20170 \end_inset
20171
20172  This command specifies that the built in LaTeX command should be used for
20173  resizing.
20174  This command may occur once or not at all.
20175 \end_layout
20176
20177 \begin_layout Description
20178 \begin_inset Flex Code
20179 status collapsed
20180
20181 \begin_layout Plain Layout
20182 TransformOption
20183 \begin_inset space ~
20184 \end_inset
20185
20186 Rotate
20187 \begin_inset space ~
20188 \end_inset
20189
20190 RotationLatexOption
20191 \end_layout
20192
20193 \end_inset
20194
20195  This command specifies that rotation is done via an optional argument.
20196  This command may occur once or not at all.
20197 \end_layout
20198
20199 \begin_layout Description
20200 \begin_inset Flex Code
20201 status collapsed
20202
20203 \begin_layout Plain Layout
20204 TransformOption
20205 \begin_inset space ~
20206 \end_inset
20207
20208 Resize
20209 \begin_inset space ~
20210 \end_inset
20211
20212 ResizeLatexOption
20213 \end_layout
20214
20215 \end_inset
20216
20217  This command specifies that resizing is done via an optional argument.
20218  This command may occur once or not at all.
20219 \end_layout
20220
20221 \begin_layout Description
20222 \begin_inset Flex Code
20223 status collapsed
20224
20225 \begin_layout Plain Layout
20226 TransformOption
20227 \begin_inset space ~
20228 \end_inset
20229
20230 Clip
20231 \begin_inset space ~
20232 \end_inset
20233
20234 ClipLatexOption
20235 \end_layout
20236
20237 \end_inset
20238
20239  This command specifies that clipping is done via an optional argument.
20240  This command may occur once or not at all.
20241 \end_layout
20242
20243 \begin_layout Description
20244 \begin_inset Flex Code
20245 status collapsed
20246
20247 \begin_layout Plain Layout
20248 TransformOption
20249 \begin_inset space ~
20250 \end_inset
20251
20252 Extra
20253 \begin_inset space ~
20254 \end_inset
20255
20256 ExtraLatexOption
20257 \end_layout
20258
20259 \end_inset
20260
20261  This command specifies that an extra optional argument is used.
20262  This command may occur once or not at all.
20263 \end_layout
20264
20265 \begin_layout Description
20266 \begin_inset Flex Code
20267 status collapsed
20268
20269 \begin_layout Plain Layout
20270 UpdateFormat
20271 \begin_inset space ~
20272 \end_inset
20273
20274 <format>
20275 \end_layout
20276
20277 \end_inset
20278
20279  The file format of the converted file.
20280  This must be the name of a format that is known to LyX (see the 
20281 \begin_inset Flex MenuItem
20282 status collapsed
20283
20284 \begin_layout Plain Layout
20285
20286 \bar under
20287 T
20288 \bar default
20289 ools\SpecialChar \menuseparator
20290
20291 \bar under
20292 P
20293 \bar default
20294 references\SpecialChar \menuseparator
20295 File Handling\SpecialChar \menuseparator
20296 File Format
20297 \end_layout
20298
20299 \end_inset
20300
20301  dialog).
20302  This command must occur exactly once.
20303 \end_layout
20304
20305 \begin_layout Description
20306 \begin_inset Flex Code
20307 status collapsed
20308
20309 \begin_layout Plain Layout
20310 UpdateResult
20311 \begin_inset space ~
20312 \end_inset
20313
20314 <filename>
20315 \end_layout
20316
20317 \end_inset
20318
20319  The file name of the converted file.
20320  The file name must be absolute.
20321  This command must occur exactly once.
20322 \end_layout
20323
20324 \begin_layout Subsection
20325 Preamble definitions
20326 \end_layout
20327
20328 \begin_layout Standard
20329 The external template configuration file may contain additional preamble
20330  definitions enclosed by 
20331 \begin_inset Flex Code
20332 status collapsed
20333
20334 \begin_layout Plain Layout
20335 PreambleDef
20336 \end_layout
20337
20338 \end_inset
20339
20340  \SpecialChar \ldots{}
20341  
20342 \begin_inset Flex Code
20343 status collapsed
20344
20345 \begin_layout Plain Layout
20346 PreambleDefEnd
20347 \end_layout
20348
20349 \end_inset
20350
20351 .
20352  They can be used by the templates in the 
20353 \begin_inset Flex Code
20354 status collapsed
20355
20356 \begin_layout Plain Layout
20357 Format
20358 \end_layout
20359
20360 \end_inset
20361
20362  section.
20363 \end_layout
20364
20365 \begin_layout Section
20366 The substitution mechanism
20367 \end_layout
20368
20369 \begin_layout Standard
20370 When the external material facility invokes an external program, it is done
20371  on the basis of a command defined in the template configuration file.
20372  These commands can contain various macros that are expanded before execution.
20373  Execution always take place in the directory of the containing document.
20374 \end_layout
20375
20376 \begin_layout Standard
20377 Also, whenever external material is to be displayed, the name will be produced
20378  by the substitution mechanism, and most other commands in the template
20379  definition support substitution as well.
20380 \end_layout
20381
20382 \begin_layout Standard
20383 The available macros are the following:
20384 \end_layout
20385
20386 \begin_layout Description
20387 \begin_inset Flex Code
20388 status collapsed
20389
20390 \begin_layout Plain Layout
20391 $$AbsOrRelPathMaster
20392 \end_layout
20393
20394 \end_inset
20395
20396  The file path, absolute or relative to the master LyX document.
20397 \end_layout
20398
20399 \begin_layout Description
20400 \begin_inset Flex Code
20401 status collapsed
20402
20403 \begin_layout Plain Layout
20404 $$AbsOrRelPathParent
20405 \end_layout
20406
20407 \end_inset
20408
20409  The file path, absolute or relative to the LyX document.
20410 \end_layout
20411
20412 \begin_layout Description
20413 \begin_inset Flex Code
20414 status collapsed
20415
20416 \begin_layout Plain Layout
20417 $$AbsPath
20418 \end_layout
20419
20420 \end_inset
20421
20422  The absolute file path.
20423 \end_layout
20424
20425 \begin_layout Description
20426 \begin_inset Flex Code
20427 status collapsed
20428
20429 \begin_layout Plain Layout
20430 $$Basename
20431 \end_layout
20432
20433 \end_inset
20434
20435  The filename without path and without the extension.
20436 \end_layout
20437
20438 \begin_layout Description
20439 \begin_inset Flex Code
20440 status collapsed
20441
20442 \begin_layout Plain Layout
20443 $$Contents(
20444 \begin_inset Quotes eld
20445 \end_inset
20446
20447 filename.ext
20448 \begin_inset Quotes erd
20449 \end_inset
20450
20451 )
20452 \end_layout
20453
20454 \end_inset
20455
20456  This macro will expand to the contents of the file with the name 
20457 \begin_inset Flex Code
20458 status collapsed
20459
20460 \begin_layout Plain Layout
20461 filename.ext
20462 \end_layout
20463
20464 \end_inset
20465
20466 .
20467 \end_layout
20468
20469 \begin_layout Description
20470 \begin_inset Flex Code
20471 status collapsed
20472
20473 \begin_layout Plain Layout
20474 $$Extension
20475 \end_layout
20476
20477 \end_inset
20478
20479  The file extension (including the dot).
20480 \end_layout
20481
20482 \begin_layout Description
20483 \begin_inset Flex Code
20484 status collapsed
20485
20486 \begin_layout Plain Layout
20487 $$FName
20488 \end_layout
20489
20490 \end_inset
20491
20492  The filename of the file specified in the external material dialog.
20493  This is either an absolute name, or it is relative to the LyX document.
20494 \end_layout
20495
20496 \begin_layout Description
20497 \begin_inset Flex Code
20498 status collapsed
20499
20500 \begin_layout Plain Layout
20501 $$FPath
20502 \end_layout
20503
20504 \end_inset
20505
20506  The path part of 
20507 \begin_inset Flex Code
20508 status collapsed
20509
20510 \begin_layout Plain Layout
20511 $$FName
20512 \end_layout
20513
20514 \end_inset
20515
20516  (absolute name or relative to the LyX document).
20517 \end_layout
20518
20519 \begin_layout Description
20520 \begin_inset Flex Code
20521 status collapsed
20522
20523 \begin_layout Plain Layout
20524 $$RelPathMaster
20525 \end_layout
20526
20527 \end_inset
20528
20529  The file path, relative to the master LyX document.
20530 \end_layout
20531
20532 \begin_layout Description
20533 \begin_inset Flex Code
20534 status collapsed
20535
20536 \begin_layout Plain Layout
20537 $$RelPathParent
20538 \end_layout
20539
20540 \end_inset
20541
20542  The file path, relative to the LyX document.
20543 \end_layout
20544
20545 \begin_layout Description
20546 \begin_inset Flex Code
20547 status collapsed
20548
20549 \begin_layout Plain Layout
20550 $$Sysdir
20551 \end_layout
20552
20553 \end_inset
20554
20555  This macro will expand to the absolute path of the system directory.
20556  This is typically used to point to the various helper scripts that are
20557  bundled with LyX.
20558 \end_layout
20559
20560 \begin_layout Description
20561 \begin_inset Flex Code
20562 status collapsed
20563
20564 \begin_layout Plain Layout
20565 $$Tempname
20566 \end_layout
20567
20568 \end_inset
20569
20570  A name and full path to a temporary file which will be automatically deleted
20571  whenever the containing document is closed, or the external material insertion
20572  deleted.
20573 \end_layout
20574
20575 \begin_layout Standard
20576 All path macros contain a trailing directory separator, so you can construct
20577  e.
20578 \begin_inset space \thinspace{}
20579 \end_inset
20580
20581 g.
20582 \begin_inset space \space{}
20583 \end_inset
20584
20585 the absolute filename with 
20586 \begin_inset Flex Code
20587 status collapsed
20588
20589 \begin_layout Plain Layout
20590 $$AbsPath$$Basename$$Extension
20591 \end_layout
20592
20593 \end_inset
20594
20595 .
20596 \end_layout
20597
20598 \begin_layout Standard
20599 The macros above are substituted in all commands unless otherwise noted.
20600  The command 
20601 \begin_inset Flex Code
20602 status collapsed
20603
20604 \begin_layout Plain Layout
20605 Product
20606 \end_layout
20607
20608 \end_inset
20609
20610  supports additionally the following substitutions if they are enabled by
20611  the 
20612 \begin_inset Flex Code
20613 status collapsed
20614
20615 \begin_layout Plain Layout
20616 Transform
20617 \end_layout
20618
20619 \end_inset
20620
20621  and 
20622 \begin_inset Flex Code
20623 status collapsed
20624
20625 \begin_layout Plain Layout
20626 TransformCommand
20627 \end_layout
20628
20629 \end_inset
20630
20631  commands:
20632 \end_layout
20633
20634 \begin_layout Description
20635 \begin_inset Flex Code
20636 status collapsed
20637
20638 \begin_layout Plain Layout
20639 $$ResizeFront
20640 \end_layout
20641
20642 \end_inset
20643
20644  The front part of the resize command.
20645 \end_layout
20646
20647 \begin_layout Description
20648 \begin_inset Flex Code
20649 status collapsed
20650
20651 \begin_layout Plain Layout
20652 $$ResizeBack
20653 \end_layout
20654
20655 \end_inset
20656
20657  The back part of the resize command.
20658 \end_layout
20659
20660 \begin_layout Description
20661 \begin_inset Flex Code
20662 status collapsed
20663
20664 \begin_layout Plain Layout
20665 $$RotateFront
20666 \end_layout
20667
20668 \end_inset
20669
20670  The front part of the rotation command.
20671 \end_layout
20672
20673 \begin_layout Description
20674 \begin_inset Flex Code
20675 status collapsed
20676
20677 \begin_layout Plain Layout
20678 $$RotateBack
20679 \end_layout
20680
20681 \end_inset
20682
20683  The back part of the rotation command.
20684 \end_layout
20685
20686 \begin_layout Standard
20687 The value string of the 
20688 \begin_inset Flex Code
20689 status collapsed
20690
20691 \begin_layout Plain Layout
20692 Option
20693 \end_layout
20694
20695 \end_inset
20696
20697  command supports additionally the following substitutions if they are enabled
20698  by the 
20699 \begin_inset Flex Code
20700 status collapsed
20701
20702 \begin_layout Plain Layout
20703 Transform
20704 \end_layout
20705
20706 \end_inset
20707
20708  and 
20709 \begin_inset Flex Code
20710 status collapsed
20711
20712 \begin_layout Plain Layout
20713 TransformOption
20714 \end_layout
20715
20716 \end_inset
20717
20718  commands:
20719 \end_layout
20720
20721 \begin_layout Description
20722 \begin_inset Flex Code
20723 status collapsed
20724
20725 \begin_layout Plain Layout
20726 $$Clip
20727 \end_layout
20728
20729 \end_inset
20730
20731  The clip option.
20732 \end_layout
20733
20734 \begin_layout Description
20735 \begin_inset Flex Code
20736 status collapsed
20737
20738 \begin_layout Plain Layout
20739 $$Extra
20740 \end_layout
20741
20742 \end_inset
20743
20744  The extra option.
20745 \end_layout
20746
20747 \begin_layout Description
20748 \begin_inset Flex Code
20749 status collapsed
20750
20751 \begin_layout Plain Layout
20752 $$Resize
20753 \end_layout
20754
20755 \end_inset
20756
20757  The resize option.
20758 \end_layout
20759
20760 \begin_layout Description
20761 \begin_inset Flex Code
20762 status collapsed
20763
20764 \begin_layout Plain Layout
20765 $$Rotate
20766 \end_layout
20767
20768 \end_inset
20769
20770  The rotation option.
20771 \end_layout
20772
20773 \begin_layout Standard
20774 You may ask why there are so many path macros.
20775  There are mainly two reasons:
20776 \end_layout
20777
20778 \begin_layout Enumerate
20779 Relative and absolute file names should remain relative or absolute, respectivel
20780 y.
20781  Users may have reasons to prefer either form.
20782  Relative names are useful for portable documents that should work on different
20783  machines, for example.
20784  Absolute names may be required by some programs.
20785 \end_layout
20786
20787 \begin_layout Enumerate
20788 LaTeX treats relative file names differently than LyX and other programs
20789  in nested included files.
20790  For LyX, a relative file name is always relative to the document that contains
20791  the file name.
20792  For LaTeX, it is always relative to the master document.
20793  These two definitions are identical if you have only one document, but
20794  differ if you have a master document that includes part documents.
20795  That means that relative filenames must be transformed when presented to
20796  LaTeX.
20797  Fortunately LyX does this automatically for you if you choose the right
20798  macros.
20799 \end_layout
20800
20801 \begin_layout Standard
20802 So which path macro should be used in new template definitions? The rule
20803  is not difficult:
20804 \end_layout
20805
20806 \begin_layout Itemize
20807 Use 
20808 \begin_inset Flex Code
20809 status collapsed
20810
20811 \begin_layout Plain Layout
20812 $$AbsPath
20813 \end_layout
20814
20815 \end_inset
20816
20817  if an absolute path is required.
20818 \end_layout
20819
20820 \begin_layout Itemize
20821 Use 
20822 \begin_inset Flex Code
20823 status collapsed
20824
20825 \begin_layout Plain Layout
20826 $$AbsOrRelPathMaster
20827 \end_layout
20828
20829 \end_inset
20830
20831  if the substituted string is some kind of LaTeX input.
20832 \end_layout
20833
20834 \begin_layout Itemize
20835 Else use 
20836 \begin_inset Flex Code
20837 status collapsed
20838
20839 \begin_layout Plain Layout
20840 $$AbsOrRelPathParent
20841 \end_layout
20842
20843 \end_inset
20844
20845  in order to preserve the user's choice.
20846 \end_layout
20847
20848 \begin_layout Standard
20849 There are special cases where this rule does not work and e.
20850 \begin_inset space \thinspace{}
20851 \end_inset
20852
20853 g.
20854 \begin_inset space \space{}
20855 \end_inset
20856
20857 relative names are needed, but normally it will work just fine.
20858  One example for such a case is the command 
20859 \begin_inset Flex Code
20860 status collapsed
20861
20862 \begin_layout Plain Layout
20863 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
20864 \end_layout
20865
20866 \end_inset
20867
20868  in the XFig template above: We can't use the absolute name because the
20869  copier for 
20870 \begin_inset Flex Code
20871 status collapsed
20872
20873 \begin_layout Plain Layout
20874 .pstex_t
20875 \end_layout
20876
20877 \end_inset
20878
20879  files needs the relative name in order to rewrite the file content.
20880 \end_layout
20881
20882 \begin_layout Section
20883 Security discussion
20884 \begin_inset CommandInset label
20885 LatexCommand label
20886 name "sec:Security-discussion"
20887
20888 \end_inset
20889
20890
20891 \end_layout
20892
20893 \begin_layout Standard
20894 The external material feature interfaces with a lot of external programs
20895  and does so automatically, so we have to consider the security implications
20896  of this.
20897  In particular, since you have the option of including your own filenames
20898  and/or parameter strings and those are expanded into a command, it seems
20899  that it would be possible to create a malicious document which executes
20900  arbitrary commands when a user views or prints the document.
20901  This is something we definitely want to avoid.
20902 \end_layout
20903
20904 \begin_layout Standard
20905 However, since the external program commands are specified in the template
20906  configuration file only, there are no security issues if LyX is properly
20907  configured with safe templates only.
20908  This is so because the external programs are invoked with the 
20909 \begin_inset Flex Code
20910 status collapsed
20911
20912 \begin_layout Plain Layout
20913 execvp
20914 \end_layout
20915
20916 \end_inset
20917
20918 -system call rather than the 
20919 \begin_inset Flex Code
20920 status collapsed
20921
20922 \begin_layout Plain Layout
20923 system
20924 \end_layout
20925
20926 \end_inset
20927
20928  system-call, so it's not possible to execute arbitrary commands from the
20929  filename or parameter section via the shell.
20930 \end_layout
20931
20932 \begin_layout Standard
20933 This also implies that you are restricted in what command strings you can
20934  use in the external material templates.
20935  In particular, pipes and redirection are not readily available.
20936  This has to be so if LyX should remain safe.
20937  If you want to use some of the shell features, you should write a safe
20938  script to do this in a controlled manner, and then invoke the script from
20939  the command string.
20940  
20941 \end_layout
20942
20943 \begin_layout Standard
20944 It is possible to design a template that interacts directly with the shell,
20945  but since this would allow a malicious user to execute arbitrary commands
20946  by writing clever filenames and/or parameters, we generally recommend that
20947  you only use safe scripts that work with the 
20948 \begin_inset Flex Code
20949 status collapsed
20950
20951 \begin_layout Plain Layout
20952 execvp
20953 \end_layout
20954
20955 \end_inset
20956
20957  system call in a controlled manner.
20958  Of course, for use in a controlled environment, it can be tempting to just
20959  fall back to use ordinary shell scripts.
20960  If you do so, be aware that you 
20961 \emph on
20962 will
20963 \emph default
20964  provide an easily exploitable security hole in your system.
20965  Of course it stands to reason that such unsafe templates will never be
20966  included in the standard LyX distribution, although we do encourage people
20967  to submit new templates in the open source tradition.
20968  But LyX as shipped from the official distribution channels will never have
20969  unsafe templates.
20970 \end_layout
20971
20972 \begin_layout Standard
20973 Including external material provides a lot of power, and you have to be
20974  careful not to introduce security hazards with this power.
20975  A subtle error in a single line in an innocent looking script can open
20976  the door to huge security problems.
20977  So if you do not fully understand the issues, we recommend that you consult
20978  a knowledgeable security professional or the LyX development team if you
20979  have any questions about whether a given template is safe or not.
20980  And do this before you use it in an uncontrolled environment.
20981 \end_layout
20982
20983 \end_body
20984 \end_document