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