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