]> git.lyx.org Git - lyx.git/blob - lib/doc/Customization.lyx
Fix bug 5412 by updating docs.
[lyx.git] / lib / doc / Customization.lyx
1 #LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
2 \lyxformat 371
3 \begin_document
4 \begin_header
5 \textclass scrbook
6 \begin_preamble
7 % DO NOT ALTER THIS PREAMBLE!!!
8 %
9 % This preamble is designed to ensure that this document prints
10 % out as advertised. If you mess with this preamble,
11 % parts of this document may not print out as expected.  If you
12 % have problems LaTeXing this file, please contact 
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
15
16 \usepackage{ifpdf} % part of the hyperref bundle
17 \ifpdf % if pdflatex is used
18
19  % set fonts for nicer pdf view
20  \IfFileExists{lmodern.sty}
21   {\usepackage{lmodern}}{}
22
23 \fi % end if pdflatex is used
24
25 % the pages of the TOC is numbered roman
26 % and a pdf-bookmark for the TOC is added
27 \let\myTOC\tableofcontents
28 \renewcommand\tableofcontents{%
29   \frontmatter
30   \pdfbookmark[1]{\contentsname}{}
31   \myTOC
32   \mainmatter }
33
34 % redefine the \LyX macro for PDF bookmarks
35 \def\LyX{\texorpdfstring{%
36   L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
37   {LyX}}
38
39 % used for multi-column text
40 \usepackage{multicol}
41 \usepackage{inputenc}
42 \end_preamble
43 \options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage,tablecaptionabove
44 \use_default_options false
45 \begin_modules
46 logicalmkup
47 \end_modules
48 \begin_local_layout
49 Format 7
50 InsetLayout CharStyle:MenuItem
51 LyxType               charstyle
52 LabelString           menu
53 LatexType             command
54 LatexName             menuitem
55 Font
56 Family              Sans
57 EndFont
58 Preamble
59 \newcommand*{\menuitem}[1]{{\sffamily #1}}
60 EndPreamble
61 End
62 \end_local_layout
63 \language english
64 \inputencoding auto
65 \font_roman default
66 \font_sans default
67 \font_typewriter default
68 \font_default_family default
69 \use_xetex false
70 \font_sc false
71 \font_osf false
72 \font_sf_scale 100
73 \font_tt_scale 100
74
75 \graphics default
76 \default_output_format default
77 \bibtex_command default
78 \index_command default
79 \paperfontsize 12
80 \spacing single
81 \use_hyperref true
82 \pdf_title "LyX Configuration Manual"
83 \pdf_author "LyX Team"
84 \pdf_subject "LyX-documentation Customization"
85 \pdf_keywords "LyX, documentation, customization"
86 \pdf_bookmarks true
87 \pdf_bookmarksnumbered true
88 \pdf_bookmarksopen true
89 \pdf_bookmarksopenlevel 1
90 \pdf_breaklinks false
91 \pdf_pdfborder false
92 \pdf_colorlinks true
93 \pdf_backref false
94 \pdf_pdfusetitle false
95 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true,pdfstartview=XYZ, plainpages=false, pdfpagelabels"
96 \papersize default
97 \use_geometry false
98 \use_amsmath 0
99 \use_esint 0
100 \use_mhchem 1
101 \cite_engine basic
102 \use_bibtopic false
103 \use_indices false
104 \paperorientation portrait
105 \suppress_date false
106 \branch OutDated
107 \selected 0
108 \filename_suffix 0
109 \color #f5fae7
110 \end_branch
111 \index Index
112 \shortcut idx
113 \color #008000
114 \end_index
115 \secnumdepth 3
116 \tocdepth 3
117 \paragraph_separation indent
118 \paragraph_indentation default
119 \quotes_language english
120 \papercolumns 1
121 \papersides 2
122 \paperpagestyle headings
123 \tracking_changes false
124 \output_changes false
125 \end_header
126
127 \begin_body
128
129 \begin_layout Title
130 Customizing LyX: Features for the Advanced User
131 \end_layout
132
133 \begin_layout Author
134 by the LyX Team
135 \begin_inset Foot
136 status collapsed
137
138 \begin_layout Plain Layout
139 \noindent
140 If you have comments or error corrections, please send them to the LyX Documenta
141 tion mailing list, 
142 \begin_inset CommandInset href
143 LatexCommand href
144 target "lyx-docs@lists.lyx.org"
145 type "mailto:"
146
147 \end_inset
148
149 .
150  Include 
151 \begin_inset Quotes eld
152 \end_inset
153
154 [Customization]
155 \begin_inset Quotes erd
156 \end_inset
157
158  in the subject header, and please cc the current maintainer of this file,
159  Richard Heck <rgheck@comcast.net>.
160 \end_layout
161
162 \end_inset
163
164
165 \begin_inset Newline newline
166 \end_inset
167
168
169 \begin_inset Newline newline
170 \end_inset
171
172 Version 2.0.x 
173 \end_layout
174
175 \begin_layout Standard
176 \begin_inset CommandInset toc
177 LatexCommand tableofcontents
178
179 \end_inset
180
181
182 \end_layout
183
184 \begin_layout Standard
185 \begin_inset Note Note
186 status open
187
188 \begin_layout Plain Layout
189 Please use change tracking when modifying this document.
190  This makes it easier for our translators to recognize things that have
191  been changed, and it helps the maintainer keep up-to-date with what's been
192  done.
193 \end_layout
194
195 \end_inset
196
197
198 \end_layout
199
200 \begin_layout Chapter
201 Introduction
202 \end_layout
203
204 \begin_layout Standard
205 This manual covers the customization features present in LyX.
206  In it, we discuss issues like keyboard shortcuts, screen previewing options,
207  printer options, sending commands to LyX via the LyX Server, internationalizati
208 on, installing new LaTeX classes and LyX layouts, etc.
209  We can't possibly hope to touch on everything you can change—our developers
210  add new features faster than we can document them—but we will explain the
211  most common customizations and hopefully point you in the right direction
212  for some of the more obscure ones.
213 \end_layout
214
215 \begin_layout Standard
216 \begin_inset Branch OutDated
217 status open
218
219 \begin_layout Standard
220 Information from previous versions of this document that now seems to be
221  outdated is contained in the OutDated branch of this document.
222  By default, this information will not appear in the LaTeX output.
223 \end_layout
224
225 \end_inset
226
227
228 \end_layout
229
230 \begin_layout Chapter
231 LyX configuration files
232 \end_layout
233
234 \begin_layout Standard
235 This chapter aims to help you to find your way through the LyX configuration
236  files.
237  Before continuing to read this chapter, you should find out where your
238  LyX library and user directories are by using 
239 \begin_inset Flex CharStyle:MenuItem
240 status collapsed
241
242 \begin_layout Plain Layout
243 Help\SpecialChar \menuseparator
244 About
245 \begin_inset space ~
246 \end_inset
247
248 LyX
249 \end_layout
250
251 \end_inset
252
253 .
254  The library directory is the place where LyX places its system-wide configurati
255 on files; the user directory is where you can place your modified versions.
256  We will call the former 
257 \begin_inset Flex CharStyle:Code
258 status collapsed
259
260 \begin_layout Plain Layout
261 LyXDir
262 \end_layout
263
264 \end_inset
265
266  and the latter 
267 \begin_inset Flex CharStyle:MenuItem
268 status collapsed
269
270 \begin_layout Plain Layout
271 UserDir
272 \end_layout
273
274 \end_inset
275
276  in the remainder of this document.
277  
278 \end_layout
279
280 \begin_layout Section
281 What's in 
282 \begin_inset Flex CharStyle:Code
283 status collapsed
284
285 \begin_layout Plain Layout
286 LyXDir
287 \end_layout
288
289 \end_inset
290
291 ?
292 \end_layout
293
294 \begin_layout Standard
295 \begin_inset Flex CharStyle:Code
296 status collapsed
297
298 \begin_layout Plain Layout
299 LyXDir
300 \end_layout
301
302 \end_inset
303
304  and its sub-directories contain a number of files and that can be used
305  to customize LyX's behavior.
306  You can change many of these files from within LyX itself through the 
307 \begin_inset Flex CharStyle:MenuItem
308 status collapsed
309
310 \begin_layout Plain Layout
311 Tools\SpecialChar \menuseparator
312 Preferences
313 \end_layout
314
315 \end_inset
316
317  dialog.
318  Most customization that you will want to do in LyX is possible through
319  this dialog.
320  However, many other inner aspects of LyX can be customized by modifying
321  the files in 
322 \begin_inset Flex CharStyle:Code
323 status collapsed
324
325 \begin_layout Plain Layout
326 LyXDir
327 \end_layout
328
329 \end_inset
330
331 .
332  These files fall in different categories, described in the following subsection
333 s.
334 \end_layout
335
336 \begin_layout Subsection
337 Automatically generated files
338 \end_layout
339
340 \begin_layout Standard
341 The files, which are to be found in 
342 \begin_inset Flex CharStyle:MenuItem
343 status collapsed
344
345 \begin_layout Plain Layout
346 UserDir
347 \end_layout
348
349 \end_inset
350
351 , are generated when you configure LyX.
352  They contain various default values that are guessed by inspection.
353  In general, it is not a good idea to modify them, since they might be overwritt
354 en at any time.
355 \end_layout
356
357 \begin_layout Labeling
358 \labelwidthstring 00.00.0000
359 \begin_inset Flex CharStyle:Code
360 status collapsed
361
362 \begin_layout Plain Layout
363 lyxrc.defaults
364 \end_layout
365
366 \end_inset
367
368  contains defaults for various commands.
369 \end_layout
370
371 \begin_layout Labeling
372 \labelwidthstring 00.00.0000
373 \begin_inset Flex CharStyle:Code
374 status collapsed
375
376 \begin_layout Plain Layout
377 packages.lst
378 \end_layout
379
380 \end_inset
381
382  contains the list of packages that have been recognized by LyX.
383  It is currently unused by the LyX program itself, but the information extracted
384 , and more, is made available with 
385 \begin_inset Flex CharStyle:MenuItem
386 status collapsed
387
388 \begin_layout Plain Layout
389 Help\SpecialChar \menuseparator
390 LaTeX
391 \begin_inset space ~
392 \end_inset
393
394 Configuration
395 \end_layout
396
397 \end_inset
398
399 .
400 \end_layout
401
402 \begin_layout Labeling
403 \labelwidthstring 00.00.0000
404 \begin_inset Flex CharStyle:Code
405 status collapsed
406
407 \begin_layout Plain Layout
408 textclass.lst
409 \end_layout
410
411 \end_inset
412
413  the list of text classes that have been found in your 
414 \begin_inset Flex CharStyle:Code
415 status collapsed
416
417 \begin_layout Plain Layout
418 layout/
419 \end_layout
420
421 \end_inset
422
423  directories, along with the associated LaTeX document class and their descripti
424 on.
425 \end_layout
426
427 \begin_layout Labeling
428 \labelwidthstring 00.00.0000
429 \begin_inset Flex CharStyle:Code
430 status collapsed
431
432 \begin_layout Plain Layout
433 lyxmodules.lst
434 \end_layout
435
436 \end_inset
437
438  the list of layout modules found in your 
439 \begin_inset Flex CharStyle:Code
440 status collapsed
441
442 \begin_layout Plain Layout
443 layout/
444 \end_layout
445
446 \end_inset
447
448  directories
449 \end_layout
450
451 \begin_layout Labeling
452 \labelwidthstring 00.00.0000
453 \begin_inset Flex CharStyle:Code
454 status collapsed
455
456 \begin_layout Plain Layout
457 *files.lst
458 \end_layout
459
460 \end_inset
461
462  lists of various sorts of LaTeX-related files found on your system
463 \end_layout
464
465 \begin_layout Labeling
466 \labelwidthstring 00.00.0000
467 \begin_inset Flex CharStyle:Code
468 status collapsed
469
470 \begin_layout Plain Layout
471 doc/LaTeXConfig.lyx
472 \end_layout
473
474 \end_inset
475
476  is automatically generated during configuration from the file 
477 \begin_inset Flex CharStyle:Code
478 status collapsed
479
480 \begin_layout Plain Layout
481 LaTeXConfig.lyx.in
482 \end_layout
483
484 \end_inset
485
486 .
487  It contains information on your LaTeX configuration.
488 \end_layout
489
490 \begin_layout Subsection
491 Directories
492 \end_layout
493
494 \begin_layout Standard
495 These directories are duplicated between 
496 \begin_inset Flex CharStyle:Code
497 status collapsed
498
499 \begin_layout Plain Layout
500 LyXDir
501 \end_layout
502
503 \end_inset
504
505  and 
506 \begin_inset Flex CharStyle:Code
507 status collapsed
508
509 \begin_layout Plain Layout
510 UserDir
511 \end_layout
512
513 \end_inset
514
515 .
516  If a particular files exists in both places, the one in 
517 \begin_inset Flex CharStyle:Code
518 status collapsed
519
520 \begin_layout Plain Layout
521 UserDir
522 \end_layout
523
524 \end_inset
525
526  will be used.
527 \end_layout
528
529 \begin_layout Labeling
530 \labelwidthstring 00.00.0000
531 \begin_inset Flex CharStyle:Code
532 status collapsed
533
534 \begin_layout Plain Layout
535 bind/
536 \end_layout
537
538 \end_inset
539
540  this directory contains files with the extension 
541 \begin_inset Flex CharStyle:Code
542 status collapsed
543
544 \begin_layout Plain Layout
545 .bind
546 \end_layout
547
548 \end_inset
549
550  that define the keybindings used in LyX.
551  If there exists an internationalized version of the bind file named 
552 \begin_inset Flex CharStyle:Code
553 status collapsed
554
555 \begin_layout Plain Layout
556 $LANG_xxx.bind
557 \end_layout
558
559 \end_inset
560
561 , that will be used first.
562 \end_layout
563
564 \begin_layout Labeling
565 \labelwidthstring 00.00.0000
566 \begin_inset Flex CharStyle:Code
567 status collapsed
568
569 \begin_layout Plain Layout
570 clipart/
571 \end_layout
572
573 \end_inset
574
575  contains graphics files that can be included in documents.
576  
577 \end_layout
578
579 \begin_layout Labeling
580 \labelwidthstring 00.00.0000
581 \begin_inset Flex CharStyle:Code
582 status collapsed
583
584 \begin_layout Plain Layout
585 doc/
586 \end_layout
587
588 \end_inset
589
590  contains LyX documentation files (including the one you are currently reading).
591  The file 
592 \begin_inset Flex CharStyle:Code
593 status collapsed
594
595 \begin_layout Plain Layout
596 LaTeXConfig.lyx
597 \end_layout
598
599 \end_inset
600
601  deserves special attention, as noted above.
602  The internationalized help docs are in subdirectories 
603 \begin_inset Flex CharStyle:Code
604 status collapsed
605
606 \begin_layout Plain Layout
607 doc/xx
608 \end_layout
609
610 \end_inset
611
612  where 
613 \begin_inset Quotes eld
614 \end_inset
615
616 xx
617 \begin_inset Quotes erd
618 \end_inset
619
620  is the ISO language code.
621  See chapter
622 \begin_inset space ~
623 \end_inset
624
625
626 \begin_inset CommandInset ref
627 LatexCommand ref
628 reference "cha:Internationalizing-LyX"
629
630 \end_inset
631
632  for details.
633 \end_layout
634
635 \begin_layout Labeling
636 \labelwidthstring 00.00.0000
637 \begin_inset Flex CharStyle:Code
638 status collapsed
639
640 \begin_layout Plain Layout
641 examples/
642 \end_layout
643
644 \end_inset
645
646  contains example files that explain how to use some features.
647  In the file browser, press the 
648 \begin_inset Flex CharStyle:MenuItem
649 status collapsed
650
651 \begin_layout Plain Layout
652 Examples
653 \end_layout
654
655 \end_inset
656
657  button to get there.
658 \end_layout
659
660 \begin_layout Labeling
661 \labelwidthstring 00.00.0000
662 \begin_inset Flex CharStyle:Code
663 status collapsed
664
665 \begin_layout Plain Layout
666 images/
667 \end_layout
668
669 \end_inset
670
671  contains image files that are used by the 
672 \begin_inset Flex CharStyle:MenuItem
673 status collapsed
674
675 \begin_layout Plain Layout
676 Document
677 \end_layout
678
679 \end_inset
680
681  dialog.
682  In addition, it also contains the individual icons used in the toolbar
683  and the banners that can be shown when LyX is launched.
684 \end_layout
685
686 \begin_layout Labeling
687 \labelwidthstring 00.00.0000
688 \begin_inset Flex CharStyle:Code
689 status collapsed
690
691 \begin_layout Plain Layout
692 kbd/
693 \end_layout
694
695 \end_inset
696
697  contains keyboard keymapping files.
698  See Chapter
699 \begin_inset space ~
700 \end_inset
701
702
703 \begin_inset CommandInset ref
704 LatexCommand ref
705 reference "sec:International-Keymap-Stuff"
706
707 \end_inset
708
709  for details.
710 \end_layout
711
712 \begin_layout Labeling
713 \labelwidthstring 00.00.0000
714 \begin_inset Flex CharStyle:Code
715 status collapsed
716
717 \begin_layout Plain Layout
718 layouts/
719 \end_layout
720
721 \end_inset
722
723  contains the text class and module files described in Chapter
724 \begin_inset space ~
725 \end_inset
726
727
728 \begin_inset CommandInset ref
729 LatexCommand ref
730 reference "cha:Installing-New-Document"
731
732 \end_inset
733
734 .
735 \end_layout
736
737 \begin_layout Labeling
738 \labelwidthstring 00.00.0000
739 \begin_inset Flex CharStyle:Code
740 status collapsed
741
742 \begin_layout Plain Layout
743 lyx2lyx
744 \end_layout
745
746 \end_inset
747
748  contains the 
749 \begin_inset Flex CharStyle:Code
750 status collapsed
751
752 \begin_layout Plain Layout
753 lyx2lyx
754 \end_layout
755
756 \end_inset
757
758  Python scripts used to convert between LyX versions.
759  These can be run from the command line if, say, you want to batch-convert
760  files.
761 \end_layout
762
763 \begin_layout Labeling
764 \labelwidthstring 00.00.0000
765 \begin_inset Flex CharStyle:Code
766 status collapsed
767
768 \begin_layout Plain Layout
769 scripts/
770 \end_layout
771
772 \end_inset
773
774  contains some files that demonstrate the capabilities of the 
775 \begin_inset Flex CharStyle:MenuItem
776 status collapsed
777
778 \begin_layout Plain Layout
779 External
780 \begin_inset space ~
781 \end_inset
782
783 Template
784 \end_layout
785
786 \end_inset
787
788  feature.
789  Also contains some scripts used by LyX itself.
790 \end_layout
791
792 \begin_layout Labeling
793 \labelwidthstring 00.00.0000
794 \begin_inset Flex CharStyle:Code
795 status collapsed
796
797 \begin_layout Plain Layout
798 templates/
799 \end_layout
800
801 \end_inset
802
803  contains the standard LyX template files described in Chapter
804 \begin_inset space ~
805 \end_inset
806
807
808 \begin_inset CommandInset ref
809 LatexCommand ref
810 reference "sec:Creating-Templates"
811
812 \end_inset
813
814 .
815 \end_layout
816
817 \begin_layout Labeling
818 \labelwidthstring 00.00.0000
819 \begin_inset Flex CharStyle:Code
820 status collapsed
821
822 \begin_layout Plain Layout
823 ui/
824 \end_layout
825
826 \end_inset
827
828  contains files with the extension 
829 \begin_inset Flex CharStyle:Code
830 status collapsed
831
832 \begin_layout Plain Layout
833 .ui
834 \end_layout
835
836 \end_inset
837
838  that define the user interface to LyX.
839  That is, the files define which items appear in which menus and the items
840  appearing on the toolbar.
841 \end_layout
842
843 \begin_layout Subsection
844 Files you don't want to modify
845 \end_layout
846
847 \begin_layout Standard
848 These files are used internally by LyX and you generally do not need to
849  modify them unless you are a developer.
850 \end_layout
851
852 \begin_layout Labeling
853 \labelwidthstring 00.00.0000
854 \begin_inset Flex CharStyle:Code
855 status collapsed
856
857 \begin_layout Plain Layout
858 CREDITS
859 \end_layout
860
861 \end_inset
862
863  this file contains the list of LyX developers.
864  The contents are displayed with the menu entry 
865 \begin_inset Flex CharStyle:MenuItem
866 status collapsed
867
868 \begin_layout Plain Layout
869 Help\SpecialChar \menuseparator
870 About
871 \begin_inset space ~
872 \end_inset
873
874 LyX
875 \end_layout
876
877 \end_inset
878
879 .
880 \end_layout
881
882 \begin_layout Labeling
883 \labelwidthstring 00.00.0000
884 \begin_inset Flex CharStyle:Code
885 status collapsed
886
887 \begin_layout Plain Layout
888 chkconfig.ltx
889 \end_layout
890
891 \end_inset
892
893  this is a LaTeX script used during the configuration process.
894  Do not run directly.
895 \end_layout
896
897 \begin_layout Labeling
898 \labelwidthstring 00.00.0000
899 \begin_inset Flex CharStyle:Code
900 status collapsed
901
902 \begin_layout Plain Layout
903 configure.py
904 \end_layout
905
906 \end_inset
907
908  this is the script that is used to re-configure LyX.
909  It creates configuration files in the directory it was run from.
910 \end_layout
911
912 \begin_layout Subsection
913 Other files needing a line or two...
914 \end_layout
915
916 \begin_layout Labeling
917 \labelwidthstring 00.00.0000
918 \begin_inset Flex CharStyle:Code
919 status collapsed
920
921 \begin_layout Plain Layout
922 encodings
923 \end_layout
924
925 \end_inset
926
927  this contains tables describing how different character encodings can be
928  mapped to Unicode
929 \end_layout
930
931 \begin_layout Labeling
932 \labelwidthstring 00.00.0000
933 \begin_inset Flex CharStyle:Code
934 status collapsed
935
936 \begin_layout Plain Layout
937 external_templates
938 \end_layout
939
940 \end_inset
941
942  this file contains the templates available to the new 
943 \begin_inset Flex CharStyle:MenuItem
944 status collapsed
945
946 \begin_layout Plain Layout
947 External
948 \begin_inset space ~
949 \end_inset
950
951 Template
952 \end_layout
953
954 \end_inset
955
956  feature.
957 \end_layout
958
959 \begin_layout Labeling
960 \labelwidthstring 00.00.0000
961 \begin_inset Flex CharStyle:Code
962 status collapsed
963
964 \begin_layout Plain Layout
965 languages
966 \end_layout
967
968 \end_inset
969
970  this file contains a list of all the languages currently supported by LyX.
971 \end_layout
972
973 \begin_layout Section
974 Your local configuration directory
975 \end_layout
976
977 \begin_layout Standard
978 Even if you are using LyX as an unprivileged user, you might want to change
979  LyX configuration for your own use.
980  The 
981 \begin_inset Flex CharStyle:Code
982 status collapsed
983
984 \begin_layout Plain Layout
985 UserDir
986 \end_layout
987
988 \end_inset
989
990  directory contains all your personal configuration files.
991  This is the directory described as 
992 \begin_inset Quotes eld
993 \end_inset
994
995 user directory
996 \begin_inset Quotes erd
997 \end_inset
998
999  in 
1000 \begin_inset Flex CharStyle:MenuItem
1001 status collapsed
1002
1003 \begin_layout Plain Layout
1004 Help\SpecialChar \menuseparator
1005 About
1006 \begin_inset space ~
1007 \end_inset
1008
1009 LyX
1010 \end_layout
1011
1012 \end_inset
1013
1014 .
1015  This directory is used as a mirror of 
1016 \begin_inset Flex CharStyle:Code
1017 status collapsed
1018
1019 \begin_layout Plain Layout
1020 LyXDir
1021 \end_layout
1022
1023 \end_inset
1024
1025 , which means that every file in 
1026 \begin_inset Flex CharStyle:Code
1027 status collapsed
1028
1029 \begin_layout Plain Layout
1030 UserDir
1031 \end_layout
1032
1033 \end_inset
1034
1035  is a replacement for the corresponding file in 
1036 \begin_inset Flex CharStyle:Code
1037 status collapsed
1038
1039 \begin_layout Plain Layout
1040 LyXDir
1041 \end_layout
1042
1043 \end_inset
1044
1045 .
1046  Any configuration file described in the above sections can be placed either
1047  in the system-wide directory, in which case it will affect all users, or
1048  in your local directory for your own use.
1049 \end_layout
1050
1051 \begin_layout Standard
1052 To make things clearer, let's provide a few examples:
1053 \end_layout
1054
1055 \begin_layout Itemize
1056 The preferences set in the 
1057 \begin_inset Flex CharStyle:MenuItem
1058 status collapsed
1059
1060 \begin_layout Plain Layout
1061 Tools\SpecialChar \menuseparator
1062 Preferences
1063 \end_layout
1064
1065 \end_inset
1066
1067  dialog are saved to a file 
1068 \begin_inset Flex CharStyle:Code
1069 status collapsed
1070
1071 \begin_layout Plain Layout
1072 preferences
1073 \end_layout
1074
1075 \end_inset
1076
1077  in 
1078 \begin_inset Flex CharStyle:Code
1079 status collapsed
1080
1081 \begin_layout Plain Layout
1082 UserDir
1083 \end_layout
1084
1085 \end_inset
1086
1087 .
1088 \end_layout
1089
1090 \begin_layout Itemize
1091 When you reconfigure using 
1092 \begin_inset Flex CharStyle:MenuItem
1093 status collapsed
1094
1095 \begin_layout Plain Layout
1096 Tools\SpecialChar \menuseparator
1097 Reconfigure
1098 \end_layout
1099
1100 \end_inset
1101
1102 , LyX runs the 
1103 \begin_inset Flex CharStyle:Code
1104 status collapsed
1105
1106 \begin_layout Plain Layout
1107 configure.py
1108 \end_layout
1109
1110 \end_inset
1111
1112  script, and the resulting files are written in your local configuration
1113  directory.
1114  This means that any additional text class file that you might have added
1115  in 
1116 \begin_inset Flex CharStyle:Code
1117 status collapsed
1118
1119 \begin_layout Plain Layout
1120 UserDir/layouts
1121 \end_layout
1122
1123 \end_inset
1124
1125  will be added to the list of classes in the 
1126 \begin_inset Flex CharStyle:MenuItem
1127 status collapsed
1128
1129 \begin_layout Plain Layout
1130 Document\SpecialChar \menuseparator
1131 Settings
1132 \end_layout
1133
1134 \end_inset
1135
1136  dialog.
1137 \end_layout
1138
1139 \begin_layout Itemize
1140 If you get some updated documentation from LyX ftp site and cannot install
1141  it because you do not have sysadmin rights on your system, you can just
1142  copy the files in 
1143 \begin_inset Flex CharStyle:Code
1144 status collapsed
1145
1146 \begin_layout Plain Layout
1147 UserDir/doc/
1148 \end_layout
1149
1150 \end_inset
1151
1152  and the items in the 
1153 \begin_inset Flex CharStyle:MenuItem
1154 status collapsed
1155
1156 \begin_layout Plain Layout
1157 Help
1158 \end_layout
1159
1160 \end_inset
1161
1162  menu will open them!
1163 \end_layout
1164
1165 \begin_layout Section
1166 Running LyX with multiple configurations
1167 \end_layout
1168
1169 \begin_layout Standard
1170 The configuration freedom of the local configuration directory may not suffice
1171  if you want to have more than one configuration at your disposal.
1172  For example, you may want to be use different key bindings or printer settings
1173  at different times.
1174  You can achieve this by having several such directories.
1175  You then specify which directory to use at run-time.
1176 \end_layout
1177
1178 \begin_layout Standard
1179 Invoking LyX with the command line switch 
1180 \begin_inset Flex CharStyle:Code
1181 status collapsed
1182
1183 \begin_layout Plain Layout
1184 -userdir
1185 \end_layout
1186
1187 \end_inset
1188
1189  
1190 \emph on
1191 <some directory>
1192 \emph default
1193  instructs the program to read the configuration from that directory, and
1194  not from the default directory.
1195  (You can determine the default directory by running LyX without the 
1196 \begin_inset Flex CharStyle:Code
1197 status collapsed
1198
1199 \begin_layout Plain Layout
1200 -userdir
1201 \end_layout
1202
1203 \end_inset
1204
1205  switch.) If the specified directory does not exist, LyX offers to create
1206  it for you, just like it does for the default directory on the first time
1207  you run the program.
1208  You can modify the configuration options in this additional user directory
1209  exactly as you would for the default directory.
1210  These directories are completely independent (but read on).
1211  Note that setting the environment variable 
1212 \begin_inset Flex CharStyle:Code
1213 status collapsed
1214
1215 \begin_layout Plain Layout
1216 LYX_USERDIR_VER
1217 \end_layout
1218
1219 \end_inset
1220
1221  to some value has exactly the same effect.
1222 \end_layout
1223
1224 \begin_layout Standard
1225 Having several configurations also requires more maintenance: if you want
1226  to add a new layout to 
1227 \begin_inset Flex CharStyle:Code
1228 status collapsed
1229
1230 \begin_layout Plain Layout
1231 NewUserDir/layouts
1232 \end_layout
1233
1234 \end_inset
1235
1236  which you want available from all your configurations, you must add it
1237  to each directory separately.
1238  You can avoid this with the following trick: after LyX creates the additional
1239  directory, most of the subdirectories (see above) are empty.
1240  If you want the new configuration to mirror an existing one, replace the
1241  empty subdirectory with a symbolic link to the matching subdirectory in
1242  the existing configuration.
1243  Take care with the 
1244 \begin_inset Flex CharStyle:Code
1245 status collapsed
1246
1247 \begin_layout Plain Layout
1248 doc/
1249 \end_layout
1250
1251 \end_inset
1252
1253  subdirectory, however, since it contains a file written by the configuration
1254  script (also accessible through 
1255 \begin_inset Flex CharStyle:MenuItem
1256 status collapsed
1257
1258 \begin_layout Plain Layout
1259 Tools\SpecialChar \menuseparator
1260 Reconfigure
1261 \end_layout
1262
1263 \end_inset
1264
1265 ) which is configuration-specific.
1266 \end_layout
1267
1268 \begin_layout Chapter
1269 The Preferences dialog
1270 \end_layout
1271
1272 \begin_layout Standard
1273 All options of the preferences dialog are described in the Appendix 
1274 \emph on
1275 The Preferences Dialog
1276 \emph default
1277  in the 
1278 \emph on
1279 User's Guide
1280 \emph default
1281 .
1282  For some options you might find here more details.
1283 \end_layout
1284
1285 \begin_layout Section
1286 Formats
1287 \begin_inset CommandInset label
1288 LatexCommand label
1289 name "sec:Formats"
1290
1291 \end_inset
1292
1293
1294 \end_layout
1295
1296 \begin_layout Standard
1297 The first step is to define your file formats if they are not already defined.
1298  To do so, open the 
1299 \begin_inset Flex CharStyle:MenuItem
1300 status collapsed
1301
1302 \begin_layout Plain Layout
1303 Tools\SpecialChar \menuseparator
1304 Preferences
1305 \end_layout
1306
1307 \end_inset
1308
1309  dialog.
1310  Under 
1311 \begin_inset Flex CharStyle:MenuItem
1312 status collapsed
1313
1314 \begin_layout Plain Layout
1315 File Handling\SpecialChar \menuseparator
1316 File formats
1317 \end_layout
1318
1319 \end_inset
1320
1321  press the 
1322 \begin_inset Flex CharStyle:MenuItem
1323 status collapsed
1324
1325 \begin_layout Plain Layout
1326 New\SpecialChar \ldots{}
1327
1328 \end_layout
1329
1330 \end_inset
1331
1332  button to define your new format.
1333  The 
1334 \begin_inset Flex CharStyle:MenuItem
1335 status collapsed
1336
1337 \begin_layout Plain Layout
1338 Format
1339 \end_layout
1340
1341 \end_inset
1342
1343  field contains the name used to identify the format in the GUI.
1344  The 
1345 \begin_inset Flex CharStyle:MenuItem
1346 status collapsed
1347
1348 \begin_layout Plain Layout
1349 Short Name
1350 \end_layout
1351
1352 \end_inset
1353
1354  is used to identify the format internally.
1355  You will also need to enter a file extension.
1356  These are all required.
1357  The optional 
1358 \begin_inset Flex CharStyle:MenuItem
1359 status collapsed
1360
1361 \begin_layout Plain Layout
1362 Shortcut
1363 \end_layout
1364
1365 \end_inset
1366
1367  field is used to provide a keyboard shortcut on the menus.
1368  (For example, pressing 
1369 \begin_inset Flex CharStyle:MenuItem
1370 status collapsed
1371
1372 \begin_layout Plain Layout
1373 Alt-V D
1374 \end_layout
1375
1376 \end_inset
1377
1378  will 
1379 \begin_inset Flex CharStyle:MenuItem
1380 status collapsed
1381
1382 \begin_layout Plain Layout
1383 View\SpecialChar \menuseparator
1384 DVI
1385 \end_layout
1386
1387 \end_inset
1388
1389 .) 
1390 \end_layout
1391
1392 \begin_layout Standard
1393 A Format can have a 
1394 \begin_inset Flex CharStyle:MenuItem
1395 status collapsed
1396
1397 \begin_layout Plain Layout
1398 Viewer
1399 \end_layout
1400
1401 \end_inset
1402
1403  and an 
1404 \begin_inset Flex CharStyle:MenuItem
1405 status collapsed
1406
1407 \begin_layout Plain Layout
1408 Editor
1409 \end_layout
1410
1411 \end_inset
1412
1413  associated with it.
1414  For example, you might want to use 
1415 \begin_inset Flex CharStyle:MenuItem
1416 status collapsed
1417
1418 \begin_layout Plain Layout
1419 Ghostview
1420 \end_layout
1421
1422 \end_inset
1423
1424  to view PostScript files.
1425  You can enter the command needed to start the program in the corresponding
1426  fields.
1427  In defining this command, you can use the four variables listed in the
1428  next section.
1429  The viewer is launched when you view an image in LyX or use the 
1430 \begin_inset Flex CharStyle:MenuItem
1431 status collapsed
1432
1433 \begin_layout Plain Layout
1434 View
1435 \end_layout
1436
1437 \end_inset
1438
1439  menu.
1440  The editor is for example launched when you right-click on an image and
1441  choose 
1442 \begin_inset Flex CharStyle:MenuItem
1443 status collapsed
1444
1445 \begin_layout Plain Layout
1446 Edit externally
1447 \end_layout
1448
1449 \end_inset
1450
1451  in the appearing context menu.
1452 \end_layout
1453
1454 \begin_layout Standard
1455 The 
1456 \begin_inset Flex CharStyle:MenuItem
1457 status collapsed
1458
1459 \begin_layout Plain Layout
1460 Document format
1461 \end_layout
1462
1463 \end_inset
1464
1465  option tells LyX that a format is suitable for document export.
1466  If this is set and if a suitable conversion route exists (see sec.
1467 \begin_inset space \thinspace{}
1468 \end_inset
1469
1470
1471 \begin_inset CommandInset ref
1472 LatexCommand ref
1473 reference "sec:Converters"
1474
1475 \end_inset
1476
1477 ), the format will appear in the 
1478 \begin_inset Flex CharStyle:MenuItem
1479 status collapsed
1480
1481 \begin_layout Plain Layout
1482 File\SpecialChar \menuseparator
1483 Export
1484 \end_layout
1485
1486 \end_inset
1487
1488  menu.
1489  The format will also appear in the 
1490 \begin_inset Flex CharStyle:MenuItem
1491 status collapsed
1492
1493 \begin_layout Plain Layout
1494 View
1495 \end_layout
1496
1497 \end_inset
1498
1499  menu if a viewer is specified for the format.
1500  Pure image formats, such as 
1501 \begin_inset Flex CharStyle:Code
1502 status collapsed
1503
1504 \begin_layout Plain Layout
1505 png
1506 \end_layout
1507
1508 \end_inset
1509
1510 , should not use this option.
1511  Formats that can both represent vector graphics and documents like 
1512 \begin_inset Flex CharStyle:Code
1513 status collapsed
1514
1515 \begin_layout Plain Layout
1516 pdf
1517 \end_layout
1518
1519 \end_inset
1520
1521  should use it.
1522 \end_layout
1523
1524 \begin_layout Standard
1525 The option 
1526 \begin_inset Flex CharStyle:MenuItem
1527 status collapsed
1528
1529 \begin_layout Plain Layout
1530 Vector graphics format
1531 \end_layout
1532
1533 \end_inset
1534
1535  tells LyX that a format can contain vector graphics.
1536  This information is used to determine the target format of included graphics
1537  for 
1538 \begin_inset Flex CharStyle:MenuItem
1539 status collapsed
1540
1541 \begin_layout Plain Layout
1542 pdflatex
1543 \end_layout
1544
1545 \end_inset
1546
1547  export.
1548  Included graphics may need to be converted to either 
1549 \begin_inset Flex CharStyle:MenuItem
1550 status collapsed
1551
1552 \begin_layout Plain Layout
1553 pdf
1554 \end_layout
1555
1556 \end_inset
1557
1558
1559 \begin_inset Flex CharStyle:MenuItem
1560 status collapsed
1561
1562 \begin_layout Plain Layout
1563 png
1564 \end_layout
1565
1566 \end_inset
1567
1568 , or 
1569 \begin_inset Flex CharStyle:MenuItem
1570 status collapsed
1571
1572 \begin_layout Plain Layout
1573 jpg
1574 \end_layout
1575
1576 \end_inset
1577
1578 , since 
1579 \begin_inset Flex CharStyle:MenuItem
1580 status collapsed
1581
1582 \begin_layout Plain Layout
1583 pdflatex
1584 \end_layout
1585
1586 \end_inset
1587
1588  cannot handle other image formats.
1589  If an included graphic is not already in 
1590 \begin_inset Flex CharStyle:MenuItem
1591 status collapsed
1592
1593 \begin_layout Plain Layout
1594 pdf
1595 \end_layout
1596
1597 \end_inset
1598
1599
1600 \begin_inset Flex CharStyle:MenuItem
1601 status collapsed
1602
1603 \begin_layout Plain Layout
1604 png
1605 \end_layout
1606
1607 \end_inset
1608
1609 , or 
1610 \begin_inset Flex CharStyle:MenuItem
1611 status collapsed
1612
1613 \begin_layout Plain Layout
1614 jpg
1615 \end_layout
1616
1617 \end_inset
1618
1619  format, it is converted to 
1620 \begin_inset Flex CharStyle:MenuItem
1621 status collapsed
1622
1623 \begin_layout Plain Layout
1624 pdf
1625 \end_layout
1626
1627 \end_inset
1628
1629  if the vector format option is set, and otherwise to 
1630 \begin_inset Flex CharStyle:MenuItem
1631 status collapsed
1632
1633 \begin_layout Plain Layout
1634 png
1635 \end_layout
1636
1637 \end_inset
1638
1639 .
1640 \end_layout
1641
1642 \begin_layout Section
1643 Copiers
1644 \end_layout
1645
1646 \begin_layout Standard
1647 Since all conversions from one format to another take place in LyX's temporary
1648  directory, it is sometimes necessary to modify a file before copying it
1649  to the temporary directory in order that the conversion may be performed.
1650 \begin_inset Foot
1651 status collapsed
1652
1653 \begin_layout Plain Layout
1654 For example, the file may refer to other files—images, for example—using
1655  relative file names, and these may become invalid when the file is copied
1656  to the temporary directory.
1657 \end_layout
1658
1659 \end_inset
1660
1661  This is done by a Copier: It copies a file to (or from) the temporary directory
1662  and may modify it in the process.
1663 \end_layout
1664
1665 \begin_layout Standard
1666 The definitions of the copiers may use four variables:
1667 \end_layout
1668
1669 \begin_layout Labeling
1670 \labelwidthstring 00.00.0000
1671 \begin_inset Flex CharStyle:Code
1672 status collapsed
1673
1674 \begin_layout Plain Layout
1675 $$s
1676 \end_layout
1677
1678 \end_inset
1679
1680  The LyX system directory (e.
1681 \begin_inset space \thinspace{}
1682 \end_inset
1683
1684 g.
1685 \begin_inset space \space{}
1686 \end_inset
1687
1688
1689 \begin_inset Flex CharStyle:MenuItem
1690 status collapsed
1691
1692 \begin_layout Plain Layout
1693 /usr/share/lyx
1694 \end_layout
1695
1696 \end_inset
1697
1698 ).
1699 \end_layout
1700
1701 \begin_layout Labeling
1702 \labelwidthstring 00.00.0000
1703 \begin_inset Flex CharStyle:Code
1704 status collapsed
1705
1706 \begin_layout Plain Layout
1707 $$i
1708 \end_layout
1709
1710 \end_inset
1711
1712  The input file
1713 \end_layout
1714
1715 \begin_layout Labeling
1716 \labelwidthstring 00.00.0000
1717 \begin_inset Flex CharStyle:Code
1718 status collapsed
1719
1720 \begin_layout Plain Layout
1721 $$o
1722 \end_layout
1723
1724 \end_inset
1725
1726  The output file
1727 \end_layout
1728
1729 \begin_layout Labeling
1730 \labelwidthstring 00.00.0000
1731 \begin_inset Flex CharStyle:Code
1732 status collapsed
1733
1734 \begin_layout Plain Layout
1735 $$l
1736 \end_layout
1737
1738 \end_inset
1739
1740  The `LaTeX name'
1741 \end_layout
1742
1743 \begin_layout Standard
1744 The latter should be the filename as it would be used in a LaTeX's 
1745 \series bold
1746
1747 \backslash
1748 include
1749 \series default
1750  command.
1751  It is relevant only when exporting files suitable for such inclusion.
1752 \end_layout
1753
1754 \begin_layout Standard
1755 Copiers can be used to do almost anything with output files.
1756  For example, suppose you want generated pdf files to be copied to a special
1757  directory, 
1758 \begin_inset Flex CharStyle:Code
1759 status collapsed
1760
1761 \begin_layout Plain Layout
1762 /home/you/pdf/
1763 \end_layout
1764
1765 \end_inset
1766
1767 .
1768  Then you could write a shell script such as this one:
1769 \end_layout
1770
1771 \begin_layout Standard
1772 \begin_inset listings
1773 inline false
1774 status open
1775
1776 \begin_layout Plain Layout
1777
1778 #!/bin/bash
1779 \end_layout
1780
1781 \begin_layout Plain Layout
1782
1783 FROMFILE=$1
1784 \end_layout
1785
1786 \begin_layout Plain Layout
1787
1788 TOFILE=`basename $2`
1789 \end_layout
1790
1791 \begin_layout Plain Layout
1792
1793 cp $FROMFILE /home/you/pdf/$TOFILE
1794 \end_layout
1795
1796 \end_inset
1797
1798 Save it in your local LyX directory—say, 
1799 \begin_inset Flex CharStyle:Code
1800 status collapsed
1801
1802 \begin_layout Plain Layout
1803 /home/you/.lyx/scripts/pdfcopier.sh
1804 \end_layout
1805
1806 \end_inset
1807
1808 —and make it executable, if you need to do so on your platform.
1809  Then, in the 
1810 \begin_inset Flex CharStyle:MenuItem
1811 status collapsed
1812
1813 \begin_layout Plain Layout
1814 Tools\SpecialChar \menuseparator
1815 Preferences
1816 \end_layout
1817
1818 \end_inset
1819
1820  dialog, select under 
1821 \begin_inset Flex CharStyle:MenuItem
1822 status collapsed
1823
1824 \begin_layout Plain Layout
1825 File Handling\SpecialChar \menuseparator
1826 File formats
1827 \end_layout
1828
1829 \end_inset
1830
1831  the 
1832 \begin_inset Flex CharStyle:MenuItem
1833 status collapsed
1834
1835 \begin_layout Plain Layout
1836 PDF(pdflatex)
1837 \end_layout
1838
1839 \end_inset
1840
1841  format—or one of the other pdf formats—and enter 
1842 \begin_inset Flex CharStyle:Code
1843 status collapsed
1844
1845 \begin_layout Plain Layout
1846 pdfcopier.sh $$i $$o
1847 \end_layout
1848
1849 \end_inset
1850
1851  into the 
1852 \begin_inset Flex CharStyle:MenuItem
1853 status collapsed
1854
1855 \begin_layout Plain Layout
1856 Copier
1857 \end_layout
1858
1859 \end_inset
1860
1861  field.
1862  
1863 \end_layout
1864
1865 \begin_layout Standard
1866 Copiers are used by LyX in various of its own conversions.
1867  For example, if appropriate programs are found, LyX will automatically
1868  install copiers for the 
1869 \begin_inset Flex CharStyle:MenuItem
1870 status collapsed
1871
1872 \begin_layout Plain Layout
1873 HTML
1874 \end_layout
1875
1876 \end_inset
1877
1878  and 
1879 \begin_inset Flex CharStyle:MenuItem
1880 status collapsed
1881
1882 \begin_layout Plain Layout
1883 HTML
1884 \begin_inset space ~
1885 \end_inset
1886
1887 (MS Word)
1888 \end_layout
1889
1890 \end_inset
1891
1892  formats.
1893  When these formats are exported, the copier sees that not just the main
1894  HTML file but various associated files (style files, images, etc.) are also
1895  copied.
1896  All these files are written to a subdirectory of the directory in which
1897  the original LyX file was found.
1898 \begin_inset Foot
1899 status collapsed
1900
1901 \begin_layout Plain Layout
1902 This copier can be customized.
1903  The optional 
1904 \begin_inset Quotes eld
1905 \end_inset
1906
1907 -e
1908 \begin_inset Quotes erd
1909 \end_inset
1910
1911  argument takes a comma-separated list of extensions to be copied; if it
1912  is omitted, all files will be copied.
1913  The 
1914 \begin_inset Quotes eld
1915 \end_inset
1916
1917 -t
1918 \begin_inset Quotes erd
1919 \end_inset
1920
1921  argument determines the extension added to the generated directory.
1922  By default, it is 
1923 \begin_inset Quotes eld
1924 \end_inset
1925
1926
1927 \begin_inset Flex CharStyle:MenuItem
1928 status collapsed
1929
1930 \begin_layout Plain Layout
1931 LyXconv
1932 \end_layout
1933
1934 \end_inset
1935
1936
1937 \begin_inset Quotes erd
1938 \end_inset
1939
1940 , so HTML generated from 
1941 \begin_inset Flex CharStyle:MenuItem
1942 status collapsed
1943
1944 \begin_layout Plain Layout
1945 /path/to/filename.lyx
1946 \end_layout
1947
1948 \end_inset
1949
1950  will end up in 
1951 \begin_inset Flex CharStyle:MenuItem
1952 status collapsed
1953
1954 \begin_layout Plain Layout
1955 /path/to/filename.html.LyXconv
1956 \end_layout
1957
1958 \end_inset
1959
1960 .
1961  
1962 \end_layout
1963
1964 \end_inset
1965
1966
1967 \end_layout
1968
1969 \begin_layout Section
1970 Converters
1971 \begin_inset CommandInset label
1972 LatexCommand label
1973 name "sec:Converters"
1974
1975 \end_inset
1976
1977
1978 \end_layout
1979
1980 \begin_layout Standard
1981 You can define your own Converters to convert files between different formats.
1982  This is done in the 
1983 \begin_inset Flex CharStyle:MenuItem
1984 status collapsed
1985
1986 \begin_layout Plain Layout
1987 Tools\SpecialChar \menuseparator
1988 Preferences\SpecialChar \menuseparator
1989 File Handling\SpecialChar \menuseparator
1990 Converters
1991 \end_layout
1992
1993 \end_inset
1994
1995  dialog.
1996 \end_layout
1997
1998 \begin_layout Standard
1999 To define a new converter, select the 
2000 \begin_inset Flex CharStyle:MenuItem
2001 status collapsed
2002
2003 \begin_layout Plain Layout
2004 From
2005 \begin_inset space ~
2006 \end_inset
2007
2008 format
2009 \end_layout
2010
2011 \end_inset
2012
2013  and 
2014 \begin_inset Flex CharStyle:MenuItem
2015 status collapsed
2016
2017 \begin_layout Plain Layout
2018 To
2019 \begin_inset space ~
2020 \end_inset
2021
2022 format
2023 \end_layout
2024
2025 \end_inset
2026
2027  from the drop-down lists, enter the command needed for the conversion,
2028  and then press the 
2029 \begin_inset Flex CharStyle:MenuItem
2030 status collapsed
2031
2032 \begin_layout Plain Layout
2033 Add
2034 \end_layout
2035
2036 \end_inset
2037
2038  button.
2039  Several variables can be used in the definition of converters:
2040 \end_layout
2041
2042 \begin_layout Labeling
2043 \labelwidthstring 00.00.0000
2044 \begin_inset Flex CharStyle:Code
2045 status collapsed
2046
2047 \begin_layout Plain Layout
2048 $$s
2049 \end_layout
2050
2051 \end_inset
2052
2053  The LyX system directory
2054 \end_layout
2055
2056 \begin_layout Labeling
2057 \labelwidthstring 00.00.0000
2058 \begin_inset Flex CharStyle:Code
2059 status collapsed
2060
2061 \begin_layout Plain Layout
2062 $$i
2063 \end_layout
2064
2065 \end_inset
2066
2067  The input file
2068 \end_layout
2069
2070 \begin_layout Labeling
2071 \labelwidthstring 00.00.0000
2072 \begin_inset Flex CharStyle:Code
2073 status collapsed
2074
2075 \begin_layout Plain Layout
2076 $$o
2077 \end_layout
2078
2079 \end_inset
2080
2081  The output file
2082 \end_layout
2083
2084 \begin_layout Labeling
2085 \labelwidthstring 00.00.0000
2086 \begin_inset Flex CharStyle:Code
2087 status collapsed
2088
2089 \begin_layout Plain Layout
2090 $$b
2091 \end_layout
2092
2093 \end_inset
2094
2095  The base filename of the input file (i.
2096 \begin_inset space \thinspace{}
2097 \end_inset
2098
2099 g., without the extension)
2100 \end_layout
2101
2102 \begin_layout Labeling
2103 \labelwidthstring 00.00.0000
2104 \begin_inset Flex CharStyle:Code
2105 status collapsed
2106
2107 \begin_layout Plain Layout
2108 $$p
2109 \end_layout
2110
2111 \end_inset
2112
2113  The path to the input file
2114 \end_layout
2115
2116 \begin_layout Labeling
2117 \labelwidthstring 00.00.0000
2118 \begin_inset Flex CharStyle:Code
2119 status collapsed
2120
2121 \begin_layout Plain Layout
2122 $$r
2123 \end_layout
2124
2125 \end_inset
2126
2127  The path to the original input file (this is different from $$p when a
2128  chain of converters is called).
2129 \end_layout
2130
2131 \begin_layout Standard
2132 In the 
2133 \begin_inset Flex CharStyle:MenuItem
2134 status collapsed
2135
2136 \begin_layout Plain Layout
2137 Extra
2138 \begin_inset space ~
2139 \end_inset
2140
2141 Flag
2142 \end_layout
2143
2144 \end_inset
2145
2146  field you can enter the following flags, separated by commas:
2147 \end_layout
2148
2149 \begin_layout Labeling
2150 \labelwidthstring 00.00.0000
2151 \begin_inset Flex CharStyle:Code
2152 status collapsed
2153
2154 \begin_layout Plain Layout
2155 latex
2156 \end_layout
2157
2158 \end_inset
2159
2160  This converter runs some form of LaTeX.
2161  This will make LyX's LaTeX error logs available.
2162 \end_layout
2163
2164 \begin_layout Labeling
2165 \labelwidthstring 00.00.0000
2166 \begin_inset Flex CharStyle:Code
2167 status collapsed
2168
2169 \begin_layout Plain Layout
2170 needaux
2171 \end_layout
2172
2173 \end_inset
2174
2175  Needs the LaTeX 
2176 \begin_inset Flex CharStyle:MenuItem
2177 status collapsed
2178
2179 \begin_layout Plain Layout
2180 .aux
2181 \end_layout
2182
2183 \end_inset
2184
2185  file for the conversion.
2186 \end_layout
2187
2188 \begin_layout Labeling
2189 \labelwidthstring 00.00.0000
2190 \begin_inset Flex CharStyle:Code
2191 status collapsed
2192
2193 \begin_layout Plain Layout
2194 xml
2195 \end_layout
2196
2197 \end_inset
2198
2199  Output is XML.
2200 \end_layout
2201
2202 \begin_layout Standard
2203 The following three flags are not really flags at all because they take
2204  an argument in the 
2205 \begin_inset Flex CharStyle:MenuItem
2206 status collapsed
2207
2208 \begin_layout Plain Layout
2209 key
2210 \begin_inset space ~
2211 \end_inset
2212
2213 =
2214 \begin_inset space ~
2215 \end_inset
2216
2217 value
2218 \end_layout
2219
2220 \end_inset
2221
2222  format:
2223 \end_layout
2224
2225 \begin_layout Labeling
2226 \labelwidthstring 00.00.0000
2227 \begin_inset Flex CharStyle:Code
2228 status collapsed
2229
2230 \begin_layout Plain Layout
2231 parselog
2232 \end_layout
2233
2234 \end_inset
2235
2236  If set, the converter's standard error will be redirected to a file 
2237 \begin_inset Flex CharStyle:Code
2238 status collapsed
2239
2240 \begin_layout Plain Layout
2241 infile.out
2242 \end_layout
2243
2244 \end_inset
2245
2246 , and the script given as argument will be run as: 
2247 \begin_inset Flex CharStyle:Code
2248 status collapsed
2249
2250 \begin_layout Plain Layout
2251 script < infile.out > infile.log
2252 \end_layout
2253
2254 \end_inset
2255
2256 .
2257  The argument may contain 
2258 \begin_inset Flex CharStyle:Code
2259 status collapsed
2260
2261 \begin_layout Plain Layout
2262 $$s
2263 \end_layout
2264
2265 \end_inset
2266
2267 .
2268 \end_layout
2269
2270 \begin_layout Labeling
2271 \labelwidthstring 00.00.0000
2272 \begin_inset Flex CharStyle:Code
2273 status collapsed
2274
2275 \begin_layout Plain Layout
2276 resultdir
2277 \end_layout
2278
2279 \end_inset
2280
2281  The name of the directory in which the converter will dump the generated
2282  files.
2283  LyX will not create this directory, and it does not copy anything into
2284  it, though it will copy this directory to the destination.
2285  The argument may contain 
2286 \begin_inset Flex CharStyle:Code
2287 status collapsed
2288
2289 \begin_layout Plain Layout
2290 $$b
2291 \end_layout
2292
2293 \end_inset
2294
2295 , which will be replaced by the base name of the input and output files,
2296  respectively, when the directory is copied.
2297 \begin_inset Newline newline
2298 \end_inset
2299
2300 Note that resultdir and usetempdir make no sense together.
2301  The latter will be ignored if the former is given.
2302 \end_layout
2303
2304 \begin_layout Labeling
2305 \labelwidthstring 00.00.0000
2306 \begin_inset Flex CharStyle:Code
2307 status collapsed
2308
2309 \begin_layout Plain Layout
2310 resultfile
2311 \end_layout
2312
2313 \end_inset
2314
2315  Determines the output file name and may, contain 
2316 \begin_inset Flex CharStyle:Code
2317 status collapsed
2318
2319 \begin_layout Plain Layout
2320 $$b
2321 \end_layout
2322
2323 \end_inset
2324
2325 .
2326  Sensible only with resultdir and optional even then; if not given, it defaults
2327  to `index'.
2328 \end_layout
2329
2330 \begin_layout Standard
2331 None of these last three are presently used in any of the converters that
2332  are installed with LyX.
2333  
2334 \end_layout
2335
2336 \begin_layout Standard
2337 You do not have to define converters for all formats between which you want
2338  to convert.
2339  For example, you will note that there is no `LyX to PostScript' converter,
2340  but LyX will export PostScript.
2341  It does so by first creating a LaTeX file (no converter needs to be defined
2342  for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2343  and finally converting the resulting DVI file to PostScript.
2344  LyX finds such `chains' of converters automatically, and it will always
2345  choose the shortest possible chain.
2346  You can, though, still define multiple conversion methods between file
2347  formats.
2348  For example, the standard LyX configuration provides three ways to convert
2349  LaTeX to PDF: Directly, using 
2350 \begin_inset Flex CharStyle:MenuItem
2351 status collapsed
2352
2353 \begin_layout Plain Layout
2354 pdflatex
2355 \end_layout
2356
2357 \end_inset
2358
2359 ; via (DVI and) PostScript, using 
2360 \begin_inset Flex CharStyle:MenuItem
2361 status collapsed
2362
2363 \begin_layout Plain Layout
2364 ps2pdf
2365 \end_layout
2366
2367 \end_inset
2368
2369 ; or via DVI, using 
2370 \begin_inset Flex CharStyle:MenuItem
2371 status collapsed
2372
2373 \begin_layout Plain Layout
2374 dvipdfm
2375 \end_layout
2376
2377 \end_inset
2378
2379 .
2380  To define such alternate chains, you must define multiple target `file
2381  formats', as described in section 
2382 \begin_inset CommandInset ref
2383 LatexCommand ref
2384 reference "sec:Formats"
2385
2386 \end_inset
2387
2388 .
2389  For example, in the standard configuration, the formats named 
2390 \begin_inset Flex CharStyle:MenuItem
2391 status collapsed
2392
2393 \begin_layout Plain Layout
2394 pdf
2395 \end_layout
2396
2397 \end_inset
2398
2399
2400 \begin_inset Flex CharStyle:MenuItem
2401 status collapsed
2402
2403 \begin_layout Plain Layout
2404 pdf2
2405 \end_layout
2406
2407 \end_inset
2408
2409 , and 
2410 \begin_inset Flex CharStyle:MenuItem
2411 status collapsed
2412
2413 \begin_layout Plain Layout
2414 pdf3
2415 \end_layout
2416
2417 \end_inset
2418
2419  are defined, all of which share the extension 
2420 \begin_inset Flex CharStyle:MenuItem
2421 status collapsed
2422
2423 \begin_layout Plain Layout
2424 .pdf
2425 \end_layout
2426
2427 \end_inset
2428
2429 , and which correspond to the conversion methods just mentioned.
2430 \end_layout
2431
2432 \begin_layout Chapter
2433 Internationalizing LyX
2434 \begin_inset CommandInset label
2435 LatexCommand label
2436 name "cha:Internationalizing-LyX"
2437
2438 \end_inset
2439
2440
2441 \end_layout
2442
2443 \begin_layout Standard
2444 LyX supports using a translated interface.
2445  Last time we checked, LyX provided text in thirty languages.
2446  The language of choice is called your 
2447 \emph on
2448 locale
2449 \emph default
2450 .
2451  (For further reading on locale settings, see also the documentation for
2452  locale that comes with your operating system.
2453  For Linux, the manual page for 
2454 \begin_inset Flex CharStyle:Code
2455 status collapsed
2456
2457 \begin_layout Plain Layout
2458 locale(5)
2459 \end_layout
2460
2461 \end_inset
2462
2463  could be a good place to start).
2464 \end_layout
2465
2466 \begin_layout Standard
2467 Notice that these translations will work, but do contain a few flaws.
2468  In particular, all dialogs have been designed with the English text in
2469  mind, which means that some of the translated text will be too large to
2470  fit within the space allocated.
2471  This is only a display problem and will not cause any harm.
2472  Also, you will find that some of the translations do not define shortcut
2473  keys for everything.
2474  Sometimes, there are simply not enough free letters to do it.
2475  Other times, the translator just hasn't got around to doing it yet.
2476  Our localization team, which you may wish to join,
2477 \begin_inset Foot
2478 status collapsed
2479
2480 \begin_layout Plain Layout
2481 If you are a fluent speaker of a language other than English, joining these
2482  teams is a great way to give back to the LyX community!
2483 \end_layout
2484
2485 \end_inset
2486
2487  will of course try to fix these shortcomings in future versions of LyX.
2488 \end_layout
2489
2490 \begin_layout Section
2491 Translating LyX
2492 \end_layout
2493
2494 \begin_layout Subsection
2495 Translating the graphical user interface (text messages).
2496 \end_layout
2497
2498 \begin_layout Standard
2499 LyX uses the GNU 
2500 \begin_inset Flex CharStyle:Code
2501 status collapsed
2502
2503 \begin_layout Plain Layout
2504 gettext
2505 \end_layout
2506
2507 \end_inset
2508
2509  library to handle the internationalization of the interface.
2510  To have LyX speak your favorite language in all menus and dialogs, you
2511  need a 
2512 \begin_inset Flex CharStyle:Code
2513 status collapsed
2514
2515 \begin_layout Plain Layout
2516 po
2517 \end_layout
2518
2519 \end_inset
2520
2521 -file for that language.
2522  When this is available, you'll have to generate a 
2523 \begin_inset Flex CharStyle:Code
2524 status collapsed
2525
2526 \begin_layout Plain Layout
2527 mo
2528 \end_layout
2529
2530 \end_inset
2531
2532 -file from it and install the 
2533 \begin_inset Flex CharStyle:Code
2534 status collapsed
2535
2536 \begin_layout Plain Layout
2537 mo
2538 \end_layout
2539
2540 \end_inset
2541
2542 -file.
2543  The process of doing all of this is explained in the documentation for
2544  GNU 
2545 \begin_inset Flex CharStyle:Code
2546 status collapsed
2547
2548 \begin_layout Plain Layout
2549 gettext
2550 \end_layout
2551
2552 \end_inset
2553
2554 .
2555  It is possible to do this just for yourself, but if you're going to do
2556  it, you might as well share the results of your labors with the rest of
2557  the LyX community.
2558  Send a message to the LyX developers' list for more information about how
2559  to proceed.
2560 \end_layout
2561
2562 \begin_layout Standard
2563 In short, this is what you should do (xx denotes the language code):
2564 \end_layout
2565
2566 \begin_layout Itemize
2567 Check out the LyX source code.
2568  (See the 
2569 \begin_inset CommandInset href
2570 LatexCommand href
2571 name "information on the web"
2572 target "http://www.lyx.org/devel/cvs.php"
2573
2574 \end_inset
2575
2576 .)
2577 \end_layout
2578
2579 \begin_layout Itemize
2580 Copy the file 
2581 \begin_inset Flex CharStyle:Code
2582 status collapsed
2583
2584 \begin_layout Plain Layout
2585 lyx.pot
2586 \end_layout
2587
2588 \end_inset
2589
2590  to the folder of the 
2591 \begin_inset Flex CharStyle:Code
2592 status collapsed
2593
2594 \begin_layout Plain Layout
2595 **.po
2596 \end_layout
2597
2598 \end_inset
2599
2600  files.
2601  Then rename it to 
2602 \begin_inset Flex CharStyle:Code
2603 status collapsed
2604
2605 \begin_layout Plain Layout
2606 xx.po
2607 \end_layout
2608
2609 \end_inset
2610
2611 .
2612  (If 
2613 \begin_inset Flex CharStyle:Code
2614 status collapsed
2615
2616 \begin_layout Plain Layout
2617 lyx.pot
2618 \end_layout
2619
2620 \end_inset
2621
2622  doesn't exist anywhere, it can be remade with the console command 
2623 \begin_inset Flex CharStyle:Code
2624 status collapsed
2625
2626 \begin_layout Plain Layout
2627 make lyx.pot
2628 \end_layout
2629
2630 \end_inset
2631
2632  in that directory, or you can use an existing po-file for some other language
2633  as a template).
2634 \end_layout
2635
2636 \begin_layout Itemize
2637 Edit 
2638 \begin_inset Flex CharStyle:Code
2639 status collapsed
2640
2641 \begin_layout Plain Layout
2642 xx.po
2643 \end_layout
2644
2645 \end_inset
2646
2647 .
2648 \begin_inset Foot
2649 status collapsed
2650
2651 \begin_layout Plain Layout
2652 This is just a text file, so it can be edited in any text editor.
2653  But there are also specialized programs that support such editing, such
2654  as 
2655 \family typewriter
2656 Poedit
2657 \family default
2658  (for all platforms) or 
2659 \family typewriter
2660 KBabel
2661 \family default
2662  (for KDE).
2663  
2664 \family typewriter
2665 Emacs
2666 \family default
2667  contains a `mode' for editing 
2668 \begin_inset Flex CharStyle:Code
2669 status collapsed
2670
2671 \begin_layout Plain Layout
2672 po
2673 \end_layout
2674
2675 \end_inset
2676
2677  files, as well.
2678 \end_layout
2679
2680 \end_inset
2681
2682  For some menu- and widget-labels, there are also shortcut keys that should
2683  be translated.
2684  Those keys are marked after a `|', and should be translated according to
2685  the words and phrases of the language.
2686  You should also fill also out the information at the beginning of the new
2687  
2688 \begin_inset Flex CharStyle:Code
2689 status collapsed
2690
2691 \begin_layout Plain Layout
2692 po
2693 \end_layout
2694
2695 \end_inset
2696
2697 -file with your email-address, etc., so people know where to reach you with
2698  suggestions and entertaining flames.
2699 \end_layout
2700
2701 \begin_layout Standard
2702 If you are just doing this on your own, then:
2703 \end_layout
2704
2705 \begin_layout Itemize
2706 Generate 
2707 \begin_inset Flex CharStyle:Code
2708 status collapsed
2709
2710 \begin_layout Plain Layout
2711 xx.mo
2712 \end_layout
2713
2714 \end_inset
2715
2716 .
2717  This can be done with 
2718 \begin_inset Flex CharStyle:Code
2719 status collapsed
2720
2721 \begin_layout Plain Layout
2722 msgfmt -o xx.mo < xx.po
2723 \end_layout
2724
2725 \end_inset
2726
2727 .
2728 \end_layout
2729
2730 \begin_layout Itemize
2731 Copy the 
2732 \begin_inset Flex CharStyle:Code
2733 status collapsed
2734
2735 \begin_layout Plain Layout
2736 mo
2737 \end_layout
2738
2739 \end_inset
2740
2741 -file to your locale-tree, at the correct directory for application messages
2742  for the language
2743 \series bold
2744  
2745 \series default
2746 xx, and under the name 
2747 \begin_inset Flex CharStyle:Code
2748 status collapsed
2749
2750 \begin_layout Plain Layout
2751 lyx.mo
2752 \end_layout
2753
2754 \end_inset
2755
2756  (e.
2757 \begin_inset space \thinspace{}
2758 \end_inset
2759
2760 g.
2761 \begin_inset space \space{}
2762 \end_inset
2763
2764
2765 \begin_inset Flex CharStyle:Code
2766 status collapsed
2767
2768 \begin_layout Plain Layout
2769 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
2770 \end_layout
2771
2772 \end_inset
2773
2774
2775 \series bold
2776 .
2777 \end_layout
2778
2779 \begin_layout Standard
2780 As said, however, it would be best if the new 
2781 \begin_inset Flex CharStyle:Code
2782 status collapsed
2783
2784 \begin_layout Plain Layout
2785 po
2786 \end_layout
2787
2788 \end_inset
2789
2790 -file could be added to the LyX distribution, so others can use it.
2791  Adding it involves making additional changes to LyX.
2792  So send an email to the developers' mailing list if you're interested in
2793  doing that.
2794 \end_layout
2795
2796 \begin_layout Subsubsection
2797 Ambiguous messages
2798 \end_layout
2799
2800 \begin_layout Standard
2801 Sometimes it turns out that one English message needs to be translated into
2802  different messages in the target language.
2803  One example is the message 
2804 \begin_inset Flex CharStyle:Code
2805 status collapsed
2806
2807 \begin_layout Plain Layout
2808 To
2809 \end_layout
2810
2811 \end_inset
2812
2813  which has the German translation 
2814 \lang german
2815 Nach
2816 \lang english
2817  or 
2818 \lang german
2819 Bis
2820 \lang english
2821 , depending upon exactly what the English 
2822 \begin_inset Quotes eld
2823 \end_inset
2824
2825 to
2826 \begin_inset Quotes erd
2827 \end_inset
2828
2829  means.
2830  GNU 
2831 \begin_inset Flex CharStyle:Code
2832 status collapsed
2833
2834 \begin_layout Plain Layout
2835 gettext
2836 \end_layout
2837
2838 \end_inset
2839
2840  does not handle such ambiguous translations.
2841  Therefore you have to add some context information to the message: Instead
2842  of 
2843 \begin_inset Flex CharStyle:Code
2844 status collapsed
2845
2846 \begin_layout Plain Layout
2847 To
2848 \end_layout
2849
2850 \end_inset
2851
2852  it becomes 
2853 \begin_inset Flex CharStyle:Code
2854 status collapsed
2855
2856 \begin_layout Plain Layout
2857 To[[as in 'From format x to format y']]
2858 \end_layout
2859
2860 \end_inset
2861
2862  and 
2863 \begin_inset Flex CharStyle:Code
2864 status collapsed
2865
2866 \begin_layout Plain Layout
2867 To[[as in 'From page x to page y']].
2868 \end_layout
2869
2870 \end_inset
2871
2872  Now the two occurrences of 
2873 \begin_inset Flex CharStyle:Code
2874 status collapsed
2875
2876 \begin_layout Plain Layout
2877 To
2878 \end_layout
2879
2880 \end_inset
2881
2882  are different for 
2883 \begin_inset Flex CharStyle:Code
2884 status collapsed
2885
2886 \begin_layout Plain Layout
2887 gettext
2888 \end_layout
2889
2890 \end_inset
2891
2892  and can be translated correctly to 
2893 \lang german
2894 Nach
2895 \lang english
2896  and 
2897 \lang german
2898 Bis
2899 \lang english
2900 , respectively.
2901 \end_layout
2902
2903 \begin_layout Standard
2904 Of course the context information needs to be stripped off the original
2905  message when no translation is used.
2906  Therefore you have to put it in double square brackets at the end of the
2907  message (see the example above).
2908  The translation mechanism of LyX ensures that everything in double square
2909  brackets at the end of messages is removed before displaying the message.
2910 \end_layout
2911
2912 \begin_layout Subsection
2913 Translating the documentation.
2914 \end_layout
2915
2916 \begin_layout Standard
2917 The online documentation (in the 
2918 \begin_inset Flex CharStyle:MenuItem
2919 status collapsed
2920
2921 \begin_layout Plain Layout
2922 Help
2923 \end_layout
2924
2925 \end_inset
2926
2927 -menu) can (and should!) be translated.
2928  If there are translated versions of the documentation available
2929 \begin_inset Foot
2930 status collapsed
2931
2932 \begin_layout Plain Layout
2933 As of March 2008, at least some of the documents have been translated into
2934  fourteen languages, with the Tutorial available in a few more.
2935 \end_layout
2936
2937 \end_inset
2938
2939  and the locale is set accordingly, these will be used automagically by
2940  LyX.
2941  LyX looks for translated versions as 
2942 \begin_inset Flex CharStyle:Code
2943 status collapsed
2944
2945 \begin_layout Plain Layout
2946 LyXDir/doc/xx/DocName.lyx
2947 \end_layout
2948
2949 \end_inset
2950
2951 , where 
2952 \begin_inset Flex CharStyle:Code
2953 status collapsed
2954
2955 \begin_layout Plain Layout
2956 xx
2957 \end_layout
2958
2959 \end_inset
2960
2961  is the code for the language currently in use.
2962  If there are no translated documents, the default English versions will
2963  be displayed.
2964  Note that the translated versions must have the same filenames (
2965 \begin_inset Flex CharStyle:Code
2966 status collapsed
2967
2968 \begin_layout Plain Layout
2969 DocName
2970 \end_layout
2971
2972 \end_inset
2973
2974  above) as the original.
2975  If you feel up to translating the documentation (an excellent way to proof-read
2976  the original documentation by the way!), there are a few things you should
2977  do right away:
2978 \end_layout
2979
2980 \begin_layout Itemize
2981 Check out the documentation translation web page at 
2982 \begin_inset CommandInset href
2983 LatexCommand href
2984 name "http://www.lyx.org/Translation"
2985 target "http://www.lyx.org/Translation"
2986
2987 \end_inset
2988
2989 .
2990  That way, you can find out which (if any) documents have already been translate
2991 d into your language.
2992  You can also find out who (if anyone) is organizing the effort to translate
2993  the documentation into your language.
2994  If no one is organizing the effort, please let us know that you're interested.
2995 \end_layout
2996
2997 \begin_layout Standard
2998 Once you get to actually translating, here's a few hints for you that may
2999  save you trouble:
3000 \end_layout
3001
3002 \begin_layout Itemize
3003 Join the documentation team! There is information on how to do that in 
3004 \begin_inset Flex CharStyle:Code
3005 status collapsed
3006
3007 \begin_layout Plain Layout
3008 Intro.lyx
3009 \end_layout
3010
3011 \end_inset
3012
3013  (
3014 \begin_inset Flex CharStyle:MenuItem
3015 status collapsed
3016
3017 \begin_layout Plain Layout
3018 Help\SpecialChar \menuseparator
3019 Introduction
3020 \end_layout
3021
3022 \end_inset
3023
3024 ), which by the way is the first document you should translate.
3025 \end_layout
3026
3027 \begin_layout Itemize
3028 Learn the typographic conventions for the language you are translating to.
3029  Typography is an ancient art and over the centuries, a great variety of
3030  conventions have developed throughout different parts of the world.
3031  Also study the professional terminology amongst typographers in your country.
3032  Inventing your own terminology will only confuse the users.
3033  
3034 \emph on
3035 (Warning! Typography is addictive!)
3036 \end_layout
3037
3038 \begin_layout Itemize
3039 Make a copy of the document.
3040  This will be your working copy.
3041  You can use this as your personal translated help-file by placing it in
3042  your 
3043 \begin_inset Flex CharStyle:Code
3044 status collapsed
3045
3046 \begin_layout Plain Layout
3047 UserDir/doc/xx/
3048 \end_layout
3049
3050 \end_inset
3051
3052  directory.
3053 \end_layout
3054
3055 \begin_layout Itemize
3056 Sometimes the original document (from the LyX-team) will be updated.
3057  Use the source viewer at 
3058 \begin_inset CommandInset href
3059 LatexCommand href
3060 name "http://www.lyx.org/trac/timeline"
3061 target "http://www.lyx.org/trac/timeline"
3062
3063 \end_inset
3064
3065  to see what has been changed.
3066  That way you can easily see which parts of the translated document need
3067  to be updated.
3068 \end_layout
3069
3070 \begin_layout Standard
3071 If you ever find an error in the original document, fix it and notify the
3072  rest of the documentation team of the changes! (You didn't forget to join
3073  the documentation team, did you?)
3074 \end_layout
3075
3076 \begin_layout Standard
3077 \begin_inset Branch OutDated
3078 status collapsed
3079
3080 \begin_layout Section
3081 International Keyboard Support
3082 \end_layout
3083
3084 \begin_layout Standard
3085
3086 \emph on
3087 [Editor's Note: The following section is by
3088 \emph default
3089  
3090 \shape smallcaps
3091 \emph on
3092 Ivan Schreter
3093 \shape default
3094 .
3095  It needs to be fixed to conform to the new Documentation Style sheet and
3096  to make use of the new v1.0 features.
3097  The whole thing also needs to be merged with the section following it.-jw
3098  It may also be badly out of date.-rh (2008)]
3099 \end_layout
3100
3101 \begin_layout Subsection
3102 Defining Own Keymaps: Keymap File Format
3103 \end_layout
3104
3105 \begin_layout Standard
3106 Let's look at a keyboard definition file a little closer.
3107  It is a plain text file defining
3108 \end_layout
3109
3110 \begin_layout Itemize
3111 key-to-key or key-to-string translations
3112 \end_layout
3113
3114 \begin_layout Itemize
3115 dead keys
3116 \end_layout
3117
3118 \begin_layout Itemize
3119 dead keys exceptions
3120 \end_layout
3121
3122 \begin_layout Standard
3123 To define key-to-key or key-to-string translation, use this command:
3124 \end_layout
3125
3126 \begin_layout Quotation
3127 \begin_inset Flex CharStyle:Code
3128 status collapsed
3129
3130 \begin_layout Plain Layout
3131
3132 \backslash
3133 kmap
3134 \end_layout
3135
3136 \end_inset
3137
3138  
3139 \begin_inset Flex CharStyle:Code
3140 status collapsed
3141
3142 \begin_layout Plain Layout
3143 key
3144 \end_layout
3145
3146 \end_inset
3147
3148  outstring 
3149 \end_layout
3150
3151 \begin_layout Standard
3152 where 
3153 \begin_inset Flex CharStyle:Code
3154 status collapsed
3155
3156 \begin_layout Plain Layout
3157 key
3158 \end_layout
3159
3160 \end_inset
3161
3162  is the key to be translated and 
3163 \begin_inset Flex CharStyle:Code
3164 status collapsed
3165
3166 \begin_layout Plain Layout
3167 outstring
3168 \end_layout
3169
3170 \end_inset
3171
3172  is the string to be inserted into the document.
3173  To define dead keys, use:
3174 \end_layout
3175
3176 \begin_layout Quotation
3177 \begin_inset Flex CharStyle:Code
3178 status collapsed
3179
3180 \begin_layout Plain Layout
3181
3182 \backslash
3183 kmod
3184 \end_layout
3185
3186 \end_inset
3187
3188  
3189 \begin_inset Flex CharStyle:Code
3190 status collapsed
3191
3192 \begin_layout Plain Layout
3193 key
3194 \end_layout
3195
3196 \end_inset
3197
3198  deadkey
3199 \end_layout
3200
3201 \begin_layout Standard
3202 where 
3203 \begin_inset Flex CharStyle:Code
3204 status collapsed
3205
3206 \begin_layout Plain Layout
3207 key
3208 \end_layout
3209
3210 \end_inset
3211
3212  is a keyboard key and 
3213 \begin_inset Flex CharStyle:Code
3214 status collapsed
3215
3216 \begin_layout Plain Layout
3217 deadkey
3218 \end_layout
3219
3220 \end_inset
3221
3222  is dead key name.
3223  The following dead keys are supported (shortcut name is in parentheses):
3224 \end_layout
3225
3226 \begin_layout Quotation
3227
3228 \emph on
3229 Name
3230 \begin_inset space \hfill{}
3231 \end_inset
3232
3233 Example
3234 \end_layout
3235
3236 \begin_layout Quotation
3237 acute (acu)
3238 \begin_inset space \hfill{}
3239 \end_inset
3240
3241 áéíóú
3242 \end_layout
3243
3244 \begin_layout Quotation
3245 grave (gra)
3246 \begin_inset space \hfill{}
3247 \end_inset
3248
3249 àèìòù
3250 \end_layout
3251
3252 \begin_layout Quotation
3253 macron (mac)
3254 \begin_inset space \hfill{}
3255 \end_inset
3256
3257  ō
3258 \end_layout
3259
3260 \begin_layout Quotation
3261 tilde (til)
3262 \begin_inset space \hfill{}
3263 \end_inset
3264
3265 ñÑ
3266 \end_layout
3267
3268 \begin_layout Quotation
3269 underbar (underb)
3270 \begin_inset space \hfill{}
3271 \end_inset
3272
3273
3274 \begin_inset ERT
3275 status open
3276
3277 \begin_layout Plain Layout
3278
3279
3280 \backslash
3281 b o
3282 \end_layout
3283
3284 \end_inset
3285
3286
3287 \end_layout
3288
3289 \begin_layout Quotation
3290 cedilla (ced)
3291 \begin_inset space \hfill{}
3292 \end_inset
3293
3294 çÇ
3295 \end_layout
3296
3297 \begin_layout Quotation
3298 underdot (underd)
3299 \begin_inset space \hfill{}
3300 \end_inset
3301
3302
3303 \begin_inset ERT
3304 status open
3305
3306 \begin_layout Plain Layout
3307
3308
3309 \backslash
3310 d o
3311 \end_layout
3312
3313 \end_inset
3314
3315
3316 \end_layout
3317
3318 \begin_layout Quotation
3319 circumflex (circu)
3320 \begin_inset space \hfill{}
3321 \end_inset
3322
3323 âêîôû
3324 \end_layout
3325
3326 \begin_layout Quotation
3327 circle (circl)
3328 \begin_inset space \hfill{}
3329 \end_inset
3330
3331 ÅůŮ
3332 \end_layout
3333
3334 \begin_layout Quotation
3335 tie (tie)
3336 \begin_inset space \hfill{}
3337 \end_inset
3338
3339
3340 \begin_inset ERT
3341 status open
3342
3343 \begin_layout Plain Layout
3344
3345
3346 \backslash
3347 t o
3348 \end_layout
3349
3350 \end_inset
3351
3352
3353 \end_layout
3354
3355 \begin_layout Quotation
3356 breve (bre)
3357 \begin_inset space \hfill{}
3358 \end_inset
3359
3360 ă
3361 \begin_inset ERT
3362 status open
3363
3364 \begin_layout Plain Layout
3365
3366
3367 \backslash
3368 u o
3369 \end_layout
3370
3371 \end_inset
3372
3373
3374 \end_layout
3375
3376 \begin_layout Quotation
3377 caron (car)
3378 \begin_inset space \hfill{}
3379 \end_inset
3380
3381 čšž
3382 \end_layout
3383
3384 \begin_layout Quotation
3385 hungarian umlaut (hug)
3386 \begin_inset space \hfill{}
3387 \end_inset
3388
3389 őű
3390 \end_layout
3391
3392 \begin_layout Quotation
3393 umlaut (uml)
3394 \begin_inset space \hfill{}
3395 \end_inset
3396
3397 äöü
3398 \end_layout
3399
3400 \begin_layout Quotation
3401 dot (dot)
3402 \begin_inset space \hfill{}
3403 \end_inset
3404
3405 ż
3406 \begin_inset ERT
3407 status open
3408
3409 \begin_layout Plain Layout
3410
3411
3412 \backslash
3413 .s
3414 \end_layout
3415
3416 \end_inset
3417
3418
3419 \end_layout
3420
3421 \begin_layout Standard
3422 Since in many international keyboards there are exceptions to what some
3423  dead keys should do, you can define them using
3424 \end_layout
3425
3426 \begin_layout Quotation
3427 \begin_inset Flex CharStyle:Code
3428 status collapsed
3429
3430 \begin_layout Plain Layout
3431
3432 \backslash
3433 kxmod
3434 \end_layout
3435
3436 \end_inset
3437
3438  deadkey key outstring
3439 \end_layout
3440
3441 \begin_layout Standard
3442 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3443 , so you put in
3444 \end_layout
3445
3446 \begin_layout Quotation
3447 \begin_inset Flex CharStyle:Code
3448 status collapsed
3449
3450 \begin_layout Plain Layout
3451
3452 \backslash
3453 kxmod
3454 \end_layout
3455
3456 \end_inset
3457
3458  caron o "
3459 \backslash
3460 ^o"
3461 \end_layout
3462
3463 \begin_layout Standard
3464 to make it work correctly.
3465  Also, you have to define as exceptions dead keys over i and j, to remove
3466  the dot from them before inserting an accent mark.
3467  I will change this when the time comes, but so far I haven't had time.
3468 \end_layout
3469
3470 \begin_layout Standard
3471 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3472  double backslash.
3473  Also, quotes and 
3474 \begin_inset Flex CharStyle:Code
3475 status collapsed
3476
3477 \begin_layout Plain Layout
3478 #
3479 \end_layout
3480
3481 \end_inset
3482
3483  have different meaning.
3484  
3485 \begin_inset Flex CharStyle:Code
3486 status collapsed
3487
3488 \begin_layout Plain Layout
3489 #
3490 \end_layout
3491
3492 \end_inset
3493
3494  marks comments, quotes start and end LaTeX-style commands.
3495  To enter quote, you'll need to use 
3496 \begin_inset Flex CharStyle:Code
3497 status collapsed
3498
3499 \begin_layout Plain Layout
3500
3501 \backslash
3502 "
3503 \end_layout
3504
3505 \end_inset
3506
3507 , to enter 
3508 \begin_inset Flex CharStyle:Code
3509 status collapsed
3510
3511 \begin_layout Plain Layout
3512 #
3513 \end_layout
3514
3515 \end_inset
3516
3517 , use 
3518 \begin_inset Flex CharStyle:Code
3519 status collapsed
3520
3521 \begin_layout Plain Layout
3522
3523 \backslash
3524 #
3525 \end_layout
3526
3527 \end_inset
3528
3529 .
3530 \end_layout
3531
3532 \begin_layout Standard
3533 If you make a keyboard description file that works for your language, please
3534  mail it to me, so I can include it in the next keymap distribution.
3535 \end_layout
3536
3537 \begin_layout Standard
3538 More keywords will be supported in keymap configuration file in future,
3539  like
3540 \end_layout
3541
3542 \begin_layout Itemize
3543 \begin_inset Flex CharStyle:Code
3544 status collapsed
3545
3546 \begin_layout Plain Layout
3547
3548 \backslash
3549 kinclude filename
3550 \end_layout
3551
3552 \end_inset
3553
3554
3555 \emph on
3556
3557 \begin_inset space \hfill{}
3558 \end_inset
3559
3560
3561 \begin_inset Flex CharStyle:Code
3562 status collapsed
3563
3564 \begin_layout Plain Layout
3565 include
3566 \end_layout
3567
3568 \end_inset
3569
3570  another file
3571 \end_layout
3572
3573 \begin_layout Itemize
3574 \begin_inset Flex CharStyle:Code
3575 status collapsed
3576
3577 \begin_layout Plain Layout
3578
3579 \backslash
3580 kprog program
3581 \end_layout
3582
3583 \end_inset
3584
3585
3586 \emph on
3587
3588 \begin_inset space \hfill{}
3589 \end_inset
3590
3591
3592 \begin_inset Flex CharStyle:Code
3593 status collapsed
3594
3595 \begin_layout Plain Layout
3596 define
3597 \end_layout
3598
3599 \end_inset
3600
3601  an external keymap translation program 
3602 \end_layout
3603
3604 \begin_layout Standard
3605 Also, it should look into 
3606 \begin_inset Flex CharStyle:Code
3607 status collapsed
3608
3609 \begin_layout Plain Layout
3610 lyxrc
3611 \end_layout
3612
3613 \end_inset
3614
3615  file for defaults, too (for example, a 
3616 \begin_inset Flex CharStyle:Code
3617 status collapsed
3618
3619 \begin_layout Plain Layout
3620
3621 \backslash
3622 kinclude
3623 \end_layout
3624
3625 \end_inset
3626
3627  option to include default keyboard).
3628 \end_layout
3629
3630 \end_inset
3631
3632
3633 \end_layout
3634
3635 \begin_layout Section
3636 International Keymap Stuff
3637 \begin_inset CommandInset label
3638 LatexCommand label
3639 name "sec:International-Keymap-Stuff"
3640
3641 \end_inset
3642
3643
3644 \end_layout
3645
3646 \begin_layout Standard
3647 \begin_inset Note Note
3648 status open
3649
3650 \begin_layout Plain Layout
3651 In doing the revisions on this document in March 2008, I did not look over
3652  this stuff, as I do not understand it.
3653  It would be good if someone else could do so.
3654  (RH)
3655 \end_layout
3656
3657 \end_inset
3658
3659
3660 \end_layout
3661
3662 \begin_layout Standard
3663 The next two sections describe the 
3664 \begin_inset Flex CharStyle:Code
3665 status collapsed
3666
3667 \begin_layout Plain Layout
3668
3669 \shape up
3670 .kmap
3671 \end_layout
3672
3673 \end_inset
3674
3675  and 
3676 \begin_inset Flex CharStyle:Code
3677 status collapsed
3678
3679 \begin_layout Plain Layout
3680
3681 \shape up
3682 .cdef
3683 \end_layout
3684
3685 \end_inset
3686
3687  file syntax in detail.
3688  These sections should help you design your own key map if the ones provided
3689  do not meet your needs.
3690 \end_layout
3691
3692 \begin_layout Subsection
3693 The .kmap File
3694 \end_layout
3695
3696 \begin_layout Standard
3697
3698 \shape up
3699 .
3700 \begin_inset Flex CharStyle:Code
3701 status collapsed
3702
3703 \begin_layout Plain Layout
3704 kmap
3705 \end_layout
3706
3707 \end_inset
3708
3709  file maps keystrokes to characters or strings.
3710  As the name suggests, it sets a keyboard mapping.
3711  The 
3712 \begin_inset Flex CharStyle:Code
3713 status collapsed
3714
3715 \begin_layout Plain Layout
3716 .kmap
3717 \end_layout
3718
3719 \end_inset
3720
3721
3722 \shape default
3723  file keywords 
3724 \shape up
3725
3726 \begin_inset Flex CharStyle: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
3738 \shape default
3739 ,
3740 \shape up
3741  
3742 \shape default
3743
3744 \begin_inset Flex CharStyle:Code
3745 status collapsed
3746
3747 \begin_layout Plain Layout
3748
3749 \shape up
3750 kmod
3751 \end_layout
3752
3753 \end_inset
3754
3755 ,
3756 \shape up
3757  
3758 \shape default
3759
3760 \begin_inset Flex CharStyle:Code
3761 status collapsed
3762
3763 \begin_layout Plain Layout
3764
3765 \shape up
3766 ksmod
3767 \end_layout
3768
3769 \end_inset
3770
3771 , and 
3772 \begin_inset Flex CharStyle:Code
3773 status collapsed
3774
3775 \begin_layout Plain Layout
3776
3777 \shape up
3778 kcomb
3779 \end_layout
3780
3781 \end_inset
3782
3783  are described in this section.
3784 \end_layout
3785
3786 \begin_layout Labeling
3787 \labelwidthstring 00.00.0000
3788 \begin_inset Flex CharStyle: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  Map a character to a string
3800 \end_layout
3801
3802 \begin_layout LyX-Code
3803
3804 \backslash
3805 kmap 
3806 \family roman
3807 \emph on
3808 char
3809 \family default
3810 \emph default
3811  
3812 \family roman
3813 \emph on
3814 string
3815 \end_layout
3816
3817 \begin_layout Standard
3818 This will ma
3819 \family roman
3820 p
3821 \family default
3822  
3823 \family roman
3824 \emph on
3825 char
3826 \family default
3827 \emph default
3828  
3829 \family roman
3830 to
3831 \family default
3832  
3833 \family roman
3834 \emph on
3835 string
3836 \emph default
3837 .
3838  Note that in
3839 \family default
3840  
3841 \family roman
3842 \emph on
3843 string
3844 \emph default
3845 ,
3846 \family default
3847  
3848 \family roman
3849 \shape up
3850 the double-quote (")
3851 \family default
3852 \shape default
3853  
3854 \family roman
3855 and
3856 \family default
3857  
3858 \family roman
3859 \shape up
3860 the backslash (
3861 \backslash
3862 )
3863 \family default
3864 \shape default
3865  
3866 \family roman
3867 must be escaped with a preceding backslash (
3868 \shape up
3869
3870 \backslash
3871
3872 \shape default
3873 )
3874 \family default
3875 .
3876 \end_layout
3877
3878 \begin_layout Standard
3879 An example of a 
3880 \begin_inset Flex CharStyle:MenuItem
3881 status collapsed
3882
3883 \begin_layout Plain Layout
3884
3885 \shape up
3886 kmap
3887 \end_layout
3888
3889 \end_inset
3890
3891  statement to cause the symbol 
3892 \begin_inset Flex CharStyle:MenuItem
3893 status collapsed
3894
3895 \begin_layout Plain Layout
3896
3897 \shape up
3898 /
3899 \end_layout
3900
3901 \end_inset
3902
3903  to be output for the keystroke 
3904 \begin_inset Flex CharStyle:MenuItem
3905 status collapsed
3906
3907 \begin_layout Plain Layout
3908
3909 \shape up
3910 &
3911 \end_layout
3912
3913 \end_inset
3914
3915  is:
3916 \end_layout
3917
3918 \begin_layout LyX-Code
3919
3920 \backslash
3921 kmap & /
3922 \end_layout
3923
3924 \begin_layout Labeling
3925 \labelwidthstring 00.00.0000
3926 \begin_inset Flex CharStyle:Code
3927 status collapsed
3928
3929 \begin_layout Plain Layout
3930
3931 \shape up
3932 kmod
3933 \end_layout
3934
3935 \end_inset
3936
3937  Specify an accent character
3938 \end_layout
3939
3940 \begin_layout LyX-Code
3941
3942 \backslash
3943 kmod 
3944 \family roman
3945 \emph on
3946 char accent allowed
3947 \end_layout
3948
3949 \begin_layout Standard
3950 This will make the cha
3951 \family roman
3952 racter
3953 \family default
3954  
3955 \family roman
3956 \emph on
3957 char
3958 \family default
3959 \emph default
3960  
3961 \family roman
3962 \shape up
3963 \emph on
3964 be an accent
3965 \family default
3966 \shape default
3967 \emph default
3968  
3969 \family roman
3970 \shape up
3971 on the
3972 \family default
3973 \shape default
3974  
3975 \family roman
3976 \shape up
3977 \emph on
3978 allowed
3979 \family default
3980 \shape default
3981 \emph default
3982  
3983 \family roman
3984 \shape up
3985 cha
3986 \family default
3987 racter(s).
3988  This is the dead key
3989 \begin_inset Foot
3990 status collapsed
3991
3992 \begin_layout Plain Layout
3993 The term 
3994 \family roman
3995 \emph on
3996 dead key
3997 \family default
3998 \emph default
3999  refers to a key that does not produce a character by itself, but when followed
4000  with another key, produces the desired accent character.
4001  For example, a German characte
4002 \family roman
4003 r with an umlaut like
4004 \family default
4005  
4006 \family roman
4007 \emph on
4008 ä
4009 \family default
4010 \emph default
4011  
4012 \family roman
4013 can be produced in this manner.
4014 \end_layout
4015
4016 \end_inset
4017
4018  mechanism.
4019  
4020 \end_layout
4021
4022 \begin_layout Standard
4023 If you 
4024 \family roman
4025 hit
4026 \family default
4027  
4028 \family roman
4029 \emph on
4030 char
4031 \family default
4032 \emph default
4033  
4034 \family roman
4035 and then another key not in
4036 \family default
4037  
4038 \family roman
4039 \emph on
4040 allowed
4041 \emph default
4042 , you will get a
4043 \family default
4044  
4045 \family roman
4046 \emph on
4047 char
4048 \family default
4049 \emph default
4050  
4051 \family roman
4052 followed by the other, not allowed key, as output.
4053
4054 \family default
4055  Note that a 
4056 \begin_inset Flex CharStyle:MenuItem
4057 status collapsed
4058
4059 \begin_layout Plain Layout
4060
4061 \shape up
4062 Backspace
4063 \end_layout
4064
4065 \end_inset
4066
4067  cancels a dead key, so if 
4068 \family roman
4069 you hit
4070 \family default
4071  
4072 \family roman
4073 \emph on
4074 char
4075 \family default
4076 \emph default
4077  
4078 \begin_inset Flex CharStyle:MenuItem
4079 status collapsed
4080
4081 \begin_layout Plain Layout
4082
4083 \shape up
4084 \emph on
4085 Backspace
4086 \end_layout
4087
4088 \end_inset
4089
4090 , the cursor will not go one position backwards but will instead cancel
4091  the effect t
4092 \family roman
4093 hat
4094 \family default
4095  
4096 \family roman
4097 \shape up
4098 \emph on
4099 char
4100 \family default
4101 \shape default
4102 \emph default
4103  
4104 \family roman
4105 \shape up
4106 might have had on the next keystroke.
4107  
4108 \end_layout
4109
4110 \begin_layout Standard
4111 The following example specifies that the character ' is to be an acute accent,
4112  allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4113 \end_layout
4114
4115 \begin_layout LyX-Code
4116
4117 \backslash
4118 kmod ' acute aeiouAEIOU
4119 \end_layout
4120
4121 \begin_layout Labeling
4122 \labelwidthstring 00.00.0000
4123 \begin_inset Flex CharStyle:Code
4124 status collapsed
4125
4126 \begin_layout Plain Layout
4127 ksmod
4128 \end_layout
4129
4130 \end_inset
4131
4132  Specify an exception to the accent character
4133 \end_layout
4134
4135 \begin_layout LyX-Code
4136
4137 \backslash
4138 kxmod  
4139 \family roman
4140 \emph on
4141 accent char result
4142 \end_layout
4143
4144 \begin_layout Standard
4145 This defines an exce
4146 \family roman
4147 ption for
4148 \family default
4149  
4150 \family roman
4151 \emph on
4152 accent
4153 \family default
4154 \emph default
4155  
4156 \family roman
4157 on
4158 \family default
4159  
4160 \family roman
4161 \emph on
4162 char
4163 \emph default
4164 .
4165  T
4166 \shape up
4167 he
4168 \family default
4169 \shape default
4170  
4171 \family roman
4172 \shape up
4173 \emph on
4174 accent
4175 \family default
4176 \shape default
4177 \emph default
4178  
4179 \family roman
4180 \shape up
4181 must
4182 \family default
4183 \shape default
4184  
4185 \shape up
4186 have been assigned a keystroke with a previous
4187 \shape default
4188  
4189 \begin_inset Flex CharStyle:Code
4190 status collapsed
4191
4192 \begin_layout Plain Layout
4193
4194 \shape up
4195
4196 \backslash
4197 kmo
4198 \shape default
4199 d
4200 \end_layout
4201
4202 \end_inset
4203
4204  declar
4205 \family roman
4206 ation and
4207 \family default
4208  
4209 \family roman
4210 \emph on
4211 char
4212 \family default
4213 \emph default
4214  
4215 \family roman
4216 must not belong in the
4217 \family default
4218  
4219 \family roman
4220 \emph on
4221 allowed
4222 \family default
4223 \emph default
4224  
4225 \family roman
4226 set of
4227 \family default
4228  
4229 \family roman
4230 \emph on
4231 accent
4232 \emph default
4233 .
4234  When
4235 \family default
4236  
4237 \family roman
4238 \shape up
4239 you enter the
4240 \family default
4241 \shape default
4242  
4243 \family roman
4244 \shape up
4245 \emph on
4246 accent char
4247 \family default
4248 \shape default
4249 \emph default
4250  
4251 \family roman
4252 \shape up
4253 sequence,
4254 \family default
4255 \shape default
4256  
4257 \family roman
4258 \shape up
4259 \emph on
4260 result
4261 \emph default
4262  is produced.
4263  If such a declaration does not exist in
4264 \family default
4265 \shape default
4266  
4267 \shape up
4268 the
4269 \shape default
4270  
4271 \begin_inset Flex CharStyle:Code
4272 status collapsed
4273
4274 \begin_layout Plain Layout
4275
4276 \shape up
4277 .kmap
4278 \end_layout
4279
4280 \end_inset
4281
4282  file and yo
4283 \family roman
4284 u enter
4285 \family default
4286  
4287 \family roman
4288 \emph on
4289 accent char
4290 \emph default
4291 , you get
4292 \family default
4293  
4294 \family roman
4295 \emph on
4296 accent_key char
4297 \emph default
4298  where
4299 \family default
4300  
4301 \family roman
4302 \emph on
4303 accent_key
4304 \emph default
4305  is the first arg
4306 \family default
4307 ument of the 
4308 \begin_inset Flex CharStyle:Code
4309 status collapsed
4310
4311 \begin_layout Plain Layout
4312
4313 \shape up
4314
4315 \backslash
4316 kmod
4317 \end_layout
4318
4319 \end_inset
4320
4321  declaration.
4322  
4323 \end_layout
4324
4325 \begin_layout Standard
4326 The following command produces causes äi to be produced when you enter acute-i
4327  ('i):
4328 \end_layout
4329
4330 \begin_layout LyX-Code
4331
4332 \backslash
4333 kxmod acute i "
4334 \backslash
4335
4336 \backslash
4337 '{
4338 \backslash
4339
4340 \backslash
4341 i}"
4342 \end_layout
4343
4344 \begin_layout Labeling
4345 \labelwidthstring 00.00.0000
4346 \begin_inset Flex CharStyle:Code
4347 status collapsed
4348
4349 \begin_layout Plain Layout
4350 kcomb
4351 \end_layout
4352
4353 \end_inset
4354
4355  Combine two accent characters
4356 \end_layout
4357
4358 \begin_layout LyX-Code
4359
4360 \backslash
4361 kcomb 
4362 \family roman
4363 \emph on
4364 accent1 accent2 allowed
4365 \end_layout
4366
4367 \begin_layout Standard
4368 This one is getting pretty esoteric.
4369  It allows you to combine the effect 
4370 \family roman
4371 of
4372 \family default
4373  
4374 \family roman
4375 \emph on
4376 accent1
4377 \family default
4378 \emph default
4379  
4380 \family roman
4381 and
4382 \family default
4383  
4384 \family roman
4385 \emph on
4386 accent2
4387 \family default
4388 \emph default
4389  
4390 \family roman
4391 (in that order!) on
4392 \family default
4393  
4394 \family roman
4395 \emph on
4396 allowed
4397 \family default
4398 \emph default
4399  
4400 \family roman
4401 chars.
4402  The keystrokes for
4403 \family default
4404  
4405 \family roman
4406 \emph on
4407 accent1
4408 \family default
4409 \emph default
4410  
4411 \family roman
4412 and
4413 \family default
4414  
4415 \family roman
4416 \emph on
4417 accent2
4418 \family default
4419 \emph default
4420  
4421 \family roman
4422 must have be
4423 \family default
4424 en set with a 
4425 \begin_inset Flex CharStyle:Code
4426 status collapsed
4427
4428 \begin_layout Plain Layout
4429
4430 \shape up
4431
4432 \backslash
4433 kmod
4434 \end_layout
4435
4436 \end_inset
4437
4438  command at 
4439 \family roman
4440 a
4441 \family default
4442  
4443 \family roman
4444 \emph on
4445 previous
4446 \family default
4447 \emph default
4448  
4449 \family roman
4450 point in the
4451 \family default
4452  file.
4453  
4454 \end_layout
4455
4456 \begin_layout Standard
4457 Consider this example from the 
4458 \begin_inset Flex CharStyle:Code
4459 status collapsed
4460
4461 \begin_layout Plain Layout
4462
4463 \shape up
4464 greek.kmap
4465 \end_layout
4466
4467 \end_inset
4468
4469  file:
4470 \end_layout
4471
4472 \begin_layout LyX-Code
4473
4474 \backslash
4475 kmod ; acute aeioyvhAEIOYVH 
4476 \backslash
4477 kmod : umlaut iyIY 
4478 \backslash
4479 kcomb acute umlaut iyIY
4480 \end_layout
4481
4482 \begin_layout Standard
4483 This allows you to press 
4484 \begin_inset Flex CharStyle:MenuItem
4485 status collapsed
4486
4487 \begin_layout Plain Layout
4488
4489 \shape up
4490 ;:i
4491 \end_layout
4492
4493 \end_inset
4494
4495  and get the effect of 
4496 \begin_inset Flex CharStyle:Code
4497 status collapsed
4498
4499 \begin_layout Plain Layout
4500
4501 \shape up
4502
4503 \backslash
4504 '{
4505 \backslash
4506 "{i}}
4507 \end_layout
4508
4509 \end_inset
4510
4511 .
4512  
4513 \family roman
4514 \shape up
4515 A backspace
4516 \family default
4517 \shape default
4518  in this case cancels the last dead key, so if you press 
4519 \begin_inset Flex CharStyle:MenuItem
4520 status collapsed
4521
4522 \begin_layout Plain Layout
4523
4524 \shape up
4525 ;: Backspace i
4526 \end_layout
4527
4528 \end_inset
4529
4530  you get 
4531 \begin_inset Flex CharStyle:Code
4532 status collapsed
4533
4534 \begin_layout Plain Layout
4535
4536 \shape up
4537
4538 \backslash
4539 '{i}
4540 \end_layout
4541
4542 \end_inset
4543
4544 .
4545 \end_layout
4546
4547 \begin_layout Subsection
4548 The .cdef File
4549 \end_layout
4550
4551 \begin_layout Standard
4552 After the 
4553 \begin_inset Flex CharStyle:Code
4554 status collapsed
4555
4556 \begin_layout Plain Layout
4557
4558 \shape up
4559 .kmap
4560 \end_layout
4561
4562 \end_inset
4563
4564  mapping is performed, a 
4565 \begin_inset Flex CharStyle:Code
4566 status collapsed
4567
4568 \begin_layout Plain Layout
4569
4570 \shape up
4571 .cde
4572 \shape default
4573 f
4574 \end_layout
4575
4576 \end_inset
4577
4578  file maps the strings that the symbols generate to characters in the current
4579  font.
4580  The LyX distribution currently includes at least the 
4581 \begin_inset Flex CharStyle:Code
4582 status collapsed
4583
4584 \begin_layout Plain Layout
4585
4586 \shape up
4587 iso8859-1.cdef
4588 \end_layout
4589
4590 \end_inset
4591
4592  and 
4593 \begin_inset Flex CharStyle:Code
4594 status collapsed
4595
4596 \begin_layout Plain Layout
4597
4598 \shape up
4599 iso8859-2.cdef
4600 \end_layout
4601
4602 \end_inset
4603
4604  files.
4605 \end_layout
4606
4607 \begin_layout Standard
4608 In general the 
4609 \begin_inset Flex CharStyle:Code
4610 status collapsed
4611
4612 \begin_layout Plain Layout
4613
4614 \shape up
4615 .cdef
4616 \end_layout
4617
4618 \end_inset
4619
4620  file is a sequence of declarations of the form
4621 \end_layout
4622
4623 \begin_layout LyX-Code
4624
4625 \family roman
4626 \emph on
4627 char_index_in_set
4628 \family default
4629 \emph default
4630  
4631 \family roman
4632 \emph on
4633  string
4634 \end_layout
4635
4636 \begin_layout Standard
4637 For example, in order to map 
4638 \begin_inset Flex CharStyle:MenuItem
4639 status collapsed
4640
4641 \begin_layout Plain Layout
4642
4643 \shape up
4644
4645 \backslash
4646 '{e}
4647 \end_layout
4648
4649 \end_inset
4650
4651  to the corresponding character in the iso-8859-1 set (233), the following
4652  declaration is used
4653 \end_layout
4654
4655 \begin_layout LyX-Code
4656 233 "
4657 \backslash
4658
4659 \backslash
4660 '{e}"
4661 \end_layout
4662
4663 \begin_layout Standard
4664 with 
4665 \begin_inset Flex CharStyle:Code
4666 status collapsed
4667
4668 \begin_layout Plain Layout
4669
4670 \backslash
4671
4672 \end_layout
4673
4674 \end_inset
4675
4676  and 
4677 \begin_inset Flex CharStyle:Code
4678 status collapsed
4679
4680 \begin_layout Plain Layout
4681 "
4682 \end_layout
4683
4684 \end_inset
4685
4686  being escap
4687 \family roman
4688 ed in
4689 \family default
4690  
4691 \family roman
4692 \emph on
4693 string
4694 \emph default
4695 .
4696  Note that
4697 \family default
4698  the same character can apply to more than one string.
4699  In the 
4700 \begin_inset Flex CharStyle:Code
4701 status collapsed
4702
4703 \begin_layout Plain Layout
4704 i
4705 \shape up
4706 so-8859-7.cdef
4707 \end_layout
4708
4709 \end_inset
4710
4711  file you have
4712 \end_layout
4713
4714 \begin_layout LyX-Code
4715 192 "
4716 \backslash
4717
4718 \backslash
4719 '{
4720 \backslash
4721
4722 \backslash
4723
4724 \backslash
4725 "{i}}"
4726 \begin_inset Newline newline
4727 \end_inset
4728
4729 192 "
4730 \backslash
4731
4732 \backslash
4733
4734 \backslash
4735 "{
4736 \backslash
4737
4738 \backslash
4739 '{i}}"
4740 \end_layout
4741
4742 \begin_layout Standard
4743 If LyX cannot find a mapping for the string produced by the keystroke or
4744  a deadkey sequence, it will check if it looks like an accented char and
4745  try to draw an accent over the character on screen.
4746 \end_layout
4747
4748 \begin_layout Subsection
4749 Dead Keys
4750 \end_layout
4751
4752 \begin_layout Standard
4753 There is a second way to add support for international characters through
4754  so-called dead-keys.
4755  A dead-key works in combination with a letter to produce an accented character.
4756  Here, we'll explain how to create a really simple dead-key to illustrate
4757  how they work.
4758 \end_layout
4759
4760 \begin_layout Standard
4761 Suppose you happen to need the circumflex character, 
4762 \begin_inset Quotes eld
4763 \end_inset
4764
4765  ̂
4766 \begin_inset Quotes erd
4767 \end_inset
4768
4769 .
4770  You could bind the 
4771 \begin_inset Flex CharStyle:MenuItem
4772 status collapsed
4773
4774 \begin_layout Plain Layout
4775 ^
4776 \end_layout
4777
4778 \end_inset
4779
4780 -key [a.k.a.
4781 \begin_inset space ~
4782 \end_inset
4783
4784
4785 \begin_inset Flex CharStyle:MenuItem
4786 status collapsed
4787
4788 \begin_layout Plain Layout
4789 Shift-6
4790 \end_layout
4791
4792 \end_inset
4793
4794 ] to the LyX command 
4795 \begin_inset Flex CharStyle:Code
4796 status collapsed
4797
4798 \begin_layout Plain Layout
4799 accent-circumflex
4800 \end_layout
4801
4802 \end_inset
4803
4804  in your 
4805 \begin_inset Flex CharStyle:Code
4806 status collapsed
4807
4808 \begin_layout Plain Layout
4809 lyxrc
4810 \end_layout
4811
4812 \end_inset
4813
4814  file.
4815  Now, whenever you type the 
4816 \begin_inset Flex CharStyle:MenuItem
4817 status collapsed
4818
4819 \begin_layout Plain Layout
4820 ^
4821 \end_layout
4822
4823 \end_inset
4824
4825 -key followed by a letter, that letter will have a circumflex accent on
4826  it.
4827  For example, the sequence 
4828 \begin_inset Quotes eld
4829 \end_inset
4830
4831
4832 \begin_inset Flex CharStyle:MenuItem
4833 status collapsed
4834
4835 \begin_layout Plain Layout
4836 ^e
4837 \end_layout
4838
4839 \end_inset
4840
4841
4842 \begin_inset Quotes erd
4843 \end_inset
4844
4845  produces the letter: 
4846 \begin_inset Quotes eld
4847 \end_inset
4848
4849 ê
4850 \begin_inset Quotes erd
4851 \end_inset
4852
4853 .
4854  If you tried to type 
4855 \begin_inset Quotes eld
4856 \end_inset
4857
4858
4859 \begin_inset Flex CharStyle:MenuItem
4860 status collapsed
4861
4862 \begin_layout Plain Layout
4863 ^t
4864 \end_layout
4865
4866 \end_inset
4867
4868
4869 \begin_inset Quotes erd
4870 \end_inset
4871
4872 , however, LyX will complain with a beep, since a 
4873 \begin_inset Quotes eld
4874 \end_inset
4875
4876
4877 \begin_inset Flex CharStyle:MenuItem
4878 status collapsed
4879
4880 \begin_layout Plain Layout
4881 t
4882 \end_layout
4883
4884 \end_inset
4885
4886
4887 \begin_inset Quotes erd
4888 \end_inset
4889
4890  never takes a circumflex accent.
4891  Hitting 
4892 \begin_inset Flex CharStyle:MenuItem
4893 status collapsed
4894
4895 \begin_layout Plain Layout
4896 Space
4897 \end_layout
4898
4899 \end_inset
4900
4901  after a dead-key produces the bare-accent.
4902  Please note this last point! If you bind a key to a dead-key, you'll need
4903  to rebind the character on that key to yet another key.
4904  Binding the 
4905 \begin_inset Flex CharStyle:MenuItem
4906 status collapsed
4907
4908 \begin_layout Plain Layout
4909 ,-key
4910 \end_layout
4911
4912 \end_inset
4913
4914  to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
4915 \end_layout
4916
4917 \begin_layout Standard
4918 One common way to bind dead-keys is to use 
4919 \begin_inset Flex CharStyle:MenuItem
4920 status collapsed
4921
4922 \begin_layout Plain Layout
4923 Meta-
4924 \end_layout
4925
4926 \end_inset
4927
4928
4929 \begin_inset Flex CharStyle:MenuItem
4930 status collapsed
4931
4932 \begin_layout Plain Layout
4933 Ctrl-
4934 \end_layout
4935
4936 \end_inset
4937
4938 , and 
4939 \begin_inset Flex CharStyle:MenuItem
4940 status collapsed
4941
4942 \begin_layout Plain Layout
4943 Shift-
4944 \end_layout
4945
4946 \end_inset
4947
4948  in combination with an accent, like 
4949 \begin_inset Quotes eld
4950 \end_inset
4951
4952
4953 \begin_inset Flex CharStyle:MenuItem
4954 status collapsed
4955
4956 \begin_layout Plain Layout
4957 ~
4958 \end_layout
4959
4960 \end_inset
4961
4962
4963 \begin_inset Quotes erd
4964 \end_inset
4965
4966  or 
4967 \begin_inset Quotes eld
4968 \end_inset
4969
4970
4971 \begin_inset Flex CharStyle:MenuItem
4972 status collapsed
4973
4974 \begin_layout Plain Layout
4975 ,
4976 \end_layout
4977
4978 \end_inset
4979
4980
4981 \begin_inset Quotes erd
4982 \end_inset
4983
4984  or 
4985 \begin_inset Quotes eld
4986 \end_inset
4987
4988
4989 \begin_inset Flex CharStyle:MenuItem
4990 status collapsed
4991
4992 \begin_layout Plain Layout
4993 ^
4994 \end_layout
4995
4996 \end_inset
4997
4998
4999 \begin_inset Quotes erd
5000 \end_inset
5001
5002 .
5003  Another way involves using 
5004 \begin_inset Flex CharStyle:Code
5005 status collapsed
5006
5007 \begin_layout Plain Layout
5008 xmodmap
5009 \end_layout
5010
5011 \end_inset
5012
5013  and 
5014 \begin_inset Flex CharStyle:Code
5015 status collapsed
5016
5017 \begin_layout Plain Layout
5018 xkeycaps
5019 \end_layout
5020
5021 \end_inset
5022
5023  to set up the special 
5024 \begin_inset Flex CharStyle:Code
5025 status collapsed
5026
5027 \begin_layout Plain Layout
5028 Mode_Switch
5029 \end_layout
5030
5031 \end_inset
5032
5033  key.
5034  The 
5035 \begin_inset Flex CharStyle:Code
5036 status collapsed
5037
5038 \begin_layout Plain Layout
5039 Mode_Switch
5040 \end_layout
5041
5042 \end_inset
5043
5044  acts in some ways just like 
5045 \begin_inset Flex CharStyle:MenuItem
5046 status collapsed
5047
5048 \begin_layout Plain Layout
5049 Shift
5050 \end_layout
5051
5052 \end_inset
5053
5054  and permits you to bind keys to accented characters.
5055  You can also turn keys into dead-keys by binding them to something like
5056  
5057 \begin_inset Flex CharStyle:Code
5058 status collapsed
5059
5060 \begin_layout Plain Layout
5061 usldead_cedilla
5062 \end_layout
5063
5064 \end_inset
5065
5066  and then binding this symbolic key to the corresponding LyX command.
5067 \begin_inset Foot
5068 status collapsed
5069
5070 \begin_layout Plain Layout
5071 Note from 
5072 \noun on
5073 John Weiss
5074 \noun default
5075 : This is exactly what I do in my 
5076 \begin_inset Flex CharStyle:Code
5077 status collapsed
5078
5079 \begin_layout Plain Layout
5080 ~/.lyx/lyxrc
5081 \end_layout
5082
5083 \end_inset
5084
5085  and my 
5086 \begin_inset Flex CharStyle:Code
5087 status collapsed
5088
5089 \begin_layout Plain Layout
5090 ~/.xmodmap
5091 \end_layout
5092
5093 \end_inset
5094
5095  files.
5096  I have my 
5097 \begin_inset Flex CharStyle:MenuItem
5098 status collapsed
5099
5100 \begin_layout Plain Layout
5101 Scroll
5102 \begin_inset space ~
5103 \end_inset
5104
5105 Lock
5106 \end_layout
5107
5108 \end_inset
5109
5110  key set up as 
5111 \begin_inset Flex CharStyle:Code
5112 status collapsed
5113
5114 \begin_layout Plain Layout
5115 Mode_Shift
5116 \end_layout
5117
5118 \end_inset
5119
5120  and a bunch of these 
5121 \begin_inset Quotes eld
5122 \end_inset
5123
5124
5125 \begin_inset Flex CharStyle:Code
5126 status collapsed
5127
5128 \begin_layout Plain Layout
5129 usldead_*
5130 \end_layout
5131
5132 \end_inset
5133
5134
5135 \begin_inset Quotes erd
5136 \end_inset
5137
5138  symbolic keys bound such things as 
5139 \begin_inset Flex CharStyle:MenuItem
5140 status collapsed
5141
5142 \begin_layout Plain Layout
5143 Scroll
5144 \begin_inset space ~
5145 \end_inset
5146
5147 Lock-^
5148 \end_layout
5149
5150 \end_inset
5151
5152  and 
5153 \begin_inset Flex CharStyle:MenuItem
5154 status collapsed
5155
5156 \begin_layout Plain Layout
5157 Scroll
5158 \begin_inset space ~
5159 \end_inset
5160
5161 Lock-~
5162 \end_layout
5163
5164 \end_inset
5165
5166 .
5167  This is how I produce my accented characters.
5168 \end_layout
5169
5170 \end_inset
5171
5172  You can make just about anything into the 
5173 \begin_inset Flex CharStyle:Code
5174 status collapsed
5175
5176 \begin_layout Plain Layout
5177 Mode_Switch
5178 \end_layout
5179
5180 \end_inset
5181
5182  key: One of the 
5183 \begin_inset Flex CharStyle:MenuItem
5184 status collapsed
5185
5186 \begin_layout Plain Layout
5187 Ctrl-
5188 \end_layout
5189
5190 \end_inset
5191
5192  keys, a spare function key, etc.
5193  As for the LyX commands that produce accents, check the entry for 
5194 \begin_inset Flex CharStyle:Code
5195 status collapsed
5196
5197 \begin_layout Plain Layout
5198 accent-acute
5199 \end_layout
5200
5201 \end_inset
5202
5203  in the 
5204 \emph on
5205 Reference Manual
5206 \emph default
5207 .
5208  You'll find the complete list there.
5209 \end_layout
5210
5211 \begin_layout Subsection
5212 Saving your Language Configuration
5213 \end_layout
5214
5215 \begin_layout Standard
5216 You can edit your preferences so that your desired language environment
5217  is automatically configured when LyX starts up, via the 
5218 \begin_inset Flex CharStyle:MenuItem
5219 status collapsed
5220
5221 \begin_layout Plain Layout
5222 Edit\SpecialChar \menuseparator
5223 Preferences
5224 \end_layout
5225
5226 \end_inset
5227
5228  dialog.
5229 \end_layout
5230
5231 \begin_layout Chapter
5232 Installing New Document Classes, Layouts, and Templates
5233 \begin_inset CommandInset label
5234 LatexCommand label
5235 name "cha:Installing-New-Document"
5236
5237 \end_inset
5238
5239
5240 \begin_inset OptArg
5241 status collapsed
5242
5243 \begin_layout Plain Layout
5244 Installing New Document Classes
5245 \end_layout
5246
5247 \end_inset
5248
5249
5250 \end_layout
5251
5252 \begin_layout Standard
5253 In this chapter, we describe the procedures for creating and installing
5254  new LyX layout and template files, as well as offer a refresher on correctly
5255  installing new LaTeX document classes.
5256  Some definitions: a document class is a LaTeX file (usually ending in 
5257 \begin_inset Flex CharStyle:Code
5258 status collapsed
5259
5260 \begin_layout Plain Layout
5261 .cls
5262 \end_layout
5263
5264 \end_inset
5265
5266  or 
5267 \begin_inset Flex CharStyle:Code
5268 status collapsed
5269
5270 \begin_layout Plain Layout
5271 .sty
5272 \end_layout
5273
5274 \end_inset
5275
5276 ) that describes the format of a document such as an article, report, journal
5277  preprint, etc, and all the commands needed to realize that format.
5278  A layout file is a LyX file that corresponds to a LaTeX document class
5279  and that tells LyX how to 
5280 \begin_inset Quotes eld
5281 \end_inset
5282
5283 draw
5284 \begin_inset Quotes erd
5285 \end_inset
5286
5287  things on the screen to make the display look something like the final
5288  printed page.
5289  More precisely, a layout file describes a 
5290 \begin_inset Quotes eld
5291 \end_inset
5292
5293 text class
5294 \begin_inset Quotes erd
5295 \end_inset
5296
5297  which is the internal construct LyX uses to render the screen display.
5298  
5299 \begin_inset Quotes eld
5300 \end_inset
5301
5302 Layout
5303 \begin_inset Quotes erd
5304 \end_inset
5305
5306  and 
5307 \begin_inset Quotes eld
5308 \end_inset
5309
5310 text class
5311 \begin_inset Quotes erd
5312 \end_inset
5313
5314  can be used somewhat interchangeably, but it is better to refer to the
5315  file as the layout, and the thing living in LyX's memory as the text class.
5316  A template file is simply a LyX document that contains a set of predefined
5317  entries for a given document class—entries that are generally required
5318  for that class.
5319  Templates are especially useful for things like journal manuscripts that
5320  are to be submitted electronically.
5321 \end_layout
5322
5323 \begin_layout Section
5324 Installing a new LaTeX package
5325 \end_layout
5326
5327 \begin_layout Standard
5328 Some installations may not include a LaTeX package that you would like to
5329  use within LyX.
5330  For example, you might need FoilTeX, a package for preparing slides or
5331  viewgraphs for overhead projectors.
5332  Modern LaTeX distributions like TeXLive (2008 or newer) or MiKTeX provide
5333  a user interface for that.
5334  For example on MiKTeX you start its program 
5335 \begin_inset Quotes eld
5336 \end_inset
5337
5338 Browse Packages
5339 \begin_inset Quotes erd
5340 \end_inset
5341
5342  to get a list of available packages.
5343  To install one, right click on it or use the installing toolbar button.
5344  When the package you want to install is not in the list, but you have it
5345  in form of a 
5346 \begin_inset Flex CharStyle:Code
5347 status collapsed
5348
5349 \begin_layout Plain Layout
5350 .cls
5351 \end_layout
5352
5353 \end_inset
5354
5355  or 
5356 \begin_inset Flex CharStyle:Code
5357 status collapsed
5358
5359 \begin_layout Plain Layout
5360 .sty
5361 \end_layout
5362
5363 \end_inset
5364
5365 -file, then copy these files to a subfolder of your LaTeX distribution,
5366  for example to the folder 
5367 \family sans
5368 ~
5369 \backslash
5370 tex
5371 \backslash
5372 latex
5373 \family default
5374 .
5375  Then update the file name database of your LaTeX-distribution.
5376  For example on MiKTeX this is done by pressing the button 
5377 \family sans
5378 Refresh
5379 \begin_inset space ~
5380 \end_inset
5381
5382 FNDB
5383 \family default
5384  that you find in MiKTeX's 
5385 \begin_inset Quotes eld
5386 \end_inset
5387
5388 Settings
5389 \begin_inset Quotes erd
5390 \end_inset
5391
5392  program.
5393  In both cases you need afterwards to reconfigure LyX using the menu 
5394 \begin_inset Flex CharStyle:MenuItem
5395 status collapsed
5396
5397 \begin_layout Plain Layout
5398 Tools\SpecialChar \menuseparator
5399 Reconfigure
5400 \end_layout
5401
5402 \end_inset
5403
5404  and then to restart LyX.
5405 \end_layout
5406
5407 \begin_layout Standard
5408 If your LaTeX distribution doesn't provide a user interface, then you can
5409  follow these steps by using a UNIX/Linux console.
5410 \end_layout
5411
5412 \begin_layout Enumerate
5413 Get the package from 
5414 \begin_inset CommandInset href
5415 LatexCommand href
5416 name "CTAN"
5417 target "http://www.ctan.org/"
5418
5419 \end_inset
5420
5421  or wherever.
5422 \end_layout
5423
5424 \begin_layout Enumerate
5425 You can install this package in several different places.
5426  If you want it to be available for all users on your system, then you should
5427  install it in your `local' TeX tree; if you want (or need) it to be available
5428  just for you, then you can install it in your own `user' TeX tree.
5429  Where these should be created, if they do not already exist, depends upon
5430  the details of your system.
5431  To find out, look in the file 
5432 \begin_inset Flex CharStyle:Code
5433 status collapsed
5434
5435 \begin_layout Plain Layout
5436 texmf.cnf
5437 \end_layout
5438
5439 \end_inset
5440
5441 .
5442 \begin_inset Foot
5443 status collapsed
5444
5445 \begin_layout Plain Layout
5446 This usually lives in the directory 
5447 \begin_inset Flex CharStyle:Code
5448 status collapsed
5449
5450 \begin_layout Plain Layout
5451 $TEXMF/web2c
5452 \end_layout
5453
5454 \end_inset
5455
5456 , though you can run 
5457 \begin_inset Flex CharStyle:Code
5458 status collapsed
5459
5460 \begin_layout Plain Layout
5461 kpsewhich texmf.cnf
5462 \end_layout
5463
5464 \end_inset
5465
5466  to locate it.
5467 \end_layout
5468
5469 \end_inset
5470
5471  The location of the `local' TeX tree is defined by 
5472 \begin_inset Flex CharStyle:Code
5473 status collapsed
5474
5475 \begin_layout Plain Layout
5476 TEXMFLOCAL
5477 \end_layout
5478
5479 \end_inset
5480
5481 ; this is usually somewhere like 
5482 \begin_inset Flex CharStyle:Code
5483 status collapsed
5484
5485 \begin_layout Plain Layout
5486 /usr/local/share/texmf/
5487 \end_layout
5488
5489 \end_inset
5490
5491 .
5492  The `user' TeX tree is defined by 
5493 \begin_inset Flex CharStyle:Code
5494 status collapsed
5495
5496 \begin_layout Plain Layout
5497 TEXMFHOME
5498 \end_layout
5499
5500 \end_inset
5501
5502  and is commonly at 
5503 \begin_inset Flex CharStyle:Code
5504 status collapsed
5505
5506 \begin_layout Plain Layout
5507 $HOME/texmf/
5508 \end_layout
5509
5510 \end_inset
5511
5512 .
5513  (If these variables are not predefined, you can define them.) You'll probably
5514  need root permissions to create or modify the `local' tree; but your `user'
5515  tree shouldn't have such limitations.
5516 \end_layout
5517
5518 \begin_layout Enumerate
5519 Make sure 
5520 \begin_inset Flex CharStyle:Code
5521 status collapsed
5522
5523 \begin_layout Plain Layout
5524 TEXMF
5525 \end_layout
5526
5527 \end_inset
5528
5529  includes the 
5530 \begin_inset Flex CharStyle:Code
5531 status collapsed
5532
5533 \begin_layout Plain Layout
5534 TEXMFLOCAL
5535 \end_layout
5536
5537 \end_inset
5538
5539  and 
5540 \begin_inset Flex CharStyle:Code
5541 status collapsed
5542
5543 \begin_layout Plain Layout
5544 TEXMFHOME
5545 \end_layout
5546
5547 \end_inset
5548
5549  variables; e.
5550 \begin_inset space \thinspace{}
5551 \end_inset
5552
5553 g.
5554 \begin_inset Newline newline
5555 \end_inset
5556
5557
5558 \begin_inset Flex CharStyle:Code
5559 status collapsed
5560
5561 \begin_layout Plain Layout
5562 TEXMF = {$TEXMFHOME,!!$TEXMFLOCAL,!!$TEXMFMAIN}
5563 \end_layout
5564
5565 \end_inset
5566
5567
5568 \begin_inset Newline newline
5569 \end_inset
5570
5571 But, again, most of this will 
5572 \begin_inset Quotes eld
5573 \end_inset
5574
5575 just work
5576 \begin_inset Quotes erd
5577 \end_inset
5578
5579 .
5580 \end_layout
5581
5582 \begin_layout Enumerate
5583 Create your local
5584 \begin_inset Foot
5585 status collapsed
5586
5587 \begin_layout Plain Layout
5588 We'll assume henceforth that you're defining `local' TeX tree.
5589  If you're defining a user tree, just adjust as necessary.
5590 \end_layout
5591
5592 \end_inset
5593
5594  TeX tree.
5595  You must follow the directory structure of your existing 
5596 \begin_inset Flex CharStyle:Code
5597 status collapsed
5598
5599 \begin_layout Plain Layout
5600 texmf
5601 \end_layout
5602
5603 \end_inset
5604
5605  directory, which will be found at 
5606 \begin_inset Flex CharStyle:Code
5607 status collapsed
5608
5609 \begin_layout Plain Layout
5610 TEXMFMAIN
5611 \end_layout
5612
5613 \end_inset
5614
5615 .
5616  For example, latex packages should go under 
5617 \begin_inset Flex CharStyle:Code
5618 status collapsed
5619
5620 \begin_layout Plain Layout
5621 $TEXMFLOCAL/tex/latex/
5622 \end_layout
5623
5624 \end_inset
5625
5626 .
5627 \end_layout
5628
5629 \begin_layout Enumerate
5630 Install the package.
5631  For example, you would unpack the FoilTeX tarball and copy it to 
5632 \begin_inset Flex CharStyle:Code
5633 status collapsed
5634
5635 \begin_layout Plain Layout
5636 $TEXMFLOCAL/tex/latex/foiltex
5637 \end_layout
5638
5639 \end_inset
5640
5641 .
5642  The 
5643 \begin_inset Flex CharStyle:Code
5644 status collapsed
5645
5646 \begin_layout Plain Layout
5647 foiltex
5648 \end_layout
5649
5650 \end_inset
5651
5652  directory contains various files.
5653 \end_layout
5654
5655 \begin_layout Enumerate
5656 Run: 
5657 \begin_inset Flex CharStyle:Code
5658 status collapsed
5659
5660 \begin_layout Plain Layout
5661 texhash
5662 \end_layout
5663
5664 \end_inset
5665
5666 .
5667  This should create 
5668 \begin_inset Flex CharStyle:Code
5669 status collapsed
5670
5671 \begin_layout Plain Layout
5672 $TEXMFLOCAL/ls-R
5673 \end_layout
5674
5675 \end_inset
5676
5677  amongst others.
5678 \end_layout
5679
5680 \begin_layout Standard
5681 Your package is now installed and available to LaTeX.
5682  To make it available to LyX, you need to create a Layout file, if one is
5683  not already available.
5684  (See the next section.) Once you have a layout file, you need only reconfigure
5685  (
5686 \begin_inset Flex CharStyle:MenuItem
5687 status collapsed
5688
5689 \begin_layout Plain Layout
5690 Tools\SpecialChar \menuseparator
5691 Reconfigure
5692 \end_layout
5693
5694 \end_inset
5695
5696 ) and then restart LyX.
5697  You should then see your new package—for example 
5698 \begin_inset Flex CharStyle:MenuItem
5699 status collapsed
5700
5701 \begin_layout Plain Layout
5702 slides (FoilTeX)
5703 \end_layout
5704
5705 \end_inset
5706
5707 —under 
5708 \begin_inset Flex CharStyle:MenuItem
5709 status collapsed
5710
5711 \begin_layout Plain Layout
5712 Document\SpecialChar \menuseparator
5713 Settings
5714 \end_layout
5715
5716 \end_inset
5717
5718  in the 
5719 \begin_inset Flex CharStyle:MenuItem
5720 status collapsed
5721
5722 \begin_layout Plain Layout
5723 Document Class
5724 \end_layout
5725
5726 \end_inset
5727
5728  drop box.
5729  
5730 \end_layout
5731
5732 \begin_layout Section
5733 Layouts
5734 \end_layout
5735
5736 \begin_layout Standard
5737 This section describes how to write and install your own LyX layout files
5738  and walks through the 
5739 \begin_inset Flex CharStyle:Code
5740 status collapsed
5741
5742 \begin_layout Plain Layout
5743 article
5744 \end_layout
5745
5746 \end_inset
5747
5748  text class format as an example.
5749  The 
5750 \begin_inset Flex CharStyle:Code
5751 status collapsed
5752
5753 \begin_layout Plain Layout
5754 .layout
5755 \end_layout
5756
5757 \end_inset
5758
5759  files describe what paragraph and character styles are available for a
5760  given document class and how LyX should display them.
5761  We try to provide a thorough description of the process here; however,
5762  there are so many different types of documents supported by LaTeX classes
5763  that we can't hope to cover every different possibility or problem you
5764  might encounter.
5765  (The LyX users' list is frequented by people with lots of experience with
5766  layout design who are willing to share what they've learned.)
5767 \end_layout
5768
5769 \begin_layout Standard
5770 As you prepare to write a new layout, it is extremely helpful to look at
5771  the example layouts distributed with LyX.
5772  If you use a nice LaTeX document class that might be of interest for others,
5773  too, and have a nice corresponding LyX layout, feel free to contribute
5774  the stuff to us, so we may put it into the distribution.
5775  There is also a 
5776 \begin_inset CommandInset href
5777 LatexCommand href
5778 name "section on the LyX wiki"
5779 target "http://wiki.lyx.org/Layouts/Layouts"
5780
5781 \end_inset
5782
5783  for this kind of material.
5784 \end_layout
5785
5786 \begin_layout Standard
5787 All the tags described in this chapter are case-insensitive; this means
5788  that 
5789 \begin_inset Flex CharStyle:Code
5790 status collapsed
5791
5792 \begin_layout Plain Layout
5793 Style
5794 \end_layout
5795
5796 \end_inset
5797
5798
5799 \begin_inset Flex CharStyle:Code
5800 status collapsed
5801
5802 \begin_layout Plain Layout
5803 style
5804 \end_layout
5805
5806 \end_inset
5807
5808  and 
5809 \begin_inset Flex CharStyle:Code
5810 status collapsed
5811
5812 \begin_layout Plain Layout
5813 StYlE
5814 \end_layout
5815
5816 \end_inset
5817
5818  are really the same command.
5819  The possible values are printed in brackets after the feature's name.
5820  The default value if a feature isn't specified inside a text class-description
5821  is typeset 
5822 \begin_inset Flex CharStyle:Code
5823 status collapsed
5824
5825 \begin_layout Plain Layout
5826
5827 \emph on
5828 emphasized
5829 \end_layout
5830
5831 \end_inset
5832
5833 .
5834  If the argument has a data type like 
5835 \begin_inset Quotes eld
5836 \end_inset
5837
5838 string
5839 \begin_inset Quotes erd
5840 \end_inset
5841
5842  or 
5843 \begin_inset Quotes eld
5844 \end_inset
5845
5846 float
5847 \begin_inset Quotes erd
5848 \end_inset
5849
5850 , the default is shown like this: 
5851 \begin_inset Flex CharStyle:Code
5852 status collapsed
5853
5854 \begin_layout Plain Layout
5855 float=
5856 \emph on
5857 default
5858 \end_layout
5859
5860 \end_inset
5861
5862 .
5863 \end_layout
5864
5865 \begin_layout Subsection
5866 Layout modules
5867 \begin_inset CommandInset label
5868 LatexCommand label
5869 name "sub:Layout-modules"
5870
5871 \end_inset
5872
5873
5874 \end_layout
5875
5876 \begin_layout Standard
5877 Similar to layout files, and new with LyX 1.6, are layout 
5878 \emph on
5879 modules
5880 \emph default
5881 .
5882  Modules are to LaTeX packages much as layouts are to LaTeX classes, and
5883  some modules—such as the endnotes module—provide support for just such
5884  a package.
5885  In a sense, layout modules are similar to included files—files like 
5886 \begin_inset Flex CharStyle:Code
5887 status collapsed
5888
5889 \begin_layout Plain Layout
5890 stdsections.inc
5891 \end_layout
5892
5893 \end_inset
5894
5895 —in that modules are not specific to a given document layout but may be
5896  used with many different layouts.
5897  The difference is that using a layout module does not require editing the
5898  layout file.
5899  Rather, modules are selected in the 
5900 \begin_inset Flex CharStyle:MenuItem
5901 status collapsed
5902
5903 \begin_layout Plain Layout
5904 Document\SpecialChar \menuseparator
5905 Settings
5906 \end_layout
5907
5908 \end_inset
5909
5910  dialog.
5911 \end_layout
5912
5913 \begin_layout Standard
5914 Building modules is the easiest way to get started with layout editing,
5915  since it can be as simple as adding a single new paragraph or flex inset.
5916  But modules may, in principle, contain anything a layout file can contain.
5917 \end_layout
5918
5919 \begin_layout Standard
5920 A module must begin with a line like the following:
5921 \end_layout
5922
5923 \begin_layout LyX-Code
5924 #
5925 \backslash
5926 DeclareLyXModule[endnotes.sty]{Endnotes} 
5927 \end_layout
5928
5929 \begin_layout Standard
5930 The mandatory argument, in curly brackets, is the name of the module, as
5931  it should appear in 
5932 \begin_inset Flex CharStyle:MenuItem
5933 status collapsed
5934
5935 \begin_layout Plain Layout
5936 Document\SpecialChar \menuseparator
5937 Settings
5938 \end_layout
5939
5940 \end_inset
5941
5942 .
5943  The argument in square brackets is optional: It declares any LaTeX packages
5944  on which the module depends.
5945  Please note that only packages about which LyX knows should be listed in
5946  the square brackets.
5947 \begin_inset Foot
5948 status collapsed
5949
5950 \begin_layout Plain Layout
5951 The list of such packages is documented only in the source code.
5952 \end_layout
5953
5954 \end_inset
5955
5956  LyX will not check for arbitrary packages.
5957  It is also possible to use the form 
5958 \begin_inset Flex CharStyle:MenuItem
5959 status collapsed
5960
5961 \begin_layout Plain Layout
5962 from->to
5963 \end_layout
5964
5965 \end_inset
5966
5967 , which declares that the module can only be used when there exists a conversion
5968  chain between formats `from' and `to'.
5969 \end_layout
5970
5971 \begin_layout Standard
5972 The module declaration should then be followed by lines like the following:
5973 \end_layout
5974
5975 \begin_layout LyX-Code
5976 #DescriptionBegin 
5977 \end_layout
5978
5979 \begin_layout LyX-Code
5980 #Adds an endnote command, in addition to footnotes.
5981  
5982 \end_layout
5983
5984 \begin_layout LyX-Code
5985 #You will need to add  
5986 \backslash
5987 theendnotes in TeX code where you 
5988 \end_layout
5989
5990 \begin_layout LyX-Code
5991 #want the endnotes to appear.
5992  
5993 \end_layout
5994
5995 \begin_layout LyX-Code
5996 #DescriptionEnd 
5997 \end_layout
5998
5999 \begin_layout LyX-Code
6000 #Requires: somemodule | othermodule
6001 \end_layout
6002
6003 \begin_layout LyX-Code
6004 #Excludes: badmodule
6005 \end_layout
6006
6007 \begin_layout Standard
6008 The description is used in 
6009 \begin_inset Flex CharStyle:MenuItem
6010 status collapsed
6011
6012 \begin_layout Plain Layout
6013 Document\SpecialChar \menuseparator
6014 Settings
6015 \end_layout
6016
6017 \end_inset
6018
6019  to provide the user with information about what the module does.
6020  The 
6021 \begin_inset Flex CharStyle:Code
6022 status collapsed
6023
6024 \begin_layout Plain Layout
6025 Requires
6026 \end_layout
6027
6028 \end_inset
6029
6030  line is used to identify other modules with which this one must be used;
6031  the 
6032 \begin_inset Flex CharStyle:Code
6033 status collapsed
6034
6035 \begin_layout Plain Layout
6036 Excludes
6037 \end_layout
6038
6039 \end_inset
6040
6041  line is used to identify modules with which this one may not be used.
6042  Both are optional, and, as shown, multiple modules should be separated
6043  with the pipe symbol: |.
6044  Note that the required modules are treated disjunctively: 
6045 \emph on
6046 at least one
6047 \emph default
6048  of the required modules must be used.
6049  Similarly, 
6050 \emph on
6051 no
6052 \emph default
6053  excluded module may be used.
6054  Note that modules are identified here by their 
6055 \emph on
6056 filenames
6057 \emph default
6058  without the .module extension.
6059  So 
6060 \begin_inset Flex CharStyle:Code
6061 status collapsed
6062
6063 \begin_layout Plain Layout
6064 somemodule
6065 \end_layout
6066
6067 \end_inset
6068
6069  is really 
6070 \begin_inset Flex CharStyle:Code
6071 status collapsed
6072
6073 \begin_layout Plain Layout
6074 somemodule.module
6075 \end_layout
6076
6077 \end_inset
6078
6079 .
6080 \end_layout
6081
6082 \begin_layout Standard
6083 After creating a new module, you will need to reconfigure and then restart
6084  LyX for the module to appear in the menu.
6085  However, changes you make to the module will be seen immediately, if you
6086  open 
6087 \begin_inset Flex CharStyle:MenuItem
6088 status collapsed
6089
6090 \begin_layout Plain Layout
6091 Document\SpecialChar \menuseparator
6092 Settings
6093 \end_layout
6094
6095 \end_inset
6096
6097 , highlight something, and then hit 
6098 \begin_inset Quotes eld
6099 \end_inset
6100
6101 OK
6102 \begin_inset Quotes erd
6103 \end_inset
6104
6105 .
6106  
6107 \emph on
6108 It is strongly recommended that you save your work before doing so
6109 \emph default
6110 .
6111  In fact, 
6112 \emph on
6113 it is strongly recommended that you not attempt to edit modules while simultaneo
6114 usly working on documents
6115 \emph default
6116 .
6117  Though of course the developers strive to keep LyX stable in such situations,
6118  syntax errors and the like in your module file could cause strange behavior.
6119 \end_layout
6120
6121 \begin_layout Subsection
6122 Supporting new document classes
6123 \end_layout
6124
6125 \begin_layout Standard
6126 There are two situations you are likely to encounter when wanting to support
6127  a new LaTeX document class, involving LaTeX2e class (
6128 \begin_inset Flex CharStyle:Code
6129 status collapsed
6130
6131 \begin_layout Plain Layout
6132 .cls
6133 \end_layout
6134
6135 \end_inset
6136
6137 ) and style (
6138 \begin_inset Flex CharStyle:Code
6139 status collapsed
6140
6141 \begin_layout Plain Layout
6142 .sty
6143 \end_layout
6144
6145 \end_inset
6146
6147 ) files.
6148  Supporting a style file is usually fairly easy.
6149  Supporting a new document class is a bit harder.
6150 \end_layout
6151
6152 \begin_layout Subsection
6153 A layout for a 
6154 \begin_inset Flex CharStyle:MenuItem
6155 status collapsed
6156
6157 \begin_layout Plain Layout
6158 sty
6159 \end_layout
6160
6161 \end_inset
6162
6163  file
6164 \end_layout
6165
6166 \begin_layout Standard
6167 If your new document class is provided as a style file that is used in conjuncti
6168 on with an existing, supported document class—for the sake of the example,
6169  we'll assume that the style file is called 
6170 \begin_inset Flex CharStyle:MenuItem
6171 status collapsed
6172
6173 \begin_layout Plain Layout
6174 myclass.sty
6175 \end_layout
6176
6177 \end_inset
6178
6179  and it is meant to be used with 
6180 \begin_inset Flex CharStyle:MenuItem
6181 status collapsed
6182
6183 \begin_layout Plain Layout
6184 report.cls
6185 \end_layout
6186
6187 \end_inset
6188
6189 , which is a standard class—start by copying the existing class's layout
6190  file into your local directory:
6191 \end_layout
6192
6193 \begin_layout LyX-Code
6194 cp report.layout ~/.lyx/layouts/myclass.layout
6195 \end_layout
6196
6197 \begin_layout Standard
6198 Then edit 
6199 \begin_inset Flex CharStyle:Code
6200 status collapsed
6201
6202 \begin_layout Plain Layout
6203 myclass.layout
6204 \end_layout
6205
6206 \end_inset
6207
6208  and change the line: 
6209 \end_layout
6210
6211 \begin_layout LyX-Code
6212
6213 \backslash
6214 DeclareLaTeXClass{report}
6215 \end_layout
6216
6217 \begin_layout Standard
6218 to read
6219 \end_layout
6220
6221 \begin_layout LyX-Code
6222
6223 \backslash
6224 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
6225 \end_layout
6226
6227 \begin_layout Standard
6228 Then add:
6229 \end_layout
6230
6231 \begin_layout LyX-Code
6232 Preamble 
6233 \begin_inset Newline newline
6234 \end_inset
6235
6236     
6237 \backslash
6238 usepackage{myclass}
6239 \begin_inset Newline newline
6240 \end_inset
6241
6242 EndPreamble
6243 \end_layout
6244
6245 \begin_layout Standard
6246 near the top of the file.
6247 \end_layout
6248
6249 \begin_layout Standard
6250 Start LyX and select 
6251 \begin_inset Flex CharStyle:MenuItem
6252 status collapsed
6253
6254 \begin_layout Plain Layout
6255 Tools\SpecialChar \menuseparator
6256 Reconfigure
6257 \end_layout
6258
6259 \end_inset
6260
6261 .
6262  Then restart LyX and try creating a new document.
6263  You should see "
6264 \begin_inset Flex CharStyle:MenuItem
6265 status collapsed
6266
6267 \begin_layout Plain Layout
6268 report (myclass)
6269 \end_layout
6270
6271 \end_inset
6272
6273 " as a document class option in the 
6274 \begin_inset Flex CharStyle:MenuItem
6275 status collapsed
6276
6277 \begin_layout Plain Layout
6278 Document\SpecialChar \menuseparator
6279 Settings
6280 \end_layout
6281
6282 \end_inset
6283
6284  dialog.
6285  It is likely that some of the sectioning commands and such in your new
6286  class will work differently from how they worked in the base class—
6287 \begin_inset Flex CharStyle:Code
6288 status collapsed
6289
6290 \begin_layout Plain Layout
6291 report
6292 \end_layout
6293
6294 \end_inset
6295
6296  in this example—so you can fiddle around with the settings for the different
6297  sections if you wish.
6298 \end_layout
6299
6300 \begin_layout Subsection
6301 Layout for a 
6302 \begin_inset Flex CharStyle:MenuItem
6303 status collapsed
6304
6305 \begin_layout Plain Layout
6306 cls
6307 \end_layout
6308
6309 \end_inset
6310
6311  file
6312 \end_layout
6313
6314 \begin_layout Standard
6315 There are two possibilities here.
6316  One is that the class file is itself based upon an existing document class.
6317  For example, many thesis classes are based upon 
6318 \begin_inset Flex CharStyle:MenuItem
6319 status collapsed
6320
6321 \begin_layout Plain Layout
6322 book.cls
6323 \end_layout
6324
6325 \end_inset
6326
6327 .
6328  To see whether yours is, look for a line like
6329 \end_layout
6330
6331 \begin_layout LyX-Code
6332
6333 \backslash
6334 LoadClass{book}
6335 \end_layout
6336
6337 \begin_layout Standard
6338 in the file.
6339  If so, then you may proceed largely as in the previous section, though
6340  the DeclareLaTeXClass line will be different.
6341  If your new class is thesis, and it is based upon book, then the line should
6342  read:
6343 \begin_inset Foot
6344 status collapsed
6345
6346 \begin_layout Plain Layout
6347 And it will be easiest if you save the file to 
6348 \begin_inset Flex CharStyle:Code
6349 status collapsed
6350
6351 \begin_layout Plain Layout
6352 thesis.layout
6353 \end_layout
6354
6355 \end_inset
6356
6357 : LyX assumes that the document class has the same name as the layout file.
6358  
6359 \end_layout
6360
6361 \end_inset
6362
6363
6364 \end_layout
6365
6366 \begin_layout LyX-Code
6367
6368 \backslash
6369 DeclareLaTeXClass[thesis,book]{thesis}
6370 \end_layout
6371
6372 \begin_layout Standard
6373 If, on the other hand, the new class is not based upon an existing class,
6374  you will probably have to 
6375 \begin_inset Quotes eld
6376 \end_inset
6377
6378 roll your own
6379 \begin_inset Quotes erd
6380 \end_inset
6381
6382  layout.
6383  We strongly suggest copying an existing layout file which uses a similar
6384  LaTeX class and then modifying it, if you can do so.
6385  At least use an existing file as a starting point so you can find out what
6386  items you need to worry about.
6387  Again, the specifics are covered below.
6388 \end_layout
6389
6390 \begin_layout Section
6391 Declaring a new text class
6392 \end_layout
6393
6394 \begin_layout Standard
6395 When it's finally time to get your hands dirty and create or edit your own
6396  layout file, the following sections describe what you're up against.
6397  Our advice is to go slowly, save and test often, listen to soothing music,
6398  and enjoy one or two of your favorite adult beverages; more if you are
6399  getting particularly stuck.
6400  It's really not that hard, except that the multitude of options can become
6401  overwhelming if you try to do to much in one sitting.
6402  Go have another adult beverage, just for good measure.
6403 \end_layout
6404
6405 \begin_layout Standard
6406 Here we go!
6407 \end_layout
6408
6409 \begin_layout Standard
6410 Lines in a layout file which begin with a 
6411 \begin_inset Flex CharStyle:Code
6412 status collapsed
6413
6414 \begin_layout Plain Layout
6415 #
6416 \end_layout
6417
6418 \end_inset
6419
6420  are comments.
6421  There is one exception to this rule: all layouts should begin with lines
6422  like:
6423 \end_layout
6424
6425 \begin_layout LyX-Code
6426
6427 \size small
6428 #% Do not delete the line below; configure depends on this 
6429 \end_layout
6430
6431 \begin_layout LyX-Code
6432
6433 \size small
6434 #  
6435 \backslash
6436 DeclareLaTeXClass{article}
6437 \end_layout
6438
6439 \begin_layout Standard
6440 The second line is used when you configure LyX.
6441  The layout file is read by the LaTeX script 
6442 \begin_inset Flex CharStyle:Code
6443 status collapsed
6444
6445 \begin_layout Plain Layout
6446 chkconfig.ltx
6447 \end_layout
6448
6449 \end_inset
6450
6451 , in a special mode where 
6452 \begin_inset Flex CharStyle:Code
6453 status collapsed
6454
6455 \begin_layout Plain Layout
6456 #
6457 \end_layout
6458
6459 \end_inset
6460
6461  is ignored.
6462  The first line is just a LaTeX comment, and the second one contains the
6463  declaration of the text class.
6464  If these lines appear in a file named 
6465 \begin_inset Flex CharStyle:Code
6466 status collapsed
6467
6468 \begin_layout Plain Layout
6469 article.layout
6470 \end_layout
6471
6472 \end_inset
6473
6474 , then they define a text class of name 
6475 \begin_inset Flex CharStyle:Code
6476 status collapsed
6477
6478 \begin_layout Plain Layout
6479 article
6480 \end_layout
6481
6482 \end_inset
6483
6484  (the name of the layout file) which uses the LaTeX document class 
6485 \begin_inset Flex CharStyle:Code
6486 status collapsed
6487
6488 \begin_layout Plain Layout
6489 article.cls
6490 \end_layout
6491
6492 \end_inset
6493
6494  (the default is to use the same name as the layout).
6495  The string 
6496 \begin_inset Quotes eld
6497 \end_inset
6498
6499 article
6500 \begin_inset Quotes erd
6501 \end_inset
6502
6503  that appears above is used as a description of the text class in the 
6504 \begin_inset Flex CharStyle:MenuItem
6505 status collapsed
6506
6507 \begin_layout Plain Layout
6508 Document\SpecialChar \menuseparator
6509 Settings
6510 \end_layout
6511
6512 \end_inset
6513
6514  dialog.
6515 \end_layout
6516
6517 \begin_layout Standard
6518 Let's assume that you wrote your own text class that uses the 
6519 \begin_inset Flex CharStyle:Code
6520 status collapsed
6521
6522 \begin_layout Plain Layout
6523 article.cls
6524 \end_layout
6525
6526 \end_inset
6527
6528  document class, but where you changed the appearance of the section headings.
6529  If you put it in a file 
6530 \begin_inset Flex CharStyle:Code
6531 status collapsed
6532
6533 \begin_layout Plain Layout
6534 myarticle.layout
6535 \end_layout
6536
6537 \end_inset
6538
6539 , the header of this file should be:
6540 \end_layout
6541
6542 \begin_layout LyX-Code
6543
6544 \size small
6545 #% Do not delete the line below; configure depends on this 
6546 \end_layout
6547
6548 \begin_layout LyX-Code
6549
6550 \size small
6551 #  
6552 \backslash
6553 DeclareLaTeXClass[article]{article (with my own headings)}
6554 \end_layout
6555
6556 \begin_layout Standard
6557 This declares a text class 
6558 \begin_inset Flex CharStyle:Code
6559 status collapsed
6560
6561 \begin_layout Plain Layout
6562 myarticle
6563 \end_layout
6564
6565 \end_inset
6566
6567 , associated with the LaTeX document class 
6568 \begin_inset Flex CharStyle:Code
6569 status collapsed
6570
6571 \begin_layout Plain Layout
6572 article.cls
6573 \end_layout
6574
6575 \end_inset
6576
6577  and described as 
6578 \begin_inset Quotes eld
6579 \end_inset
6580
6581 article (with my own headings)
6582 \begin_inset Quotes erd
6583 \end_inset
6584
6585 .
6586  If your text class depends on several packages, you can declare it as:
6587 \end_layout
6588
6589 \begin_layout LyX-Code
6590
6591 \size small
6592 #% Do not delete the line below; configure depends on this 
6593 \end_layout
6594
6595 \begin_layout LyX-Code
6596
6597 \size small
6598 #  
6599 \backslash
6600 DeclareLaTeXClass[article,foo.sty]{article (with my own headings)}
6601 \end_layout
6602
6603 \begin_layout Standard
6604 This indicates that your text class uses the foo.sty package.
6605  Finally, it is also possible to declare classes for DocBook code.
6606  Typical declarations will look like
6607 \end_layout
6608
6609 \begin_layout LyX-Code
6610
6611 \size small
6612 #% Do not delete the line below; configure depends on this 
6613 \end_layout
6614
6615 \begin_layout LyX-Code
6616
6617 \size small
6618
6619 \backslash
6620 DeclareDocBookClass[article]{SGML (DocBook article)}
6621 \end_layout
6622
6623 \begin_layout Standard
6624 Note that these declarations can also be given an optional parameter declaring
6625  the name of the document class (but not a list).
6626 \end_layout
6627
6628 \begin_layout Standard
6629 So, to be as explicit as possible, the form of the layout declaration is:
6630 \end_layout
6631
6632 \begin_layout LyX-Code
6633
6634 \size small
6635 #  
6636 \backslash
6637 DeclareLaTeXClass[class,package.sty]{layout description}
6638 \end_layout
6639
6640 \begin_layout Standard
6641 The class need only be specified if the name of the LaTeX class file and
6642  the name of the layout file are different; if the name of the class file
6643  is not specified, then LyX will simply assume that it is the same as the
6644  name of the layout file.
6645 \end_layout
6646
6647 \begin_layout Standard
6648 When the text class has been modified to your taste, all you have to do
6649  is to copy it either to 
6650 \begin_inset Flex CharStyle:Code
6651 status collapsed
6652
6653 \begin_layout Plain Layout
6654 LyXDir/layouts/
6655 \end_layout
6656
6657 \end_inset
6658
6659  or to 
6660 \begin_inset Flex CharStyle:Code
6661 status collapsed
6662
6663 \begin_layout Plain Layout
6664 UserDir/layouts
6665 \end_layout
6666
6667 \end_inset
6668
6669 , run 
6670 \begin_inset Flex CharStyle:MenuItem
6671 status collapsed
6672
6673 \begin_layout Plain Layout
6674 Tools\SpecialChar \menuseparator
6675 Reconfigure
6676 \end_layout
6677
6678 \end_inset
6679
6680 , exit LyX and restart it.
6681  Then your new text class should be available along with the others.
6682 \end_layout
6683
6684 \begin_layout Standard
6685 In versions of LyX prior to 1.6, you had to restart LyX to see any changes
6686  you made to your layout files.
6687  As a result, editing layout files could be very time consuming.
6688  Beginning with 1.6, however, you can force a reload of the layout currently
6689  in use by using the LyX function 
6690 \begin_inset Flex CharStyle:MenuItem
6691 status collapsed
6692
6693 \begin_layout Plain Layout
6694 layout-reload
6695 \end_layout
6696
6697 \end_inset
6698
6699 .
6700  There is no default binding for this function—though, of course, you can
6701  bind it to a key yourself.
6702  If you want to use this function, then, you should simply enter it in the
6703  mini-buffer.
6704  
6705 \emph on
6706 Warning
6707 \emph default
6708 : This is very much an `advanced feature'.
6709  It is 
6710 \emph on
6711 strongly
6712 \emph default
6713  recommended that you save your work before using this function.
6714  In fact, it is 
6715 \emph on
6716 strongly
6717 \emph default
6718  recommended that you not attempt to edit your layout while simultaneously
6719  working on a document that you care about.
6720  Use a test document.
6721  Syntax errors and the like in your layout file could cause peculiar behavior.
6722  In particular, such errors could cause LyX to regard the current layout
6723  as invalid and to attempt to switch to some other layout.
6724  The LyX team strives to keep LyX stable in such situations, but safe is
6725  better than sorry.
6726 \end_layout
6727
6728 \begin_layout Subsection
6729 File format
6730 \end_layout
6731
6732 \begin_layout Standard
6733 The first non-comment line must contain the file format number:
6734 \end_layout
6735
6736 \begin_layout Description
6737 \begin_inset Flex CharStyle:Code
6738 status collapsed
6739
6740 \begin_layout Plain Layout
6741 Format
6742 \end_layout
6743
6744 \end_inset
6745
6746  [
6747 \begin_inset Flex CharStyle:Code
6748 status collapsed
6749
6750 \begin_layout Plain Layout
6751 int
6752 \end_layout
6753
6754 \end_inset
6755
6756 ] This tag was introduced with LyX 1.4.0 (layout files of LyX 1.3.x and earlier
6757  don't have an explicit file format).
6758  The file format that is documented here is format 14.
6759 \end_layout
6760
6761 \begin_layout Subsection
6762 General text class parameters
6763 \end_layout
6764
6765 \begin_layout Standard
6766 These are the general parameters which describe the form of the entire document:
6767 \end_layout
6768
6769 \begin_layout Description
6770 \begin_inset Flex CharStyle:Code
6771 status collapsed
6772
6773 \begin_layout Plain Layout
6774 AddToPreamble
6775 \end_layout
6776
6777 \end_inset
6778
6779  Adds information to the document preamble.
6780  Must end with 
6781 \begin_inset Quotes eld
6782 \end_inset
6783
6784
6785 \begin_inset Flex CharStyle:Code
6786 status collapsed
6787
6788 \begin_layout Plain Layout
6789 EndPreamble
6790 \end_layout
6791
6792 \end_inset
6793
6794
6795 \begin_inset Quotes erd
6796 \end_inset
6797
6798 .
6799 \end_layout
6800
6801 \begin_layout Description
6802 \begin_inset Flex CharStyle:Code
6803 status collapsed
6804
6805 \begin_layout Plain Layout
6806 ClassOptions
6807 \end_layout
6808
6809 \end_inset
6810
6811  Describes various global options supported by the document class.
6812  See Section
6813 \begin_inset space ~
6814 \end_inset
6815
6816
6817 \begin_inset CommandInset ref
6818 LatexCommand ref
6819 reference "sub:ClassOptions"
6820
6821 \end_inset
6822
6823  for a description.
6824  Must end with 
6825 \begin_inset Quotes eld
6826 \end_inset
6827
6828
6829 \begin_inset Flex CharStyle:Code
6830 status collapsed
6831
6832 \begin_layout Plain Layout
6833 End
6834 \end_layout
6835
6836 \end_inset
6837
6838
6839 \begin_inset Quotes erd
6840 \end_inset
6841
6842 .
6843 \end_layout
6844
6845 \begin_layout Description
6846 \begin_inset Flex CharStyle:Code
6847 status collapsed
6848
6849 \begin_layout Plain Layout
6850 Columns
6851 \end_layout
6852
6853 \end_inset
6854
6855  [
6856 \begin_inset Flex CharStyle:Code
6857 status collapsed
6858
6859 \begin_layout Plain Layout
6860
6861 \emph on
6862 1
6863 \end_layout
6864
6865 \end_inset
6866
6867
6868 \begin_inset Flex CharStyle:Code
6869 status collapsed
6870
6871 \begin_layout Plain Layout
6872 2
6873 \end_layout
6874
6875 \end_inset
6876
6877 ] Whether the class should default to having one or two columns.
6878  Can be changed in the 
6879 \begin_inset Flex CharStyle:MenuItem
6880 status collapsed
6881
6882 \begin_layout Plain Layout
6883 Document\SpecialChar \menuseparator
6884 Settings
6885 \end_layout
6886
6887 \end_inset
6888
6889  dialog.
6890 \end_layout
6891
6892 \begin_layout Description
6893 \begin_inset Flex CharStyle:Code
6894 status collapsed
6895
6896 \begin_layout Plain Layout
6897 Counter
6898 \end_layout
6899
6900 \end_inset
6901
6902  [
6903 \begin_inset Flex CharStyle:Code
6904 status collapsed
6905
6906 \begin_layout Plain Layout
6907 string
6908 \end_layout
6909
6910 \end_inset
6911
6912 ] This sequence defines the properties for a counter.
6913  If the counter does not yet exist, it is created; if it does exist, it
6914  is modified.
6915  Must end with 
6916 \begin_inset Quotes eld
6917 \end_inset
6918
6919
6920 \begin_inset Flex CharStyle:Code
6921 status collapsed
6922
6923 \begin_layout Plain Layout
6924 End
6925 \end_layout
6926
6927 \end_inset
6928
6929
6930 \begin_inset Quotes erd
6931 \end_inset
6932
6933 .
6934 \begin_inset Newline newline
6935 \end_inset
6936
6937 See Section
6938 \begin_inset space ~
6939 \end_inset
6940
6941
6942 \begin_inset CommandInset ref
6943 LatexCommand ref
6944 reference "sub:Counters"
6945
6946 \end_inset
6947
6948  for details on counters.
6949 \end_layout
6950
6951 \begin_layout Description
6952 \begin_inset Flex CharStyle:Code
6953 status collapsed
6954
6955 \begin_layout Plain Layout
6956 DefaultFont
6957 \end_layout
6958
6959 \end_inset
6960
6961  Sets the default font used to display the document.
6962  See Section
6963 \begin_inset space ~
6964 \end_inset
6965
6966
6967 \begin_inset CommandInset ref
6968 LatexCommand ref
6969 reference "sub:Font-description"
6970
6971 \end_inset
6972
6973  for how to declare fonts.
6974  Must end with 
6975 \begin_inset Quotes eld
6976 \end_inset
6977
6978
6979 \begin_inset Flex CharStyle:Code
6980 status collapsed
6981
6982 \begin_layout Plain Layout
6983 EndFont
6984 \end_layout
6985
6986 \end_inset
6987
6988
6989 \begin_inset Quotes erd
6990 \end_inset
6991
6992 .
6993 \end_layout
6994
6995 \begin_layout Description
6996 \begin_inset Flex CharStyle:Code
6997 status collapsed
6998
6999 \begin_layout Plain Layout
7000 DefaultModule
7001 \end_layout
7002
7003 \end_inset
7004
7005  [
7006 \begin_inset Flex CharStyle:Code
7007 status collapsed
7008
7009 \begin_layout Plain Layout
7010 string]
7011 \end_layout
7012
7013 \end_inset
7014
7015  Specifies a module to be included by default with this document class,
7016  which should be specified by filename without the 
7017 \begin_inset Flex CharStyle:Code
7018 status collapsed
7019
7020 \begin_layout Plain Layout
7021 .module
7022 \end_layout
7023
7024 \end_inset
7025
7026  extension.
7027  The user can still remove the module, but it will be active at the outset.
7028  (This applies only when new files are created, or when this class is chosen
7029  for an existing document.)
7030 \end_layout
7031
7032 \begin_layout Description
7033 \begin_inset Flex CharStyle:Code
7034 status collapsed
7035
7036 \begin_layout Plain Layout
7037 DefaultStyle
7038 \end_layout
7039
7040 \end_inset
7041
7042  [
7043 \begin_inset Flex CharStyle:Code
7044 status collapsed
7045
7046 \begin_layout Plain Layout
7047 string
7048 \end_layout
7049
7050 \end_inset
7051
7052 ] This is the style that will be assigned to new paragraphs, usually 
7053 \begin_inset Flex CharStyle:MenuItem
7054 status collapsed
7055
7056 \begin_layout Plain Layout
7057 Standard
7058 \end_layout
7059
7060 \end_inset
7061
7062 .
7063  This will default to the first defined style if not given, but you are
7064  highly encouraged to use this directive.
7065 \end_layout
7066
7067 \begin_layout Description
7068 \begin_inset Flex CharStyle:Code
7069 status collapsed
7070
7071 \begin_layout Plain Layout
7072 ExcludesModule
7073 \end_layout
7074
7075 \end_inset
7076
7077  [
7078 \begin_inset Flex CharStyle:Code
7079 status collapsed
7080
7081 \begin_layout Plain Layout
7082 string
7083 \end_layout
7084
7085 \end_inset
7086
7087 ] Indicates that the module in question—which should be specified by filename
7088  without the 
7089 \begin_inset Flex CharStyle:Code
7090 status collapsed
7091
7092 \begin_layout Plain Layout
7093 .module
7094 \end_layout
7095
7096 \end_inset
7097
7098  extension—cannot be used with this document class.
7099  This might be used in a journal-specific layout file to prevent, say, the
7100  use of the 
7101 \begin_inset Flex CharStyle:Code
7102 status collapsed
7103
7104 \begin_layout Plain Layout
7105 theorems-sec
7106 \end_layout
7107
7108 \end_inset
7109
7110  module that numbers theorems by section.
7111  This tag may 
7112 \emph on
7113 not
7114 \emph default
7115  be used in a module.
7116  Modules have their own way of excluding other modules (see 
7117 \begin_inset CommandInset ref
7118 LatexCommand ref
7119 reference "sub:Layout-modules"
7120
7121 \end_inset
7122
7123 ).
7124 \end_layout
7125
7126 \begin_layout Description
7127 \begin_inset Flex CharStyle:Code
7128 status collapsed
7129
7130 \begin_layout Plain Layout
7131 Float
7132 \end_layout
7133
7134 \end_inset
7135
7136  Defines a new float.
7137  See Section
7138 \begin_inset space ~
7139 \end_inset
7140
7141
7142 \begin_inset CommandInset ref
7143 LatexCommand ref
7144 reference "sub:Floats"
7145
7146 \end_inset
7147
7148  for details.
7149  Must end with 
7150 \begin_inset Quotes eld
7151 \end_inset
7152
7153
7154 \begin_inset Flex CharStyle:Code
7155 status collapsed
7156
7157 \begin_layout Plain Layout
7158 End
7159 \end_layout
7160
7161 \end_inset
7162
7163
7164 \begin_inset Quotes erd
7165 \end_inset
7166
7167 .
7168 \end_layout
7169
7170 \begin_layout Description
7171 \begin_inset Flex CharStyle:Code
7172 status collapsed
7173
7174 \begin_layout Plain Layout
7175 IfCounter
7176 \end_layout
7177
7178 \end_inset
7179
7180  [
7181 \begin_inset Flex CharStyle:Code
7182 status collapsed
7183
7184 \begin_layout Plain Layout
7185 string
7186 \end_layout
7187
7188 \end_inset
7189
7190 ] Modifies the properties of the given counter.
7191  If the counter does not exist, the section is ignored.
7192  Must end with 
7193 \begin_inset Quotes eld
7194 \end_inset
7195
7196
7197 \begin_inset Flex CharStyle:Code
7198 status collapsed
7199
7200 \begin_layout Plain Layout
7201 End
7202 \end_layout
7203
7204 \end_inset
7205
7206
7207 \begin_inset Quotes erd
7208 \end_inset
7209
7210 .
7211 \end_layout
7212
7213 \begin_layout Description
7214 \begin_inset Flex CharStyle:Code
7215 status collapsed
7216
7217 \begin_layout Plain Layout
7218 IfStyle
7219 \end_layout
7220
7221 \end_inset
7222
7223  [
7224 \begin_inset Flex CharStyle:Code
7225 status collapsed
7226
7227 \begin_layout Plain Layout
7228 string
7229 \end_layout
7230
7231 \end_inset
7232
7233 ] Modifies the properties of the given paragraph style.
7234  If the style does not exist, the section is ignored.
7235  Must end with 
7236 \begin_inset Quotes eld
7237 \end_inset
7238
7239
7240 \begin_inset Flex CharStyle:Code
7241 status collapsed
7242
7243 \begin_layout Plain Layout
7244 End
7245 \end_layout
7246
7247 \end_inset
7248
7249
7250 \begin_inset Quotes erd
7251 \end_inset
7252
7253 .
7254 \end_layout
7255
7256 \begin_layout Description
7257 \begin_inset Flex CharStyle:Code
7258 status collapsed
7259
7260 \begin_layout Plain Layout
7261 Input
7262 \end_layout
7263
7264 \end_inset
7265
7266  As its name implies, this command allows you to include another layout
7267  definition file within yours to avoid duplicating commands.
7268  Common examples are the standard layout files, for example, 
7269 \begin_inset Flex CharStyle:Code
7270 status collapsed
7271
7272 \begin_layout Plain Layout
7273 stdclass.inc
7274 \end_layout
7275
7276 \end_inset
7277
7278 , which contains most of the basic layouts.
7279 \end_layout
7280
7281 \begin_layout Description
7282 \begin_inset Flex CharStyle:Code
7283 status collapsed
7284
7285 \begin_layout Plain Layout
7286 InsetLayout
7287 \end_layout
7288
7289 \end_inset
7290
7291  This section (re-)defines the layout of an inset.
7292  It can be applied to an existing inset of to a new, user-defined inset,
7293  e.
7294 \begin_inset space \thinspace{}
7295 \end_inset
7296
7297 g.
7298 \begin_inset space \space{}
7299 \end_inset
7300
7301 a new character style.
7302  See Section
7303 \begin_inset space ~
7304 \end_inset
7305
7306
7307 \begin_inset CommandInset ref
7308 LatexCommand ref
7309 reference "sub:Flex-insets-and"
7310
7311 \end_inset
7312
7313  for more information.
7314  Must end with 
7315 \begin_inset Quotes eld
7316 \end_inset
7317
7318
7319 \begin_inset Flex CharStyle:Code
7320 status collapsed
7321
7322 \begin_layout Plain Layout
7323 End
7324 \end_layout
7325
7326 \end_inset
7327
7328
7329 \begin_inset Quotes erd
7330 \end_inset
7331
7332 .
7333 \end_layout
7334
7335 \begin_layout Description
7336 \begin_inset Flex CharStyle:Code
7337 status collapsed
7338
7339 \begin_layout Plain Layout
7340 LeftMargin
7341 \end_layout
7342
7343 \end_inset
7344
7345  A string that indicates the width of the left margin on the screen, for
7346  example, 
7347 \begin_inset Quotes eld
7348 \end_inset
7349
7350 MMMMM
7351 \begin_inset Quotes erd
7352 \end_inset
7353
7354 .
7355 \end_layout
7356
7357 \begin_layout Description
7358 \begin_inset Flex CharStyle:Code
7359 status collapsed
7360
7361 \begin_layout Plain Layout
7362 NoFloat
7363 \end_layout
7364
7365 \end_inset
7366
7367  This command deletes an existing float.
7368  This is particularly useful when you want to suppress a float that has
7369  be defined in an input file.
7370 \end_layout
7371
7372 \begin_layout Description
7373 \begin_inset Flex CharStyle:Code
7374 status collapsed
7375
7376 \begin_layout Plain Layout
7377 NoStyle
7378 \end_layout
7379
7380 \end_inset
7381
7382  This command deletes an existing style.
7383  This is particularly useful when you want to suppress a style that has
7384  be defined in an input file.
7385 \end_layout
7386
7387 \begin_layout Description
7388 \begin_inset Flex CharStyle:Code
7389 status collapsed
7390
7391 \begin_layout Plain Layout
7392 OutputFormat
7393 \end_layout
7394
7395 \end_inset
7396
7397  A string indicating the file format (as defined in the Preferences dialog)
7398  produced by this class.
7399  It is mainly useful when 
7400 \begin_inset Flex CharStyle:Code
7401 status collapsed
7402
7403 \begin_layout Plain Layout
7404 OutputType
7405 \end_layout
7406
7407 \end_inset
7408
7409  is `literate' and one wants to define a new type of literate document.
7410  This string is reset to `docbook', `latex', or `literate' when the correspondin
7411
7412 \begin_inset Flex CharStyle:Code
7413 status collapsed
7414
7415 \begin_layout Plain Layout
7416 OutputType
7417 \end_layout
7418
7419 \end_inset
7420
7421  parameter is encountered.
7422 \end_layout
7423
7424 \begin_layout Description
7425 \begin_inset Flex CharStyle:Code
7426 status collapsed
7427
7428 \begin_layout Plain Layout
7429 OutputType
7430 \end_layout
7431
7432 \end_inset
7433
7434  A string indicating what sort of output documents using this class will
7435  produce.
7436  At present, the options are: `docbook', `latex', and `literate'.
7437 \end_layout
7438
7439 \begin_layout Description
7440 \begin_inset Flex CharStyle:Code
7441 status collapsed
7442
7443 \begin_layout Plain Layout
7444
7445 \series medium
7446 PageStyle
7447 \end_layout
7448
7449 \end_inset
7450
7451  [
7452 \emph on
7453
7454 \begin_inset Flex CharStyle:Code
7455 status collapsed
7456
7457 \begin_layout Plain Layout
7458
7459 \emph on
7460 plain
7461 \end_layout
7462
7463 \end_inset
7464
7465
7466 \emph default
7467
7468 \begin_inset Flex CharStyle:Code
7469 status collapsed
7470
7471 \begin_layout Plain Layout
7472 empty
7473 \end_layout
7474
7475 \end_inset
7476
7477
7478 \begin_inset Flex CharStyle:Code
7479 status collapsed
7480
7481 \begin_layout Plain Layout
7482 headings
7483 \end_layout
7484
7485 \end_inset
7486
7487 ] The class default pagestyle.
7488  Can be changed in the 
7489 \begin_inset Flex CharStyle:MenuItem
7490 status collapsed
7491
7492 \begin_layout Plain Layout
7493 Document\SpecialChar \menuseparator
7494 Settings
7495 \end_layout
7496
7497 \end_inset
7498
7499  dialog.
7500 \end_layout
7501
7502 \begin_layout Description
7503 \begin_inset Flex CharStyle:Code
7504 status collapsed
7505
7506 \begin_layout Plain Layout
7507 Preamble
7508 \end_layout
7509
7510 \end_inset
7511
7512  Sets the preamble for the LaTeX document.
7513  Note that this will completely override any prior 
7514 \begin_inset Flex CharStyle:Code
7515 status collapsed
7516
7517 \begin_layout Plain Layout
7518 Preamble
7519 \end_layout
7520
7521 \end_inset
7522
7523  or 
7524 \begin_inset Flex CharStyle:Code
7525 status collapsed
7526
7527 \begin_layout Plain Layout
7528 AddToPreamble
7529 \end_layout
7530
7531 \end_inset
7532
7533  declarations.
7534  Must end with 
7535 \begin_inset Quotes eld
7536 \end_inset
7537
7538
7539 \begin_inset Flex CharStyle:Code
7540 status collapsed
7541
7542 \begin_layout Plain Layout
7543 EndPreamble
7544 \end_layout
7545
7546 \end_inset
7547
7548
7549 \begin_inset Quotes erd
7550 \end_inset
7551
7552 .
7553 \end_layout
7554
7555 \begin_layout Description
7556 \begin_inset Flex CharStyle:Code
7557 status collapsed
7558
7559 \begin_layout Plain Layout
7560 Provides
7561 \end_layout
7562
7563 \end_inset
7564
7565  [
7566 \begin_inset Flex CharStyle:Code
7567 status collapsed
7568
7569 \begin_layout Plain Layout
7570 string
7571 \end_layout
7572
7573 \end_inset
7574
7575 ] [
7576 \begin_inset Flex CharStyle:Code
7577 status collapsed
7578
7579 \begin_layout Plain Layout
7580
7581 \emph on
7582 0
7583 \end_layout
7584
7585 \end_inset
7586
7587
7588 \begin_inset Flex CharStyle:Code
7589 status collapsed
7590
7591 \begin_layout Plain Layout
7592 1
7593 \end_layout
7594
7595 \end_inset
7596
7597 ] Whether the class already provides the feature 
7598 \begin_inset Flex CharStyle:Code
7599 status collapsed
7600
7601 \begin_layout Plain Layout
7602 string
7603 \end_layout
7604
7605 \end_inset
7606
7607 .
7608  A feature is in general the name of a package (
7609 \begin_inset Flex CharStyle:Code
7610 status collapsed
7611
7612 \begin_layout Plain Layout
7613 amsmath
7614 \end_layout
7615
7616 \end_inset
7617
7618
7619 \begin_inset Flex CharStyle:Code
7620 status collapsed
7621
7622 \begin_layout Plain Layout
7623 makeidx
7624 \end_layout
7625
7626 \end_inset
7627
7628 , \SpecialChar \ldots{}
7629 ) or a macro (
7630 \begin_inset Flex CharStyle:Code
7631 status collapsed
7632
7633 \begin_layout Plain Layout
7634 url
7635 \end_layout
7636
7637 \end_inset
7638
7639
7640 \begin_inset Flex CharStyle:Code
7641 status collapsed
7642
7643 \begin_layout Plain Layout
7644 boldsymbol
7645 \end_layout
7646
7647 \end_inset
7648
7649 ,\SpecialChar \ldots{}
7650 ); the complete list of supported features is unfortunately not documented
7651  outside the LyX source code—but see 
7652 \begin_inset Flex CharStyle:Code
7653 status collapsed
7654
7655 \begin_layout Plain Layout
7656 LaTeXFeatures.cpp
7657 \end_layout
7658
7659 \end_inset
7660
7661  if you're interested.
7662  
7663 \begin_inset Flex CharStyle:MenuItem
7664 status collapsed
7665
7666 \begin_layout Plain Layout
7667 Help\SpecialChar \menuseparator
7668 LaTeX Configuration
7669 \end_layout
7670
7671 \end_inset
7672
7673  also gives an overview of the supported packages.
7674 \end_layout
7675
7676 \begin_layout Description
7677 \begin_inset Flex CharStyle:Code
7678 status collapsed
7679
7680 \begin_layout Plain Layout
7681 ProvidesModule
7682 \end_layout
7683
7684 \end_inset
7685
7686  [
7687 \begin_inset Flex CharStyle:Code
7688 status collapsed
7689
7690 \begin_layout Plain Layout
7691 string
7692 \end_layout
7693
7694 \end_inset
7695
7696 ] Indicates that this layout provides the functionality of the module mentioned,
7697  which should be specified by the filename without the 
7698 \begin_inset Flex CharStyle:Code
7699 status collapsed
7700
7701 \begin_layout Plain Layout
7702 .module
7703 \end_layout
7704
7705 \end_inset
7706
7707  extension.
7708  This will typically be used if the layout includes the module directly,
7709  rather than using the 
7710 \begin_inset Flex CharStyle:Code
7711 status collapsed
7712
7713 \begin_layout Plain Layout
7714 DefaultModule
7715 \end_layout
7716
7717 \end_inset
7718
7719  tag to indicate that it ought to be used.
7720  It could be used in a module that provided an alternate implementation
7721  of the same functionality.
7722 \end_layout
7723
7724 \begin_layout Description
7725 \begin_inset Flex CharStyle:Code
7726 status collapsed
7727
7728 \begin_layout Plain Layout
7729 Requires
7730 \end_layout
7731
7732 \end_inset
7733
7734  [
7735 \begin_inset Flex CharStyle:Code
7736 status collapsed
7737
7738 \begin_layout Plain Layout
7739 string
7740 \end_layout
7741
7742 \end_inset
7743
7744 ] Whether the class requires the feature 
7745 \begin_inset Flex CharStyle:Code
7746 status collapsed
7747
7748 \begin_layout Plain Layout
7749 string
7750 \end_layout
7751
7752 \end_inset
7753
7754 .
7755  Multiple features must be separated by commas.
7756  Note that you can only request supported features.
7757 \end_layout
7758
7759 \begin_layout Description
7760 \begin_inset Flex CharStyle:Code
7761 status collapsed
7762
7763 \begin_layout Plain Layout
7764 RightMargin
7765 \end_layout
7766
7767 \end_inset
7768
7769  A string that indicates the width of the right margin on the screen, for
7770  example, 
7771 \begin_inset Quotes eld
7772 \end_inset
7773
7774 MMMMM
7775 \begin_inset Quotes erd
7776 \end_inset
7777
7778 .
7779 \end_layout
7780
7781 \begin_layout Description
7782 \begin_inset Flex CharStyle:Code
7783 status collapsed
7784
7785 \begin_layout Plain Layout
7786 SecNumDepth
7787 \end_layout
7788
7789 \end_inset
7790
7791  Sets which divisions get numbered.
7792  Corresponds to the 
7793 \begin_inset Flex CharStyle:Code
7794 status collapsed
7795
7796 \begin_layout Plain Layout
7797 secnumdepth
7798 \end_layout
7799
7800 \end_inset
7801
7802  counter in LaTeX.
7803 \end_layout
7804
7805 \begin_layout Description
7806 \begin_inset Flex CharStyle:Code
7807 status collapsed
7808
7809 \begin_layout Plain Layout
7810 Sides
7811 \end_layout
7812
7813 \end_inset
7814
7815  [
7816 \emph on
7817
7818 \begin_inset Flex CharStyle:Code
7819 status collapsed
7820
7821 \begin_layout Plain Layout
7822
7823 \emph on
7824 1
7825 \end_layout
7826
7827 \end_inset
7828
7829
7830 \emph default
7831
7832 \begin_inset Flex CharStyle:Code
7833 status collapsed
7834
7835 \begin_layout Plain Layout
7836 2
7837 \end_layout
7838
7839 \end_inset
7840
7841 ] Whether the class-default should be printing on one or both sides of the
7842  paper.
7843  Can be changed in the 
7844 \begin_inset Flex CharStyle:MenuItem
7845 status collapsed
7846
7847 \begin_layout Plain Layout
7848 Document\SpecialChar \menuseparator
7849 Settings
7850 \end_layout
7851
7852 \end_inset
7853
7854  dialog.
7855 \end_layout
7856
7857 \begin_layout Description
7858 \begin_inset Flex CharStyle:Code
7859 status collapsed
7860
7861 \begin_layout Plain Layout
7862 Style
7863 \end_layout
7864
7865 \end_inset
7866
7867  This sequence defines a paragraph style.
7868  If the style does not yet exist, it is created; if it does exist, its parameter
7869 s are redefined Must end with 
7870 \begin_inset Quotes eld
7871 \end_inset
7872
7873
7874 \begin_inset Flex CharStyle:Code
7875 status collapsed
7876
7877 \begin_layout Plain Layout
7878 End
7879 \end_layout
7880
7881 \end_inset
7882
7883
7884 \begin_inset Quotes erd
7885 \end_inset
7886
7887 .
7888 \begin_inset Newline newline
7889 \end_inset
7890
7891 See Section
7892 \begin_inset space ~
7893 \end_inset
7894
7895
7896 \begin_inset CommandInset ref
7897 LatexCommand ref
7898 reference "sub:Paragraph-Styles"
7899
7900 \end_inset
7901
7902  for details on paragraph styles.
7903 \end_layout
7904
7905 \begin_layout Description
7906 \begin_inset Flex CharStyle:Code
7907 status collapsed
7908
7909 \begin_layout Plain Layout
7910 TitleLatexName
7911 \end_layout
7912
7913 \end_inset
7914
7915  [
7916 \begin_inset Flex CharStyle:Code
7917 status collapsed
7918
7919 \begin_layout Plain Layout
7920 string="maketitle"
7921 \end_layout
7922
7923 \end_inset
7924
7925 ] The name of the command or environment to be used with 
7926 \begin_inset Flex CharStyle:Code
7927 status collapsed
7928
7929 \begin_layout Plain Layout
7930 TitleLatexType
7931 \end_layout
7932
7933 \end_inset
7934
7935 .
7936 \end_layout
7937
7938 \begin_layout Description
7939 \begin_inset Flex CharStyle:Code
7940 status collapsed
7941
7942 \begin_layout Plain Layout
7943 TitleLatexType
7944 \end_layout
7945
7946 \end_inset
7947
7948  [
7949 \begin_inset Flex CharStyle:Code
7950 status collapsed
7951
7952 \begin_layout Plain Layout
7953
7954 \emph on
7955 CommandAfter
7956 \end_layout
7957
7958 \end_inset
7959
7960
7961 \begin_inset Flex CharStyle:Code
7962 status collapsed
7963
7964 \begin_layout Plain Layout
7965 Environment
7966 \end_layout
7967
7968 \end_inset
7969
7970 ] Indicates what kind of markup is used to define the title of a document.
7971  
7972 \begin_inset Flex CharStyle:Code
7973 status collapsed
7974
7975 \begin_layout Plain Layout
7976 CommandAfter
7977 \end_layout
7978
7979 \end_inset
7980
7981  means that the macro with name 
7982 \begin_inset Flex CharStyle:Code
7983 status collapsed
7984
7985 \begin_layout Plain Layout
7986 TitleLatexName
7987 \end_layout
7988
7989 \end_inset
7990
7991  will be inserted after the last layout which has 
7992 \begin_inset Quotes eld
7993 \end_inset
7994
7995
7996 \begin_inset Flex CharStyle:Code
7997 status collapsed
7998
7999 \begin_layout Plain Layout
8000 InTitle 1
8001 \end_layout
8002
8003 \end_inset
8004
8005
8006 \begin_inset Quotes erd
8007 \end_inset
8008
8009 .
8010  
8011 \begin_inset Flex CharStyle:Code
8012 status collapsed
8013
8014 \begin_layout Plain Layout
8015 Environment
8016 \end_layout
8017
8018 \end_inset
8019
8020  corresponds to the case where the block of paragraphs which have 
8021 \begin_inset Quotes eld
8022 \end_inset
8023
8024
8025 \begin_inset Flex CharStyle:Code
8026 status collapsed
8027
8028 \begin_layout Plain Layout
8029 InTitle 1
8030 \end_layout
8031
8032 \end_inset
8033
8034
8035 \begin_inset Quotes erd
8036 \end_inset
8037
8038  should be enclosed into the 
8039 \begin_inset Flex CharStyle:Code
8040 status collapsed
8041
8042 \begin_layout Plain Layout
8043 TitleLatexName
8044 \end_layout
8045
8046 \end_inset
8047
8048  environment.
8049 \end_layout
8050
8051 \begin_layout Description
8052 \begin_inset Flex CharStyle:Code
8053 status collapsed
8054
8055 \begin_layout Plain Layout
8056 TocDepth
8057 \end_layout
8058
8059 \end_inset
8060
8061  Sets which divisions are included in the table of contents.
8062  Corresponds to the 
8063 \begin_inset Flex CharStyle:Code
8064 status collapsed
8065
8066 \begin_layout Plain Layout
8067 tocdepth
8068 \end_layout
8069
8070 \end_inset
8071
8072  counter in LaTeX.
8073 \end_layout
8074
8075 \begin_layout Subsection
8076 \begin_inset Flex CharStyle:Code
8077 status collapsed
8078
8079 \begin_layout Plain Layout
8080 ClassOptions
8081 \end_layout
8082
8083 \end_inset
8084
8085  section
8086 \begin_inset CommandInset label
8087 LatexCommand label
8088 name "sub:ClassOptions"
8089
8090 \end_inset
8091
8092
8093 \end_layout
8094
8095 \begin_layout Standard
8096 The 
8097 \begin_inset Flex CharStyle:Code
8098 status collapsed
8099
8100 \begin_layout Plain Layout
8101 ClassOptions
8102 \end_layout
8103
8104 \end_inset
8105
8106  section can contain the following entries:
8107 \end_layout
8108
8109 \begin_layout Description
8110 \begin_inset Flex CharStyle:Code
8111 status collapsed
8112
8113 \begin_layout Plain Layout
8114 FontSize
8115 \end_layout
8116
8117 \end_inset
8118
8119  [
8120 \begin_inset Flex CharStyle:Code
8121 status collapsed
8122
8123 \begin_layout Plain Layout
8124 string="10|11|12"
8125 \end_layout
8126
8127 \end_inset
8128
8129 ] The list of available font sizes for the document's main font, separated
8130  by 
8131 \begin_inset Quotes eld
8132 \end_inset
8133
8134
8135 \begin_inset Flex CharStyle:Code
8136 status collapsed
8137
8138 \begin_layout Plain Layout
8139 |
8140 \end_layout
8141
8142 \end_inset
8143
8144
8145 \begin_inset Quotes erd
8146 \end_inset
8147
8148 .
8149 \end_layout
8150
8151 \begin_layout Description
8152 \begin_inset Flex CharStyle:Code
8153 status collapsed
8154
8155 \begin_layout Plain Layout
8156 Header
8157 \end_layout
8158
8159 \end_inset
8160
8161  Used to set the DTD line with XML-based output classes.
8162  E.
8163 \begin_inset space \thinspace{}
8164 \end_inset
8165
8166 g.: PUBLIC 
8167 \begin_inset Quotes eld
8168 \end_inset
8169
8170 -//OASIS//DTD DocBook V4.2//EN
8171 \begin_inset Quotes erd
8172 \end_inset
8173
8174 .
8175 \end_layout
8176
8177 \begin_layout Description
8178 \begin_inset Flex CharStyle:Code
8179 status collapsed
8180
8181 \begin_layout Plain Layout
8182 PageStyle
8183 \end_layout
8184
8185 \end_inset
8186
8187  [
8188 \begin_inset Flex CharStyle:Code
8189 status collapsed
8190
8191 \begin_layout Plain Layout
8192 string="empty|plain|headings|fancy"
8193 \end_layout
8194
8195 \end_inset
8196
8197 ] The list of available page styles, separated by 
8198 \begin_inset Quotes eld
8199 \end_inset
8200
8201
8202 \begin_inset Flex CharStyle:Code
8203 status collapsed
8204
8205 \begin_layout Plain Layout
8206 |
8207 \end_layout
8208
8209 \end_inset
8210
8211
8212 \begin_inset Quotes erd
8213 \end_inset
8214
8215 .
8216 \end_layout
8217
8218 \begin_layout Description
8219 \begin_inset Flex CharStyle:Code
8220 status collapsed
8221
8222 \begin_layout Plain Layout
8223 Other
8224 \end_layout
8225
8226 \end_inset
8227
8228  [
8229 \begin_inset Flex CharStyle:Code
8230 status collapsed
8231
8232 \begin_layout Plain Layout
8233 string=""
8234 \end_layout
8235
8236 \end_inset
8237
8238 ] Some document class options, separated by a comma, that will be added
8239  to the optional part of the 
8240 \begin_inset Flex CharStyle:Code
8241 status collapsed
8242
8243 \begin_layout Plain Layout
8244
8245 \backslash
8246 documentclass
8247 \end_layout
8248
8249 \end_inset
8250
8251  command.
8252 \end_layout
8253
8254 \begin_layout Standard
8255 The 
8256 \begin_inset Flex CharStyle:Code
8257 status collapsed
8258
8259 \begin_layout Plain Layout
8260 ClassOptions
8261 \end_layout
8262
8263 \end_inset
8264
8265  section must end with 
8266 \begin_inset Quotes eld
8267 \end_inset
8268
8269
8270 \begin_inset Flex CharStyle:Code
8271 status collapsed
8272
8273 \begin_layout Plain Layout
8274 End
8275 \end_layout
8276
8277 \end_inset
8278
8279
8280 \begin_inset Quotes erd
8281 \end_inset
8282
8283 .
8284 \end_layout
8285
8286 \begin_layout Subsection
8287 Paragraph Styles
8288 \begin_inset CommandInset label
8289 LatexCommand label
8290 name "sub:Paragraph-Styles"
8291
8292 \end_inset
8293
8294
8295 \end_layout
8296
8297 \begin_layout Standard
8298 A paragraph style description looks like this:
8299 \begin_inset Foot
8300 status collapsed
8301
8302 \begin_layout Plain Layout
8303 Note that this will either define a new layout or modify an existing one.
8304 \end_layout
8305
8306 \end_inset
8307
8308
8309 \end_layout
8310
8311 \begin_layout LyX-Code
8312 Style 
8313 \family roman
8314 \emph on
8315 name
8316 \end_layout
8317
8318 \begin_layout LyX-Code
8319  ...
8320 \end_layout
8321
8322 \begin_layout LyX-Code
8323 End
8324 \end_layout
8325
8326 \begin_layout Standard
8327 where the following commands are allowed:
8328 \end_layout
8329
8330 \begin_layout Description
8331 \begin_inset Flex CharStyle:Code
8332 status collapsed
8333
8334 \begin_layout Plain Layout
8335 Align
8336 \end_layout
8337
8338 \end_inset
8339
8340  [
8341 \begin_inset Flex CharStyle:Code
8342 status collapsed
8343
8344 \begin_layout Plain Layout
8345
8346 \emph on
8347 block
8348 \emph default
8349 , left, right, center
8350 \end_layout
8351
8352 \end_inset
8353
8354 ] Paragraph alignment.
8355 \end_layout
8356
8357 \begin_layout Description
8358 \begin_inset Flex CharStyle:Code
8359 status collapsed
8360
8361 \begin_layout Plain Layout
8362 AlignPossible
8363 \end_layout
8364
8365 \end_inset
8366
8367  [
8368 \begin_inset Flex CharStyle:Code
8369 status collapsed
8370
8371 \begin_layout Plain Layout
8372
8373 \emph on
8374 block
8375 \emph default
8376 , left, right, center
8377 \end_layout
8378
8379 \end_inset
8380
8381 ] A comma separated list of permitted alignments.
8382  (Some LaTeX styles prohibit certain alignments, since those wouldn't make
8383  sense.
8384  For example a right-aligned or centered enumeration isn't possible.)
8385 \end_layout
8386
8387 \begin_layout Description
8388 \begin_inset Flex CharStyle:Code
8389 status collapsed
8390
8391 \begin_layout Plain Layout
8392 BabelPreamble
8393 \end_layout
8394
8395 \end_inset
8396
8397  Language dependent information to be included in the LaTeX preamble when
8398  this style is used.
8399  Note that this will completely override any prior 
8400 \begin_inset Flex CharStyle:Code
8401 status collapsed
8402
8403 \begin_layout Plain Layout
8404 BabelPreamble
8405 \end_layout
8406
8407 \end_inset
8408
8409  declarations.
8410  Must end with 
8411 \begin_inset Quotes eld
8412 \end_inset
8413
8414
8415 \begin_inset Flex CharStyle:Code
8416 status collapsed
8417
8418 \begin_layout Plain Layout
8419 EndBabelPreamble
8420 \end_layout
8421
8422 \end_inset
8423
8424
8425 \begin_inset Quotes erd
8426 \end_inset
8427
8428 .
8429  The contents of this tag will occur once in the LaTeX preamble for each
8430  language used by the document.
8431  Each time, the following substitutions are made:
8432 \end_layout
8433
8434 \begin_deeper
8435 \begin_layout Itemize
8436 \begin_inset Flex CharStyle:Code
8437 status collapsed
8438
8439 \begin_layout Plain Layout
8440 $$lang
8441 \end_layout
8442
8443 \end_inset
8444
8445  is replaced by the language name (as used by the babel package).
8446 \end_layout
8447
8448 \begin_layout Itemize
8449 The 
8450 \begin_inset Quotes eld
8451 \end_inset
8452
8453 Function
8454 \begin_inset Quotes erd
8455 \end_inset
8456
8457  
8458 \begin_inset Flex CharStyle:Code
8459 status collapsed
8460
8461 \begin_layout Plain Layout
8462 _()
8463 \end_layout
8464
8465 \end_inset
8466
8467  replaces its argument by the translation of the argument to the current
8468  language.
8469 \end_layout
8470
8471 \begin_layout Standard
8472 This preamble snippet will only be used if the document contains more than
8473  one language and the babel package is used.
8474 \end_layout
8475
8476 \end_deeper
8477 \begin_layout Description
8478 \begin_inset Flex CharStyle:Code
8479 status collapsed
8480
8481 \begin_layout Plain Layout
8482 BottomSep
8483 \end_layout
8484
8485 \end_inset
8486
8487  [
8488 \begin_inset Flex CharStyle:Code
8489 status collapsed
8490
8491 \begin_layout Plain Layout
8492 float=0
8493 \end_layout
8494
8495 \end_inset
8496
8497 ]
8498 \begin_inset Foot
8499 status collapsed
8500
8501 \begin_layout Plain Layout
8502 Note that a `float' here is a real number, such as: 1.5.
8503 \end_layout
8504
8505 \end_inset
8506
8507  The vertical space with which the last of a chain of paragraphs with this
8508  layout is separated from the following paragraph.
8509  If the next paragraph has another layout, the separations are not simply
8510  added, but the maximum is taken.
8511 \end_layout
8512
8513 \begin_layout Description
8514 \begin_inset Flex CharStyle:Code
8515 status collapsed
8516
8517 \begin_layout Plain Layout
8518 Category
8519 \end_layout
8520
8521 \end_inset
8522
8523  
8524 \begin_inset Flex CharStyle:Code
8525 status collapsed
8526
8527 \begin_layout Plain Layout
8528 [string]
8529 \end_layout
8530
8531 \end_inset
8532
8533  The category for this style.
8534  This is used to group related styles in the Layout combobox on the toolbar.
8535  Any string can be used, but you may want to use existing categories with
8536  your own styles.
8537  
8538 \end_layout
8539
8540 \begin_layout Description
8541 \begin_inset Flex CharStyle:Code
8542 status collapsed
8543
8544 \begin_layout Plain Layout
8545 CommandDepth
8546 \end_layout
8547
8548 \end_inset
8549
8550  Depth of XML command.
8551  Used only with XML-type formats.
8552 \end_layout
8553
8554 \begin_layout Description
8555 \begin_inset Flex CharStyle:Code
8556 status collapsed
8557
8558 \begin_layout Plain Layout
8559 CopyStyle
8560 \end_layout
8561
8562 \end_inset
8563
8564  
8565 \begin_inset CommandInset label
8566 LatexCommand label
8567 name "des:CopyStyle"
8568
8569 \end_inset
8570
8571
8572 \begin_inset Flex CharStyle:Code
8573 status collapsed
8574
8575 \begin_layout Plain Layout
8576 [string]
8577 \end_layout
8578
8579 \end_inset
8580
8581  Copies all the features of an existing style into the current one.
8582  
8583 \end_layout
8584
8585 \begin_layout Description
8586 \begin_inset Flex CharStyle:Code
8587 status collapsed
8588
8589 \begin_layout Plain Layout
8590 DependsOn
8591 \end_layout
8592
8593 \end_inset
8594
8595  The name of a style whose preamble should be output 
8596 \emph on
8597 before
8598 \emph default
8599  this one.
8600  This allows to ensure some ordering of the preamble snippets when macros
8601  definitions depend on one another.
8602 \begin_inset Foot
8603 status collapsed
8604
8605 \begin_layout Plain Layout
8606 Note that, besides that functionality, there is no way to ensure any ordering
8607  of preambles.
8608  The ordering that you see in a given version of LyX may change without
8609  warning in later versions.
8610 \end_layout
8611
8612 \end_inset
8613
8614
8615 \end_layout
8616
8617 \begin_layout Description
8618 \begin_inset Flex CharStyle:Code
8619 status collapsed
8620
8621 \begin_layout Plain Layout
8622 EndLabeltype
8623 \end_layout
8624
8625 \end_inset
8626
8627  [
8628 \begin_inset Flex CharStyle:Code
8629 status collapsed
8630
8631 \begin_layout Plain Layout
8632
8633 \emph on
8634 No_Label
8635 \emph default
8636 , Box, Filled_Box, Static
8637 \end_layout
8638
8639 \end_inset
8640
8641 ] The type of label that stands at the end of the paragraph (or sequence
8642  of paragraphs if 
8643 \begin_inset Flex CharStyle:Code
8644 status collapsed
8645
8646 \begin_layout Plain Layout
8647 LatexType
8648 \end_layout
8649
8650 \end_inset
8651
8652  is 
8653 \begin_inset Flex CharStyle:Code
8654 status collapsed
8655
8656 \begin_layout Plain Layout
8657 Environment
8658 \end_layout
8659
8660 \end_inset
8661
8662
8663 \begin_inset Flex CharStyle:Code
8664 status collapsed
8665
8666 \begin_layout Plain Layout
8667 Item_Environment
8668 \end_layout
8669
8670 \end_inset
8671
8672  or 
8673 \begin_inset Flex CharStyle:Code
8674 status collapsed
8675
8676 \begin_layout Plain Layout
8677 List_Environment
8678 \end_layout
8679
8680 \end_inset
8681
8682 ).
8683  
8684 \begin_inset Flex CharStyle:Code
8685 status collapsed
8686
8687 \begin_layout Plain Layout
8688 No_Label
8689 \end_layout
8690
8691 \end_inset
8692
8693  means 
8694 \begin_inset Quotes eld
8695 \end_inset
8696
8697 nothing
8698 \begin_inset Quotes erd
8699 \end_inset
8700
8701
8702 \begin_inset Flex CharStyle:Code
8703 status collapsed
8704
8705 \begin_layout Plain Layout
8706 Box
8707 \end_layout
8708
8709 \end_inset
8710
8711  (resp.
8712 \begin_inset Flex CharStyle:Code
8713 status collapsed
8714
8715 \begin_layout Plain Layout
8716 \begin_inset space ~
8717 \end_inset
8718
8719 Filled_Box
8720 \end_layout
8721
8722 \end_inset
8723
8724 ) is a white (resp.
8725 \begin_inset space ~
8726 \end_inset
8727
8728 black) square suitable for end of proof markers, 
8729 \begin_inset Flex CharStyle:Code
8730 status collapsed
8731
8732 \begin_layout Plain Layout
8733 Static
8734 \end_layout
8735
8736 \end_inset
8737
8738  is an explicit text string.
8739 \end_layout
8740
8741 \begin_layout Description
8742 \begin_inset Flex CharStyle:Code
8743 status collapsed
8744
8745 \begin_layout Plain Layout
8746 EndLabelString
8747 \end_layout
8748
8749 \end_inset
8750
8751  [
8752 \begin_inset Flex CharStyle:Code
8753 status collapsed
8754
8755 \begin_layout Plain Layout
8756 string=""
8757 \end_layout
8758
8759 \end_inset
8760
8761 ] The string used for a label with a 
8762 \begin_inset Flex CharStyle:Code
8763 status collapsed
8764
8765 \begin_layout Plain Layout
8766 Static
8767 \end_layout
8768
8769 \end_inset
8770
8771  
8772 \begin_inset Flex CharStyle:Code
8773 status collapsed
8774
8775 \begin_layout Plain Layout
8776 EndLabelType
8777 \end_layout
8778
8779 \end_inset
8780
8781 .
8782  
8783 \end_layout
8784
8785 \begin_layout Description
8786 \begin_inset Flex CharStyle:Code
8787 status collapsed
8788
8789 \begin_layout Plain Layout
8790 Fill_Bottom
8791 \end_layout
8792
8793 \end_inset
8794
8795  [
8796 \begin_inset Flex CharStyle:Code
8797 status collapsed
8798
8799 \begin_layout Plain Layout
8800
8801 \emph on
8802 0
8803 \emph default
8804 ,1
8805 \end_layout
8806
8807 \end_inset
8808
8809 ] Similar to 
8810 \begin_inset Flex CharStyle:Code
8811 status collapsed
8812
8813 \begin_layout Plain Layout
8814 Fill_Top
8815 \end_layout
8816
8817 \end_inset
8818
8819 .
8820 \end_layout
8821
8822 \begin_layout Description
8823 \begin_inset Flex CharStyle:Code
8824 status collapsed
8825
8826 \begin_layout Plain Layout
8827 Fill_Top
8828 \end_layout
8829
8830 \end_inset
8831
8832  [
8833 \begin_inset Flex CharStyle:Code
8834 status collapsed
8835
8836 \begin_layout Plain Layout
8837
8838 \emph on
8839 0
8840 \emph default
8841 ,1
8842 \end_layout
8843
8844 \end_inset
8845
8846 ] With this parameter the 
8847 \begin_inset Flex CharStyle:MenuItem
8848 status collapsed
8849
8850 \begin_layout Plain Layout
8851 Fill
8852 \end_layout
8853
8854 \end_inset
8855
8856  value of the 
8857 \begin_inset Quotes eld
8858 \end_inset
8859
8860 Vertical space above
8861 \begin_inset Quotes erd
8862 \end_inset
8863
8864  list of the 
8865 \begin_inset Flex CharStyle:MenuItem
8866 status collapsed
8867
8868 \begin_layout Plain Layout
8869 Edit\SpecialChar \menuseparator
8870 Paragraph
8871 \begin_inset space ~
8872 \end_inset
8873
8874 Settings
8875 \end_layout
8876
8877 \end_inset
8878
8879  dialog can be set when initializing a paragraph with this style.
8880 \begin_inset Foot
8881 status collapsed
8882
8883 \begin_layout Plain Layout
8884
8885 \emph on
8886 Note from Jean-Marc:
8887 \emph default
8888  I'm not sure that this setting has much use, and it should probably be
8889  removed in later versions.
8890 \end_layout
8891
8892 \end_inset
8893
8894  
8895 \end_layout
8896
8897 \begin_layout Description
8898 \begin_inset Flex CharStyle:Code
8899 status collapsed
8900
8901 \begin_layout Plain Layout
8902 Font
8903 \end_layout
8904
8905 \end_inset
8906
8907  The font used for both the text body 
8908 \emph on
8909 and
8910 \emph default
8911  the label.
8912  See section
8913 \begin_inset space ~
8914 \end_inset
8915
8916
8917 \begin_inset CommandInset ref
8918 LatexCommand ref
8919 reference "sub:Font-description"
8920
8921 \end_inset
8922
8923 .
8924  Note that defining this font automatically defines the 
8925 \begin_inset Flex CharStyle:Code
8926 status collapsed
8927
8928 \begin_layout Plain Layout
8929 LabelFont
8930 \end_layout
8931
8932 \end_inset
8933
8934  to the same value.
8935  So you should define this one first if you also want to define 
8936 \begin_inset Flex CharStyle:Code
8937 status collapsed
8938
8939 \begin_layout Plain Layout
8940 LabelFont
8941 \end_layout
8942
8943 \end_inset
8944
8945 .
8946 \end_layout
8947
8948 \begin_layout Description
8949 \begin_inset Flex CharStyle:Code
8950 status collapsed
8951
8952 \begin_layout Plain Layout
8953 FreeSpacing
8954 \end_layout
8955
8956 \end_inset
8957
8958  
8959 \begin_inset CommandInset label
8960 LatexCommand label
8961 name "des:FreeSpacing"
8962
8963 \end_inset
8964
8965 [
8966 \emph on
8967
8968 \begin_inset Flex CharStyle:Code
8969 status collapsed
8970
8971 \begin_layout Plain Layout
8972
8973 \emph on
8974 0
8975 \end_layout
8976
8977 \end_inset
8978
8979
8980 \emph default
8981
8982 \begin_inset Flex CharStyle:Code
8983 status collapsed
8984
8985 \begin_layout Plain Layout
8986 1
8987 \end_layout
8988
8989 \end_inset
8990
8991 ] Usually LyX doesn't allow you to insert more than one space between words,
8992  since a space is considered as the separation between two words, not a
8993  character or symbol of its own.
8994  This is a very fine thing but sometimes annoying, for example, when typing
8995  program code or plain LaTeX code.
8996  For this reason, 
8997 \begin_inset Flex CharStyle:Code
8998 status collapsed
8999
9000 \begin_layout Plain Layout
9001 FreeSpacing
9002 \end_layout
9003
9004 \end_inset
9005
9006  can be enabled.
9007  Note that LyX will create protected blanks for the additional blanks when
9008  in another mode than LaTeX-mode.
9009 \end_layout
9010
9011 \begin_layout Description
9012 \begin_inset Flex CharStyle:Code
9013 status collapsed
9014
9015 \begin_layout Plain Layout
9016 InnerTag
9017 \end_layout
9018
9019 \end_inset
9020
9021  [[FIXME]] (Used only with XML-type formats.)
9022 \end_layout
9023
9024 \begin_layout Description
9025 \begin_inset Flex CharStyle:Code
9026 status collapsed
9027
9028 \begin_layout Plain Layout
9029 InTitle
9030 \end_layout
9031
9032 \end_inset
9033
9034  
9035 \begin_inset Flex CharStyle:Code
9036 status collapsed
9037
9038 \begin_layout Plain Layout
9039 [1, 0]
9040 \end_layout
9041
9042 \end_inset
9043
9044  If 1, marks the layout as being part of a title block (see also the 
9045 \begin_inset Flex CharStyle:Code
9046 status collapsed
9047
9048 \begin_layout Plain Layout
9049 TitleLatexType
9050 \end_layout
9051
9052 \end_inset
9053
9054  and 
9055 \begin_inset Flex CharStyle:Code
9056 status collapsed
9057
9058 \begin_layout Plain Layout
9059 TitleLatexName
9060 \end_layout
9061
9062 \end_inset
9063
9064  global entries).
9065 \end_layout
9066
9067 \begin_layout Description
9068 \begin_inset Flex CharStyle:Code
9069 status collapsed
9070
9071 \begin_layout Plain Layout
9072 ItemSep
9073 \end_layout
9074
9075 \end_inset
9076
9077  [
9078 \begin_inset Flex CharStyle:Code
9079 status collapsed
9080
9081 \begin_layout Plain Layout
9082 float=0
9083 \end_layout
9084
9085 \end_inset
9086
9087 ] This provides extra space between paragraphs that have the same layout.
9088  If you put other layouts into an environment, each is separated with the
9089  environment's 
9090 \begin_inset Flex CharStyle:Code
9091 status collapsed
9092
9093 \begin_layout Plain Layout
9094 Parsep
9095 \end_layout
9096
9097 \end_inset
9098
9099 .
9100  But the whole items of the environment are additionally separated with
9101  this 
9102 \begin_inset Flex CharStyle:Code
9103 status collapsed
9104
9105 \begin_layout Plain Layout
9106 Itemsep
9107 \end_layout
9108
9109 \end_inset
9110
9111 .
9112  Note that this is a
9113 \emph on
9114  multiplier.
9115 \end_layout
9116
9117 \begin_layout Description
9118 \begin_inset Flex CharStyle:Code
9119 status collapsed
9120
9121 \begin_layout Plain Layout
9122 ItemTag
9123 \end_layout
9124
9125 \end_inset
9126
9127  [[FIXME]] (Used only with XML-type formats.)
9128 \end_layout
9129
9130 \begin_layout Description
9131 \begin_inset Flex CharStyle:Code
9132 status collapsed
9133
9134 \begin_layout Plain Layout
9135 KeepEmpty
9136 \end_layout
9137
9138 \end_inset
9139
9140  
9141 \begin_inset CommandInset label
9142 LatexCommand label
9143 name "des:KeepEmpty"
9144
9145 \end_inset
9146
9147 [
9148 \emph on
9149
9150 \begin_inset Flex CharStyle:Code
9151 status collapsed
9152
9153 \begin_layout Plain Layout
9154
9155 \emph on
9156 0
9157 \end_layout
9158
9159 \end_inset
9160
9161
9162 \emph default
9163
9164 \begin_inset Flex CharStyle:Code
9165 status collapsed
9166
9167 \begin_layout Plain Layout
9168 1
9169 \end_layout
9170
9171 \end_inset
9172
9173 ] Usually LyX does not allow you to leave a paragraph empty, since it would
9174  lead to empty LaTeX output.
9175  There are some cases where this could be desirable however: in a letter
9176  template, the required fields can be provided as empty fields, so that
9177  people do not forget them; in some special classes, a layout can be used
9178  as some kind of break, which does not contain actual text.
9179 \end_layout
9180
9181 \begin_layout Description
9182 \begin_inset Flex CharStyle:Code
9183 status collapsed
9184
9185 \begin_layout Plain Layout
9186 LabelBottomsep
9187 \end_layout
9188
9189 \end_inset
9190
9191  [float=0] The vertical space between the label and the text body.
9192  Only used for labels that are above the text body (
9193 \begin_inset Flex CharStyle:Code
9194 status collapsed
9195
9196 \begin_layout Plain Layout
9197 Top_Environment
9198 \end_layout
9199
9200 \end_inset
9201
9202
9203 \begin_inset Flex CharStyle:Code
9204 status collapsed
9205
9206 \begin_layout Plain Layout
9207 Centered_Top_Environment
9208 \end_layout
9209
9210 \end_inset
9211
9212 ).
9213 \end_layout
9214
9215 \begin_layout Description
9216 \begin_inset Flex CharStyle:Code
9217 status collapsed
9218
9219 \begin_layout Plain Layout
9220 LabelCounter
9221 \end_layout
9222
9223 \end_inset
9224
9225  [
9226 \begin_inset Flex CharStyle:Code
9227 status collapsed
9228
9229 \begin_layout Plain Layout
9230 string=""
9231 \end_layout
9232
9233 \end_inset
9234
9235 ]
9236 \begin_inset Newline newline
9237 \end_inset
9238
9239 The name of the counter for automatic numbering.
9240  
9241 \begin_inset Newline newline
9242 \end_inset
9243
9244 This 
9245 \emph on
9246 must
9247 \emph default
9248  be given if 
9249 \begin_inset Flex CharStyle:Code
9250 status collapsed
9251
9252 \begin_layout Plain Layout
9253 LabelType
9254 \end_layout
9255
9256 \end_inset
9257
9258  is 
9259 \begin_inset Flex CharStyle:Code
9260 status collapsed
9261
9262 \begin_layout Plain Layout
9263 Counter
9264 \end_layout
9265
9266 \end_inset
9267
9268 .
9269  In that case, the counter will be stepped each time the layout appears.
9270  
9271 \begin_inset Newline newline
9272 \end_inset
9273
9274 This 
9275 \emph on
9276 may
9277 \emph default
9278  also be given if 
9279 \begin_inset Flex CharStyle:Code
9280 status collapsed
9281
9282 \begin_layout Plain Layout
9283 LabelType
9284 \end_layout
9285
9286 \end_inset
9287
9288  is 
9289 \begin_inset Flex CharStyle:Code
9290 status collapsed
9291
9292 \begin_layout Plain Layout
9293 Enumerate
9294 \end_layout
9295
9296 \end_inset
9297
9298 , though this case is a bit complicated.
9299  Suppose you declare 
9300 \begin_inset Quotes eld
9301 \end_inset
9302
9303
9304 \begin_inset Flex CharStyle:Code
9305 status collapsed
9306
9307 \begin_layout Plain Layout
9308 LabelCounter myenum
9309 \end_layout
9310
9311 \end_inset
9312
9313
9314 \begin_inset Quotes erd
9315 \end_inset
9316
9317 .
9318  Then the actual counters used are 
9319 \begin_inset Flex CharStyle:Code
9320 status collapsed
9321
9322 \begin_layout Plain Layout
9323 myenumi
9324 \end_layout
9325
9326 \end_inset
9327
9328
9329 \begin_inset Flex CharStyle:Code
9330 status collapsed
9331
9332 \begin_layout Plain Layout
9333 myenumii
9334 \end_layout
9335
9336 \end_inset
9337
9338
9339 \begin_inset Flex CharStyle:Code
9340 status collapsed
9341
9342 \begin_layout Plain Layout
9343 myenumiii
9344 \end_layout
9345
9346 \end_inset
9347
9348 , and 
9349 \begin_inset Flex CharStyle:Code
9350 status collapsed
9351
9352 \begin_layout Plain Layout
9353 myenumiv
9354 \end_layout
9355
9356 \end_inset
9357
9358 , much as in LaTeX.
9359  These counters must all be declared separately.
9360 \begin_inset Newline newline
9361 \end_inset
9362
9363 See Section 
9364 \begin_inset CommandInset ref
9365 LatexCommand ref
9366 reference "sub:Counters"
9367
9368 \end_inset
9369
9370  for details on counters.
9371 \end_layout
9372
9373 \begin_layout Description
9374 \begin_inset Flex CharStyle:Code
9375 status collapsed
9376
9377 \begin_layout Plain Layout
9378 LabelFont
9379 \end_layout
9380
9381 \end_inset
9382
9383  The font used for the label.
9384  See section
9385 \begin_inset space ~
9386 \end_inset
9387
9388
9389 \begin_inset CommandInset ref
9390 LatexCommand ref
9391 reference "sub:Font-description"
9392
9393 \end_inset
9394
9395 .
9396 \end_layout
9397
9398 \begin_layout Description
9399 \begin_inset Flex CharStyle:Code
9400 status collapsed
9401
9402 \begin_layout Plain Layout
9403 LabelIndent
9404 \end_layout
9405
9406 \end_inset
9407
9408  Text that indicates how far a label should be indented.
9409 \end_layout
9410
9411 \begin_layout Description
9412 \begin_inset Flex CharStyle:Code
9413 status collapsed
9414
9415 \begin_layout Plain Layout
9416 Labelsep
9417 \end_layout
9418
9419 \end_inset
9420
9421  [
9422 \begin_inset Flex CharStyle:Code
9423 status collapsed
9424
9425 \begin_layout Plain Layout
9426 string=""
9427 \end_layout
9428
9429 \end_inset
9430
9431 ] The horizontal space between the label and the text body.
9432  Only used for labels that are not above the text body.
9433 \end_layout
9434
9435 \begin_layout Description
9436 \begin_inset Flex CharStyle:Code
9437 status collapsed
9438
9439 \begin_layout Plain Layout
9440 LabelString
9441 \end_layout
9442
9443 \end_inset
9444
9445  [
9446 \begin_inset Flex CharStyle:Code
9447 status collapsed
9448
9449 \begin_layout Plain Layout
9450 string=""
9451 \end_layout
9452
9453 \end_inset
9454
9455 ] The string used for a label with a 
9456 \begin_inset Flex CharStyle:Code
9457 status collapsed
9458
9459 \begin_layout Plain Layout
9460 Static
9461 \end_layout
9462
9463 \end_inset
9464
9465  labeltype.
9466  When 
9467 \begin_inset Flex CharStyle:Code
9468 status collapsed
9469
9470 \begin_layout Plain Layout
9471 LabelCounter
9472 \end_layout
9473
9474 \end_inset
9475
9476  is set, this string can be contain the special formatting commands described
9477  in Section 
9478 \begin_inset CommandInset ref
9479 LatexCommand ref
9480 reference "sub:Counters"
9481
9482 \end_inset
9483
9484 .
9485 \begin_inset Foot
9486 status collapsed
9487
9488 \begin_layout Plain Layout
9489 For the sake of backwards compatibility, the string 
9490 \begin_inset Flex CharStyle:Code
9491 status collapsed
9492
9493 \begin_layout Plain Layout
9494 @
9495 \emph on
9496 style-name
9497 \emph default
9498 @
9499 \end_layout
9500
9501 \end_inset
9502
9503  will be replaced by the expanded 
9504 \begin_inset Flex CharStyle:Code
9505 status collapsed
9506
9507 \begin_layout Plain Layout
9508 LabelString
9509 \end_layout
9510
9511 \end_inset
9512
9513  of style 
9514 \begin_inset Flex CharStyle:Code
9515 status collapsed
9516
9517 \begin_layout Plain Layout
9518
9519 \emph on
9520 style-name
9521 \end_layout
9522
9523 \end_inset
9524
9525 .
9526  This feature is now obsolete and should be replaced by the mechanisms of
9527  Section 
9528 \begin_inset CommandInset ref
9529 LatexCommand ref
9530 reference "sub:Counters"
9531
9532 \end_inset
9533
9534 .
9535 \end_layout
9536
9537 \end_inset
9538
9539
9540 \end_layout
9541
9542 \begin_layout Description
9543 \begin_inset Flex CharStyle:Code
9544 status collapsed
9545
9546 \begin_layout Plain Layout
9547 LabelStringAppendix
9548 \end_layout
9549
9550 \end_inset
9551
9552  [
9553 \begin_inset Flex CharStyle:Code
9554 status collapsed
9555
9556 \begin_layout Plain Layout
9557 string=""
9558 \end_layout
9559
9560 \end_inset
9561
9562 ] This is used inside the appendix instead of 
9563 \begin_inset Flex CharStyle:Code
9564 status collapsed
9565
9566 \begin_layout Plain Layout
9567 LabelString
9568 \end_layout
9569
9570 \end_inset
9571
9572 .
9573  Note that every 
9574 \begin_inset Flex CharStyle:Code
9575 status collapsed
9576
9577 \begin_layout Plain Layout
9578 LabelString
9579 \end_layout
9580
9581 \end_inset
9582
9583  statement resets 
9584 \begin_inset Flex CharStyle:Code
9585 status collapsed
9586
9587 \begin_layout Plain Layout
9588 LabelStringAppendix
9589 \end_layout
9590
9591 \end_inset
9592
9593  too.
9594 \end_layout
9595
9596 \begin_layout Description
9597 \begin_inset Flex CharStyle:Code
9598 status collapsed
9599
9600 \begin_layout Plain Layout
9601 LabelTag
9602 \end_layout
9603
9604 \end_inset
9605
9606  [FIXME] (Used only with XML-type formats.)
9607 \end_layout
9608
9609 \begin_layout Description
9610 \begin_inset Flex CharStyle:Code
9611 status collapsed
9612
9613 \begin_layout Plain Layout
9614 LabelType
9615 \end_layout
9616
9617 \end_inset
9618
9619  [
9620 \begin_inset Flex CharStyle:Code
9621 status collapsed
9622
9623 \begin_layout Plain Layout
9624
9625 \emph on
9626 No_Label
9627 \emph default
9628 , Manual, Static, Top_Environment, Centered_Top_Environment, Counter, Sensitive,
9629  Enumerate, Itemize, Bibliography
9630 \end_layout
9631
9632 \end_inset
9633
9634
9635 \end_layout
9636
9637 \begin_deeper
9638 \begin_layout Itemize
9639 \begin_inset Flex CharStyle:Code
9640 status collapsed
9641
9642 \begin_layout Plain Layout
9643 Manual
9644 \end_layout
9645
9646 \end_inset
9647
9648  means the label is the very first word (up to the first real blank).
9649  Use protected spaces (like
9650 \begin_inset space ~
9651 \end_inset
9652
9653 that one) if you want more than one word as the label.
9654  
9655 \end_layout
9656
9657 \begin_layout Itemize
9658 \begin_inset Flex CharStyle:Code
9659 status collapsed
9660
9661 \begin_layout Plain Layout
9662 Static
9663 \end_layout
9664
9665 \end_inset
9666
9667  means the label is simply whatever 
9668 \begin_inset Flex CharStyle:Code
9669 status collapsed
9670
9671 \begin_layout Plain Layout
9672 LabelString
9673 \end_layout
9674
9675 \end_inset
9676
9677  declares it to be.
9678  Note that this really is `static'.
9679 \end_layout
9680
9681 \begin_layout Itemize
9682 \begin_inset Flex CharStyle:Code
9683 status collapsed
9684
9685 \begin_layout Plain Layout
9686 Top_Environment
9687 \end_layout
9688
9689 \end_inset
9690
9691  and 
9692 \begin_inset Flex CharStyle:Code
9693 status collapsed
9694
9695 \begin_layout Plain Layout
9696 Centered_Top_Environment
9697 \end_layout
9698
9699 \end_inset
9700
9701  are special cases of 
9702 \begin_inset Flex CharStyle:Code
9703 status collapsed
9704
9705 \begin_layout Plain Layout
9706 Static
9707 \end_layout
9708
9709 \end_inset
9710
9711 .
9712  The label will be printed above the paragraph, but only at the top of an
9713  environment or the top of a chain of paragraphs with this layout.
9714  This might be used with the 
9715 \begin_inset Flex CharStyle:MenuItem
9716 status collapsed
9717
9718 \begin_layout Plain Layout
9719 Abstract
9720 \end_layout
9721
9722 \end_inset
9723
9724  layout, for example.
9725 \end_layout
9726
9727 \begin_layout Itemize
9728 \begin_inset Flex CharStyle:Code
9729 status collapsed
9730
9731 \begin_layout Plain Layout
9732 Sensitive
9733 \end_layout
9734
9735 \end_inset
9736
9737  is a special case for the caption-labels 
9738 \begin_inset Quotes eld
9739 \end_inset
9740
9741 Figure
9742 \begin_inset Quotes erd
9743 \end_inset
9744
9745  and 
9746 \begin_inset Quotes eld
9747 \end_inset
9748
9749 Table
9750 \begin_inset Quotes erd
9751 \end_inset
9752
9753 .
9754  
9755 \begin_inset Flex CharStyle:Code
9756 status collapsed
9757
9758 \begin_layout Plain Layout
9759 Sensitive
9760 \end_layout
9761
9762 \end_inset
9763
9764  means the (hardcoded) label string depends on the kind of float: It is
9765  hardcoded to be `FloatType N', where N is the value of the counter associated
9766  with the float.
9767 \end_layout
9768
9769 \begin_layout Itemize
9770 The 
9771 \begin_inset Flex CharStyle:Code
9772 status collapsed
9773
9774 \begin_layout Plain Layout
9775 Counter
9776 \end_layout
9777
9778 \end_inset
9779
9780  label type defines automatically numbered labels.
9781  The 
9782 \begin_inset Flex CharStyle:Code
9783 status collapsed
9784
9785 \begin_layout Plain Layout
9786 LabelString
9787 \end_layout
9788
9789 \end_inset
9790
9791  will be expanded to resolve any counter references it contains: For example,
9792  it might be 
9793 \begin_inset Quotes eld
9794 \end_inset
9795
9796
9797 \begin_inset Flex CharStyle:Code
9798 status collapsed
9799
9800 \begin_layout Plain Layout
9801 Section 
9802 \backslash
9803 thechapter.
9804 \backslash
9805 thesection
9806 \end_layout
9807
9808 \end_inset
9809
9810
9811 \begin_inset Quotes erd
9812 \end_inset
9813
9814 .
9815  See Section 
9816 \begin_inset CommandInset ref
9817 LatexCommand ref
9818 reference "sub:Counters"
9819
9820 \end_inset
9821
9822  for more information on counters.
9823 \end_layout
9824
9825 \begin_layout Itemize
9826 \begin_inset Flex CharStyle:Code
9827 status collapsed
9828
9829 \begin_layout Plain Layout
9830 Enumerate
9831 \end_layout
9832
9833 \end_inset
9834
9835  produces the usual sort of enumeration labels.
9836  At present, it is hardcoded to use Arabic numerals, lowercase letters,
9837  small Roman numerals, and uppercase letters for the four possible depths.
9838 \end_layout
9839
9840 \begin_layout Itemize
9841 \begin_inset Flex CharStyle:Code
9842 status collapsed
9843
9844 \begin_layout Plain Layout
9845 Itemize
9846 \end_layout
9847
9848 \end_inset
9849
9850  produces various bullets at the different levels.
9851  It is also hardcoded.
9852 \end_layout
9853
9854 \begin_layout Itemize
9855 \begin_inset Flex CharStyle:Code
9856 status collapsed
9857
9858 \begin_layout Plain Layout
9859 Bibliography
9860 \end_layout
9861
9862 \end_inset
9863
9864  is used internally by LyX and should be used only with 
9865 \begin_inset Flex CharStyle:Code
9866 status collapsed
9867
9868 \begin_layout Plain Layout
9869 LatexType BibEnvironment
9870 \end_layout
9871
9872 \end_inset
9873
9874 .
9875 \end_layout
9876
9877 \end_deeper
9878 \begin_layout Description
9879 \begin_inset Flex CharStyle:Code
9880 status collapsed
9881
9882 \begin_layout Plain Layout
9883 LangPreamble
9884 \end_layout
9885
9886 \end_inset
9887
9888  Like 
9889 \begin_inset Flex CharStyle:Code
9890 status collapsed
9891
9892 \begin_layout Plain Layout
9893 BabelPreamble
9894 \end_layout
9895
9896 \end_inset
9897
9898 , but this preamble snippet occurs independently from the babel package,
9899  and only for the document language.
9900  Must end with 
9901 \begin_inset Quotes eld
9902 \end_inset
9903
9904
9905 \begin_inset Flex CharStyle:Code
9906 status collapsed
9907
9908 \begin_layout Plain Layout
9909 EndLangPreamble
9910 \end_layout
9911
9912 \end_inset
9913
9914
9915 \begin_inset Quotes erd
9916 \end_inset
9917
9918 .
9919 \end_layout
9920
9921 \begin_deeper
9922 \begin_layout Standard
9923 If the style defines text that appears in the typeset document, it may use
9924  
9925 \begin_inset Flex CharStyle:Code
9926 status collapsed
9927
9928 \begin_layout Plain Layout
9929 LangPreamble
9930 \end_layout
9931
9932 \end_inset
9933
9934  and 
9935 \begin_inset Flex CharStyle:Code
9936 status collapsed
9937
9938 \begin_layout Plain Layout
9939 BabelPreamble
9940 \end_layout
9941
9942 \end_inset
9943
9944  to support non-english and even multilanguage documents correctly.
9945  The following excerpt (from the 
9946 \begin_inset Flex CharStyle:Code
9947 status collapsed
9948
9949 \begin_layout Plain Layout
9950 theorems-ams.inc
9951 \end_layout
9952
9953 \end_inset
9954
9955  file) shows how this works:
9956 \end_layout
9957
9958 \begin_layout LyX-Code
9959 Preamble
9960 \end_layout
9961
9962 \begin_layout LyX-Code
9963   
9964 \backslash
9965 theoremstyle{remark}
9966 \end_layout
9967
9968 \begin_layout LyX-Code
9969   
9970 \backslash
9971 newtheorem{claim}[thm]{
9972 \backslash
9973 protect
9974 \backslash
9975 claimname}
9976 \end_layout
9977
9978 \begin_layout LyX-Code
9979 EndPreamble
9980 \end_layout
9981
9982 \begin_layout LyX-Code
9983 LangPreamble
9984 \end_layout
9985
9986 \begin_layout LyX-Code
9987   
9988 \backslash
9989 providecommand{
9990 \backslash
9991 claimname}{_(Claim)}
9992 \end_layout
9993
9994 \begin_layout LyX-Code
9995
9996 \end_layout
9997
9998 \begin_layout LyX-Code
9999 EndLangPreamble
10000 \end_layout
10001
10002 \begin_layout LyX-Code
10003 BabelPreamble
10004 \end_layout
10005
10006 \begin_layout LyX-Code
10007     
10008 \backslash
10009 addto
10010 \backslash
10011 captions$$lang{
10012 \backslash
10013 renewcommand{
10014 \backslash
10015 claimname}{_(Claim)}}
10016 \end_layout
10017
10018 \begin_layout LyX-Code
10019 EndBabelPreamble
10020 \end_layout
10021
10022 \begin_layout Standard
10023 The key to correct translation of the user visible text is the definition
10024  of the command 
10025 \begin_inset Flex CharStyle:Code
10026 status collapsed
10027
10028 \begin_layout Plain Layout
10029
10030 \backslash
10031 claimname
10032 \end_layout
10033
10034 \end_inset
10035
10036  in the language preamble.
10037  This command holds the name of the theorem that will appear in the output.
10038  The 
10039 \begin_inset Flex CharStyle:Code
10040 status collapsed
10041
10042 \begin_layout Plain Layout
10043 BabelPreamble
10044 \end_layout
10045
10046 \end_inset
10047
10048  then uses the commands offered by the babel package to redefine 
10049 \begin_inset Flex CharStyle:Code
10050 status collapsed
10051
10052 \begin_layout Plain Layout
10053
10054 \backslash
10055 claimname
10056 \end_layout
10057
10058 \end_inset
10059
10060  for each used language in multilanguage documents.
10061 \end_layout
10062
10063 \end_deeper
10064 \begin_layout Description
10065 \begin_inset Flex CharStyle:Code
10066 status collapsed
10067
10068 \begin_layout Plain Layout
10069 LatexName
10070 \end_layout
10071
10072 \end_inset
10073
10074  The name of the corresponding LaTeX stuff.
10075  Either the environment or command name.
10076 \end_layout
10077
10078 \begin_layout Description
10079 \begin_inset Flex CharStyle:Code
10080 status collapsed
10081
10082 \begin_layout Plain Layout
10083 LatexParam
10084 \end_layout
10085
10086 \end_inset
10087
10088  An optional parameter for the corresponding 
10089 \begin_inset Flex CharStyle:Code
10090 status collapsed
10091
10092 \begin_layout Plain Layout
10093 LatexName
10094 \end_layout
10095
10096 \end_inset
10097
10098  stuff.
10099  This parameter cannot be changed from within LyX.
10100 \end_layout
10101
10102 \begin_layout Description
10103 \begin_inset Flex CharStyle:Code
10104 status collapsed
10105
10106 \begin_layout Plain Layout
10107 LatexType
10108 \end_layout
10109
10110 \end_inset
10111
10112  
10113 \begin_inset CommandInset label
10114 LatexCommand label
10115 name "des:LatexType"
10116
10117 \end_inset
10118
10119 [
10120 \begin_inset Flex CharStyle:Code
10121 status collapsed
10122
10123 \begin_layout Plain Layout
10124
10125 \emph on
10126 Paragraph
10127 \emph default
10128 , Command, Environment, Item_Environment,
10129 \end_layout
10130
10131 \end_inset
10132
10133  
10134 \begin_inset Flex CharStyle:Code
10135 status collapsed
10136
10137 \begin_layout Plain Layout
10138 List_Environment, Bib_Environment
10139 \end_layout
10140
10141 \end_inset
10142
10143 ] How the layout should be translated into LaTeX.
10144 \begin_inset Foot
10145 status collapsed
10146
10147 \begin_layout Plain Layout
10148 \begin_inset Flex CharStyle:Code
10149 status collapsed
10150
10151 \begin_layout Plain Layout
10152 LatexType
10153 \end_layout
10154
10155 \end_inset
10156
10157  is perhaps a bit misleading, since these rules apply to SGML classes, too.
10158  Visit the SGML class files for specific examples.
10159 \end_layout
10160
10161 \end_inset
10162
10163
10164 \end_layout
10165
10166 \begin_deeper
10167 \begin_layout Itemize
10168 \begin_inset Flex CharStyle:Code
10169 status collapsed
10170
10171 \begin_layout Plain Layout
10172 Paragraph
10173 \end_layout
10174
10175 \end_inset
10176
10177  means nothing special.
10178  
10179 \end_layout
10180
10181 \begin_layout Itemize
10182 \begin_inset Flex CharStyle:Code
10183 status collapsed
10184
10185 \begin_layout Plain Layout
10186 Command
10187 \end_layout
10188
10189 \end_inset
10190
10191  means 
10192 \begin_inset Flex CharStyle:Code
10193 status collapsed
10194
10195 \begin_layout Plain Layout
10196
10197 \backslash
10198
10199 \emph on
10200 LatexName
10201 \emph default
10202 {\SpecialChar \ldots{}
10203 }
10204 \end_layout
10205
10206 \end_inset
10207
10208 .
10209 \end_layout
10210
10211 \begin_layout Itemize
10212 \begin_inset Flex CharStyle:Code
10213 status collapsed
10214
10215 \begin_layout Plain Layout
10216 Environment
10217 \end_layout
10218
10219 \end_inset
10220
10221  means 
10222 \begin_inset Flex CharStyle:Code
10223 status collapsed
10224
10225 \begin_layout Plain Layout
10226
10227 \backslash
10228 begin{
10229 \emph on
10230 LatexName
10231 \emph default
10232 }\SpecialChar \ldots{}
10233
10234 \backslash
10235 end{
10236 \emph on
10237 LatexName
10238 \emph default
10239 }
10240 \end_layout
10241
10242 \end_inset
10243
10244 .
10245  
10246 \end_layout
10247
10248 \begin_layout Itemize
10249 \begin_inset Flex CharStyle:Code
10250 status collapsed
10251
10252 \begin_layout Plain Layout
10253 Item_Environment
10254 \end_layout
10255
10256 \end_inset
10257
10258  is the same as 
10259 \begin_inset Flex CharStyle:Code
10260 status collapsed
10261
10262 \begin_layout Plain Layout
10263 Environment
10264 \end_layout
10265
10266 \end_inset
10267
10268 , except that an 
10269 \begin_inset Flex CharStyle:Code
10270 status collapsed
10271
10272 \begin_layout Plain Layout
10273
10274 \backslash
10275 item
10276 \end_layout
10277
10278 \end_inset
10279
10280  is generated for each paragraph of this environment.
10281  
10282 \end_layout
10283
10284 \begin_layout Itemize
10285 \begin_inset Flex CharStyle:Code
10286 status collapsed
10287
10288 \begin_layout Plain Layout
10289 List_Environment
10290 \end_layout
10291
10292 \end_inset
10293
10294  is the same as 
10295 \begin_inset Flex CharStyle:Code
10296 status collapsed
10297
10298 \begin_layout Plain Layout
10299 Item_Environment
10300 \end_layout
10301
10302 \end_inset
10303
10304 , except that 
10305 \begin_inset Flex CharStyle:Code
10306 status collapsed
10307
10308 \begin_layout Plain Layout
10309 LabelWidthString
10310 \end_layout
10311
10312 \end_inset
10313
10314  is passed as an argument to the environment.
10315  
10316 \begin_inset Flex CharStyle:Code
10317 status collapsed
10318
10319 \begin_layout Plain Layout
10320 LabelWidthString
10321 \end_layout
10322
10323 \end_inset
10324
10325  can be defined in the 
10326 \begin_inset Flex CharStyle:MenuItem
10327 status collapsed
10328
10329 \begin_layout Plain Layout
10330
10331 \bar under
10332 L
10333 \bar default
10334 ayout\SpecialChar \menuseparator
10335
10336 \bar under
10337 P
10338 \bar default
10339 aragraph
10340 \end_layout
10341
10342 \end_inset
10343
10344  dialog.
10345  
10346 \end_layout
10347
10348 \begin_layout Standard
10349 Putting the last few things together, the LaTeX output will be either: 
10350 \end_layout
10351
10352 \begin_layout LyX-Code
10353
10354 \backslash
10355 latexname[latexparam]{\SpecialChar \ldots{}
10356 }
10357 \end_layout
10358
10359 \begin_layout Standard
10360 or: 
10361 \end_layout
10362
10363 \begin_layout LyX-Code
10364
10365 \backslash
10366 begin{latexname}[latexparam] \SpecialChar \ldots{}
10367  
10368 \backslash
10369 end{latexname}.
10370 \end_layout
10371
10372 \begin_layout Standard
10373 depending upon the LaTeX type.
10374 \end_layout
10375
10376 \end_deeper
10377 \begin_layout Description
10378 \begin_inset Flex CharStyle:Code
10379 status collapsed
10380
10381 \begin_layout Plain Layout
10382 LeftMargin
10383 \end_layout
10384
10385 \end_inset
10386
10387  [
10388 \begin_inset Flex CharStyle:Code
10389 status collapsed
10390
10391 \begin_layout Plain Layout
10392 string=""
10393 \end_layout
10394
10395 \end_inset
10396
10397 ] If you put layouts into environments, the leftmargins are not simply added,
10398  but added with a factor 
10399 \begin_inset Formula $\frac{4}{depth+4}$
10400 \end_inset
10401
10402 .
10403  Note that this parameter is also used when the margin is defined as 
10404 \begin_inset Flex CharStyle:Code
10405 status collapsed
10406
10407 \begin_layout Plain Layout
10408 Manual
10409 \end_layout
10410
10411 \end_inset
10412
10413  or 
10414 \begin_inset Flex CharStyle:Code
10415 status collapsed
10416
10417 \begin_layout Plain Layout
10418 Dynamic
10419 \end_layout
10420
10421 \end_inset
10422
10423 .
10424  Then it is added to the manual or dynamic margin.
10425  
10426 \begin_inset Newline newline
10427 \end_inset
10428
10429 The argument is passed as a string.
10430  For example 
10431 \begin_inset Quotes eld
10432 \end_inset
10433
10434
10435 \begin_inset Flex CharStyle:Code
10436 status collapsed
10437
10438 \begin_layout Plain Layout
10439 MM
10440 \end_layout
10441
10442 \end_inset
10443
10444
10445 \begin_inset Quotes erd
10446 \end_inset
10447
10448  means that the paragraph is indented with the width of 
10449 \begin_inset Quotes eld
10450 \end_inset
10451
10452
10453 \begin_inset Flex CharStyle:Code
10454 status collapsed
10455
10456 \begin_layout Plain Layout
10457 MM
10458 \end_layout
10459
10460 \end_inset
10461
10462
10463 \begin_inset Quotes erd
10464 \end_inset
10465
10466  in the normal font.
10467  You can get a negative width by prefixing the string with 
10468 \begin_inset Quotes eld
10469 \end_inset
10470
10471
10472 \begin_inset Flex CharStyle:Code
10473 status collapsed
10474
10475 \begin_layout Plain Layout
10476 -
10477 \end_layout
10478
10479 \end_inset
10480
10481
10482 \begin_inset Quotes erd
10483 \end_inset
10484
10485 .
10486  This way was chosen so that the look is the same with each used screen
10487  font.
10488  
10489 \end_layout
10490
10491 \begin_layout Description
10492 \begin_inset Flex CharStyle:Code
10493 status collapsed
10494
10495 \begin_layout Plain Layout
10496 Margin
10497 \end_layout
10498
10499 \end_inset
10500
10501  [
10502 \begin_inset Flex CharStyle:Code
10503 status collapsed
10504
10505 \begin_layout Plain Layout
10506
10507 \emph on
10508 Static
10509 \emph default
10510 , Manual, Dynamic, First_Dynamic, Right_Address_Box
10511 \end_layout
10512
10513 \end_inset
10514
10515
10516 \begin_inset Newline newline
10517 \end_inset
10518
10519 The kind of margin that the layout has on the left side.
10520  
10521 \begin_inset Flex CharStyle:Code
10522 status collapsed
10523
10524 \begin_layout Plain Layout
10525 Static
10526 \end_layout
10527
10528 \end_inset
10529
10530  just means a fixed margin.
10531  
10532 \begin_inset Flex CharStyle:Code
10533 status collapsed
10534
10535 \begin_layout Plain Layout
10536 Manual
10537 \end_layout
10538
10539 \end_inset
10540
10541  means that the left margin depends on the string entered in the 
10542 \begin_inset Flex CharStyle:MenuItem
10543 status collapsed
10544
10545 \begin_layout Plain Layout
10546 Edit\SpecialChar \menuseparator
10547 Paragraph
10548 \begin_inset space ~
10549 \end_inset
10550
10551 Settings
10552 \end_layout
10553
10554 \end_inset
10555
10556  dialog.
10557  This is used to typeset nice lists without tabulators.
10558  
10559 \begin_inset Flex CharStyle:Code
10560 status collapsed
10561
10562 \begin_layout Plain Layout
10563 Dynamic
10564 \end_layout
10565
10566 \end_inset
10567
10568  means that the margin depends on the size of the label.
10569  This is used for automatic enumerated headlines.
10570  It is obvious that the headline 
10571 \begin_inset Quotes eld
10572 \end_inset
10573
10574 5.4.3.2.1 Very long headline
10575 \begin_inset Quotes erd
10576 \end_inset
10577
10578  must have a wider left margin (as wide as 
10579 \begin_inset Quotes eld
10580 \end_inset
10581
10582 5.4.3.2.1
10583 \begin_inset Quotes erd
10584 \end_inset
10585
10586  plus the space) than 
10587 \begin_inset Quotes eld
10588 \end_inset
10589
10590 3.2 Very long headline
10591 \begin_inset Quotes erd
10592 \end_inset
10593
10594 , even if standard 
10595 \begin_inset Quotes eld
10596 \end_inset
10597
10598 word processors
10599 \begin_inset Quotes erd
10600 \end_inset
10601
10602  are not able to do this.
10603  
10604 \begin_inset Flex CharStyle:Code
10605 status collapsed
10606
10607 \begin_layout Plain Layout
10608 First_Dynamic
10609 \end_layout
10610
10611 \end_inset
10612
10613  is similar, but only the very first row of the paragraph is dynamic, while
10614  the others are static; this is used, for example, for descriptions.
10615  
10616 \begin_inset Flex CharStyle:Code
10617 status collapsed
10618
10619 \begin_layout Plain Layout
10620 Right_Address_Box
10621 \end_layout
10622
10623 \end_inset
10624
10625  means the margin is chosen in a way that the longest row of this paragraph
10626  fits to the right margin.
10627  This is used to typeset an address on the right edge of the page.
10628 \end_layout
10629
10630 \begin_layout Description
10631 \begin_inset Flex CharStyle:Code
10632 status collapsed
10633
10634 \begin_layout Plain Layout
10635 NeedProtect
10636 \end_layout
10637
10638 \end_inset
10639
10640  [
10641 \begin_inset Flex CharStyle:Code
10642 status collapsed
10643
10644 \begin_layout Plain Layout
10645
10646 \emph on
10647 0
10648 \end_layout
10649
10650 \end_inset
10651
10652 ,
10653 \begin_inset Flex CharStyle:Code
10654 status collapsed
10655
10656 \begin_layout Plain Layout
10657 1
10658 \end_layout
10659
10660 \end_inset
10661
10662 ] Whether fragile commands in this layout should be 
10663 \begin_inset Flex CharStyle:Code
10664 status collapsed
10665
10666 \begin_layout Plain Layout
10667
10668 \backslash
10669 protect
10670 \end_layout
10671
10672 \end_inset
10673
10674 'ed.
10675  (Note: This is 
10676 \emph on
10677 not
10678 \emph default
10679  whether this command should itself be protected.)
10680 \end_layout
10681
10682 \begin_layout Description
10683 \begin_inset Flex CharStyle:Code
10684 status collapsed
10685
10686 \begin_layout Plain Layout
10687 Newline
10688 \end_layout
10689
10690 \end_inset
10691
10692  [
10693 \begin_inset Flex CharStyle:Code
10694 status collapsed
10695
10696 \begin_layout Plain Layout
10697 0
10698 \end_layout
10699
10700 \end_inset
10701
10702
10703 \begin_inset Flex CharStyle:Code
10704 status collapsed
10705
10706 \begin_layout Plain Layout
10707
10708 \emph on
10709 1
10710 \end_layout
10711
10712 \end_inset
10713
10714 ] Whether newlines are translated into LaTeX newlines (
10715 \begin_inset Flex CharStyle:Code
10716 status collapsed
10717
10718 \begin_layout Plain Layout
10719
10720 \backslash
10721
10722 \backslash
10723
10724 \end_layout
10725
10726 \end_inset
10727
10728 ) or not.
10729  The translation can be switched off to allow more comfortable LaTeX editing
10730  inside LyX.
10731 \end_layout
10732
10733 \begin_layout Description
10734 \begin_inset Flex CharStyle:Code
10735 status collapsed
10736
10737 \begin_layout Plain Layout
10738 NextNoIndent
10739 \end_layout
10740
10741 \end_inset
10742
10743  [
10744 \begin_inset Flex CharStyle:Code
10745 status collapsed
10746
10747 \begin_layout Plain Layout
10748 1
10749 \end_layout
10750
10751 \end_inset
10752
10753
10754 \begin_inset Flex CharStyle:Code
10755 status collapsed
10756
10757 \begin_layout Plain Layout
10758
10759 \emph on
10760 0
10761 \end_layout
10762
10763 \end_inset
10764
10765 ] Whether the following Paragraph is allowed to indent its very first row.
10766  
10767 \begin_inset Flex CharStyle:Code
10768 status collapsed
10769
10770 \begin_layout Plain Layout
10771 1
10772 \end_layout
10773
10774 \end_inset
10775
10776  means that it is not allowed to do so; 
10777 \begin_inset Flex CharStyle:Code
10778 status collapsed
10779
10780 \begin_layout Plain Layout
10781 0
10782 \end_layout
10783
10784 \end_inset
10785
10786  means it could do so if it wants to.
10787 \end_layout
10788
10789 \begin_layout Description
10790 \begin_inset Flex CharStyle:Code
10791 status collapsed
10792
10793 \begin_layout Plain Layout
10794 ObsoletedBy
10795 \end_layout
10796
10797 \end_inset
10798
10799  Name of a layout that has replaced this layout.
10800  This is used to rename a layout, while keeping backward compatibility.
10801 \end_layout
10802
10803 \begin_layout Description
10804 \begin_inset Flex CharStyle:Code
10805 status collapsed
10806
10807 \begin_layout Plain Layout
10808 OptionalArgs
10809 \end_layout
10810
10811 \end_inset
10812
10813  [
10814 \begin_inset Flex CharStyle:Code
10815 status collapsed
10816
10817 \begin_layout Plain Layout
10818 int=0
10819 \end_layout
10820
10821 \end_inset
10822
10823 ] The number of optional arguments that can be used with this layout.
10824  This is useful for things like section headings, and only makes sense with
10825  LaTeX.
10826 \end_layout
10827
10828 \begin_layout Description
10829 \begin_inset Flex CharStyle:Code
10830 status collapsed
10831
10832 \begin_layout Plain Layout
10833 ParIndent
10834 \end_layout
10835
10836 \end_inset
10837
10838  [
10839 \begin_inset Flex CharStyle:Code
10840 status collapsed
10841
10842 \begin_layout Plain Layout
10843 string=""
10844 \end_layout
10845
10846 \end_inset
10847
10848 ] The indent of the very first line of a paragraph.
10849  The 
10850 \begin_inset Flex CharStyle:Code
10851 status collapsed
10852
10853 \begin_layout Plain Layout
10854 Parindent
10855 \end_layout
10856
10857 \end_inset
10858
10859  will be fixed for a certain layout.
10860  The exception is Standard layout, since the indentation of a Standard layout
10861  paragraph can be prohibited with 
10862 \begin_inset Flex CharStyle:Code
10863 status collapsed
10864
10865 \begin_layout Plain Layout
10866 NextNoIndent
10867 \end_layout
10868
10869 \end_inset
10870
10871 .
10872  Also, Standard layout paragraphs inside environments use the 
10873 \begin_inset Flex CharStyle:Code
10874 status collapsed
10875
10876 \begin_layout Plain Layout
10877 Parindent
10878 \end_layout
10879
10880 \end_inset
10881
10882  of the environment, not their native one.
10883  For example, Standard paragraphs inside an enumeration are not indented.
10884 \end_layout
10885
10886 \begin_layout Description
10887 \begin_inset Flex CharStyle:Code
10888 status collapsed
10889
10890 \begin_layout Plain Layout
10891 Parsep
10892 \end_layout
10893
10894 \end_inset
10895
10896  [
10897 \begin_inset Flex CharStyle:Code
10898 status collapsed
10899
10900 \begin_layout Plain Layout
10901 float=0
10902 \end_layout
10903
10904 \end_inset
10905
10906 ] The vertical space between two paragraphs of this layout.
10907 \end_layout
10908
10909 \begin_layout Description
10910 \begin_inset Flex CharStyle:Code
10911 status collapsed
10912
10913 \begin_layout Plain Layout
10914 Parskip
10915 \end_layout
10916
10917 \end_inset
10918
10919  [
10920 \begin_inset Flex CharStyle:Code
10921 status collapsed
10922
10923 \begin_layout Plain Layout
10924 float=0
10925 \end_layout
10926
10927 \end_inset
10928
10929 ] LyX allows the user to choose either 
10930 \begin_inset Quotes eld
10931 \end_inset
10932
10933 indent
10934 \begin_inset Quotes erd
10935 \end_inset
10936
10937  or 
10938 \begin_inset Quotes eld
10939 \end_inset
10940
10941 skip
10942 \begin_inset Quotes erd
10943 \end_inset
10944
10945  to typeset a document.
10946  When 
10947 \begin_inset Quotes eld
10948 \end_inset
10949
10950 indent
10951 \begin_inset Quotes erd
10952 \end_inset
10953
10954  is chosen, this value is completely ignored.
10955  When 
10956 \begin_inset Quotes eld
10957 \end_inset
10958
10959 skip
10960 \begin_inset Quotes erd
10961 \end_inset
10962
10963  is chosen, the parindent of a LaTeXtype 
10964 \begin_inset Quotes eld
10965 \end_inset
10966
10967 Paragraph
10968 \begin_inset Quotes erd
10969 \end_inset
10970
10971  layout is ignored and all paragraphs are separated by this parskip argument.
10972  The vertical space is calculated with 
10973 \begin_inset Flex CharStyle:Code
10974 status collapsed
10975
10976 \begin_layout Plain Layout
10977 value
10978 \begin_inset space ~
10979 \end_inset
10980
10981 * DefaultHeight
10982 \end_layout
10983
10984 \end_inset
10985
10986  where 
10987 \begin_inset Flex CharStyle:Code
10988 status collapsed
10989
10990 \begin_layout Plain Layout
10991 DefaultHeight
10992 \end_layout
10993
10994 \end_inset
10995
10996  is the height of a row with the normal font.
10997  This way, the look stays the same with different screen fonts.
10998 \end_layout
10999
11000 \begin_layout Description
11001 \begin_inset Flex CharStyle:Code
11002 status collapsed
11003
11004 \begin_layout Plain Layout
11005 PassThru
11006 \end_layout
11007
11008 \end_inset
11009
11010  
11011 \begin_inset CommandInset label
11012 LatexCommand label
11013 name "des:PathThru"
11014
11015 \end_inset
11016
11017 [
11018 \emph on
11019
11020 \begin_inset Flex CharStyle:Code
11021 status collapsed
11022
11023 \begin_layout Plain Layout
11024
11025 \emph on
11026 0
11027 \end_layout
11028
11029 \end_inset
11030
11031
11032 \emph default
11033
11034 \begin_inset Flex CharStyle:Code
11035 status collapsed
11036
11037 \begin_layout Plain Layout
11038 1
11039 \end_layout
11040
11041 \end_inset
11042
11043 ] Whether the contents of this paragraph should be output in raw form, meaning
11044  without special translations that LaTeX would require.
11045 \end_layout
11046
11047 \begin_layout Description
11048 \begin_inset Flex CharStyle:Code
11049 status collapsed
11050
11051 \begin_layout Plain Layout
11052 Preamble
11053 \end_layout
11054
11055 \end_inset
11056
11057  
11058 \begin_inset CommandInset label
11059 LatexCommand label
11060 name "des:Preamble"
11061
11062 \end_inset
11063
11064 Information to be included in the LaTeX preamble when this style is used.
11065  Used to define macros, load packages, etc., required by this particular
11066  style.
11067  Must end with 
11068 \begin_inset Quotes eld
11069 \end_inset
11070
11071
11072 \begin_inset Flex CharStyle:Code
11073 status collapsed
11074
11075 \begin_layout Plain Layout
11076 EndPreamble
11077 \end_layout
11078
11079 \end_inset
11080
11081
11082 \begin_inset Quotes erd
11083 \end_inset
11084
11085 .
11086 \end_layout
11087
11088 \begin_layout Description
11089 \begin_inset Flex CharStyle:Code
11090 status collapsed
11091
11092 \begin_layout Plain Layout
11093 Requires 
11094 \end_layout
11095
11096 \end_inset
11097
11098 [
11099 \begin_inset Flex CharStyle:Code
11100 status collapsed
11101
11102 \begin_layout Plain Layout
11103 string
11104 \end_layout
11105
11106 \end_inset
11107
11108
11109 \begin_inset CommandInset label
11110 LatexCommand label
11111 name "des:Requires"
11112
11113 \end_inset
11114
11115 Whether the layout requires the feature 
11116 \begin_inset Flex CharStyle:Code
11117 status collapsed
11118
11119 \begin_layout Plain Layout
11120 string
11121 \end_layout
11122
11123 \end_inset
11124
11125 .
11126  See the description of 
11127 \begin_inset Flex CharStyle:Code
11128 status collapsed
11129
11130 \begin_layout Plain Layout
11131 Provides
11132 \end_layout
11133
11134 \end_inset
11135
11136  above (page 
11137 \begin_inset CommandInset ref
11138 LatexCommand pageref
11139 reference "des:FreeSpacing"
11140
11141 \end_inset
11142
11143 ) for information on `features'.
11144  
11145 \end_layout
11146
11147 \begin_layout Description
11148 \begin_inset Flex CharStyle:Code
11149 status collapsed
11150
11151 \begin_layout Plain Layout
11152 RightMargin
11153 \end_layout
11154
11155 \end_inset
11156
11157  [
11158 \begin_inset Flex CharStyle:Code
11159 status collapsed
11160
11161 \begin_layout Plain Layout
11162 string=""
11163 \end_layout
11164
11165 \end_inset
11166
11167 ] Similar to 
11168 \begin_inset Flex CharStyle:Code
11169 status collapsed
11170
11171 \begin_layout Plain Layout
11172 LeftMargin
11173 \end_layout
11174
11175 \end_inset
11176
11177 .
11178 \end_layout
11179
11180 \begin_layout Description
11181 \begin_inset Flex CharStyle:Code
11182 status collapsed
11183
11184 \begin_layout Plain Layout
11185 Spacing
11186 \end_layout
11187
11188 \end_inset
11189
11190  [
11191 \begin_inset Flex CharStyle:Code
11192 status collapsed
11193
11194 \begin_layout Plain Layout
11195
11196 \emph on
11197 single
11198 \emph default
11199 , onehalf, double, other
11200 \end_layout
11201
11202 \end_inset
11203
11204  
11205 \emph on
11206 value
11207 \emph default
11208 ] This defines what the default spacing should be in the layout.
11209  The arguments 
11210 \begin_inset Flex CharStyle:Code
11211 status collapsed
11212
11213 \begin_layout Plain Layout
11214 single
11215 \end_layout
11216
11217 \end_inset
11218
11219
11220 \begin_inset Flex CharStyle:Code
11221 status collapsed
11222
11223 \begin_layout Plain Layout
11224 onehalf
11225 \end_layout
11226
11227 \end_inset
11228
11229  and 
11230 \begin_inset Flex CharStyle:Code
11231 status collapsed
11232
11233 \begin_layout Plain Layout
11234 double
11235 \end_layout
11236
11237 \end_inset
11238
11239  correspond respectively to a multiplier value of 1, 1.25 and 1.667.
11240  If you specify the argument 
11241 \begin_inset Flex CharStyle:Code
11242 status collapsed
11243
11244 \begin_layout Plain Layout
11245 other
11246 \end_layout
11247
11248 \end_inset
11249
11250 , then you should also provide a numerical argument which will be the actual
11251  multiplier value.
11252  Note that, contrary to other parameters, 
11253 \begin_inset Flex CharStyle:Code
11254 status collapsed
11255
11256 \begin_layout Plain Layout
11257 Spacing
11258 \end_layout
11259
11260 \end_inset
11261
11262  implies the generation of specific LaTeX code, using the package 
11263 \family roman
11264
11265 \begin_inset Flex CharStyle:Code
11266 status collapsed
11267
11268 \begin_layout Plain Layout
11269 setspace.sty
11270 \end_layout
11271
11272 \end_inset
11273
11274 .
11275 \end_layout
11276
11277 \begin_layout Description
11278 \begin_inset Flex CharStyle:Code
11279 status collapsed
11280
11281 \begin_layout Plain Layout
11282 TextFont
11283 \end_layout
11284
11285 \end_inset
11286
11287  The font used for the text body .
11288  See section 
11289 \begin_inset CommandInset ref
11290 LatexCommand ref
11291 reference "sub:Font-description"
11292
11293 \end_inset
11294
11295 .
11296 \end_layout
11297
11298 \begin_layout Description
11299 \begin_inset Flex CharStyle:Code
11300 status collapsed
11301
11302 \begin_layout Plain Layout
11303
11304 \series medium
11305 TocLevel [int]
11306 \end_layout
11307
11308 \end_inset
11309
11310  The level of the style in the table of contents.
11311  This is used for automatic numbering of section headings.
11312 \end_layout
11313
11314 \begin_layout Description
11315 \begin_inset Flex CharStyle:Code
11316 status collapsed
11317
11318 \begin_layout Plain Layout
11319 TopSep
11320 \end_layout
11321
11322 \end_inset
11323
11324  [
11325 \begin_inset Flex CharStyle:Code
11326 status collapsed
11327
11328 \begin_layout Plain Layout
11329 float=0
11330 \end_layout
11331
11332 \end_inset
11333
11334 ] The vertical space with which the very first of a chain of paragraphs
11335  with this layout is separated from the previous paragraph.
11336  If the previous paragraph has another layout, the separations are not simply
11337  added, but the maximum is taken.
11338 \end_layout
11339
11340 \begin_layout Subsection
11341 Floats
11342 \begin_inset CommandInset label
11343 LatexCommand label
11344 name "sub:Floats"
11345
11346 \end_inset
11347
11348
11349 \end_layout
11350
11351 \begin_layout Standard
11352 Since version 1.3.0 of LyX, it is has been both possible and necessary to
11353  define the floats (
11354 \begin_inset Flex CharStyle:MenuItem
11355 status collapsed
11356
11357 \begin_layout Plain Layout
11358 figure
11359 \end_layout
11360
11361 \end_inset
11362
11363
11364 \begin_inset Flex CharStyle:MenuItem
11365 status collapsed
11366
11367 \begin_layout Plain Layout
11368 table
11369 \end_layout
11370
11371 \end_inset
11372
11373 , \SpecialChar \ldots{}
11374 ) in the text class itself.
11375  Standard floats are included in the file 
11376 \begin_inset Flex CharStyle:Code
11377 status collapsed
11378
11379 \begin_layout Plain Layout
11380 stdfloats.inc
11381 \end_layout
11382
11383 \end_inset
11384
11385 , so you may have to do no more than add
11386 \end_layout
11387
11388 \begin_layout LyX-Code
11389 Input stdfloats.inc
11390 \end_layout
11391
11392 \begin_layout Standard
11393 to your layout file.
11394  If you want to implement a text class that proposes some other float types
11395  (like the AGU class bundled with LyX), the information below will hopefully
11396  help you:
11397 \end_layout
11398
11399 \begin_layout Description
11400 \begin_inset Flex CharStyle:Code
11401 status collapsed
11402
11403 \begin_layout Plain Layout
11404 Extension
11405 \end_layout
11406
11407 \end_inset
11408
11409  [
11410 \begin_inset Flex CharStyle:Code
11411 status collapsed
11412
11413 \begin_layout Plain Layout
11414 string
11415 \end_layout
11416
11417 \end_inset
11418
11419 =
11420 \begin_inset Quotes erd
11421 \end_inset
11422
11423
11424 \begin_inset Quotes erd
11425 \end_inset
11426
11427 ] The file name extension of an auxiliary file for the list of figures (or
11428  whatever).
11429  LaTeX writes the captions to this file.
11430 \end_layout
11431
11432 \begin_layout Description
11433 \begin_inset Flex CharStyle:Code
11434 status collapsed
11435
11436 \begin_layout Plain Layout
11437 GuiName
11438 \end_layout
11439
11440 \end_inset
11441
11442  [
11443 \begin_inset Flex CharStyle:Code
11444 status collapsed
11445
11446 \begin_layout Plain Layout
11447 string
11448 \end_layout
11449
11450 \end_inset
11451
11452 =
11453 \begin_inset Quotes erd
11454 \end_inset
11455
11456
11457 \begin_inset Quotes erd
11458 \end_inset
11459
11460 ] The string that will be used in the menus and also for the caption.
11461  This is translated to the current language if babel is used.
11462 \end_layout
11463
11464 \begin_layout Description
11465 \begin_inset Flex CharStyle:Code
11466 status collapsed
11467
11468 \begin_layout Plain Layout
11469 LaTeXBuiltin
11470 \end_layout
11471
11472 \end_inset
11473
11474  [
11475 \begin_inset Flex CharStyle:Code
11476 status collapsed
11477
11478 \begin_layout Plain Layout
11479
11480 \emph on
11481 0
11482 \end_layout
11483
11484 \end_inset
11485
11486
11487 \begin_inset Flex CharStyle:Code
11488 status collapsed
11489
11490 \begin_layout Plain Layout
11491 1
11492 \end_layout
11493
11494 \end_inset
11495
11496 ] Set to 
11497 \begin_inset Flex CharStyle:Code
11498 status collapsed
11499
11500 \begin_layout Plain Layout
11501 1
11502 \end_layout
11503
11504 \end_inset
11505
11506  if the float is already defined by the LaTeX document class.
11507  If this is set to 
11508 \begin_inset Flex CharStyle:Code
11509 status collapsed
11510
11511 \begin_layout Plain Layout
11512 0
11513 \end_layout
11514
11515 \end_inset
11516
11517 , the float will be defined using the LaTeX package 
11518 \begin_inset Flex CharStyle:Code
11519 status collapsed
11520
11521 \begin_layout Plain Layout
11522 float
11523 \end_layout
11524
11525 \end_inset
11526
11527 .
11528 \end_layout
11529
11530 \begin_layout Description
11531 \begin_inset Flex CharStyle:Code
11532 status collapsed
11533
11534 \begin_layout Plain Layout
11535 ListName
11536 \end_layout
11537
11538 \end_inset
11539
11540  [
11541 \begin_inset Flex CharStyle:Code
11542 status collapsed
11543
11544 \begin_layout Plain Layout
11545 string
11546 \end_layout
11547
11548 \end_inset
11549
11550 =
11551 \begin_inset Quotes erd
11552 \end_inset
11553
11554
11555 \begin_inset Quotes erd
11556 \end_inset
11557
11558 ] The heading used for the list of floats.
11559  This is translated to the document language.
11560 \end_layout
11561
11562 \begin_layout Description
11563 \begin_inset Flex CharStyle:Code
11564 status collapsed
11565
11566 \begin_layout Plain Layout
11567 NumberWithin
11568 \end_layout
11569
11570 \end_inset
11571
11572  [
11573 \begin_inset Flex CharStyle:Code
11574 status collapsed
11575
11576 \begin_layout Plain Layout
11577 string
11578 \end_layout
11579
11580 \end_inset
11581
11582 =
11583 \begin_inset Quotes erd
11584 \end_inset
11585
11586
11587 \begin_inset Quotes erd
11588 \end_inset
11589
11590 ] This (optional) argument determines whether floats of this class will
11591  be numbered within some sectional unit of the document.
11592  For example, if within is equal to 
11593 \begin_inset Flex CharStyle:Code
11594 status collapsed
11595
11596 \begin_layout Plain Layout
11597 chapter
11598 \end_layout
11599
11600 \end_inset
11601
11602 , the floats will be numbered within chapters.
11603  
11604 \end_layout
11605
11606 \begin_layout Description
11607 \begin_inset Flex CharStyle:Code
11608 status collapsed
11609
11610 \begin_layout Plain Layout
11611 Placement
11612 \end_layout
11613
11614 \end_inset
11615
11616  [
11617 \begin_inset Flex CharStyle:Code
11618 status collapsed
11619
11620 \begin_layout Plain Layout
11621 string
11622 \end_layout
11623
11624 \end_inset
11625
11626 =
11627 \begin_inset Quotes erd
11628 \end_inset
11629
11630
11631 \begin_inset Quotes erd
11632 \end_inset
11633
11634 ] The default placement for the given class of floats.
11635  The string should be as in standard LaTeX: 
11636 \begin_inset Flex CharStyle:Code
11637 status collapsed
11638
11639 \begin_layout Plain Layout
11640 t
11641 \end_layout
11642
11643 \end_inset
11644
11645
11646 \begin_inset Flex CharStyle:Code
11647 status collapsed
11648
11649 \begin_layout Plain Layout
11650 b
11651 \end_layout
11652
11653 \end_inset
11654
11655
11656 \begin_inset Flex CharStyle:Code
11657 status collapsed
11658
11659 \begin_layout Plain Layout
11660 p
11661 \end_layout
11662
11663 \end_inset
11664
11665  and 
11666 \begin_inset Flex CharStyle:Code
11667 status collapsed
11668
11669 \begin_layout Plain Layout
11670 h
11671 \end_layout
11672
11673 \end_inset
11674
11675  for top, bottom, page, and here, respectively.
11676 \begin_inset Foot
11677 status collapsed
11678
11679 \begin_layout Plain Layout
11680 Note that the order of these letters in the string is irrelevant, like in
11681  LaTeX.
11682 \end_layout
11683
11684 \end_inset
11685
11686  On top of that there is a new type, 
11687 \begin_inset Flex CharStyle:Code
11688 status collapsed
11689
11690 \begin_layout Plain Layout
11691 H
11692 \end_layout
11693
11694 \end_inset
11695
11696 , which does not really correspond to a float, since it means: put it 
11697 \begin_inset Quotes eld
11698 \end_inset
11699
11700 here
11701 \begin_inset Quotes erd
11702 \end_inset
11703
11704  and nowhere else.
11705  Note however that the 
11706 \begin_inset Flex CharStyle:Code
11707 status collapsed
11708
11709 \begin_layout Plain Layout
11710 H
11711 \end_layout
11712
11713 \end_inset
11714
11715  specifier is special and, because of implementation details, cannot be
11716  used in non-built in float types.
11717  If you do not understand what this means, just use 
11718 \begin_inset Quotes eld
11719 \end_inset
11720
11721
11722 \begin_inset Flex CharStyle:Code
11723 status collapsed
11724
11725 \begin_layout Plain Layout
11726 tbp
11727 \end_layout
11728
11729 \end_inset
11730
11731
11732 \begin_inset Quotes erd
11733 \end_inset
11734
11735 .
11736 \end_layout
11737
11738 \begin_layout Description
11739 \begin_inset Flex CharStyle:Code
11740 status collapsed
11741
11742 \begin_layout Plain Layout
11743 Style
11744 \end_layout
11745
11746 \end_inset
11747
11748  [
11749 \begin_inset Flex CharStyle:Code
11750 status collapsed
11751
11752 \begin_layout Plain Layout
11753 string
11754 \end_layout
11755
11756 \end_inset
11757
11758 =
11759 \begin_inset Quotes erd
11760 \end_inset
11761
11762
11763 \begin_inset Quotes erd
11764 \end_inset
11765
11766 ] The style used when defining the float using 
11767 \begin_inset Flex CharStyle:Code
11768 status collapsed
11769
11770 \begin_layout Plain Layout
11771
11772 \backslash
11773 newfloat
11774 \end_layout
11775
11776 \end_inset
11777
11778 .
11779 \end_layout
11780
11781 \begin_layout Description
11782 \begin_inset Flex CharStyle:Code
11783 status collapsed
11784
11785 \begin_layout Plain Layout
11786 Type
11787 \end_layout
11788
11789 \end_inset
11790
11791  [
11792 \begin_inset Flex CharStyle:Code
11793 status collapsed
11794
11795 \begin_layout Plain Layout
11796 string
11797 \end_layout
11798
11799 \end_inset
11800
11801 =
11802 \begin_inset Quotes erd
11803 \end_inset
11804
11805
11806 \begin_inset Quotes erd
11807 \end_inset
11808
11809 ] The 
11810 \begin_inset Quotes eld
11811 \end_inset
11812
11813 type
11814 \begin_inset Quotes erd
11815 \end_inset
11816
11817  of the new class of floats, like program or algorithm.
11818  After the appropriate 
11819 \begin_inset Flex CharStyle:Code
11820 status collapsed
11821
11822 \begin_layout Plain Layout
11823
11824 \backslash
11825 newfloat
11826 \end_layout
11827
11828 \end_inset
11829
11830 , commands such as 
11831 \begin_inset Flex CharStyle:Code
11832 status collapsed
11833
11834 \begin_layout Plain Layout
11835
11836 \backslash
11837 begin{program}
11838 \end_layout
11839
11840 \end_inset
11841
11842  or 
11843 \begin_inset Flex CharStyle:Code
11844 status collapsed
11845
11846 \begin_layout Plain Layout
11847
11848 \backslash
11849 end{algorithm*}
11850 \end_layout
11851
11852 \end_inset
11853
11854  will be available.
11855 \end_layout
11856
11857 \begin_layout Standard
11858 Note that defining a float with type 
11859 \begin_inset Flex CharStyle:Code
11860 status collapsed
11861
11862 \begin_layout Plain Layout
11863
11864 \emph on
11865 type
11866 \end_layout
11867
11868 \end_inset
11869
11870  automatically defines the corresponding counter with name 
11871 \begin_inset Flex CharStyle:Code
11872 status collapsed
11873
11874 \begin_layout Plain Layout
11875
11876 \emph on
11877 type
11878 \end_layout
11879
11880 \end_inset
11881
11882 .
11883 \end_layout
11884
11885 \begin_layout Subsection
11886 Flex insets and InsetLayout
11887 \begin_inset CommandInset label
11888 LatexCommand label
11889 name "sub:Flex-insets-and"
11890
11891 \end_inset
11892
11893
11894 \end_layout
11895
11896 \begin_layout Standard
11897 LyX has supported character styles since version 1.4.0; as of version 1.6.0,
11898  these are called Flex insets.
11899  
11900 \end_layout
11901
11902 \begin_layout Standard
11903 Flex insets come in three different kinds: 
11904 \end_layout
11905
11906 \begin_layout Itemize
11907 character style (
11908 \begin_inset Flex CharStyle:Code
11909 status collapsed
11910
11911 \begin_layout Plain Layout
11912 CharStyle
11913 \end_layout
11914
11915 \end_inset
11916
11917 ): These define semantic markup corresponding to such LaTeX commands as
11918  
11919 \begin_inset Flex CharStyle:Code
11920 status collapsed
11921
11922 \begin_layout Plain Layout
11923
11924 \backslash
11925 noun
11926 \end_layout
11927
11928 \end_inset
11929
11930  and 
11931 \begin_inset Flex CharStyle:Code
11932 status collapsed
11933
11934 \begin_layout Plain Layout
11935
11936 \backslash
11937 code
11938 \end_layout
11939
11940 \end_inset
11941
11942 .
11943 \end_layout
11944
11945 \begin_layout Itemize
11946 user custom (
11947 \begin_inset Flex CharStyle:Code
11948 status collapsed
11949
11950 \begin_layout Plain Layout
11951 Custom
11952 \end_layout
11953
11954 \end_inset
11955
11956 ): These can be used to define custom collapsible insets, similar to TeX
11957  code, footnote, and the like.
11958  An obvious example is an endnote inset, which is defined in the 
11959 \begin_inset Flex CharStyle:Code
11960 status collapsed
11961
11962 \begin_layout Plain Layout
11963 endnote
11964 \end_layout
11965
11966 \end_inset
11967
11968  module.
11969 \end_layout
11970
11971 \begin_layout Itemize
11972 XML elements (
11973 \begin_inset Flex CharStyle:Code
11974 status collapsed
11975
11976 \begin_layout Plain Layout
11977 Element
11978 \end_layout
11979
11980 \end_inset
11981
11982 ): For use with DocBook classes.
11983 \end_layout
11984
11985 \begin_layout Standard
11986 Flex insets are defined using the 
11987 \begin_inset Flex CharStyle:Code
11988 status collapsed
11989
11990 \begin_layout Plain Layout
11991 InsetLayout
11992 \end_layout
11993
11994 \end_inset
11995
11996  tag, which shall be explained in a moment.
11997 \end_layout
11998
11999 \begin_layout Standard
12000 The 
12001 \begin_inset Flex CharStyle:Code
12002 status collapsed
12003
12004 \begin_layout Plain Layout
12005 InsetLayout
12006 \end_layout
12007
12008 \end_inset
12009
12010  tag also serves another function: It can be used to customize the general
12011  layout of many different types of insets.
12012  Currently, 
12013 \begin_inset Flex CharStyle:Code
12014 status collapsed
12015
12016 \begin_layout Plain Layout
12017 InsetLayout
12018 \end_layout
12019
12020 \end_inset
12021
12022  can be used to customize the layout parameters for footnotes, marginal
12023  notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
12024  boxes, tables, algorithms, URLs, and optional arguments, as well as to
12025  define Flex insets.
12026 \end_layout
12027
12028 \begin_layout Standard
12029 The 
12030 \begin_inset Flex CharStyle:Code
12031 status collapsed
12032
12033 \begin_layout Plain Layout
12034 InsetLayout
12035 \end_layout
12036
12037 \end_inset
12038
12039  definition must begin with a line of the form:
12040 \end_layout
12041
12042 \begin_layout LyX-Code
12043 InsetLayout <Type>
12044 \end_layout
12045
12046 \begin_layout Standard
12047 Here 
12048 \begin_inset Flex CharStyle:Code
12049 status collapsed
12050
12051 \begin_layout Plain Layout
12052 <Type>
12053 \end_layout
12054
12055 \end_inset
12056
12057  indicates the inset whose layout is being defined, and here there are two
12058  cases.
12059 \end_layout
12060
12061 \begin_layout Enumerate
12062 The layout for a pre-existing inset is being modified.
12063  In this case, can be 
12064 \begin_inset Flex CharStyle:Code
12065 status collapsed
12066
12067 \begin_layout Plain Layout
12068 <Type>
12069 \end_layout
12070
12071 \end_inset
12072
12073  any one of the following: 
12074 \begin_inset Flex CharStyle:Code
12075 status collapsed
12076
12077 \begin_layout Plain Layout
12078 Algorithm
12079 \end_layout
12080
12081 \end_inset
12082
12083
12084 \begin_inset Flex CharStyle:Code
12085 status collapsed
12086
12087 \begin_layout Plain Layout
12088 Branch
12089 \end_layout
12090
12091 \end_inset
12092
12093
12094 \begin_inset Flex CharStyle:Code
12095 status collapsed
12096
12097 \begin_layout Plain Layout
12098 Box
12099 \end_layout
12100
12101 \end_inset
12102
12103
12104 \begin_inset Flex CharStyle:Code
12105 status collapsed
12106
12107 \begin_layout Plain Layout
12108 Box:shaded
12109 \end_layout
12110
12111 \end_inset
12112
12113
12114 \begin_inset Flex CharStyle:Code
12115 status collapsed
12116
12117 \begin_layout Plain Layout
12118 ERT
12119 \end_layout
12120
12121 \end_inset
12122
12123
12124 \begin_inset Flex CharStyle:Code
12125 status collapsed
12126
12127 \begin_layout Plain Layout
12128 Figure
12129 \end_layout
12130
12131 \end_inset
12132
12133
12134 \begin_inset Flex CharStyle:Code
12135 status collapsed
12136
12137 \begin_layout Plain Layout
12138 Foot
12139 \end_layout
12140
12141 \end_inset
12142
12143
12144 \begin_inset Flex CharStyle:Code
12145 status collapsed
12146
12147 \begin_layout Plain Layout
12148 Index
12149 \end_layout
12150
12151 \end_inset
12152
12153
12154 \begin_inset Flex CharStyle:Code
12155 status collapsed
12156
12157 \begin_layout Plain Layout
12158 Info
12159 \end_layout
12160
12161 \end_inset
12162
12163
12164 \begin_inset Flex CharStyle:Code
12165 status collapsed
12166
12167 \begin_layout Plain Layout
12168 Info:menu
12169 \end_layout
12170
12171 \end_inset
12172
12173
12174 \begin_inset Flex CharStyle:Code
12175 status collapsed
12176
12177 \begin_layout Plain Layout
12178 Info:shortcut
12179 \end_layout
12180
12181 \end_inset
12182
12183
12184 \begin_inset Flex CharStyle:Code
12185 status collapsed
12186
12187 \begin_layout Plain Layout
12188 Info:shortcuts
12189 \end_layout
12190
12191 \end_inset
12192
12193
12194 \begin_inset Flex CharStyle:Code
12195 status collapsed
12196
12197 \begin_layout Plain Layout
12198 Listings
12199 \end_layout
12200
12201 \end_inset
12202
12203
12204 \begin_inset Flex CharStyle:Code
12205 status collapsed
12206
12207 \begin_layout Plain Layout
12208 Marginal
12209 \end_layout
12210
12211 \end_inset
12212
12213
12214 \begin_inset Flex CharStyle:Code
12215 status collapsed
12216
12217 \begin_layout Plain Layout
12218 Note:Comment
12219 \end_layout
12220
12221 \end_inset
12222
12223
12224 \begin_inset Flex CharStyle:Code
12225 status collapsed
12226
12227 \begin_layout Plain Layout
12228 Note:Note
12229 \end_layout
12230
12231 \end_inset
12232
12233
12234 \begin_inset Flex CharStyle:Code
12235 status collapsed
12236
12237 \begin_layout Plain Layout
12238 Note:GreyedOut
12239 \end_layout
12240
12241 \end_inset
12242
12243
12244 \begin_inset Flex CharStyle:Code
12245 status collapsed
12246
12247 \begin_layout Plain Layout
12248 OptArg
12249 \end_layout
12250
12251 \end_inset
12252
12253
12254 \begin_inset Flex CharStyle:Code
12255 status collapsed
12256
12257 \begin_layout Plain Layout
12258 Table
12259 \end_layout
12260
12261 \end_inset
12262
12263 , or 
12264 \begin_inset Flex CharStyle:Code
12265 status collapsed
12266
12267 \begin_layout Plain Layout
12268 URL
12269 \end_layout
12270
12271 \end_inset
12272
12273 .
12274 \end_layout
12275
12276 \begin_layout Enumerate
12277 The layout for a Flex inset is being defined.
12278  In this case, 
12279 \begin_inset Flex CharStyle:Code
12280 status collapsed
12281
12282 \begin_layout Plain Layout
12283 <Type>
12284 \end_layout
12285
12286 \end_inset
12287
12288  can be any valid identifier not used by a pre-existing inset.
12289  Note that the definition of a flex inset must
12290 \emph on
12291  als
12292 \emph default
12293 o include a 
12294 \begin_inset Flex CharStyle:Code
12295 status collapsed
12296
12297 \begin_layout Plain Layout
12298 LyXType
12299 \end_layout
12300
12301 \end_inset
12302
12303  entry.
12304 \end_layout
12305
12306 \begin_layout Standard
12307 The 
12308 \begin_inset Flex CharStyle:Code
12309 status collapsed
12310
12311 \begin_layout Plain Layout
12312 InsetLayout
12313 \end_layout
12314
12315 \end_inset
12316
12317  definition can contain the following entries:
12318 \end_layout
12319
12320 \begin_layout Description
12321 \begin_inset Flex CharStyle:Code
12322 status collapsed
12323
12324 \begin_layout Plain Layout
12325 BgColor
12326 \end_layout
12327
12328 \end_inset
12329
12330  The color for the inset's background.
12331  The valid colors are defined in 
12332 \begin_inset Flex CharStyle:Code
12333 status collapsed
12334
12335 \begin_layout Plain Layout
12336 src/ColorCode.h
12337 \end_layout
12338
12339 \end_inset
12340
12341 .
12342 \end_layout
12343
12344 \begin_layout Description
12345 \begin_inset Flex CharStyle:Code
12346 status collapsed
12347
12348 \begin_layout Plain Layout
12349 CopyStyle
12350 \end_layout
12351
12352 \end_inset
12353
12354  As with paragraph styles (see page 
12355 \begin_inset CommandInset ref
12356 LatexCommand ref
12357 reference "des:CopyStyle"
12358
12359 \end_inset
12360
12361 ).
12362 \end_layout
12363
12364 \begin_layout Description
12365 \begin_inset Flex CharStyle:Code
12366 status collapsed
12367
12368 \begin_layout Plain Layout
12369 CustomPars
12370 \end_layout
12371
12372 \end_inset
12373
12374  [
12375 \begin_inset Flex CharStyle:Code
12376 status collapsed
12377
12378 \begin_layout Plain Layout
12379
12380 \emph on
12381 0
12382 \end_layout
12383
12384 \end_inset
12385
12386 ,
12387 \begin_inset Flex CharStyle:Code
12388 status collapsed
12389
12390 \begin_layout Plain Layout
12391 1
12392 \end_layout
12393
12394 \end_inset
12395
12396 ] Indicates whether the user may employ the Paragraph Settings dialog to
12397  customize the paragraph.
12398 \end_layout
12399
12400 \begin_layout Description
12401 \begin_inset Flex CharStyle:Code
12402 status collapsed
12403
12404 \begin_layout Plain Layout
12405 Decoration
12406 \end_layout
12407
12408 \end_inset
12409
12410  can be 
12411 \begin_inset Flex CharStyle:Code
12412 status collapsed
12413
12414 \begin_layout Plain Layout
12415 Classic
12416 \end_layout
12417
12418 \end_inset
12419
12420
12421 \begin_inset Flex CharStyle:Code
12422 status collapsed
12423
12424 \begin_layout Plain Layout
12425 Minimalistic
12426 \end_layout
12427
12428 \end_inset
12429
12430 , or 
12431 \begin_inset Flex CharStyle:Code
12432 status collapsed
12433
12434 \begin_layout Plain Layout
12435 Conglomerate
12436 \end_layout
12437
12438 \end_inset
12439
12440 , describing the rendering style used for the inset's frame and buttons.
12441  Footnotes generally use 
12442 \begin_inset Flex CharStyle:Code
12443 status collapsed
12444
12445 \begin_layout Plain Layout
12446 Classic
12447 \end_layout
12448
12449 \end_inset
12450
12451 , ERT insets generally 
12452 \begin_inset Flex CharStyle:Code
12453 status collapsed
12454
12455 \begin_layout Plain Layout
12456 Minimalistic
12457 \end_layout
12458
12459 \end_inset
12460
12461 , and character styles 
12462 \begin_inset Flex CharStyle:Code
12463 status collapsed
12464
12465 \begin_layout Plain Layout
12466 Conglomerate
12467 \end_layout
12468
12469 \end_inset
12470
12471 .
12472 \end_layout
12473
12474 \begin_layout Description
12475 \begin_inset Flex CharStyle:Code
12476 status collapsed
12477
12478 \begin_layout Plain Layout
12479 End
12480 \end_layout
12481
12482 \end_inset
12483
12484  Required at the end of the InsetLayout declarations.
12485 \end_layout
12486
12487 \begin_layout Description
12488 \begin_inset Flex CharStyle:Code
12489 status collapsed
12490
12491 \begin_layout Plain Layout
12492 Font
12493 \end_layout
12494
12495 \end_inset
12496
12497  The font used for both the text body 
12498 \emph on
12499 and
12500 \emph default
12501  the label.
12502  See section
12503 \begin_inset space ~
12504 \end_inset
12505
12506
12507 \begin_inset CommandInset ref
12508 LatexCommand ref
12509 reference "sub:Font-description"
12510
12511 \end_inset
12512
12513 .
12514  Note that defining this font automatically defines the 
12515 \begin_inset Flex CharStyle:Code
12516 status collapsed
12517
12518 \begin_layout Plain Layout
12519 LabelFont
12520 \end_layout
12521
12522 \end_inset
12523
12524  to the same value, so define this first and define 
12525 \begin_inset Flex CharStyle:Code
12526 status collapsed
12527
12528 \begin_layout Plain Layout
12529 LabelFont
12530 \end_layout
12531
12532 \end_inset
12533
12534  later if you want them to be different.
12535 \end_layout
12536
12537 \begin_layout Description
12538 \begin_inset Flex CharStyle:Code
12539 status collapsed
12540
12541 \begin_layout Plain Layout
12542 ForceLTR
12543 \end_layout
12544
12545 \end_inset
12546
12547  Force the 
12548 \begin_inset Quotes eld
12549 \end_inset
12550
12551 latex
12552 \begin_inset Quotes erd
12553 \end_inset
12554
12555  language, leading to Left-to-Right (latin) output, e.
12556 \begin_inset space \thinspace{}
12557 \end_inset
12558
12559 g.
12560 \begin_inset space \space{}
12561 \end_inset
12562
12563 in TeX code or URL.
12564  A kludge.
12565 \end_layout
12566
12567 \begin_layout Description
12568 \begin_inset Flex CharStyle:Code
12569 status collapsed
12570
12571 \begin_layout Plain Layout
12572 ForcePlain
12573 \end_layout
12574
12575 \end_inset
12576
12577  [
12578 \begin_inset Flex CharStyle:Code
12579 status collapsed
12580
12581 \begin_layout Plain Layout
12582
12583 \emph on
12584 0
12585 \end_layout
12586
12587 \end_inset
12588
12589 ,
12590 \begin_inset Flex CharStyle:Code
12591 status collapsed
12592
12593 \begin_layout Plain Layout
12594 1
12595 \end_layout
12596
12597 \end_inset
12598
12599 ] Indicates whether the PlainLayout should be used or, instead, the user
12600  can change the paragraph style used in the inset.
12601 \end_layout
12602
12603 \begin_layout Description
12604 \begin_inset Flex CharStyle:Code
12605 status collapsed
12606
12607 \begin_layout Plain Layout
12608 FreeSpacing
12609 \end_layout
12610
12611 \end_inset
12612
12613  As with paragraph styles (see page 
12614 \begin_inset CommandInset ref
12615 LatexCommand pageref
12616 reference "des:FreeSpacing"
12617
12618 \end_inset
12619
12620 ).
12621 \end_layout
12622
12623 \begin_layout Description
12624 \begin_inset Flex CharStyle:Code
12625 status collapsed
12626
12627 \begin_layout Plain Layout
12628 InToc
12629 \end_layout
12630
12631 \end_inset
12632
12633  [
12634 \begin_inset Flex CharStyle:Code
12635 status collapsed
12636
12637 \begin_layout Plain Layout
12638
12639 \emph on
12640 0
12641 \end_layout
12642
12643 \end_inset
12644
12645 ,
12646 \begin_inset Flex CharStyle:Code
12647 status collapsed
12648
12649 \begin_layout Plain Layout
12650 1
12651 \end_layout
12652
12653 \end_inset
12654
12655 ] Whether to include the contents of this inset in the strings generated
12656  for the `Outline' pane.
12657  One would not, for example, want the content of a footnote in a section
12658  header to be included in the TOC displayed in the outline, but one would
12659  normally want the content of a character style displayed.
12660  Default is false: not to include.
12661 \end_layout
12662
12663 \begin_layout Description
12664 \begin_inset Flex CharStyle:Code
12665 status collapsed
12666
12667 \begin_layout Plain Layout
12668 KeepEmpty
12669 \end_layout
12670
12671 \end_inset
12672
12673  As with paragraph styles (see page 
12674 \begin_inset CommandInset ref
12675 LatexCommand pageref
12676 reference "des:KeepEmpty"
12677
12678 \end_inset
12679
12680 ).
12681 \end_layout
12682
12683 \begin_layout Description
12684 \begin_inset Flex CharStyle:Code
12685 status collapsed
12686
12687 \begin_layout Plain Layout
12688 LabelFont
12689 \end_layout
12690
12691 \end_inset
12692
12693  The font used for the label.
12694  See section
12695 \begin_inset space ~
12696 \end_inset
12697
12698
12699 \begin_inset CommandInset ref
12700 LatexCommand ref
12701 reference "sub:Font-description"
12702
12703 \end_inset
12704
12705 .
12706  Note that this definition can never appear before 
12707 \begin_inset Flex CharStyle:Code
12708 status collapsed
12709
12710 \begin_layout Plain Layout
12711 Font
12712 \end_layout
12713
12714 \end_inset
12715
12716 , lest it be ineffective.
12717 \end_layout
12718
12719 \begin_layout Description
12720 \begin_inset Flex CharStyle:Code
12721 status collapsed
12722
12723 \begin_layout Plain Layout
12724 LabelString
12725 \end_layout
12726
12727 \end_inset
12728
12729  What will be displayed on the button or elsewhere as the inset label.
12730  Some inset types (TeX code and Branch) modify this label on the fly.
12731 \end_layout
12732
12733 \begin_layout Description
12734 \begin_inset Flex CharStyle:Code
12735 status collapsed
12736
12737 \begin_layout Plain Layout
12738 LatexName
12739 \end_layout
12740
12741 \end_inset
12742
12743  The name of the corresponding LaTeX stuff.
12744  Either the environment or command name.
12745 \end_layout
12746
12747 \begin_layout Description
12748 \begin_inset Flex CharStyle:Code
12749 status collapsed
12750
12751 \begin_layout Plain Layout
12752 LatexParam
12753 \end_layout
12754
12755 \end_inset
12756
12757  The optional parameter for the corresponding 
12758 \begin_inset Flex CharStyle:Code
12759 status collapsed
12760
12761 \begin_layout Plain Layout
12762 LatexName
12763 \end_layout
12764
12765 \end_inset
12766
12767  stuff, including possible bracket pairs like 
12768 \begin_inset Flex CharStyle:Code
12769 status collapsed
12770
12771 \begin_layout Plain Layout
12772 []
12773 \end_layout
12774
12775 \end_inset
12776
12777 .
12778  This parameter cannot be changed from within LyX.
12779 \end_layout
12780
12781 \begin_layout Description
12782 \begin_inset Flex CharStyle:Code
12783 status collapsed
12784
12785 \begin_layout Plain Layout
12786 LatexType
12787 \end_layout
12788
12789 \end_inset
12790
12791  As with paragraph styles (see page 
12792 \begin_inset CommandInset ref
12793 LatexCommand pageref
12794 reference "des:LatexType"
12795
12796 \end_inset
12797
12798 ).
12799 \end_layout
12800
12801 \begin_layout Description
12802 \begin_inset Flex CharStyle:Code
12803 status collapsed
12804
12805 \begin_layout Plain Layout
12806 LyxType 
12807 \end_layout
12808
12809 \end_inset
12810
12811  Can be 
12812 \begin_inset Flex CharStyle:Code
12813 status collapsed
12814
12815 \begin_layout Plain Layout
12816 charstyle
12817 \end_layout
12818
12819 \end_inset
12820
12821
12822 \begin_inset Flex CharStyle:Code
12823 status collapsed
12824
12825 \begin_layout Plain Layout
12826 custom
12827 \end_layout
12828
12829 \end_inset
12830
12831
12832 \begin_inset Flex CharStyle:Code
12833 status collapsed
12834
12835 \begin_layout Plain Layout
12836 element
12837 \end_layout
12838
12839 \end_inset
12840
12841 , or 
12842 \begin_inset Flex CharStyle:Code
12843 status collapsed
12844
12845 \begin_layout Plain Layout
12846 end
12847 \end_layout
12848
12849 \end_inset
12850
12851  (indicating a dummy definition ending definitions of charstyles, etc).
12852  This entry is required in and is only meaningful for Flex insets.
12853  Among other things, it determines on which menu this inset will appear.
12854 \end_layout
12855
12856 \begin_layout Description
12857 \begin_inset Flex CharStyle:Code
12858 status collapsed
12859
12860 \begin_layout Plain Layout
12861 MultiPar
12862 \end_layout
12863
12864 \end_inset
12865
12866  [
12867 \begin_inset Flex CharStyle:Code
12868 status collapsed
12869
12870 \begin_layout Plain Layout
12871
12872 \emph on
12873 0
12874 \end_layout
12875
12876 \end_inset
12877
12878 ,
12879 \begin_inset Flex CharStyle:Code
12880 status collapsed
12881
12882 \begin_layout Plain Layout
12883 1
12884 \end_layout
12885
12886 \end_inset
12887
12888 ] Whether multiple paragraphs are permitted in this inset.
12889  This will also set CustomPars to the same value and ForcePlain to the opposite
12890  value.
12891  These can be reset to other values, if they are used 
12892 \emph on
12893 after
12894 \emph default
12895  MultiPar.
12896 \end_layout
12897
12898 \begin_layout Description
12899 \begin_inset Flex CharStyle:Code
12900 status collapsed
12901
12902 \begin_layout Plain Layout
12903 NeedProtect
12904 \end_layout
12905
12906 \end_inset
12907
12908  [
12909 \begin_inset Flex CharStyle:Code
12910 status collapsed
12911
12912 \begin_layout Plain Layout
12913
12914 \emph on
12915 0
12916 \end_layout
12917
12918 \end_inset
12919
12920 ,
12921 \begin_inset Flex CharStyle:Code
12922 status collapsed
12923
12924 \begin_layout Plain Layout
12925 1
12926 \end_layout
12927
12928 \end_inset
12929
12930 ] Whether fragile commands in this layout should be 
12931 \begin_inset Flex CharStyle:Code
12932 status collapsed
12933
12934 \begin_layout Plain Layout
12935
12936 \backslash
12937 protect
12938 \end_layout
12939
12940 \end_inset
12941
12942 'ed.
12943  (Note: This is 
12944 \emph on
12945 not
12946 \emph default
12947  whether the command should itself be protected.)
12948 \end_layout
12949
12950 \begin_layout Description
12951 \begin_inset Flex CharStyle:Code
12952 status collapsed
12953
12954 \begin_layout Plain Layout
12955 PassThru
12956 \end_layout
12957
12958 \end_inset
12959
12960  [
12961 \begin_inset Flex CharStyle:Code
12962 status collapsed
12963
12964 \begin_layout Plain Layout
12965
12966 \emph on
12967 0
12968 \end_layout
12969
12970 \end_inset
12971
12972 ,
12973 \begin_inset Flex CharStyle:Code
12974 status collapsed
12975
12976 \begin_layout Plain Layout
12977 1
12978 \end_layout
12979
12980 \end_inset
12981
12982 ] As with paragraph styles (see page 
12983 \begin_inset CommandInset ref
12984 LatexCommand ref
12985 reference "des:PathThru"
12986
12987 \end_inset
12988
12989 ).
12990 \end_layout
12991
12992 \begin_layout Description
12993 \begin_inset Flex CharStyle:Code
12994 status collapsed
12995
12996 \begin_layout Plain Layout
12997 Preamble
12998 \end_layout
12999
13000 \end_inset
13001
13002  As with paragraph styles (see page 
13003 \begin_inset CommandInset ref
13004 LatexCommand pageref
13005 reference "des:Preamble"
13006
13007 \end_inset
13008
13009 ).
13010 \end_layout
13011
13012 \begin_layout Description
13013 \begin_inset Flex CharStyle:Code
13014 status collapsed
13015
13016 \begin_layout Plain Layout
13017 Requires 
13018 \end_layout
13019
13020 \end_inset
13021
13022  [
13023 \begin_inset Flex CharStyle:Code
13024 status collapsed
13025
13026 \begin_layout Plain Layout
13027 string
13028 \end_layout
13029
13030 \end_inset
13031
13032 ] As with paragraph styles (see page 
13033 \begin_inset CommandInset ref
13034 LatexCommand pageref
13035 reference "des:Requires"
13036
13037 \end_inset
13038
13039 ).
13040 \end_layout
13041
13042 \begin_layout Subsection
13043 Counters
13044 \begin_inset CommandInset label
13045 LatexCommand label
13046 name "sub:Counters"
13047
13048 \end_inset
13049
13050
13051 \end_layout
13052
13053 \begin_layout Standard
13054 Since version 1.3.0 of LyX, it is both possible and necessary to define the
13055  counters (
13056 \begin_inset Flex CharStyle:MenuItem
13057 status collapsed
13058
13059 \begin_layout Plain Layout
13060 chapter
13061 \end_layout
13062
13063 \end_inset
13064
13065
13066 \begin_inset Flex CharStyle:MenuItem
13067 status collapsed
13068
13069 \begin_layout Plain Layout
13070 figure
13071 \end_layout
13072
13073 \end_inset
13074
13075 , \SpecialChar \ldots{}
13076 ) in the text class itself.
13077  The standard counters are defined in the file 
13078 \begin_inset Flex CharStyle:Code
13079 status collapsed
13080
13081 \begin_layout Plain Layout
13082 stdcounters.inc
13083 \end_layout
13084
13085 \end_inset
13086
13087 , so you may have to do no more than add
13088 \end_layout
13089
13090 \begin_layout LyX-Code
13091 Input stdcounters.inc
13092 \end_layout
13093
13094 \begin_layout Standard
13095 to your layout file to get them to work.
13096  But if you want to define custom counters, then you can do so.
13097  The counter declaration must begin with:
13098 \end_layout
13099
13100 \begin_layout LyX-Code
13101 Counter CounterName
13102 \end_layout
13103
13104 \begin_layout Standard
13105 where of course `
13106 \begin_inset Flex CharStyle:Code
13107 status collapsed
13108
13109 \begin_layout Plain Layout
13110 CounterName
13111 \end_layout
13112
13113 \end_inset
13114
13115 ' is replaced by the name of the counter.
13116  And it must end with 
13117 \begin_inset Quotes eld
13118 \end_inset
13119
13120
13121 \begin_inset Flex CharStyle:Code
13122 status collapsed
13123
13124 \begin_layout Plain Layout
13125 End
13126 \end_layout
13127
13128 \end_inset
13129
13130
13131 \begin_inset Quotes erd
13132 \end_inset
13133
13134 .
13135  The following parameters can also be used:
13136 \end_layout
13137
13138 \begin_layout Description
13139 \begin_inset Flex CharStyle:Code
13140 status collapsed
13141
13142 \begin_layout Plain Layout
13143 LabelString [string=""]
13144 \end_layout
13145
13146 \end_inset
13147
13148  when this is defined, this string defines how the counter is displayed.
13149  Setting this value sets 
13150 \begin_inset Flex CharStyle:Code
13151 status collapsed
13152
13153 \begin_layout Plain Layout
13154 LabelStringAppendix
13155 \end_layout
13156
13157 \end_inset
13158
13159  to the same value.
13160  The following special constructs can be used in the string:
13161 \end_layout
13162
13163 \begin_deeper
13164 \begin_layout Itemize
13165 \begin_inset Flex CharStyle:Code
13166 status collapsed
13167
13168 \begin_layout Plain Layout
13169
13170 \backslash
13171 thecounter
13172 \end_layout
13173
13174 \end_inset
13175
13176  will be replaced by the expansion of the 
13177 \begin_inset Flex CharStyle:Code
13178 status collapsed
13179
13180 \begin_layout Plain Layout
13181 LabelString
13182 \end_layout
13183
13184 \end_inset
13185
13186  (or 
13187 \begin_inset Flex CharStyle:Code
13188 status collapsed
13189
13190 \begin_layout Plain Layout
13191 LabelStringAppendix
13192 \end_layout
13193
13194 \end_inset
13195
13196 ) of the counter 
13197 \begin_inset Flex CharStyle:Code
13198 status collapsed
13199
13200 \begin_layout Plain Layout
13201 counter
13202 \end_layout
13203
13204 \end_inset
13205
13206 .
13207  
13208 \end_layout
13209
13210 \begin_layout Itemize
13211 counter values can be expressed using LaTeX-like macros 
13212 \begin_inset Flex CharStyle:Code
13213 status collapsed
13214
13215 \begin_layout Plain Layout
13216
13217 \backslash
13218
13219 \emph on
13220 numbertype
13221 \emph default
13222 {
13223 \emph on
13224 counter
13225 \emph default
13226 }
13227 \end_layout
13228
13229 \end_inset
13230
13231 , where 
13232 \begin_inset Flex CharStyle:Code
13233 status collapsed
13234
13235 \begin_layout Plain Layout
13236
13237 \emph on
13238 numbertype
13239 \end_layout
13240
13241 \end_inset
13242
13243  can be:
13244 \begin_inset Foot
13245 status collapsed
13246
13247 \begin_layout Plain Layout
13248
13249 \family roman
13250 \series medium
13251 \shape up
13252 \size normal
13253 \emph off
13254 \bar no
13255 \noun off
13256 \color none
13257 Actually, the situation is a bit more complicated: any
13258 \family default
13259 \series default
13260 \shape default
13261 \emph default
13262 \bar default
13263  
13264 \size default
13265 \emph on
13266 \noun default
13267 \color inherit
13268 numbertype
13269 \family roman
13270 \series medium
13271 \shape up
13272 \size normal
13273 \emph off
13274 \bar no
13275 \noun off
13276  other than those described below will produce arabic numerals.
13277  It would not be surprising to see this change in the future.
13278 \end_layout
13279
13280 \end_inset
13281
13282  
13283 \begin_inset Flex CharStyle:Code
13284 status collapsed
13285
13286 \begin_layout Plain Layout
13287 arabic
13288 \end_layout
13289
13290 \end_inset
13291
13292 : 1, 2, 3,\SpecialChar \ldots{}
13293
13294 \begin_inset Flex CharStyle:Code
13295 status collapsed
13296
13297 \begin_layout Plain Layout
13298 alph
13299 \end_layout
13300
13301 \end_inset
13302
13303  for lower-case letters: a, b, c, \SpecialChar \ldots{}
13304
13305 \begin_inset Flex CharStyle:Code
13306 status collapsed
13307
13308 \begin_layout Plain Layout
13309 Alph
13310 \end_layout
13311
13312 \end_inset
13313
13314  for upper-case letters: A, B, C, \SpecialChar \ldots{}
13315
13316 \begin_inset Flex CharStyle:Code
13317 status collapsed
13318
13319 \begin_layout Plain Layout
13320 roman
13321 \end_layout
13322
13323 \end_inset
13324
13325  for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
13326
13327 \begin_inset Flex CharStyle:Code
13328 status collapsed
13329
13330 \begin_layout Plain Layout
13331 Roman
13332 \end_layout
13333
13334 \end_inset
13335
13336  for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
13337
13338 \begin_inset Flex CharStyle:Code
13339 status collapsed
13340
13341 \begin_layout Plain Layout
13342 hebrew
13343 \end_layout
13344
13345 \end_inset
13346
13347  for hebrew numerals.
13348 \end_layout
13349
13350 \end_deeper
13351 \begin_layout Standard
13352 If LabelString is not defined, a default value is constructed as follows:
13353  if the counter has a master counter 
13354 \begin_inset Flex CharStyle:Code
13355 status collapsed
13356
13357 \begin_layout Plain Layout
13358 master
13359 \end_layout
13360
13361 \end_inset
13362
13363  (defined via 
13364 \begin_inset Flex CharStyle:Code
13365 status collapsed
13366
13367 \begin_layout Plain Layout
13368 Within
13369 \end_layout
13370
13371 \end_inset
13372
13373 ), the string 
13374 \begin_inset Flex CharStyle:Code
13375 status collapsed
13376
13377 \begin_layout Plain Layout
13378
13379 \backslash
13380 themaster.
13381 \backslash
13382 arabic{counter}
13383 \end_layout
13384
13385 \end_inset
13386
13387  is used; otherwise the string 
13388 \begin_inset Flex CharStyle:Code
13389 status collapsed
13390
13391 \begin_layout Plain Layout
13392
13393 \backslash
13394 arabic{counter}
13395 \end_layout
13396
13397 \end_inset
13398
13399  is used.
13400 \end_layout
13401
13402 \begin_layout Description
13403 \begin_inset Flex CharStyle:Code
13404 status collapsed
13405
13406 \begin_layout Plain Layout
13407 LabelStringAppendix [string=""]
13408 \end_layout
13409
13410 \end_inset
13411
13412  Same as 
13413 \begin_inset Flex CharStyle:Code
13414 status collapsed
13415
13416 \begin_layout Plain Layout
13417 LabelString
13418 \end_layout
13419
13420 \end_inset
13421
13422 , but for use in the Appendix.
13423 \end_layout
13424
13425 \begin_layout Description
13426 \begin_inset Flex CharStyle:Code
13427 status collapsed
13428
13429 \begin_layout Plain Layout
13430 Within
13431 \end_layout
13432
13433 \end_inset
13434
13435  [
13436 \begin_inset Flex CharStyle:Code
13437 status collapsed
13438
13439 \begin_layout Plain Layout
13440 string
13441 \end_layout
13442
13443 \end_inset
13444
13445 =
13446 \begin_inset Quotes erd
13447 \end_inset
13448
13449
13450 \begin_inset Quotes erd
13451 \end_inset
13452
13453 ] If this is set to the name of another counter, the present counter will
13454  be reset every time the other one is increased.
13455  For example, 
13456 \begin_inset Flex CharStyle:Code
13457 status collapsed
13458
13459 \begin_layout Plain Layout
13460 subsection
13461 \end_layout
13462
13463 \end_inset
13464
13465  is numbered inside 
13466 \begin_inset Flex CharStyle:Code
13467 status collapsed
13468
13469 \begin_layout Plain Layout
13470 section
13471 \end_layout
13472
13473 \end_inset
13474
13475 .
13476 \end_layout
13477
13478 \begin_layout Subsection
13479 Font description
13480 \begin_inset CommandInset label
13481 LatexCommand label
13482 name "sub:Font-description"
13483
13484 \end_inset
13485
13486
13487 \end_layout
13488
13489 \begin_layout Standard
13490 A font description looks like this:
13491 \end_layout
13492
13493 \begin_layout LyX-Code
13494 Font 
13495 \family roman
13496 \emph on
13497 or
13498 \family default
13499 \emph default
13500  LabelFont
13501 \end_layout
13502
13503 \begin_layout LyX-Code
13504  ...
13505 \end_layout
13506
13507 \begin_layout LyX-Code
13508 EndFont
13509 \end_layout
13510
13511 \begin_layout Standard
13512 The following commands are available:
13513 \end_layout
13514
13515 \begin_layout Description
13516 \begin_inset Flex CharStyle:Code
13517 status collapsed
13518
13519 \begin_layout Plain Layout
13520 Color
13521 \end_layout
13522
13523 \end_inset
13524
13525  [
13526 \begin_inset Flex CharStyle:Code
13527 status collapsed
13528
13529 \begin_layout Plain Layout
13530
13531 \emph on
13532 none
13533 \end_layout
13534
13535 \end_inset
13536
13537
13538 \begin_inset Flex CharStyle:Code
13539 status collapsed
13540
13541 \begin_layout Plain Layout
13542 black
13543 \end_layout
13544
13545 \end_inset
13546
13547
13548 \begin_inset Flex CharStyle:Code
13549 status collapsed
13550
13551 \begin_layout Plain Layout
13552 white
13553 \end_layout
13554
13555 \end_inset
13556
13557
13558 \begin_inset Flex CharStyle:Code
13559 status collapsed
13560
13561 \begin_layout Plain Layout
13562 red
13563 \end_layout
13564
13565 \end_inset
13566
13567
13568 \begin_inset Flex CharStyle:Code
13569 status collapsed
13570
13571 \begin_layout Plain Layout
13572 green
13573 \end_layout
13574
13575 \end_inset
13576
13577
13578 \begin_inset Flex CharStyle:Code
13579 status collapsed
13580
13581 \begin_layout Plain Layout
13582 blue
13583 \end_layout
13584
13585 \end_inset
13586
13587
13588 \begin_inset Flex CharStyle:Code
13589 status collapsed
13590
13591 \begin_layout Plain Layout
13592 cyan
13593 \end_layout
13594
13595 \end_inset
13596
13597
13598 \begin_inset Flex CharStyle:Code
13599 status collapsed
13600
13601 \begin_layout Plain Layout
13602 magenta
13603 \end_layout
13604
13605 \end_inset
13606
13607
13608 \begin_inset Flex CharStyle:Code
13609 status collapsed
13610
13611 \begin_layout Plain Layout
13612 yellow
13613 \end_layout
13614
13615 \end_inset
13616
13617 ]
13618 \end_layout
13619
13620 \begin_layout Description
13621 \begin_inset Flex CharStyle:Code
13622 status collapsed
13623
13624 \begin_layout Plain Layout
13625 Family
13626 \end_layout
13627
13628 \end_inset
13629
13630  [
13631 \emph on
13632
13633 \begin_inset Flex CharStyle:Code
13634 status collapsed
13635
13636 \begin_layout Plain Layout
13637
13638 \emph on
13639 Roman
13640 \end_layout
13641
13642 \end_inset
13643
13644
13645 \emph default
13646
13647 \begin_inset Flex CharStyle:Code
13648 status collapsed
13649
13650 \begin_layout Plain Layout
13651 Sans
13652 \end_layout
13653
13654 \end_inset
13655
13656
13657 \begin_inset Flex CharStyle:Code
13658 status collapsed
13659
13660 \begin_layout Plain Layout
13661 Typewriter
13662 \end_layout
13663
13664 \end_inset
13665
13666
13667 \end_layout
13668
13669 \begin_layout Description
13670 \begin_inset Flex CharStyle:Code
13671 status collapsed
13672
13673 \begin_layout Plain Layout
13674 Misc
13675 \end_layout
13676
13677 \end_inset
13678
13679  [
13680 \begin_inset Flex CharStyle:Code
13681 status collapsed
13682
13683 \begin_layout Plain Layout
13684 string
13685 \end_layout
13686
13687 \end_inset
13688
13689 ] Valid arguments are: 
13690 \begin_inset Flex CharStyle:Code
13691 status collapsed
13692
13693 \begin_layout Plain Layout
13694 emph
13695 \end_layout
13696
13697 \end_inset
13698
13699
13700 \begin_inset Flex CharStyle:Code
13701 status collapsed
13702
13703 \begin_layout Plain Layout
13704 noun
13705 \end_layout
13706
13707 \end_inset
13708
13709
13710 \begin_inset Flex CharStyle:Code
13711 status collapsed
13712
13713 \begin_layout Plain Layout
13714 underbar
13715 \end_layout
13716
13717 \end_inset
13718
13719
13720 \begin_inset Flex CharStyle:Code
13721 status collapsed
13722
13723 \begin_layout Plain Layout
13724 no_emph
13725 \end_layout
13726
13727 \end_inset
13728
13729
13730 \begin_inset Flex CharStyle:Code
13731 status collapsed
13732
13733 \begin_layout Plain Layout
13734 no_noun
13735 \end_layout
13736
13737 \end_inset
13738
13739  and 
13740 \begin_inset Flex CharStyle:Code
13741 status collapsed
13742
13743 \begin_layout Plain Layout
13744 no_bar
13745 \end_layout
13746
13747 \end_inset
13748
13749 .
13750  Each of these turns on or off the corresponding attribute.
13751  For example, 
13752 \begin_inset Flex CharStyle:Code
13753 status collapsed
13754
13755 \begin_layout Plain Layout
13756 emph
13757 \end_layout
13758
13759 \end_inset
13760
13761  turns on emphasis, and 
13762 \begin_inset Flex CharStyle:Code
13763 status collapsed
13764
13765 \begin_layout Plain Layout
13766 no_emph
13767 \end_layout
13768
13769 \end_inset
13770
13771  turns it off.
13772  
13773 \begin_inset Newline newline
13774 \end_inset
13775
13776 If the latter seems puzzling, remember that the font settings for the present
13777  context are generally inherited from the surrounding context.
13778  So 
13779 \begin_inset Flex CharStyle:Code
13780 status collapsed
13781
13782 \begin_layout Plain Layout
13783 no_emph
13784 \end_layout
13785
13786 \end_inset
13787
13788  would turn off the emphasis that was anyway in effect, say, in a theorem
13789  environment.
13790 \end_layout
13791
13792 \begin_layout Description
13793 \begin_inset Flex CharStyle:Code
13794 status collapsed
13795
13796 \begin_layout Plain Layout
13797 Series
13798 \end_layout
13799
13800 \end_inset
13801
13802  [
13803 \emph on
13804
13805 \begin_inset Flex CharStyle:Code
13806 status collapsed
13807
13808 \begin_layout Plain Layout
13809
13810 \emph on
13811 Medium
13812 \end_layout
13813
13814 \end_inset
13815
13816
13817 \emph default
13818
13819 \begin_inset Flex CharStyle:Code
13820 status collapsed
13821
13822 \begin_layout Plain Layout
13823 Bold
13824 \end_layout
13825
13826 \end_inset
13827
13828
13829 \end_layout
13830
13831 \begin_layout Description
13832 \begin_inset Flex CharStyle:Code
13833 status collapsed
13834
13835 \begin_layout Plain Layout
13836 Shape
13837 \end_layout
13838
13839 \end_inset
13840
13841  [
13842 \emph on
13843
13844 \begin_inset Flex CharStyle:Code
13845 status collapsed
13846
13847 \begin_layout Plain Layout
13848
13849 \emph on
13850 Up
13851 \end_layout
13852
13853 \end_inset
13854
13855
13856 \emph default
13857
13858 \begin_inset Flex CharStyle:Code
13859 status collapsed
13860
13861 \begin_layout Plain Layout
13862 Italic
13863 \end_layout
13864
13865 \end_inset
13866
13867
13868 \begin_inset Flex CharStyle:Code
13869 status collapsed
13870
13871 \begin_layout Plain Layout
13872 SmallCaps
13873 \end_layout
13874
13875 \end_inset
13876
13877
13878 \begin_inset Flex CharStyle:Code
13879 status collapsed
13880
13881 \begin_layout Plain Layout
13882 Slanted
13883 \end_layout
13884
13885 \end_inset
13886
13887
13888 \end_layout
13889
13890 \begin_layout Description
13891 \begin_inset Flex CharStyle:Code
13892 status collapsed
13893
13894 \begin_layout Plain Layout
13895 Size
13896 \end_layout
13897
13898 \end_inset
13899
13900  [
13901 \begin_inset Flex CharStyle:Code
13902 status collapsed
13903
13904 \begin_layout Plain Layout
13905 tiny
13906 \end_layout
13907
13908 \end_inset
13909
13910
13911 \begin_inset Flex CharStyle:Code
13912 status collapsed
13913
13914 \begin_layout Plain Layout
13915 small
13916 \end_layout
13917
13918 \end_inset
13919
13920
13921 \begin_inset Flex CharStyle:Code
13922 status collapsed
13923
13924 \begin_layout Plain Layout
13925
13926 \emph on
13927 normal
13928 \end_layout
13929
13930 \end_inset
13931
13932
13933 \begin_inset Flex CharStyle:Code
13934 status collapsed
13935
13936 \begin_layout Plain Layout
13937 large
13938 \end_layout
13939
13940 \end_inset
13941
13942
13943 \begin_inset Flex CharStyle:Code
13944 status collapsed
13945
13946 \begin_layout Plain Layout
13947 larger
13948 \end_layout
13949
13950 \end_inset
13951
13952
13953 \begin_inset Flex CharStyle:Code
13954 status collapsed
13955
13956 \begin_layout Plain Layout
13957 largest
13958 \end_layout
13959
13960 \end_inset
13961
13962
13963 \begin_inset Flex CharStyle:Code
13964 status collapsed
13965
13966 \begin_layout Plain Layout
13967 huge
13968 \end_layout
13969
13970 \end_inset
13971
13972
13973 \begin_inset Flex CharStyle:Code
13974 status collapsed
13975
13976 \begin_layout Plain Layout
13977 giant
13978 \end_layout
13979
13980 \end_inset
13981
13982 ]
13983 \end_layout
13984
13985 \begin_layout Subsection
13986 Upgrading old layout files
13987 \end_layout
13988
13989 \begin_layout Standard
13990 The file format of layout files changes from time to time, so old layout
13991  files need to be converted.
13992  This process has been automated since LyX 1.4.0: If LyX reads an old format
13993  layout file it will call the conversion tool 
13994 \begin_inset Flex CharStyle:Code
13995 status collapsed
13996
13997 \begin_layout Plain Layout
13998 LyXDir/scripts/layout2layout.py
13999 \end_layout
14000
14001 \end_inset
14002
14003  and convert it to a temporary file in current format.
14004  The original file is left untouched.
14005  If you want to convert the layout file permanently, just call the converter
14006  by hand:
14007 \end_layout
14008
14009 \begin_layout LyX-Code
14010 python $LyXDir/scripts/layout2layout.py myclass.layout myclassnew.layout
14011 \end_layout
14012
14013 \begin_layout Standard
14014 (You need to replace 
14015 \begin_inset Flex CharStyle:Code
14016 status collapsed
14017
14018 \begin_layout Plain Layout
14019 $LyXDir
14020 \end_layout
14021
14022 \end_inset
14023
14024  with the name of your LyX system directory, unless you happen to have defined
14025  such an environment variable.) Then copy 
14026 \begin_inset Flex CharStyle:Code
14027 status collapsed
14028
14029 \begin_layout Plain Layout
14030 myclassnew.layout
14031 \end_layout
14032
14033 \end_inset
14034
14035  to 
14036 \begin_inset Flex CharStyle:Code
14037 status collapsed
14038
14039 \begin_layout Plain Layout
14040 UserDir/layouts/
14041 \end_layout
14042
14043 \end_inset
14044
14045 .
14046 \end_layout
14047
14048 \begin_layout Standard
14049 The automatic conversion only handles syntax changes.
14050  It cannot handle the case where the contents of included files was changed,
14051  so these will have to be converted separately.
14052 \end_layout
14053
14054 \begin_layout Section
14055 Creating Templates
14056 \begin_inset CommandInset label
14057 LatexCommand label
14058 name "sec:Creating-Templates"
14059
14060 \end_inset
14061
14062
14063 \end_layout
14064
14065 \begin_layout Standard
14066 Templates are created just like usual documents.
14067  The only difference is that usual documents contain all possible settings,
14068  including the font scheme and the paper size.
14069  Usually a user doesn't want a template to overwrite his defaults in these
14070  cases.
14071  For that reason, the designer of a template should remove the corresponding
14072  commands like 
14073 \begin_inset Flex CharStyle:Code
14074 status collapsed
14075
14076 \begin_layout Plain Layout
14077
14078 \backslash
14079 fontscheme
14080 \end_layout
14081
14082 \end_inset
14083
14084  or 
14085 \begin_inset Flex CharStyle:Code
14086 status collapsed
14087
14088 \begin_layout Plain Layout
14089
14090 \backslash
14091 papersize
14092 \end_layout
14093
14094 \end_inset
14095
14096  from the template LyX file.
14097  This can be done with any simple text-editor, for example 
14098 \begin_inset Flex CharStyle:Code
14099 status collapsed
14100
14101 \begin_layout Plain Layout
14102 vi
14103 \end_layout
14104
14105 \end_inset
14106
14107  or 
14108 \begin_inset Flex CharStyle:Code
14109 status collapsed
14110
14111 \begin_layout Plain Layout
14112 xedit
14113 \end_layout
14114
14115 \end_inset
14116
14117 .
14118  
14119 \end_layout
14120
14121 \begin_layout Standard
14122 Put the edited template files you create in 
14123 \begin_inset Flex CharStyle:Code
14124 status collapsed
14125
14126 \begin_layout Plain Layout
14127 UserDir/templates/
14128 \end_layout
14129
14130 \end_inset
14131
14132 , copy the ones you use from the global template directory in 
14133 \begin_inset Flex CharStyle:Code
14134 status collapsed
14135
14136 \begin_layout Plain Layout
14137 LyXDir/templates/
14138 \end_layout
14139
14140 \end_inset
14141
14142  to the same place, and redefine the template path in the 
14143 \begin_inset Flex CharStyle:MenuItem
14144 status collapsed
14145
14146 \begin_layout Plain Layout
14147 Tools\SpecialChar \menuseparator
14148 Preferences\SpecialChar \menuseparator
14149 Paths
14150 \end_layout
14151
14152 \end_inset
14153
14154  dialog.
14155 \end_layout
14156
14157 \begin_layout Standard
14158 Note that there is a template which has a particular meaning: 
14159 \begin_inset Flex CharStyle:Code
14160 status collapsed
14161
14162 \begin_layout Plain Layout
14163 defaults.lyx
14164 \end_layout
14165
14166 \end_inset
14167
14168 .
14169  This template is loaded every time you create a new document with 
14170 \begin_inset Flex CharStyle:MenuItem
14171 status collapsed
14172
14173 \begin_layout Plain Layout
14174 File\SpecialChar \menuseparator
14175 New
14176 \end_layout
14177
14178 \end_inset
14179
14180  in order to provide useful defaults.
14181  To create this template from inside LyX, all you have to do is to open
14182  a document with the correct settings, and use the 
14183 \begin_inset Flex CharStyle:MenuItem
14184 status collapsed
14185
14186 \begin_layout Plain Layout
14187 Save as Document Defaults
14188 \end_layout
14189
14190 \end_inset
14191
14192  button.
14193 \end_layout
14194
14195 \begin_layout Chapter
14196 Including External Material
14197 \end_layout
14198
14199 \begin_layout Standard
14200 \begin_inset Box Shadowbox
14201 position "t"
14202 hor_pos "c"
14203 has_inner_box 1
14204 inner_pos "t"
14205 use_parbox 0
14206 width "100col%"
14207 special "none"
14208 height "1in"
14209 height_special "totalheight"
14210 status open
14211
14212 \begin_layout Plain Layout
14213 WARNING: This portion of the documentation has not been updated for some
14214  time.
14215  We certainly hope that it is still accurate, but there are no guarantees.
14216 \end_layout
14217
14218 \end_inset
14219
14220
14221 \end_layout
14222
14223 \begin_layout Standard
14224 The use of material from sources external to LyX is covered in detail in
14225  the 
14226 \emph on
14227 Embedded Objects
14228 \emph default
14229  manual.
14230  This part of the manual covers what needs to happen behind the scenes for
14231  new sorts of material to be included.
14232 \end_layout
14233
14234 \begin_layout Section
14235 How does it work?
14236 \end_layout
14237
14238 \begin_layout Standard
14239 The external material feature is based on the concept of a 
14240 \emph on
14241 template
14242 \emph default
14243 .
14244  A template is a specification of how LyX should interface with a certain
14245  kind of material.
14246  As bundled, LyX comes with predefined templates for Xfig figures, various
14247  raster format images, chess diagrams, and LilyPond music notation.
14248  You can check the actual list by using the menu 
14249 \begin_inset Flex CharStyle:MenuItem
14250 status collapsed
14251
14252 \begin_layout Plain Layout
14253 Insert\SpecialChar \menuseparator
14254 File\SpecialChar \menuseparator
14255 External Material
14256 \end_layout
14257
14258 \end_inset
14259
14260 .
14261  Furthermore, it is possible to roll your own template to support a specific
14262  kind of material.
14263  Later we'll describe in more detail what is involved, and hopefully you
14264  will submit all the templates you create so we can include them in a later
14265  LyX version.
14266 \end_layout
14267
14268 \begin_layout Standard
14269 Another basic idea of the external material feature is to distinguish between
14270  the original file that serves as a base for final material and the produced
14271  file that is included in your exported or printed document.
14272  For example, consider the case of a figure produced with 
14273 \begin_inset Flex CharStyle:Code
14274 status collapsed
14275
14276 \begin_layout Plain Layout
14277 Xfig
14278 \end_layout
14279
14280 \end_inset
14281
14282 .
14283  The Xfig application itself works on an original file with the 
14284 \begin_inset Flex CharStyle:Code
14285 status collapsed
14286
14287 \begin_layout Plain Layout
14288 .fig
14289 \end_layout
14290
14291 \end_inset
14292
14293  extension.
14294  Within Xfig, you create and change your figure, and when you are done,
14295  you save the 
14296 \begin_inset Flex CharStyle:Code
14297 status collapsed
14298
14299 \begin_layout Plain Layout
14300 fig
14301 \end_layout
14302
14303 \end_inset
14304
14305 -file.
14306  When you want to include the figure in your document, you invoke 
14307 \begin_inset Flex CharStyle:Code
14308 status collapsed
14309
14310 \begin_layout Plain Layout
14311 transfig
14312 \end_layout
14313
14314 \end_inset
14315
14316  in order to create a PostScript file that can readily be included in your
14317  LaTeX file.
14318  In this case, the 
14319 \begin_inset Flex CharStyle:Code
14320 status collapsed
14321
14322 \begin_layout Plain Layout
14323 .fig
14324 \end_layout
14325
14326 \end_inset
14327
14328  file is the original file, and the PostScript file is the produced file.
14329 \end_layout
14330
14331 \begin_layout Standard
14332 This distinction is important in order to allow updating of the material
14333  while you are in the process of writing the document.
14334  Furthermore, it provides us with the flexibility that is needed to support
14335  multiple export formats.
14336  For instance, in the case of a plain text file, it is not exactly an award-winn
14337 ing idea to include the figure as raw PostScript.
14338  Instead, you'd either prefer to just include a reference to the figure
14339  or try to invoke some graphics to ASCII converter to make the final result
14340  look similar to the real graphics.
14341  The external material management allows you to do this, because it is parametri
14342 zed on the different export formats that LyX supports.
14343 \end_layout
14344
14345 \begin_layout Standard
14346 Besides supporting the production of different products according to the
14347  exported format, it supports tight integration with editing and viewing
14348  applications.
14349  In the case of an Xfig figure, you are able to invoke Xfig on the original
14350  file with a single click from within the external material dialog in LyX,
14351  and also preview the produced PostScript file with Ghostview with another
14352  click.
14353  No more fiddling around with the command line and/or file browsers to locate
14354  and manipulate the original or produced files.
14355  In this way, you are finally able to take full advantage of the many different
14356  applications that are relevant to use when you write your documents, and
14357  ultimately be more productive.
14358 \end_layout
14359
14360 \begin_layout Section
14361 The external template configuration file
14362 \end_layout
14363
14364 \begin_layout Standard
14365 It is relatively easy to add custom external template definitions to LyX.
14366  However, be aware that doing this in an careless manner most probably 
14367 \emph on
14368 will
14369 \emph default
14370  introduce an easily exploitable security hole.
14371  So before you do this, please read the discussion about security in section
14372  
14373 \begin_inset CommandInset ref
14374 LatexCommand ref
14375 reference "sec:Security-discussion"
14376
14377 \end_inset
14378
14379 .
14380 \end_layout
14381
14382 \begin_layout Standard
14383 Having said that, we encourage you to submit any interesting templates that
14384  you create.
14385  
14386 \end_layout
14387
14388 \begin_layout Standard
14389 The external templates are defined in the 
14390 \begin_inset Flex CharStyle:Code
14391 status collapsed
14392
14393 \begin_layout Plain Layout
14394 LyXDir/lib/external_templates
14395 \end_layout
14396
14397 \end_inset
14398
14399  file.
14400  You can place your own version in 
14401 \begin_inset Flex CharStyle:Code
14402 status collapsed
14403
14404 \begin_layout Plain Layout
14405 UserDir/external_templates
14406 \end_layout
14407
14408 \end_inset
14409
14410 .
14411 \end_layout
14412
14413 \begin_layout Standard
14414 A typical template looks like this:
14415 \end_layout
14416
14417 \begin_layout LyX-Code
14418 Template XFig
14419 \end_layout
14420
14421 \begin_layout LyX-Code
14422 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
14423 \end_layout
14424
14425 \begin_layout LyX-Code
14426 HelpText
14427 \end_layout
14428
14429 \begin_layout LyX-Code
14430 An XFig figure.
14431 \end_layout
14432
14433 \begin_layout LyX-Code
14434 HelpTextEnd
14435 \end_layout
14436
14437 \begin_layout LyX-Code
14438 InputFormat fig
14439 \end_layout
14440
14441 \begin_layout LyX-Code
14442 FileFilter "*.fig"
14443 \end_layout
14444
14445 \begin_layout LyX-Code
14446 AutomaticProduction true
14447 \end_layout
14448
14449 \begin_layout LyX-Code
14450 Transform Rotate
14451 \end_layout
14452
14453 \begin_layout LyX-Code
14454 Transform Resize
14455 \end_layout
14456
14457 \begin_layout LyX-Code
14458 Format LaTeX
14459 \end_layout
14460
14461 \begin_layout LyX-Code
14462 TransformCommand Rotate RotationLatexCommand
14463 \end_layout
14464
14465 \begin_layout LyX-Code
14466 TransformCommand Resize ResizeLatexCommand
14467 \end_layout
14468
14469 \begin_layout LyX-Code
14470 Product "$$RotateFront$$ResizeFront
14471 \end_layout
14472
14473 \begin_layout LyX-Code
14474          
14475 \backslash
14476
14477 \backslash
14478 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
14479 \end_layout
14480
14481 \begin_layout LyX-Code
14482          $$ResizeBack$$RotateBack"
14483 \end_layout
14484
14485 \begin_layout LyX-Code
14486 UpdateFormat pstex
14487 \end_layout
14488
14489 \begin_layout LyX-Code
14490 UpdateResult "$$AbsPath$$Basename.pstex_t"
14491 \end_layout
14492
14493 \begin_layout LyX-Code
14494 Requirement "graphicx"
14495 \end_layout
14496
14497 \begin_layout LyX-Code
14498 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
14499 \end_layout
14500
14501 \begin_layout LyX-Code
14502 ReferencedFile latex "$$AbsPath$$Basename.eps"
14503 \end_layout
14504
14505 \begin_layout LyX-Code
14506 ReferencedFile dvi "$$AbsPath$$Basename.eps"
14507 \end_layout
14508
14509 \begin_layout LyX-Code
14510 FormatEnd
14511 \end_layout
14512
14513 \begin_layout LyX-Code
14514 Format PDFLaTeX
14515 \end_layout
14516
14517 \begin_layout LyX-Code
14518 TransformCommand Rotate RotationLatexCommand
14519 \end_layout
14520
14521 \begin_layout LyX-Code
14522 TransformCommand Resize ResizeLatexCommand
14523 \end_layout
14524
14525 \begin_layout LyX-Code
14526 Product "$$RotateFront$$ResizeFront
14527 \end_layout
14528
14529 \begin_layout LyX-Code
14530          
14531 \backslash
14532
14533 \backslash
14534 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
14535 \end_layout
14536
14537 \begin_layout LyX-Code
14538          $$ResizeBack$$RotateBack"
14539 \end_layout
14540
14541 \begin_layout LyX-Code
14542 UpdateFormat pdftex
14543 \end_layout
14544
14545 \begin_layout LyX-Code
14546 UpdateResult "$$AbsPath$$Basename.pdftex_t"
14547 \end_layout
14548
14549 \begin_layout LyX-Code
14550 Requirement "graphicx"
14551 \end_layout
14552
14553 \begin_layout LyX-Code
14554 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
14555 \end_layout
14556
14557 \begin_layout LyX-Code
14558 ReferencedFile latex "$$AbsPath$$Basename.pdf"
14559 \end_layout
14560
14561 \begin_layout LyX-Code
14562 FormatEnd
14563 \end_layout
14564
14565 \begin_layout LyX-Code
14566 Format Ascii
14567 \end_layout
14568
14569 \begin_layout LyX-Code
14570 Product "$$Contents(
14571 \backslash
14572 "$$AbsPath$$Basename.asc
14573 \backslash
14574 ")"
14575 \end_layout
14576
14577 \begin_layout LyX-Code
14578 UpdateFormat asciixfig
14579 \end_layout
14580
14581 \begin_layout LyX-Code
14582 UpdateResult "$$AbsPath$$Basename.asc"
14583 \end_layout
14584
14585 \begin_layout LyX-Code
14586 FormatEnd
14587 \end_layout
14588
14589 \begin_layout LyX-Code
14590 Format DocBook
14591 \end_layout
14592
14593 \begin_layout LyX-Code
14594 Product "<graphic fileref=
14595 \backslash
14596 "$$AbsOrRelPathMaster$$Basename.eps
14597 \backslash
14598 ">
14599 \end_layout
14600
14601 \begin_layout LyX-Code
14602          </graphic>"
14603 \end_layout
14604
14605 \begin_layout LyX-Code
14606 UpdateFormat eps
14607 \end_layout
14608
14609 \begin_layout LyX-Code
14610 UpdateResult "$$AbsPath$$Basename.eps"
14611 \end_layout
14612
14613 \begin_layout LyX-Code
14614 ReferencedFile docbook "$$AbsPath$$Basename.eps"
14615 \end_layout
14616
14617 \begin_layout LyX-Code
14618 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
14619 \end_layout
14620
14621 \begin_layout LyX-Code
14622 FormatEnd
14623 \end_layout
14624
14625 \begin_layout LyX-Code
14626 Product "[XFig: $$FName]"
14627 \end_layout
14628
14629 \begin_layout LyX-Code
14630 FormatEnd
14631 \end_layout
14632
14633 \begin_layout LyX-Code
14634 TemplateEnd
14635 \end_layout
14636
14637 \begin_layout Standard
14638 As you can see, the template is enclosed in 
14639 \begin_inset Flex CharStyle:Code
14640 status collapsed
14641
14642 \begin_layout Plain Layout
14643 Template
14644 \end_layout
14645
14646 \end_inset
14647
14648  \SpecialChar \ldots{}
14649  
14650 \begin_inset Flex CharStyle:Code
14651 status collapsed
14652
14653 \begin_layout Plain Layout
14654 TemplateEnd
14655 \end_layout
14656
14657 \end_inset
14658
14659 .
14660  It contains a header specifying some general settings and, for each supported
14661  primary document file format, a section 
14662 \begin_inset Flex CharStyle:Code
14663 status collapsed
14664
14665 \begin_layout Plain Layout
14666 Format
14667 \end_layout
14668
14669 \end_inset
14670
14671  \SpecialChar \ldots{}
14672  
14673 \begin_inset Flex CharStyle:Code
14674 status collapsed
14675
14676 \begin_layout Plain Layout
14677 FormatEnd
14678 \end_layout
14679
14680 \end_inset
14681
14682 .
14683 \end_layout
14684
14685 \begin_layout Subsection
14686 The template header
14687 \end_layout
14688
14689 \begin_layout Description
14690 \begin_inset Flex CharStyle:Code
14691 status collapsed
14692
14693 \begin_layout Plain Layout
14694 AutomaticProduction
14695 \begin_inset space ~
14696 \end_inset
14697
14698 true|false
14699 \end_layout
14700
14701 \end_inset
14702
14703  Whether the file represented by the template must be generated by LyX.
14704  This command must occur exactly once.
14705 \end_layout
14706
14707 \begin_layout Description
14708 \begin_inset Flex CharStyle:Code
14709 status collapsed
14710
14711 \begin_layout Plain Layout
14712 FileFilter
14713 \begin_inset space ~
14714 \end_inset
14715
14716 <pattern>
14717 \end_layout
14718
14719 \end_inset
14720
14721  A glob pattern that is used in the file dialog to filter out the desired
14722  files.
14723  If there is more than one possible file extension (e.
14724 \begin_inset space \thinspace{}
14725 \end_inset
14726
14727 g.
14728 \begin_inset space \space{}
14729 \end_inset
14730
14731 tgif has 
14732 \begin_inset Flex CharStyle:Code
14733 status collapsed
14734
14735 \begin_layout Plain Layout
14736 .obj
14737 \end_layout
14738
14739 \end_inset
14740
14741  and 
14742 \begin_inset Flex CharStyle:Code
14743 status collapsed
14744
14745 \begin_layout Plain Layout
14746 .tgo
14747 \end_layout
14748
14749 \end_inset
14750
14751 ), use something like 
14752 \begin_inset Flex CharStyle:Code
14753 status collapsed
14754
14755 \begin_layout Plain Layout
14756 "*.{obj,tgo}"
14757 \end_layout
14758
14759 \end_inset
14760
14761 .
14762  This command must occur exactly once.
14763 \end_layout
14764
14765 \begin_layout Description
14766 \begin_inset Flex CharStyle:Code
14767 status collapsed
14768
14769 \begin_layout Plain Layout
14770 GuiName
14771 \begin_inset space ~
14772 \end_inset
14773
14774 <guiname>
14775 \end_layout
14776
14777 \end_inset
14778
14779  The text that is displayed on the button.
14780  This command must occur exactly once.
14781 \end_layout
14782
14783 \begin_layout Description
14784 \begin_inset Flex CharStyle:Code
14785 status collapsed
14786
14787 \begin_layout Plain Layout
14788 HelpText
14789 \begin_inset space ~
14790 \end_inset
14791
14792 <text>
14793 \begin_inset space ~
14794 \end_inset
14795
14796 HelpTextEnd
14797 \end_layout
14798
14799 \end_inset
14800
14801  The help text that is used in the External dialog.
14802  Provide enough information to explain to the user just what the template
14803  can provide him with.
14804  This command must occur exactly once.
14805 \end_layout
14806
14807 \begin_layout Description
14808 \begin_inset Flex CharStyle:Code
14809 status collapsed
14810
14811 \begin_layout Plain Layout
14812 InputFormat
14813 \begin_inset space ~
14814 \end_inset
14815
14816 <format>
14817 \end_layout
14818
14819 \end_inset
14820
14821  The file format of the original file.
14822  This must be the name of a format that is known to LyX (see section 
14823 \begin_inset CommandInset ref
14824 LatexCommand ref
14825 reference "sec:Formats"
14826
14827 \end_inset
14828
14829 ).
14830  Use 
14831 \begin_inset Quotes eld
14832 \end_inset
14833
14834
14835 \begin_inset Flex CharStyle:Code
14836 status collapsed
14837
14838 \begin_layout Plain Layout
14839 *
14840 \end_layout
14841
14842 \end_inset
14843
14844
14845 \begin_inset Quotes erd
14846 \end_inset
14847
14848  if the template can handle original files of more than one format.
14849  LyX will attempt to interrogate the file itself in order to deduce its
14850  format in this case.
14851  This command must occur exactly once.
14852 \end_layout
14853
14854 \begin_layout Description
14855 \begin_inset Flex CharStyle:Code
14856 status collapsed
14857
14858 \begin_layout Plain Layout
14859 Template
14860 \begin_inset space ~
14861 \end_inset
14862
14863 <id>
14864 \end_layout
14865
14866 \end_inset
14867
14868  A unique name for the template.
14869  It must not contain substitution macros (see below).
14870 \end_layout
14871
14872 \begin_layout Description
14873 \begin_inset Flex CharStyle:Code
14874 status collapsed
14875
14876 \begin_layout Plain Layout
14877 Transform
14878 \begin_inset space ~
14879 \end_inset
14880
14881 Rotate|Resize|Clip|Extra
14882 \end_layout
14883
14884 \end_inset
14885
14886  This command specifies which transformations are supported by this template.
14887  It may occur zero or more times.
14888  This command enables the corresponding tabs in the external dialog.
14889  Each 
14890 \begin_inset Flex CharStyle:Code
14891 status collapsed
14892
14893 \begin_layout Plain Layout
14894 Transform
14895 \end_layout
14896
14897 \end_inset
14898
14899  command must have either a corresponding 
14900 \begin_inset Flex CharStyle:Code
14901 status collapsed
14902
14903 \begin_layout Plain Layout
14904 TransformCommand
14905 \end_layout
14906
14907 \end_inset
14908
14909  or a 
14910 \begin_inset Flex CharStyle:Code
14911 status collapsed
14912
14913 \begin_layout Plain Layout
14914 TransformOption
14915 \end_layout
14916
14917 \end_inset
14918
14919  command in the 
14920 \begin_inset Flex CharStyle:Code
14921 status collapsed
14922
14923 \begin_layout Plain Layout
14924 Format
14925 \end_layout
14926
14927 \end_inset
14928
14929  section.
14930  Otherwise the transformation will not be supported by that format.
14931 \end_layout
14932
14933 \begin_layout Subsection
14934 The Format section
14935 \end_layout
14936
14937 \begin_layout Description
14938 \begin_inset Flex CharStyle:Code
14939 status collapsed
14940
14941 \begin_layout Plain Layout
14942 Format
14943 \begin_inset space ~
14944 \end_inset
14945
14946 LaTeX|PDFLaTeX|PlainText|DocBook
14947 \end_layout
14948
14949 \end_inset
14950
14951  The primary document file format that this format definition is for.
14952  Not every template has a sensible representation in all document file formats.
14953  Please define nevertheless a 
14954 \begin_inset Flex CharStyle:Code
14955 status collapsed
14956
14957 \begin_layout Plain Layout
14958 Format
14959 \end_layout
14960
14961 \end_inset
14962
14963  section for all formats.
14964  Use a dummy text when no representation is available.
14965  Then you can at least see a reference to the external material in the exported
14966  document.
14967 \end_layout
14968
14969 \begin_layout Description
14970 \begin_inset Flex CharStyle:Code
14971 status collapsed
14972
14973 \begin_layout Plain Layout
14974 Option
14975 \begin_inset space ~
14976 \end_inset
14977
14978 <name>
14979 \begin_inset space ~
14980 \end_inset
14981
14982 <value>
14983 \end_layout
14984
14985 \end_inset
14986
14987  This command defines an additional macro 
14988 \begin_inset Flex CharStyle:Code
14989 status collapsed
14990
14991 \begin_layout Plain Layout
14992 $$<name>
14993 \end_layout
14994
14995 \end_inset
14996
14997  for substitution in 
14998 \begin_inset Flex CharStyle:Code
14999 status collapsed
15000
15001 \begin_layout Plain Layout
15002 Product
15003 \end_layout
15004
15005 \end_inset
15006
15007 .
15008  
15009 \begin_inset Flex CharStyle:Code
15010 status collapsed
15011
15012 \begin_layout Plain Layout
15013 <value>
15014 \end_layout
15015
15016 \end_inset
15017
15018  itself may contain substitution macros.
15019  The advantage over using 
15020 \begin_inset Flex CharStyle:Code
15021 status collapsed
15022
15023 \begin_layout Plain Layout
15024 <value>
15025 \end_layout
15026
15027 \end_inset
15028
15029  directly in 
15030 \begin_inset Flex CharStyle:Code
15031 status collapsed
15032
15033 \begin_layout Plain Layout
15034 Product
15035 \end_layout
15036
15037 \end_inset
15038
15039  is that the substituted value of 
15040 \begin_inset Flex CharStyle:Code
15041 status collapsed
15042
15043 \begin_layout Plain Layout
15044 $$<name>
15045 \end_layout
15046
15047 \end_inset
15048
15049  is sanitized so that it is a valid optional argument in the document format.
15050  This command may occur zero or more times.
15051 \end_layout
15052
15053 \begin_layout Description
15054 \begin_inset Flex CharStyle:Code
15055 status collapsed
15056
15057 \begin_layout Plain Layout
15058 Product
15059 \begin_inset space ~
15060 \end_inset
15061
15062 <text>
15063 \end_layout
15064
15065 \end_inset
15066
15067  The text that is inserted in the exported document.
15068  This is actually the most important command and can be quite complex.
15069  This command must occur exactly once.
15070 \end_layout
15071
15072 \begin_layout Description
15073 \begin_inset Flex CharStyle:Code
15074 status collapsed
15075
15076 \begin_layout Plain Layout
15077 Preamble
15078 \begin_inset space ~
15079 \end_inset
15080
15081 <name>
15082 \end_layout
15083
15084 \end_inset
15085
15086  This command specifies a preamble snippet that will be included in the
15087  LaTeX preamble.
15088  It has to be defined using 
15089 \begin_inset Flex CharStyle:Code
15090 status collapsed
15091
15092 \begin_layout Plain Layout
15093 PreambleDef
15094 \end_layout
15095
15096 \end_inset
15097
15098  \SpecialChar \ldots{}
15099  
15100 \begin_inset Flex CharStyle:Code
15101 status collapsed
15102
15103 \begin_layout Plain Layout
15104 PreambleDefEnd
15105 \end_layout
15106
15107 \end_inset
15108
15109 .
15110  This command may occur zero or more times.
15111 \end_layout
15112
15113 \begin_layout Description
15114 \begin_inset Flex CharStyle:Code
15115 status collapsed
15116
15117 \begin_layout Plain Layout
15118 ReferencedFile
15119 \begin_inset space ~
15120 \end_inset
15121
15122 <format>
15123 \begin_inset space ~
15124 \end_inset
15125
15126 <filename>
15127 \end_layout
15128
15129 \end_inset
15130
15131  This command denotes files that are created by the conversion process and
15132  are needed for a particular export format.
15133  If the filename is relative, it is interpreted relative to the master document.
15134  This command may be given zero or more times.
15135 \end_layout
15136
15137 \begin_layout Description
15138 \begin_inset Flex CharStyle:Code
15139 status collapsed
15140
15141 \begin_layout Plain Layout
15142 Requirement
15143 \begin_inset space ~
15144 \end_inset
15145
15146 <package>
15147 \end_layout
15148
15149 \end_inset
15150
15151  The name of a required LaTeX package.
15152  The package is included via 
15153 \begin_inset Flex CharStyle:Code
15154 status collapsed
15155
15156 \begin_layout Plain Layout
15157
15158 \backslash
15159 usepackage{}
15160 \end_layout
15161
15162 \end_inset
15163
15164  in the LaTeX preamble.
15165  This command may occur zero or more times.
15166 \end_layout
15167
15168 \begin_layout Description
15169 \begin_inset Flex CharStyle:Code
15170 status collapsed
15171
15172 \begin_layout Plain Layout
15173 TransformCommand
15174 \begin_inset space ~
15175 \end_inset
15176
15177 Rotate
15178 \begin_inset space ~
15179 \end_inset
15180
15181 RotationLatexCommand
15182 \end_layout
15183
15184 \end_inset
15185
15186  This command specifies that the built in LaTeX command should be used for
15187  rotation.
15188  This command may occur once or not at all.
15189 \end_layout
15190
15191 \begin_layout Description
15192 \begin_inset Flex CharStyle:Code
15193 status collapsed
15194
15195 \begin_layout Plain Layout
15196 TransformCommand
15197 \begin_inset space ~
15198 \end_inset
15199
15200 Resize
15201 \begin_inset space ~
15202 \end_inset
15203
15204 ResizeLatexCommand
15205 \end_layout
15206
15207 \end_inset
15208
15209  This command specifies that the built in LaTeX command should be used for
15210  resizing.
15211  This command may occur once or not at all.
15212 \end_layout
15213
15214 \begin_layout Description
15215 \begin_inset Flex CharStyle:Code
15216 status collapsed
15217
15218 \begin_layout Plain Layout
15219 TransformOption
15220 \begin_inset space ~
15221 \end_inset
15222
15223 Rotate
15224 \begin_inset space ~
15225 \end_inset
15226
15227 RotationLatexOption
15228 \end_layout
15229
15230 \end_inset
15231
15232  This command specifies that rotation is done via an optional argument.
15233  This command may occur once or not at all.
15234 \end_layout
15235
15236 \begin_layout Description
15237 \begin_inset Flex CharStyle:Code
15238 status collapsed
15239
15240 \begin_layout Plain Layout
15241 TransformOption
15242 \begin_inset space ~
15243 \end_inset
15244
15245 Resize
15246 \begin_inset space ~
15247 \end_inset
15248
15249 ResizeLatexOption
15250 \end_layout
15251
15252 \end_inset
15253
15254  This command specifies that resizing is done via an optional argument.
15255  This command may occur once or not at all.
15256 \end_layout
15257
15258 \begin_layout Description
15259 \begin_inset Flex CharStyle:Code
15260 status collapsed
15261
15262 \begin_layout Plain Layout
15263 TransformOption
15264 \begin_inset space ~
15265 \end_inset
15266
15267 Clip
15268 \begin_inset space ~
15269 \end_inset
15270
15271 ClipLatexOption
15272 \end_layout
15273
15274 \end_inset
15275
15276  This command specifies that clipping is done via an optional argument.
15277  This command may occur once or not at all.
15278 \end_layout
15279
15280 \begin_layout Description
15281 \begin_inset Flex CharStyle:Code
15282 status collapsed
15283
15284 \begin_layout Plain Layout
15285 TransformOption
15286 \begin_inset space ~
15287 \end_inset
15288
15289 Extra
15290 \begin_inset space ~
15291 \end_inset
15292
15293 ExtraLatexOption
15294 \end_layout
15295
15296 \end_inset
15297
15298  This command specifies that an extra optional argument is used.
15299  This command may occur once or not at all.
15300 \end_layout
15301
15302 \begin_layout Description
15303 \begin_inset Flex CharStyle:Code
15304 status collapsed
15305
15306 \begin_layout Plain Layout
15307 UpdateFormat
15308 \begin_inset space ~
15309 \end_inset
15310
15311 <format>
15312 \end_layout
15313
15314 \end_inset
15315
15316  The file format of the converted file.
15317  This must be the name of a format that is known to LyX (see the 
15318 \begin_inset Flex CharStyle:MenuItem
15319 status collapsed
15320
15321 \begin_layout Plain Layout
15322
15323 \bar under
15324 T
15325 \bar default
15326 ools\SpecialChar \menuseparator
15327
15328 \bar under
15329 P
15330 \bar default
15331 references:Conversion
15332 \end_layout
15333
15334 \end_inset
15335
15336  dialog).
15337  This command must occur exactly once.
15338 \end_layout
15339
15340 \begin_layout Description
15341 \begin_inset Flex CharStyle:Code
15342 status collapsed
15343
15344 \begin_layout Plain Layout
15345 UpdateResult
15346 \begin_inset space ~
15347 \end_inset
15348
15349 <filename>
15350 \end_layout
15351
15352 \end_inset
15353
15354  The file name of the converted file.
15355  The file name must be absolute.
15356  This command must occur exactly once.
15357 \end_layout
15358
15359 \begin_layout Subsection
15360 Preamble definitions
15361 \end_layout
15362
15363 \begin_layout Standard
15364 The external template configuration file may contain additional preamble
15365  definitions enclosed by 
15366 \begin_inset Flex CharStyle:Code
15367 status collapsed
15368
15369 \begin_layout Plain Layout
15370 PreambleDef
15371 \end_layout
15372
15373 \end_inset
15374
15375  \SpecialChar \ldots{}
15376  
15377 \begin_inset Flex CharStyle:Code
15378 status collapsed
15379
15380 \begin_layout Plain Layout
15381 PreambleDefEnd
15382 \end_layout
15383
15384 \end_inset
15385
15386 .
15387  They can be used by the templates in the 
15388 \begin_inset Flex CharStyle:Code
15389 status collapsed
15390
15391 \begin_layout Plain Layout
15392 Format
15393 \end_layout
15394
15395 \end_inset
15396
15397  section.
15398 \end_layout
15399
15400 \begin_layout Section
15401 The substitution mechanism
15402 \end_layout
15403
15404 \begin_layout Standard
15405 When the external material facility invokes an external program, it is done
15406  on the basis of a command defined in the template configuration file.
15407  These commands can contain various macros that are expanded before execution.
15408  Execution always take place in the directory of the containing document.
15409 \end_layout
15410
15411 \begin_layout Standard
15412 Also, whenever external material is to be displayed, the name will be produced
15413  by the substitution mechanism, and most other commands in the template
15414  definition support substitution as well.
15415 \end_layout
15416
15417 \begin_layout Standard
15418 The available macros are the following:
15419 \end_layout
15420
15421 \begin_layout Description
15422 \begin_inset Flex CharStyle:Code
15423 status collapsed
15424
15425 \begin_layout Plain Layout
15426 $$AbsOrRelPathMaster
15427 \end_layout
15428
15429 \end_inset
15430
15431  The file path, absolute or relative to the master LyX document.
15432 \end_layout
15433
15434 \begin_layout Description
15435 \begin_inset Flex CharStyle:Code
15436 status collapsed
15437
15438 \begin_layout Plain Layout
15439 $$AbsOrRelPathParent
15440 \end_layout
15441
15442 \end_inset
15443
15444  The file path, absolute or relative to the LyX document.
15445 \end_layout
15446
15447 \begin_layout Description
15448 \begin_inset Flex CharStyle:Code
15449 status collapsed
15450
15451 \begin_layout Plain Layout
15452 $$AbsPath
15453 \end_layout
15454
15455 \end_inset
15456
15457  The absolute file path.
15458 \end_layout
15459
15460 \begin_layout Description
15461 \begin_inset Flex CharStyle:Code
15462 status collapsed
15463
15464 \begin_layout Plain Layout
15465 $$Basename
15466 \end_layout
15467
15468 \end_inset
15469
15470  The filename without path and without the extension.
15471 \end_layout
15472
15473 \begin_layout Description
15474 \begin_inset Flex CharStyle:Code
15475 status collapsed
15476
15477 \begin_layout Plain Layout
15478 $$Contents(
15479 \begin_inset Quotes eld
15480 \end_inset
15481
15482 filename.ext
15483 \begin_inset Quotes erd
15484 \end_inset
15485
15486 )
15487 \end_layout
15488
15489 \end_inset
15490
15491  This macro will expand to the contents of the file with the name 
15492 \begin_inset Flex CharStyle:Code
15493 status collapsed
15494
15495 \begin_layout Plain Layout
15496 filename.ext
15497 \end_layout
15498
15499 \end_inset
15500
15501 .
15502 \end_layout
15503
15504 \begin_layout Description
15505 \begin_inset Flex CharStyle:Code
15506 status collapsed
15507
15508 \begin_layout Plain Layout
15509 $$Extension
15510 \end_layout
15511
15512 \end_inset
15513
15514  The file extension (including the dot).
15515 \end_layout
15516
15517 \begin_layout Description
15518 \begin_inset Flex CharStyle:Code
15519 status collapsed
15520
15521 \begin_layout Plain Layout
15522 $$FName
15523 \end_layout
15524
15525 \end_inset
15526
15527  The filename of the file specified in the external material dialog.
15528  This is either an absolute name, or it is relative to the LyX document.
15529 \end_layout
15530
15531 \begin_layout Description
15532 \begin_inset Flex CharStyle:Code
15533 status collapsed
15534
15535 \begin_layout Plain Layout
15536 $$FPath
15537 \end_layout
15538
15539 \end_inset
15540
15541  The path part of 
15542 \begin_inset Flex CharStyle:Code
15543 status collapsed
15544
15545 \begin_layout Plain Layout
15546 $$FName
15547 \end_layout
15548
15549 \end_inset
15550
15551  (absolute name or relative to the LyX document).
15552 \end_layout
15553
15554 \begin_layout Description
15555 \begin_inset Flex CharStyle:Code
15556 status collapsed
15557
15558 \begin_layout Plain Layout
15559 $$RelPathMaster
15560 \end_layout
15561
15562 \end_inset
15563
15564  The file path, relative to the master LyX document.
15565 \end_layout
15566
15567 \begin_layout Description
15568 \begin_inset Flex CharStyle:Code
15569 status collapsed
15570
15571 \begin_layout Plain Layout
15572 $$RelPathParent
15573 \end_layout
15574
15575 \end_inset
15576
15577  The file path, relative to the LyX document.
15578 \end_layout
15579
15580 \begin_layout Description
15581 \begin_inset Flex CharStyle:Code
15582 status collapsed
15583
15584 \begin_layout Plain Layout
15585 $$Sysdir
15586 \end_layout
15587
15588 \end_inset
15589
15590  This macro will expand to the absolute path of the system directory.
15591  This is typically used to point to the various helper scripts that are
15592  bundled with LyX.
15593 \end_layout
15594
15595 \begin_layout Description
15596 \begin_inset Flex CharStyle:Code
15597 status collapsed
15598
15599 \begin_layout Plain Layout
15600 $$Tempname
15601 \end_layout
15602
15603 \end_inset
15604
15605  A name and full path to a temporary file which will be automatically deleted
15606  whenever the containing document is closed, or the external material insertion
15607  deleted.
15608 \end_layout
15609
15610 \begin_layout Standard
15611 All path macros contain a trailing directory separator, so you can construct
15612  e.
15613 \begin_inset space \thinspace{}
15614 \end_inset
15615
15616 g.
15617 \begin_inset space \space{}
15618 \end_inset
15619
15620 the absolute filename with 
15621 \begin_inset Flex CharStyle:Code
15622 status collapsed
15623
15624 \begin_layout Plain Layout
15625 $$AbsPath$$Basename$$Extension
15626 \end_layout
15627
15628 \end_inset
15629
15630 .
15631 \end_layout
15632
15633 \begin_layout Standard
15634 The macros above are substituted in all commands unless otherwise noted.
15635  The command 
15636 \begin_inset Flex CharStyle:Code
15637 status collapsed
15638
15639 \begin_layout Plain Layout
15640 Product
15641 \end_layout
15642
15643 \end_inset
15644
15645  supports additionally the following substitutions if they are enabled by
15646  the 
15647 \begin_inset Flex CharStyle:Code
15648 status collapsed
15649
15650 \begin_layout Plain Layout
15651 Transform
15652 \end_layout
15653
15654 \end_inset
15655
15656  and 
15657 \begin_inset Flex CharStyle:Code
15658 status collapsed
15659
15660 \begin_layout Plain Layout
15661 TransformCommand
15662 \end_layout
15663
15664 \end_inset
15665
15666  commands:
15667 \end_layout
15668
15669 \begin_layout Description
15670 \begin_inset Flex CharStyle:Code
15671 status collapsed
15672
15673 \begin_layout Plain Layout
15674 $$ResizeFront
15675 \end_layout
15676
15677 \end_inset
15678
15679  The front part of the resize command.
15680 \end_layout
15681
15682 \begin_layout Description
15683 \begin_inset Flex CharStyle:Code
15684 status collapsed
15685
15686 \begin_layout Plain Layout
15687 $$ResizeBack
15688 \end_layout
15689
15690 \end_inset
15691
15692  The back part of the resize command.
15693 \end_layout
15694
15695 \begin_layout Description
15696 \begin_inset Flex CharStyle:Code
15697 status collapsed
15698
15699 \begin_layout Plain Layout
15700 $$RotateFront
15701 \end_layout
15702
15703 \end_inset
15704
15705  The front part of the rotation command.
15706 \end_layout
15707
15708 \begin_layout Description
15709 \begin_inset Flex CharStyle:Code
15710 status collapsed
15711
15712 \begin_layout Plain Layout
15713 $$RotateBack
15714 \end_layout
15715
15716 \end_inset
15717
15718  The back part of the rotation command.
15719 \end_layout
15720
15721 \begin_layout Standard
15722 The value string of the 
15723 \begin_inset Flex CharStyle:Code
15724 status collapsed
15725
15726 \begin_layout Plain Layout
15727 Option
15728 \end_layout
15729
15730 \end_inset
15731
15732  command supports additionally the following substitutions if they are enabled
15733  by the 
15734 \begin_inset Flex CharStyle:Code
15735 status collapsed
15736
15737 \begin_layout Plain Layout
15738 Transform
15739 \end_layout
15740
15741 \end_inset
15742
15743  and 
15744 \begin_inset Flex CharStyle:Code
15745 status collapsed
15746
15747 \begin_layout Plain Layout
15748 TransformOption
15749 \end_layout
15750
15751 \end_inset
15752
15753  commands:
15754 \end_layout
15755
15756 \begin_layout Description
15757 \begin_inset Flex CharStyle:Code
15758 status collapsed
15759
15760 \begin_layout Plain Layout
15761 $$Clip
15762 \end_layout
15763
15764 \end_inset
15765
15766  The clip option.
15767 \end_layout
15768
15769 \begin_layout Description
15770 \begin_inset Flex CharStyle:Code
15771 status collapsed
15772
15773 \begin_layout Plain Layout
15774 $$Extra
15775 \end_layout
15776
15777 \end_inset
15778
15779  The extra option.
15780 \end_layout
15781
15782 \begin_layout Description
15783 \begin_inset Flex CharStyle:Code
15784 status collapsed
15785
15786 \begin_layout Plain Layout
15787 $$Resize
15788 \end_layout
15789
15790 \end_inset
15791
15792  The resize option.
15793 \end_layout
15794
15795 \begin_layout Description
15796 \begin_inset Flex CharStyle:Code
15797 status collapsed
15798
15799 \begin_layout Plain Layout
15800 $$Rotate
15801 \end_layout
15802
15803 \end_inset
15804
15805  The rotation option.
15806 \end_layout
15807
15808 \begin_layout Standard
15809 You may ask why there are so many path macros.
15810  There are mainly two reasons:
15811 \end_layout
15812
15813 \begin_layout Enumerate
15814 Relative and absolute file names should remain relative or absolute, respectivel
15815 y.
15816  Users may have reasons to prefer either form.
15817  Relative names are useful for portable documents that should work on different
15818  machines, for example.
15819  Absolute names may be required by some programs.
15820 \end_layout
15821
15822 \begin_layout Enumerate
15823 LaTeX treats relative file names differently than LyX and other programs
15824  in nested included files.
15825  For LyX, a relative file name is always relative to the document that contains
15826  the file name.
15827  For LaTeX, it is always relative to the master document.
15828  These two definitions are identical if you have only one document, but
15829  differ if you have a master document that includes part documents.
15830  That means that relative filenames must be transformed when presented to
15831  LaTeX.
15832  Fortunately LyX does this automatically for you if you choose the right
15833  macros.
15834 \end_layout
15835
15836 \begin_layout Standard
15837 So which path macro should be used in new template definitions? The rule
15838  is not difficult:
15839 \end_layout
15840
15841 \begin_layout Itemize
15842 Use 
15843 \begin_inset Flex CharStyle:Code
15844 status collapsed
15845
15846 \begin_layout Plain Layout
15847 $$AbsPath
15848 \end_layout
15849
15850 \end_inset
15851
15852  if an absolute path is required.
15853 \end_layout
15854
15855 \begin_layout Itemize
15856 Use 
15857 \begin_inset Flex CharStyle:Code
15858 status collapsed
15859
15860 \begin_layout Plain Layout
15861 $$AbsOrRelPathMaster
15862 \end_layout
15863
15864 \end_inset
15865
15866  if the substituted string is some kind of LaTeX input.
15867 \end_layout
15868
15869 \begin_layout Itemize
15870 Else use 
15871 \begin_inset Flex CharStyle:Code
15872 status collapsed
15873
15874 \begin_layout Plain Layout
15875 $$AbsOrRelPathParent
15876 \end_layout
15877
15878 \end_inset
15879
15880  in order to preserve the user's choice.
15881 \end_layout
15882
15883 \begin_layout Standard
15884 There are special cases where this rule does not work and e.
15885 \begin_inset space \thinspace{}
15886 \end_inset
15887
15888 g.
15889 \begin_inset space \space{}
15890 \end_inset
15891
15892 relative names are needed, but normally it will work just fine.
15893  One example for such a case is the command 
15894 \begin_inset Flex CharStyle:Code
15895 status collapsed
15896
15897 \begin_layout Plain Layout
15898 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
15899 \end_layout
15900
15901 \end_inset
15902
15903  in the XFig template above: We can't use the absolute name because the
15904  copier for 
15905 \begin_inset Flex CharStyle:Code
15906 status collapsed
15907
15908 \begin_layout Plain Layout
15909 .pstex_t
15910 \end_layout
15911
15912 \end_inset
15913
15914  files needs the relative name in order to rewrite the file content.
15915 \end_layout
15916
15917 \begin_layout Section
15918 Security discussion
15919 \begin_inset CommandInset label
15920 LatexCommand label
15921 name "sec:Security-discussion"
15922
15923 \end_inset
15924
15925
15926 \end_layout
15927
15928 \begin_layout Standard
15929 The external material feature interfaces with a lot of external programs
15930  and does so automatically, so we have to consider the security implications
15931  of this.
15932  In particular, since you have the option of including your own filenames
15933  and/or parameter strings and those are expanded into a command, it seems
15934  that it would be possible to create a malicious document which executes
15935  arbitrary commands when a user views or prints the document.
15936  This is something we definitely want to avoid.
15937 \end_layout
15938
15939 \begin_layout Standard
15940 However, since the external program commands are specified in the template
15941  configuration file only, there are no security issues if LyX is properly
15942  configured with safe templates only.
15943  This is so because the external programs are invoked with the 
15944 \begin_inset Flex CharStyle:Code
15945 status collapsed
15946
15947 \begin_layout Plain Layout
15948 execvp
15949 \end_layout
15950
15951 \end_inset
15952
15953 -system call rather than the 
15954 \begin_inset Flex CharStyle:Code
15955 status collapsed
15956
15957 \begin_layout Plain Layout
15958 system
15959 \end_layout
15960
15961 \end_inset
15962
15963  system-call, so it's not possible to execute arbitrary commands from the
15964  filename or parameter section via the shell.
15965 \end_layout
15966
15967 \begin_layout Standard
15968 This also implies that you are restricted in what command strings you can
15969  use in the external material templates.
15970  In particular, pipes and redirection are not readily available.
15971  This has to be so if LyX should remain safe.
15972  If you want to use some of the shell features, you should write a safe
15973  script to do this in a controlled manner, and then invoke the script from
15974  the command string.
15975  
15976 \end_layout
15977
15978 \begin_layout Standard
15979 It is possible to design a template that interacts directly with the shell,
15980  but since this would allow a malicious user to execute arbitrary commands
15981  by writing clever filenames and/or parameters, we generally recommend that
15982  you only use safe scripts that work with the 
15983 \begin_inset Flex CharStyle:Code
15984 status collapsed
15985
15986 \begin_layout Plain Layout
15987 execvp
15988 \end_layout
15989
15990 \end_inset
15991
15992  system call in a controlled manner.
15993  Of course, for use in a controlled environment, it can be tempting to just
15994  fall back to use ordinary shell scripts.
15995  If you do so, be aware that you 
15996 \emph on
15997 will
15998 \emph default
15999  provide an easily exploitable security hole in your system.
16000  Of course it stands to reason that such unsafe templates will never be
16001  included in the standard LyX distribution, although we do encourage people
16002  to submit new templates in the open source tradition.
16003  But LyX as shipped from the official distribution channels will never have
16004  unsafe templates.
16005 \end_layout
16006
16007 \begin_layout Standard
16008 Including external material provides a lot of power, and you have to be
16009  careful not to introduce security hazards with this power.
16010  A subtle error in a single line in an innocent looking script can open
16011  the door to huge security problems.
16012  So if you do not fully understand the issues, we recommend that you consult
16013  a knowledgeable security professional or the LyX development team if you
16014  have any questions about whether a given template is safe or not.
16015  And do this before you use it in an uncontrolled environment.
16016 \end_layout
16017
16018 \end_body
16019 \end_document