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