]> git.lyx.org Git - features.git/blob - lib/doc/Customization.lyx
Customization.lyx: we once agreed to avoid abbreviations since non-native speakers...
[features.git] / lib / doc / Customization.lyx
1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
2 \lyxformat 413
3 \begin_document
4 \begin_header
5 \textclass scrbook
6 \begin_preamble
7 % DO NOT ALTER THIS PREAMBLE!!!
8 %
9 % This preamble is designed to ensure that this document prints
10 % out as advertised. If you mess with this preamble,
11 % parts of this document may not print out as expected.  If you
12 % have problems LaTeXing this file, please contact 
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
15
16 \usepackage{ifpdf} % part of the hyperref bundle
17 \ifpdf % if pdflatex is used
18
19  % set fonts for nicer pdf view
20  \IfFileExists{lmodern.sty}
21   {\usepackage{lmodern}}{}
22
23 \fi % end if pdflatex is used
24
25 % the pages of the TOC is numbered roman
26 % and a pdf-bookmark for the TOC is added
27 \let\myTOC\tableofcontents
28 \renewcommand\tableofcontents{%
29   \frontmatter
30   \pdfbookmark[1]{\contentsname}{}
31   \myTOC
32   \mainmatter }
33
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 \end_preamble
42 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
43 \use_default_options false
44 \begin_modules
45 logicalmkup
46 \end_modules
47 \maintain_unincluded_children false
48 \begin_local_layout
49 Format 35
50 InsetLayout Flex:MenuItem
51 LyxType               charstyle
52 LabelString           menu
53 LatexType             command
54 LatexName             menuitem
55 Font
56 Family              Sans
57 EndFont
58 Preamble
59 \newcommand*{\menuitem}[1]{{\sffamily #1}}
60 EndPreamble
61 End
62 # In case we need to do with sans...
63 #InsetLayout CharStyle:Code
64 #Font
65 #Family              Sans
66 #EndFont
67 #Preamble
68 #\renewcommand{\code}[1]{{\sffamily #1}}
69 #EndPreamble
70 #End
71 \end_local_layout
72 \language english
73 \language_package default
74 \inputencoding auto
75 \fontencoding global
76 \font_roman default
77 \font_sans default
78 \font_typewriter default
79 \font_default_family default
80 \use_non_tex_fonts false
81 \font_sc false
82 \font_osf false
83 \font_sf_scale 100
84 \font_tt_scale 100
85
86 \graphics default
87 \default_output_format default
88 \output_sync 0
89 \bibtex_command default
90 \index_command default
91 \paperfontsize 12
92 \spacing single
93 \use_hyperref true
94 \pdf_title "LyX Configuration Manual"
95 \pdf_author "LyX Team"
96 \pdf_subject "LyX-documentation Customization"
97 \pdf_keywords "LyX, documentation, customization"
98 \pdf_bookmarks true
99 \pdf_bookmarksnumbered true
100 \pdf_bookmarksopen true
101 \pdf_bookmarksopenlevel 1
102 \pdf_breaklinks false
103 \pdf_pdfborder false
104 \pdf_colorlinks true
105 \pdf_backref false
106 \pdf_pdfusetitle false
107 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
108 \papersize default
109 \use_geometry false
110 \use_amsmath 0
111 \use_esint 0
112 \use_mhchem 0
113 \use_mathdots 1
114 \cite_engine basic
115 \use_bibtopic false
116 \use_indices false
117 \paperorientation portrait
118 \suppress_date false
119 \use_refstyle 0
120 \branch OutDated
121 \selected 0
122 \filename_suffix 0
123 \color #f5fae7
124 \end_branch
125 \index Index
126 \shortcut idx
127 \color #008000
128 \end_index
129 \secnumdepth 3
130 \tocdepth 3
131 \paragraph_separation indent
132 \paragraph_indentation default
133 \quotes_language english
134 \papercolumns 1
135 \papersides 2
136 \paperpagestyle headings
137 \tracking_changes false
138 \output_changes false
139 \html_math_output 0
140 \html_css_as_file 0
141 \html_be_strict true
142 \end_header
143
144 \begin_body
145
146 \begin_layout Title
147 Customizing LyX: Features for the Advanced User
148 \end_layout
149
150 \begin_layout Author
151 by the LyX Team
152 \begin_inset Foot
153 status collapsed
154
155 \begin_layout Plain Layout
156 \noindent
157 If you have comments or error corrections, please send them to the LyX Documenta
158 tion mailing list, 
159 \begin_inset CommandInset href
160 LatexCommand href
161 target "lyx-docs@lists.lyx.org"
162 type "mailto:"
163
164 \end_inset
165
166 .
167  Include 
168 \begin_inset Quotes eld
169 \end_inset
170
171 [Customization]
172 \begin_inset Quotes erd
173 \end_inset
174
175  in the subject header, and please cc the current maintainer of this file,
176  Richard Heck <rgheck@comcast.net>.
177 \end_layout
178
179 \end_inset
180
181
182 \begin_inset Newline newline
183 \end_inset
184
185
186 \begin_inset Newline newline
187 \end_inset
188
189 Version 2.0.x 
190 \end_layout
191
192 \begin_layout Standard
193 \begin_inset CommandInset toc
194 LatexCommand tableofcontents
195
196 \end_inset
197
198
199 \end_layout
200
201 \begin_layout Standard
202 \begin_inset Note Note
203 status open
204
205 \begin_layout Plain Layout
206 Please use change tracking when modifying this document.
207  This makes it easier for our translators to recognize things that have
208  been changed, and it helps the maintainer keep up-to-date with what's been
209  done.
210 \end_layout
211
212 \end_inset
213
214
215 \end_layout
216
217 \begin_layout Chapter
218 Introduction
219 \end_layout
220
221 \begin_layout Standard
222 This manual covers the customization features present in LyX.
223  In it, we discuss issues like keyboard shortcuts, screen previewing options,
224  printer options, sending commands to LyX via the LyX Server, internationalizati
225 on, installing new LaTeX classes and LyX layouts, etc.
226  We can't possibly hope to touch on everything you can change—our developers
227  add new features faster than we can document them—but we will explain the
228  most common customizations and hopefully point you in the right direction
229  for some of the more obscure ones.
230 \end_layout
231
232 \begin_layout Standard
233 \begin_inset Branch OutDated
234 status collapsed
235
236 \begin_layout Standard
237 Information from previous versions of this document that now seems to be
238  outdated is contained in the OutDated branch of this document.
239  By default, this information will not appear in the LaTeX output.
240 \end_layout
241
242 \end_inset
243
244
245 \end_layout
246
247 \begin_layout Chapter
248 LyX configuration files
249 \end_layout
250
251 \begin_layout Standard
252 This chapter aims to help you to find your way through the LyX configuration
253  files.
254  Before continuing to read this chapter, you should find out where your
255  LyX library and user directories are by using 
256 \begin_inset Flex MenuItem
257 status collapsed
258
259 \begin_layout Plain Layout
260 Help\SpecialChar \menuseparator
261 About
262 \begin_inset space ~
263 \end_inset
264
265 LyX
266 \end_layout
267
268 \end_inset
269
270 .
271  The library directory is the place where LyX places its system-wide configurati
272 on files; the user directory is where you can place your modified versions.
273  We will call the former 
274 \begin_inset Flex Code
275 status collapsed
276
277 \begin_layout Plain Layout
278 LyXDir
279 \end_layout
280
281 \end_inset
282
283  and the latter 
284 \begin_inset Flex MenuItem
285 status collapsed
286
287 \begin_layout Plain Layout
288 UserDir
289 \end_layout
290
291 \end_inset
292
293  in the remainder of this document.
294  
295 \end_layout
296
297 \begin_layout Section
298 What's in 
299 \begin_inset Flex Code
300 status collapsed
301
302 \begin_layout Plain Layout
303 LyXDir
304 \end_layout
305
306 \end_inset
307
308 ?
309 \end_layout
310
311 \begin_layout Standard
312 \begin_inset Flex Code
313 status collapsed
314
315 \begin_layout Plain Layout
316 LyXDir
317 \end_layout
318
319 \end_inset
320
321  and its sub-directories contain a number of files and that can be used
322  to customize LyX's behavior.
323  You can change many of these files from within LyX itself through the 
324 \begin_inset Flex MenuItem
325 status collapsed
326
327 \begin_layout Plain Layout
328 Tools\SpecialChar \menuseparator
329 Preferences
330 \end_layout
331
332 \end_inset
333
334  dialog.
335  Most customization that you will want to do in LyX is possible through
336  this dialog.
337  However, many other inner aspects of LyX can be customized by modifying
338  the files in 
339 \begin_inset Flex Code
340 status collapsed
341
342 \begin_layout Plain Layout
343 LyXDir
344 \end_layout
345
346 \end_inset
347
348 .
349  These files fall in different categories, described in the following subsection
350 s.
351 \end_layout
352
353 \begin_layout Subsection
354 Automatically generated files
355 \end_layout
356
357 \begin_layout Standard
358 The files, which are to be found in 
359 \begin_inset Flex MenuItem
360 status collapsed
361
362 \begin_layout Plain Layout
363 UserDir
364 \end_layout
365
366 \end_inset
367
368 , are generated when you configure LyX.
369  They contain various default values that are guessed by inspection.
370  In general, it is not a good idea to modify them, since they might be overwritt
371 en at any time.
372 \end_layout
373
374 \begin_layout Labeling
375 \labelwidthstring 00.00.0000
376 \begin_inset Flex Code
377 status collapsed
378
379 \begin_layout Plain Layout
380 lyxrc.defaults
381 \end_layout
382
383 \end_inset
384
385  contains defaults for various commands.
386 \end_layout
387
388 \begin_layout Labeling
389 \labelwidthstring 00.00.0000
390 \begin_inset Flex Code
391 status collapsed
392
393 \begin_layout Plain Layout
394 packages.lst
395 \end_layout
396
397 \end_inset
398
399  contains the list of packages that have been recognized by LyX.
400  It is currently unused by the LyX program itself, but the information extracted
401 , and more, is made available with 
402 \begin_inset Flex MenuItem
403 status collapsed
404
405 \begin_layout Plain Layout
406 Help\SpecialChar \menuseparator
407 LaTeX
408 \begin_inset space ~
409 \end_inset
410
411 Configuration
412 \end_layout
413
414 \end_inset
415
416 .
417 \end_layout
418
419 \begin_layout Labeling
420 \labelwidthstring 00.00.0000
421 \begin_inset Flex Code
422 status collapsed
423
424 \begin_layout Plain Layout
425 textclass.lst
426 \end_layout
427
428 \end_inset
429
430  the list of text classes that have been found in your 
431 \begin_inset Flex Code
432 status collapsed
433
434 \begin_layout Plain Layout
435 layout/
436 \end_layout
437
438 \end_inset
439
440  directories, along with the associated LaTeX document class and their descripti
441 on.
442 \end_layout
443
444 \begin_layout Labeling
445 \labelwidthstring 00.00.0000
446 \begin_inset Flex Code
447 status collapsed
448
449 \begin_layout Plain Layout
450 lyxmodules.lst
451 \end_layout
452
453 \end_inset
454
455  the list of layout modules found in your 
456 \begin_inset Flex Code
457 status collapsed
458
459 \begin_layout Plain Layout
460 layout/
461 \end_layout
462
463 \end_inset
464
465  directories
466 \end_layout
467
468 \begin_layout Labeling
469 \labelwidthstring 00.00.0000
470 \begin_inset Flex Code
471 status collapsed
472
473 \begin_layout Plain Layout
474 *files.lst
475 \end_layout
476
477 \end_inset
478
479  lists of various sorts of LaTeX-related files found on your system
480 \end_layout
481
482 \begin_layout Labeling
483 \labelwidthstring 00.00.0000
484 \begin_inset Flex Code
485 status collapsed
486
487 \begin_layout Plain Layout
488 doc/LaTeXConfig.lyx
489 \end_layout
490
491 \end_inset
492
493  is automatically generated during configuration from the file 
494 \begin_inset Flex Code
495 status collapsed
496
497 \begin_layout Plain Layout
498 LaTeXConfig.lyx.in
499 \end_layout
500
501 \end_inset
502
503 .
504  It contains information on your LaTeX configuration.
505 \end_layout
506
507 \begin_layout Subsection
508 Directories
509 \end_layout
510
511 \begin_layout Standard
512 These directories are duplicated between 
513 \begin_inset Flex Code
514 status collapsed
515
516 \begin_layout Plain Layout
517 LyXDir
518 \end_layout
519
520 \end_inset
521
522  and 
523 \begin_inset Flex Code
524 status collapsed
525
526 \begin_layout Plain Layout
527 UserDir
528 \end_layout
529
530 \end_inset
531
532 .
533  If a particular files exists in both places, the one in 
534 \begin_inset Flex Code
535 status collapsed
536
537 \begin_layout Plain Layout
538 UserDir
539 \end_layout
540
541 \end_inset
542
543  will be used.
544 \end_layout
545
546 \begin_layout Labeling
547 \labelwidthstring 00.00.0000
548 \begin_inset Flex Code
549 status collapsed
550
551 \begin_layout Plain Layout
552 bind/
553 \end_layout
554
555 \end_inset
556
557  this directory contains files with the extension 
558 \begin_inset Flex Code
559 status collapsed
560
561 \begin_layout Plain Layout
562 .bind
563 \end_layout
564
565 \end_inset
566
567  that define the keybindings used in LyX.
568  If there exists an internationalized version of the bind file named 
569 \begin_inset Flex Code
570 status collapsed
571
572 \begin_layout Plain Layout
573 $LANG_xxx.bind
574 \end_layout
575
576 \end_inset
577
578 , that will be used first.
579 \end_layout
580
581 \begin_layout Labeling
582 \labelwidthstring 00.00.0000
583 \begin_inset Flex Code
584 status collapsed
585
586 \begin_layout Plain Layout
587 clipart/
588 \end_layout
589
590 \end_inset
591
592  contains graphics files that can be included in documents.
593  
594 \end_layout
595
596 \begin_layout Labeling
597 \labelwidthstring 00.00.0000
598 \begin_inset Flex Code
599 status collapsed
600
601 \begin_layout Plain Layout
602 doc/
603 \end_layout
604
605 \end_inset
606
607  contains LyX documentation files (including the one you are currently reading).
608  The file 
609 \begin_inset Flex Code
610 status collapsed
611
612 \begin_layout Plain Layout
613 LaTeXConfig.lyx
614 \end_layout
615
616 \end_inset
617
618  deserves special attention, as noted above.
619  The internationalized help docs are in subdirectories 
620 \begin_inset Flex Code
621 status collapsed
622
623 \begin_layout Plain Layout
624 doc/xx
625 \end_layout
626
627 \end_inset
628
629  where 
630 \begin_inset Quotes eld
631 \end_inset
632
633 xx
634 \begin_inset Quotes erd
635 \end_inset
636
637  is the ISO language code.
638  See chapter
639 \begin_inset space ~
640 \end_inset
641
642
643 \begin_inset CommandInset ref
644 LatexCommand ref
645 reference "cha:Internationalizing-LyX"
646
647 \end_inset
648
649  for details.
650 \end_layout
651
652 \begin_layout Labeling
653 \labelwidthstring 00.00.0000
654 \begin_inset Flex Code
655 status collapsed
656
657 \begin_layout Plain Layout
658 examples/
659 \end_layout
660
661 \end_inset
662
663  contains example files that explain how to use some features.
664  In the file browser, press the 
665 \begin_inset Flex MenuItem
666 status collapsed
667
668 \begin_layout Plain Layout
669 Examples
670 \end_layout
671
672 \end_inset
673
674  button to get there.
675 \end_layout
676
677 \begin_layout Labeling
678 \labelwidthstring 00.00.0000
679 \begin_inset Flex Code
680 status collapsed
681
682 \begin_layout Plain Layout
683 images/
684 \end_layout
685
686 \end_inset
687
688  contains image files that are used by the 
689 \begin_inset Flex MenuItem
690 status collapsed
691
692 \begin_layout Plain Layout
693 Document
694 \end_layout
695
696 \end_inset
697
698  dialog.
699  In addition, it also contains the individual icons used in the toolbar
700  and the banners that can be shown when LyX is launched.
701 \end_layout
702
703 \begin_layout Labeling
704 \labelwidthstring 00.00.0000
705 \begin_inset Flex Code
706 status collapsed
707
708 \begin_layout Plain Layout
709 kbd/
710 \end_layout
711
712 \end_inset
713
714  contains keyboard keymapping files.
715  See Chapter
716 \begin_inset space ~
717 \end_inset
718
719
720 \begin_inset CommandInset ref
721 LatexCommand ref
722 reference "sec:International-Keymap-Stuff"
723
724 \end_inset
725
726  for details.
727 \end_layout
728
729 \begin_layout Labeling
730 \labelwidthstring 00.00.0000
731 \begin_inset Flex Code
732 status collapsed
733
734 \begin_layout Plain Layout
735 layouts/
736 \end_layout
737
738 \end_inset
739
740  contains the text class and module files described in Chapter
741 \begin_inset space ~
742 \end_inset
743
744
745 \begin_inset CommandInset ref
746 LatexCommand ref
747 reference "cha:Installing-New-Document"
748
749 \end_inset
750
751 .
752 \end_layout
753
754 \begin_layout Labeling
755 \labelwidthstring 00.00.0000
756 \begin_inset Flex Code
757 status collapsed
758
759 \begin_layout Plain Layout
760 lyx2lyx
761 \end_layout
762
763 \end_inset
764
765  contains the 
766 \begin_inset Flex Code
767 status collapsed
768
769 \begin_layout Plain Layout
770 lyx2lyx
771 \end_layout
772
773 \end_inset
774
775  Python scripts used to convert between LyX versions.
776  These can be run from the command line if, say, you want to batch-convert
777  files.
778 \end_layout
779
780 \begin_layout Labeling
781 \labelwidthstring 00.00.0000
782 \begin_inset Flex Code
783 status collapsed
784
785 \begin_layout Plain Layout
786 scripts/
787 \end_layout
788
789 \end_inset
790
791  contains some files that demonstrate the capabilities of the 
792 \begin_inset Flex MenuItem
793 status collapsed
794
795 \begin_layout Plain Layout
796 External
797 \begin_inset space ~
798 \end_inset
799
800 Template
801 \end_layout
802
803 \end_inset
804
805  feature.
806  Also contains some scripts used by LyX itself.
807 \end_layout
808
809 \begin_layout Labeling
810 \labelwidthstring 00.00.0000
811 \begin_inset Flex Code
812 status collapsed
813
814 \begin_layout Plain Layout
815 templates/
816 \end_layout
817
818 \end_inset
819
820  contains the standard LyX template files described in Chapter
821 \begin_inset space ~
822 \end_inset
823
824
825 \begin_inset CommandInset ref
826 LatexCommand ref
827 reference "sub:Creating-Templates"
828
829 \end_inset
830
831 .
832 \end_layout
833
834 \begin_layout Labeling
835 \labelwidthstring 00.00.0000
836 \begin_inset Flex Code
837 status collapsed
838
839 \begin_layout Plain Layout
840 ui/
841 \end_layout
842
843 \end_inset
844
845  contains files with the extension 
846 \begin_inset Flex Code
847 status collapsed
848
849 \begin_layout Plain Layout
850 .ui
851 \end_layout
852
853 \end_inset
854
855  that define the user interface to LyX.
856  That is, the files define which items appear in which menus and the items
857  appearing on the toolbar.
858 \end_layout
859
860 \begin_layout Subsection
861 Files you don't want to modify
862 \end_layout
863
864 \begin_layout Standard
865 These files are used internally by LyX and you generally do not need to
866  modify them unless you are a developer.
867 \end_layout
868
869 \begin_layout Labeling
870 \labelwidthstring 00.00.0000
871 \begin_inset Flex Code
872 status collapsed
873
874 \begin_layout Plain Layout
875 CREDITS
876 \end_layout
877
878 \end_inset
879
880  this file contains the list of LyX developers.
881  The contents are displayed with the menu entry 
882 \begin_inset Flex MenuItem
883 status collapsed
884
885 \begin_layout Plain Layout
886 Help\SpecialChar \menuseparator
887 About
888 \begin_inset space ~
889 \end_inset
890
891 LyX
892 \end_layout
893
894 \end_inset
895
896 .
897 \end_layout
898
899 \begin_layout Labeling
900 \labelwidthstring 00.00.0000
901 \begin_inset Flex Code
902 status collapsed
903
904 \begin_layout Plain Layout
905 chkconfig.ltx
906 \end_layout
907
908 \end_inset
909
910  this is a LaTeX script used during the configuration process.
911  Do not run directly.
912 \end_layout
913
914 \begin_layout Labeling
915 \labelwidthstring 00.00.0000
916 \begin_inset Flex Code
917 status collapsed
918
919 \begin_layout Plain Layout
920 configure.py
921 \end_layout
922
923 \end_inset
924
925  this is the script that is used to re-configure LyX.
926  It creates configuration files in the directory it was run from.
927 \end_layout
928
929 \begin_layout Subsection
930 Other files needing a line or two...
931 \end_layout
932
933 \begin_layout Labeling
934 \labelwidthstring 00.00.0000
935 \begin_inset Flex Code
936 status collapsed
937
938 \begin_layout Plain Layout
939 encodings
940 \end_layout
941
942 \end_inset
943
944  this contains tables describing how different character encodings can be
945  mapped to Unicode
946 \end_layout
947
948 \begin_layout Labeling
949 \labelwidthstring 00.00.0000
950 \begin_inset Flex Code
951 status collapsed
952
953 \begin_layout Plain Layout
954 external_templates
955 \end_layout
956
957 \end_inset
958
959  this file contains the templates available to the new 
960 \begin_inset Flex MenuItem
961 status collapsed
962
963 \begin_layout Plain Layout
964 External
965 \begin_inset space ~
966 \end_inset
967
968 Template
969 \end_layout
970
971 \end_inset
972
973  feature.
974 \end_layout
975
976 \begin_layout Labeling
977 \labelwidthstring 00.00.0000
978 \begin_inset Flex Code
979 status collapsed
980
981 \begin_layout Plain Layout
982 languages
983 \end_layout
984
985 \end_inset
986
987  this file contains a list of all the languages currently supported by LyX.
988 \end_layout
989
990 \begin_layout Section
991 Your local configuration directory
992 \end_layout
993
994 \begin_layout Standard
995 Even if you are using LyX as an unprivileged user, you might want to change
996  LyX configuration for your own use.
997  The 
998 \begin_inset Flex Code
999 status collapsed
1000
1001 \begin_layout Plain Layout
1002 UserDir
1003 \end_layout
1004
1005 \end_inset
1006
1007  directory contains all your personal configuration files.
1008  This is the directory described as 
1009 \begin_inset Quotes eld
1010 \end_inset
1011
1012 user directory
1013 \begin_inset Quotes erd
1014 \end_inset
1015
1016  in 
1017 \begin_inset Flex MenuItem
1018 status collapsed
1019
1020 \begin_layout Plain Layout
1021 Help\SpecialChar \menuseparator
1022 About
1023 \begin_inset space ~
1024 \end_inset
1025
1026 LyX
1027 \end_layout
1028
1029 \end_inset
1030
1031 .
1032  This directory is used as a mirror of 
1033 \begin_inset Flex Code
1034 status collapsed
1035
1036 \begin_layout Plain Layout
1037 LyXDir
1038 \end_layout
1039
1040 \end_inset
1041
1042 , which means that every file in 
1043 \begin_inset Flex Code
1044 status collapsed
1045
1046 \begin_layout Plain Layout
1047 UserDir
1048 \end_layout
1049
1050 \end_inset
1051
1052  is a replacement for the corresponding file in 
1053 \begin_inset Flex Code
1054 status collapsed
1055
1056 \begin_layout Plain Layout
1057 LyXDir
1058 \end_layout
1059
1060 \end_inset
1061
1062 .
1063  Any configuration file described in the above sections can be placed either
1064  in the system-wide directory, in which case it will affect all users, or
1065  in your local directory for your own use.
1066 \end_layout
1067
1068 \begin_layout Standard
1069 To make things clearer, let's provide a few examples:
1070 \end_layout
1071
1072 \begin_layout Itemize
1073 The preferences set in the 
1074 \begin_inset Flex MenuItem
1075 status collapsed
1076
1077 \begin_layout Plain Layout
1078 Tools\SpecialChar \menuseparator
1079 Preferences
1080 \end_layout
1081
1082 \end_inset
1083
1084  dialog are saved to a file 
1085 \begin_inset Flex Code
1086 status collapsed
1087
1088 \begin_layout Plain Layout
1089 preferences
1090 \end_layout
1091
1092 \end_inset
1093
1094  in 
1095 \begin_inset Flex Code
1096 status collapsed
1097
1098 \begin_layout Plain Layout
1099 UserDir
1100 \end_layout
1101
1102 \end_inset
1103
1104 .
1105 \end_layout
1106
1107 \begin_layout Itemize
1108 When you reconfigure using 
1109 \begin_inset Flex MenuItem
1110 status collapsed
1111
1112 \begin_layout Plain Layout
1113 Tools\SpecialChar \menuseparator
1114 Reconfigure
1115 \end_layout
1116
1117 \end_inset
1118
1119 , LyX runs the 
1120 \begin_inset Flex Code
1121 status collapsed
1122
1123 \begin_layout Plain Layout
1124 configure.py
1125 \end_layout
1126
1127 \end_inset
1128
1129  script, and the resulting files are written in your local configuration
1130  directory.
1131  This means that any additional text class file that you might have added
1132  in 
1133 \begin_inset Flex Code
1134 status collapsed
1135
1136 \begin_layout Plain Layout
1137 UserDir/layouts
1138 \end_layout
1139
1140 \end_inset
1141
1142  will be added to the list of classes in the 
1143 \begin_inset Flex MenuItem
1144 status collapsed
1145
1146 \begin_layout Plain Layout
1147 Document\SpecialChar \menuseparator
1148 Settings
1149 \end_layout
1150
1151 \end_inset
1152
1153  dialog.
1154 \end_layout
1155
1156 \begin_layout Itemize
1157 If you get some updated documentation from LyX ftp site and cannot install
1158  it because you do not have sysadmin rights on your system, you can just
1159  copy the files in 
1160 \begin_inset Flex Code
1161 status collapsed
1162
1163 \begin_layout Plain Layout
1164 UserDir/doc/
1165 \end_layout
1166
1167 \end_inset
1168
1169  and the items in the 
1170 \begin_inset Flex MenuItem
1171 status collapsed
1172
1173 \begin_layout Plain Layout
1174 Help
1175 \end_layout
1176
1177 \end_inset
1178
1179  menu will open them!
1180 \end_layout
1181
1182 \begin_layout Section
1183 Running LyX with multiple configurations
1184 \end_layout
1185
1186 \begin_layout Standard
1187 The configuration freedom of the local configuration directory may not suffice
1188  if you want to have more than one configuration at your disposal.
1189  For example, you may want to be use different key bindings or printer settings
1190  at different times.
1191  You can achieve this by having several such directories.
1192  You then specify which directory to use at run-time.
1193 \end_layout
1194
1195 \begin_layout Standard
1196 Invoking LyX with the command line switch 
1197 \begin_inset Flex Code
1198 status collapsed
1199
1200 \begin_layout Plain Layout
1201 -userdir
1202 \end_layout
1203
1204 \end_inset
1205
1206  
1207 \emph on
1208 <some directory>
1209 \emph default
1210  instructs the program to read the configuration from that directory, and
1211  not from the default directory.
1212  (You can determine the default directory by running LyX without the 
1213 \begin_inset Flex Code
1214 status collapsed
1215
1216 \begin_layout Plain Layout
1217 -userdir
1218 \end_layout
1219
1220 \end_inset
1221
1222  switch.) If the specified directory does not exist, LyX offers to create
1223  it for you, just like it does for the default directory on the first time
1224  you run the program.
1225  You can modify the configuration options in this additional user directory
1226  exactly as you would for the default directory.
1227  These directories are completely independent (but read on).
1228  Note that setting the environment variable 
1229 \begin_inset Flex Code
1230 status collapsed
1231
1232 \begin_layout Plain Layout
1233 LYX_USERDIR_VER
1234 \end_layout
1235
1236 \end_inset
1237
1238  to some value has exactly the same effect.
1239 \end_layout
1240
1241 \begin_layout Standard
1242 Having several configurations also requires more maintenance: if you want
1243  to add a new layout to 
1244 \begin_inset Flex Code
1245 status collapsed
1246
1247 \begin_layout Plain Layout
1248 NewUserDir/layouts
1249 \end_layout
1250
1251 \end_inset
1252
1253  which you want available from all your configurations, you must add it
1254  to each directory separately.
1255  You can avoid this with the following trick: after LyX creates the additional
1256  directory, most of the subdirectories (see above) are empty.
1257  If you want the new configuration to mirror an existing one, replace the
1258  empty subdirectory with a symbolic link to the matching subdirectory in
1259  the existing configuration.
1260  Take care with the 
1261 \begin_inset Flex Code
1262 status collapsed
1263
1264 \begin_layout Plain Layout
1265 doc/
1266 \end_layout
1267
1268 \end_inset
1269
1270  subdirectory, however, since it contains a file written by the configuration
1271  script (also accessible through 
1272 \begin_inset Flex MenuItem
1273 status collapsed
1274
1275 \begin_layout Plain Layout
1276 Tools\SpecialChar \menuseparator
1277 Reconfigure
1278 \end_layout
1279
1280 \end_inset
1281
1282 ) which is configuration-specific.
1283 \end_layout
1284
1285 \begin_layout Chapter
1286 The Preferences dialog
1287 \end_layout
1288
1289 \begin_layout Standard
1290 All options of the preferences dialog are described in the Appendix 
1291 \emph on
1292 The Preferences Dialog
1293 \emph default
1294  in the 
1295 \emph on
1296 User's Guide
1297 \emph default
1298 .
1299  For some options you might find here more details.
1300 \end_layout
1301
1302 \begin_layout Section
1303 Formats
1304 \begin_inset CommandInset label
1305 LatexCommand label
1306 name "sec:Formats"
1307
1308 \end_inset
1309
1310
1311 \end_layout
1312
1313 \begin_layout Standard
1314 The first step is to define your file formats if they are not already defined.
1315  To do so, open the 
1316 \begin_inset Flex MenuItem
1317 status collapsed
1318
1319 \begin_layout Plain Layout
1320 Tools\SpecialChar \menuseparator
1321 Preferences
1322 \end_layout
1323
1324 \end_inset
1325
1326  dialog.
1327  Under 
1328 \begin_inset Flex MenuItem
1329 status collapsed
1330
1331 \begin_layout Plain Layout
1332 File Handling\SpecialChar \menuseparator
1333 File formats
1334 \end_layout
1335
1336 \end_inset
1337
1338  press the 
1339 \begin_inset Flex MenuItem
1340 status collapsed
1341
1342 \begin_layout Plain Layout
1343 New\SpecialChar \ldots{}
1344
1345 \end_layout
1346
1347 \end_inset
1348
1349  button to define your new format.
1350  The 
1351 \begin_inset Flex MenuItem
1352 status collapsed
1353
1354 \begin_layout Plain Layout
1355 Format
1356 \end_layout
1357
1358 \end_inset
1359
1360  field contains the name used to identify the format in the GUI.
1361  The 
1362 \begin_inset Flex MenuItem
1363 status collapsed
1364
1365 \begin_layout Plain Layout
1366 Short Name
1367 \end_layout
1368
1369 \end_inset
1370
1371  is used to identify the format internally.
1372  You will also need to enter a file extension.
1373  These are all required.
1374  The optional 
1375 \begin_inset Flex MenuItem
1376 status collapsed
1377
1378 \begin_layout Plain Layout
1379 Shortcut
1380 \end_layout
1381
1382 \end_inset
1383
1384  field is used to provide a keyboard shortcut on the menus.
1385  (For example, pressing 
1386 \begin_inset Flex MenuItem
1387 status collapsed
1388
1389 \begin_layout Plain Layout
1390 Alt-V F D
1391 \end_layout
1392
1393 \end_inset
1394
1395  will 
1396 \begin_inset Flex MenuItem
1397 status collapsed
1398
1399 \begin_layout Plain Layout
1400 View\SpecialChar \menuseparator
1401 View (Other Formats)\SpecialChar \menuseparator
1402 DVI
1403 \end_layout
1404
1405 \end_inset
1406
1407 .) 
1408 \end_layout
1409
1410 \begin_layout Standard
1411 A Format can have a 
1412 \begin_inset Flex MenuItem
1413 status collapsed
1414
1415 \begin_layout Plain Layout
1416 Viewer
1417 \end_layout
1418
1419 \end_inset
1420
1421  and an 
1422 \begin_inset Flex MenuItem
1423 status collapsed
1424
1425 \begin_layout Plain Layout
1426 Editor
1427 \end_layout
1428
1429 \end_inset
1430
1431  associated with it.
1432  For example, you might want to use 
1433 \begin_inset Flex MenuItem
1434 status collapsed
1435
1436 \begin_layout Plain Layout
1437 Ghostview
1438 \end_layout
1439
1440 \end_inset
1441
1442  to view PostScript files.
1443  You can enter the command needed to start the program in the corresponding
1444  fields.
1445  In defining this command, you can use the four variables listed in the
1446  next section.
1447  The viewer is launched when you view an image in LyX or use the 
1448 \begin_inset Flex MenuItem
1449 status collapsed
1450
1451 \begin_layout Plain Layout
1452 View
1453 \end_layout
1454
1455 \end_inset
1456
1457  menu.
1458  The editor is for example launched when you right-click on an image and
1459  choose 
1460 \begin_inset Flex MenuItem
1461 status collapsed
1462
1463 \begin_layout Plain Layout
1464 Edit externally
1465 \end_layout
1466
1467 \end_inset
1468
1469  in the appearing context menu.
1470 \end_layout
1471
1472 \begin_layout Standard
1473 The 
1474 \begin_inset Flex MenuItem
1475 status collapsed
1476
1477 \begin_layout Plain Layout
1478 Document format
1479 \end_layout
1480
1481 \end_inset
1482
1483  option tells LyX that a format is suitable for document export.
1484  If this is set and if a suitable conversion route exists (see sec.
1485 \begin_inset space \thinspace{}
1486 \end_inset
1487
1488
1489 \begin_inset CommandInset ref
1490 LatexCommand ref
1491 reference "sec:Converters"
1492
1493 \end_inset
1494
1495 ), the format will appear in the 
1496 \begin_inset Flex MenuItem
1497 status collapsed
1498
1499 \begin_layout Plain Layout
1500 File\SpecialChar \menuseparator
1501 Export
1502 \end_layout
1503
1504 \end_inset
1505
1506  menu.
1507  The format will also appear in the 
1508 \begin_inset Flex MenuItem
1509 status collapsed
1510
1511 \begin_layout Plain Layout
1512 View
1513 \end_layout
1514
1515 \end_inset
1516
1517  menu if a viewer is specified for the format.
1518  Pure image formats, such as 
1519 \begin_inset Flex Code
1520 status collapsed
1521
1522 \begin_layout Plain Layout
1523 png
1524 \end_layout
1525
1526 \end_inset
1527
1528 , should not use this option.
1529  Formats that can both represent vector graphics and documents like 
1530 \begin_inset Flex Code
1531 status collapsed
1532
1533 \begin_layout Plain Layout
1534 pdf
1535 \end_layout
1536
1537 \end_inset
1538
1539  should use it.
1540 \end_layout
1541
1542 \begin_layout Standard
1543 The option 
1544 \begin_inset Flex MenuItem
1545 status collapsed
1546
1547 \begin_layout Plain Layout
1548 Vector graphics format
1549 \end_layout
1550
1551 \end_inset
1552
1553  tells LyX that a format can contain vector graphics.
1554  This information is used to determine the target format of included graphics
1555  for 
1556 \begin_inset Flex MenuItem
1557 status collapsed
1558
1559 \begin_layout Plain Layout
1560 pdflatex
1561 \end_layout
1562
1563 \end_inset
1564
1565  export.
1566  Included graphics may need to be converted to either 
1567 \begin_inset Flex MenuItem
1568 status collapsed
1569
1570 \begin_layout Plain Layout
1571 pdf
1572 \end_layout
1573
1574 \end_inset
1575
1576
1577 \begin_inset Flex MenuItem
1578 status collapsed
1579
1580 \begin_layout Plain Layout
1581 png
1582 \end_layout
1583
1584 \end_inset
1585
1586 , or 
1587 \begin_inset Flex MenuItem
1588 status collapsed
1589
1590 \begin_layout Plain Layout
1591 jpg
1592 \end_layout
1593
1594 \end_inset
1595
1596 , since 
1597 \begin_inset Flex MenuItem
1598 status collapsed
1599
1600 \begin_layout Plain Layout
1601 pdflatex
1602 \end_layout
1603
1604 \end_inset
1605
1606  cannot handle other image formats.
1607  If an included graphic is not already in 
1608 \begin_inset Flex MenuItem
1609 status collapsed
1610
1611 \begin_layout Plain Layout
1612 pdf
1613 \end_layout
1614
1615 \end_inset
1616
1617
1618 \begin_inset Flex MenuItem
1619 status collapsed
1620
1621 \begin_layout Plain Layout
1622 png
1623 \end_layout
1624
1625 \end_inset
1626
1627 , or 
1628 \begin_inset Flex MenuItem
1629 status collapsed
1630
1631 \begin_layout Plain Layout
1632 jpg
1633 \end_layout
1634
1635 \end_inset
1636
1637  format, it is converted to 
1638 \begin_inset Flex MenuItem
1639 status collapsed
1640
1641 \begin_layout Plain Layout
1642 pdf
1643 \end_layout
1644
1645 \end_inset
1646
1647  if the vector format option is set, and otherwise to 
1648 \begin_inset Flex MenuItem
1649 status collapsed
1650
1651 \begin_layout Plain Layout
1652 png
1653 \end_layout
1654
1655 \end_inset
1656
1657 .
1658 \end_layout
1659
1660 \begin_layout Section
1661 Copiers
1662 \end_layout
1663
1664 \begin_layout Standard
1665 Since all conversions from one format to another take place in LyX's temporary
1666  directory, it is sometimes necessary to modify a file before copying it
1667  to the temporary directory in order that the conversion may be performed.
1668 \begin_inset Foot
1669 status collapsed
1670
1671 \begin_layout Plain Layout
1672 For example, the file may refer to other files—images, for example—using
1673  relative file names, and these may become invalid when the file is copied
1674  to the temporary directory.
1675 \end_layout
1676
1677 \end_inset
1678
1679  This is done by a Copier: It copies a file to (or from) the temporary directory
1680  and may modify it in the process.
1681 \end_layout
1682
1683 \begin_layout Standard
1684 The definitions of the copiers may use four variables:
1685 \end_layout
1686
1687 \begin_layout Labeling
1688 \labelwidthstring 00.00.0000
1689 \begin_inset Flex Code
1690 status collapsed
1691
1692 \begin_layout Plain Layout
1693 $$s
1694 \end_layout
1695
1696 \end_inset
1697
1698  The LyX system directory (e.
1699 \begin_inset space \thinspace{}
1700 \end_inset
1701
1702 g.
1703 \begin_inset space \space{}
1704 \end_inset
1705
1706
1707 \begin_inset Flex MenuItem
1708 status collapsed
1709
1710 \begin_layout Plain Layout
1711 /usr/share/lyx
1712 \end_layout
1713
1714 \end_inset
1715
1716 ).
1717 \end_layout
1718
1719 \begin_layout Labeling
1720 \labelwidthstring 00.00.0000
1721 \begin_inset Flex Code
1722 status collapsed
1723
1724 \begin_layout Plain Layout
1725 $$i
1726 \end_layout
1727
1728 \end_inset
1729
1730  The input file
1731 \end_layout
1732
1733 \begin_layout Labeling
1734 \labelwidthstring 00.00.0000
1735 \begin_inset Flex Code
1736 status collapsed
1737
1738 \begin_layout Plain Layout
1739 $$o
1740 \end_layout
1741
1742 \end_inset
1743
1744  The output file
1745 \end_layout
1746
1747 \begin_layout Labeling
1748 \labelwidthstring 00.00.0000
1749 \begin_inset Flex Code
1750 status collapsed
1751
1752 \begin_layout Plain Layout
1753 $$l
1754 \end_layout
1755
1756 \end_inset
1757
1758  The `LaTeX name'
1759 \end_layout
1760
1761 \begin_layout Standard
1762 The latter should be the filename as it would be used in a LaTeX's 
1763 \series bold
1764
1765 \backslash
1766 include
1767 \series default
1768  command.
1769  It is relevant only when exporting files suitable for such inclusion.
1770 \end_layout
1771
1772 \begin_layout Standard
1773 Copiers can be used to do almost anything with output files.
1774  For example, suppose you want generated pdf files to be copied to a special
1775  directory, 
1776 \begin_inset Flex Code
1777 status collapsed
1778
1779 \begin_layout Plain Layout
1780 /home/you/pdf/
1781 \end_layout
1782
1783 \end_inset
1784
1785 .
1786  Then you could write a shell script such as this one:
1787 \end_layout
1788
1789 \begin_layout Standard
1790 \begin_inset listings
1791 inline false
1792 status open
1793
1794 \begin_layout Plain Layout
1795
1796 #!/bin/bash
1797 \end_layout
1798
1799 \begin_layout Plain Layout
1800
1801 FROMFILE=$1
1802 \end_layout
1803
1804 \begin_layout Plain Layout
1805
1806 TOFILE=`basename $2`
1807 \end_layout
1808
1809 \begin_layout Plain Layout
1810
1811 cp $FROMFILE /home/you/pdf/$TOFILE
1812 \end_layout
1813
1814 \end_inset
1815
1816 Save it in your local LyX directory—say, 
1817 \begin_inset Flex Code
1818 status collapsed
1819
1820 \begin_layout Plain Layout
1821 /home/you/.lyx/scripts/pdfcopier.sh
1822 \end_layout
1823
1824 \end_inset
1825
1826 —and make it executable, if you need to do so on your platform.
1827  Then, in the 
1828 \begin_inset Flex MenuItem
1829 status collapsed
1830
1831 \begin_layout Plain Layout
1832 Tools\SpecialChar \menuseparator
1833 Preferences
1834 \end_layout
1835
1836 \end_inset
1837
1838  dialog, select under 
1839 \begin_inset Flex MenuItem
1840 status collapsed
1841
1842 \begin_layout Plain Layout
1843 File Handling\SpecialChar \menuseparator
1844 File formats
1845 \end_layout
1846
1847 \end_inset
1848
1849  the 
1850 \begin_inset Flex MenuItem
1851 status collapsed
1852
1853 \begin_layout Plain Layout
1854 PDF(pdflatex)
1855 \end_layout
1856
1857 \end_inset
1858
1859  format—or one of the other pdf formats—and enter 
1860 \begin_inset Flex Code
1861 status collapsed
1862
1863 \begin_layout Plain Layout
1864 pdfcopier.sh $$i $$o
1865 \end_layout
1866
1867 \end_inset
1868
1869  into the 
1870 \begin_inset Flex MenuItem
1871 status collapsed
1872
1873 \begin_layout Plain Layout
1874 Copier
1875 \end_layout
1876
1877 \end_inset
1878
1879  field.
1880  
1881 \end_layout
1882
1883 \begin_layout Standard
1884 Copiers are used by LyX in various of its own conversions.
1885  For example, if appropriate programs are found, LyX will automatically
1886  install copiers for the 
1887 \begin_inset Flex MenuItem
1888 status collapsed
1889
1890 \begin_layout Plain Layout
1891 HTML
1892 \end_layout
1893
1894 \end_inset
1895
1896  and 
1897 \begin_inset Flex MenuItem
1898 status collapsed
1899
1900 \begin_layout Plain Layout
1901 HTML
1902 \begin_inset space ~
1903 \end_inset
1904
1905 (MS Word)
1906 \end_layout
1907
1908 \end_inset
1909
1910  formats.
1911  When these formats are exported, the copier sees that not just the main
1912  HTML file but various associated files (style files, images, etc.) are also
1913  copied.
1914  All these files are written to a subdirectory of the directory in which
1915  the original LyX file was found.
1916 \begin_inset Foot
1917 status collapsed
1918
1919 \begin_layout Plain Layout
1920 This copier can be customized.
1921  The optional 
1922 \begin_inset Quotes eld
1923 \end_inset
1924
1925 -e
1926 \begin_inset Quotes erd
1927 \end_inset
1928
1929  argument takes a comma-separated list of extensions to be copied; if it
1930  is omitted, all files will be copied.
1931  The 
1932 \begin_inset Quotes eld
1933 \end_inset
1934
1935 -t
1936 \begin_inset Quotes erd
1937 \end_inset
1938
1939  argument determines the extension added to the generated directory.
1940  By default, it is 
1941 \begin_inset Quotes eld
1942 \end_inset
1943
1944
1945 \begin_inset Flex MenuItem
1946 status collapsed
1947
1948 \begin_layout Plain Layout
1949 LyXconv
1950 \end_layout
1951
1952 \end_inset
1953
1954
1955 \begin_inset Quotes erd
1956 \end_inset
1957
1958 , so HTML generated from 
1959 \begin_inset Flex MenuItem
1960 status collapsed
1961
1962 \begin_layout Plain Layout
1963 /path/to/filename.lyx
1964 \end_layout
1965
1966 \end_inset
1967
1968  will end up in 
1969 \begin_inset Flex MenuItem
1970 status collapsed
1971
1972 \begin_layout Plain Layout
1973 /path/to/filename.html.LyXconv
1974 \end_layout
1975
1976 \end_inset
1977
1978 .
1979  
1980 \end_layout
1981
1982 \end_inset
1983
1984
1985 \end_layout
1986
1987 \begin_layout Section
1988 Converters
1989 \begin_inset CommandInset label
1990 LatexCommand label
1991 name "sec:Converters"
1992
1993 \end_inset
1994
1995
1996 \end_layout
1997
1998 \begin_layout Standard
1999 You can define your own Converters to convert files between different formats.
2000  This is done in the 
2001 \begin_inset Flex MenuItem
2002 status collapsed
2003
2004 \begin_layout Plain Layout
2005 Tools\SpecialChar \menuseparator
2006 Preferences\SpecialChar \menuseparator
2007 File Handling\SpecialChar \menuseparator
2008 Converters
2009 \end_layout
2010
2011 \end_inset
2012
2013  dialog.
2014 \end_layout
2015
2016 \begin_layout Standard
2017 To define a new converter, select the 
2018 \begin_inset Flex MenuItem
2019 status collapsed
2020
2021 \begin_layout Plain Layout
2022 From
2023 \begin_inset space ~
2024 \end_inset
2025
2026 format
2027 \end_layout
2028
2029 \end_inset
2030
2031  and 
2032 \begin_inset Flex MenuItem
2033 status collapsed
2034
2035 \begin_layout Plain Layout
2036 To
2037 \begin_inset space ~
2038 \end_inset
2039
2040 format
2041 \end_layout
2042
2043 \end_inset
2044
2045  from the drop-down lists, enter the command needed for the conversion,
2046  and then press the 
2047 \begin_inset Flex MenuItem
2048 status collapsed
2049
2050 \begin_layout Plain Layout
2051 Add
2052 \end_layout
2053
2054 \end_inset
2055
2056  button.
2057  Several variables can be used in the definition of converters:
2058 \end_layout
2059
2060 \begin_layout Labeling
2061 \labelwidthstring 00.00.0000
2062 \begin_inset Flex Code
2063 status collapsed
2064
2065 \begin_layout Plain Layout
2066 $$s
2067 \end_layout
2068
2069 \end_inset
2070
2071  The LyX system directory
2072 \end_layout
2073
2074 \begin_layout Labeling
2075 \labelwidthstring 00.00.0000
2076 \begin_inset Flex Code
2077 status collapsed
2078
2079 \begin_layout Plain Layout
2080 $$i
2081 \end_layout
2082
2083 \end_inset
2084
2085  The input file
2086 \end_layout
2087
2088 \begin_layout Labeling
2089 \labelwidthstring 00.00.0000
2090 \begin_inset Flex Code
2091 status collapsed
2092
2093 \begin_layout Plain Layout
2094 $$o
2095 \end_layout
2096
2097 \end_inset
2098
2099  The output file
2100 \end_layout
2101
2102 \begin_layout Labeling
2103 \labelwidthstring 00.00.0000
2104 \begin_inset Flex Code
2105 status collapsed
2106
2107 \begin_layout Plain Layout
2108 $$b
2109 \end_layout
2110
2111 \end_inset
2112
2113  The base filename of the input file (i.
2114 \begin_inset space \thinspace{}
2115 \end_inset
2116
2117 g., without the extension)
2118 \end_layout
2119
2120 \begin_layout Labeling
2121 \labelwidthstring 00.00.0000
2122 \begin_inset Flex Code
2123 status collapsed
2124
2125 \begin_layout Plain Layout
2126 $$p
2127 \end_layout
2128
2129 \end_inset
2130
2131  The path to the input file
2132 \end_layout
2133
2134 \begin_layout Labeling
2135 \labelwidthstring 00.00.0000
2136 \begin_inset Flex Code
2137 status collapsed
2138
2139 \begin_layout Plain Layout
2140 $$r
2141 \end_layout
2142
2143 \end_inset
2144
2145  The path to the original input file (this is different from $$p when a
2146  chain of converters is called)
2147 \end_layout
2148
2149 \begin_layout Labeling
2150 \labelwidthstring 00.00.0000
2151 \begin_inset Flex Code
2152 status collapsed
2153
2154 \begin_layout Plain Layout
2155 $$e
2156 \end_layout
2157
2158 \end_inset
2159
2160  The iconv name for the encoding of the document.
2161 \end_layout
2162
2163 \begin_layout Standard
2164 In the 
2165 \begin_inset Flex MenuItem
2166 status collapsed
2167
2168 \begin_layout Plain Layout
2169 Extra
2170 \begin_inset space ~
2171 \end_inset
2172
2173 Flag
2174 \end_layout
2175
2176 \end_inset
2177
2178  field you can enter the following flags, separated by commas:
2179 \end_layout
2180
2181 \begin_layout Labeling
2182 \labelwidthstring 00.00.0000
2183 \begin_inset Flex Code
2184 status collapsed
2185
2186 \begin_layout Plain Layout
2187 latex
2188 \end_layout
2189
2190 \end_inset
2191
2192  This converter runs some form of LaTeX.
2193  This will make LyX's LaTeX error logs available.
2194 \end_layout
2195
2196 \begin_layout Labeling
2197 \labelwidthstring 00.00.0000
2198 \begin_inset Flex Code
2199 status collapsed
2200
2201 \begin_layout Plain Layout
2202 needaux
2203 \end_layout
2204
2205 \end_inset
2206
2207  Needs the LaTeX 
2208 \begin_inset Flex MenuItem
2209 status collapsed
2210
2211 \begin_layout Plain Layout
2212 .aux
2213 \end_layout
2214
2215 \end_inset
2216
2217  file for the conversion.
2218 \end_layout
2219
2220 \begin_layout Labeling
2221 \labelwidthstring 00.00.0000
2222 \begin_inset Flex Code
2223 status collapsed
2224
2225 \begin_layout Plain Layout
2226 xml
2227 \end_layout
2228
2229 \end_inset
2230
2231  Output is XML.
2232 \end_layout
2233
2234 \begin_layout Standard
2235 The following three flags are not really flags at all because they take
2236  an argument in the 
2237 \begin_inset Flex MenuItem
2238 status collapsed
2239
2240 \begin_layout Plain Layout
2241 key
2242 \begin_inset space ~
2243 \end_inset
2244
2245 =
2246 \begin_inset space ~
2247 \end_inset
2248
2249 value
2250 \end_layout
2251
2252 \end_inset
2253
2254  format:
2255 \end_layout
2256
2257 \begin_layout Labeling
2258 \labelwidthstring 00.00.0000
2259 \begin_inset Flex Code
2260 status collapsed
2261
2262 \begin_layout Plain Layout
2263 parselog
2264 \end_layout
2265
2266 \end_inset
2267
2268  If set, the converter's standard error will be redirected to a file 
2269 \begin_inset Flex Code
2270 status collapsed
2271
2272 \begin_layout Plain Layout
2273 infile.out
2274 \end_layout
2275
2276 \end_inset
2277
2278 , and the script given as argument will be run as: 
2279 \begin_inset Flex Code
2280 status collapsed
2281
2282 \begin_layout Plain Layout
2283 script < infile.out > infile.log
2284 \end_layout
2285
2286 \end_inset
2287
2288 .
2289  The argument may contain 
2290 \begin_inset Flex Code
2291 status collapsed
2292
2293 \begin_layout Plain Layout
2294 $$s
2295 \end_layout
2296
2297 \end_inset
2298
2299 .
2300 \end_layout
2301
2302 \begin_layout Labeling
2303 \labelwidthstring 00.00.0000
2304 \begin_inset Flex Code
2305 status collapsed
2306
2307 \begin_layout Plain Layout
2308 resultdir
2309 \end_layout
2310
2311 \end_inset
2312
2313  The name of the directory in which the converter will dump the generated
2314  files.
2315  LyX will not create this directory, and it does not copy anything into
2316  it, though it will copy this directory to the destination.
2317  The argument may contain 
2318 \begin_inset Flex Code
2319 status collapsed
2320
2321 \begin_layout Plain Layout
2322 $$b
2323 \end_layout
2324
2325 \end_inset
2326
2327 , which will be replaced by the base name of the input and output files,
2328  respectively, when the directory is copied.
2329 \begin_inset Newline newline
2330 \end_inset
2331
2332 Note that resultdir and usetempdir make no sense together.
2333  The latter will be ignored if the former is given.
2334 \end_layout
2335
2336 \begin_layout Labeling
2337 \labelwidthstring 00.00.0000
2338 \begin_inset Flex Code
2339 status collapsed
2340
2341 \begin_layout Plain Layout
2342 resultfile
2343 \end_layout
2344
2345 \end_inset
2346
2347  Determines the output file name and may, contain 
2348 \begin_inset Flex Code
2349 status collapsed
2350
2351 \begin_layout Plain Layout
2352 $$b
2353 \end_layout
2354
2355 \end_inset
2356
2357 .
2358  Sensible only with resultdir and optional even then; if not given, it defaults
2359  to `index'.
2360 \end_layout
2361
2362 \begin_layout Standard
2363 None of these last three are presently used in any of the converters that
2364  are installed with LyX.
2365  
2366 \end_layout
2367
2368 \begin_layout Standard
2369 You do not have to define converters for all formats between which you want
2370  to convert.
2371  For example, you will note that there is no `LyX to PostScript' converter,
2372  but LyX will export PostScript.
2373  It does so by first creating a LaTeX file (no converter needs to be defined
2374  for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2375  and finally converting the resulting DVI file to PostScript.
2376  LyX finds such `chains' of converters automatically, and it will always
2377  choose the shortest possible chain.
2378  You can, though, still define multiple conversion methods between file
2379  formats.
2380  For example, the standard LyX configuration provides three ways to convert
2381  LaTeX to PDF: Directly, using 
2382 \begin_inset Flex MenuItem
2383 status collapsed
2384
2385 \begin_layout Plain Layout
2386 pdflatex
2387 \end_layout
2388
2389 \end_inset
2390
2391 ; via (DVI and) PostScript, using 
2392 \begin_inset Flex MenuItem
2393 status collapsed
2394
2395 \begin_layout Plain Layout
2396 ps2pdf
2397 \end_layout
2398
2399 \end_inset
2400
2401 ; or via DVI, using 
2402 \begin_inset Flex MenuItem
2403 status collapsed
2404
2405 \begin_layout Plain Layout
2406 dvipdfm
2407 \end_layout
2408
2409 \end_inset
2410
2411 .
2412  To define such alternate chains, you must define multiple target `file
2413  formats', as described in section 
2414 \begin_inset CommandInset ref
2415 LatexCommand ref
2416 reference "sec:Formats"
2417
2418 \end_inset
2419
2420 .
2421  For example, in the standard configuration, the formats named 
2422 \begin_inset Flex MenuItem
2423 status collapsed
2424
2425 \begin_layout Plain Layout
2426 pdf
2427 \end_layout
2428
2429 \end_inset
2430
2431
2432 \begin_inset Flex MenuItem
2433 status collapsed
2434
2435 \begin_layout Plain Layout
2436 pdf2
2437 \end_layout
2438
2439 \end_inset
2440
2441 , and 
2442 \begin_inset Flex MenuItem
2443 status collapsed
2444
2445 \begin_layout Plain Layout
2446 pdf3
2447 \end_layout
2448
2449 \end_inset
2450
2451  are defined, all of which share the extension 
2452 \begin_inset Flex MenuItem
2453 status collapsed
2454
2455 \begin_layout Plain Layout
2456 .pdf
2457 \end_layout
2458
2459 \end_inset
2460
2461 , and which correspond to the conversion methods just mentioned.
2462 \end_layout
2463
2464 \begin_layout Chapter
2465 Internationalizing LyX
2466 \begin_inset CommandInset label
2467 LatexCommand label
2468 name "cha:Internationalizing-LyX"
2469
2470 \end_inset
2471
2472
2473 \end_layout
2474
2475 \begin_layout Standard
2476 LyX supports using a translated interface.
2477  Last time we checked, LyX provided text in thirty languages.
2478  The language of choice is called your 
2479 \emph on
2480 locale
2481 \emph default
2482 .
2483  (For further reading on locale settings, see also the documentation for
2484  locale that comes with your operating system.
2485  For Linux, the manual page for 
2486 \begin_inset Flex Code
2487 status collapsed
2488
2489 \begin_layout Plain Layout
2490 locale(5)
2491 \end_layout
2492
2493 \end_inset
2494
2495  could be a good place to start).
2496 \end_layout
2497
2498 \begin_layout Standard
2499 Notice that these translations will work, but do contain a few flaws.
2500  In particular, all dialogs have been designed with the English text in
2501  mind, which means that some of the translated text will be too large to
2502  fit within the space allocated.
2503  This is only a display problem and will not cause any harm.
2504  Also, you will find that some of the translations do not define shortcut
2505  keys for everything.
2506  Sometimes, there are simply not enough free letters to do it.
2507  Other times, the translator just hasn't got around to doing it yet.
2508  Our localization team, which you may wish to join,
2509 \begin_inset Foot
2510 status collapsed
2511
2512 \begin_layout Plain Layout
2513 If you are a fluent speaker of a language other than English, joining these
2514  teams is a great way to give back to the LyX community!
2515 \end_layout
2516
2517 \end_inset
2518
2519  will of course try to fix these shortcomings in future versions of LyX.
2520 \end_layout
2521
2522 \begin_layout Section
2523 Translating LyX
2524 \end_layout
2525
2526 \begin_layout Subsection
2527 Translating the graphical user interface (text messages).
2528 \end_layout
2529
2530 \begin_layout Standard
2531 LyX uses the GNU 
2532 \begin_inset Flex Code
2533 status collapsed
2534
2535 \begin_layout Plain Layout
2536 gettext
2537 \end_layout
2538
2539 \end_inset
2540
2541  library to handle the internationalization of the interface.
2542  To have LyX speak your favorite language in all menus and dialogs, you
2543  need a 
2544 \begin_inset Flex Code
2545 status collapsed
2546
2547 \begin_layout Plain Layout
2548 po
2549 \end_layout
2550
2551 \end_inset
2552
2553 -file for that language.
2554  When this is available, you'll have to generate a 
2555 \begin_inset Flex Code
2556 status collapsed
2557
2558 \begin_layout Plain Layout
2559 mo
2560 \end_layout
2561
2562 \end_inset
2563
2564 -file from it and install the 
2565 \begin_inset Flex Code
2566 status collapsed
2567
2568 \begin_layout Plain Layout
2569 mo
2570 \end_layout
2571
2572 \end_inset
2573
2574 -file.
2575  The process of doing all of this is explained in the documentation for
2576  GNU 
2577 \begin_inset Flex Code
2578 status collapsed
2579
2580 \begin_layout Plain Layout
2581 gettext
2582 \end_layout
2583
2584 \end_inset
2585
2586 .
2587  It is possible to do this just for yourself, but if you're going to do
2588  it, you might as well share the results of your labors with the rest of
2589  the LyX community.
2590  Send a message to the LyX developers' list for more information about how
2591  to proceed.
2592 \end_layout
2593
2594 \begin_layout Standard
2595 In short, this is what you should do (xx denotes the language code):
2596 \end_layout
2597
2598 \begin_layout Itemize
2599 Check out the LyX source code.
2600  (See the 
2601 \begin_inset CommandInset href
2602 LatexCommand href
2603 name "information on the web"
2604 target "http://www.lyx.org/HowToUseSVN"
2605
2606 \end_inset
2607
2608 .)
2609 \end_layout
2610
2611 \begin_layout Itemize
2612 Copy the file 
2613 \begin_inset Flex Code
2614 status collapsed
2615
2616 \begin_layout Plain Layout
2617 lyx.pot
2618 \end_layout
2619
2620 \end_inset
2621
2622  to the folder of the 
2623 \begin_inset Flex Code
2624 status collapsed
2625
2626 \begin_layout Plain Layout
2627 **.po
2628 \end_layout
2629
2630 \end_inset
2631
2632  files.
2633  Then rename it to 
2634 \begin_inset Flex Code
2635 status collapsed
2636
2637 \begin_layout Plain Layout
2638 xx.po
2639 \end_layout
2640
2641 \end_inset
2642
2643 .
2644  (If 
2645 \begin_inset Flex Code
2646 status collapsed
2647
2648 \begin_layout Plain Layout
2649 lyx.pot
2650 \end_layout
2651
2652 \end_inset
2653
2654  doesn't exist anywhere, it can be remade with the console command 
2655 \begin_inset Flex Code
2656 status collapsed
2657
2658 \begin_layout Plain Layout
2659 make lyx.pot
2660 \end_layout
2661
2662 \end_inset
2663
2664  in that directory, or you can use an existing po-file for some other language
2665  as a template).
2666 \end_layout
2667
2668 \begin_layout Itemize
2669 Edit 
2670 \begin_inset Flex Code
2671 status collapsed
2672
2673 \begin_layout Plain Layout
2674 xx.po
2675 \end_layout
2676
2677 \end_inset
2678
2679 .
2680 \begin_inset Foot
2681 status collapsed
2682
2683 \begin_layout Plain Layout
2684 This is just a text file, so it can be edited in any text editor.
2685  But there are also specialized programs that support such editing, such
2686  as 
2687 \family typewriter
2688 Poedit
2689 \family default
2690  (for all platforms) or 
2691 \family typewriter
2692 KBabel
2693 \family default
2694  (for KDE).
2695  
2696 \family typewriter
2697 Emacs
2698 \family default
2699  contains a `mode' for editing 
2700 \begin_inset Flex Code
2701 status collapsed
2702
2703 \begin_layout Plain Layout
2704 po
2705 \end_layout
2706
2707 \end_inset
2708
2709  files, as well.
2710 \end_layout
2711
2712 \end_inset
2713
2714  For some menu- and widget-labels, there are also shortcut keys that should
2715  be translated.
2716  Those keys are marked after a `|', and should be translated according to
2717  the words and phrases of the language.
2718  You should also fill also out the information at the beginning of the new
2719  
2720 \begin_inset Flex Code
2721 status collapsed
2722
2723 \begin_layout Plain Layout
2724 po
2725 \end_layout
2726
2727 \end_inset
2728
2729 -file with your email-address, etc., so people know where to reach you with
2730  suggestions and entertaining flames.
2731 \end_layout
2732
2733 \begin_layout Standard
2734 If you are just doing this on your own, then:
2735 \end_layout
2736
2737 \begin_layout Itemize
2738 Generate 
2739 \begin_inset Flex Code
2740 status collapsed
2741
2742 \begin_layout Plain Layout
2743 xx.mo
2744 \end_layout
2745
2746 \end_inset
2747
2748 .
2749  This can be done with 
2750 \begin_inset Flex Code
2751 status collapsed
2752
2753 \begin_layout Plain Layout
2754 msgfmt -o xx.mo < xx.po
2755 \end_layout
2756
2757 \end_inset
2758
2759 .
2760 \end_layout
2761
2762 \begin_layout Itemize
2763 Copy the 
2764 \begin_inset Flex Code
2765 status collapsed
2766
2767 \begin_layout Plain Layout
2768 mo
2769 \end_layout
2770
2771 \end_inset
2772
2773 -file to your locale-tree, at the correct directory for application messages
2774  for the language
2775 \series bold
2776  
2777 \series default
2778 xx, and under the name 
2779 \begin_inset Flex Code
2780 status collapsed
2781
2782 \begin_layout Plain Layout
2783 lyx.mo
2784 \end_layout
2785
2786 \end_inset
2787
2788  (e.
2789 \begin_inset space \thinspace{}
2790 \end_inset
2791
2792 g.
2793 \begin_inset space \space{}
2794 \end_inset
2795
2796
2797 \begin_inset Flex Code
2798 status collapsed
2799
2800 \begin_layout Plain Layout
2801 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
2802 \end_layout
2803
2804 \end_inset
2805
2806
2807 \series bold
2808 .
2809 \end_layout
2810
2811 \begin_layout Standard
2812 As said, however, it would be best if the new 
2813 \begin_inset Flex Code
2814 status collapsed
2815
2816 \begin_layout Plain Layout
2817 po
2818 \end_layout
2819
2820 \end_inset
2821
2822 -file could be added to the LyX distribution, so others can use it.
2823  Adding it involves making additional changes to LyX.
2824  So send an email to the developers' mailing list if you're interested in
2825  doing that.
2826 \end_layout
2827
2828 \begin_layout Subsubsection
2829 Ambiguous messages
2830 \end_layout
2831
2832 \begin_layout Standard
2833 Sometimes it turns out that one English message needs to be translated into
2834  different messages in the target language.
2835  One example is the message 
2836 \begin_inset Flex Code
2837 status collapsed
2838
2839 \begin_layout Plain Layout
2840 To
2841 \end_layout
2842
2843 \end_inset
2844
2845  which has the German translation 
2846 \lang german
2847 Nach
2848 \lang english
2849  or 
2850 \lang german
2851 Bis
2852 \lang english
2853 , depending upon exactly what the English 
2854 \begin_inset Quotes eld
2855 \end_inset
2856
2857 to
2858 \begin_inset Quotes erd
2859 \end_inset
2860
2861  means.
2862  GNU 
2863 \begin_inset Flex Code
2864 status collapsed
2865
2866 \begin_layout Plain Layout
2867 gettext
2868 \end_layout
2869
2870 \end_inset
2871
2872  does not handle such ambiguous translations.
2873  Therefore you have to add some context information to the message: Instead
2874  of 
2875 \begin_inset Flex Code
2876 status collapsed
2877
2878 \begin_layout Plain Layout
2879 To
2880 \end_layout
2881
2882 \end_inset
2883
2884  it becomes 
2885 \begin_inset Flex Code
2886 status collapsed
2887
2888 \begin_layout Plain Layout
2889 To[[as in 'From format x to format y']]
2890 \end_layout
2891
2892 \end_inset
2893
2894  and 
2895 \begin_inset Flex Code
2896 status collapsed
2897
2898 \begin_layout Plain Layout
2899 To[[as in 'From page x to page y']].
2900 \end_layout
2901
2902 \end_inset
2903
2904  Now the two occurrences of 
2905 \begin_inset Flex Code
2906 status collapsed
2907
2908 \begin_layout Plain Layout
2909 To
2910 \end_layout
2911
2912 \end_inset
2913
2914  are different for 
2915 \begin_inset Flex Code
2916 status collapsed
2917
2918 \begin_layout Plain Layout
2919 gettext
2920 \end_layout
2921
2922 \end_inset
2923
2924  and can be translated correctly to 
2925 \lang german
2926 Nach
2927 \lang english
2928  and 
2929 \lang german
2930 Bis
2931 \lang english
2932 , respectively.
2933 \end_layout
2934
2935 \begin_layout Standard
2936 Of course the context information needs to be stripped off the original
2937  message when no translation is used.
2938  Therefore you have to put it in double square brackets at the end of the
2939  message (see the example above).
2940  The translation mechanism of LyX ensures that everything in double square
2941  brackets at the end of messages is removed before displaying the message.
2942 \end_layout
2943
2944 \begin_layout Subsection
2945 Translating the documentation.
2946 \end_layout
2947
2948 \begin_layout Standard
2949 The online documentation (in the 
2950 \begin_inset Flex MenuItem
2951 status collapsed
2952
2953 \begin_layout Plain Layout
2954 Help
2955 \end_layout
2956
2957 \end_inset
2958
2959 -menu) can (and should!) be translated.
2960  If there are translated versions of the documentation available
2961 \begin_inset Foot
2962 status collapsed
2963
2964 \begin_layout Plain Layout
2965 As of March 2008, at least some of the documents have been translated into
2966  fourteen languages, with the Tutorial available in a few more.
2967 \end_layout
2968
2969 \end_inset
2970
2971  and the locale is set accordingly, these will be used automagically by
2972  LyX.
2973  LyX looks for translated versions as 
2974 \begin_inset Flex Code
2975 status collapsed
2976
2977 \begin_layout Plain Layout
2978 LyXDir/doc/xx/DocName.lyx
2979 \end_layout
2980
2981 \end_inset
2982
2983 , where 
2984 \begin_inset Flex Code
2985 status collapsed
2986
2987 \begin_layout Plain Layout
2988 xx
2989 \end_layout
2990
2991 \end_inset
2992
2993  is the code for the language currently in use.
2994  If there are no translated documents, the default English versions will
2995  be displayed.
2996  Note that the translated versions must have the same filenames (
2997 \begin_inset Flex Code
2998 status collapsed
2999
3000 \begin_layout Plain Layout
3001 DocName
3002 \end_layout
3003
3004 \end_inset
3005
3006  above) as the original.
3007  If you feel up to translating the documentation (an excellent way to proof-read
3008  the original documentation by the way!), there are a few things you should
3009  do right away:
3010 \end_layout
3011
3012 \begin_layout Itemize
3013 Check out the documentation translation web page at 
3014 \begin_inset CommandInset href
3015 LatexCommand href
3016 name "http://www.lyx.org/Translation"
3017 target "http://www.lyx.org/Translation"
3018
3019 \end_inset
3020
3021 .
3022  That way, you can find out which (if any) documents have already been translate
3023 d into your language.
3024  You can also find out who (if anyone) is organizing the effort to translate
3025  the documentation into your language.
3026  If no one is organizing the effort, please let us know that you're interested.
3027 \end_layout
3028
3029 \begin_layout Standard
3030 Once you get to actually translating, here's a few hints for you that may
3031  save you trouble:
3032 \end_layout
3033
3034 \begin_layout Itemize
3035 Join the documentation team! There is information on how to do that in 
3036 \begin_inset Flex Code
3037 status collapsed
3038
3039 \begin_layout Plain Layout
3040 Intro.lyx
3041 \end_layout
3042
3043 \end_inset
3044
3045  (
3046 \begin_inset Flex MenuItem
3047 status collapsed
3048
3049 \begin_layout Plain Layout
3050 Help\SpecialChar \menuseparator
3051 Introduction
3052 \end_layout
3053
3054 \end_inset
3055
3056 ), which by the way is the first document you should translate.
3057 \end_layout
3058
3059 \begin_layout Itemize
3060 Learn the typographic conventions for the language you are translating to.
3061  Typography is an ancient art and over the centuries, a great variety of
3062  conventions have developed throughout different parts of the world.
3063  Also study the professional terminology amongst typographers in your country.
3064  Inventing your own terminology will only confuse the users.
3065  
3066 \emph on
3067 (Warning! Typography is addictive!)
3068 \end_layout
3069
3070 \begin_layout Itemize
3071 Make a copy of the document.
3072  This will be your working copy.
3073  You can use this as your personal translated help-file by placing it in
3074  your 
3075 \begin_inset Flex Code
3076 status collapsed
3077
3078 \begin_layout Plain Layout
3079 UserDir/doc/xx/
3080 \end_layout
3081
3082 \end_inset
3083
3084  directory.
3085 \end_layout
3086
3087 \begin_layout Itemize
3088 Sometimes the original document (from the LyX-team) will be updated.
3089  Use the source viewer at 
3090 \begin_inset CommandInset href
3091 LatexCommand href
3092 name "http://www.lyx.org/trac/timeline"
3093 target "http://www.lyx.org/trac/timeline"
3094
3095 \end_inset
3096
3097  to see what has been changed.
3098  That way you can easily see which parts of the translated document need
3099  to be updated.
3100 \end_layout
3101
3102 \begin_layout Standard
3103 If you ever find an error in the original document, fix it and notify the
3104  rest of the documentation team of the changes! (You didn't forget to join
3105  the documentation team, did you?)
3106 \end_layout
3107
3108 \begin_layout Standard
3109 \begin_inset Branch OutDated
3110 status collapsed
3111
3112 \begin_layout Section
3113 International Keyboard Support
3114 \end_layout
3115
3116 \begin_layout Standard
3117
3118 \emph on
3119 [Editor's Note: The following section is by
3120 \emph default
3121  
3122 \shape smallcaps
3123 \emph on
3124 Ivan Schreter
3125 \shape default
3126 .
3127  It needs to be fixed to conform to the new Documentation Style sheet and
3128  to make use of the new v1.0 features.
3129  The whole thing also needs to be merged with the section following it.-jw
3130  It may also be badly out of date.-rh (2008)]
3131 \end_layout
3132
3133 \begin_layout Subsection
3134 Defining Own Keymaps: Keymap File Format
3135 \end_layout
3136
3137 \begin_layout Standard
3138 Let's look at a keyboard definition file a little closer.
3139  It is a plain text file defining
3140 \end_layout
3141
3142 \begin_layout Itemize
3143 key-to-key or key-to-string translations
3144 \end_layout
3145
3146 \begin_layout Itemize
3147 dead keys
3148 \end_layout
3149
3150 \begin_layout Itemize
3151 dead keys exceptions
3152 \end_layout
3153
3154 \begin_layout Standard
3155 To define key-to-key or key-to-string translation, use this command:
3156 \end_layout
3157
3158 \begin_layout Quotation
3159 \begin_inset Flex Code
3160 status collapsed
3161
3162 \begin_layout Plain Layout
3163
3164 \backslash
3165 kmap
3166 \end_layout
3167
3168 \end_inset
3169
3170  
3171 \begin_inset Flex Code
3172 status collapsed
3173
3174 \begin_layout Plain Layout
3175 key
3176 \end_layout
3177
3178 \end_inset
3179
3180  outstring 
3181 \end_layout
3182
3183 \begin_layout Standard
3184 where 
3185 \begin_inset Flex Code
3186 status collapsed
3187
3188 \begin_layout Plain Layout
3189 key
3190 \end_layout
3191
3192 \end_inset
3193
3194  is the key to be translated and 
3195 \begin_inset Flex Code
3196 status collapsed
3197
3198 \begin_layout Plain Layout
3199 outstring
3200 \end_layout
3201
3202 \end_inset
3203
3204  is the string to be inserted into the document.
3205  To define dead keys, use:
3206 \end_layout
3207
3208 \begin_layout Quotation
3209 \begin_inset Flex Code
3210 status collapsed
3211
3212 \begin_layout Plain Layout
3213
3214 \backslash
3215 kmod
3216 \end_layout
3217
3218 \end_inset
3219
3220  
3221 \begin_inset Flex Code
3222 status collapsed
3223
3224 \begin_layout Plain Layout
3225 key
3226 \end_layout
3227
3228 \end_inset
3229
3230  deadkey
3231 \end_layout
3232
3233 \begin_layout Standard
3234 where 
3235 \begin_inset Flex Code
3236 status collapsed
3237
3238 \begin_layout Plain Layout
3239 key
3240 \end_layout
3241
3242 \end_inset
3243
3244  is a keyboard key and 
3245 \begin_inset Flex Code
3246 status collapsed
3247
3248 \begin_layout Plain Layout
3249 deadkey
3250 \end_layout
3251
3252 \end_inset
3253
3254  is dead key name.
3255  The following dead keys are supported (shortcut name is in parentheses):
3256 \end_layout
3257
3258 \begin_layout Quotation
3259
3260 \emph on
3261 Name
3262 \begin_inset space \hfill{}
3263 \end_inset
3264
3265 Example
3266 \end_layout
3267
3268 \begin_layout Quotation
3269 acute (acu)
3270 \begin_inset space \hfill{}
3271 \end_inset
3272
3273 áéíóú
3274 \end_layout
3275
3276 \begin_layout Quotation
3277 grave (gra)
3278 \begin_inset space \hfill{}
3279 \end_inset
3280
3281 àèìòù
3282 \end_layout
3283
3284 \begin_layout Quotation
3285 macron (mac)
3286 \begin_inset space \hfill{}
3287 \end_inset
3288
3289  ō
3290 \end_layout
3291
3292 \begin_layout Quotation
3293 tilde (til)
3294 \begin_inset space \hfill{}
3295 \end_inset
3296
3297 ñÑ
3298 \end_layout
3299
3300 \begin_layout Quotation
3301 underbar (underb)
3302 \begin_inset space \hfill{}
3303 \end_inset
3304
3305
3306 \begin_inset ERT
3307 status open
3308
3309 \begin_layout Plain Layout
3310
3311
3312 \backslash
3313 b o
3314 \end_layout
3315
3316 \end_inset
3317
3318
3319 \end_layout
3320
3321 \begin_layout Quotation
3322 cedilla (ced)
3323 \begin_inset space \hfill{}
3324 \end_inset
3325
3326 çÇ
3327 \end_layout
3328
3329 \begin_layout Quotation
3330 underdot (underd)
3331 \begin_inset space \hfill{}
3332 \end_inset
3333
3334
3335 \begin_inset ERT
3336 status open
3337
3338 \begin_layout Plain Layout
3339
3340
3341 \backslash
3342 d o
3343 \end_layout
3344
3345 \end_inset
3346
3347
3348 \end_layout
3349
3350 \begin_layout Quotation
3351 circumflex (circu)
3352 \begin_inset space \hfill{}
3353 \end_inset
3354
3355 âêîôû
3356 \end_layout
3357
3358 \begin_layout Quotation
3359 circle (circl)
3360 \begin_inset space \hfill{}
3361 \end_inset
3362
3363 ÅůŮ
3364 \end_layout
3365
3366 \begin_layout Quotation
3367 tie (tie)
3368 \begin_inset space \hfill{}
3369 \end_inset
3370
3371
3372 \begin_inset ERT
3373 status open
3374
3375 \begin_layout Plain Layout
3376
3377
3378 \backslash
3379 t o
3380 \end_layout
3381
3382 \end_inset
3383
3384
3385 \end_layout
3386
3387 \begin_layout Quotation
3388 breve (bre)
3389 \begin_inset space \hfill{}
3390 \end_inset
3391
3392 ă
3393 \begin_inset ERT
3394 status open
3395
3396 \begin_layout Plain Layout
3397
3398
3399 \backslash
3400 u o
3401 \end_layout
3402
3403 \end_inset
3404
3405
3406 \end_layout
3407
3408 \begin_layout Quotation
3409 caron (car)
3410 \begin_inset space \hfill{}
3411 \end_inset
3412
3413 čšž
3414 \end_layout
3415
3416 \begin_layout Quotation
3417 hungarian umlaut (hug)
3418 \begin_inset space \hfill{}
3419 \end_inset
3420
3421 őű
3422 \end_layout
3423
3424 \begin_layout Quotation
3425 umlaut (uml)
3426 \begin_inset space \hfill{}
3427 \end_inset
3428
3429 äöü
3430 \end_layout
3431
3432 \begin_layout Quotation
3433 dot (dot)
3434 \begin_inset space \hfill{}
3435 \end_inset
3436
3437 ż
3438 \begin_inset ERT
3439 status open
3440
3441 \begin_layout Plain Layout
3442
3443
3444 \backslash
3445 .s
3446 \end_layout
3447
3448 \end_inset
3449
3450
3451 \end_layout
3452
3453 \begin_layout Standard
3454 Since in many international keyboards there are exceptions to what some
3455  dead keys should do, you can define them using
3456 \end_layout
3457
3458 \begin_layout Quotation
3459 \begin_inset Flex Code
3460 status collapsed
3461
3462 \begin_layout Plain Layout
3463
3464 \backslash
3465 kxmod
3466 \end_layout
3467
3468 \end_inset
3469
3470  deadkey key outstring
3471 \end_layout
3472
3473 \begin_layout Standard
3474 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3475 , so you put in
3476 \end_layout
3477
3478 \begin_layout Quotation
3479 \begin_inset Flex Code
3480 status collapsed
3481
3482 \begin_layout Plain Layout
3483
3484 \backslash
3485 kxmod
3486 \end_layout
3487
3488 \end_inset
3489
3490  caron o "
3491 \backslash
3492 ^o"
3493 \end_layout
3494
3495 \begin_layout Standard
3496 to make it work correctly.
3497  Also, you have to define as exceptions dead keys over i and j, to remove
3498  the dot from them before inserting an accent mark.
3499  I will change this when the time comes, but so far I haven't had time.
3500 \end_layout
3501
3502 \begin_layout Standard
3503 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3504  double backslash.
3505  Also, quotes and 
3506 \begin_inset Flex Code
3507 status collapsed
3508
3509 \begin_layout Plain Layout
3510 #
3511 \end_layout
3512
3513 \end_inset
3514
3515  have different meaning.
3516  
3517 \begin_inset Flex Code
3518 status collapsed
3519
3520 \begin_layout Plain Layout
3521 #
3522 \end_layout
3523
3524 \end_inset
3525
3526  marks comments, quotes start and end LaTeX-style commands.
3527  To enter quote, you'll need to use 
3528 \begin_inset Flex Code
3529 status collapsed
3530
3531 \begin_layout Plain Layout
3532
3533 \backslash
3534 "
3535 \end_layout
3536
3537 \end_inset
3538
3539 , to enter 
3540 \begin_inset Flex Code
3541 status collapsed
3542
3543 \begin_layout Plain Layout
3544 #
3545 \end_layout
3546
3547 \end_inset
3548
3549 , use 
3550 \begin_inset Flex Code
3551 status collapsed
3552
3553 \begin_layout Plain Layout
3554
3555 \backslash
3556 #
3557 \end_layout
3558
3559 \end_inset
3560
3561 .
3562 \end_layout
3563
3564 \begin_layout Standard
3565 If you make a keyboard description file that works for your language, please
3566  mail it to me, so I can include it in the next keymap distribution.
3567 \end_layout
3568
3569 \begin_layout Standard
3570 More keywords will be supported in keymap configuration file in future,
3571  like
3572 \end_layout
3573
3574 \begin_layout Itemize
3575 \begin_inset Flex Code
3576 status collapsed
3577
3578 \begin_layout Plain Layout
3579
3580 \backslash
3581 kinclude filename
3582 \end_layout
3583
3584 \end_inset
3585
3586
3587 \emph on
3588
3589 \begin_inset space \hfill{}
3590 \end_inset
3591
3592
3593 \begin_inset Flex Code
3594 status collapsed
3595
3596 \begin_layout Plain Layout
3597 include
3598 \end_layout
3599
3600 \end_inset
3601
3602  another file
3603 \end_layout
3604
3605 \begin_layout Itemize
3606 \begin_inset Flex Code
3607 status collapsed
3608
3609 \begin_layout Plain Layout
3610
3611 \backslash
3612 kprog program
3613 \end_layout
3614
3615 \end_inset
3616
3617
3618 \emph on
3619
3620 \begin_inset space \hfill{}
3621 \end_inset
3622
3623
3624 \begin_inset Flex Code
3625 status collapsed
3626
3627 \begin_layout Plain Layout
3628 define
3629 \end_layout
3630
3631 \end_inset
3632
3633  an external keymap translation program 
3634 \end_layout
3635
3636 \begin_layout Standard
3637 Also, it should look into 
3638 \begin_inset Flex Code
3639 status collapsed
3640
3641 \begin_layout Plain Layout
3642 lyxrc
3643 \end_layout
3644
3645 \end_inset
3646
3647  file for defaults, too (for example, a 
3648 \begin_inset Flex Code
3649 status collapsed
3650
3651 \begin_layout Plain Layout
3652
3653 \backslash
3654 kinclude
3655 \end_layout
3656
3657 \end_inset
3658
3659  option to include default keyboard).
3660 \end_layout
3661
3662 \end_inset
3663
3664
3665 \end_layout
3666
3667 \begin_layout Section
3668 International Keymap Stuff
3669 \begin_inset CommandInset label
3670 LatexCommand label
3671 name "sec:International-Keymap-Stuff"
3672
3673 \end_inset
3674
3675
3676 \end_layout
3677
3678 \begin_layout Standard
3679 \begin_inset Note Note
3680 status open
3681
3682 \begin_layout Plain Layout
3683 In doing the revisions on this document in March 2008, I did not look over
3684  this stuff, as I do not understand it.
3685  It would be good if someone else could do so.
3686  (RH)
3687 \end_layout
3688
3689 \end_inset
3690
3691
3692 \end_layout
3693
3694 \begin_layout Standard
3695 The next two sections describe the 
3696 \begin_inset Flex Code
3697 status collapsed
3698
3699 \begin_layout Plain Layout
3700
3701 \shape up
3702 .kmap
3703 \end_layout
3704
3705 \end_inset
3706
3707  and 
3708 \begin_inset Flex Code
3709 status collapsed
3710
3711 \begin_layout Plain Layout
3712
3713 \shape up
3714 .cdef
3715 \end_layout
3716
3717 \end_inset
3718
3719  file syntax in detail.
3720  These sections should help you design your own key map if the ones provided
3721  do not meet your needs.
3722 \end_layout
3723
3724 \begin_layout Subsection
3725 The .kmap File
3726 \end_layout
3727
3728 \begin_layout Standard
3729
3730 \shape up
3731 .
3732 \begin_inset Flex Code
3733 status collapsed
3734
3735 \begin_layout Plain Layout
3736 kmap
3737 \end_layout
3738
3739 \end_inset
3740
3741  file maps keystrokes to characters or strings.
3742  As the name suggests, it sets a keyboard mapping.
3743  The 
3744 \begin_inset Flex Code
3745 status collapsed
3746
3747 \begin_layout Plain Layout
3748 .kmap
3749 \end_layout
3750
3751 \end_inset
3752
3753
3754 \shape default
3755  file keywords 
3756 \shape up
3757
3758 \begin_inset Flex Code
3759 status collapsed
3760
3761 \begin_layout Plain Layout
3762
3763 \shape up
3764 kmap
3765 \end_layout
3766
3767 \end_inset
3768
3769
3770 \shape default
3771 ,
3772 \shape up
3773  
3774 \shape default
3775
3776 \begin_inset Flex Code
3777 status collapsed
3778
3779 \begin_layout Plain Layout
3780
3781 \shape up
3782 kmod
3783 \end_layout
3784
3785 \end_inset
3786
3787 ,
3788 \shape up
3789  
3790 \shape default
3791
3792 \begin_inset Flex Code
3793 status collapsed
3794
3795 \begin_layout Plain Layout
3796
3797 \shape up
3798 kxmod
3799 \end_layout
3800
3801 \end_inset
3802
3803 , and 
3804 \begin_inset Flex Code
3805 status collapsed
3806
3807 \begin_layout Plain Layout
3808
3809 \shape up
3810 kcomb
3811 \end_layout
3812
3813 \end_inset
3814
3815  are described in this section.
3816 \end_layout
3817
3818 \begin_layout Labeling
3819 \labelwidthstring 00.00.0000
3820 \begin_inset Flex Code
3821 status collapsed
3822
3823 \begin_layout Plain Layout
3824
3825 \shape up
3826 kmap
3827 \end_layout
3828
3829 \end_inset
3830
3831  Map a character to a string
3832 \end_layout
3833
3834 \begin_layout LyX-Code
3835
3836 \backslash
3837 kmap 
3838 \family roman
3839 \emph on
3840 char
3841 \family default
3842 \emph default
3843  
3844 \family roman
3845 \emph on
3846 string
3847 \end_layout
3848
3849 \begin_layout Standard
3850 This will ma
3851 \family roman
3852 p
3853 \family default
3854  
3855 \family roman
3856 \emph on
3857 char
3858 \family default
3859 \emph default
3860  
3861 \family roman
3862 to
3863 \family default
3864  
3865 \family roman
3866 \emph on
3867 string
3868 \emph default
3869 .
3870  Note that in
3871 \family default
3872  
3873 \family roman
3874 \emph on
3875 string
3876 \emph default
3877 ,
3878 \family default
3879  
3880 \family roman
3881 \shape up
3882 the double-quote (")
3883 \family default
3884 \shape default
3885  
3886 \family roman
3887 and
3888 \family default
3889  
3890 \family roman
3891 \shape up
3892 the backslash (
3893 \backslash
3894 )
3895 \family default
3896 \shape default
3897  
3898 \family roman
3899 must be escaped with a preceding backslash (
3900 \shape up
3901
3902 \backslash
3903
3904 \shape default
3905 )
3906 \family default
3907 .
3908 \end_layout
3909
3910 \begin_layout Standard
3911 An example of a 
3912 \begin_inset Flex MenuItem
3913 status collapsed
3914
3915 \begin_layout Plain Layout
3916
3917 \shape up
3918 kmap
3919 \end_layout
3920
3921 \end_inset
3922
3923  statement to cause the symbol 
3924 \begin_inset Flex MenuItem
3925 status collapsed
3926
3927 \begin_layout Plain Layout
3928
3929 \shape up
3930 /
3931 \end_layout
3932
3933 \end_inset
3934
3935  to be output for the keystroke 
3936 \begin_inset Flex MenuItem
3937 status collapsed
3938
3939 \begin_layout Plain Layout
3940
3941 \shape up
3942 &
3943 \end_layout
3944
3945 \end_inset
3946
3947  is:
3948 \end_layout
3949
3950 \begin_layout LyX-Code
3951
3952 \backslash
3953 kmap & /
3954 \end_layout
3955
3956 \begin_layout Labeling
3957 \labelwidthstring 00.00.0000
3958 \begin_inset Flex Code
3959 status collapsed
3960
3961 \begin_layout Plain Layout
3962
3963 \shape up
3964 kmod
3965 \end_layout
3966
3967 \end_inset
3968
3969  Specify an accent character
3970 \end_layout
3971
3972 \begin_layout LyX-Code
3973
3974 \backslash
3975 kmod 
3976 \family roman
3977 \emph on
3978 char accent allowed
3979 \end_layout
3980
3981 \begin_layout Standard
3982 This will make the cha
3983 \family roman
3984 racter
3985 \family default
3986  
3987 \family roman
3988 \emph on
3989 char
3990 \family default
3991 \emph default
3992  
3993 \family roman
3994 \shape up
3995 \emph on
3996 be an accent
3997 \family default
3998 \shape default
3999 \emph default
4000  
4001 \family roman
4002 \shape up
4003 on the
4004 \family default
4005 \shape default
4006  
4007 \family roman
4008 \shape up
4009 \emph on
4010 allowed
4011 \family default
4012 \shape default
4013 \emph default
4014  
4015 \family roman
4016 \shape up
4017 cha
4018 \family default
4019 racter(s).
4020  This is the dead key
4021 \begin_inset Foot
4022 status collapsed
4023
4024 \begin_layout Plain Layout
4025 The term 
4026 \family roman
4027 \emph on
4028 dead key
4029 \family default
4030 \emph default
4031  refers to a key that does not produce a character by itself, but when followed
4032  with another key, produces the desired accent character.
4033  For example, a German characte
4034 \family roman
4035 r with an umlaut like
4036 \family default
4037  
4038 \family roman
4039 \emph on
4040 ä
4041 \family default
4042 \emph default
4043  
4044 \family roman
4045 can be produced in this manner.
4046 \end_layout
4047
4048 \end_inset
4049
4050  mechanism.
4051  
4052 \end_layout
4053
4054 \begin_layout Standard
4055 If you 
4056 \family roman
4057 hit
4058 \family default
4059  
4060 \family roman
4061 \emph on
4062 char
4063 \family default
4064 \emph default
4065  
4066 \family roman
4067 and then another key not in
4068 \family default
4069  
4070 \family roman
4071 \emph on
4072 allowed
4073 \emph default
4074 , you will get a
4075 \family default
4076  
4077 \family roman
4078 \emph on
4079 char
4080 \family default
4081 \emph default
4082  
4083 \family roman
4084 followed by the other, not allowed key, as output.
4085
4086 \family default
4087  Note that a 
4088 \begin_inset Flex MenuItem
4089 status collapsed
4090
4091 \begin_layout Plain Layout
4092
4093 \shape up
4094 Backspace
4095 \end_layout
4096
4097 \end_inset
4098
4099  cancels a dead key, so if 
4100 \family roman
4101 you hit
4102 \family default
4103  
4104 \family roman
4105 \emph on
4106 char
4107 \family default
4108 \emph default
4109  
4110 \begin_inset Flex MenuItem
4111 status collapsed
4112
4113 \begin_layout Plain Layout
4114
4115 \shape up
4116 \emph on
4117 Backspace
4118 \end_layout
4119
4120 \end_inset
4121
4122 , the cursor will not go one position backwards but will instead cancel
4123  the effect t
4124 \family roman
4125 hat
4126 \family default
4127  
4128 \family roman
4129 \shape up
4130 \emph on
4131 char
4132 \family default
4133 \shape default
4134 \emph default
4135  
4136 \family roman
4137 \shape up
4138 might have had on the next keystroke.
4139  
4140 \end_layout
4141
4142 \begin_layout Standard
4143 The following example specifies that the character ' is to be an acute accent,
4144  allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4145 \end_layout
4146
4147 \begin_layout LyX-Code
4148
4149 \backslash
4150 kmod ' acute aeiouAEIOU
4151 \end_layout
4152
4153 \begin_layout Labeling
4154 \labelwidthstring 00.00.0000
4155 \begin_inset Flex Code
4156 status collapsed
4157
4158 \begin_layout Plain Layout
4159 kxmod
4160 \end_layout
4161
4162 \end_inset
4163
4164  Specify an exception to the accent character
4165 \end_layout
4166
4167 \begin_layout LyX-Code
4168
4169 \backslash
4170 kxmod  
4171 \family roman
4172 \emph on
4173 accent char result
4174 \end_layout
4175
4176 \begin_layout Standard
4177 This defines an exce
4178 \family roman
4179 ption for
4180 \family default
4181  
4182 \family roman
4183 \emph on
4184 accent
4185 \family default
4186 \emph default
4187  
4188 \family roman
4189 on
4190 \family default
4191  
4192 \family roman
4193 \emph on
4194 char
4195 \emph default
4196 .
4197  T
4198 \shape up
4199 he
4200 \family default
4201 \shape default
4202  
4203 \family roman
4204 \shape up
4205 \emph on
4206 accent
4207 \family default
4208 \shape default
4209 \emph default
4210  
4211 \family roman
4212 \shape up
4213 must
4214 \family default
4215 \shape default
4216  
4217 \shape up
4218 have been assigned a keystroke with a previous
4219 \shape default
4220  
4221 \begin_inset Flex Code
4222 status collapsed
4223
4224 \begin_layout Plain Layout
4225
4226 \shape up
4227
4228 \backslash
4229 kmo
4230 \shape default
4231 d
4232 \end_layout
4233
4234 \end_inset
4235
4236  declar
4237 \family roman
4238 ation and
4239 \family default
4240  
4241 \family roman
4242 \emph on
4243 char
4244 \family default
4245 \emph default
4246  
4247 \family roman
4248 must not belong in the
4249 \family default
4250  
4251 \family roman
4252 \emph on
4253 allowed
4254 \family default
4255 \emph default
4256  
4257 \family roman
4258 set of
4259 \family default
4260  
4261 \family roman
4262 \emph on
4263 accent
4264 \emph default
4265 .
4266  When
4267 \family default
4268  
4269 \family roman
4270 \shape up
4271 you enter the
4272 \family default
4273 \shape default
4274  
4275 \family roman
4276 \shape up
4277 \emph on
4278 accent char
4279 \family default
4280 \shape default
4281 \emph default
4282  
4283 \family roman
4284 \shape up
4285 sequence,
4286 \family default
4287 \shape default
4288  
4289 \family roman
4290 \shape up
4291 \emph on
4292 result
4293 \emph default
4294  is produced.
4295  If such a declaration does not exist in
4296 \family default
4297 \shape default
4298  
4299 \shape up
4300 the
4301 \shape default
4302  
4303 \begin_inset Flex Code
4304 status collapsed
4305
4306 \begin_layout Plain Layout
4307
4308 \shape up
4309 .kmap
4310 \end_layout
4311
4312 \end_inset
4313
4314  file and yo
4315 \family roman
4316 u enter
4317 \family default
4318  
4319 \family roman
4320 \emph on
4321 accent char
4322 \emph default
4323 , you get
4324 \family default
4325  
4326 \family roman
4327 \emph on
4328 accent_key char
4329 \emph default
4330  where
4331 \family default
4332  
4333 \family roman
4334 \emph on
4335 accent_key
4336 \emph default
4337  is the first arg
4338 \family default
4339 ument of the 
4340 \begin_inset Flex Code
4341 status collapsed
4342
4343 \begin_layout Plain Layout
4344
4345 \shape up
4346
4347 \backslash
4348 kmod
4349 \end_layout
4350
4351 \end_inset
4352
4353  declaration.
4354  
4355 \end_layout
4356
4357 \begin_layout Standard
4358 The following command produces causes äi to be produced when you enter acute-i
4359  ('i):
4360 \end_layout
4361
4362 \begin_layout LyX-Code
4363
4364 \backslash
4365 kxmod acute i "
4366 \backslash
4367
4368 \backslash
4369 '{
4370 \backslash
4371
4372 \backslash
4373 i}"
4374 \end_layout
4375
4376 \begin_layout Labeling
4377 \labelwidthstring 00.00.0000
4378 \begin_inset Flex Code
4379 status collapsed
4380
4381 \begin_layout Plain Layout
4382 kcomb
4383 \end_layout
4384
4385 \end_inset
4386
4387  Combine two accent characters
4388 \end_layout
4389
4390 \begin_layout LyX-Code
4391
4392 \backslash
4393 kcomb 
4394 \family roman
4395 \emph on
4396 accent1 accent2 allowed
4397 \end_layout
4398
4399 \begin_layout Standard
4400 This one is getting pretty esoteric.
4401  It allows you to combine the effect 
4402 \family roman
4403 of
4404 \family default
4405  
4406 \family roman
4407 \emph on
4408 accent1
4409 \family default
4410 \emph default
4411  
4412 \family roman
4413 and
4414 \family default
4415  
4416 \family roman
4417 \emph on
4418 accent2
4419 \family default
4420 \emph default
4421  
4422 \family roman
4423 (in that order!) on
4424 \family default
4425  
4426 \family roman
4427 \emph on
4428 allowed
4429 \family default
4430 \emph default
4431  
4432 \family roman
4433 chars.
4434  The keystrokes for
4435 \family default
4436  
4437 \family roman
4438 \emph on
4439 accent1
4440 \family default
4441 \emph default
4442  
4443 \family roman
4444 and
4445 \family default
4446  
4447 \family roman
4448 \emph on
4449 accent2
4450 \family default
4451 \emph default
4452  
4453 \family roman
4454 must have be
4455 \family default
4456 en set with a 
4457 \begin_inset Flex Code
4458 status collapsed
4459
4460 \begin_layout Plain Layout
4461
4462 \shape up
4463
4464 \backslash
4465 kmod
4466 \end_layout
4467
4468 \end_inset
4469
4470  command at 
4471 \family roman
4472 a
4473 \family default
4474  
4475 \family roman
4476 \emph on
4477 previous
4478 \family default
4479 \emph default
4480  
4481 \family roman
4482 point in the
4483 \family default
4484  file.
4485  
4486 \end_layout
4487
4488 \begin_layout Standard
4489 Consider this example from the 
4490 \begin_inset Flex Code
4491 status collapsed
4492
4493 \begin_layout Plain Layout
4494
4495 \shape up
4496 greek.kmap
4497 \end_layout
4498
4499 \end_inset
4500
4501  file:
4502 \end_layout
4503
4504 \begin_layout LyX-Code
4505
4506 \backslash
4507 kmod ; acute aeioyvhAEIOYVH 
4508 \backslash
4509 kmod : umlaut iyIY 
4510 \backslash
4511 kcomb acute umlaut iyIY
4512 \end_layout
4513
4514 \begin_layout Standard
4515 This allows you to press 
4516 \begin_inset Flex MenuItem
4517 status collapsed
4518
4519 \begin_layout Plain Layout
4520
4521 \shape up
4522 ;:i
4523 \end_layout
4524
4525 \end_inset
4526
4527  and get the effect of 
4528 \begin_inset Flex Code
4529 status collapsed
4530
4531 \begin_layout Plain Layout
4532
4533 \shape up
4534
4535 \backslash
4536 '{
4537 \backslash
4538 "{i}}
4539 \end_layout
4540
4541 \end_inset
4542
4543 .
4544  
4545 \family roman
4546 \shape up
4547 A backspace
4548 \family default
4549 \shape default
4550  in this case cancels the last dead key, so if you press 
4551 \begin_inset Flex MenuItem
4552 status collapsed
4553
4554 \begin_layout Plain Layout
4555
4556 \shape up
4557 ;: Backspace i
4558 \end_layout
4559
4560 \end_inset
4561
4562  you get 
4563 \begin_inset Flex Code
4564 status collapsed
4565
4566 \begin_layout Plain Layout
4567
4568 \shape up
4569
4570 \backslash
4571 '{i}
4572 \end_layout
4573
4574 \end_inset
4575
4576 .
4577 \end_layout
4578
4579 \begin_layout Subsection
4580 The .cdef File
4581 \end_layout
4582
4583 \begin_layout Standard
4584 After the 
4585 \begin_inset Flex Code
4586 status collapsed
4587
4588 \begin_layout Plain Layout
4589
4590 \shape up
4591 .kmap
4592 \end_layout
4593
4594 \end_inset
4595
4596  mapping is performed, a 
4597 \begin_inset Flex Code
4598 status collapsed
4599
4600 \begin_layout Plain Layout
4601
4602 \shape up
4603 .cde
4604 \shape default
4605 f
4606 \end_layout
4607
4608 \end_inset
4609
4610  file maps the strings that the symbols generate to characters in the current
4611  font.
4612  The LyX distribution currently includes at least the 
4613 \begin_inset Flex Code
4614 status collapsed
4615
4616 \begin_layout Plain Layout
4617
4618 \shape up
4619 iso8859-1.cdef
4620 \end_layout
4621
4622 \end_inset
4623
4624  and 
4625 \begin_inset Flex Code
4626 status collapsed
4627
4628 \begin_layout Plain Layout
4629
4630 \shape up
4631 iso8859-2.cdef
4632 \end_layout
4633
4634 \end_inset
4635
4636  files.
4637 \end_layout
4638
4639 \begin_layout Standard
4640 In general the 
4641 \begin_inset Flex Code
4642 status collapsed
4643
4644 \begin_layout Plain Layout
4645
4646 \shape up
4647 .cdef
4648 \end_layout
4649
4650 \end_inset
4651
4652  file is a sequence of declarations of the form
4653 \end_layout
4654
4655 \begin_layout LyX-Code
4656
4657 \family roman
4658 \emph on
4659 char_index_in_set
4660 \family default
4661 \emph default
4662  
4663 \family roman
4664 \emph on
4665  string
4666 \end_layout
4667
4668 \begin_layout Standard
4669 For example, in order to map 
4670 \begin_inset Flex MenuItem
4671 status collapsed
4672
4673 \begin_layout Plain Layout
4674
4675 \shape up
4676
4677 \backslash
4678 '{e}
4679 \end_layout
4680
4681 \end_inset
4682
4683  to the corresponding character in the iso-8859-1 set (233), the following
4684  declaration is used
4685 \end_layout
4686
4687 \begin_layout LyX-Code
4688 233 "
4689 \backslash
4690
4691 \backslash
4692 '{e}"
4693 \end_layout
4694
4695 \begin_layout Standard
4696 with 
4697 \begin_inset Flex Code
4698 status collapsed
4699
4700 \begin_layout Plain Layout
4701
4702 \backslash
4703
4704 \end_layout
4705
4706 \end_inset
4707
4708  and 
4709 \begin_inset Flex Code
4710 status collapsed
4711
4712 \begin_layout Plain Layout
4713 "
4714 \end_layout
4715
4716 \end_inset
4717
4718  being escap
4719 \family roman
4720 ed in
4721 \family default
4722  
4723 \family roman
4724 \emph on
4725 string
4726 \emph default
4727 .
4728  Note that
4729 \family default
4730  the same character can apply to more than one string.
4731  In the 
4732 \begin_inset Flex Code
4733 status collapsed
4734
4735 \begin_layout Plain Layout
4736 i
4737 \shape up
4738 so-8859-7.cdef
4739 \end_layout
4740
4741 \end_inset
4742
4743  file you have
4744 \end_layout
4745
4746 \begin_layout LyX-Code
4747 192 "
4748 \backslash
4749
4750 \backslash
4751 '{
4752 \backslash
4753
4754 \backslash
4755
4756 \backslash
4757 "{i}}"
4758 \begin_inset Newline newline
4759 \end_inset
4760
4761 192 "
4762 \backslash
4763
4764 \backslash
4765
4766 \backslash
4767 "{
4768 \backslash
4769
4770 \backslash
4771 '{i}}"
4772 \end_layout
4773
4774 \begin_layout Standard
4775 If LyX cannot find a mapping for the string produced by the keystroke or
4776  a deadkey sequence, it will check if it looks like an accented char and
4777  try to draw an accent over the character on screen.
4778 \end_layout
4779
4780 \begin_layout Subsection
4781 Dead Keys
4782 \end_layout
4783
4784 \begin_layout Standard
4785 There is a second way to add support for international characters through
4786  so-called dead-keys.
4787  A dead-key works in combination with a letter to produce an accented character.
4788  Here, we'll explain how to create a really simple dead-key to illustrate
4789  how they work.
4790 \end_layout
4791
4792 \begin_layout Standard
4793 Suppose you happen to need the circumflex character, 
4794 \begin_inset Quotes eld
4795 \end_inset
4796
4797  ̂
4798 \begin_inset Quotes erd
4799 \end_inset
4800
4801 .
4802  You could bind the 
4803 \begin_inset Flex MenuItem
4804 status collapsed
4805
4806 \begin_layout Plain Layout
4807 ^
4808 \end_layout
4809
4810 \end_inset
4811
4812 -key [a.k.a.
4813 \begin_inset space ~
4814 \end_inset
4815
4816
4817 \begin_inset Flex MenuItem
4818 status collapsed
4819
4820 \begin_layout Plain Layout
4821 Shift-6
4822 \end_layout
4823
4824 \end_inset
4825
4826 ] to the LyX command 
4827 \begin_inset Flex Code
4828 status collapsed
4829
4830 \begin_layout Plain Layout
4831 accent-circumflex
4832 \end_layout
4833
4834 \end_inset
4835
4836  in your 
4837 \begin_inset Flex Code
4838 status collapsed
4839
4840 \begin_layout Plain Layout
4841 lyxrc
4842 \end_layout
4843
4844 \end_inset
4845
4846  file.
4847  Now, whenever you type the 
4848 \begin_inset Flex MenuItem
4849 status collapsed
4850
4851 \begin_layout Plain Layout
4852 ^
4853 \end_layout
4854
4855 \end_inset
4856
4857 -key followed by a letter, that letter will have a circumflex accent on
4858  it.
4859  For example, the sequence 
4860 \begin_inset Quotes eld
4861 \end_inset
4862
4863
4864 \begin_inset Flex MenuItem
4865 status collapsed
4866
4867 \begin_layout Plain Layout
4868 ^e
4869 \end_layout
4870
4871 \end_inset
4872
4873
4874 \begin_inset Quotes erd
4875 \end_inset
4876
4877  produces the letter: 
4878 \begin_inset Quotes eld
4879 \end_inset
4880
4881 ê
4882 \begin_inset Quotes erd
4883 \end_inset
4884
4885 .
4886  If you tried to type 
4887 \begin_inset Quotes eld
4888 \end_inset
4889
4890
4891 \begin_inset Flex MenuItem
4892 status collapsed
4893
4894 \begin_layout Plain Layout
4895 ^t
4896 \end_layout
4897
4898 \end_inset
4899
4900
4901 \begin_inset Quotes erd
4902 \end_inset
4903
4904 , however, LyX will complain with a beep, since a 
4905 \begin_inset Quotes eld
4906 \end_inset
4907
4908
4909 \begin_inset Flex MenuItem
4910 status collapsed
4911
4912 \begin_layout Plain Layout
4913 t
4914 \end_layout
4915
4916 \end_inset
4917
4918
4919 \begin_inset Quotes erd
4920 \end_inset
4921
4922  never takes a circumflex accent.
4923  Hitting 
4924 \begin_inset Flex MenuItem
4925 status collapsed
4926
4927 \begin_layout Plain Layout
4928 Space
4929 \end_layout
4930
4931 \end_inset
4932
4933  after a dead-key produces the bare-accent.
4934  Please note this last point! If you bind a key to a dead-key, you'll need
4935  to rebind the character on that key to yet another key.
4936  Binding the 
4937 \begin_inset Flex MenuItem
4938 status collapsed
4939
4940 \begin_layout Plain Layout
4941 ,-key
4942 \end_layout
4943
4944 \end_inset
4945
4946  to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
4947 \end_layout
4948
4949 \begin_layout Standard
4950 One common way to bind dead-keys is to use 
4951 \begin_inset Flex MenuItem
4952 status collapsed
4953
4954 \begin_layout Plain Layout
4955 Meta-
4956 \end_layout
4957
4958 \end_inset
4959
4960
4961 \begin_inset Flex MenuItem
4962 status collapsed
4963
4964 \begin_layout Plain Layout
4965 Ctrl-
4966 \end_layout
4967
4968 \end_inset
4969
4970 , and 
4971 \begin_inset Flex MenuItem
4972 status collapsed
4973
4974 \begin_layout Plain Layout
4975 Shift-
4976 \end_layout
4977
4978 \end_inset
4979
4980  in combination with an accent, like 
4981 \begin_inset Quotes eld
4982 \end_inset
4983
4984
4985 \begin_inset Flex MenuItem
4986 status collapsed
4987
4988 \begin_layout Plain Layout
4989 ~
4990 \end_layout
4991
4992 \end_inset
4993
4994
4995 \begin_inset Quotes erd
4996 \end_inset
4997
4998  or 
4999 \begin_inset Quotes eld
5000 \end_inset
5001
5002
5003 \begin_inset Flex MenuItem
5004 status collapsed
5005
5006 \begin_layout Plain Layout
5007 ,
5008 \end_layout
5009
5010 \end_inset
5011
5012
5013 \begin_inset Quotes erd
5014 \end_inset
5015
5016  or 
5017 \begin_inset Quotes eld
5018 \end_inset
5019
5020
5021 \begin_inset Flex MenuItem
5022 status collapsed
5023
5024 \begin_layout Plain Layout
5025 ^
5026 \end_layout
5027
5028 \end_inset
5029
5030
5031 \begin_inset Quotes erd
5032 \end_inset
5033
5034 .
5035  Another way involves using 
5036 \begin_inset Flex Code
5037 status collapsed
5038
5039 \begin_layout Plain Layout
5040 xmodmap
5041 \end_layout
5042
5043 \end_inset
5044
5045  and 
5046 \begin_inset Flex Code
5047 status collapsed
5048
5049 \begin_layout Plain Layout
5050 xkeycaps
5051 \end_layout
5052
5053 \end_inset
5054
5055  to set up the special 
5056 \begin_inset Flex Code
5057 status collapsed
5058
5059 \begin_layout Plain Layout
5060 Mode_Switch
5061 \end_layout
5062
5063 \end_inset
5064
5065  key.
5066  The 
5067 \begin_inset Flex Code
5068 status collapsed
5069
5070 \begin_layout Plain Layout
5071 Mode_Switch
5072 \end_layout
5073
5074 \end_inset
5075
5076  acts in some ways just like 
5077 \begin_inset Flex MenuItem
5078 status collapsed
5079
5080 \begin_layout Plain Layout
5081 Shift
5082 \end_layout
5083
5084 \end_inset
5085
5086  and permits you to bind keys to accented characters.
5087  You can also turn keys into dead-keys by binding them to something like
5088  
5089 \begin_inset Flex Code
5090 status collapsed
5091
5092 \begin_layout Plain Layout
5093 usldead_cedilla
5094 \end_layout
5095
5096 \end_inset
5097
5098  and then binding this symbolic key to the corresponding LyX command.
5099 \begin_inset Foot
5100 status collapsed
5101
5102 \begin_layout Plain Layout
5103 Note from 
5104 \noun on
5105 John Weiss
5106 \noun default
5107 : This is exactly what I do in my 
5108 \begin_inset Flex Code
5109 status collapsed
5110
5111 \begin_layout Plain Layout
5112 ~/.lyx/lyxrc
5113 \end_layout
5114
5115 \end_inset
5116
5117  and my 
5118 \begin_inset Flex Code
5119 status collapsed
5120
5121 \begin_layout Plain Layout
5122 ~/.xmodmap
5123 \end_layout
5124
5125 \end_inset
5126
5127  files.
5128  I have my 
5129 \begin_inset Flex MenuItem
5130 status collapsed
5131
5132 \begin_layout Plain Layout
5133 Scroll
5134 \begin_inset space ~
5135 \end_inset
5136
5137 Lock
5138 \end_layout
5139
5140 \end_inset
5141
5142  key set up as 
5143 \begin_inset Flex Code
5144 status collapsed
5145
5146 \begin_layout Plain Layout
5147 Mode_Shift
5148 \end_layout
5149
5150 \end_inset
5151
5152  and a bunch of these 
5153 \begin_inset Quotes eld
5154 \end_inset
5155
5156
5157 \begin_inset Flex Code
5158 status collapsed
5159
5160 \begin_layout Plain Layout
5161 usldead_*
5162 \end_layout
5163
5164 \end_inset
5165
5166
5167 \begin_inset Quotes erd
5168 \end_inset
5169
5170  symbolic keys bound such things as 
5171 \begin_inset Flex MenuItem
5172 status collapsed
5173
5174 \begin_layout Plain Layout
5175 Scroll
5176 \begin_inset space ~
5177 \end_inset
5178
5179 Lock-^
5180 \end_layout
5181
5182 \end_inset
5183
5184  and 
5185 \begin_inset Flex MenuItem
5186 status collapsed
5187
5188 \begin_layout Plain Layout
5189 Scroll
5190 \begin_inset space ~
5191 \end_inset
5192
5193 Lock-~
5194 \end_layout
5195
5196 \end_inset
5197
5198 .
5199  This is how I produce my accented characters.
5200 \end_layout
5201
5202 \end_inset
5203
5204  You can make just about anything into the 
5205 \begin_inset Flex Code
5206 status collapsed
5207
5208 \begin_layout Plain Layout
5209 Mode_Switch
5210 \end_layout
5211
5212 \end_inset
5213
5214  key: One of the 
5215 \begin_inset Flex MenuItem
5216 status collapsed
5217
5218 \begin_layout Plain Layout
5219 Ctrl-
5220 \end_layout
5221
5222 \end_inset
5223
5224  keys, a spare function key, etc.
5225  As for the LyX commands that produce accents, check the entry for 
5226 \begin_inset Flex Code
5227 status collapsed
5228
5229 \begin_layout Plain Layout
5230 accent-acute
5231 \end_layout
5232
5233 \end_inset
5234
5235  in the 
5236 \emph on
5237 Reference Manual
5238 \emph default
5239 .
5240  You'll find the complete list there.
5241 \end_layout
5242
5243 \begin_layout Subsection
5244 Saving your Language Configuration
5245 \end_layout
5246
5247 \begin_layout Standard
5248 You can edit your preferences so that your desired language environment
5249  is automatically configured when LyX starts up, via the 
5250 \begin_inset Flex MenuItem
5251 status collapsed
5252
5253 \begin_layout Plain Layout
5254 Edit\SpecialChar \menuseparator
5255 Preferences
5256 \end_layout
5257
5258 \end_inset
5259
5260  dialog.
5261 \end_layout
5262
5263 \begin_layout Chapter
5264 Installing New Document Classes, Layouts, and Templates
5265 \begin_inset CommandInset label
5266 LatexCommand label
5267 name "cha:Installing-New-Document"
5268
5269 \end_inset
5270
5271
5272 \begin_inset Argument
5273 status collapsed
5274
5275 \begin_layout Plain Layout
5276 Installing New Document Classes
5277 \end_layout
5278
5279 \end_inset
5280
5281
5282 \end_layout
5283
5284 \begin_layout Standard
5285 In this chapter, we describe the procedures for creating and installing
5286  new LyX layout and template files, as well as offer a refresher on correctly
5287  installing new LaTeX document classes.
5288  
5289 \end_layout
5290
5291 \begin_layout Standard
5292 First, let us a say a few words about how one ought to think about the relation
5293  between LyX and LaTeX.
5294  The thing to understand is that, in a certain sense, LyX doesn't know anything
5295  about LaTeX.
5296  Indeed, from LyX's point of view, LaTeX is just one of several 
5297 \begin_inset Quotes eld
5298 \end_inset
5299
5300 backend formats
5301 \begin_inset Quotes erd
5302 \end_inset
5303
5304  in which it is capable of producing output.
5305  Other such formats are DocBook, plaintext, and XHTML.
5306  LaTeX is, of course, a particularly important format, but very little of
5307  the information LyX has about LaTeX is actually contained in the program
5308  itself.
5309 \begin_inset Foot
5310 status collapsed
5311
5312 \begin_layout Plain Layout
5313 Some commands are sufficiently complex that they are 
5314 \begin_inset Quotes eld
5315 \end_inset
5316
5317 hardcoded
5318 \begin_inset Quotes erd
5319 \end_inset
5320
5321  into LyX.
5322  But the developers generally regard this as a Bad Thing.
5323 \end_layout
5324
5325 \end_inset
5326
5327  Rather, that information, even for the standard classes like 
5328 \begin_inset Flex Code
5329 status collapsed
5330
5331 \begin_layout Plain Layout
5332 article.cls
5333 \end_layout
5334
5335 \end_inset
5336
5337 , is contained in `layout files'.
5338  Similarly, LyX itself does not know much about DocBook or XHTML.
5339  What it knows is contained in layout files.
5340 \end_layout
5341
5342 \begin_layout Standard
5343 You can think of the layout file for a given document class as a translation
5344  manual between LyX constructs---paragraphs with their corresponding styles,
5345  certain sorts of insets, etc---and the corresponding LaTeX, DocBook, or
5346  XHTML constructs.
5347  Almost everything LyX knows about 
5348 \begin_inset Flex Code
5349 status collapsed
5350
5351 \begin_layout Plain Layout
5352 article.cls
5353 \end_layout
5354
5355 \end_inset
5356
5357 , for example, is contained in the file 
5358 \begin_inset Flex Code
5359 status collapsed
5360
5361 \begin_layout Plain Layout
5362 article.layout
5363 \end_layout
5364
5365 \end_inset
5366
5367  and in various other files it includes.
5368  For this reason, anyone intending to write layout files should plan to
5369  study the existing files.
5370  A good place to start is with 
5371 \begin_inset Flex Code
5372 status collapsed
5373
5374 \begin_layout Plain Layout
5375 stdsections.inc
5376 \end_layout
5377
5378 \end_inset
5379
5380 , which is included in 
5381 \begin_inset Flex Code
5382 status collapsed
5383
5384 \begin_layout Plain Layout
5385 article.layout
5386 \end_layout
5387
5388 \end_inset
5389
5390
5391 \begin_inset Flex Code
5392 status collapsed
5393
5394 \begin_layout Plain Layout
5395 book.layout
5396 \end_layout
5397
5398 \end_inset
5399
5400 , and many of the other layout files for document classes.
5401  This file is where sections and the like are defined: 
5402 \begin_inset Flex Code
5403 status collapsed
5404
5405 \begin_layout Plain Layout
5406 stdsections.inc
5407 \end_layout
5408
5409 \end_inset
5410
5411  tells LyX how paragraphs that are marked with the Section, Subsection,
5412  etc, styles can be translated into corresponding LaTeX, DocBook, and XHTML
5413  commands and tags.
5414  The 
5415 \begin_inset Flex Code
5416 status collapsed
5417
5418 \begin_layout Plain Layout
5419 article.layout
5420 \end_layout
5421
5422 \end_inset
5423
5424  file basically just includes several of these 
5425 \begin_inset Flex Code
5426 status collapsed
5427
5428 \begin_layout Plain Layout
5429 std*.inc
5430 \end_layout
5431
5432 \end_inset
5433
5434  files.
5435 \end_layout
5436
5437 \begin_layout Standard
5438 Defining the LyX--LaTeX correspondence is not the only thing layout files
5439  do, though.
5440  Their other job is to define how the LyX constructs themselves will appear
5441  on-screen.
5442  The fact that layout files have these two jobs is often a source of confusion,
5443  because they are completely separate.
5444  Telling LyX how to translate a certain paragraph style into LaTeX does
5445  not tell LyX how to display it; conversely, telling LyX how to display
5446  a certain paragraph style does not tell LyX how to translate it into LaTeX
5447  (let alone tell LaTeX how to display it).
5448  So, in general, when you define a new LyX construct, you must always do
5449  two quite separate things: (i)
5450 \begin_inset space ~
5451 \end_inset
5452
5453 tell LyX how to translate it into LaTeX and (ii)
5454 \begin_inset space ~
5455 \end_inset
5456
5457 tell LyX how to display it.
5458 \end_layout
5459
5460 \begin_layout Standard
5461 Much the same is true, of course, as regards LyX's other backend formats,
5462  though XHTML is in some ways different, because in that case LyX 
5463 \emph on
5464 is
5465 \emph default
5466  able, to some extent, to use information about how it should display a
5467  paragraph on the screen to output information (in the form of CSS) about
5468  how the paragraph should be displayed in a browser.
5469  Even in this case, however, the distinction between what LyX does internally
5470  and how things are rendered externally remains in force, and the two can
5471  be controlled separately.
5472  See 
5473 \begin_inset CommandInset ref
5474 LatexCommand ref
5475 reference "sec:Tags-for-XHTML"
5476
5477 \end_inset
5478
5479  for the details.
5480 \end_layout
5481
5482 \begin_layout Section
5483 Installing new LaTeX files
5484 \end_layout
5485
5486 \begin_layout Standard
5487 Some installations may not include a LaTeX package or class file that you
5488  would like to use within LyX.
5489  For example, you might need FoilTeX, a package for preparing slides for
5490  overhead projectors.
5491  Modern LaTeX distributions like TeXLive (2008 or newer) or MiKTeX provide
5492  a user interface for installing such packages.
5493  For example, with MiKTeX, you start the program 
5494 \begin_inset Quotes eld
5495 \end_inset
5496
5497 Package
5498 \begin_inset space ~
5499 \end_inset
5500
5501 Manager
5502 \begin_inset Quotes erd
5503 \end_inset
5504
5505  to get a list of available packages.
5506  To install one of them, right click on it or use the corresponding toolbar
5507  button.
5508 \end_layout
5509
5510 \begin_layout Standard
5511 If your LaTeX distribution does not provide such a `package manager', or
5512  if the package is not available from your distribution, then follow these
5513  steps to install it manually:
5514 \end_layout
5515
5516 \begin_layout Enumerate
5517 Get the package from 
5518 \begin_inset CommandInset href
5519 LatexCommand href
5520 name "CTAN"
5521 target "http://www.ctan.org/"
5522
5523 \end_inset
5524
5525  or wherever.
5526 \end_layout
5527
5528 \begin_layout Enumerate
5529 If the package contains a file with the ending 
5530 \begin_inset Quotes eld
5531 \end_inset
5532
5533
5534 \begin_inset Flex Code
5535 status collapsed
5536
5537 \begin_layout Plain Layout
5538 .ins
5539 \end_layout
5540
5541 \end_inset
5542
5543
5544 \begin_inset Quotes erd
5545 \end_inset
5546
5547  (is the case for FoilTeX) then open a console, change to the folder of
5548  this file and execute the command 
5549 \begin_inset Flex Code
5550 status collapsed
5551
5552 \begin_layout Plain Layout
5553 latex foiltex.ins
5554 \end_layout
5555
5556 \end_inset
5557
5558 .
5559  You have now unpacked the package and have all files to install it.
5560  Most LaTeX-packages are not packed and you can skip this step.
5561 \end_layout
5562
5563 \begin_layout Enumerate
5564 Now you need to decide if the package should be available for all users
5565  or only for you.
5566 \end_layout
5567
5568 \begin_deeper
5569 \begin_layout Enumerate
5570 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
5571  for all users on your system, then install it in your `local' TeX tree,
5572  otherwise install it in your own `user' TeX tree.
5573  Where these trees should be created, if they do not already exist, depends
5574  on your system.
5575  To find this out, look in the file 
5576 \begin_inset Flex Code
5577 status collapsed
5578
5579 \begin_layout Plain Layout
5580 texmf.cnf
5581 \end_layout
5582
5583 \end_inset
5584
5585 .
5586 \begin_inset Foot
5587 status collapsed
5588
5589 \begin_layout Plain Layout
5590 This is usually in the directory 
5591 \begin_inset Flex Code
5592 status collapsed
5593
5594 \begin_layout Plain Layout
5595 $TEXMF/web2c
5596 \end_layout
5597
5598 \end_inset
5599
5600 , though you can execute the command 
5601 \begin_inset Flex Code
5602 status collapsed
5603
5604 \begin_layout Plain Layout
5605 kpsewhich texmf.cnf
5606 \end_layout
5607
5608 \end_inset
5609
5610  to locate it.
5611 \end_layout
5612
5613 \end_inset
5614
5615  The location of the `local' TeX tree is defined by the 
5616 \begin_inset Flex Code
5617 status collapsed
5618
5619 \begin_layout Plain Layout
5620 TEXMFLOCAL
5621 \end_layout
5622
5623 \end_inset
5624
5625  variable; this is usually somewhere like 
5626 \begin_inset Flex Code
5627 status collapsed
5628
5629 \begin_layout Plain Layout
5630 /usr/local/share/texmf
5631 \end_layout
5632
5633 \end_inset
5634
5635 .
5636  The location of the `user' TeX tree is defined by 
5637 \begin_inset Flex Code
5638 status collapsed
5639
5640 \begin_layout Plain Layout
5641 TEXMFHOME
5642 \end_layout
5643
5644 \end_inset
5645
5646  and is commonly 
5647 \begin_inset Flex Code
5648 status collapsed
5649
5650 \begin_layout Plain Layout
5651 $HOME/texmf
5652 \end_layout
5653
5654 \end_inset
5655
5656 .
5657  (If these variables are not predefined, you have to define them.) You'll
5658  probably need root permissions to create or modify the `local' tree, but
5659  not for your `user' tree.
5660 \begin_inset Newline newline
5661 \end_inset
5662
5663 In general, it is recommended to install in the user tree because your user
5664  will not be modified or even overwritten when you upgrade your system.
5665  It will typically also be backed up together with everything else when
5666  you backup your home directory (which, of course, you do on a regular basis).
5667 \end_layout
5668
5669 \begin_layout Enumerate
5670 On Windows, if you want the new package to be available for all users on
5671  your system, change to the folder where LaTeX is installed and then change
5672  to the subfolder 
5673 \begin_inset Flex Code
5674 status collapsed
5675
5676 \begin_layout Plain Layout
5677 ~
5678 \backslash
5679 tex
5680 \backslash
5681 latex
5682 \end_layout
5683
5684 \end_inset
5685
5686 .
5687  (For MiKTeX, this would be by default the folder 
5688 \begin_inset Flex Code
5689 status collapsed
5690
5691 \begin_layout Plain Layout
5692 ~:
5693 \backslash
5694 Programs
5695 \backslash
5696 MiKTeX
5697 \backslash
5698 tex
5699 \backslash
5700 latex
5701 \end_layout
5702
5703 \end_inset
5704
5705 .)
5706 \begin_inset Foot
5707 status open
5708
5709 \begin_layout Plain Layout
5710 Note that this will be the correct path only on English installations.
5711  On a German one, it would be 
5712 \begin_inset Flex Code
5713 status collapsed
5714
5715 \begin_layout Plain Layout
5716 ~:
5717 \backslash
5718 Programme
5719 \backslash
5720 MiKTeX
5721 \backslash
5722 tex
5723 \backslash
5724 latex
5725 \end_layout
5726
5727 \end_inset
5728
5729 , and similarly for other languages.
5730 \end_layout
5731
5732 \end_inset
5733
5734  Create there a new folder 
5735 \begin_inset Flex Code
5736 status collapsed
5737
5738 \begin_layout Plain Layout
5739 foiltex
5740 \end_layout
5741
5742 \end_inset
5743
5744  and copy all files of the package into it.
5745  
5746 \begin_inset Newline newline
5747 \end_inset
5748
5749 If the package should only available for you or you don't have admin permissions
5750 , do the same, but in the local LaTeX folder.
5751  E.
5752 \begin_inset space \thinspace{}
5753 \end_inset
5754
5755 g., for MiKTeX
5756 \begin_inset space ~
5757 \end_inset
5758
5759 2.8 under Windows XP, this would be the folder:
5760 \begin_inset Newline newline
5761 \end_inset
5762
5763
5764 \family sans
5765
5766 \begin_inset Flex Code
5767 status collapsed
5768
5769 \begin_layout Plain Layout
5770 ~:
5771 \backslash
5772 Documents and Settings
5773 \backslash
5774 <username>
5775 \backslash
5776 Application Data
5777 \backslash
5778
5779 \end_layout
5780
5781 \end_inset
5782
5783
5784 \begin_inset Newline newline
5785 \end_inset
5786
5787
5788 \family default
5789
5790 \begin_inset Phantom HPhantom
5791 status open
5792
5793 \begin_layout Plain Layout
5794
5795 \family sans
5796 ~:
5797 \backslash
5798
5799 \end_layout
5800
5801 \end_inset
5802
5803
5804 \begin_inset Flex Code
5805 status collapsed
5806
5807 \begin_layout Plain Layout
5808 MiKTeX
5809 \backslash
5810 2.8
5811 \backslash
5812 tex
5813 \backslash
5814 latex
5815 \end_layout
5816
5817 \end_inset
5818
5819
5820 \begin_inset Newline newline
5821 \end_inset
5822
5823 On Vista, it would be:
5824 \begin_inset Newline newline
5825 \end_inset
5826
5827
5828 \begin_inset Flex Code
5829 status collapsed
5830
5831 \begin_layout Plain Layout
5832 ~:
5833 \backslash
5834 Users
5835 \backslash
5836 <username>
5837 \backslash
5838 AppData
5839 \backslash
5840 Roaming
5841 \backslash
5842 2.8
5843 \backslash
5844 MiKTeX
5845 \backslash
5846 tex
5847 \backslash
5848 latex
5849 \end_layout
5850
5851 \end_inset
5852
5853
5854 \end_layout
5855
5856 \end_deeper
5857 \begin_layout Enumerate
5858 Now one only need to tell LaTeX that there are new files.
5859  This depends on the used LaTeX-Distribution:
5860 \end_layout
5861
5862 \begin_deeper
5863 \begin_layout Enumerate
5864 For TeXLive execute the command 
5865 \begin_inset Flex Code
5866 status collapsed
5867
5868 \begin_layout Plain Layout
5869 texhash
5870 \end_layout
5871
5872 \end_inset
5873
5874  from a console.
5875  If you installed the package for all users, then you will probably need
5876  to have root permissions for that.
5877 \end_layout
5878
5879 \begin_layout Enumerate
5880 For MiKTeX, if you have installed the package for all users, start the program
5881  
5882 \begin_inset Quotes eld
5883 \end_inset
5884
5885 Settings
5886 \begin_inset space ~
5887 \end_inset
5888
5889 (Admin)
5890 \begin_inset Quotes erd
5891 \end_inset
5892
5893  and press the button marked 
5894 \begin_inset Quotes eld
5895 \end_inset
5896
5897 Refresh FNDB
5898 \begin_inset Quotes erd
5899 \end_inset
5900
5901 .
5902  Otherwise start the program 
5903 \begin_inset Quotes eld
5904 \end_inset
5905
5906 Settings
5907 \begin_inset Quotes erd
5908 \end_inset
5909
5910  and do the same.
5911 \end_layout
5912
5913 \end_deeper
5914 \begin_layout Enumerate
5915 Finally, you need to tell LyX that there are new packages available.
5916  So, in LyX, use the menu 
5917 \begin_inset Flex MenuItem
5918 status collapsed
5919
5920 \begin_layout Plain Layout
5921 Tools
5922 \family sans
5923 \SpecialChar \menuseparator
5924 Reconfigure
5925 \end_layout
5926
5927 \end_inset
5928
5929  and then restart LyX.
5930 \end_layout
5931
5932 \begin_layout Standard
5933 Now the package is installed.
5934  In our example, the document class 
5935 \begin_inset Flex Code
5936 status collapsed
5937
5938 \begin_layout Plain Layout
5939 Slides
5940 \begin_inset space ~
5941 \end_inset
5942
5943 (FoilTe
5944 \begin_inset ERT
5945 status collapsed
5946
5947 \begin_layout Plain Layout
5948
5949 {}
5950 \end_layout
5951
5952 \end_inset
5953
5954 x)
5955 \end_layout
5956
5957 \end_inset
5958
5959  will now be available under 
5960 \begin_inset Flex MenuItem
5961 status collapsed
5962
5963 \begin_layout Plain Layout
5964 Document\SpecialChar \menuseparator
5965 Settings\SpecialChar \menuseparator
5966 Document Class
5967 \end_layout
5968
5969 \end_inset
5970
5971 .
5972  
5973 \end_layout
5974
5975 \begin_layout Standard
5976 If you would like to use a LaTeX document class that is not even listed
5977  in the menu 
5978 \begin_inset Flex MenuItem
5979 status collapsed
5980
5981 \begin_layout Plain Layout
5982 Document\SpecialChar \menuseparator
5983 Settings\SpecialChar \menuseparator
5984 Document Class
5985 \end_layout
5986
5987 \end_inset
5988
5989 , then you need to create a `layout' file for it.
5990  That is the topic of the next section.
5991 \end_layout
5992
5993 \begin_layout Section
5994 Types of layout files
5995 \end_layout
5996
5997 \begin_layout Standard
5998 This section describes the various sorts of LyX files that contain layout
5999  information.
6000  These files describe various paragraph and character styles, determining
6001  how LyX should display them and how they should be translated into LaTeX,
6002  DocBook, XHTML, or whatever output format is being used.
6003  
6004 \end_layout
6005
6006 \begin_layout Standard
6007 We shall try to provide a thorough description of the process of writing
6008  layout files here.
6009  However, there are so many different types of documents supported even
6010  by just LaTeX that we can't hope to cover every different possibility or
6011  problem you might encounter.
6012  The LyX users' list is frequented by people with lots of experience with
6013  layout design who are willing to share what they've learned, so please
6014  feel free to ask questions there.
6015 \end_layout
6016
6017 \begin_layout Standard
6018 As you prepare to write a new layout, it is extremely helpful to look at
6019  the layouts distributed with LyX.
6020  If you write a LyX layout for a LaTeX document class that might also be
6021  used by others, or write a module that might be useful to others, then
6022  you should consider posting your layout to the 
6023 \begin_inset CommandInset href
6024 LatexCommand href
6025 name "layout section on the LyX wiki"
6026 target "http://wiki.lyx.org/Layouts/Layouts"
6027
6028 \end_inset
6029
6030  or even to the LyX developers' list, so that it might be included in LyX
6031  itself.
6032 \begin_inset Foot
6033 status collapsed
6034
6035 \begin_layout Plain Layout
6036 Note that LyX is licensed under the General Public License, so any material
6037  that is contributed to LyX must be similarly licensed.
6038 \end_layout
6039
6040 \end_inset
6041
6042
6043 \end_layout
6044
6045 \begin_layout Subsection
6046 Layout modules
6047 \begin_inset CommandInset label
6048 LatexCommand label
6049 name "sub:Layout-modules"
6050
6051 \end_inset
6052
6053
6054 \end_layout
6055
6056 \begin_layout Standard
6057 We have spoken to this point about `layout files'.
6058  But there are different sorts of files that contain layout information.
6059  Layout files, strictly so called, have the 
6060 \begin_inset Flex Code
6061 status collapsed
6062
6063 \begin_layout Plain Layout
6064 .layout
6065 \end_layout
6066
6067 \end_inset
6068
6069  extension and provide LyX with information about document classes.
6070  As of LyX 1.6, however, layout information can also be contained in layout
6071  
6072 \emph on
6073 modules
6074 \emph default
6075 , which have the 
6076 \begin_inset Flex Code
6077 status collapsed
6078
6079 \begin_layout Plain Layout
6080 .module
6081 \end_layout
6082
6083 \end_inset
6084
6085  extension.
6086  Modules are to LaTeX packages much as layouts are to LaTeX classes, and
6087  some modules—such as the 
6088 \begin_inset Flex Code
6089 status collapsed
6090
6091 \begin_layout Plain Layout
6092 endnotes
6093 \end_layout
6094
6095 \end_inset
6096
6097  module—specifically provide support for one package.
6098  In a sense, layout modules are similar to included
6099 \begin_inset Foot
6100 status collapsed
6101
6102 \begin_layout Plain Layout
6103 These can have any extension, but by convention have the 
6104 \begin_inset Flex Code
6105 status collapsed
6106
6107 \begin_layout Plain Layout
6108 .inc
6109 \end_layout
6110
6111 \end_inset
6112
6113  extension.
6114 \end_layout
6115
6116 \end_inset
6117
6118  files—files like 
6119 \begin_inset Flex Code
6120 status collapsed
6121
6122 \begin_layout Plain Layout
6123 stdsections.inc
6124 \end_layout
6125
6126 \end_inset
6127
6128 —in that modules are not specific to a given document class but may be used
6129  with many different classes.
6130  The difference is that using an included file with 
6131 \begin_inset Flex Code
6132 status collapsed
6133
6134 \begin_layout Plain Layout
6135 article.cls
6136 \end_layout
6137
6138 \end_inset
6139
6140  requires editing that file.
6141  Modules, by contrast, are selected in the 
6142 \begin_inset Flex MenuItem
6143 status collapsed
6144
6145 \begin_layout Plain Layout
6146 Document\SpecialChar \menuseparator
6147 Settings
6148 \end_layout
6149
6150 \end_inset
6151
6152  dialog.
6153 \end_layout
6154
6155 \begin_layout Standard
6156 Building modules is the easiest way to get started with layout editing,
6157  since it can be as simple as adding a single new paragraph style or flex
6158  inset.
6159  But modules may, in principle, contain anything a layout file can contain.
6160 \end_layout
6161
6162 \begin_layout Standard
6163 After creating a new module and copying it to the 
6164 \begin_inset Flex Code
6165 status collapsed
6166
6167 \begin_layout Plain Layout
6168 layouts/
6169 \end_layout
6170
6171 \end_inset
6172
6173  folder, you will need to reconfigure and then restart LyX for the module
6174  to appear in the menu.
6175  However, changes you make to the module will be seen immediately, if you
6176  open 
6177 \begin_inset Flex MenuItem
6178 status collapsed
6179
6180 \begin_layout Plain Layout
6181 Document\SpecialChar \menuseparator
6182 Settings
6183 \end_layout
6184
6185 \end_inset
6186
6187 , highlight something, and then hit 
6188 \begin_inset Quotes eld
6189 \end_inset
6190
6191 OK
6192 \begin_inset Quotes erd
6193 \end_inset
6194
6195 .
6196  
6197 \emph on
6198 It is strongly recommended that you save your work before doing this
6199 \emph default
6200 .
6201  In fact, 
6202 \emph on
6203 it is strongly recommended that you not attempt to edit modules while simultaneo
6204 usly working on actual documents
6205 \emph default
6206 .
6207  Though of course the developers strive to keep LyX stable in such situations,
6208  syntax errors and the like in your module file could cause strange behavior.
6209 \end_layout
6210
6211 \begin_layout Subsubsection
6212 Local Layout
6213 \end_layout
6214
6215 \begin_layout Standard
6216 Modules are to LyX as packages are to LaTeX.
6217  Sometimes, however, you find yourself wanting a specific inset or character
6218  style just for one document and writing a module that will also be available
6219  to other documents makes little sense.
6220  What you need is LyX's 
6221 \begin_inset Quotes eld
6222 \end_inset
6223
6224 Local Layout
6225 \begin_inset Quotes erd
6226 \end_inset
6227
6228 .
6229 \end_layout
6230
6231 \begin_layout Standard
6232 You will find it under 
6233 \family sans
6234 Document\SpecialChar \menuseparator
6235 Settings\SpecialChar \menuseparator
6236 Local Layout
6237 \family default
6238 .
6239  The large text box allows you to enter anything that you might enter in
6240  a layout file or module.
6241  You can think of a document's local layout, in fact, as a module that belongs
6242  just to it.
6243  So, in particular, you must enter a 
6244 \begin_inset Flex Code
6245 status collapsed
6246
6247 \begin_layout Plain Layout
6248 Format
6249 \end_layout
6250
6251 \end_inset
6252
6253  tag.
6254  Any format is acceptable, but one would normally use the format current
6255  at the time.
6256  (In LyX 2.0, the current layout format is 35.) You should be aware that local
6257  layout is not supported by versions of LyX prior to 1.6, so you should not
6258  use it if you want to be able to export your document to LyX 1.5 or earlier
6259  (without, that is, losing the local layout information).
6260  If you wish to be able to export to 1.6---local layout is supported in 1.6,
6261  though there is no UI for it---then you should use format 11 and, of course,
6262  use only layout constructs that were available in LyX 1.6.
6263 \end_layout
6264
6265 \begin_layout Standard
6266 When you have entered something in the 
6267 \begin_inset Flex Code
6268 status collapsed
6269
6270 \begin_layout Plain Layout
6271 Local Layout
6272 \end_layout
6273
6274 \end_inset
6275
6276  pane, LyX will enable the 
6277 \begin_inset Quotes eld
6278 \end_inset
6279
6280 Validate
6281 \begin_inset Quotes erd
6282 \end_inset
6283
6284  button at the bottom.
6285  Clicking this button will cause LyX to determine whether what you have
6286  entered is valid layout information for the chosen format.
6287  LyX will report the result but, unfortunately, will not tell you what errors
6288  there might have been.
6289  These will be written to the terminal, however, if LyX is started from
6290  a terminal.
6291  You will not be permitted to save your local layout until you have entered
6292  something valid.
6293 \end_layout
6294
6295 \begin_layout Standard
6296 The warnings at the end of the previous section apply here, too.
6297  Do not play with local layout while you are actually working, especially
6298  if you have not saved your document.
6299  That said, using local layout with a test document can be a very convenient
6300  way to try out layout ideas, or even to start developing a module.
6301 \end_layout
6302
6303 \begin_layout Subsection
6304 Layout for 
6305 \begin_inset Flex MenuItem
6306 status collapsed
6307
6308 \begin_layout Plain Layout
6309 .sty
6310 \end_layout
6311
6312 \end_inset
6313
6314  files
6315 \end_layout
6316
6317 \begin_layout Standard
6318 There are two situations you are likely to encounter when wanting to support
6319  a new LaTeX document class, involving style (
6320 \begin_inset Flex Code
6321 status collapsed
6322
6323 \begin_layout Plain Layout
6324 .sty
6325 \end_layout
6326
6327 \end_inset
6328
6329 ) files and LaTeX2e class (
6330 \begin_inset Flex Code
6331 status collapsed
6332
6333 \begin_layout Plain Layout
6334 .cls
6335 \end_layout
6336
6337 \end_inset
6338
6339 ) .
6340  Supporting a style file is usually fairly easy.
6341  Supporting a new class file is a bit harder.
6342  We'll discuss the former in this section and the latter in the next.
6343  Similar remarks apply, of course, if you want to support a new DocBook
6344  DTD.
6345 \end_layout
6346
6347 \begin_layout Standard
6348 The easier case is the one in which your new document class is provided
6349  as a style file that is to be used in conjunction with an already supported
6350  document class.
6351  For the sake of the example, we'll assume that the style file is called
6352  
6353 \begin_inset Flex MenuItem
6354 status collapsed
6355
6356 \begin_layout Plain Layout
6357 myclass.sty
6358 \end_layout
6359
6360 \end_inset
6361
6362  and that it is meant to be used with 
6363 \begin_inset Flex MenuItem
6364 status collapsed
6365
6366 \begin_layout Plain Layout
6367 report.cls
6368 \end_layout
6369
6370 \end_inset
6371
6372 , which is a standard class.
6373  
6374 \end_layout
6375
6376 \begin_layout Standard
6377 Start by copying the existing class's layout file into your local directory:
6378 \begin_inset Foot
6379 status collapsed
6380
6381 \begin_layout Plain Layout
6382 Of course, which directory is your local directory will vary by platform,
6383  and LyX allows you to specify your local directory on startup, too, using
6384  the 
6385 \begin_inset Flex Code
6386 status collapsed
6387
6388 \begin_layout Plain Layout
6389 -userdir
6390 \end_layout
6391
6392 \end_inset
6393
6394  option.
6395 \end_layout
6396
6397 \end_inset
6398
6399
6400 \end_layout
6401
6402 \begin_layout LyX-Code
6403 cp report.layout ~/.lyx/layouts/myclass.layout
6404 \end_layout
6405
6406 \begin_layout Standard
6407 Then edit 
6408 \begin_inset Flex Code
6409 status collapsed
6410
6411 \begin_layout Plain Layout
6412 myclass.layout
6413 \end_layout
6414
6415 \end_inset
6416
6417  and change the line: 
6418 \end_layout
6419
6420 \begin_layout LyX-Code
6421
6422 \backslash
6423 DeclareLaTeXClass{report}
6424 \end_layout
6425
6426 \begin_layout Standard
6427 to read
6428 \end_layout
6429
6430 \begin_layout LyX-Code
6431
6432 \backslash
6433 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
6434 \end_layout
6435
6436 \begin_layout Standard
6437 Then add:
6438 \end_layout
6439
6440 \begin_layout LyX-Code
6441 Preamble 
6442 \begin_inset Newline newline
6443 \end_inset
6444
6445     
6446 \backslash
6447 usepackage{myclass}
6448 \begin_inset Newline newline
6449 \end_inset
6450
6451 EndPreamble
6452 \end_layout
6453
6454 \begin_layout Standard
6455 near the top of the file.
6456 \end_layout
6457
6458 \begin_layout Standard
6459 Start LyX and select 
6460 \begin_inset Flex MenuItem
6461 status collapsed
6462
6463 \begin_layout Plain Layout
6464 Tools\SpecialChar \menuseparator
6465 Reconfigure
6466 \end_layout
6467
6468 \end_inset
6469
6470 .
6471  Then restart LyX and try creating a new document.
6472  You should see "
6473 \begin_inset Flex MenuItem
6474 status collapsed
6475
6476 \begin_layout Plain Layout
6477 report (myclass)
6478 \end_layout
6479
6480 \end_inset
6481
6482 " as a document class option in the 
6483 \begin_inset Flex MenuItem
6484 status collapsed
6485
6486 \begin_layout Plain Layout
6487 Document\SpecialChar \menuseparator
6488 Settings
6489 \end_layout
6490
6491 \end_inset
6492
6493  dialog.
6494  It is likely that some of the sectioning commands and such in your new
6495  class will work differently from how they worked in the base class—
6496 \begin_inset Flex Code
6497 status collapsed
6498
6499 \begin_layout Plain Layout
6500 report
6501 \end_layout
6502
6503 \end_inset
6504
6505  in this example—so you can fiddle around with the settings for the different
6506  sections if you wish.
6507  The layout information for sections is contained in 
6508 \begin_inset Flex Code
6509 status collapsed
6510
6511 \begin_layout Plain Layout
6512 stdsections.inc
6513 \end_layout
6514
6515 \end_inset
6516
6517 , but you do not need to copy and change this file.
6518  Instead, you can simply add your changes to your layout file, after the
6519  line 
6520 \begin_inset Flex Code
6521 status collapsed
6522
6523 \begin_layout Plain Layout
6524 Input stdclass.inc
6525 \end_layout
6526
6527 \end_inset
6528
6529 , which itself includes 
6530 \begin_inset Flex Code
6531 status collapsed
6532
6533 \begin_layout Plain Layout
6534 stdsections.inc
6535 \end_layout
6536
6537 \end_inset
6538
6539 .
6540  For example, you might add these lines:
6541 \end_layout
6542
6543 \begin_layout LyX-Code
6544 Style Chapter
6545 \end_layout
6546
6547 \begin_layout LyX-Code
6548     Font
6549 \end_layout
6550
6551 \begin_layout LyX-Code
6552         Family Sans
6553 \end_layout
6554
6555 \begin_layout LyX-Code
6556     EndFont
6557 \end_layout
6558
6559 \begin_layout LyX-Code
6560 End
6561 \end_layout
6562
6563 \begin_layout Standard
6564 to change the font for chapter headings to sans-serif.
6565  This will override (or, in this case, add to) the existing declaration
6566  for the Chapter style.
6567  
6568 \end_layout
6569
6570 \begin_layout Standard
6571 Your new package may also provide commands or environments not present in
6572  the base class.
6573  In this case, you will want to add these to the layout file.
6574  See 
6575 \begin_inset CommandInset ref
6576 LatexCommand ref
6577 reference "sec:TextClass"
6578
6579 \end_inset
6580
6581  for information on how to do so.
6582 \end_layout
6583
6584 \begin_layout Standard
6585 If 
6586 \begin_inset Flex MenuItem
6587 status collapsed
6588
6589 \begin_layout Plain Layout
6590 myclass.sty
6591 \end_layout
6592
6593 \end_inset
6594
6595  can be used with several different document classes, and even if it cannot,
6596  you might find it easiest just to write a module that you can load with
6597  the base class.
6598  The simplest possible such module would be:
6599 \end_layout
6600
6601 \begin_layout LyX-Code
6602 #
6603 \backslash
6604 DeclareLyXModule{My Package} 
6605 \end_layout
6606
6607 \begin_layout LyX-Code
6608 #DescriptionBegin 
6609 \end_layout
6610
6611 \begin_layout LyX-Code
6612 #Support for mypkg.sty.
6613 \end_layout
6614
6615 \begin_layout LyX-Code
6616 #DescriptionEnd 
6617 \begin_inset Newline newline
6618 \end_inset
6619
6620
6621 \end_layout
6622
6623 \begin_layout LyX-Code
6624 Format 21
6625 \begin_inset Newline newline
6626 \end_inset
6627
6628
6629 \end_layout
6630
6631 \begin_layout LyX-Code
6632 Preamble
6633 \begin_inset Newline newline
6634 \end_inset
6635
6636     
6637 \backslash
6638 usepackage{mypkg}
6639 \begin_inset Newline newline
6640 \end_inset
6641
6642 EndPreamble
6643 \end_layout
6644
6645 \begin_layout Standard
6646 A more complex module might modify the behavior of some existing constructs
6647  or define some new ones.
6648  Again, see 
6649 \begin_inset CommandInset ref
6650 LatexCommand ref
6651 reference "sec:TextClass"
6652
6653 \end_inset
6654
6655  for discussion.
6656 \end_layout
6657
6658 \begin_layout Subsection
6659 Layout for 
6660 \begin_inset Flex MenuItem
6661 status collapsed
6662
6663 \begin_layout Plain Layout
6664 .cls
6665 \end_layout
6666
6667 \end_inset
6668
6669  files
6670 \end_layout
6671
6672 \begin_layout Standard
6673 There are two possibilities here.
6674  One is that the class file is itself based upon an existing document class.
6675  For example, many thesis classes are based upon 
6676 \begin_inset Flex MenuItem
6677 status collapsed
6678
6679 \begin_layout Plain Layout
6680 book.cls
6681 \end_layout
6682
6683 \end_inset
6684
6685 .
6686  To see whether yours is, look for a line like
6687 \end_layout
6688
6689 \begin_layout LyX-Code
6690
6691 \backslash
6692 LoadClass{book}
6693 \end_layout
6694
6695 \begin_layout Standard
6696 in the file.
6697  If so, then you may proceed largely as in the previous section, though
6698  the 
6699 \begin_inset Flex Code
6700 status collapsed
6701
6702 \begin_layout Plain Layout
6703 DeclareLaTeXClass
6704 \end_layout
6705
6706 \end_inset
6707
6708  line will be different.
6709  If your new class is 
6710 \begin_inset Flex Code
6711 status collapsed
6712
6713 \begin_layout Plain Layout
6714 thesis
6715 \end_layout
6716
6717 \end_inset
6718
6719  and it is based upon 
6720 \begin_inset Flex Code
6721 status collapsed
6722
6723 \begin_layout Plain Layout
6724 book
6725 \end_layout
6726
6727 \end_inset
6728
6729 , then the line should read:
6730 \begin_inset Foot
6731 status collapsed
6732
6733 \begin_layout Plain Layout
6734 And it will be easiest if you save the file to 
6735 \begin_inset Flex Code
6736 status collapsed
6737
6738 \begin_layout Plain Layout
6739 thesis.layout
6740 \end_layout
6741
6742 \end_inset
6743
6744 : LyX assumes that the document class has the same name as the layout file.
6745  
6746 \end_layout
6747
6748 \end_inset
6749
6750
6751 \end_layout
6752
6753 \begin_layout LyX-Code
6754
6755 \backslash
6756 DeclareLaTeXClass[thesis,book]{thesis}
6757 \end_layout
6758
6759 \begin_layout Standard
6760 If, on the other hand, the new class is not based upon an existing class,
6761  you will probably have to 
6762 \begin_inset Quotes eld
6763 \end_inset
6764
6765 roll your own
6766 \begin_inset Quotes erd
6767 \end_inset
6768
6769  layout.
6770  We strongly suggest copying an existing layout file which uses a similar
6771  LaTeX class and then modifying it, if you can do so.
6772  At least use an existing file as a starting point so you can find out what
6773  items you need to worry about.
6774  Again, the specifics are covered below.
6775 \end_layout
6776
6777 \begin_layout Subsection
6778 Creating templates
6779 \begin_inset CommandInset label
6780 LatexCommand label
6781 name "sub:Creating-Templates"
6782
6783 \end_inset
6784
6785
6786 \end_layout
6787
6788 \begin_layout Standard
6789 Once you have written a layout file for a new document class, you might
6790  want to consider writing a 
6791 \emph on
6792 template
6793 \emph default
6794  for it, too.
6795  A template acts as a kind of tutorial for your layout, showing how it might
6796  be used, though containing dummy content.
6797  You can of course look at the various templates included with LyX for ideas.
6798 \end_layout
6799
6800 \begin_layout Standard
6801 Templates are created just like usual documents: using LyX.
6802  The only difference is that usual documents contain all possible settings,
6803  including the font scheme and the paper size.
6804  Usually a user doesn't want a template to overwrite his preferred settings
6805  for such parameters.
6806  For that reason, the designer of a template should remove the corresponding
6807  commands like 
6808 \begin_inset Flex Code
6809 status collapsed
6810
6811 \begin_layout Plain Layout
6812
6813 \backslash
6814 font_roman
6815 \end_layout
6816
6817 \end_inset
6818
6819  or 
6820 \begin_inset Flex Code
6821 status collapsed
6822
6823 \begin_layout Plain Layout
6824
6825 \backslash
6826 papersize
6827 \end_layout
6828
6829 \end_inset
6830
6831  from the template LyX file.
6832  This can be done with any simple text-editor, for example 
6833 \begin_inset Flex Code
6834 status collapsed
6835
6836 \begin_layout Plain Layout
6837 vi
6838 \end_layout
6839
6840 \end_inset
6841
6842  or 
6843 \begin_inset Flex Code
6844 status collapsed
6845
6846 \begin_layout Plain Layout
6847 notepad
6848 \end_layout
6849
6850 \end_inset
6851
6852 .
6853  
6854 \end_layout
6855
6856 \begin_layout Standard
6857 Put the edited template files you create in 
6858 \begin_inset Flex Code
6859 status collapsed
6860
6861 \begin_layout Plain Layout
6862 UserDir/templates/
6863 \end_layout
6864
6865 \end_inset
6866
6867 , copy the ones you use from the global template directory in 
6868 \begin_inset Flex Code
6869 status collapsed
6870
6871 \begin_layout Plain Layout
6872 LyXDir/templates/
6873 \end_layout
6874
6875 \end_inset
6876
6877  to the same place, and redefine the template path in the 
6878 \begin_inset Flex MenuItem
6879 status collapsed
6880
6881 \begin_layout Plain Layout
6882 Tools\SpecialChar \menuseparator
6883 Preferences\SpecialChar \menuseparator
6884 Paths
6885 \end_layout
6886
6887 \end_inset
6888
6889  dialog.
6890 \end_layout
6891
6892 \begin_layout Standard
6893 Note, by the way, that there is a template which has a particular meaning:
6894  
6895 \begin_inset Flex Code
6896 status collapsed
6897
6898 \begin_layout Plain Layout
6899 defaults.lyx
6900 \end_layout
6901
6902 \end_inset
6903
6904 .
6905  This template is loaded every time you create a new document with 
6906 \begin_inset Flex MenuItem
6907 status collapsed
6908
6909 \begin_layout Plain Layout
6910 File\SpecialChar \menuseparator
6911 New
6912 \end_layout
6913
6914 \end_inset
6915
6916  in order to provide useful defaults.
6917  To create this template from inside LyX, all you have to do is to open
6918  a document with the correct settings, and use the 
6919 \begin_inset Flex MenuItem
6920 status collapsed
6921
6922 \begin_layout Plain Layout
6923 Save as Document Defaults
6924 \end_layout
6925
6926 \end_inset
6927
6928  button.
6929 \end_layout
6930
6931 \begin_layout Subsection
6932 Upgrading old layout files
6933 \end_layout
6934
6935 \begin_layout Standard
6936 The format of layout files changes with each LyX release, so old layout
6937  files need to be converted to the new format.
6938  This process has been automated since LyX 1.4: If LyX reads a layout file
6939  in an older format, it automatically calls the script 
6940 \begin_inset Flex Code
6941 status collapsed
6942
6943 \begin_layout Plain Layout
6944 layout2layout.py
6945 \end_layout
6946
6947 \end_inset
6948
6949  to convert it to a temporary file in current format.
6950  The original file is left untouched.
6951  If you use the layout file often, then, you may want to convert it permanently,
6952  so that LyX does not have to do so itself every time.
6953  To do this, you can call the converter manually:
6954 \end_layout
6955
6956 \begin_layout LyX-Code
6957 mv myclass.layout myclass.old
6958 \end_layout
6959
6960 \begin_layout LyX-Code
6961 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
6962 \end_layout
6963
6964 \begin_layout Standard
6965 You need to replace 
6966 \begin_inset Flex Code
6967 status collapsed
6968
6969 \begin_layout Plain Layout
6970 LyXDir
6971 \end_layout
6972
6973 \end_inset
6974
6975  with the name of your LyX system directory, of course.
6976 \end_layout
6977
6978 \begin_layout Standard
6979 Note that manual conversion does not affect included files, so these will
6980  have to be converted separately.
6981 \end_layout
6982
6983 \begin_layout Section
6984 \begin_inset CommandInset label
6985 LatexCommand label
6986 name "sec:TextClass"
6987
6988 \end_inset
6989
6990 The layout file format
6991 \end_layout
6992
6993 \begin_layout Standard
6994 When it's finally time to get your hands dirty and create or edit your own
6995  layout file, the following sections describe what you're up against.
6996  Our advice is to go slowly, save and test often, listen to soothing music,
6997  and enjoy one or two of your favorite adult beverages; more if you are
6998  getting particularly stuck.
6999  It's really not that hard, except that the multitude of options can become
7000  overwhelming if you try to do too much in one sitting.
7001  Go have another adult beverage, just for good measure.
7002 \end_layout
7003
7004 \begin_layout Standard
7005 Note that all the tags used in layout files are case-insensitive.
7006  This means that 
7007 \begin_inset Flex Code
7008 status collapsed
7009
7010 \begin_layout Plain Layout
7011 Style
7012 \end_layout
7013
7014 \end_inset
7015
7016
7017 \begin_inset Flex Code
7018 status collapsed
7019
7020 \begin_layout Plain Layout
7021 style
7022 \end_layout
7023
7024 \end_inset
7025
7026  and 
7027 \begin_inset Flex Code
7028 status collapsed
7029
7030 \begin_layout Plain Layout
7031 StYlE
7032 \end_layout
7033
7034 \end_inset
7035
7036  are really the same tag.
7037  The possible values are printed in brackets after the feature's name.
7038  The default value if a feature isn't specified inside a text class-description
7039  is typeset 
7040 \begin_inset Flex Code
7041 status collapsed
7042
7043 \begin_layout Plain Layout
7044
7045 \emph on
7046 emphasized
7047 \end_layout
7048
7049 \end_inset
7050
7051 .
7052  If the argument has a data type like 
7053 \begin_inset Quotes eld
7054 \end_inset
7055
7056 string
7057 \begin_inset Quotes erd
7058 \end_inset
7059
7060  or 
7061 \begin_inset Quotes eld
7062 \end_inset
7063
7064 float
7065 \begin_inset Quotes erd
7066 \end_inset
7067
7068 , the default is shown like this: 
7069 \begin_inset Flex Code
7070 status collapsed
7071
7072 \begin_layout Plain Layout
7073 float=
7074 \emph on
7075 default
7076 \end_layout
7077
7078 \end_inset
7079
7080 .
7081 \end_layout
7082
7083 \begin_layout Subsection
7084 The document class declaration
7085 \end_layout
7086
7087 \begin_layout Standard
7088 Lines in a layout file which begin with 
7089 \begin_inset Flex Code
7090 status collapsed
7091
7092 \begin_layout Plain Layout
7093 #
7094 \end_layout
7095
7096 \end_inset
7097
7098  are comments.
7099  There is one exception to this rule.
7100  All 
7101 \begin_inset Flex Code
7102 status collapsed
7103
7104 \begin_layout Plain Layout
7105 *.layout
7106 \end_layout
7107
7108 \end_inset
7109
7110  files should begin with a line like:
7111 \end_layout
7112
7113 \begin_layout LyX-Code
7114
7115 \size small
7116 #% Do not delete the line below; configure depends on this 
7117 \end_layout
7118
7119 \begin_layout LyX-Code
7120
7121 \size small
7122 #  
7123 \backslash
7124 DeclareLaTeXClass{article}
7125 \end_layout
7126
7127 \begin_layout Standard
7128 The second line is used when you (re)configure LyX.
7129  The layout file is read by the LaTeX script 
7130 \begin_inset Flex Code
7131 status collapsed
7132
7133 \begin_layout Plain Layout
7134 chkconfig.ltx
7135 \end_layout
7136
7137 \end_inset
7138
7139 , in a special mode where 
7140 \begin_inset Flex Code
7141 status collapsed
7142
7143 \begin_layout Plain Layout
7144 #
7145 \end_layout
7146
7147 \end_inset
7148
7149  is ignored.
7150  The first line is just a LaTeX comment, and the second one contains the
7151  declaration of the text class.
7152  If these lines appear in a file named 
7153 \begin_inset Flex Code
7154 status collapsed
7155
7156 \begin_layout Plain Layout
7157 article.layout
7158 \end_layout
7159
7160 \end_inset
7161
7162 , then they define a text class of name 
7163 \begin_inset Flex Code
7164 status collapsed
7165
7166 \begin_layout Plain Layout
7167 article
7168 \end_layout
7169
7170 \end_inset
7171
7172  (the name of the layout file) which uses the LaTeX document class 
7173 \begin_inset Flex Code
7174 status collapsed
7175
7176 \begin_layout Plain Layout
7177 article.cls
7178 \end_layout
7179
7180 \end_inset
7181
7182  (the default is to use the same name as the layout).
7183  The string 
7184 \begin_inset Quotes eld
7185 \end_inset
7186
7187 article
7188 \begin_inset Quotes erd
7189 \end_inset
7190
7191  that appears above is used as a description of the text class in the 
7192 \begin_inset Flex MenuItem
7193 status collapsed
7194
7195 \begin_layout Plain Layout
7196 Document\SpecialChar \menuseparator
7197 Settings
7198 \end_layout
7199
7200 \end_inset
7201
7202  dialog.
7203 \end_layout
7204
7205 \begin_layout Standard
7206 Let's assume that you wrote your own text class that uses the 
7207 \begin_inset Flex Code
7208 status collapsed
7209
7210 \begin_layout Plain Layout
7211 article.cls
7212 \end_layout
7213
7214 \end_inset
7215
7216  document class, but where you changed the appearance of the section headings.
7217  If you put it in a file 
7218 \begin_inset Flex Code
7219 status collapsed
7220
7221 \begin_layout Plain Layout
7222 myarticle.layout
7223 \end_layout
7224
7225 \end_inset
7226
7227 , the header of this file should be:
7228 \end_layout
7229
7230 \begin_layout LyX-Code
7231
7232 \size small
7233 #% Do not delete the line below; configure depends on this 
7234 \end_layout
7235
7236 \begin_layout LyX-Code
7237
7238 \size small
7239 #  
7240 \backslash
7241 DeclareLaTeXClass[article]{article (with my own headings)}
7242 \end_layout
7243
7244 \begin_layout Standard
7245 This declares a text class 
7246 \begin_inset Flex Code
7247 status collapsed
7248
7249 \begin_layout Plain Layout
7250 myarticle
7251 \end_layout
7252
7253 \end_inset
7254
7255 , associated with the LaTeX document class 
7256 \begin_inset Flex Code
7257 status collapsed
7258
7259 \begin_layout Plain Layout
7260 article.cls
7261 \end_layout
7262
7263 \end_inset
7264
7265  and described as 
7266 \begin_inset Quotes eld
7267 \end_inset
7268
7269 article (with my own headings)
7270 \begin_inset Quotes erd
7271 \end_inset
7272
7273 .
7274  If your text class depends on several packages, you can declare it as:
7275 \end_layout
7276
7277 \begin_layout LyX-Code
7278
7279 \size small
7280 #% Do not delete the line below; configure depends on this 
7281 \end_layout
7282
7283 \begin_layout LyX-Code
7284
7285 \size small
7286 #  
7287 \backslash
7288 DeclareLaTeXClass[article,foo.sty]{article (with my own headings)}
7289 \end_layout
7290
7291 \begin_layout Standard
7292 This indicates that your text class uses the 
7293 \begin_inset Flex Code
7294 status collapsed
7295
7296 \begin_layout Plain Layout
7297 foo.sty
7298 \end_layout
7299
7300 \end_inset
7301
7302  package.
7303  Finally, it is also possible to declare classes for DocBook code.
7304  Typical declarations will look like:
7305 \end_layout
7306
7307 \begin_layout LyX-Code
7308
7309 \size small
7310 #% Do not delete the line below; configure depends on this 
7311 \end_layout
7312
7313 \begin_layout LyX-Code
7314
7315 \size small
7316
7317 \backslash
7318 DeclareDocBookClass[article]{SGML (DocBook article)}
7319 \end_layout
7320
7321 \begin_layout Standard
7322 Note that these declarations can also be given an optional parameter declaring
7323  the name of the document class (but not a list).
7324 \end_layout
7325
7326 \begin_layout Standard
7327 So, to be as explicit as possible, the form of the layout declaration is:
7328 \end_layout
7329
7330 \begin_layout LyX-Code
7331
7332 \size small
7333 #  
7334 \backslash
7335 DeclareLaTeXClass[class,package.sty]{layout description}
7336 \end_layout
7337
7338 \begin_layout Standard
7339 The class need only be specified if the name of the LaTeX class file and
7340  the name of the layout file are different or if there are packages to load.
7341  If the name of the class file is not specified, then LyX will simply assume
7342  that it is the same as the name of the layout file.
7343 \end_layout
7344
7345 \begin_layout Standard
7346 When the text class has been modified to your taste, all you have to do
7347  is to copy it either to 
7348 \begin_inset Flex Code
7349 status collapsed
7350
7351 \begin_layout Plain Layout
7352 LyXDir/layouts/
7353 \end_layout
7354
7355 \end_inset
7356
7357  or to 
7358 \begin_inset Flex Code
7359 status collapsed
7360
7361 \begin_layout Plain Layout
7362 UserDir/layouts
7363 \end_layout
7364
7365 \end_inset
7366
7367 , run 
7368 \begin_inset Flex MenuItem
7369 status collapsed
7370
7371 \begin_layout Plain Layout
7372 Tools\SpecialChar \menuseparator
7373 Reconfigure
7374 \end_layout
7375
7376 \end_inset
7377
7378 , exit LyX and restart.
7379  Then your new text class should be available along with the others.
7380 \end_layout
7381
7382 \begin_layout Standard
7383 Once the layout file is installed, you can edit it and see your changes
7384  without having to reconfigure or to restart LyX.
7385  
7386 \begin_inset Foot
7387 status collapsed
7388
7389 \begin_layout Plain Layout
7390 In versions of LyX prior to 1.6, this was not true.
7391  As a result, editing layout files was very time consuming, since you had
7392  constantly to restart LyX to see changes.
7393 \end_layout
7394
7395 \end_inset
7396
7397  You can force a reload of the current layout by using the LyX function
7398  
7399 \begin_inset Flex MenuItem
7400 status collapsed
7401
7402 \begin_layout Plain Layout
7403 layout-reload
7404 \end_layout
7405
7406 \end_inset
7407
7408 .
7409  There is no default binding for this function—though, of course, you can
7410  bind it to a key yourself.
7411  But you will normally use this function simply by entering it in the mini-buffe
7412 r.
7413  
7414 \end_layout
7415
7416 \begin_layout Standard
7417
7418 \emph on
7419 Warning
7420 \emph default
7421
7422 \begin_inset Flex MenuItem
7423 status collapsed
7424
7425 \begin_layout Plain Layout
7426 layout-reload
7427 \end_layout
7428
7429 \end_inset
7430
7431  is very much an `advanced feature'.
7432  It is 
7433 \emph on
7434 strongly
7435 \emph default
7436  recommended that you save your work before using this function.
7437  In fact, it is 
7438 \emph on
7439 strongly
7440 \emph default
7441  recommended that you not attempt to edit layout information while simultaneousl
7442 y working on a document that you care about.
7443  Use a test document.
7444  Syntax errors and the like in your layout file could cause peculiar behavior.
7445  In particular, such errors could cause LyX to regard the current layout
7446  as invalid and to attempt to switch to some other layout.
7447 \begin_inset Foot
7448 status collapsed
7449
7450 \begin_layout Plain Layout
7451 Really bad syntax errors may even caused LyX to exit.
7452  This is because certain sorts of errors may make LyX unable to read 
7453 \emph on
7454 any
7455 \emph default
7456  layout information.
7457  Please be careful.
7458 \end_layout
7459
7460 \end_inset
7461
7462  The LyX team strives to keep LyX stable in such situations, but safe is
7463  better than sorry.
7464 \begin_inset Foot
7465 status collapsed
7466
7467 \begin_layout Plain Layout
7468 While we're giving advice: make regular backups.
7469  And be nice to your mother.
7470 \end_layout
7471
7472 \end_inset
7473
7474
7475 \end_layout
7476
7477 \begin_layout Subsection
7478 The Module declaration
7479 \end_layout
7480
7481 \begin_layout Standard
7482 A module must begin with a line like the following:
7483 \end_layout
7484
7485 \begin_layout LyX-Code
7486 #
7487 \backslash
7488 DeclareLyXModule[endnotes.sty]{Endnotes} 
7489 \end_layout
7490
7491 \begin_layout Standard
7492 The mandatory argument, in curly brackets, is the name of the module, as
7493  it should appear in 
7494 \begin_inset Flex MenuItem
7495 status collapsed
7496
7497 \begin_layout Plain Layout
7498 Document\SpecialChar \menuseparator
7499 Settings\SpecialChar \menuseparator
7500 Modules
7501 \end_layout
7502
7503 \end_inset
7504
7505 .
7506  The argument in square brackets is optional: It declares any LaTeX packages
7507  on which the module depends.
7508  Please note that only packages about which LyX knows should be listed in
7509  the square brackets.
7510 \begin_inset Foot
7511 status collapsed
7512
7513 \begin_layout Plain Layout
7514 The list of such packages is documented only in the source code.
7515 \end_layout
7516
7517 \end_inset
7518
7519  LyX will not check for arbitrary packages.
7520  It is also possible to use the form 
7521 \begin_inset Flex MenuItem
7522 status collapsed
7523
7524 \begin_layout Plain Layout
7525 from->to
7526 \end_layout
7527
7528 \end_inset
7529
7530  as an optional argument, which declares that the module can only be used
7531  when there exists a conversion chain between the formats `
7532 \begin_inset Flex Code
7533 status collapsed
7534
7535 \begin_layout Plain Layout
7536 from
7537 \end_layout
7538
7539 \end_inset
7540
7541 ' and `
7542 \begin_inset Flex Code
7543 status collapsed
7544
7545 \begin_layout Plain Layout
7546 to
7547 \end_layout
7548
7549 \end_inset
7550
7551 '.
7552 \end_layout
7553
7554 \begin_layout Standard
7555 The module declaration should then be followed by lines like the following
7556 \begin_inset Foot
7557 status collapsed
7558
7559 \begin_layout Plain Layout
7560 Preferably in English if the module should be published with LyX.
7561  This description will appear in the list of messages to be translated and
7562  will be thus translated with the next interface update.
7563 \end_layout
7564
7565 \end_inset
7566
7567 :
7568 \end_layout
7569
7570 \begin_layout LyX-Code
7571 #DescriptionBegin 
7572 \end_layout
7573
7574 \begin_layout LyX-Code
7575 #Adds an endnote command, in addition to footnotes.
7576  
7577 \end_layout
7578
7579 \begin_layout LyX-Code
7580 #You will need to add  
7581 \backslash
7582 theendnotes in TeX code where you 
7583 \end_layout
7584
7585 \begin_layout LyX-Code
7586 #want the endnotes to appear.
7587  
7588 \end_layout
7589
7590 \begin_layout LyX-Code
7591 #DescriptionEnd 
7592 \end_layout
7593
7594 \begin_layout LyX-Code
7595 #Requires: somemodule | othermodule
7596 \end_layout
7597
7598 \begin_layout LyX-Code
7599 #Excludes: badmodule
7600 \end_layout
7601
7602 \begin_layout Standard
7603 The description is used in 
7604 \begin_inset Flex MenuItem
7605 status collapsed
7606
7607 \begin_layout Plain Layout
7608 Document\SpecialChar \menuseparator
7609 Settings\SpecialChar \menuseparator
7610 Modules
7611 \end_layout
7612
7613 \end_inset
7614
7615  to provide the user with information about what the module does.
7616  The 
7617 \begin_inset Flex Code
7618 status collapsed
7619
7620 \begin_layout Plain Layout
7621 Requires
7622 \end_layout
7623
7624 \end_inset
7625
7626  line is used to identify other modules with which this one must be used;
7627  the 
7628 \begin_inset Flex Code
7629 status collapsed
7630
7631 \begin_layout Plain Layout
7632 Excludes
7633 \end_layout
7634
7635 \end_inset
7636
7637  line is used to identify modules with which this one may not be used.
7638  Both are optional, and, as shown, multiple modules should be separated
7639  with the pipe symbol: |.
7640  Note that the required modules are treated disjunctively: 
7641 \emph on
7642 at least one
7643 \emph default
7644  of the required modules must be used.
7645  Similarly, 
7646 \emph on
7647 no
7648 \emph default
7649  excluded module may be used.
7650  Note that modules are identified here by their 
7651 \emph on
7652 filenames
7653 \emph default
7654  without the 
7655 \begin_inset Flex Code
7656 status collapsed
7657
7658 \begin_layout Plain Layout
7659 .module
7660 \end_layout
7661
7662 \end_inset
7663
7664  extension.
7665  So 
7666 \begin_inset Flex Code
7667 status collapsed
7668
7669 \begin_layout Plain Layout
7670 somemodule
7671 \end_layout
7672
7673 \end_inset
7674
7675  is really 
7676 \begin_inset Flex Code
7677 status collapsed
7678
7679 \begin_layout Plain Layout
7680 somemodule.module
7681 \end_layout
7682
7683 \end_inset
7684
7685 .
7686 \end_layout
7687
7688 \begin_layout Subsection
7689 Format number
7690 \end_layout
7691
7692 \begin_layout Standard
7693 The first non-comment line of any layout file, included file, or module
7694  
7695 \emph on
7696 must
7697 \emph default
7698  contain the file format number:
7699 \end_layout
7700
7701 \begin_layout Description
7702 \begin_inset Flex Code
7703 status collapsed
7704
7705 \begin_layout Plain Layout
7706 Format
7707 \end_layout
7708
7709 \end_inset
7710
7711  [
7712 \begin_inset Flex Code
7713 status collapsed
7714
7715 \begin_layout Plain Layout
7716 int
7717 \end_layout
7718
7719 \end_inset
7720
7721 ] The format of the layout file.
7722 \end_layout
7723
7724 \begin_layout Standard
7725 This tag was introduced with LyX 1.4.0.
7726  Layout files from LyX 1.3.x and earlier don't have an explicit file format
7727  and are considered to be of format 1.
7728  The format for the present version of LyX is format 21.
7729  But each version of LyX is capable of reading earlier versions' layout
7730  files, just as they are capable of reading files produced by earlier versions
7731  of LyX.
7732  There is, however, no provision for converting to earlier formats.
7733  So LyX 1.6.x will not read layout files in format 21 but only files in format
7734  11 or earlier.
7735 \end_layout
7736
7737 \begin_layout Subsection
7738 \begin_inset CommandInset label
7739 LatexCommand label
7740 name "sub:General-text-class"
7741
7742 \end_inset
7743
7744 General text class parameters
7745 \end_layout
7746
7747 \begin_layout Standard
7748 These are general parameters that govern the behavior of an entire document
7749  class.
7750  (This does 
7751 \emph on
7752 not
7753 \emph default
7754  mean that they must appear in 
7755 \begin_inset Flex Code
7756 status collapsed
7757
7758 \begin_layout Plain Layout
7759 .layout
7760 \end_layout
7761
7762 \end_inset
7763
7764  files rather than in modules.
7765  A module can contain any layout tag.)
7766 \end_layout
7767
7768 \begin_layout Description
7769 \begin_inset Flex Code
7770 status collapsed
7771
7772 \begin_layout Plain Layout
7773 AddToHTMLPreamble
7774 \end_layout
7775
7776 \end_inset
7777
7778  Adds information that will be output in the 
7779 \begin_inset Flex Code
7780 status collapsed
7781
7782 \begin_layout Plain Layout
7783 <head>
7784 \end_layout
7785
7786 \end_inset
7787
7788  block when this document class is output to XHTML.
7789  Typically, this would be used to output CSS style information, but it can
7790  be used for anything that can appear in 
7791 \begin_inset Flex Code
7792 status collapsed
7793
7794 \begin_layout Plain Layout
7795 <head>
7796 \end_layout
7797
7798 \end_inset
7799
7800 .
7801  Must end with 
7802 \begin_inset Quotes eld
7803 \end_inset
7804
7805
7806 \begin_inset Flex Code
7807 status collapsed
7808
7809 \begin_layout Plain Layout
7810 EndPreamble
7811 \end_layout
7812
7813 \end_inset
7814
7815
7816 \begin_inset Quotes erd
7817 \end_inset
7818
7819 .
7820 \end_layout
7821
7822 \begin_layout Description
7823 \begin_inset Flex Code
7824 status collapsed
7825
7826 \begin_layout Plain Layout
7827 AddToPreamble
7828 \end_layout
7829
7830 \end_inset
7831
7832  Adds information to the document preamble.
7833  Must end with 
7834 \begin_inset Quotes eld
7835 \end_inset
7836
7837
7838 \begin_inset Flex Code
7839 status collapsed
7840
7841 \begin_layout Plain Layout
7842 EndPreamble
7843 \end_layout
7844
7845 \end_inset
7846
7847
7848 \begin_inset Quotes erd
7849 \end_inset
7850
7851 .
7852 \end_layout
7853
7854 \begin_layout Description
7855 \begin_inset Flex Code
7856 status collapsed
7857
7858 \begin_layout Plain Layout
7859 CiteFormat
7860 \end_layout
7861
7862 \end_inset
7863
7864  Defines formats for use in the display of bibliographic information.
7865  See Section 
7866 \begin_inset CommandInset ref
7867 LatexCommand ref
7868 reference "sub:Citation-format-description"
7869
7870 \end_inset
7871
7872  for details.
7873  Must end with 
7874 \begin_inset Quotes eld
7875 \end_inset
7876
7877
7878 \begin_inset Flex Code
7879 status collapsed
7880
7881 \begin_layout Plain Layout
7882 End
7883 \end_layout
7884
7885 \end_inset
7886
7887
7888 \begin_inset Quotes erd
7889 \end_inset
7890
7891 .
7892 \end_layout
7893
7894 \begin_layout Description
7895 \begin_inset Flex Code
7896 status collapsed
7897
7898 \begin_layout Plain Layout
7899 ClassOptions
7900 \end_layout
7901
7902 \end_inset
7903
7904  Describes various global options supported by the document class.
7905  See Section
7906 \begin_inset space ~
7907 \end_inset
7908
7909
7910 \begin_inset CommandInset ref
7911 LatexCommand ref
7912 reference "sub:ClassOptions"
7913
7914 \end_inset
7915
7916  for a description.
7917  Must end with 
7918 \begin_inset Quotes eld
7919 \end_inset
7920
7921
7922 \begin_inset Flex Code
7923 status collapsed
7924
7925 \begin_layout Plain Layout
7926 End
7927 \end_layout
7928
7929 \end_inset
7930
7931
7932 \begin_inset Quotes erd
7933 \end_inset
7934
7935 .
7936 \end_layout
7937
7938 \begin_layout Description
7939 \begin_inset Flex Code
7940 status collapsed
7941
7942 \begin_layout Plain Layout
7943 Columns
7944 \end_layout
7945
7946 \end_inset
7947
7948  [
7949 \begin_inset Flex Code
7950 status collapsed
7951
7952 \begin_layout Plain Layout
7953
7954 \emph on
7955 1
7956 \end_layout
7957
7958 \end_inset
7959
7960
7961 \begin_inset Flex Code
7962 status collapsed
7963
7964 \begin_layout Plain Layout
7965 2
7966 \end_layout
7967
7968 \end_inset
7969
7970 ] Whether the class should 
7971 \emph on
7972 default
7973 \emph default
7974  to having one or two columns.
7975  Can be changed in the 
7976 \begin_inset Flex MenuItem
7977 status collapsed
7978
7979 \begin_layout Plain Layout
7980 Document\SpecialChar \menuseparator
7981 Settings
7982 \end_layout
7983
7984 \end_inset
7985
7986  dialog.
7987 \end_layout
7988
7989 \begin_layout Description
7990 \begin_inset Flex Code
7991 status collapsed
7992
7993 \begin_layout Plain Layout
7994 Counter
7995 \end_layout
7996
7997 \end_inset
7998
7999  [
8000 \begin_inset Flex Code
8001 status collapsed
8002
8003 \begin_layout Plain Layout
8004 string
8005 \end_layout
8006
8007 \end_inset
8008
8009 ] This sequence defines the properties for a counter.
8010  If the counter does not yet exist, it is created; if it does exist, it
8011  is modified.
8012  Must end with 
8013 \begin_inset Quotes eld
8014 \end_inset
8015
8016
8017 \begin_inset Flex Code
8018 status collapsed
8019
8020 \begin_layout Plain Layout
8021 End
8022 \end_layout
8023
8024 \end_inset
8025
8026
8027 \begin_inset Quotes erd
8028 \end_inset
8029
8030 .
8031 \begin_inset Newline newline
8032 \end_inset
8033
8034 See Section
8035 \begin_inset space ~
8036 \end_inset
8037
8038
8039 \begin_inset CommandInset ref
8040 LatexCommand ref
8041 reference "sub:Counters"
8042
8043 \end_inset
8044
8045  for details on counters.
8046 \end_layout
8047
8048 \begin_layout Description
8049 \begin_inset Flex Code
8050 status collapsed
8051
8052 \begin_layout Plain Layout
8053 DefaultFont
8054 \end_layout
8055
8056 \end_inset
8057
8058  Sets the default font used to display the document.
8059  See Section
8060 \begin_inset space ~
8061 \end_inset
8062
8063
8064 \begin_inset CommandInset ref
8065 LatexCommand ref
8066 reference "sub:Font-description"
8067
8068 \end_inset
8069
8070  for how to declare fonts.
8071  Must end with 
8072 \begin_inset Quotes eld
8073 \end_inset
8074
8075
8076 \begin_inset Flex Code
8077 status collapsed
8078
8079 \begin_layout Plain Layout
8080 EndFont
8081 \end_layout
8082
8083 \end_inset
8084
8085
8086 \begin_inset Quotes erd
8087 \end_inset
8088
8089 .
8090 \end_layout
8091
8092 \begin_layout Description
8093 \begin_inset Flex Code
8094 status collapsed
8095
8096 \begin_layout Plain Layout
8097 DefaultModule
8098 \end_layout
8099
8100 \end_inset
8101
8102  [
8103 \begin_inset Flex Code
8104 status collapsed
8105
8106 \begin_layout Plain Layout
8107 string]
8108 \end_layout
8109
8110 \end_inset
8111
8112  Specifies a module to be included by default with this document class.
8113  The module should be specified by filename without the 
8114 \begin_inset Flex Code
8115 status collapsed
8116
8117 \begin_layout Plain Layout
8118 .module
8119 \end_layout
8120
8121 \end_inset
8122
8123  extension.
8124  The user can still remove the module, but it will be active at the outset.
8125  (This applies only when new files are created, or when this class is chosen
8126  for an existing document.)
8127 \end_layout
8128
8129 \begin_layout Description
8130 \begin_inset Flex Code
8131 status collapsed
8132
8133 \begin_layout Plain Layout
8134 DefaultStyle
8135 \end_layout
8136
8137 \end_inset
8138
8139  [
8140 \begin_inset Flex Code
8141 status collapsed
8142
8143 \begin_layout Plain Layout
8144 string
8145 \end_layout
8146
8147 \end_inset
8148
8149 ] This is the style that will be assigned to new paragraphs, usually 
8150 \begin_inset Flex MenuItem
8151 status collapsed
8152
8153 \begin_layout Plain Layout
8154 Standard
8155 \end_layout
8156
8157 \end_inset
8158
8159 .
8160  This will default to the first defined style if not given, but you are
8161  encouraged to use this directive.
8162 \end_layout
8163
8164 \begin_layout Description
8165 \begin_inset Flex Code
8166 status collapsed
8167
8168 \begin_layout Plain Layout
8169 ExcludesModule
8170 \end_layout
8171
8172 \end_inset
8173
8174  [
8175 \begin_inset Flex Code
8176 status collapsed
8177
8178 \begin_layout Plain Layout
8179 string
8180 \end_layout
8181
8182 \end_inset
8183
8184 ] This tag indicates that the module in question—which should be specified
8185  by filename without the 
8186 \begin_inset Flex Code
8187 status collapsed
8188
8189 \begin_layout Plain Layout
8190 .module
8191 \end_layout
8192
8193 \end_inset
8194
8195  extension—cannot be used with this document class.
8196  This might be used in a journal-specific layout file to prevent, say, the
8197  use of the 
8198 \begin_inset Flex Code
8199 status collapsed
8200
8201 \begin_layout Plain Layout
8202 theorems-sec
8203 \end_layout
8204
8205 \end_inset
8206
8207  module that numbers theorems by section.
8208  This tag may 
8209 \emph on
8210 not
8211 \emph default
8212  be used in a module.
8213  Modules have their own way of excluding other modules (see 
8214 \begin_inset CommandInset ref
8215 LatexCommand ref
8216 reference "sub:Layout-modules"
8217
8218 \end_inset
8219
8220 ).
8221 \end_layout
8222
8223 \begin_layout Description
8224 \begin_inset Flex Code
8225 status collapsed
8226
8227 \begin_layout Plain Layout
8228 Float
8229 \end_layout
8230
8231 \end_inset
8232
8233  Defines a new float.
8234  See Section
8235 \begin_inset space ~
8236 \end_inset
8237
8238
8239 \begin_inset CommandInset ref
8240 LatexCommand ref
8241 reference "sub:Floats"
8242
8243 \end_inset
8244
8245  for details.
8246  Must end with 
8247 \begin_inset Quotes eld
8248 \end_inset
8249
8250
8251 \begin_inset Flex Code
8252 status collapsed
8253
8254 \begin_layout Plain Layout
8255 End
8256 \end_layout
8257
8258 \end_inset
8259
8260
8261 \begin_inset Quotes erd
8262 \end_inset
8263
8264 .
8265 \end_layout
8266
8267 \begin_layout Description
8268 \begin_inset Flex Code
8269 status collapsed
8270
8271 \begin_layout Plain Layout
8272 HTMLPreamble
8273 \end_layout
8274
8275 \end_inset
8276
8277  Sets the information that will be output in the 
8278 \begin_inset Flex Code
8279 status collapsed
8280
8281 \begin_layout Plain Layout
8282 <head>
8283 \end_layout
8284
8285 \end_inset
8286
8287  block when this document class is output to XHTML.
8288  Note that this will completely override any prior 
8289 \begin_inset Flex Code
8290 status collapsed
8291
8292 \begin_layout Plain Layout
8293 HTMLPreamble
8294 \end_layout
8295
8296 \end_inset
8297
8298  or 
8299 \begin_inset Flex Code
8300 status collapsed
8301
8302 \begin_layout Plain Layout
8303 AddToHTMLPreamble
8304 \end_layout
8305
8306 \end_inset
8307
8308  declarations.
8309  (Use 
8310 \begin_inset Flex Code
8311 status collapsed
8312
8313 \begin_layout Plain Layout
8314 AddToHTMLPreamble
8315 \end_layout
8316
8317 \end_inset
8318
8319  if you just want to add material to the preamble.) Must end with 
8320 \begin_inset Quotes eld
8321 \end_inset
8322
8323
8324 \begin_inset Flex Code
8325 status collapsed
8326
8327 \begin_layout Plain Layout
8328 EndPreamble
8329 \end_layout
8330
8331 \end_inset
8332
8333
8334 \begin_inset Quotes erd
8335 \end_inset
8336
8337 .
8338 \end_layout
8339
8340 \begin_layout Description
8341 \begin_inset Flex Code
8342 status collapsed
8343
8344 \begin_layout Plain Layout
8345 HTMLTOCSection
8346 \end_layout
8347
8348 \end_inset
8349
8350  [
8351 \begin_inset Flex Code
8352 status collapsed
8353
8354 \begin_layout Plain Layout
8355 string
8356 \end_layout
8357
8358 \end_inset
8359
8360 ] The layout to use for the table of contents, bibliography, and so forth,
8361  when the document is output to HTML.
8362  For articles, this should normally be Section; for books, Chapter.
8363  If it is not given, then LyX will attempt to figure out which layout to
8364  use.
8365 \end_layout
8366
8367 \begin_layout Description
8368 \begin_inset Flex Code
8369 status collapsed
8370
8371 \begin_layout Plain Layout
8372 IfCounter
8373 \end_layout
8374
8375 \end_inset
8376
8377  [
8378 \begin_inset Flex Code
8379 status collapsed
8380
8381 \begin_layout Plain Layout
8382 string
8383 \end_layout
8384
8385 \end_inset
8386
8387 ] Modifies the properties of the given counter.
8388  If the counter does not exist, the section is ignored.
8389  Must end with 
8390 \begin_inset Quotes eld
8391 \end_inset
8392
8393
8394 \begin_inset Flex Code
8395 status collapsed
8396
8397 \begin_layout Plain Layout
8398 End
8399 \end_layout
8400
8401 \end_inset
8402
8403
8404 \begin_inset Quotes erd
8405 \end_inset
8406
8407 .
8408 \begin_inset Newline newline
8409 \end_inset
8410
8411 See Section
8412 \begin_inset space ~
8413 \end_inset
8414
8415
8416 \begin_inset CommandInset ref
8417 LatexCommand ref
8418 reference "sub:Counters"
8419
8420 \end_inset
8421
8422  for details on counters.
8423 \end_layout
8424
8425 \begin_layout Description
8426 \begin_inset Flex Code
8427 status collapsed
8428
8429 \begin_layout Plain Layout
8430 IfStyle
8431 \end_layout
8432
8433 \end_inset
8434
8435  [
8436 \begin_inset Flex Code
8437 status collapsed
8438
8439 \begin_layout Plain Layout
8440 string
8441 \end_layout
8442
8443 \end_inset
8444
8445 ] Modifies the properties of the given paragraph style.
8446  If the style does not exist, the section is ignored.
8447  Must end with 
8448 \begin_inset Quotes eld
8449 \end_inset
8450
8451
8452 \begin_inset Flex Code
8453 status collapsed
8454
8455 \begin_layout Plain Layout
8456 End
8457 \end_layout
8458
8459 \end_inset
8460
8461
8462 \begin_inset Quotes erd
8463 \end_inset
8464
8465 .
8466 \end_layout
8467
8468 \begin_layout Description
8469 \begin_inset Flex Code
8470 status collapsed
8471
8472 \begin_layout Plain Layout
8473 Input
8474 \end_layout
8475
8476 \end_inset
8477
8478  As its name implies, this command allows you to include another layout
8479  definition file within yours to avoid duplicating commands.
8480  Common examples are the standard layout files, for example, 
8481 \begin_inset Flex Code
8482 status collapsed
8483
8484 \begin_layout Plain Layout
8485 stdclass.inc
8486 \end_layout
8487
8488 \end_inset
8489
8490 , which contains most of the basic layouts.
8491 \end_layout
8492
8493 \begin_layout Description
8494 \begin_inset Flex Code
8495 status collapsed
8496
8497 \begin_layout Plain Layout
8498 InsetLayout
8499 \end_layout
8500
8501 \end_inset
8502
8503  This section (re-)defines the layout of an inset.
8504  It can be applied to an existing inset or to a new, user-defined inset,
8505  e.g., a new character style.
8506  Must end with 
8507 \begin_inset Quotes eld
8508 \end_inset
8509
8510
8511 \begin_inset Flex Code
8512 status collapsed
8513
8514 \begin_layout Plain Layout
8515 End
8516 \end_layout
8517
8518 \end_inset
8519
8520
8521 \begin_inset Quotes erd
8522 \end_inset
8523
8524 .
8525 \begin_inset Newline newline
8526 \end_inset
8527
8528 See Section
8529 \begin_inset space ~
8530 \end_inset
8531
8532
8533 \begin_inset CommandInset ref
8534 LatexCommand ref
8535 reference "sub:Flex-insets-and"
8536
8537 \end_inset
8538
8539  for more information.
8540  
8541 \end_layout
8542
8543 \begin_layout Description
8544 \begin_inset Flex Code
8545 status collapsed
8546
8547 \begin_layout Plain Layout
8548 LeftMargin
8549 \end_layout
8550
8551 \end_inset
8552
8553  [
8554 \begin_inset Flex Code
8555 status collapsed
8556
8557 \begin_layout Plain Layout
8558 string
8559 \end_layout
8560
8561 \end_inset
8562
8563 ] A string that indicates the width of the left margin on the screen, for
8564  example, 
8565 \begin_inset Quotes eld
8566 \end_inset
8567
8568 MMMMM
8569 \begin_inset Quotes erd
8570 \end_inset
8571
8572 .
8573  (Note that this is not a `length', like 
8574 \begin_inset Quotes eld
8575 \end_inset
8576
8577 2ex
8578 \begin_inset Quotes erd
8579 \end_inset
8580
8581 .)
8582 \end_layout
8583
8584 \begin_layout Description
8585 \begin_inset Flex Code
8586 status collapsed
8587
8588 \begin_layout Plain Layout
8589 NoCounter
8590 \end_layout
8591
8592 \end_inset
8593
8594  [
8595 \begin_inset Flex Code
8596 status collapsed
8597
8598 \begin_layout Plain Layout
8599 string
8600 \end_layout
8601
8602 \end_inset
8603
8604 ] This command deletes an existing counter, usually one defined in an included
8605  file.
8606 \end_layout
8607
8608 \begin_layout Description
8609 \begin_inset Flex Code
8610 status collapsed
8611
8612 \begin_layout Plain Layout
8613 NoFloat
8614 \end_layout
8615
8616 \end_inset
8617
8618  This command deletes an existing float.
8619  This is particularly useful when you want to suppress a float that has
8620  been defined in an input file.
8621 \end_layout
8622
8623 \begin_layout Description
8624 \begin_inset Flex Code
8625 status collapsed
8626
8627 \begin_layout Plain Layout
8628 NoStyle
8629 \end_layout
8630
8631 \end_inset
8632
8633  This command deletes an existing style.
8634  This is particularly useful when you want to suppress a style that has
8635  be defined in an input file.
8636 \end_layout
8637
8638 \begin_layout Description
8639 \begin_inset Flex Code
8640 status collapsed
8641
8642 \begin_layout Plain Layout
8643 OutputFormat
8644 \end_layout
8645
8646 \end_inset
8647
8648  A string indicating the file format (as defined in the Preferences dialog)
8649  produced by this class.
8650  It is mainly useful when 
8651 \begin_inset Flex Code
8652 status collapsed
8653
8654 \begin_layout Plain Layout
8655 OutputType
8656 \end_layout
8657
8658 \end_inset
8659
8660  is `literate' and one wants to define a new type of literate document.
8661  This string is reset to `docbook', `latex', or `literate' when the correspondin
8662
8663 \begin_inset Flex Code
8664 status collapsed
8665
8666 \begin_layout Plain Layout
8667 OutputType
8668 \end_layout
8669
8670 \end_inset
8671
8672  parameter is encountered.
8673 \end_layout
8674
8675 \begin_layout Description
8676 \begin_inset Flex Code
8677 status collapsed
8678
8679 \begin_layout Plain Layout
8680 OutputType
8681 \end_layout
8682
8683 \end_inset
8684
8685  A string indicating what sort of output documents using this class will
8686  produce.
8687  At present, the options are: `docbook', `latex', and `literate'.
8688 \end_layout
8689
8690 \begin_layout Description
8691 \begin_inset Flex Code
8692 status collapsed
8693
8694 \begin_layout Plain Layout
8695 PageStyle
8696 \end_layout
8697
8698 \end_inset
8699
8700  [
8701 \begin_inset Flex Code
8702 status collapsed
8703
8704 \begin_layout Plain Layout
8705
8706 \emph on
8707 plain
8708 \end_layout
8709
8710 \end_inset
8711
8712
8713 \begin_inset Flex Code
8714 status collapsed
8715
8716 \begin_layout Plain Layout
8717 empty
8718 \end_layout
8719
8720 \end_inset
8721
8722
8723 \begin_inset Flex Code
8724 status collapsed
8725
8726 \begin_layout Plain Layout
8727 headings
8728 \end_layout
8729
8730 \end_inset
8731
8732 ] The default pagestyle.
8733  Can be changed in the 
8734 \begin_inset Flex MenuItem
8735 status collapsed
8736
8737 \begin_layout Plain Layout
8738 Document\SpecialChar \menuseparator
8739 Settings
8740 \end_layout
8741
8742 \end_inset
8743
8744  dialog.
8745 \end_layout
8746
8747 \begin_layout Description
8748 \begin_inset Flex Code
8749 status collapsed
8750
8751 \begin_layout Plain Layout
8752 Preamble
8753 \end_layout
8754
8755 \end_inset
8756
8757  Sets the preamble for the LaTeX document.
8758  Note that this will completely override any prior 
8759 \begin_inset Flex Code
8760 status collapsed
8761
8762 \begin_layout Plain Layout
8763 Preamble
8764 \end_layout
8765
8766 \end_inset
8767
8768  or 
8769 \begin_inset Flex Code
8770 status collapsed
8771
8772 \begin_layout Plain Layout
8773 AddToPreamble
8774 \end_layout
8775
8776 \end_inset
8777
8778  declarations.
8779  (Use 
8780 \begin_inset Flex Code
8781 status collapsed
8782
8783 \begin_layout Plain Layout
8784 AddToPreamble
8785 \end_layout
8786
8787 \end_inset
8788
8789  if you just want to add material to the preamble.) Must end with 
8790 \begin_inset Quotes eld
8791 \end_inset
8792
8793
8794 \begin_inset Flex Code
8795 status collapsed
8796
8797 \begin_layout Plain Layout
8798 EndPreamble
8799 \end_layout
8800
8801 \end_inset
8802
8803
8804 \begin_inset Quotes erd
8805 \end_inset
8806
8807 .
8808 \end_layout
8809
8810 \begin_layout Description
8811 \begin_inset Flex Code
8812 status collapsed
8813
8814 \begin_layout Plain Layout
8815 Provides
8816 \end_layout
8817
8818 \end_inset
8819
8820  [
8821 \begin_inset Flex Code
8822 status collapsed
8823
8824 \begin_layout Plain Layout
8825 string
8826 \end_layout
8827
8828 \end_inset
8829
8830 ] [
8831 \begin_inset Flex Code
8832 status collapsed
8833
8834 \begin_layout Plain Layout
8835
8836 \emph on
8837 0
8838 \end_layout
8839
8840 \end_inset
8841
8842
8843 \begin_inset Flex Code
8844 status collapsed
8845
8846 \begin_layout Plain Layout
8847 1
8848 \end_layout
8849
8850 \end_inset
8851
8852 ] Whether the class already provides the feature 
8853 \begin_inset Flex Code
8854 status collapsed
8855
8856 \begin_layout Plain Layout
8857 string
8858 \end_layout
8859
8860 \end_inset
8861
8862 .
8863  A feature is in general the name of a package (
8864 \begin_inset Flex Code
8865 status collapsed
8866
8867 \begin_layout Plain Layout
8868 amsmath
8869 \end_layout
8870
8871 \end_inset
8872
8873
8874 \begin_inset Flex Code
8875 status collapsed
8876
8877 \begin_layout Plain Layout
8878 makeidx
8879 \end_layout
8880
8881 \end_inset
8882
8883 , \SpecialChar \ldots{}
8884 ) or a macro (
8885 \begin_inset Flex Code
8886 status collapsed
8887
8888 \begin_layout Plain Layout
8889 url
8890 \end_layout
8891
8892 \end_inset
8893
8894
8895 \begin_inset Flex Code
8896 status collapsed
8897
8898 \begin_layout Plain Layout
8899 boldsymbol
8900 \end_layout
8901
8902 \end_inset
8903
8904 ,\SpecialChar \ldots{}
8905 ); the complete list of supported features is unfortunately not documented
8906  outside the LyX source code—but see 
8907 \begin_inset Flex Code
8908 status collapsed
8909
8910 \begin_layout Plain Layout
8911 LaTeXFeatures.cpp
8912 \end_layout
8913
8914 \end_inset
8915
8916  if you're interested.
8917  
8918 \begin_inset Flex MenuItem
8919 status collapsed
8920
8921 \begin_layout Plain Layout
8922 Help\SpecialChar \menuseparator
8923 LaTeX Configuration
8924 \end_layout
8925
8926 \end_inset
8927
8928  also gives an overview of the supported packages.
8929 \end_layout
8930
8931 \begin_layout Description
8932 \begin_inset Flex Code
8933 status collapsed
8934
8935 \begin_layout Plain Layout
8936 ProvidesModule
8937 \end_layout
8938
8939 \end_inset
8940
8941  [
8942 \begin_inset Flex Code
8943 status collapsed
8944
8945 \begin_layout Plain Layout
8946 string
8947 \end_layout
8948
8949 \end_inset
8950
8951 ] Indicates that this layout provides the functionality of the module mentioned,
8952  which should be specified by the filename without the 
8953 \begin_inset Flex Code
8954 status collapsed
8955
8956 \begin_layout Plain Layout
8957 .module
8958 \end_layout
8959
8960 \end_inset
8961
8962  extension.
8963  This will typically be used if the layout includes the module directly,
8964  rather than using the 
8965 \begin_inset Flex Code
8966 status collapsed
8967
8968 \begin_layout Plain Layout
8969 DefaultModule
8970 \end_layout
8971
8972 \end_inset
8973
8974  tag to indicate that it ought to be used.
8975  It could also be used in a module that provided an alternate implementation
8976  of the same functionality.
8977 \end_layout
8978
8979 \begin_layout Description
8980 \begin_inset Flex Code
8981 status collapsed
8982
8983 \begin_layout Plain Layout
8984 Requires
8985 \end_layout
8986
8987 \end_inset
8988
8989  [
8990 \begin_inset Flex Code
8991 status collapsed
8992
8993 \begin_layout Plain Layout
8994 string
8995 \end_layout
8996
8997 \end_inset
8998
8999 ] Whether the class requires the feature 
9000 \begin_inset Flex Code
9001 status collapsed
9002
9003 \begin_layout Plain Layout
9004 string
9005 \end_layout
9006
9007 \end_inset
9008
9009 .
9010  Multiple features must be separated by commas.
9011  Note that you can only request supported features.
9012  (Again, see 
9013 \begin_inset Flex Code
9014 status collapsed
9015
9016 \begin_layout Plain Layout
9017 LaTeXFeatures.cpp
9018 \end_layout
9019
9020 \end_inset
9021
9022  for a list of these.)
9023 \end_layout
9024
9025 \begin_layout Description
9026 \begin_inset Flex Code
9027 status collapsed
9028
9029 \begin_layout Plain Layout
9030 RightMargin
9031 \end_layout
9032
9033 \end_inset
9034
9035  A string that indicates the width of the right margin on the screen, for
9036  example, 
9037 \begin_inset Quotes eld
9038 \end_inset
9039
9040 MMMMM
9041 \begin_inset Quotes erd
9042 \end_inset
9043
9044 .
9045 \end_layout
9046
9047 \begin_layout Description
9048 \begin_inset Flex Code
9049 status collapsed
9050
9051 \begin_layout Plain Layout
9052 SecNumDepth
9053 \end_layout
9054
9055 \end_inset
9056
9057  Sets which divisions get numbered.
9058  Corresponds to the 
9059 \begin_inset Flex Code
9060 status collapsed
9061
9062 \begin_layout Plain Layout
9063 secnumdepth
9064 \end_layout
9065
9066 \end_inset
9067
9068  counter in LaTeX.
9069 \end_layout
9070
9071 \begin_layout Description
9072 \begin_inset Flex Code
9073 status collapsed
9074
9075 \begin_layout Plain Layout
9076 Sides
9077 \end_layout
9078
9079 \end_inset
9080
9081  [
9082 \begin_inset Flex Code
9083 status collapsed
9084
9085 \begin_layout Plain Layout
9086
9087 \emph on
9088 1
9089 \end_layout
9090
9091 \end_inset
9092
9093
9094 \begin_inset Flex Code
9095 status collapsed
9096
9097 \begin_layout Plain Layout
9098 2
9099 \end_layout
9100
9101 \end_inset
9102
9103 ] Whether the class-default should be printing on one or both sides of the
9104  paper.
9105  Can be changed in the 
9106 \begin_inset Flex MenuItem
9107 status collapsed
9108
9109 \begin_layout Plain Layout
9110 Document\SpecialChar \menuseparator
9111 Settings
9112 \end_layout
9113
9114 \end_inset
9115
9116  dialog.
9117 \end_layout
9118
9119 \begin_layout Description
9120 \begin_inset Flex Code
9121 status collapsed
9122
9123 \begin_layout Plain Layout
9124 Style
9125 \end_layout
9126
9127 \end_inset
9128
9129  This sequence defines a paragraph style.
9130  If the style does not yet exist, it is created; if it does exist, its parameter
9131 s are modified.
9132  Must end with 
9133 \begin_inset Quotes eld
9134 \end_inset
9135
9136
9137 \begin_inset Flex Code
9138 status collapsed
9139
9140 \begin_layout Plain Layout
9141 End
9142 \end_layout
9143
9144 \end_inset
9145
9146
9147 \begin_inset Quotes erd
9148 \end_inset
9149
9150 .
9151 \begin_inset Newline newline
9152 \end_inset
9153
9154 See Section
9155 \begin_inset space ~
9156 \end_inset
9157
9158
9159 \begin_inset CommandInset ref
9160 LatexCommand ref
9161 reference "sub:Paragraph-Styles"
9162
9163 \end_inset
9164
9165  for details on paragraph styles.
9166 \end_layout
9167
9168 \begin_layout Description
9169 \begin_inset Flex Code
9170 status collapsed
9171
9172 \begin_layout Plain Layout
9173 TitleLatexName
9174 \end_layout
9175
9176 \end_inset
9177
9178  [
9179 \begin_inset Flex Code
9180 status collapsed
9181
9182 \begin_layout Plain Layout
9183 string="maketitle"
9184 \end_layout
9185
9186 \end_inset
9187
9188 ] The name of the command or environment to be used with 
9189 \begin_inset Flex Code
9190 status collapsed
9191
9192 \begin_layout Plain Layout
9193 TitleLatexType
9194 \end_layout
9195
9196 \end_inset
9197
9198 .
9199 \end_layout
9200
9201 \begin_layout Description
9202 \begin_inset Flex Code
9203 status collapsed
9204
9205 \begin_layout Plain Layout
9206 TitleLatexType
9207 \end_layout
9208
9209 \end_inset
9210
9211  [
9212 \begin_inset Flex Code
9213 status collapsed
9214
9215 \begin_layout Plain Layout
9216
9217 \emph on
9218 CommandAfter
9219 \end_layout
9220
9221 \end_inset
9222
9223
9224 \begin_inset Flex Code
9225 status collapsed
9226
9227 \begin_layout Plain Layout
9228 Environment
9229 \end_layout
9230
9231 \end_inset
9232
9233 ] Indicates what kind of markup is used to define the title of a document.
9234  
9235 \begin_inset Flex Code
9236 status collapsed
9237
9238 \begin_layout Plain Layout
9239 CommandAfter
9240 \end_layout
9241
9242 \end_inset
9243
9244  means that the macro with name 
9245 \begin_inset Flex Code
9246 status collapsed
9247
9248 \begin_layout Plain Layout
9249 TitleLatexName
9250 \end_layout
9251
9252 \end_inset
9253
9254  will be inserted after the last layout which has 
9255 \begin_inset Quotes eld
9256 \end_inset
9257
9258
9259 \begin_inset Flex Code
9260 status collapsed
9261
9262 \begin_layout Plain Layout
9263 InTitle 1
9264 \end_layout
9265
9266 \end_inset
9267
9268
9269 \begin_inset Quotes erd
9270 \end_inset
9271
9272 .
9273  
9274 \begin_inset Flex Code
9275 status collapsed
9276
9277 \begin_layout Plain Layout
9278 Environment
9279 \end_layout
9280
9281 \end_inset
9282
9283  corresponds to the case where the block of paragraphs which have 
9284 \begin_inset Quotes eld
9285 \end_inset
9286
9287
9288 \begin_inset Flex Code
9289 status collapsed
9290
9291 \begin_layout Plain Layout
9292 InTitle 1
9293 \end_layout
9294
9295 \end_inset
9296
9297
9298 \begin_inset Quotes erd
9299 \end_inset
9300
9301  should be enclosed into the 
9302 \begin_inset Flex Code
9303 status collapsed
9304
9305 \begin_layout Plain Layout
9306 TitleLatexName
9307 \end_layout
9308
9309 \end_inset
9310
9311  environment.
9312 \end_layout
9313
9314 \begin_layout Description
9315 \begin_inset Flex Code
9316 status collapsed
9317
9318 \begin_layout Plain Layout
9319 TocDepth
9320 \end_layout
9321
9322 \end_inset
9323
9324  Sets which divisions are included in the table of contents.
9325  Corresponds to the 
9326 \begin_inset Flex Code
9327 status collapsed
9328
9329 \begin_layout Plain Layout
9330 tocdepth
9331 \end_layout
9332
9333 \end_inset
9334
9335  counter in LaTeX.
9336 \end_layout
9337
9338 \begin_layout Subsection
9339 \begin_inset Flex Code
9340 status collapsed
9341
9342 \begin_layout Plain Layout
9343 ClassOptions
9344 \end_layout
9345
9346 \end_inset
9347
9348  section
9349 \begin_inset CommandInset label
9350 LatexCommand label
9351 name "sub:ClassOptions"
9352
9353 \end_inset
9354
9355
9356 \end_layout
9357
9358 \begin_layout Standard
9359 The 
9360 \begin_inset Flex Code
9361 status collapsed
9362
9363 \begin_layout Plain Layout
9364 ClassOptions
9365 \end_layout
9366
9367 \end_inset
9368
9369  section can contain the following entries:
9370 \end_layout
9371
9372 \begin_layout Description
9373 \begin_inset Flex Code
9374 status collapsed
9375
9376 \begin_layout Plain Layout
9377 FontSize
9378 \end_layout
9379
9380 \end_inset
9381
9382  [
9383 \begin_inset Flex Code
9384 status collapsed
9385
9386 \begin_layout Plain Layout
9387 string="10|11|12"
9388 \end_layout
9389
9390 \end_inset
9391
9392 ] The list of available font sizes for the document's main font, separated
9393  by 
9394 \begin_inset Quotes eld
9395 \end_inset
9396
9397
9398 \begin_inset Flex Code
9399 status collapsed
9400
9401 \begin_layout Plain Layout
9402 |
9403 \end_layout
9404
9405 \end_inset
9406
9407
9408 \begin_inset Quotes erd
9409 \end_inset
9410
9411 .
9412 \end_layout
9413
9414 \begin_layout Description
9415 \begin_inset Flex Code
9416 status collapsed
9417
9418 \begin_layout Plain Layout
9419 Header
9420 \end_layout
9421
9422 \end_inset
9423
9424  Used to set the DTD line with XML-based output classes.
9425  E.
9426 \begin_inset space \thinspace{}
9427 \end_inset
9428
9429 g.: PUBLIC 
9430 \begin_inset Quotes eld
9431 \end_inset
9432
9433 -//OASIS//DTD DocBook V4.2//EN
9434 \begin_inset Quotes erd
9435 \end_inset
9436
9437 .
9438 \end_layout
9439
9440 \begin_layout Description
9441 \begin_inset Flex Code
9442 status collapsed
9443
9444 \begin_layout Plain Layout
9445 PageStyle
9446 \end_layout
9447
9448 \end_inset
9449
9450  [
9451 \begin_inset Flex Code
9452 status collapsed
9453
9454 \begin_layout Plain Layout
9455 string="empty|plain|headings|fancy"
9456 \end_layout
9457
9458 \end_inset
9459
9460 ] The list of available page styles, separated by 
9461 \begin_inset Quotes eld
9462 \end_inset
9463
9464
9465 \begin_inset Flex Code
9466 status collapsed
9467
9468 \begin_layout Plain Layout
9469 |
9470 \end_layout
9471
9472 \end_inset
9473
9474
9475 \begin_inset Quotes erd
9476 \end_inset
9477
9478 .
9479 \end_layout
9480
9481 \begin_layout Description
9482 \begin_inset Flex Code
9483 status collapsed
9484
9485 \begin_layout Plain Layout
9486 Other
9487 \end_layout
9488
9489 \end_inset
9490
9491  [
9492 \begin_inset Flex Code
9493 status collapsed
9494
9495 \begin_layout Plain Layout
9496 string=""
9497 \end_layout
9498
9499 \end_inset
9500
9501 ] Some document class options, separated by a comma, that will be added
9502  to the optional part of the 
9503 \begin_inset Flex Code
9504 status collapsed
9505
9506 \begin_layout Plain Layout
9507
9508 \backslash
9509 documentclass
9510 \end_layout
9511
9512 \end_inset
9513
9514  command.
9515 \end_layout
9516
9517 \begin_layout Standard
9518 The 
9519 \begin_inset Flex Code
9520 status collapsed
9521
9522 \begin_layout Plain Layout
9523 ClassOptions
9524 \end_layout
9525
9526 \end_inset
9527
9528  section must end with 
9529 \begin_inset Quotes eld
9530 \end_inset
9531
9532
9533 \begin_inset Flex Code
9534 status collapsed
9535
9536 \begin_layout Plain Layout
9537 End
9538 \end_layout
9539
9540 \end_inset
9541
9542
9543 \begin_inset Quotes erd
9544 \end_inset
9545
9546 .
9547 \end_layout
9548
9549 \begin_layout Subsection
9550 Paragraph styles
9551 \begin_inset CommandInset label
9552 LatexCommand label
9553 name "sub:Paragraph-Styles"
9554
9555 \end_inset
9556
9557
9558 \end_layout
9559
9560 \begin_layout Standard
9561 A paragraph style description looks like this:
9562 \begin_inset Foot
9563 status collapsed
9564
9565 \begin_layout Plain Layout
9566 Note that this will either define a new style or modify an existing one.
9567 \end_layout
9568
9569 \end_inset
9570
9571
9572 \end_layout
9573
9574 \begin_layout LyX-Code
9575 Style 
9576 \family roman
9577 \emph on
9578 name
9579 \end_layout
9580
9581 \begin_layout LyX-Code
9582  ...
9583 \end_layout
9584
9585 \begin_layout LyX-Code
9586 End
9587 \end_layout
9588
9589 \begin_layout Standard
9590 where the following commands are allowed:
9591 \end_layout
9592
9593 \begin_layout Description
9594 \begin_inset Flex Code
9595 status collapsed
9596
9597 \begin_layout Plain Layout
9598 Align
9599 \end_layout
9600
9601 \end_inset
9602
9603  [
9604 \begin_inset Flex Code
9605 status collapsed
9606
9607 \begin_layout Plain Layout
9608
9609 \emph on
9610 block
9611 \emph default
9612 , left, right, center
9613 \end_layout
9614
9615 \end_inset
9616
9617 ] Paragraph alignment.
9618 \end_layout
9619
9620 \begin_layout Description
9621 \begin_inset Flex Code
9622 status collapsed
9623
9624 \begin_layout Plain Layout
9625 AlignPossible
9626 \end_layout
9627
9628 \end_inset
9629
9630  [
9631 \begin_inset Flex Code
9632 status collapsed
9633
9634 \begin_layout Plain Layout
9635
9636 \emph on
9637 block
9638 \emph default
9639 , left, right, center
9640 \end_layout
9641
9642 \end_inset
9643
9644 ] A comma separated list of permitted alignments.
9645  (Some LaTeX styles prohibit certain alignments, since those wouldn't make
9646  sense.
9647  For example a right-aligned or centered enumeration isn't possible.)
9648 \end_layout
9649
9650 \begin_layout Description
9651 \begin_inset Flex Code
9652 status collapsed
9653
9654 \begin_layout Plain Layout
9655 BabelPreamble
9656 \end_layout
9657
9658 \end_inset
9659
9660  Note that this will completely override any prior 
9661 \begin_inset Flex Code
9662 status collapsed
9663
9664 \begin_layout Plain Layout
9665 BabelPreamble
9666 \end_layout
9667
9668 \end_inset
9669
9670  declaration for this style.
9671  Must end with 
9672 \begin_inset Quotes eld
9673 \end_inset
9674
9675
9676 \begin_inset Flex Code
9677 status collapsed
9678
9679 \begin_layout Plain Layout
9680 EndBabelPreamble
9681 \end_layout
9682
9683 \end_inset
9684
9685
9686 \begin_inset Quotes erd
9687 \end_inset
9688
9689 .
9690  See section 
9691 \begin_inset CommandInset ref
9692 LatexCommand ref
9693 reference "sub:I18n"
9694
9695 \end_inset
9696
9697  for details on its use.
9698 \end_layout
9699
9700 \begin_layout Description
9701 \begin_inset Flex Code
9702 status collapsed
9703
9704 \begin_layout Plain Layout
9705 BottomSep
9706 \end_layout
9707
9708 \end_inset
9709
9710  [
9711 \begin_inset Flex Code
9712 status collapsed
9713
9714 \begin_layout Plain Layout
9715 float=0
9716 \end_layout
9717
9718 \end_inset
9719
9720 ]
9721 \begin_inset Foot
9722 status collapsed
9723
9724 \begin_layout Plain Layout
9725 Note that a `float' here is a real number, such as: 1.5.
9726 \end_layout
9727
9728 \end_inset
9729
9730  The vertical space with which the last of a chain of paragraphs with this
9731  style is separated from the following paragraph.
9732  If the next paragraph has another style, the separations are not simply
9733  added, but the maximum is taken.
9734 \end_layout
9735
9736 \begin_layout Description
9737 \begin_inset Flex Code
9738 status collapsed
9739
9740 \begin_layout Plain Layout
9741 Category
9742 \end_layout
9743
9744 \end_inset
9745
9746  
9747 \begin_inset Flex Code
9748 status collapsed
9749
9750 \begin_layout Plain Layout
9751 [string]
9752 \end_layout
9753
9754 \end_inset
9755
9756  The category for this style.
9757  This is used to group related styles in the style combobox on the toolbar.
9758  Any string can be used, but you may want to use existing categories with
9759  your own styles.
9760  
9761 \end_layout
9762
9763 \begin_layout Description
9764 \begin_inset Flex Code
9765 status collapsed
9766
9767 \begin_layout Plain Layout
9768 CommandDepth
9769 \end_layout
9770
9771 \end_inset
9772
9773  Depth of XML command.
9774  Used only with XML-type formats.
9775 \end_layout
9776
9777 \begin_layout Description
9778 \begin_inset Flex Code
9779 status collapsed
9780
9781 \begin_layout Plain Layout
9782 CopyStyle
9783 \end_layout
9784
9785 \end_inset
9786
9787  
9788 \begin_inset CommandInset label
9789 LatexCommand label
9790 name "des:CopyStyle"
9791
9792 \end_inset
9793
9794
9795 \begin_inset Flex Code
9796 status collapsed
9797
9798 \begin_layout Plain Layout
9799 [string]
9800 \end_layout
9801
9802 \end_inset
9803
9804  Copies all the features of an existing style into the current one.
9805  
9806 \end_layout
9807
9808 \begin_layout Description
9809 \begin_inset Flex Code
9810 status collapsed
9811
9812 \begin_layout Plain Layout
9813 DependsOn
9814 \end_layout
9815
9816 \end_inset
9817
9818  The name of a style whose preamble should be output 
9819 \emph on
9820 before
9821 \emph default
9822  this one.
9823  This allows to ensure some ordering of the preamble snippets when macros
9824  definitions depend on one another.
9825 \begin_inset Foot
9826 status collapsed
9827
9828 \begin_layout Plain Layout
9829 Note that, besides that functionality, there is no way to ensure any ordering
9830  of preambles.
9831  The ordering that you see in a given version of LyX may change without
9832  warning in later versions.
9833 \end_layout
9834
9835 \end_inset
9836
9837
9838 \end_layout
9839
9840 \begin_layout Description
9841 \begin_inset Flex Code
9842 status collapsed
9843
9844 \begin_layout Plain Layout
9845 EndLabeltype
9846 \end_layout
9847
9848 \end_inset
9849
9850  [
9851 \begin_inset Flex Code
9852 status collapsed
9853
9854 \begin_layout Plain Layout
9855
9856 \emph on
9857 No_Label
9858 \emph default
9859 , Box, Filled_Box, Static
9860 \end_layout
9861
9862 \end_inset
9863
9864 ] The type of label that stands at the end of the paragraph (or sequence
9865  of paragraphs if 
9866 \begin_inset Flex Code
9867 status collapsed
9868
9869 \begin_layout Plain Layout
9870 LatexType
9871 \end_layout
9872
9873 \end_inset
9874
9875  is 
9876 \begin_inset Flex Code
9877 status collapsed
9878
9879 \begin_layout Plain Layout
9880 Environment
9881 \end_layout
9882
9883 \end_inset
9884
9885
9886 \begin_inset Flex Code
9887 status collapsed
9888
9889 \begin_layout Plain Layout
9890 Item_Environment
9891 \end_layout
9892
9893 \end_inset
9894
9895  or 
9896 \begin_inset Flex Code
9897 status collapsed
9898
9899 \begin_layout Plain Layout
9900 List_Environment
9901 \end_layout
9902
9903 \end_inset
9904
9905 ).
9906  
9907 \begin_inset Flex Code
9908 status collapsed
9909
9910 \begin_layout Plain Layout
9911 No_Label
9912 \end_layout
9913
9914 \end_inset
9915
9916  means 
9917 \begin_inset Quotes eld
9918 \end_inset
9919
9920 nothing
9921 \begin_inset Quotes erd
9922 \end_inset
9923
9924
9925 \begin_inset Flex Code
9926 status collapsed
9927
9928 \begin_layout Plain Layout
9929 Box
9930 \end_layout
9931
9932 \end_inset
9933
9934  (resp.
9935 \begin_inset Flex Code
9936 status collapsed
9937
9938 \begin_layout Plain Layout
9939 \begin_inset space ~
9940 \end_inset
9941
9942 Filled_Box
9943 \end_layout
9944
9945 \end_inset
9946
9947 ) is a white (resp.
9948 \begin_inset space ~
9949 \end_inset
9950
9951 black) square suitable for end of proof markers, 
9952 \begin_inset Flex Code
9953 status collapsed
9954
9955 \begin_layout Plain Layout
9956 Static
9957 \end_layout
9958
9959 \end_inset
9960
9961  is an explicit text string.
9962 \end_layout
9963
9964 \begin_layout Description
9965 \begin_inset Flex Code
9966 status collapsed
9967
9968 \begin_layout Plain Layout
9969 EndLabelString
9970 \end_layout
9971
9972 \end_inset
9973
9974  [
9975 \begin_inset Flex Code
9976 status collapsed
9977
9978 \begin_layout Plain Layout
9979 string=""
9980 \end_layout
9981
9982 \end_inset
9983
9984 ] The string used for a label with a 
9985 \begin_inset Flex Code
9986 status collapsed
9987
9988 \begin_layout Plain Layout
9989 Static
9990 \end_layout
9991
9992 \end_inset
9993
9994  
9995 \begin_inset Flex Code
9996 status collapsed
9997
9998 \begin_layout Plain Layout
9999 EndLabelType
10000 \end_layout
10001
10002 \end_inset
10003
10004 .
10005  
10006 \end_layout
10007
10008 \begin_layout Description
10009 \begin_inset Flex Code
10010 status collapsed
10011
10012 \begin_layout Plain Layout
10013 Font
10014 \end_layout
10015
10016 \end_inset
10017
10018  The font used for both the text body 
10019 \emph on
10020 and
10021 \emph default
10022  the label.
10023  See section
10024 \begin_inset space ~
10025 \end_inset
10026
10027
10028 \begin_inset CommandInset ref
10029 LatexCommand ref
10030 reference "sub:Font-description"
10031
10032 \end_inset
10033
10034 .
10035  Note that defining this font automatically defines the 
10036 \begin_inset Flex Code
10037 status collapsed
10038
10039 \begin_layout Plain Layout
10040 LabelFont
10041 \end_layout
10042
10043 \end_inset
10044
10045  to the same value.
10046  So you should define this one first if you also want to define 
10047 \begin_inset Flex Code
10048 status collapsed
10049
10050 \begin_layout Plain Layout
10051 LabelFont
10052 \end_layout
10053
10054 \end_inset
10055
10056 .
10057 \end_layout
10058
10059 \begin_layout Description
10060 \begin_inset Flex Code
10061 status collapsed
10062
10063 \begin_layout Plain Layout
10064 FreeSpacing
10065 \end_layout
10066
10067 \end_inset
10068
10069  
10070 \begin_inset CommandInset label
10071 LatexCommand label
10072 name "des:FreeSpacing"
10073
10074 \end_inset
10075
10076 [
10077 \begin_inset Flex Code
10078 status collapsed
10079
10080 \begin_layout Plain Layout
10081
10082 \emph on
10083 0
10084 \end_layout
10085
10086 \end_inset
10087
10088
10089 \begin_inset Flex Code
10090 status collapsed
10091
10092 \begin_layout Plain Layout
10093 1
10094 \end_layout
10095
10096 \end_inset
10097
10098 ] Usually LyX doesn't allow you to insert more than one space between words,
10099  since a space is considered as the separation between two words, not a
10100  character or symbol of its own.
10101  This is a very fine thing but sometimes annoying, for example, when typing
10102  program code or plain LaTeX code.
10103  For this reason, 
10104 \begin_inset Flex Code
10105 status collapsed
10106
10107 \begin_layout Plain Layout
10108 FreeSpacing
10109 \end_layout
10110
10111 \end_inset
10112
10113  can be enabled.
10114  Note that LyX will create protected blanks for the additional blanks when
10115  in another mode than LaTeX-mode.
10116 \end_layout
10117
10118 \begin_layout Description
10119 \begin_inset Flex Code
10120 status collapsed
10121
10122 \begin_layout Plain Layout
10123 HTML*
10124 \end_layout
10125
10126 \end_inset
10127
10128  These tags are used with XHTML output.
10129  See 
10130 \begin_inset CommandInset ref
10131 LatexCommand ref
10132 reference "sub:Paragraph-Style-XHTML"
10133
10134 \end_inset
10135
10136 .
10137 \end_layout
10138
10139 \begin_layout Description
10140 \begin_inset Flex Code
10141 status collapsed
10142
10143 \begin_layout Plain Layout
10144 InnerTag
10145 \end_layout
10146
10147 \end_inset
10148
10149  [[FIXME]] (Used only with XML-type formats.)
10150 \end_layout
10151
10152 \begin_layout Description
10153 \begin_inset Flex Code
10154 status collapsed
10155
10156 \begin_layout Plain Layout
10157 InPreamble
10158 \end_layout
10159
10160 \end_inset
10161
10162  
10163 \begin_inset Flex Code
10164 status collapsed
10165
10166 \begin_layout Plain Layout
10167 [1, 0]
10168 \end_layout
10169
10170 \end_inset
10171
10172  If 1, marks the style as to be included in the document preamble rather
10173  than in the document body.
10174  This is useful for document classes that want such information as the title
10175  and author to appear in the preamble.
10176  Note that this works only for styles for which the 
10177 \begin_inset Flex Code
10178 status collapsed
10179
10180 \begin_layout Plain Layout
10181 LatexType
10182 \end_layout
10183
10184 \end_inset
10185
10186  is 
10187 \begin_inset Flex Code
10188 status collapsed
10189
10190 \begin_layout Plain Layout
10191 Command
10192 \end_layout
10193
10194 \end_inset
10195
10196  or 
10197 \begin_inset Flex Code
10198 status collapsed
10199
10200 \begin_layout Plain Layout
10201 Paragraph
10202 \end_layout
10203
10204 \end_inset
10205
10206 .
10207 \end_layout
10208
10209 \begin_layout Description
10210 \begin_inset Flex Code
10211 status collapsed
10212
10213 \begin_layout Plain Layout
10214 InTitle
10215 \end_layout
10216
10217 \end_inset
10218
10219  
10220 \begin_inset Flex Code
10221 status collapsed
10222
10223 \begin_layout Plain Layout
10224 [1, 0]
10225 \end_layout
10226
10227 \end_inset
10228
10229  If 1, marks the style as being part of a title block (see also the 
10230 \begin_inset Flex Code
10231 status collapsed
10232
10233 \begin_layout Plain Layout
10234 TitleLatexType
10235 \end_layout
10236
10237 \end_inset
10238
10239  and 
10240 \begin_inset Flex Code
10241 status collapsed
10242
10243 \begin_layout Plain Layout
10244 TitleLatexName
10245 \end_layout
10246
10247 \end_inset
10248
10249  global entries).
10250 \end_layout
10251
10252 \begin_layout Description
10253 \begin_inset Flex Code
10254 status collapsed
10255
10256 \begin_layout Plain Layout
10257 ItemSep
10258 \end_layout
10259
10260 \end_inset
10261
10262  [
10263 \begin_inset Flex Code
10264 status collapsed
10265
10266 \begin_layout Plain Layout
10267 float=0
10268 \end_layout
10269
10270 \end_inset
10271
10272 ] This provides extra space between paragraphs that have the same style.
10273  If you put other styles into an environment, each is separated with the
10274  environment's 
10275 \begin_inset Flex Code
10276 status collapsed
10277
10278 \begin_layout Plain Layout
10279 Parsep
10280 \end_layout
10281
10282 \end_inset
10283
10284 .
10285  But the whole items of the environment are additionally separated with
10286  this 
10287 \begin_inset Flex Code
10288 status collapsed
10289
10290 \begin_layout Plain Layout
10291 Itemsep
10292 \end_layout
10293
10294 \end_inset
10295
10296 .
10297  Note that this is a
10298 \emph on
10299  multiplier.
10300 \end_layout
10301
10302 \begin_layout Description
10303 \begin_inset Flex Code
10304 status collapsed
10305
10306 \begin_layout Plain Layout
10307 ItemTag
10308 \end_layout
10309
10310 \end_inset
10311
10312  [[FIXME]] (Used only with XML-type formats.)
10313 \end_layout
10314
10315 \begin_layout Description
10316 \begin_inset Flex Code
10317 status collapsed
10318
10319 \begin_layout Plain Layout
10320 KeepEmpty
10321 \end_layout
10322
10323 \end_inset
10324
10325  
10326 \begin_inset CommandInset label
10327 LatexCommand label
10328 name "des:KeepEmpty"
10329
10330 \end_inset
10331
10332 [
10333 \begin_inset Flex Code
10334 status collapsed
10335
10336 \begin_layout Plain Layout
10337
10338 \emph on
10339 0
10340 \end_layout
10341
10342 \end_inset
10343
10344
10345 \begin_inset Flex Code
10346 status collapsed
10347
10348 \begin_layout Plain Layout
10349 1
10350 \end_layout
10351
10352 \end_inset
10353
10354 ] Usually LyX does not allow you to leave a paragraph empty, since it would
10355  lead to empty LaTeX output.
10356  There are some cases where this could be desirable however: in a letter
10357  template, the required fields can be provided as empty fields, so that
10358  people do not forget them; in some special classes, a style can be used
10359  as some kind of break, which does not contain actual text.
10360 \end_layout
10361
10362 \begin_layout Description
10363 \begin_inset Flex Code
10364 status collapsed
10365
10366 \begin_layout Plain Layout
10367 LabelBottomsep
10368 \end_layout
10369
10370 \end_inset
10371
10372  [float=0] The vertical space between the label and the text body.
10373  Only used for labels that are above the text body (
10374 \begin_inset Flex Code
10375 status collapsed
10376
10377 \begin_layout Plain Layout
10378 Top_Environment
10379 \end_layout
10380
10381 \end_inset
10382
10383
10384 \begin_inset Flex Code
10385 status collapsed
10386
10387 \begin_layout Plain Layout
10388 Centered_Top_Environment
10389 \end_layout
10390
10391 \end_inset
10392
10393 ).
10394 \end_layout
10395
10396 \begin_layout Description
10397 \begin_inset Flex Code
10398 status collapsed
10399
10400 \begin_layout Plain Layout
10401 LabelCounter
10402 \end_layout
10403
10404 \end_inset
10405
10406  [
10407 \begin_inset Flex Code
10408 status collapsed
10409
10410 \begin_layout Plain Layout
10411 string=""
10412 \end_layout
10413
10414 \end_inset
10415
10416 ]
10417 \begin_inset Newline newline
10418 \end_inset
10419
10420 The name of the counter for automatic numbering.
10421  
10422 \begin_inset Newline newline
10423 \end_inset
10424
10425 This 
10426 \emph on
10427 must
10428 \emph default
10429  be given if 
10430 \begin_inset Flex Code
10431 status collapsed
10432
10433 \begin_layout Plain Layout
10434 LabelType
10435 \end_layout
10436
10437 \end_inset
10438
10439  is 
10440 \begin_inset Flex Code
10441 status collapsed
10442
10443 \begin_layout Plain Layout
10444 Counter
10445 \end_layout
10446
10447 \end_inset
10448
10449 .
10450  In that case, the counter will be stepped each time the style appears.
10451  
10452 \begin_inset Newline newline
10453 \end_inset
10454
10455 This 
10456 \emph on
10457 may
10458 \emph default
10459  also be given if 
10460 \begin_inset Flex Code
10461 status collapsed
10462
10463 \begin_layout Plain Layout
10464 LabelType
10465 \end_layout
10466
10467 \end_inset
10468
10469  is 
10470 \begin_inset Flex Code
10471 status collapsed
10472
10473 \begin_layout Plain Layout
10474 Enumerate
10475 \end_layout
10476
10477 \end_inset
10478
10479 , though this case is a bit complicated.
10480  Suppose you declare 
10481 \begin_inset Quotes eld
10482 \end_inset
10483
10484
10485 \begin_inset Flex Code
10486 status collapsed
10487
10488 \begin_layout Plain Layout
10489 LabelCounter myenum
10490 \end_layout
10491
10492 \end_inset
10493
10494
10495 \begin_inset Quotes erd
10496 \end_inset
10497
10498 .
10499  Then the actual counters used are 
10500 \begin_inset Flex Code
10501 status collapsed
10502
10503 \begin_layout Plain Layout
10504 myenumi
10505 \end_layout
10506
10507 \end_inset
10508
10509
10510 \begin_inset Flex Code
10511 status collapsed
10512
10513 \begin_layout Plain Layout
10514 myenumii
10515 \end_layout
10516
10517 \end_inset
10518
10519
10520 \begin_inset Flex Code
10521 status collapsed
10522
10523 \begin_layout Plain Layout
10524 myenumiii
10525 \end_layout
10526
10527 \end_inset
10528
10529 , and 
10530 \begin_inset Flex Code
10531 status collapsed
10532
10533 \begin_layout Plain Layout
10534 myenumiv
10535 \end_layout
10536
10537 \end_inset
10538
10539 , much as in LaTeX.
10540  These counters must all be declared separately.
10541 \begin_inset Newline newline
10542 \end_inset
10543
10544 See Section 
10545 \begin_inset CommandInset ref
10546 LatexCommand ref
10547 reference "sub:Counters"
10548
10549 \end_inset
10550
10551  for details on counters.
10552 \end_layout
10553
10554 \begin_layout Description
10555 \begin_inset Flex Code
10556 status collapsed
10557
10558 \begin_layout Plain Layout
10559 LabelFont
10560 \end_layout
10561
10562 \end_inset
10563
10564  The font used for the label.
10565  See section
10566 \begin_inset space ~
10567 \end_inset
10568
10569
10570 \begin_inset CommandInset ref
10571 LatexCommand ref
10572 reference "sub:Font-description"
10573
10574 \end_inset
10575
10576 .
10577 \end_layout
10578
10579 \begin_layout Description
10580 \begin_inset Flex Code
10581 status collapsed
10582
10583 \begin_layout Plain Layout
10584 LabelIndent
10585 \end_layout
10586
10587 \end_inset
10588
10589  Text that indicates how far a label should be indented.
10590 \end_layout
10591
10592 \begin_layout Description
10593 \begin_inset Flex Code
10594 status collapsed
10595
10596 \begin_layout Plain Layout
10597 Labelsep
10598 \end_layout
10599
10600 \end_inset
10601
10602  [
10603 \begin_inset Flex Code
10604 status collapsed
10605
10606 \begin_layout Plain Layout
10607 string=""
10608 \end_layout
10609
10610 \end_inset
10611
10612 ] The horizontal space between the label and the text body.
10613  Only used for labels that are not above the text body.
10614 \end_layout
10615
10616 \begin_layout Description
10617 \begin_inset Flex Code
10618 status collapsed
10619
10620 \begin_layout Plain Layout
10621 LabelString
10622 \end_layout
10623
10624 \end_inset
10625
10626  [
10627 \begin_inset Flex Code
10628 status collapsed
10629
10630 \begin_layout Plain Layout
10631 string=""
10632 \end_layout
10633
10634 \end_inset
10635
10636 ] The string used for a label with a 
10637 \begin_inset Flex Code
10638 status collapsed
10639
10640 \begin_layout Plain Layout
10641 Static
10642 \end_layout
10643
10644 \end_inset
10645
10646  labeltype.
10647  When 
10648 \begin_inset Flex Code
10649 status collapsed
10650
10651 \begin_layout Plain Layout
10652 LabelCounter
10653 \end_layout
10654
10655 \end_inset
10656
10657  is set, this string can be contain the special formatting commands described
10658  in Section 
10659 \begin_inset CommandInset ref
10660 LatexCommand ref
10661 reference "sub:Counters"
10662
10663 \end_inset
10664
10665 .
10666 \begin_inset Foot
10667 status collapsed
10668
10669 \begin_layout Plain Layout
10670 For the sake of backwards compatibility, the string 
10671 \begin_inset Flex Code
10672 status collapsed
10673
10674 \begin_layout Plain Layout
10675 @
10676 \emph on
10677 style-name
10678 \emph default
10679 @
10680 \end_layout
10681
10682 \end_inset
10683
10684  will be replaced by the expanded 
10685 \begin_inset Flex Code
10686 status collapsed
10687
10688 \begin_layout Plain Layout
10689 LabelString
10690 \end_layout
10691
10692 \end_inset
10693
10694  of style 
10695 \begin_inset Flex Code
10696 status collapsed
10697
10698 \begin_layout Plain Layout
10699
10700 \emph on
10701 style-name
10702 \end_layout
10703
10704 \end_inset
10705
10706 .
10707  This feature is now obsolete and should be replaced by the mechanisms of
10708  Section 
10709 \begin_inset CommandInset ref
10710 LatexCommand ref
10711 reference "sub:Counters"
10712
10713 \end_inset
10714
10715 .
10716 \end_layout
10717
10718 \end_inset
10719
10720
10721 \end_layout
10722
10723 \begin_layout Description
10724 \begin_inset Flex Code
10725 status collapsed
10726
10727 \begin_layout Plain Layout
10728 LabelStringAppendix
10729 \end_layout
10730
10731 \end_inset
10732
10733  [
10734 \begin_inset Flex Code
10735 status collapsed
10736
10737 \begin_layout Plain Layout
10738 string=""
10739 \end_layout
10740
10741 \end_inset
10742
10743 ] This is used inside the appendix instead of 
10744 \begin_inset Flex Code
10745 status collapsed
10746
10747 \begin_layout Plain Layout
10748 LabelString
10749 \end_layout
10750
10751 \end_inset
10752
10753 .
10754  Note that every 
10755 \begin_inset Flex Code
10756 status collapsed
10757
10758 \begin_layout Plain Layout
10759 LabelString
10760 \end_layout
10761
10762 \end_inset
10763
10764  statement resets 
10765 \begin_inset Flex Code
10766 status collapsed
10767
10768 \begin_layout Plain Layout
10769 LabelStringAppendix
10770 \end_layout
10771
10772 \end_inset
10773
10774  too.
10775 \end_layout
10776
10777 \begin_layout Description
10778 \begin_inset Flex Code
10779 status collapsed
10780
10781 \begin_layout Plain Layout
10782 LabelTag
10783 \end_layout
10784
10785 \end_inset
10786
10787  [FIXME] (Used only with XML-type formats.)
10788 \end_layout
10789
10790 \begin_layout Description
10791 \begin_inset Flex Code
10792 status collapsed
10793
10794 \begin_layout Plain Layout
10795 LabelType
10796 \end_layout
10797
10798 \end_inset
10799
10800  [
10801 \begin_inset Flex Code
10802 status collapsed
10803
10804 \begin_layout Plain Layout
10805
10806 \emph on
10807 No_Label
10808 \emph default
10809 , Manual, Static, Top_Environment, Centered_Top_Environment, Counter, Sensitive,
10810  Enumerate, Itemize, Bibliography
10811 \end_layout
10812
10813 \end_inset
10814
10815
10816 \end_layout
10817
10818 \begin_deeper
10819 \begin_layout Itemize
10820 \begin_inset Flex Code
10821 status collapsed
10822
10823 \begin_layout Plain Layout
10824 Manual
10825 \end_layout
10826
10827 \end_inset
10828
10829  means the label is the very first word (up to the first real blank).
10830  Use protected spaces (like
10831 \begin_inset space ~
10832 \end_inset
10833
10834 that one) if you want more than one word as the label.
10835  
10836 \end_layout
10837
10838 \begin_layout Itemize
10839 \begin_inset Flex Code
10840 status collapsed
10841
10842 \begin_layout Plain Layout
10843 Static
10844 \end_layout
10845
10846 \end_inset
10847
10848  means the label is simply whatever 
10849 \begin_inset Flex Code
10850 status collapsed
10851
10852 \begin_layout Plain Layout
10853 LabelString
10854 \end_layout
10855
10856 \end_inset
10857
10858  declares it to be.
10859  Note that this really is `static'.
10860 \end_layout
10861
10862 \begin_layout Itemize
10863 \begin_inset Flex Code
10864 status collapsed
10865
10866 \begin_layout Plain Layout
10867 Top_Environment
10868 \end_layout
10869
10870 \end_inset
10871
10872  and 
10873 \begin_inset Flex Code
10874 status collapsed
10875
10876 \begin_layout Plain Layout
10877 Centered_Top_Environment
10878 \end_layout
10879
10880 \end_inset
10881
10882  are special cases of 
10883 \begin_inset Flex Code
10884 status collapsed
10885
10886 \begin_layout Plain Layout
10887 Static
10888 \end_layout
10889
10890 \end_inset
10891
10892 .
10893  The label will be printed above the paragraph, but only at the top of an
10894  environment or the top of a chain of paragraphs with this style.
10895  This might be used with the 
10896 \begin_inset Flex MenuItem
10897 status collapsed
10898
10899 \begin_layout Plain Layout
10900 Abstract
10901 \end_layout
10902
10903 \end_inset
10904
10905  style, for example.
10906 \end_layout
10907
10908 \begin_layout Itemize
10909 \begin_inset Flex Code
10910 status collapsed
10911
10912 \begin_layout Plain Layout
10913 Sensitive
10914 \end_layout
10915
10916 \end_inset
10917
10918  is a special case for the caption-labels 
10919 \begin_inset Quotes eld
10920 \end_inset
10921
10922 Figure
10923 \begin_inset Quotes erd
10924 \end_inset
10925
10926  and 
10927 \begin_inset Quotes eld
10928 \end_inset
10929
10930 Table
10931 \begin_inset Quotes erd
10932 \end_inset
10933
10934 .
10935  
10936 \begin_inset Flex Code
10937 status collapsed
10938
10939 \begin_layout Plain Layout
10940 Sensitive
10941 \end_layout
10942
10943 \end_inset
10944
10945  means the (hardcoded) label string depends on the kind of float: It is
10946  hardcoded to be `FloatType N', where N is the value of the counter associated
10947  with the float.
10948 \end_layout
10949
10950 \begin_layout Itemize
10951 The 
10952 \begin_inset Flex Code
10953 status collapsed
10954
10955 \begin_layout Plain Layout
10956 Counter
10957 \end_layout
10958
10959 \end_inset
10960
10961  label type defines automatically numbered labels.
10962  The 
10963 \begin_inset Flex Code
10964 status collapsed
10965
10966 \begin_layout Plain Layout
10967 LabelString
10968 \end_layout
10969
10970 \end_inset
10971
10972  will be expanded to resolve any counter references it contains: For example,
10973  it might be 
10974 \begin_inset Quotes eld
10975 \end_inset
10976
10977
10978 \begin_inset Flex Code
10979 status collapsed
10980
10981 \begin_layout Plain Layout
10982 Section 
10983 \backslash
10984 thechapter.
10985 \backslash
10986 thesection
10987 \end_layout
10988
10989 \end_inset
10990
10991
10992 \begin_inset Quotes erd
10993 \end_inset
10994
10995 .
10996  See Section 
10997 \begin_inset CommandInset ref
10998 LatexCommand ref
10999 reference "sub:Counters"
11000
11001 \end_inset
11002
11003  for more information on counters.
11004 \end_layout
11005
11006 \begin_layout Itemize
11007 \begin_inset Flex Code
11008 status collapsed
11009
11010 \begin_layout Plain Layout
11011 Enumerate
11012 \end_layout
11013
11014 \end_inset
11015
11016  produces the usual sort of enumeration labels.
11017  At present, it is hardcoded to use Arabic numerals, lowercase letters,
11018  small Roman numerals, and uppercase letters for the four possible depths.
11019 \end_layout
11020
11021 \begin_layout Itemize
11022 \begin_inset Flex Code
11023 status collapsed
11024
11025 \begin_layout Plain Layout
11026 Itemize
11027 \end_layout
11028
11029 \end_inset
11030
11031  produces various bullets at the different levels.
11032  It is also hardcoded.
11033 \end_layout
11034
11035 \begin_layout Itemize
11036 \begin_inset Flex Code
11037 status collapsed
11038
11039 \begin_layout Plain Layout
11040 Bibliography
11041 \end_layout
11042
11043 \end_inset
11044
11045  is used internally by LyX and should be used only with 
11046 \begin_inset Flex Code
11047 status collapsed
11048
11049 \begin_layout Plain Layout
11050 LatexType BibEnvironment
11051 \end_layout
11052
11053 \end_inset
11054
11055 .
11056 \end_layout
11057
11058 \end_deeper
11059 \begin_layout Description
11060 \begin_inset Flex Code
11061 status collapsed
11062
11063 \begin_layout Plain Layout
11064 LangPreamble
11065 \end_layout
11066
11067 \end_inset
11068
11069  Note that this will completely override any prior 
11070 \begin_inset Flex Code
11071 status collapsed
11072
11073 \begin_layout Plain Layout
11074 LangPreamble
11075 \end_layout
11076
11077 \end_inset
11078
11079  declaration for this style.
11080  Must end with 
11081 \begin_inset Quotes eld
11082 \end_inset
11083
11084
11085 \begin_inset Flex Code
11086 status collapsed
11087
11088 \begin_layout Plain Layout
11089 EndLangPreamble
11090 \end_layout
11091
11092 \end_inset
11093
11094
11095 \begin_inset Quotes erd
11096 \end_inset
11097
11098 .
11099  See section 
11100 \begin_inset CommandInset ref
11101 LatexCommand ref
11102 reference "sub:I18n"
11103
11104 \end_inset
11105
11106  for details on its use.
11107 \end_layout
11108
11109 \begin_layout Description
11110 \begin_inset Flex Code
11111 status collapsed
11112
11113 \begin_layout Plain Layout
11114 LatexName
11115 \end_layout
11116
11117 \end_inset
11118
11119  The name of the corresponding LaTeX stuff.
11120  Either the environment or command name.
11121 \end_layout
11122
11123 \begin_layout Description
11124 \begin_inset Flex Code
11125 status collapsed
11126
11127 \begin_layout Plain Layout
11128 LatexParam
11129 \end_layout
11130
11131 \end_inset
11132
11133  An optional parameter for the corresponding 
11134 \begin_inset Flex Code
11135 status collapsed
11136
11137 \begin_layout Plain Layout
11138 LatexName
11139 \end_layout
11140
11141 \end_inset
11142
11143  stuff.
11144  This parameter cannot be changed from within LyX.
11145 \end_layout
11146
11147 \begin_layout Description
11148 \begin_inset Flex Code
11149 status collapsed
11150
11151 \begin_layout Plain Layout
11152 LatexType
11153 \end_layout
11154
11155 \end_inset
11156
11157  
11158 \begin_inset CommandInset label
11159 LatexCommand label
11160 name "des:LatexType"
11161
11162 \end_inset
11163
11164 [
11165 \begin_inset Flex Code
11166 status collapsed
11167
11168 \begin_layout Plain Layout
11169
11170 \emph on
11171 Paragraph
11172 \emph default
11173 , Command, Environment, Item_Environment,
11174 \end_layout
11175
11176 \end_inset
11177
11178  
11179 \begin_inset Flex Code
11180 status collapsed
11181
11182 \begin_layout Plain Layout
11183 List_Environment, Bib_Environment
11184 \end_layout
11185
11186 \end_inset
11187
11188 ] How the style should be translated into LaTeX.
11189 \begin_inset Foot
11190 status collapsed
11191
11192 \begin_layout Plain Layout
11193 \begin_inset Flex Code
11194 status collapsed
11195
11196 \begin_layout Plain Layout
11197 LatexType
11198 \end_layout
11199
11200 \end_inset
11201
11202  is perhaps a bit misleading, since these rules apply to SGML classes, too.
11203  Visit the SGML class files for specific examples.
11204 \end_layout
11205
11206 \end_inset
11207
11208
11209 \end_layout
11210
11211 \begin_deeper
11212 \begin_layout Itemize
11213 \begin_inset Flex Code
11214 status collapsed
11215
11216 \begin_layout Plain Layout
11217 Paragraph
11218 \end_layout
11219
11220 \end_inset
11221
11222  means nothing special.
11223  
11224 \end_layout
11225
11226 \begin_layout Itemize
11227 \begin_inset Flex Code
11228 status collapsed
11229
11230 \begin_layout Plain Layout
11231 Command
11232 \end_layout
11233
11234 \end_inset
11235
11236  means 
11237 \begin_inset Flex Code
11238 status collapsed
11239
11240 \begin_layout Plain Layout
11241
11242 \backslash
11243
11244 \emph on
11245 LatexName
11246 \emph default
11247 {\SpecialChar \ldots{}
11248 }
11249 \end_layout
11250
11251 \end_inset
11252
11253 .
11254 \end_layout
11255
11256 \begin_layout Itemize
11257 \begin_inset Flex Code
11258 status collapsed
11259
11260 \begin_layout Plain Layout
11261 Environment
11262 \end_layout
11263
11264 \end_inset
11265
11266  means 
11267 \begin_inset Flex Code
11268 status collapsed
11269
11270 \begin_layout Plain Layout
11271
11272 \backslash
11273 begin{
11274 \emph on
11275 LatexName
11276 \emph default
11277 }\SpecialChar \ldots{}
11278
11279 \backslash
11280 end{
11281 \emph on
11282 LatexName
11283 \emph default
11284 }
11285 \end_layout
11286
11287 \end_inset
11288
11289 .
11290  
11291 \end_layout
11292
11293 \begin_layout Itemize
11294 \begin_inset Flex Code
11295 status collapsed
11296
11297 \begin_layout Plain Layout
11298 Item_Environment
11299 \end_layout
11300
11301 \end_inset
11302
11303  is the same as 
11304 \begin_inset Flex Code
11305 status collapsed
11306
11307 \begin_layout Plain Layout
11308 Environment
11309 \end_layout
11310
11311 \end_inset
11312
11313 , except that an 
11314 \begin_inset Flex Code
11315 status collapsed
11316
11317 \begin_layout Plain Layout
11318
11319 \backslash
11320 item
11321 \end_layout
11322
11323 \end_inset
11324
11325  is generated for each paragraph of this environment.
11326  
11327 \end_layout
11328
11329 \begin_layout Itemize
11330 \begin_inset Flex Code
11331 status collapsed
11332
11333 \begin_layout Plain Layout
11334 List_Environment
11335 \end_layout
11336
11337 \end_inset
11338
11339  is the same as 
11340 \begin_inset Flex Code
11341 status collapsed
11342
11343 \begin_layout Plain Layout
11344 Item_Environment
11345 \end_layout
11346
11347 \end_inset
11348
11349 , except that 
11350 \begin_inset Flex Code
11351 status collapsed
11352
11353 \begin_layout Plain Layout
11354 LabelWidthString
11355 \end_layout
11356
11357 \end_inset
11358
11359  is passed as an argument to the environment.
11360  
11361 \begin_inset Flex Code
11362 status collapsed
11363
11364 \begin_layout Plain Layout
11365 LabelWidthString
11366 \end_layout
11367
11368 \end_inset
11369
11370  can be defined in the 
11371 \begin_inset Flex MenuItem
11372 status collapsed
11373
11374 \begin_layout Plain Layout
11375
11376 \bar under
11377 Edit
11378 \bar default
11379 \SpecialChar \menuseparator
11380
11381 \bar under
11382 P
11383 \bar default
11384 aragraph
11385 \begin_inset space ~
11386 \end_inset
11387
11388 settings
11389 \end_layout
11390
11391 \end_inset
11392
11393  dialog.
11394  
11395 \end_layout
11396
11397 \begin_layout Standard
11398 Putting the last few things together, the LaTeX output will be either: 
11399 \end_layout
11400
11401 \begin_layout LyX-Code
11402
11403 \backslash
11404 latexname[latexparam]{\SpecialChar \ldots{}
11405 }
11406 \end_layout
11407
11408 \begin_layout Standard
11409 or: 
11410 \end_layout
11411
11412 \begin_layout LyX-Code
11413
11414 \backslash
11415 begin{latexname}[latexparam] \SpecialChar \ldots{}
11416  
11417 \backslash
11418 end{latexname}.
11419 \end_layout
11420
11421 \begin_layout Standard
11422 depending upon the LaTeX type.
11423 \end_layout
11424
11425 \end_deeper
11426 \begin_layout Description
11427 \begin_inset Flex Code
11428 status collapsed
11429
11430 \begin_layout Plain Layout
11431 LeftMargin
11432 \end_layout
11433
11434 \end_inset
11435
11436  [
11437 \begin_inset Flex Code
11438 status collapsed
11439
11440 \begin_layout Plain Layout
11441 string=""
11442 \end_layout
11443
11444 \end_inset
11445
11446 ] If you put styles into environments, the leftmargins are not simply added,
11447  but added with a factor 
11448 \begin_inset Formula $\frac{4}{depth+4}$
11449 \end_inset
11450
11451 .
11452  Note that this parameter is also used when the margin is defined as 
11453 \begin_inset Flex Code
11454 status collapsed
11455
11456 \begin_layout Plain Layout
11457 Manual
11458 \end_layout
11459
11460 \end_inset
11461
11462  or 
11463 \begin_inset Flex Code
11464 status collapsed
11465
11466 \begin_layout Plain Layout
11467 Dynamic
11468 \end_layout
11469
11470 \end_inset
11471
11472 .
11473  Then it is added to the manual or dynamic margin.
11474  
11475 \begin_inset Newline newline
11476 \end_inset
11477
11478 The argument is passed as a string.
11479  For example 
11480 \begin_inset Quotes eld
11481 \end_inset
11482
11483
11484 \begin_inset Flex Code
11485 status collapsed
11486
11487 \begin_layout Plain Layout
11488 MM
11489 \end_layout
11490
11491 \end_inset
11492
11493
11494 \begin_inset Quotes erd
11495 \end_inset
11496
11497  means that the paragraph is indented with the width of 
11498 \begin_inset Quotes eld
11499 \end_inset
11500
11501
11502 \begin_inset Flex Code
11503 status collapsed
11504
11505 \begin_layout Plain Layout
11506 MM
11507 \end_layout
11508
11509 \end_inset
11510
11511
11512 \begin_inset Quotes erd
11513 \end_inset
11514
11515  in the normal font.
11516  You can get a negative width by prefixing the string with 
11517 \begin_inset Quotes eld
11518 \end_inset
11519
11520
11521 \begin_inset Flex Code
11522 status collapsed
11523
11524 \begin_layout Plain Layout
11525 -
11526 \end_layout
11527
11528 \end_inset
11529
11530
11531 \begin_inset Quotes erd
11532 \end_inset
11533
11534 .
11535  This way was chosen so that the look is the same with each used screen
11536  font.
11537  
11538 \end_layout
11539
11540 \begin_layout Description
11541 \begin_inset Flex Code
11542 status collapsed
11543
11544 \begin_layout Plain Layout
11545 Margin
11546 \end_layout
11547
11548 \end_inset
11549
11550  [
11551 \begin_inset Flex Code
11552 status collapsed
11553
11554 \begin_layout Plain Layout
11555
11556 \emph on
11557 Static
11558 \emph default
11559 , Manual, Dynamic, First_Dynamic, Right_Address_Box
11560 \end_layout
11561
11562 \end_inset
11563
11564
11565 \begin_inset Newline newline
11566 \end_inset
11567
11568 The kind of margin that the style has on the left side.
11569  
11570 \begin_inset Flex Code
11571 status collapsed
11572
11573 \begin_layout Plain Layout
11574 Static
11575 \end_layout
11576
11577 \end_inset
11578
11579  just means a fixed margin.
11580  
11581 \begin_inset Flex Code
11582 status collapsed
11583
11584 \begin_layout Plain Layout
11585 Manual
11586 \end_layout
11587
11588 \end_inset
11589
11590  means that the left margin depends on the string entered in the 
11591 \begin_inset Flex MenuItem
11592 status collapsed
11593
11594 \begin_layout Plain Layout
11595 Edit\SpecialChar \menuseparator
11596 Paragraph
11597 \begin_inset space ~
11598 \end_inset
11599
11600 Settings
11601 \end_layout
11602
11603 \end_inset
11604
11605  dialog.
11606  This is used to typeset nice lists without tabulators.
11607  
11608 \begin_inset Flex Code
11609 status collapsed
11610
11611 \begin_layout Plain Layout
11612 Dynamic
11613 \end_layout
11614
11615 \end_inset
11616
11617  means that the margin depends on the size of the label.
11618  This is used for automatic enumerated headlines.
11619  It is obvious that the headline 
11620 \begin_inset Quotes eld
11621 \end_inset
11622
11623 5.4.3.2.1 Very long headline
11624 \begin_inset Quotes erd
11625 \end_inset
11626
11627  must have a wider left margin (as wide as 
11628 \begin_inset Quotes eld
11629 \end_inset
11630
11631 5.4.3.2.1
11632 \begin_inset Quotes erd
11633 \end_inset
11634
11635  plus the space) than 
11636 \begin_inset Quotes eld
11637 \end_inset
11638
11639 3.2 Very long headline
11640 \begin_inset Quotes erd
11641 \end_inset
11642
11643 , even if standard 
11644 \begin_inset Quotes eld
11645 \end_inset
11646
11647 word processors
11648 \begin_inset Quotes erd
11649 \end_inset
11650
11651  are not able to do this.
11652  
11653 \begin_inset Flex Code
11654 status collapsed
11655
11656 \begin_layout Plain Layout
11657 First_Dynamic
11658 \end_layout
11659
11660 \end_inset
11661
11662  is similar, but only the very first row of the paragraph is dynamic, while
11663  the others are static; this is used, for example, for descriptions.
11664  
11665 \begin_inset Flex Code
11666 status collapsed
11667
11668 \begin_layout Plain Layout
11669 Right_Address_Box
11670 \end_layout
11671
11672 \end_inset
11673
11674  means the margin is chosen in a way that the longest row of this paragraph
11675  fits to the right margin.
11676  This is used to typeset an address on the right edge of the page.
11677 \end_layout
11678
11679 \begin_layout Description
11680 \begin_inset Flex Code
11681 status collapsed
11682
11683 \begin_layout Plain Layout
11684 NeedProtect
11685 \end_layout
11686
11687 \end_inset
11688
11689  [
11690 \begin_inset Flex Code
11691 status collapsed
11692
11693 \begin_layout Plain Layout
11694
11695 \emph on
11696 0
11697 \end_layout
11698
11699 \end_inset
11700
11701 ,
11702 \begin_inset Flex Code
11703 status collapsed
11704
11705 \begin_layout Plain Layout
11706 1
11707 \end_layout
11708
11709 \end_inset
11710
11711 ] Whether fragile commands in this style should be 
11712 \begin_inset Flex Code
11713 status collapsed
11714
11715 \begin_layout Plain Layout
11716
11717 \backslash
11718 protect
11719 \end_layout
11720
11721 \end_inset
11722
11723 'ed.
11724  (Note: This is 
11725 \emph on
11726 not
11727 \emph default
11728  whether this command should itself be protected.)
11729 \end_layout
11730
11731 \begin_layout Description
11732 \begin_inset Flex Code
11733 status collapsed
11734
11735 \begin_layout Plain Layout
11736 Newline
11737 \end_layout
11738
11739 \end_inset
11740
11741  [
11742 \begin_inset Flex Code
11743 status collapsed
11744
11745 \begin_layout Plain Layout
11746 0
11747 \end_layout
11748
11749 \end_inset
11750
11751
11752 \begin_inset Flex Code
11753 status collapsed
11754
11755 \begin_layout Plain Layout
11756
11757 \emph on
11758 1
11759 \end_layout
11760
11761 \end_inset
11762
11763 ] Whether newlines are translated into LaTeX newlines (
11764 \begin_inset Flex Code
11765 status collapsed
11766
11767 \begin_layout Plain Layout
11768
11769 \backslash
11770
11771 \backslash
11772
11773 \end_layout
11774
11775 \end_inset
11776
11777 ) or not.
11778  The translation can be switched off to allow more comfortable LaTeX editing
11779  inside LyX.
11780 \end_layout
11781
11782 \begin_layout Description
11783 \begin_inset Flex Code
11784 status collapsed
11785
11786 \begin_layout Plain Layout
11787 NextNoIndent
11788 \end_layout
11789
11790 \end_inset
11791
11792  [
11793 \begin_inset Flex Code
11794 status collapsed
11795
11796 \begin_layout Plain Layout
11797 1
11798 \end_layout
11799
11800 \end_inset
11801
11802
11803 \begin_inset Flex Code
11804 status collapsed
11805
11806 \begin_layout Plain Layout
11807
11808 \emph on
11809 0
11810 \end_layout
11811
11812 \end_inset
11813
11814 ] If set to true, and if 
11815 \begin_inset Flex Code
11816 status collapsed
11817
11818 \begin_layout Plain Layout
11819 DefaultStyle
11820 \end_layout
11821
11822 \end_inset
11823
11824  (usually 
11825 \begin_inset Flex Code
11826 status collapsed
11827
11828 \begin_layout Plain Layout
11829 Standard
11830 \end_layout
11831
11832 \end_inset
11833
11834 ) paragraphs are being indented, then the indentation of such a paragraph
11835  following one of this type will be suppressed.
11836  (So this will not affect the display of non-default paragraphs.)
11837 \end_layout
11838
11839 \begin_layout Description
11840 \begin_inset Flex Code
11841 status collapsed
11842
11843 \begin_layout Plain Layout
11844 ObsoletedBy
11845 \end_layout
11846
11847 \end_inset
11848
11849  Name of a style that has replaced this style.
11850  This is used to rename a style, while keeping backward compatibility.
11851 \end_layout
11852
11853 \begin_layout Description
11854 \begin_inset Flex Code
11855 status collapsed
11856
11857 \begin_layout Plain Layout
11858 OptionalArgs
11859 \end_layout
11860
11861 \end_inset
11862
11863  [
11864 \begin_inset Flex Code
11865 status collapsed
11866
11867 \begin_layout Plain Layout
11868 int=0
11869 \end_layout
11870
11871 \end_inset
11872
11873 ] The number of optional arguments that can be used with this style.
11874  This is useful for things like section headings, and only makes sense with
11875  LaTeX.
11876  Note that, on output, the optional arguments will all precede any required
11877  arguments (see below).
11878  So one can have constructs like:
11879 \end_layout
11880
11881 \begin_deeper
11882 \begin_layout LyX-Code
11883
11884 \backslash
11885 mycmd[opt1]{req1}{contents of paragraph}
11886 \end_layout
11887
11888 \begin_layout Standard
11889 but one cannot have things like: 
11890 \end_layout
11891
11892 \begin_layout LyX-Code
11893
11894 \backslash
11895 mycmd[opt1]{req1}[opt2]{contents of paragraph}
11896 \end_layout
11897
11898 \begin_layout Standard
11899 at least, not without ERT (with which you can have anything).
11900  
11901 \end_layout
11902
11903 \end_deeper
11904 \begin_layout Description
11905 \begin_inset Flex Code
11906 status collapsed
11907
11908 \begin_layout Plain Layout
11909 ParbreakIsNewline
11910 \end_layout
11911
11912 \end_inset
11913
11914
11915 \begin_inset CommandInset label
11916 LatexCommand label
11917 name "des:ParbreakIsNewline"
11918
11919 \end_inset
11920
11921  [
11922 \begin_inset Flex Code
11923 status collapsed
11924
11925 \begin_layout Plain Layout
11926
11927 \emph on
11928 0
11929 \end_layout
11930
11931 \end_inset
11932
11933
11934 \begin_inset Flex Code
11935 status collapsed
11936
11937 \begin_layout Plain Layout
11938 1
11939 \end_layout
11940
11941 \end_inset
11942
11943 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
11944  output, but only by a line break; together with 
11945 \begin_inset Flex Code
11946 status collapsed
11947
11948 \begin_layout Plain Layout
11949 PassThru 1
11950 \end_layout
11951
11952 \end_inset
11953
11954 , this allows to emulate a plain text editor (like the ERT inset).
11955 \end_layout
11956
11957 \begin_layout Description
11958 \begin_inset Flex Code
11959 status collapsed
11960
11961 \begin_layout Plain Layout
11962 ParIndent
11963 \end_layout
11964
11965 \end_inset
11966
11967  [
11968 \begin_inset Flex Code
11969 status collapsed
11970
11971 \begin_layout Plain Layout
11972 string=""
11973 \end_layout
11974
11975 \end_inset
11976
11977 ] The indent of the very first line of a paragraph.
11978  The 
11979 \begin_inset Flex Code
11980 status collapsed
11981
11982 \begin_layout Plain Layout
11983 Parindent
11984 \end_layout
11985
11986 \end_inset
11987
11988  will be fixed for a certain style.
11989  The exception is the default style, since the indentation for these paragraphs
11990  can be prohibited with 
11991 \begin_inset Flex Code
11992 status collapsed
11993
11994 \begin_layout Plain Layout
11995 NextNoIndent
11996 \end_layout
11997
11998 \end_inset
11999
12000 .
12001  Also, 
12002 \begin_inset Flex Code
12003 status collapsed
12004
12005 \begin_layout Plain Layout
12006 Standard
12007 \end_layout
12008
12009 \end_inset
12010
12011  style paragraphs inside environments use the 
12012 \begin_inset Flex Code
12013 status collapsed
12014
12015 \begin_layout Plain Layout
12016 Parindent
12017 \end_layout
12018
12019 \end_inset
12020
12021  of the environment, not their native one.
12022  For example, 
12023 \begin_inset Flex Code
12024 status collapsed
12025
12026 \begin_layout Plain Layout
12027 Standard
12028 \end_layout
12029
12030 \end_inset
12031
12032  paragraphs inside an enumeration are not indented.
12033 \end_layout
12034
12035 \begin_layout Description
12036 \begin_inset Flex Code
12037 status collapsed
12038
12039 \begin_layout Plain Layout
12040 Parsep
12041 \end_layout
12042
12043 \end_inset
12044
12045  [
12046 \begin_inset Flex Code
12047 status collapsed
12048
12049 \begin_layout Plain Layout
12050 float=0
12051 \end_layout
12052
12053 \end_inset
12054
12055 ] The vertical space between two paragraphs of this style.
12056 \end_layout
12057
12058 \begin_layout Description
12059 \begin_inset Flex Code
12060 status collapsed
12061
12062 \begin_layout Plain Layout
12063 Parskip
12064 \end_layout
12065
12066 \end_inset
12067
12068  [
12069 \begin_inset Flex Code
12070 status collapsed
12071
12072 \begin_layout Plain Layout
12073 float=0
12074 \end_layout
12075
12076 \end_inset
12077
12078 ] LyX allows the user to choose either 
12079 \begin_inset Quotes eld
12080 \end_inset
12081
12082 indent
12083 \begin_inset Quotes erd
12084 \end_inset
12085
12086  or 
12087 \begin_inset Quotes eld
12088 \end_inset
12089
12090 skip
12091 \begin_inset Quotes erd
12092 \end_inset
12093
12094  to typeset a document.
12095  When 
12096 \begin_inset Quotes eld
12097 \end_inset
12098
12099 indent
12100 \begin_inset Quotes erd
12101 \end_inset
12102
12103  is chosen, this value is completely ignored.
12104  When 
12105 \begin_inset Quotes eld
12106 \end_inset
12107
12108 skip
12109 \begin_inset Quotes erd
12110 \end_inset
12111
12112  is chosen, the parindent of a LaTeXtype 
12113 \begin_inset Quotes eld
12114 \end_inset
12115
12116 Paragraph
12117 \begin_inset Quotes erd
12118 \end_inset
12119
12120  style is ignored and all paragraphs are separated by this parskip argument.
12121  The vertical space is calculated with 
12122 \begin_inset Flex Code
12123 status collapsed
12124
12125 \begin_layout Plain Layout
12126 value
12127 \begin_inset space ~
12128 \end_inset
12129
12130 * DefaultHeight
12131 \end_layout
12132
12133 \end_inset
12134
12135  where 
12136 \begin_inset Flex Code
12137 status collapsed
12138
12139 \begin_layout Plain Layout
12140 DefaultHeight
12141 \end_layout
12142
12143 \end_inset
12144
12145  is the height of a row with the normal font.
12146  This way, the look stays the same with different screen fonts.
12147 \end_layout
12148
12149 \begin_layout Description
12150 \begin_inset Flex Code
12151 status collapsed
12152
12153 \begin_layout Plain Layout
12154 PassThru
12155 \end_layout
12156
12157 \end_inset
12158
12159  
12160 \begin_inset CommandInset label
12161 LatexCommand label
12162 name "des:PassThru"
12163
12164 \end_inset
12165
12166 [
12167 \begin_inset Flex Code
12168 status collapsed
12169
12170 \begin_layout Plain Layout
12171
12172 \emph on
12173 0
12174 \end_layout
12175
12176 \end_inset
12177
12178
12179 \begin_inset Flex Code
12180 status collapsed
12181
12182 \begin_layout Plain Layout
12183 1
12184 \end_layout
12185
12186 \end_inset
12187
12188 ] Whether the contents of this paragraph should be output in raw form, meaning
12189  without special translations that LaTeX would require.
12190 \end_layout
12191
12192 \begin_layout Description
12193 \begin_inset Flex Code
12194 status collapsed
12195
12196 \begin_layout Plain Layout
12197 Preamble
12198 \end_layout
12199
12200 \end_inset
12201
12202  
12203 \begin_inset CommandInset label
12204 LatexCommand label
12205 name "des:Preamble"
12206
12207 \end_inset
12208
12209 Information to be included in the LaTeX preamble when this style is used.
12210  Used to define macros, load packages, etc., required by this particular
12211  style.
12212  Must end with 
12213 \begin_inset Quotes eld
12214 \end_inset
12215
12216
12217 \begin_inset Flex Code
12218 status collapsed
12219
12220 \begin_layout Plain Layout
12221 EndPreamble
12222 \end_layout
12223
12224 \end_inset
12225
12226
12227 \begin_inset Quotes erd
12228 \end_inset
12229
12230 .
12231 \end_layout
12232
12233 \begin_layout Description
12234 \begin_inset Flex Code
12235 status collapsed
12236
12237 \begin_layout Plain Layout
12238 RefPrefix
12239 \end_layout
12240
12241 \end_inset
12242
12243  [
12244 \begin_inset Flex Code
12245 status collapsed
12246
12247 \begin_layout Plain Layout
12248 string
12249 \end_layout
12250
12251 \end_inset
12252
12253 ] The prefix to use when creating labels referring to paragraphs of this
12254  type.
12255  This allows the use of formatted references.
12256 \end_layout
12257
12258 \begin_layout Description
12259 \begin_inset Flex Code
12260 status collapsed
12261
12262 \begin_layout Plain Layout
12263 RequiredArgs
12264 \end_layout
12265
12266 \end_inset
12267
12268  [
12269 \begin_inset Flex Code
12270 status collapsed
12271
12272 \begin_layout Plain Layout
12273 int=0
12274 \end_layout
12275
12276 \end_inset
12277
12278 ] The number of required arguments that the LaTeX command or environment
12279  corresponding to this style expects.
12280  In the case of a command, these are required arguments 
12281 \emph on
12282 other than
12283 \emph default
12284  that associated with the content of the paragraph itself.
12285  These do not actually have to be provided: LyX will output empty arguments
12286  if necessary.
12287  Note that optional arguments will be output before required arguments.
12288  See the discussion of the 
12289 \begin_inset Flex Code
12290 status collapsed
12291
12292 \begin_layout Plain Layout
12293 OptionalArgs
12294 \end_layout
12295
12296 \end_inset
12297
12298  tag above for more information.
12299 \end_layout
12300
12301 \begin_layout Description
12302 \begin_inset Flex Code
12303 status collapsed
12304
12305 \begin_layout Plain Layout
12306 Requires 
12307 \end_layout
12308
12309 \end_inset
12310
12311  [
12312 \begin_inset Flex Code
12313 status collapsed
12314
12315 \begin_layout Plain Layout
12316 string
12317 \end_layout
12318
12319 \end_inset
12320
12321
12322 \begin_inset CommandInset label
12323 LatexCommand label
12324 name "des:Requires"
12325
12326 \end_inset
12327
12328 Whether the style requires the feature 
12329 \begin_inset Flex Code
12330 status collapsed
12331
12332 \begin_layout Plain Layout
12333 string
12334 \end_layout
12335
12336 \end_inset
12337
12338 .
12339  See the description of 
12340 \begin_inset Flex Code
12341 status collapsed
12342
12343 \begin_layout Plain Layout
12344 Provides
12345 \end_layout
12346
12347 \end_inset
12348
12349  above (page 
12350 \begin_inset CommandInset ref
12351 LatexCommand pageref
12352 reference "des:FreeSpacing"
12353
12354 \end_inset
12355
12356 ) for information on `features'.
12357  
12358 \end_layout
12359
12360 \begin_layout Description
12361 \begin_inset Flex Code
12362 status collapsed
12363
12364 \begin_layout Plain Layout
12365 RightMargin
12366 \end_layout
12367
12368 \end_inset
12369
12370  [
12371 \begin_inset Flex Code
12372 status collapsed
12373
12374 \begin_layout Plain Layout
12375 string=""
12376 \end_layout
12377
12378 \end_inset
12379
12380 ] Similar to 
12381 \begin_inset Flex Code
12382 status collapsed
12383
12384 \begin_layout Plain Layout
12385 LeftMargin
12386 \end_layout
12387
12388 \end_inset
12389
12390 .
12391 \end_layout
12392
12393 \begin_layout Description
12394 \begin_inset Flex Code
12395 status collapsed
12396
12397 \begin_layout Plain Layout
12398 Spacing
12399 \end_layout
12400
12401 \end_inset
12402
12403  [
12404 \begin_inset Flex Code
12405 status collapsed
12406
12407 \begin_layout Plain Layout
12408
12409 \emph on
12410 single
12411 \emph default
12412 , onehalf, double, other
12413 \end_layout
12414
12415 \end_inset
12416
12417  
12418 \emph on
12419 value
12420 \emph default
12421 ] This defines what the default spacing should be in the style.
12422  The arguments 
12423 \begin_inset Flex Code
12424 status collapsed
12425
12426 \begin_layout Plain Layout
12427 single
12428 \end_layout
12429
12430 \end_inset
12431
12432
12433 \begin_inset Flex Code
12434 status collapsed
12435
12436 \begin_layout Plain Layout
12437 onehalf
12438 \end_layout
12439
12440 \end_inset
12441
12442  and 
12443 \begin_inset Flex Code
12444 status collapsed
12445
12446 \begin_layout Plain Layout
12447 double
12448 \end_layout
12449
12450 \end_inset
12451
12452  correspond respectively to a multiplier value of 1, 1.25 and 1.667.
12453  If you specify the argument 
12454 \begin_inset Flex Code
12455 status collapsed
12456
12457 \begin_layout Plain Layout
12458 other
12459 \end_layout
12460
12461 \end_inset
12462
12463 , then you should also provide a numerical argument which will be the actual
12464  multiplier value.
12465  Note that, contrary to other parameters, 
12466 \begin_inset Flex Code
12467 status collapsed
12468
12469 \begin_layout Plain Layout
12470 Spacing
12471 \end_layout
12472
12473 \end_inset
12474
12475  implies the generation of specific LaTeX code, using the package 
12476 \family roman
12477
12478 \begin_inset Flex Code
12479 status collapsed
12480
12481 \begin_layout Plain Layout
12482 setspace.sty
12483 \end_layout
12484
12485 \end_inset
12486
12487 .
12488 \end_layout
12489
12490 \begin_layout Description
12491 \begin_inset Flex Code
12492 status collapsed
12493
12494 \begin_layout Plain Layout
12495 Spellcheck
12496 \end_layout
12497
12498 \end_inset
12499
12500  [
12501 \begin_inset Flex Code
12502 status collapsed
12503
12504 \begin_layout Plain Layout
12505 0
12506 \end_layout
12507
12508 \end_inset
12509
12510 ,
12511 \begin_inset Flex Code
12512 status collapsed
12513
12514 \begin_layout Plain Layout
12515
12516 \emph on
12517 1
12518 \end_layout
12519
12520 \end_inset
12521
12522 ] Spellcheck paragraphs of this style.
12523  Default is true.
12524 \end_layout
12525
12526 \begin_layout Description
12527 \begin_inset Flex Code
12528 status collapsed
12529
12530 \begin_layout Plain Layout
12531 TextFont
12532 \end_layout
12533
12534 \end_inset
12535
12536  The font used for the text body .
12537  See section 
12538 \begin_inset CommandInset ref
12539 LatexCommand ref
12540 reference "sub:Font-description"
12541
12542 \end_inset
12543
12544 .
12545 \end_layout
12546
12547 \begin_layout Description
12548 \begin_inset Flex Code
12549 status collapsed
12550
12551 \begin_layout Plain Layout
12552 TocLevel
12553 \end_layout
12554
12555 \end_inset
12556
12557
12558 \series medium
12559  
12560 \begin_inset Flex Code
12561 status collapsed
12562
12563 \begin_layout Plain Layout
12564
12565 \series medium
12566 [int]
12567 \end_layout
12568
12569 \end_inset
12570
12571
12572 \series default
12573  The level of the style in the table of contents.
12574  This is used for automatic numbering of section headings.
12575 \end_layout
12576
12577 \begin_layout Description
12578 \begin_inset Flex Code
12579 status collapsed
12580
12581 \begin_layout Plain Layout
12582 TopSep
12583 \end_layout
12584
12585 \end_inset
12586
12587  [
12588 \begin_inset Flex Code
12589 status collapsed
12590
12591 \begin_layout Plain Layout
12592 float=0
12593 \end_layout
12594
12595 \end_inset
12596
12597 ] The vertical space with which the very first of a chain of paragraphs
12598  with this style is separated from the previous paragraph.
12599  If the previous paragraph has another style, the separations are not simply
12600  added, but the maximum is taken.
12601 \end_layout
12602
12603 \begin_layout Subsection
12604 \begin_inset CommandInset label
12605 LatexCommand label
12606 name "sub:I18n"
12607
12608 \end_inset
12609
12610 Internationalization of Paragraph Styles
12611 \end_layout
12612
12613 \begin_layout Standard
12614 LyX has long supported internationalization of layout information, but,
12615  until version 2.0, this applied only to the user interface and not to, say,
12616  PDF output.
12617  Thus, French authors were forced to resort to ugly hacks if they wanted
12618  `
12619 \lang french
12620 Théorème
12621 \lang english
12622  1' instead of `Theorem 1'.
12623  Thanks to Georg Baum, that is no longer the case.
12624 \end_layout
12625
12626 \begin_layout Standard
12627 If a 
12628 \begin_inset Flex Code
12629 status collapsed
12630
12631 \begin_layout Plain Layout
12632 Style
12633 \end_layout
12634
12635 \end_inset
12636
12637  defines text that is to appear in the typeset document, it may use 
12638 \begin_inset Flex Code
12639 status collapsed
12640
12641 \begin_layout Plain Layout
12642 LangPreamble
12643 \end_layout
12644
12645 \end_inset
12646
12647  and 
12648 \begin_inset Flex Code
12649 status collapsed
12650
12651 \begin_layout Plain Layout
12652 BabelPreamble
12653 \end_layout
12654
12655 \end_inset
12656
12657  to support non-English and even multi-language documents correctly.
12658  The following excerpt (from the 
12659 \begin_inset Flex Code
12660 status collapsed
12661
12662 \begin_layout Plain Layout
12663 theorems-ams.inc
12664 \end_layout
12665
12666 \end_inset
12667
12668  file) shows how this works:
12669 \end_layout
12670
12671 \begin_layout LyX-Code
12672 Preamble
12673 \end_layout
12674
12675 \begin_deeper
12676 \begin_layout LyX-Code
12677   
12678 \backslash
12679 theoremstyle{remark}
12680 \end_layout
12681
12682 \begin_layout LyX-Code
12683   
12684 \backslash
12685 newtheorem{claim}[thm]{
12686 \backslash
12687 protect
12688 \backslash
12689 claimname}
12690 \end_layout
12691
12692 \begin_layout LyX-Code
12693 EndPreamble
12694 \end_layout
12695
12696 \begin_layout LyX-Code
12697 LangPreamble
12698 \end_layout
12699
12700 \begin_layout LyX-Code
12701   
12702 \backslash
12703 providecommand{
12704 \backslash
12705 claimname}{_(Claim)}
12706 \end_layout
12707
12708 \begin_layout LyX-Code
12709 EndLangPreamble
12710 \end_layout
12711
12712 \begin_layout LyX-Code
12713 BabelPreamble
12714 \end_layout
12715
12716 \begin_layout LyX-Code
12717     
12718 \backslash
12719 addto
12720 \backslash
12721 captions$$lang{
12722 \backslash
12723 renewcommand{
12724 \backslash
12725 claimname}{_(Claim)}}
12726 \end_layout
12727
12728 \begin_layout LyX-Code
12729 EndBabelPreamble
12730 \end_layout
12731
12732 \end_deeper
12733 \begin_layout Standard
12734 In principle, any legal LaTeX may appear in the 
12735 \begin_inset Flex Code
12736 status collapsed
12737
12738 \begin_layout Plain Layout
12739 LangPreamble
12740 \end_layout
12741
12742 \end_inset
12743
12744  and 
12745 \begin_inset Flex Code
12746 status collapsed
12747
12748 \begin_layout Plain Layout
12749 BabelPreamble
12750 \end_layout
12751
12752 \end_inset
12753
12754  tags, but in practice they will typically look as they do here.
12755  The key to correct translation of the typeset text is the definition of
12756  the LaTeX command 
12757 \begin_inset Flex Code
12758 status collapsed
12759
12760 \begin_layout Plain Layout
12761
12762 \backslash
12763 claimname
12764 \end_layout
12765
12766 \end_inset
12767
12768  and its use in 
12769 \begin_inset Flex Code
12770 status collapsed
12771
12772 \begin_layout Plain Layout
12773
12774 \backslash
12775 newtheorem
12776 \end_layout
12777
12778 \end_inset
12779
12780 .
12781  
12782 \end_layout
12783
12784 \begin_layout Standard
12785 The 
12786 \begin_inset Flex Code
12787 status collapsed
12788
12789 \begin_layout Plain Layout
12790 LangPreamble
12791 \end_layout
12792
12793 \end_inset
12794
12795  tag provides for internationalization based upon the overall language of
12796  the document.
12797  The contents of the tag will be included in the preamble, just as with
12798  the 
12799 \begin_inset Flex Code
12800 status collapsed
12801
12802 \begin_layout Plain Layout
12803 Preamble
12804 \end_layout
12805
12806 \end_inset
12807
12808  tag.
12809  What makes it special is the use of the 
12810 \begin_inset Quotes eld
12811 \end_inset
12812
12813 function
12814 \begin_inset Quotes erd
12815 \end_inset
12816
12817  
12818 \begin_inset Flex Code
12819 status collapsed
12820
12821 \begin_layout Plain Layout
12822 _()
12823 \end_layout
12824
12825 \end_inset
12826
12827 , which will be replaced, when LyX produces LaTeX output, with the translation
12828  of its argument into the document language.
12829 \end_layout
12830
12831 \begin_layout Standard
12832 The 
12833 \begin_inset Flex Code
12834 status collapsed
12835
12836 \begin_layout Plain Layout
12837 BabelPreamble
12838 \end_layout
12839
12840 \end_inset
12841
12842  tag is more complex, since it is meant to provide support for multi-language
12843  documents and so offers an interface to the 
12844 \begin_inset Flex Code
12845 status collapsed
12846
12847 \begin_layout Plain Layout
12848 babel
12849 \end_layout
12850
12851 \end_inset
12852
12853  package.
12854  Its contents will be added to the preamble once for each language that
12855  appears in the document.
12856  In this case, the argument to 
12857 \begin_inset Flex Code
12858 status collapsed
12859
12860 \begin_layout Plain Layout
12861 _()
12862 \end_layout
12863
12864 \end_inset
12865
12866  will be replaced with its translation into the language in question; the
12867  expression 
12868 \begin_inset Flex Code
12869 status collapsed
12870
12871 \begin_layout Plain Layout
12872 $$lang
12873 \end_layout
12874
12875 \end_inset
12876
12877  is replaced by the language name (as used by the babel package).
12878 \end_layout
12879
12880 \begin_layout Standard
12881 A German document that also included a French section would thus have the
12882  following in the preamble:
12883 \end_layout
12884
12885 \begin_layout LyX-Code
12886
12887 \backslash
12888 addto
12889 \backslash
12890 captionsfrench{
12891 \backslash
12892 renewcommand{
12893 \backslash
12894 claimname}{Affirmation}}   
12895 \backslash
12896 addto
12897 \backslash
12898 captionsngerman{
12899 \backslash
12900 renewcommand{
12901 \backslash
12902 claimname}{Behauptung}}   
12903 \backslash
12904 providecommand{
12905 \backslash
12906 claimname}{Behauptung}
12907 \end_layout
12908
12909 \begin_layout Standard
12910 LaTeX and 
12911 \begin_inset Flex Code
12912 status collapsed
12913
12914 \begin_layout Plain Layout
12915 babel
12916 \end_layout
12917
12918 \end_inset
12919
12920  will then conspire to produce the correct text in the output.
12921 \end_layout
12922
12923 \begin_layout Standard
12924 One important point to note here is that the translations are provided by
12925  LyX itself, through the same mechanism it uses for internationalization
12926  of the user interface.
12927  This means, in effect, that 
12928 \begin_inset Flex Code
12929 status collapsed
12930
12931 \begin_layout Plain Layout
12932 LangPreamble
12933 \end_layout
12934
12935 \end_inset
12936
12937  and 
12938 \begin_inset Flex Code
12939 status collapsed
12940
12941 \begin_layout Plain Layout
12942 BabelPreamble
12943 \end_layout
12944
12945 \end_inset
12946
12947  are really only of use in layout files that are provided with LyX, since
12948  text entered in user-created layout files will not be seen by LyX's internation
12949 alization routines.
12950  That said, however, any layout created with the intention that it will
12951  be included with LyX should use these tags where appropriate.
12952 \end_layout
12953
12954 \begin_layout Subsection
12955 Floats
12956 \begin_inset CommandInset label
12957 LatexCommand label
12958 name "sub:Floats"
12959
12960 \end_inset
12961
12962
12963 \end_layout
12964
12965 \begin_layout Standard
12966 Since version 1.3.0 of LyX, it is has been both possible and necessary to
12967  define the floats (
12968 \begin_inset Flex MenuItem
12969 status collapsed
12970
12971 \begin_layout Plain Layout
12972 figure
12973 \end_layout
12974
12975 \end_inset
12976
12977
12978 \begin_inset Flex MenuItem
12979 status collapsed
12980
12981 \begin_layout Plain Layout
12982 table
12983 \end_layout
12984
12985 \end_inset
12986
12987 , \SpecialChar \ldots{}
12988 ) in the text class itself.
12989  Standard floats are included in the file 
12990 \begin_inset Flex Code
12991 status collapsed
12992
12993 \begin_layout Plain Layout
12994 stdfloats.inc
12995 \end_layout
12996
12997 \end_inset
12998
12999 , so you may have to do no more than add
13000 \end_layout
13001
13002 \begin_layout LyX-Code
13003 Input stdfloats.inc
13004 \end_layout
13005
13006 \begin_layout Standard
13007 to your layout file.
13008  If you want to implement a text class that proposes some other float types
13009  (like the AGU class bundled with LyX), the information below will hopefully
13010  help you:
13011 \end_layout
13012
13013 \begin_layout Description
13014 \begin_inset Flex Code
13015 status collapsed
13016
13017 \begin_layout Plain Layout
13018 Extension
13019 \end_layout
13020
13021 \end_inset
13022
13023  [
13024 \begin_inset Flex Code
13025 status collapsed
13026
13027 \begin_layout Plain Layout
13028 string
13029 \end_layout
13030
13031 \end_inset
13032
13033 =
13034 \begin_inset Quotes erd
13035 \end_inset
13036
13037
13038 \begin_inset Quotes erd
13039 \end_inset
13040
13041 ] The file name extension of an auxiliary file for the list of figures (or
13042  whatever).
13043  LaTeX writes the captions to this file.
13044 \end_layout
13045
13046 \begin_layout Description
13047 \begin_inset Flex Code
13048 status collapsed
13049
13050 \begin_layout Plain Layout
13051 GuiName
13052 \end_layout
13053
13054 \end_inset
13055
13056  [
13057 \begin_inset Flex Code
13058 status collapsed
13059
13060 \begin_layout Plain Layout
13061 string
13062 \end_layout
13063
13064 \end_inset
13065
13066 =
13067 \begin_inset Quotes erd
13068 \end_inset
13069
13070
13071 \begin_inset Quotes erd
13072 \end_inset
13073
13074 ] The string that will be used in the menus and also for the caption.
13075  This is translated to the current language if babel is used.
13076 \end_layout
13077
13078 \begin_layout Description
13079 \begin_inset Flex Code
13080 status collapsed
13081
13082 \begin_layout Plain Layout
13083 HTML*
13084 \end_layout
13085
13086 \end_inset
13087
13088  These are used for XHTML output.
13089  See 
13090 \begin_inset CommandInset ref
13091 LatexCommand ref
13092 reference "sec:Tags-for-XHTML"
13093
13094 \end_inset
13095
13096 .
13097 \end_layout
13098
13099 \begin_layout Description
13100 \begin_inset Flex Code
13101 status collapsed
13102
13103 \begin_layout Plain Layout
13104 IsPredefined
13105 \end_layout
13106
13107 \end_inset
13108
13109  [
13110 \emph on
13111
13112 \begin_inset Flex Code
13113 status open
13114
13115 \begin_layout Plain Layout
13116 0
13117 \end_layout
13118
13119 \end_inset
13120
13121
13122 \emph default
13123
13124 \begin_inset Flex Code
13125 status collapsed
13126
13127 \begin_layout Plain Layout
13128 1
13129 \end_layout
13130
13131 \end_inset
13132
13133 ] Indicates whether the float is already defined in the document class or
13134  if we instead need to load 
13135 \begin_inset Flex Code
13136 status collapsed
13137
13138 \begin_layout Plain Layout
13139 float.sty
13140 \end_layout
13141
13142 \end_inset
13143
13144  and use what it provides to define it on-the-fly.
13145  The default is 
13146 \begin_inset Flex Code
13147 status collapsed
13148
13149 \begin_layout Plain Layout
13150 0
13151 \end_layout
13152
13153 \end_inset
13154
13155 , which means: use 
13156 \begin_inset Flex Code
13157 status collapsed
13158
13159 \begin_layout Plain Layout
13160 float.sty
13161 \end_layout
13162
13163 \end_inset
13164
13165 .
13166  It should be set to 
13167 \begin_inset Flex Code
13168 status collapsed
13169
13170 \begin_layout Plain Layout
13171 1
13172 \end_layout
13173
13174 \end_inset
13175
13176  if the float is already defined by the LaTeX document class.
13177 \end_layout
13178
13179 \begin_layout Description
13180 \begin_inset Flex Code
13181 status collapsed
13182
13183 \begin_layout Plain Layout
13184 ListCommand
13185 \end_layout
13186
13187 \end_inset
13188
13189  [
13190 \begin_inset Flex Code
13191 status collapsed
13192
13193 \begin_layout Plain Layout
13194 string
13195 \end_layout
13196
13197 \end_inset
13198
13199 =
13200 \begin_inset Quotes erd
13201 \end_inset
13202
13203
13204 \begin_inset Quotes erd
13205 \end_inset
13206
13207 ] The command used to generate a list of floats of this type; the leading
13208  `
13209 \backslash
13210 ' should be omitted.
13211  This 
13212 \emph on
13213 must
13214 \emph default
13215  be given if 
13216 \begin_inset Flex Code
13217 status collapsed
13218
13219 \begin_layout Plain Layout
13220 UsesFloatPkg
13221 \end_layout
13222
13223 \end_inset
13224
13225  is false, since there is no standard way to generate this command.
13226  It is ignored if 
13227 \begin_inset Flex Code
13228 status collapsed
13229
13230 \begin_layout Plain Layout
13231 UsesFloatPkg
13232 \end_layout
13233
13234 \end_inset
13235
13236  is true, since in that case there is a standard way to define the command.
13237 \end_layout
13238
13239 \begin_layout Description
13240 \begin_inset Flex Code
13241 status collapsed
13242
13243 \begin_layout Plain Layout
13244 ListName
13245 \end_layout
13246
13247 \end_inset
13248
13249  [
13250 \begin_inset Flex Code
13251 status collapsed
13252
13253 \begin_layout Plain Layout
13254 string
13255 \end_layout
13256
13257 \end_inset
13258
13259 =
13260 \begin_inset Quotes erd
13261 \end_inset
13262
13263
13264 \begin_inset Quotes erd
13265 \end_inset
13266
13267 ] A title for a list of floats of this kind (list of figures, tables, or
13268  whatever).
13269  It is used for the screen label within LyX; it is passed to LaTeX for use
13270  as the title there; and it is used as the title in XHTML output.
13271  It will be translated to the document language.
13272 \end_layout
13273
13274 \begin_layout Description
13275 \begin_inset Flex Code
13276 status collapsed
13277
13278 \begin_layout Plain Layout
13279 NumberWithin
13280 \end_layout
13281
13282 \end_inset
13283
13284  [
13285 \begin_inset Flex Code
13286 status collapsed
13287
13288 \begin_layout Plain Layout
13289 string
13290 \end_layout
13291
13292 \end_inset
13293
13294 =
13295 \begin_inset Quotes erd
13296 \end_inset
13297
13298
13299 \begin_inset Quotes erd
13300 \end_inset
13301
13302 ] This (optional) argument determines whether floats of this class will
13303  be numbered within some sectional unit of the document.
13304  For example, if within is equal to 
13305 \begin_inset Flex Code
13306 status collapsed
13307
13308 \begin_layout Plain Layout
13309 chapter
13310 \end_layout
13311
13312 \end_inset
13313
13314 , the floats will be numbered within chapters.
13315  
13316 \end_layout
13317
13318 \begin_layout Description
13319 \begin_inset Flex Code
13320 status collapsed
13321
13322 \begin_layout Plain Layout
13323 Placement
13324 \end_layout
13325
13326 \end_inset
13327
13328  [
13329 \begin_inset Flex Code
13330 status collapsed
13331
13332 \begin_layout Plain Layout
13333 string
13334 \end_layout
13335
13336 \end_inset
13337
13338 =
13339 \begin_inset Quotes erd
13340 \end_inset
13341
13342
13343 \begin_inset Quotes erd
13344 \end_inset
13345
13346 ] The default placement for the given class of floats.
13347  The string should be as in standard LaTeX: 
13348 \begin_inset Flex Code
13349 status collapsed
13350
13351 \begin_layout Plain Layout
13352 t
13353 \end_layout
13354
13355 \end_inset
13356
13357
13358 \begin_inset Flex Code
13359 status collapsed
13360
13361 \begin_layout Plain Layout
13362 b
13363 \end_layout
13364
13365 \end_inset
13366
13367
13368 \begin_inset Flex Code
13369 status collapsed
13370
13371 \begin_layout Plain Layout
13372 p
13373 \end_layout
13374
13375 \end_inset
13376
13377  and 
13378 \begin_inset Flex Code
13379 status collapsed
13380
13381 \begin_layout Plain Layout
13382 h
13383 \end_layout
13384
13385 \end_inset
13386
13387  for top, bottom, page, and here, respectively.
13388 \begin_inset Foot
13389 status collapsed
13390
13391 \begin_layout Plain Layout
13392 Note that the order of these letters in the string is irrelevant, like in
13393  LaTeX.
13394 \end_layout
13395
13396 \end_inset
13397
13398  On top of that there is a new type, 
13399 \begin_inset Flex Code
13400 status collapsed
13401
13402 \begin_layout Plain Layout
13403 H
13404 \end_layout
13405
13406 \end_inset
13407
13408 , which does not really correspond to a float, since it means: put it 
13409 \begin_inset Quotes eld
13410 \end_inset
13411
13412 here
13413 \begin_inset Quotes erd
13414 \end_inset
13415
13416  and nowhere else.
13417  Note however that the 
13418 \begin_inset Flex Code
13419 status collapsed
13420
13421 \begin_layout Plain Layout
13422 H
13423 \end_layout
13424
13425 \end_inset
13426
13427  specifier is special and, because of implementation details, cannot be
13428  used in non-built in float types.
13429  If you do not understand what this means, just use 
13430 \begin_inset Quotes eld
13431 \end_inset
13432
13433
13434 \begin_inset Flex Code
13435 status collapsed
13436
13437 \begin_layout Plain Layout
13438 tbp
13439 \end_layout
13440
13441 \end_inset
13442
13443
13444 \begin_inset Quotes erd
13445 \end_inset
13446
13447 .
13448 \end_layout
13449
13450 \begin_layout Description
13451 \begin_inset Flex Code
13452 status collapsed
13453
13454 \begin_layout Plain Layout
13455 RefPrefix
13456 \end_layout
13457
13458 \end_inset
13459
13460  [
13461 \begin_inset Flex Code
13462 status collapsed
13463
13464 \begin_layout Plain Layout
13465 string
13466 \end_layout
13467
13468 \end_inset
13469
13470 ] The prefix to use when creating labels referring to floats of this type.
13471  This allows the use of formatted references.
13472  Note that you can remove any 
13473 \begin_inset Flex Code
13474 status collapsed
13475
13476 \begin_layout Plain Layout
13477 RefPrefix
13478 \end_layout
13479
13480 \end_inset
13481
13482  set by a copied style by using the special value 
13483 \begin_inset Quotes eld
13484 \end_inset
13485
13486 OFF
13487 \begin_inset Quotes erd
13488 \end_inset
13489
13490 , which must be all caps.
13491 \end_layout
13492
13493 \begin_layout Description
13494 \begin_inset Flex Code
13495 status collapsed
13496
13497 \begin_layout Plain Layout
13498 Style
13499 \end_layout
13500
13501 \end_inset
13502
13503  [
13504 \begin_inset Flex Code
13505 status collapsed
13506
13507 \begin_layout Plain Layout
13508 string
13509 \end_layout
13510
13511 \end_inset
13512
13513 =
13514 \begin_inset Quotes erd
13515 \end_inset
13516
13517
13518 \begin_inset Quotes erd
13519 \end_inset
13520
13521 ] The style used when defining the float using 
13522 \begin_inset Flex Code
13523 status collapsed
13524
13525 \begin_layout Plain Layout
13526
13527 \backslash
13528 newfloat
13529 \end_layout
13530
13531 \end_inset
13532
13533 .
13534 \end_layout
13535
13536 \begin_layout Description
13537 \begin_inset Flex Code
13538 status collapsed
13539
13540 \begin_layout Plain Layout
13541 Type
13542 \end_layout
13543
13544 \end_inset
13545
13546  [
13547 \begin_inset Flex Code
13548 status collapsed
13549
13550 \begin_layout Plain Layout
13551 string
13552 \end_layout
13553
13554 \end_inset
13555
13556 =
13557 \begin_inset Quotes erd
13558 \end_inset
13559
13560
13561 \begin_inset Quotes erd
13562 \end_inset
13563
13564 ] The 
13565 \begin_inset Quotes eld
13566 \end_inset
13567
13568 type
13569 \begin_inset Quotes erd
13570 \end_inset
13571
13572  of the new class of floats, like program or algorithm.
13573  After the appropriate 
13574 \begin_inset Flex Code
13575 status collapsed
13576
13577 \begin_layout Plain Layout
13578
13579 \backslash
13580 newfloat
13581 \end_layout
13582
13583 \end_inset
13584
13585 , commands such as 
13586 \begin_inset Flex Code
13587 status collapsed
13588
13589 \begin_layout Plain Layout
13590
13591 \backslash
13592 begin{program}
13593 \end_layout
13594
13595 \end_inset
13596
13597  or 
13598 \begin_inset Flex Code
13599 status collapsed
13600
13601 \begin_layout Plain Layout
13602
13603 \backslash
13604 end{algorithm*}
13605 \end_layout
13606
13607 \end_inset
13608
13609  will be available.
13610 \end_layout
13611
13612 \begin_layout Description
13613 \begin_inset Flex Code
13614 status collapsed
13615
13616 \begin_layout Plain Layout
13617 UsesFloatPkg
13618 \end_layout
13619
13620 \end_inset
13621
13622  [
13623 \begin_inset Flex Code
13624 status open
13625
13626 \begin_layout Plain Layout
13627 0
13628 \end_layout
13629
13630 \end_inset
13631
13632
13633 \begin_inset Flex Code
13634 status collapsed
13635
13636 \begin_layout Plain Layout
13637
13638 \emph on
13639 1
13640 \end_layout
13641
13642 \end_inset
13643
13644 ] Tells us whether this float is defined using the facilities provided by
13645  
13646 \begin_inset Flex Code
13647 status collapsed
13648
13649 \begin_layout Plain Layout
13650 float.sty
13651 \end_layout
13652
13653 \end_inset
13654
13655 , either by the class file or a package, or on-the-fly by LyX itself.
13656 \end_layout
13657
13658 \begin_layout Standard
13659 Note that defining a float with type 
13660 \begin_inset Flex Code
13661 status collapsed
13662
13663 \begin_layout Plain Layout
13664
13665 \emph on
13666 type
13667 \end_layout
13668
13669 \end_inset
13670
13671  automatically defines the corresponding counter with name 
13672 \begin_inset Flex Code
13673 status collapsed
13674
13675 \begin_layout Plain Layout
13676
13677 \emph on
13678 type
13679 \end_layout
13680
13681 \end_inset
13682
13683 .
13684 \end_layout
13685
13686 \begin_layout Subsection
13687 Flex insets and InsetLayout
13688 \begin_inset CommandInset label
13689 LatexCommand label
13690 name "sub:Flex-insets-and"
13691
13692 \end_inset
13693
13694
13695 \end_layout
13696
13697 \begin_layout Standard
13698 LyX has supported character styles since version 1.4.0; as of version 1.6.0,
13699  these are called Flex insets.
13700  
13701 \end_layout
13702
13703 \begin_layout Standard
13704 Flex insets come in three different kinds: 
13705 \end_layout
13706
13707 \begin_layout Itemize
13708 character style (
13709 \begin_inset Flex Code
13710 status collapsed
13711
13712 \begin_layout Plain Layout
13713 CharStyle
13714 \end_layout
13715
13716 \end_inset
13717
13718 ): These define semantic markup corresponding to such LaTeX commands as
13719  
13720 \begin_inset Flex Code
13721 status collapsed
13722
13723 \begin_layout Plain Layout
13724
13725 \backslash
13726 noun
13727 \end_layout
13728
13729 \end_inset
13730
13731  and 
13732 \begin_inset Flex Code
13733 status collapsed
13734
13735 \begin_layout Plain Layout
13736
13737 \backslash
13738 code
13739 \end_layout
13740
13741 \end_inset
13742
13743 .
13744 \end_layout
13745
13746 \begin_layout Itemize
13747 user custom (
13748 \begin_inset Flex Code
13749 status collapsed
13750
13751 \begin_layout Plain Layout
13752 Custom
13753 \end_layout
13754
13755 \end_inset
13756
13757 ): These can be used to define custom collapsible insets, similar to TeX
13758  code, footnote, and the like.
13759  An obvious example is an endnote inset, which is defined in the 
13760 \begin_inset Flex Code
13761 status collapsed
13762
13763 \begin_layout Plain Layout
13764 endnote
13765 \end_layout
13766
13767 \end_inset
13768
13769  module.
13770 \end_layout
13771
13772 \begin_layout Itemize
13773 XML elements (
13774 \begin_inset Flex Code
13775 status collapsed
13776
13777 \begin_layout Plain Layout
13778 Element
13779 \end_layout
13780
13781 \end_inset
13782
13783 ): For use with DocBook classes.
13784 \end_layout
13785
13786 \begin_layout Standard
13787 Flex insets are defined using the 
13788 \begin_inset Flex Code
13789 status collapsed
13790
13791 \begin_layout Plain Layout
13792 InsetLayout
13793 \end_layout
13794
13795 \end_inset
13796
13797  tag, which shall be explained in a moment.
13798 \end_layout
13799
13800 \begin_layout Standard
13801 The 
13802 \begin_inset Flex Code
13803 status collapsed
13804
13805 \begin_layout Plain Layout
13806 InsetLayout
13807 \end_layout
13808
13809 \end_inset
13810
13811  tag also serves another function: It can be used to customize the general
13812  layout of many different types of insets.
13813  Currently, 
13814 \begin_inset Flex Code
13815 status collapsed
13816
13817 \begin_layout Plain Layout
13818 InsetLayout
13819 \end_layout
13820
13821 \end_inset
13822
13823  can be used to customize the layout parameters for footnotes, marginal
13824  notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
13825  boxes, tables, algorithms, URLs, and optional arguments, as well as to
13826  define Flex insets.
13827 \end_layout
13828
13829 \begin_layout Standard
13830 The 
13831 \begin_inset Flex Code
13832 status collapsed
13833
13834 \begin_layout Plain Layout
13835 InsetLayout
13836 \end_layout
13837
13838 \end_inset
13839
13840  definition must begin with a line of the form:
13841 \end_layout
13842
13843 \begin_layout LyX-Code
13844 InsetLayout <Type>
13845 \end_layout
13846
13847 \begin_layout Standard
13848 Here 
13849 \begin_inset Flex Code
13850 status collapsed
13851
13852 \begin_layout Plain Layout
13853 <Type>
13854 \end_layout
13855
13856 \end_inset
13857
13858  indicates the inset whose layout is being defined, and here there are two
13859  cases.
13860 \end_layout
13861
13862 \begin_layout Enumerate
13863 The layout for a pre-existing inset is being modified.
13864  In this case, can be 
13865 \begin_inset Flex Code
13866 status collapsed
13867
13868 \begin_layout Plain Layout
13869 <Type>
13870 \end_layout
13871
13872 \end_inset
13873
13874  any one of the following: 
13875 \begin_inset Flex Code
13876 status collapsed
13877
13878 \begin_layout Plain Layout
13879 Algorithm
13880 \end_layout
13881
13882 \end_inset
13883
13884
13885 \begin_inset Flex Code
13886 status collapsed
13887
13888 \begin_layout Plain Layout
13889 Branch
13890 \end_layout
13891
13892 \end_inset
13893
13894
13895 \begin_inset Flex Code
13896 status collapsed
13897
13898 \begin_layout Plain Layout
13899 Box
13900 \end_layout
13901
13902 \end_inset
13903
13904
13905 \begin_inset Flex Code
13906 status collapsed
13907
13908 \begin_layout Plain Layout
13909 Box:shaded
13910 \end_layout
13911
13912 \end_inset
13913
13914
13915 \begin_inset Flex Code
13916 status collapsed
13917
13918 \begin_layout Plain Layout
13919 ERT
13920 \end_layout
13921
13922 \end_inset
13923
13924
13925 \begin_inset Flex Code
13926 status collapsed
13927
13928 \begin_layout Plain Layout
13929 Figure
13930 \end_layout
13931
13932 \end_inset
13933
13934
13935 \begin_inset Flex Code
13936 status collapsed
13937
13938 \begin_layout Plain Layout
13939 Foot
13940 \end_layout
13941
13942 \end_inset
13943
13944
13945 \begin_inset Flex Code
13946 status collapsed
13947
13948 \begin_layout Plain Layout
13949 Index
13950 \end_layout
13951
13952 \end_inset
13953
13954
13955 \begin_inset Flex Code
13956 status collapsed
13957
13958 \begin_layout Plain Layout
13959 Info
13960 \end_layout
13961
13962 \end_inset
13963
13964
13965 \begin_inset Flex Code
13966 status collapsed
13967
13968 \begin_layout Plain Layout
13969 Info:menu
13970 \end_layout
13971
13972 \end_inset
13973
13974
13975 \begin_inset Flex Code
13976 status collapsed
13977
13978 \begin_layout Plain Layout
13979 Info:shortcut
13980 \end_layout
13981
13982 \end_inset
13983
13984
13985 \begin_inset Flex Code
13986 status collapsed
13987
13988 \begin_layout Plain Layout
13989 Info:shortcuts
13990 \end_layout
13991
13992 \end_inset
13993
13994
13995 \begin_inset Flex Code
13996 status collapsed
13997
13998 \begin_layout Plain Layout
13999 Listings
14000 \end_layout
14001
14002 \end_inset
14003
14004
14005 \begin_inset Flex Code
14006 status collapsed
14007
14008 \begin_layout Plain Layout
14009 Marginal
14010 \end_layout
14011
14012 \end_inset
14013
14014
14015 \begin_inset Flex Code
14016 status collapsed
14017
14018 \begin_layout Plain Layout
14019 Note:Comment
14020 \end_layout
14021
14022 \end_inset
14023
14024
14025 \begin_inset Flex Code
14026 status collapsed
14027
14028 \begin_layout Plain Layout
14029 Note:Note
14030 \end_layout
14031
14032 \end_inset
14033
14034
14035 \begin_inset Flex Code
14036 status collapsed
14037
14038 \begin_layout Plain Layout
14039 Note:Greyedout
14040 \end_layout
14041
14042 \end_inset
14043
14044
14045 \begin_inset Flex Code
14046 status collapsed
14047
14048 \begin_layout Plain Layout
14049 OptArg
14050 \end_layout
14051
14052 \end_inset
14053
14054
14055 \begin_inset Flex Code
14056 status collapsed
14057
14058 \begin_layout Plain Layout
14059 Table
14060 \end_layout
14061
14062 \end_inset
14063
14064 , or 
14065 \begin_inset Flex Code
14066 status collapsed
14067
14068 \begin_layout Plain Layout
14069 URL
14070 \end_layout
14071
14072 \end_inset
14073
14074 .
14075 \end_layout
14076
14077 \begin_layout Enumerate
14078 The layout for a Flex inset is being defined.
14079  In this case, 
14080 \begin_inset Flex Code
14081 status collapsed
14082
14083 \begin_layout Plain Layout
14084 <Type>
14085 \end_layout
14086
14087 \end_inset
14088
14089  must be of the form 
14090 \begin_inset Quotes eld
14091 \end_inset
14092
14093
14094 \begin_inset Flex Code
14095 status collapsed
14096
14097 \begin_layout Plain Layout
14098 Flex:<name>
14099 \end_layout
14100
14101 \end_inset
14102
14103
14104 \begin_inset Quotes erd
14105 \end_inset
14106
14107 , where 
14108 \begin_inset Flex Code
14109 status collapsed
14110
14111 \begin_layout Plain Layout
14112 name
14113 \end_layout
14114
14115 \end_inset
14116
14117  may be be any valid identifier not used by a pre-existing Flex inset.
14118  The identifier may include spaces, but in that case the whole thing must
14119  be wrapped in quotes.
14120  Note that the definition of a flex inset 
14121 \emph on
14122 must 
14123 \emph default
14124 also include a 
14125 \begin_inset Flex Code
14126 status collapsed
14127
14128 \begin_layout Plain Layout
14129 LyXType
14130 \end_layout
14131
14132 \end_inset
14133
14134  entry, declaring which type of inset it defines.
14135 \end_layout
14136
14137 \begin_layout Standard
14138 The 
14139 \begin_inset Flex Code
14140 status collapsed
14141
14142 \begin_layout Plain Layout
14143 InsetLayout
14144 \end_layout
14145
14146 \end_inset
14147
14148  definition can contain the following entries:
14149 \end_layout
14150
14151 \begin_layout Description
14152 \begin_inset Flex Code
14153 status collapsed
14154
14155 \begin_layout Plain Layout
14156 BgColor
14157 \end_layout
14158
14159 \end_inset
14160
14161  The color for the inset's background.
14162  The valid colors are defined in 
14163 \begin_inset Flex Code
14164 status collapsed
14165
14166 \begin_layout Plain Layout
14167 src/ColorCode.h
14168 \end_layout
14169
14170 \end_inset
14171
14172 .
14173 \end_layout
14174
14175 \begin_layout Description
14176 \begin_inset Flex Code
14177 status collapsed
14178
14179 \begin_layout Plain Layout
14180 ContentAsLabel
14181 \end_layout
14182
14183 \end_inset
14184
14185  [
14186 \begin_inset Flex Code
14187 status collapsed
14188
14189 \begin_layout Plain Layout
14190
14191 \emph on
14192 0
14193 \end_layout
14194
14195 \end_inset
14196
14197 ,
14198 \begin_inset Flex Code
14199 status collapsed
14200
14201 \begin_layout Plain Layout
14202 1
14203 \end_layout
14204
14205 \end_inset
14206
14207 ] Whether to use the content of the inset as the label, when the inset is
14208  closed.
14209  Default is false.
14210 \end_layout
14211
14212 \begin_layout Description
14213 \begin_inset Flex Code
14214 status collapsed
14215
14216 \begin_layout Plain Layout
14217 CopyStyle
14218 \end_layout
14219
14220 \end_inset
14221
14222  As with paragraph styles (see page 
14223 \begin_inset CommandInset ref
14224 LatexCommand ref
14225 reference "des:CopyStyle"
14226
14227 \end_inset
14228
14229 ).
14230 \end_layout
14231
14232 \begin_layout Description
14233 \begin_inset Flex Code
14234 status collapsed
14235
14236 \begin_layout Plain Layout
14237 CustomPars
14238 \end_layout
14239
14240 \end_inset
14241
14242  [
14243 \begin_inset Flex Code
14244 status collapsed
14245
14246 \begin_layout Plain Layout
14247
14248 \emph on
14249 0
14250 \end_layout
14251
14252 \end_inset
14253
14254 ,
14255 \begin_inset Flex Code
14256 status collapsed
14257
14258 \begin_layout Plain Layout
14259 1
14260 \end_layout
14261
14262 \end_inset
14263
14264 ] Indicates whether the user may employ the Paragraph Settings dialog to
14265  customize the paragraph.
14266 \end_layout
14267
14268 \begin_layout Description
14269 \begin_inset Flex Code
14270 status collapsed
14271
14272 \begin_layout Plain Layout
14273 Decoration
14274 \end_layout
14275
14276 \end_inset
14277
14278  can be 
14279 \begin_inset Flex Code
14280 status collapsed
14281
14282 \begin_layout Plain Layout
14283 Classic
14284 \end_layout
14285
14286 \end_inset
14287
14288
14289 \begin_inset Flex Code
14290 status collapsed
14291
14292 \begin_layout Plain Layout
14293 Minimalistic
14294 \end_layout
14295
14296 \end_inset
14297
14298 , or 
14299 \begin_inset Flex Code
14300 status collapsed
14301
14302 \begin_layout Plain Layout
14303 Conglomerate
14304 \end_layout
14305
14306 \end_inset
14307
14308 , describing the rendering style used for the inset's frame and buttons.
14309  Footnotes generally use 
14310 \begin_inset Flex Code
14311 status collapsed
14312
14313 \begin_layout Plain Layout
14314 Classic
14315 \end_layout
14316
14317 \end_inset
14318
14319 , ERT insets generally 
14320 \begin_inset Flex Code
14321 status collapsed
14322
14323 \begin_layout Plain Layout
14324 Minimalistic
14325 \end_layout
14326
14327 \end_inset
14328
14329 , and character styles 
14330 \begin_inset Flex Code
14331 status collapsed
14332
14333 \begin_layout Plain Layout
14334 Conglomerate
14335 \end_layout
14336
14337 \end_inset
14338
14339 .
14340 \end_layout
14341
14342 \begin_layout Description
14343 \begin_inset Flex Code
14344 status collapsed
14345
14346 \begin_layout Plain Layout
14347 Display
14348 \end_layout
14349
14350 \end_inset
14351
14352  [
14353 \begin_inset Flex Code
14354 status collapsed
14355
14356 \begin_layout Plain Layout
14357 0
14358 \end_layout
14359
14360 \end_inset
14361
14362 ,
14363 \begin_inset Flex Code
14364 status collapsed
14365
14366 \begin_layout Plain Layout
14367
14368 \emph on
14369 1
14370 \end_layout
14371
14372 \end_inset
14373
14374 ] Only useful if 
14375 \begin_inset Flex Code
14376 status collapsed
14377
14378 \begin_layout Plain Layout
14379 LatexType
14380 \end_layout
14381
14382 \end_inset
14383
14384  is 
14385 \begin_inset Flex Code
14386 status collapsed
14387
14388 \begin_layout Plain Layout
14389 Environment
14390 \end_layout
14391
14392 \end_inset
14393
14394 .
14395  Indicates whether the environment will stand on its own in LaTeX output
14396  or will appear inline with the surrounding text.
14397  If set to false, it is supposed that the LaTeX environment ignores white
14398  space (including one newline character) after the 
14399 \begin_inset Flex Code
14400 status collapsed
14401
14402 \begin_layout Plain Layout
14403
14404 \backslash
14405 begin{
14406 \emph on
14407 LatexName
14408 \emph default
14409 }
14410 \end_layout
14411
14412 \end_inset
14413
14414  and 
14415 \begin_inset Flex Code
14416 status collapsed
14417
14418 \begin_layout Plain Layout
14419
14420 \backslash
14421 end{
14422 \emph on
14423 LatexName
14424 \emph default
14425 }
14426 \end_layout
14427
14428 \end_inset
14429
14430  tags.
14431  Default is true.
14432 \end_layout
14433
14434 \begin_layout Description
14435 \begin_inset Flex Code
14436 status collapsed
14437
14438 \begin_layout Plain Layout
14439 End
14440 \end_layout
14441
14442 \end_inset
14443
14444  Required at the end of the InsetLayout declarations.
14445 \end_layout
14446
14447 \begin_layout Description
14448 \begin_inset Flex Code
14449 status collapsed
14450
14451 \begin_layout Plain Layout
14452 Font
14453 \end_layout
14454
14455 \end_inset
14456
14457  The font used for both the text body 
14458 \emph on
14459 and
14460 \emph default
14461  the label.
14462  See section
14463 \begin_inset space ~
14464 \end_inset
14465
14466
14467 \begin_inset CommandInset ref
14468 LatexCommand ref
14469 reference "sub:Font-description"
14470
14471 \end_inset
14472
14473 .
14474  Note that defining this font automatically defines the 
14475 \begin_inset Flex Code
14476 status collapsed
14477
14478 \begin_layout Plain Layout
14479 LabelFont
14480 \end_layout
14481
14482 \end_inset
14483
14484  to the same value, so define this first and define 
14485 \begin_inset Flex Code
14486 status collapsed
14487
14488 \begin_layout Plain Layout
14489 LabelFont
14490 \end_layout
14491
14492 \end_inset
14493
14494  later if you want them to be different.
14495 \end_layout
14496
14497 \begin_layout Description
14498 \begin_inset Flex Code
14499 status collapsed
14500
14501 \begin_layout Plain Layout
14502 ForceLTR
14503 \end_layout
14504
14505 \end_inset
14506
14507  Force the 
14508 \begin_inset Quotes eld
14509 \end_inset
14510
14511 latex
14512 \begin_inset Quotes erd
14513 \end_inset
14514
14515  language, leading to Left-to-Right (latin) output, e.
14516 \begin_inset space \thinspace{}
14517 \end_inset
14518
14519 g.
14520 \begin_inset space \space{}
14521 \end_inset
14522
14523 in TeX code or URL.
14524  A kludge.
14525 \end_layout
14526
14527 \begin_layout Description
14528 \begin_inset Flex Code
14529 status collapsed
14530
14531 \begin_layout Plain Layout
14532 ForcePlain
14533 \end_layout
14534
14535 \end_inset
14536
14537  [
14538 \begin_inset Flex Code
14539 status collapsed
14540
14541 \begin_layout Plain Layout
14542
14543 \emph on
14544 0
14545 \end_layout
14546
14547 \end_inset
14548
14549 ,
14550 \begin_inset Flex Code
14551 status collapsed
14552
14553 \begin_layout Plain Layout
14554 1
14555 \end_layout
14556
14557 \end_inset
14558
14559 ] Indicates whether the 
14560 \begin_inset Flex Code
14561 status collapsed
14562
14563 \begin_layout Plain Layout
14564 PlainLayout
14565 \end_layout
14566
14567 \end_inset
14568
14569  should be used or, instead, the user can change the paragraph style used
14570  in the inset.
14571  Default is false.
14572 \end_layout
14573
14574 \begin_layout Description
14575 \begin_inset Flex Code
14576 status collapsed
14577
14578 \begin_layout Plain Layout
14579 FreeSpacing
14580 \end_layout
14581
14582 \end_inset
14583
14584  As with paragraph styles (see page 
14585 \begin_inset CommandInset ref
14586 LatexCommand pageref
14587 reference "des:FreeSpacing"
14588
14589 \end_inset
14590
14591 ).
14592  Default is false.
14593 \end_layout
14594
14595 \begin_layout Description
14596 \begin_inset Flex Code
14597 status collapsed
14598
14599 \begin_layout Plain Layout
14600 HTML*
14601 \end_layout
14602
14603 \end_inset
14604
14605  These tags control XHTML output.
14606  See section 
14607 \begin_inset CommandInset ref
14608 LatexCommand ref
14609 reference "sec:Tags-for-XHTML"
14610
14611 \end_inset
14612
14613 .
14614 \end_layout
14615
14616 \begin_layout Description
14617 \begin_inset Flex Code
14618 status collapsed
14619
14620 \begin_layout Plain Layout
14621 InToc
14622 \end_layout
14623
14624 \end_inset
14625
14626  [
14627 \begin_inset Flex Code
14628 status collapsed
14629
14630 \begin_layout Plain Layout
14631
14632 \emph on
14633 0
14634 \end_layout
14635
14636 \end_inset
14637
14638 ,
14639 \begin_inset Flex Code
14640 status collapsed
14641
14642 \begin_layout Plain Layout
14643 1
14644 \end_layout
14645
14646 \end_inset
14647
14648 ] Whether to include the contents of this inset in the strings generated
14649  for the `Outline' pane.
14650  One would not, for example, want the content of a footnote in a section
14651  header to be included in the TOC displayed in the outline, but one would
14652  normally want the content of a character style displayed.
14653  Default is false: not to include.
14654 \end_layout
14655
14656 \begin_layout Description
14657 \begin_inset Flex Code
14658 status collapsed
14659
14660 \begin_layout Plain Layout
14661 KeepEmpty
14662 \end_layout
14663
14664 \end_inset
14665
14666  As with paragraph styles (see page 
14667 \begin_inset CommandInset ref
14668 LatexCommand pageref
14669 reference "des:KeepEmpty"
14670
14671 \end_inset
14672
14673 ).
14674  Default is false.
14675 \end_layout
14676
14677 \begin_layout Description
14678 \begin_inset Flex Code
14679 status collapsed
14680
14681 \begin_layout Plain Layout
14682 LabelFont
14683 \end_layout
14684
14685 \end_inset
14686
14687  The font used for the label.
14688  See section
14689 \begin_inset space ~
14690 \end_inset
14691
14692
14693 \begin_inset CommandInset ref
14694 LatexCommand ref
14695 reference "sub:Font-description"
14696
14697 \end_inset
14698
14699 .
14700  Note that this definition can never appear before 
14701 \begin_inset Flex Code
14702 status collapsed
14703
14704 \begin_layout Plain Layout
14705 Font
14706 \end_layout
14707
14708 \end_inset
14709
14710 , lest it be ineffective.
14711 \end_layout
14712
14713 \begin_layout Description
14714 \begin_inset Flex Code
14715 status collapsed
14716
14717 \begin_layout Plain Layout
14718 LabelString
14719 \end_layout
14720
14721 \end_inset
14722
14723  What will be displayed on the button or elsewhere as the inset label.
14724  Some inset types (
14725 \begin_inset Flex Code
14726 status collapsed
14727
14728 \begin_layout Plain Layout
14729 TeX code
14730 \end_layout
14731
14732 \end_inset
14733
14734  and 
14735 \begin_inset Flex Code
14736 status collapsed
14737
14738 \begin_layout Plain Layout
14739 Branch
14740 \end_layout
14741
14742 \end_inset
14743
14744 ) modify this label on the fly.
14745 \end_layout
14746
14747 \begin_layout Description
14748 \begin_inset Flex Code
14749 status collapsed
14750
14751 \begin_layout Plain Layout
14752 LatexName
14753 \end_layout
14754
14755 \end_inset
14756
14757  The name of the corresponding LaTeX stuff.
14758  Either the environment or command name.
14759 \end_layout
14760
14761 \begin_layout Description
14762 \begin_inset Flex Code
14763 status collapsed
14764
14765 \begin_layout Plain Layout
14766 LatexParam
14767 \end_layout
14768
14769 \end_inset
14770
14771  The optional parameter for the corresponding 
14772 \begin_inset Flex Code
14773 status collapsed
14774
14775 \begin_layout Plain Layout
14776 LatexName
14777 \end_layout
14778
14779 \end_inset
14780
14781  stuff, including possible bracket pairs like 
14782 \begin_inset Flex Code
14783 status collapsed
14784
14785 \begin_layout Plain Layout
14786 []
14787 \end_layout
14788
14789 \end_inset
14790
14791 .
14792  This parameter cannot be changed from within LyX.
14793 \end_layout
14794
14795 \begin_layout Description
14796 \begin_inset Flex Code
14797 status collapsed
14798
14799 \begin_layout Plain Layout
14800 LatexType
14801 \end_layout
14802
14803 \end_inset
14804
14805  As with paragraph styles (see page 
14806 \begin_inset CommandInset ref
14807 LatexCommand pageref
14808 reference "des:LatexType"
14809
14810 \end_inset
14811
14812 ).
14813 \end_layout
14814
14815 \begin_layout Description
14816 \begin_inset Flex Code
14817 status collapsed
14818
14819 \begin_layout Plain Layout
14820 LyxType
14821 \end_layout
14822
14823 \end_inset
14824
14825  Can be 
14826 \begin_inset Flex Code
14827 status collapsed
14828
14829 \begin_layout Plain Layout
14830 charstyle
14831 \end_layout
14832
14833 \end_inset
14834
14835
14836 \begin_inset Flex Code
14837 status collapsed
14838
14839 \begin_layout Plain Layout
14840 custom
14841 \end_layout
14842
14843 \end_inset
14844
14845
14846 \begin_inset Flex Code
14847 status collapsed
14848
14849 \begin_layout Plain Layout
14850 element
14851 \end_layout
14852
14853 \end_inset
14854
14855 , or 
14856 \begin_inset Flex Code
14857 status collapsed
14858
14859 \begin_layout Plain Layout
14860 end
14861 \end_layout
14862
14863 \end_inset
14864
14865  (indicating a dummy definition ending definitions of charstyles, etc).
14866  This entry is required in and is only meaningful for Flex insets.
14867  Among other things, it determines on which menu this inset will appear.
14868  Setting 
14869 \begin_inset Flex Code
14870 status collapsed
14871
14872 \begin_layout Plain Layout
14873 LyXType
14874 \end_layout
14875
14876 \end_inset
14877
14878  to 
14879 \begin_inset Flex Code
14880 status collapsed
14881
14882 \begin_layout Plain Layout
14883 charstyle
14884 \end_layout
14885
14886 \end_inset
14887
14888  will set 
14889 \begin_inset Flex Code
14890 status collapsed
14891
14892 \begin_layout Plain Layout
14893 MultiPar
14894 \end_layout
14895
14896 \end_inset
14897
14898  to false.
14899  
14900 \begin_inset Flex Code
14901 status collapsed
14902
14903 \begin_layout Plain Layout
14904 MultiPar
14905 \end_layout
14906
14907 \end_inset
14908
14909  can be set to true for charstyle insets, if you wish, by setting it 
14910 \emph on
14911 after
14912 \emph default
14913  you set the 
14914 \begin_inset Flex Code
14915 status collapsed
14916
14917 \begin_layout Plain Layout
14918 LyXType
14919 \end_layout
14920
14921 \end_inset
14922
14923 .
14924 \end_layout
14925
14926 \begin_layout Description
14927 \begin_inset Flex Code
14928 status collapsed
14929
14930 \begin_layout Plain Layout
14931 MultiPar
14932 \end_layout
14933
14934 \end_inset
14935
14936  [
14937 \begin_inset Flex Code
14938 status collapsed
14939
14940 \begin_layout Plain Layout
14941
14942 \emph on
14943 0
14944 \end_layout
14945
14946 \end_inset
14947
14948 ,
14949 \begin_inset Flex Code
14950 status collapsed
14951
14952 \begin_layout Plain Layout
14953 1
14954 \end_layout
14955
14956 \end_inset
14957
14958 ] Whether multiple paragraphs are permitted in this inset.
14959  This will also set 
14960 \begin_inset Flex Code
14961 status collapsed
14962
14963 \begin_layout Plain Layout
14964 CustomPars
14965 \end_layout
14966
14967 \end_inset
14968
14969  to the same value and 
14970 \begin_inset Flex Code
14971 status collapsed
14972
14973 \begin_layout Plain Layout
14974 ForcePlain
14975 \end_layout
14976
14977 \end_inset
14978
14979  to the opposite value.
14980  These can be reset to other values, if they are used 
14981 \emph on
14982 after
14983 \emph default
14984  
14985 \begin_inset Flex Code
14986 status collapsed
14987
14988 \begin_layout Plain Layout
14989 MultiPar
14990 \end_layout
14991
14992 \end_inset
14993
14994 .
14995  Default is true.
14996 \end_layout
14997
14998 \begin_layout Description
14999 \begin_inset Flex Code
15000 status collapsed
15001
15002 \begin_layout Plain Layout
15003 NeedProtect
15004 \end_layout
15005
15006 \end_inset
15007
15008  [
15009 \begin_inset Flex Code
15010 status collapsed
15011
15012 \begin_layout Plain Layout
15013
15014 \emph on
15015 0
15016 \end_layout
15017
15018 \end_inset
15019
15020 ,
15021 \begin_inset Flex Code
15022 status collapsed
15023
15024 \begin_layout Plain Layout
15025 1
15026 \end_layout
15027
15028 \end_inset
15029
15030 ] Whether fragile commands in this inset should be 
15031 \begin_inset Flex Code
15032 status collapsed
15033
15034 \begin_layout Plain Layout
15035
15036 \backslash
15037 protect
15038 \end_layout
15039
15040 \end_inset
15041
15042 'ed.
15043  (Note: This is 
15044 \emph on
15045 not
15046 \emph default
15047  whether the command should itself be protected.) Default is false.
15048 \end_layout
15049
15050 \begin_layout Description
15051 \begin_inset Flex Code
15052 status collapsed
15053
15054 \begin_layout Plain Layout
15055 ParbreakIsNewline
15056 \end_layout
15057
15058 \end_inset
15059
15060  [
15061 \begin_inset Flex Code
15062 status collapsed
15063
15064 \begin_layout Plain Layout
15065
15066 \emph on
15067 0
15068 \end_layout
15069
15070 \end_inset
15071
15072
15073 \begin_inset Flex Code
15074 status collapsed
15075
15076 \begin_layout Plain Layout
15077 1
15078 \end_layout
15079
15080 \end_inset
15081
15082 ] As with paragraph styles (see page 
15083 \begin_inset CommandInset ref
15084 LatexCommand pageref
15085 reference "des:ParbreakIsNewline"
15086
15087 \end_inset
15088
15089 ).
15090  Default is false.
15091 \end_layout
15092
15093 \begin_layout Description
15094 \begin_inset Flex Code
15095 status collapsed
15096
15097 \begin_layout Plain Layout
15098 PassThru
15099 \end_layout
15100
15101 \end_inset
15102
15103  [
15104 \begin_inset Flex Code
15105 status collapsed
15106
15107 \begin_layout Plain Layout
15108
15109 \emph on
15110 0
15111 \end_layout
15112
15113 \end_inset
15114
15115 ,
15116 \begin_inset Flex Code
15117 status collapsed
15118
15119 \begin_layout Plain Layout
15120 1
15121 \end_layout
15122
15123 \end_inset
15124
15125 ] As with paragraph styles (see page 
15126 \begin_inset CommandInset ref
15127 LatexCommand pageref
15128 reference "des:PassThru"
15129
15130 \end_inset
15131
15132 ).
15133  Default is false.
15134 \end_layout
15135
15136 \begin_layout Description
15137 \begin_inset Flex Code
15138 status collapsed
15139
15140 \begin_layout Plain Layout
15141 Preamble
15142 \end_layout
15143
15144 \end_inset
15145
15146  As with paragraph styles (see page 
15147 \begin_inset CommandInset ref
15148 LatexCommand pageref
15149 reference "des:Preamble"
15150
15151 \end_inset
15152
15153 ).
15154 \end_layout
15155
15156 \begin_layout Description
15157 \begin_inset Flex Code
15158 status collapsed
15159
15160 \begin_layout Plain Layout
15161 RefPrefix
15162 \end_layout
15163
15164 \end_inset
15165
15166  [
15167 \begin_inset Flex Code
15168 status collapsed
15169
15170 \begin_layout Plain Layout
15171 string
15172 \end_layout
15173
15174 \end_inset
15175
15176 ] The prefix to use when creating labels referring to insets of this type.
15177  This allows the use of formatted references.
15178 \end_layout
15179
15180 \begin_layout Description
15181 \begin_inset Flex Code
15182 status collapsed
15183
15184 \begin_layout Plain Layout
15185 Requires
15186 \end_layout
15187
15188 \end_inset
15189
15190  [
15191 \begin_inset Flex Code
15192 status collapsed
15193
15194 \begin_layout Plain Layout
15195 string
15196 \end_layout
15197
15198 \end_inset
15199
15200 ] As with paragraph styles (see page 
15201 \begin_inset CommandInset ref
15202 LatexCommand pageref
15203 reference "des:Requires"
15204
15205 \end_inset
15206
15207 ).
15208 \end_layout
15209
15210 \begin_layout Description
15211 \begin_inset Flex Code
15212 status collapsed
15213
15214 \begin_layout Plain Layout
15215 ResetsFont
15216 \end_layout
15217
15218 \end_inset
15219
15220  [
15221 \begin_inset Flex Code
15222 status collapsed
15223
15224 \begin_layout Plain Layout
15225 0
15226 \end_layout
15227
15228 \end_inset
15229
15230 ,
15231 \begin_inset Flex Code
15232 status collapsed
15233
15234 \begin_layout Plain Layout
15235
15236 \emph on
15237 1
15238 \end_layout
15239
15240 \end_inset
15241
15242 ] Whether this inset should use the font of its surrounding environment
15243  or uses its own.
15244  Default is true: uses its own.
15245 \end_layout
15246
15247 \begin_layout Description
15248 \begin_inset Flex Code
15249 status collapsed
15250
15251 \begin_layout Plain Layout
15252 Spellcheck
15253 \end_layout
15254
15255 \end_inset
15256
15257  [
15258 \begin_inset Flex Code
15259 status collapsed
15260
15261 \begin_layout Plain Layout
15262 0
15263 \end_layout
15264
15265 \end_inset
15266
15267 ,
15268 \begin_inset Flex Code
15269 status collapsed
15270
15271 \begin_layout Plain Layout
15272
15273 \emph on
15274 1
15275 \end_layout
15276
15277 \end_inset
15278
15279 ] Spellcheck the contents of this inset.
15280  Default is true.
15281 \end_layout
15282
15283 \begin_layout Subsection
15284 Counters
15285 \begin_inset CommandInset label
15286 LatexCommand label
15287 name "sub:Counters"
15288
15289 \end_inset
15290
15291
15292 \end_layout
15293
15294 \begin_layout Standard
15295 Since version 1.3.0 of LyX, it is both possible and necessary to define the
15296  counters (
15297 \begin_inset Flex MenuItem
15298 status collapsed
15299
15300 \begin_layout Plain Layout
15301 chapter
15302 \end_layout
15303
15304 \end_inset
15305
15306
15307 \begin_inset Flex MenuItem
15308 status collapsed
15309
15310 \begin_layout Plain Layout
15311 figure
15312 \end_layout
15313
15314 \end_inset
15315
15316 , \SpecialChar \ldots{}
15317 ) in the text class itself.
15318  The standard counters are defined in the file 
15319 \begin_inset Flex Code
15320 status collapsed
15321
15322 \begin_layout Plain Layout
15323 stdcounters.inc
15324 \end_layout
15325
15326 \end_inset
15327
15328 , so you may have to do no more than add
15329 \end_layout
15330
15331 \begin_layout LyX-Code
15332 Input stdcounters.inc
15333 \end_layout
15334
15335 \begin_layout Standard
15336 to your layout file to get them to work.
15337  But if you want to define custom counters, then you can do so.
15338  The counter declaration must begin with:
15339 \end_layout
15340
15341 \begin_layout LyX-Code
15342 Counter CounterName
15343 \end_layout
15344
15345 \begin_layout Standard
15346 where of course `
15347 \begin_inset Flex Code
15348 status collapsed
15349
15350 \begin_layout Plain Layout
15351 CounterName
15352 \end_layout
15353
15354 \end_inset
15355
15356 ' is replaced by the name of the counter.
15357  And it must end with 
15358 \begin_inset Quotes eld
15359 \end_inset
15360
15361
15362 \begin_inset Flex Code
15363 status collapsed
15364
15365 \begin_layout Plain Layout
15366 End
15367 \end_layout
15368
15369 \end_inset
15370
15371
15372 \begin_inset Quotes erd
15373 \end_inset
15374
15375 .
15376  The following parameters can also be used:
15377 \end_layout
15378
15379 \begin_layout Description
15380 \begin_inset Flex Code
15381 status collapsed
15382
15383 \begin_layout Plain Layout
15384 LabelString
15385 \end_layout
15386
15387 \end_inset
15388
15389  [
15390 \begin_inset Flex Code
15391 status collapsed
15392
15393 \begin_layout Plain Layout
15394 string
15395 \end_layout
15396
15397 \end_inset
15398
15399 =
15400 \begin_inset Quotes erd
15401 \end_inset
15402
15403
15404 \begin_inset Quotes erd
15405 \end_inset
15406
15407 ] When defined, this string defines how the counter is displayed.
15408  Setting this value sets 
15409 \begin_inset Flex Code
15410 status collapsed
15411
15412 \begin_layout Plain Layout
15413 LabelStringAppendix
15414 \end_layout
15415
15416 \end_inset
15417
15418  to the same value.
15419  The following special constructs can be used in the string:
15420 \end_layout
15421
15422 \begin_deeper
15423 \begin_layout Itemize
15424 \begin_inset Flex Code
15425 status collapsed
15426
15427 \begin_layout Plain Layout
15428
15429 \backslash
15430 thecounter
15431 \end_layout
15432
15433 \end_inset
15434
15435  will be replaced by the expansion of the 
15436 \begin_inset Flex Code
15437 status collapsed
15438
15439 \begin_layout Plain Layout
15440 LabelString
15441 \end_layout
15442
15443 \end_inset
15444
15445  (or 
15446 \begin_inset Flex Code
15447 status collapsed
15448
15449 \begin_layout Plain Layout
15450 LabelStringAppendix
15451 \end_layout
15452
15453 \end_inset
15454
15455 ) of the counter 
15456 \begin_inset Flex Code
15457 status collapsed
15458
15459 \begin_layout Plain Layout
15460 counter
15461 \end_layout
15462
15463 \end_inset
15464
15465 .
15466  
15467 \end_layout
15468
15469 \begin_layout Itemize
15470 counter values can be expressed using LaTeX-like macros 
15471 \begin_inset Flex Code
15472 status collapsed
15473
15474 \begin_layout Plain Layout
15475
15476 \backslash
15477
15478 \emph on
15479 numbertype
15480 \emph default
15481 {
15482 \emph on
15483 counter
15484 \emph default
15485 }
15486 \end_layout
15487
15488 \end_inset
15489
15490 , where 
15491 \begin_inset Flex Code
15492 status collapsed
15493
15494 \begin_layout Plain Layout
15495
15496 \emph on
15497 numbertype
15498 \end_layout
15499
15500 \end_inset
15501
15502  can be:
15503 \begin_inset Foot
15504 status collapsed
15505
15506 \begin_layout Plain Layout
15507
15508 \family roman
15509 \series medium
15510 \shape up
15511 \size normal
15512 \emph off
15513 \bar no
15514 \noun off
15515 \color none
15516 Actually, the situation is a bit more complicated: any
15517 \family default
15518 \series default
15519 \shape default
15520 \emph default
15521 \bar default
15522  
15523 \size default
15524 \emph on
15525 \noun default
15526 \color inherit
15527 numbertype
15528 \family roman
15529 \series medium
15530 \shape up
15531 \size normal
15532 \emph off
15533 \bar no
15534 \noun off
15535  other than those described below will produce arabic numerals.
15536  It would not be surprising to see this change in the future.
15537 \end_layout
15538
15539 \end_inset
15540
15541  
15542 \begin_inset Flex Code
15543 status collapsed
15544
15545 \begin_layout Plain Layout
15546 arabic
15547 \end_layout
15548
15549 \end_inset
15550
15551 : 1, 2, 3,\SpecialChar \ldots{}
15552
15553 \begin_inset Flex Code
15554 status collapsed
15555
15556 \begin_layout Plain Layout
15557 alph
15558 \end_layout
15559
15560 \end_inset
15561
15562  for lower-case letters: a, b, c, \SpecialChar \ldots{}
15563
15564 \begin_inset Flex Code
15565 status collapsed
15566
15567 \begin_layout Plain Layout
15568 Alph
15569 \end_layout
15570
15571 \end_inset
15572
15573  for upper-case letters: A, B, C, \SpecialChar \ldots{}
15574
15575 \begin_inset Flex Code
15576 status collapsed
15577
15578 \begin_layout Plain Layout
15579 roman
15580 \end_layout
15581
15582 \end_inset
15583
15584  for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
15585
15586 \begin_inset Flex Code
15587 status collapsed
15588
15589 \begin_layout Plain Layout
15590 Roman
15591 \end_layout
15592
15593 \end_inset
15594
15595  for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
15596
15597 \begin_inset Flex Code
15598 status collapsed
15599
15600 \begin_layout Plain Layout
15601 hebrew
15602 \end_layout
15603
15604 \end_inset
15605
15606  for hebrew numerals.
15607 \end_layout
15608
15609 \end_deeper
15610 \begin_layout Standard
15611 If LabelString is not defined, a default value is constructed as follows:
15612  if the counter has a master counter 
15613 \begin_inset Flex Code
15614 status collapsed
15615
15616 \begin_layout Plain Layout
15617 master
15618 \end_layout
15619
15620 \end_inset
15621
15622  (defined via 
15623 \begin_inset Flex Code
15624 status collapsed
15625
15626 \begin_layout Plain Layout
15627 Within
15628 \end_layout
15629
15630 \end_inset
15631
15632 ), the string 
15633 \begin_inset Flex Code
15634 status collapsed
15635
15636 \begin_layout Plain Layout
15637
15638 \backslash
15639 themaster.
15640 \backslash
15641 arabic{counter}
15642 \end_layout
15643
15644 \end_inset
15645
15646  is used; otherwise the string 
15647 \begin_inset Flex Code
15648 status collapsed
15649
15650 \begin_layout Plain Layout
15651
15652 \backslash
15653 arabic{counter}
15654 \end_layout
15655
15656 \end_inset
15657
15658  is used.
15659 \end_layout
15660
15661 \begin_layout Description
15662 \begin_inset Flex Code
15663 status collapsed
15664
15665 \begin_layout Plain Layout
15666 LabelStringAppendix
15667 \end_layout
15668
15669 \end_inset
15670
15671  [
15672 \begin_inset Flex Code
15673 status collapsed
15674
15675 \begin_layout Plain Layout
15676 string
15677 \end_layout
15678
15679 \end_inset
15680
15681 =
15682 \begin_inset Quotes erd
15683 \end_inset
15684
15685
15686 \begin_inset Quotes erd
15687 \end_inset
15688
15689 ] Same as 
15690 \begin_inset Flex Code
15691 status collapsed
15692
15693 \begin_layout Plain Layout
15694 LabelString
15695 \end_layout
15696
15697 \end_inset
15698
15699 , but for use in the Appendix.
15700 \end_layout
15701
15702 \begin_layout Description
15703 \begin_inset Flex Code
15704 status collapsed
15705
15706 \begin_layout Plain Layout
15707 PrettyFormat
15708 \end_layout
15709
15710 \end_inset
15711
15712  [
15713 \begin_inset Flex Code
15714 status collapsed
15715
15716 \begin_layout Plain Layout
15717 string
15718 \end_layout
15719
15720 \end_inset
15721
15722 =
15723 \begin_inset Quotes erd
15724 \end_inset
15725
15726
15727 \begin_inset Quotes erd
15728 \end_inset
15729
15730 ] A format for use with formatted references to this counter.
15731  For example, one might want to have references to section numbers appear
15732  as 
15733 \begin_inset Quotes eld
15734 \end_inset
15735
15736 Section 2.4
15737 \begin_inset Quotes erd
15738 \end_inset
15739
15740 .
15741  The string should contain 
15742 \begin_inset Quotes eld
15743 \end_inset
15744
15745 ##
15746 \begin_inset Quotes erd
15747 \end_inset
15748
15749 .
15750  This will be replaced by the counter number itself.
15751  So, for sections, it would be: Section ##.
15752 \end_layout
15753
15754 \begin_layout Description
15755 \begin_inset Flex Code
15756 status collapsed
15757
15758 \begin_layout Plain Layout
15759 Within
15760 \end_layout
15761
15762 \end_inset
15763
15764  [
15765 \begin_inset Flex Code
15766 status collapsed
15767
15768 \begin_layout Plain Layout
15769 string
15770 \end_layout
15771
15772 \end_inset
15773
15774 =
15775 \begin_inset Quotes erd
15776 \end_inset
15777
15778
15779 \begin_inset Quotes erd
15780 \end_inset
15781
15782 ] If this is set to the name of another counter, the present counter will
15783  be reset every time the other one is increased.
15784  For example, 
15785 \begin_inset Flex Code
15786 status collapsed
15787
15788 \begin_layout Plain Layout
15789 subsection
15790 \end_layout
15791
15792 \end_inset
15793
15794  is numbered inside 
15795 \begin_inset Flex Code
15796 status collapsed
15797
15798 \begin_layout Plain Layout
15799 section
15800 \end_layout
15801
15802 \end_inset
15803
15804 .
15805 \end_layout
15806
15807 \begin_layout Subsection
15808 Font description
15809 \begin_inset CommandInset label
15810 LatexCommand label
15811 name "sub:Font-description"
15812
15813 \end_inset
15814
15815
15816 \end_layout
15817
15818 \begin_layout Standard
15819 A font description looks like this:
15820 \end_layout
15821
15822 \begin_layout LyX-Code
15823 Font 
15824 \family roman
15825 \emph on
15826 or
15827 \family default
15828 \emph default
15829  LabelFont
15830 \end_layout
15831
15832 \begin_layout LyX-Code
15833  ...
15834 \end_layout
15835
15836 \begin_layout LyX-Code
15837 EndFont
15838 \end_layout
15839
15840 \begin_layout Standard
15841 The following commands are available:
15842 \end_layout
15843
15844 \begin_layout Description
15845 \begin_inset Flex Code
15846 status collapsed
15847
15848 \begin_layout Plain Layout
15849 Color
15850 \end_layout
15851
15852 \end_inset
15853
15854  [
15855 \begin_inset Flex Code
15856 status collapsed
15857
15858 \begin_layout Plain Layout
15859
15860 \emph on
15861 none
15862 \end_layout
15863
15864 \end_inset
15865
15866
15867 \begin_inset Flex Code
15868 status collapsed
15869
15870 \begin_layout Plain Layout
15871 black
15872 \end_layout
15873
15874 \end_inset
15875
15876
15877 \begin_inset Flex Code
15878 status collapsed
15879
15880 \begin_layout Plain Layout
15881 white
15882 \end_layout
15883
15884 \end_inset
15885
15886
15887 \begin_inset Flex Code
15888 status collapsed
15889
15890 \begin_layout Plain Layout
15891 red
15892 \end_layout
15893
15894 \end_inset
15895
15896
15897 \begin_inset Flex Code
15898 status collapsed
15899
15900 \begin_layout Plain Layout
15901 green
15902 \end_layout
15903
15904 \end_inset
15905
15906
15907 \begin_inset Flex Code
15908 status collapsed
15909
15910 \begin_layout Plain Layout
15911 blue
15912 \end_layout
15913
15914 \end_inset
15915
15916
15917 \begin_inset Flex Code
15918 status collapsed
15919
15920 \begin_layout Plain Layout
15921 cyan
15922 \end_layout
15923
15924 \end_inset
15925
15926
15927 \begin_inset Flex Code
15928 status collapsed
15929
15930 \begin_layout Plain Layout
15931 magenta
15932 \end_layout
15933
15934 \end_inset
15935
15936
15937 \begin_inset Flex Code
15938 status collapsed
15939
15940 \begin_layout Plain Layout
15941 yellow
15942 \end_layout
15943
15944 \end_inset
15945
15946 ]
15947 \end_layout
15948
15949 \begin_layout Description
15950 \begin_inset Flex Code
15951 status collapsed
15952
15953 \begin_layout Plain Layout
15954 Family
15955 \end_layout
15956
15957 \end_inset
15958
15959  [
15960 \begin_inset Flex Code
15961 status collapsed
15962
15963 \begin_layout Plain Layout
15964
15965 \emph on
15966 Roman
15967 \end_layout
15968
15969 \end_inset
15970
15971
15972 \begin_inset Flex Code
15973 status collapsed
15974
15975 \begin_layout Plain Layout
15976 Sans
15977 \end_layout
15978
15979 \end_inset
15980
15981
15982 \begin_inset Flex Code
15983 status collapsed
15984
15985 \begin_layout Plain Layout
15986 Typewriter
15987 \end_layout
15988
15989 \end_inset
15990
15991
15992 \end_layout
15993
15994 \begin_layout Description
15995 \begin_inset Flex Code
15996 status collapsed
15997
15998 \begin_layout Plain Layout
15999 Misc
16000 \end_layout
16001
16002 \end_inset
16003
16004  [
16005 \begin_inset Flex Code
16006 status collapsed
16007
16008 \begin_layout Plain Layout
16009 string
16010 \end_layout
16011
16012 \end_inset
16013
16014 ] Valid arguments are: 
16015 \begin_inset Flex Code
16016 status collapsed
16017
16018 \begin_layout Plain Layout
16019 emph
16020 \end_layout
16021
16022 \end_inset
16023
16024
16025 \begin_inset Flex Code
16026 status collapsed
16027
16028 \begin_layout Plain Layout
16029 noun
16030 \end_layout
16031
16032 \end_inset
16033
16034
16035 \begin_inset Flex Code
16036 status collapsed
16037
16038 \begin_layout Plain Layout
16039 underbar
16040 \end_layout
16041
16042 \end_inset
16043
16044
16045 \begin_inset Flex Code
16046 status collapsed
16047
16048 \begin_layout Plain Layout
16049 no_emph
16050 \end_layout
16051
16052 \end_inset
16053
16054
16055 \begin_inset Flex Code
16056 status collapsed
16057
16058 \begin_layout Plain Layout
16059 no_noun
16060 \end_layout
16061
16062 \end_inset
16063
16064  and 
16065 \begin_inset Flex Code
16066 status collapsed
16067
16068 \begin_layout Plain Layout
16069 no_bar
16070 \end_layout
16071
16072 \end_inset
16073
16074 .
16075  Each of these turns on or off the corresponding attribute.
16076  For example, 
16077 \begin_inset Flex Code
16078 status collapsed
16079
16080 \begin_layout Plain Layout
16081 emph
16082 \end_layout
16083
16084 \end_inset
16085
16086  turns on emphasis, and 
16087 \begin_inset Flex Code
16088 status collapsed
16089
16090 \begin_layout Plain Layout
16091 no_emph
16092 \end_layout
16093
16094 \end_inset
16095
16096  turns it off.
16097  
16098 \begin_inset Newline newline
16099 \end_inset
16100
16101 If the latter seems puzzling, remember that the font settings for the present
16102  context are generally inherited from the surrounding context.
16103  So 
16104 \begin_inset Flex Code
16105 status collapsed
16106
16107 \begin_layout Plain Layout
16108 no_emph
16109 \end_layout
16110
16111 \end_inset
16112
16113  would turn off the emphasis that was anyway in effect, say, in a theorem
16114  environment.
16115 \end_layout
16116
16117 \begin_layout Description
16118 \begin_inset Flex Code
16119 status collapsed
16120
16121 \begin_layout Plain Layout
16122 Series
16123 \end_layout
16124
16125 \end_inset
16126
16127  [
16128 \begin_inset Flex Code
16129 status collapsed
16130
16131 \begin_layout Plain Layout
16132
16133 \emph on
16134 Medium
16135 \end_layout
16136
16137 \end_inset
16138
16139
16140 \begin_inset Flex Code
16141 status collapsed
16142
16143 \begin_layout Plain Layout
16144 Bold
16145 \end_layout
16146
16147 \end_inset
16148
16149
16150 \end_layout
16151
16152 \begin_layout Description
16153 \begin_inset Flex Code
16154 status collapsed
16155
16156 \begin_layout Plain Layout
16157 Shape
16158 \end_layout
16159
16160 \end_inset
16161
16162  [
16163 \begin_inset Flex Code
16164 status collapsed
16165
16166 \begin_layout Plain Layout
16167
16168 \emph on
16169 Up
16170 \end_layout
16171
16172 \end_inset
16173
16174
16175 \begin_inset Flex Code
16176 status collapsed
16177
16178 \begin_layout Plain Layout
16179 Italic
16180 \end_layout
16181
16182 \end_inset
16183
16184
16185 \begin_inset Flex Code
16186 status collapsed
16187
16188 \begin_layout Plain Layout
16189 SmallCaps
16190 \end_layout
16191
16192 \end_inset
16193
16194
16195 \begin_inset Flex Code
16196 status collapsed
16197
16198 \begin_layout Plain Layout
16199 Slanted
16200 \end_layout
16201
16202 \end_inset
16203
16204
16205 \end_layout
16206
16207 \begin_layout Description
16208 \begin_inset Flex Code
16209 status collapsed
16210
16211 \begin_layout Plain Layout
16212 Size
16213 \end_layout
16214
16215 \end_inset
16216
16217  [
16218 \begin_inset Flex Code
16219 status collapsed
16220
16221 \begin_layout Plain Layout
16222 tiny
16223 \end_layout
16224
16225 \end_inset
16226
16227
16228 \begin_inset Flex Code
16229 status collapsed
16230
16231 \begin_layout Plain Layout
16232 small
16233 \end_layout
16234
16235 \end_inset
16236
16237
16238 \begin_inset Flex Code
16239 status collapsed
16240
16241 \begin_layout Plain Layout
16242
16243 \emph on
16244 normal
16245 \end_layout
16246
16247 \end_inset
16248
16249
16250 \begin_inset Flex Code
16251 status collapsed
16252
16253 \begin_layout Plain Layout
16254 large
16255 \end_layout
16256
16257 \end_inset
16258
16259
16260 \begin_inset Flex Code
16261 status collapsed
16262
16263 \begin_layout Plain Layout
16264 larger
16265 \end_layout
16266
16267 \end_inset
16268
16269
16270 \begin_inset Flex Code
16271 status collapsed
16272
16273 \begin_layout Plain Layout
16274 largest
16275 \end_layout
16276
16277 \end_inset
16278
16279
16280 \begin_inset Flex Code
16281 status collapsed
16282
16283 \begin_layout Plain Layout
16284 huge
16285 \end_layout
16286
16287 \end_inset
16288
16289
16290 \begin_inset Flex Code
16291 status collapsed
16292
16293 \begin_layout Plain Layout
16294 giant
16295 \end_layout
16296
16297 \end_inset
16298
16299 ]
16300 \end_layout
16301
16302 \begin_layout Subsection
16303 \begin_inset CommandInset label
16304 LatexCommand label
16305 name "sub:Citation-format-description"
16306
16307 \end_inset
16308
16309 Citation format description
16310 \end_layout
16311
16312 \begin_layout Standard
16313 The 
16314 \begin_inset Flex Code
16315 status collapsed
16316
16317 \begin_layout Plain Layout
16318 CiteFormat
16319 \end_layout
16320
16321 \end_inset
16322
16323  blocks are used to describe how bibliographic information should be displayed,
16324  both within LyX itself (in the citation dialog and in tooltips, for example)
16325  and in XHTML output.
16326  Such a block might look like this:
16327 \end_layout
16328
16329 \begin_layout LyX-Code
16330 CiteFormat
16331 \end_layout
16332
16333 \begin_layout LyX-Code
16334  article ...
16335 \end_layout
16336
16337 \begin_layout LyX-Code
16338  book ...
16339 \end_layout
16340
16341 \begin_layout LyX-Code
16342 End
16343 \end_layout
16344
16345 \begin_layout Standard
16346 The individual lines define how the bibliographic information associated
16347  with an article or book, respectively, is to be displayed, and such a definitio
16348 n can be given for any `entry type' that might be present in a BibTeX file.
16349  LyX defines a default format in the source code that will be used if no
16350  specific definition has been given.
16351  LyX predefines several formats in the file 
16352 \begin_inset Flex Code
16353 status collapsed
16354
16355 \begin_layout Plain Layout
16356 stdciteformats.inc
16357 \end_layout
16358
16359 \end_inset
16360
16361 , which is included in most of LyX's document classes.
16362 \end_layout
16363
16364 \begin_layout Standard
16365 The definitions use a simple language that allows BibTeX keys to be replaced
16366  with their values.
16367  Keys should be enclosed in 
16368 \begin_inset Flex Code
16369 status collapsed
16370
16371 \begin_layout Plain Layout
16372 %
16373 \end_layout
16374
16375 \end_inset
16376
16377  signs, e.g.: 
16378 \begin_inset Flex Code
16379 status collapsed
16380
16381 \begin_layout Plain Layout
16382 %author%
16383 \end_layout
16384
16385 \end_inset
16386
16387 .
16388  So a simple definition might look like this:
16389 \end_layout
16390
16391 \begin_layout LyX-Code
16392 misc %author%, 
16393 \begin_inset Quotes eld
16394 \end_inset
16395
16396 %title
16397 \begin_inset Quotes erd
16398 \end_inset
16399
16400 .
16401 \end_layout
16402
16403 \begin_layout Standard
16404 This would print the author, followed by a comma, followed by the title,
16405  in quotes, followed by a period.
16406 \end_layout
16407
16408 \begin_layout Standard
16409 Of course, sometimes you may want to print a key only if it exists.
16410  This can be done by using a conditional construction, such as: 
16411 \begin_inset Flex Code
16412 status collapsed
16413
16414 \begin_layout Plain Layout
16415 {%volume%[[vol.
16416 \begin_inset space ~
16417 \end_inset
16418
16419 %volume%]]}
16420 \end_layout
16421
16422 \end_inset
16423
16424 .
16425  This says: If the 
16426 \begin_inset Flex Code
16427 status collapsed
16428
16429 \begin_layout Plain Layout
16430 volume
16431 \end_layout
16432
16433 \end_inset
16434
16435  key exists, then print 
16436 \begin_inset Quotes eld
16437 \end_inset
16438
16439 vol.
16440 \begin_inset space ~
16441 \end_inset
16442
16443
16444 \begin_inset Quotes erd
16445 \end_inset
16446
16447  followed by the volume key.
16448  It is also possible to have an else clause in the conditional, such as:
16449  
16450 \begin_inset Flex Code
16451 status collapsed
16452
16453 \begin_layout Plain Layout
16454 {%author%[[%author%]][[%editor%, ed.]]}
16455 \end_layout
16456
16457 \end_inset
16458
16459 .
16460  Here, the 
16461 \begin_inset Flex Code
16462 status collapsed
16463
16464 \begin_layout Plain Layout
16465 author
16466 \end_layout
16467
16468 \end_inset
16469
16470  key is printed if it exists; otherwise, the editor key is printed, followed
16471  by 
16472 \begin_inset Quotes eld
16473 \end_inset
16474
16475 ,
16476 \begin_inset space ~
16477 \end_inset
16478
16479 ed.
16480 \begin_inset Quotes erd
16481 \end_inset
16482
16483  Note that the key is again enclosed in 
16484 \begin_inset Flex Code
16485 status collapsed
16486
16487 \begin_layout Plain Layout
16488 %
16489 \end_layout
16490
16491 \end_inset
16492
16493  signs; the entire conditional is enclosed in braces; and the if and else
16494  clauses are enclosed in double brackets, 
16495 \begin_inset Quotes eld
16496 \end_inset
16497
16498
16499 \begin_inset Flex Code
16500 status collapsed
16501
16502 \begin_layout Plain Layout
16503 [[
16504 \end_layout
16505
16506 \end_inset
16507
16508
16509 \begin_inset Quotes eld
16510 \end_inset
16511
16512  and 
16513 \begin_inset Quotes eld
16514 \end_inset
16515
16516
16517 \begin_inset Flex Code
16518 status collapsed
16519
16520 \begin_layout Plain Layout
16521 ]]
16522 \end_layout
16523
16524 \end_inset
16525
16526
16527 \begin_inset Quotes erd
16528 \end_inset
16529
16530 .
16531  There must be no space between any of these.
16532 \end_layout
16533
16534 \begin_layout Standard
16535 There is one other piece of syntax available in definitions, which looks
16536  like this: 
16537 \begin_inset Flex Code
16538 status collapsed
16539
16540 \begin_layout Plain Layout
16541 {!<i>!}
16542 \end_layout
16543
16544 \end_inset
16545
16546 .
16547  This defines a piece of formatting information that is to be used when
16548  creating 
16549 \begin_inset Quotes eld
16550 \end_inset
16551
16552 rich text
16553 \begin_inset Quotes erd
16554 \end_inset
16555
16556 .
16557  Obviously, we do not want to output HTML tags when writing plain text,
16558  so they should be wrapped in 
16559 \begin_inset Quotes eld
16560 \end_inset
16561
16562 {!
16563 \begin_inset Quotes erd
16564 \end_inset
16565
16566  and 
16567 \begin_inset Quotes eld
16568 \end_inset
16569
16570 !}
16571 \begin_inset Quotes erd
16572 \end_inset
16573
16574 .
16575 \end_layout
16576
16577 \begin_layout Standard
16578 Two special sorts of definitions are also possible in a 
16579 \begin_inset Flex Code
16580 status collapsed
16581
16582 \begin_layout Plain Layout
16583 CiteFormat
16584 \end_layout
16585
16586 \end_inset
16587
16588  block.
16589  An example of the first would be:
16590 \end_layout
16591
16592 \begin_layout LyX-Code
16593 !quotetitle 
16594 \begin_inset Quotes eld
16595 \end_inset
16596
16597 %title%
16598 \begin_inset Quotes erd
16599 \end_inset
16600
16601
16602 \end_layout
16603
16604 \begin_layout Standard
16605 This is an abbreviation, or macro, and it can be used by treating it as
16606  if it were a key: 
16607 \begin_inset Flex Code
16608 status collapsed
16609
16610 \begin_layout Plain Layout
16611 %!quotetitle%
16612 \end_layout
16613
16614 \end_inset
16615
16616 .
16617  LyX will treat 
16618 \begin_inset Flex Code
16619 status collapsed
16620
16621 \begin_layout Plain Layout
16622 %!quotetitle%
16623 \end_layout
16624
16625 \end_inset
16626
16627  exactly as it would treat its definition.
16628  So, let us issue the obvious 
16629 \emph on
16630 warning
16631 \emph default
16632 .
16633  Do not do this:
16634 \end_layout
16635
16636 \begin_layout LyX-Code
16637 !funfun %funfun%
16638 \end_layout
16639
16640 \begin_layout Standard
16641 or anything like it.
16642  LyX shouldn't go into an infinite loop, but it may go into a long one before
16643  it gives up.
16644 \end_layout
16645
16646 \begin_layout Standard
16647 The second sort of special definition might look like this:
16648 \end_layout
16649
16650 \begin_layout LyX-Code
16651 _pptext pp.
16652 \end_layout
16653
16654 \begin_layout Standard
16655 This defines a translatable piece of text, which allows relevant parts of
16656  the bibliography to be translated.
16657  It can be included in a definition by treating it as a key: 
16658 \begin_inset Flex Code
16659 status collapsed
16660
16661 \begin_layout Plain Layout
16662 %_pptext%
16663 \end_layout
16664
16665 \end_inset
16666
16667 .
16668  Several of these are predefined in 
16669 \begin_inset Flex Code
16670 status collapsed
16671
16672 \begin_layout Plain Layout
16673 stdciteformats.inc
16674 \end_layout
16675
16676 \end_inset
16677
16678 .
16679  Note that these are not macros, in the sense just defined.
16680  They will not be expanded.
16681 \end_layout
16682
16683 \begin_layout Standard
16684 So here then is an example that use all these features:
16685 \end_layout
16686
16687 \begin_layout LyX-Code
16688 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
16689 \end_layout
16690
16691 \begin_layout Standard
16692 This defines a macro that prints the author, followed by a comma, if the
16693  
16694 \begin_inset Flex Code
16695 status collapsed
16696
16697 \begin_layout Plain Layout
16698 author
16699 \end_layout
16700
16701 \end_inset
16702
16703  key is defined, or else prints the name of the editor, followed by the
16704  
16705 \begin_inset Flex Code
16706 status collapsed
16707
16708 \begin_layout Plain Layout
16709 _edtext
16710 \end_layout
16711
16712 \end_inset
16713
16714  or its translation (it is by default 
16715 \begin_inset Quotes eld
16716 \end_inset
16717
16718 ed.
16719 \begin_inset Quotes erd
16720 \end_inset
16721
16722 ), if the 
16723 \begin_inset Flex Code
16724 status collapsed
16725
16726 \begin_layout Plain Layout
16727 editor
16728 \end_layout
16729
16730 \end_inset
16731
16732  key is defined.
16733  Note that this is in fact defined in 
16734 \begin_inset Flex Code
16735 status collapsed
16736
16737 \begin_layout Plain Layout
16738 stdciteformats.inc
16739 \end_layout
16740
16741 \end_inset
16742
16743 , so you can use it in your own definitions, or re-definitions, if you load
16744  that file first.
16745 \end_layout
16746
16747 \begin_layout Section
16748 \begin_inset CommandInset label
16749 LatexCommand label
16750 name "sec:Tags-for-XHTML"
16751
16752 \end_inset
16753
16754 Tags for XHTML output
16755 \end_layout
16756
16757 \begin_layout Standard
16758 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
16759  by layout information.
16760  In general, LyX provides sensible defaults and, as mentioned earlier, it
16761  will even construct default CSS style rules from the other layout tags.
16762  For example, LyX will attempt to use the information provided in the 
16763 \begin_inset Flex Code
16764 status collapsed
16765
16766 \begin_layout Plain Layout
16767 Font
16768 \end_layout
16769
16770 \end_inset
16771
16772  declaration for the Chapter style to write CSS that will appropriately
16773  format chapter headings.
16774 \end_layout
16775
16776 \begin_layout Standard
16777 In many cases, then, you may not have to do anything at all to get acceptable
16778  XHTML output for your own environments, custom insets, and so forth.
16779  But in some cases you will, and so LyX provides a number of layout tags
16780  that can be used to customize the XHTML and CSS that are generated.
16781 \end_layout
16782
16783 \begin_layout Standard
16784 Note that there are two tags, 
16785 \begin_inset Flex Code
16786 status collapsed
16787
16788 \begin_layout Plain Layout
16789 HTMLPreamble
16790 \end_layout
16791
16792 \end_inset
16793
16794  and 
16795 \begin_inset Flex Code
16796 status collapsed
16797
16798 \begin_layout Plain Layout
16799 AddToHTMLPreamble
16800 \end_layout
16801
16802 \end_inset
16803
16804  that may appear outside style and inset declarations.
16805  See 
16806 \begin_inset CommandInset ref
16807 LatexCommand ref
16808 reference "sub:General-text-class"
16809
16810 \end_inset
16811
16812  for details on these.
16813 \end_layout
16814
16815 \begin_layout Subsection
16816 \begin_inset CommandInset label
16817 LatexCommand label
16818 name "sub:Paragraph-Style-XHTML"
16819
16820 \end_inset
16821
16822 Paragraph styles
16823 \end_layout
16824
16825 \begin_layout Standard
16826 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
16827  dealing with a normal paragraph, a command, or an environment, where this
16828  is itself determined by the contents of the corresponding 
16829 \begin_inset Flex Code
16830 status collapsed
16831
16832 \begin_layout Plain Layout
16833 LaTeXType
16834 \end_layout
16835
16836 \end_inset
16837
16838  tag.
16839  
16840 \end_layout
16841
16842 \begin_layout Standard
16843 For a command or normal paragraph, the output XHTML has the following form:
16844 \end_layout
16845
16846 \begin_layout LyX-Code
16847 <tag attr=
16848 \begin_inset Quotes erd
16849 \end_inset
16850
16851 value
16852 \begin_inset Quotes erd
16853 \end_inset
16854
16855 >
16856 \end_layout
16857
16858 \begin_layout LyX-Code
16859 <labeltag attr=
16860 \begin_inset Quotes erd
16861 \end_inset
16862
16863 value
16864 \begin_inset Quotes erd
16865 \end_inset
16866
16867 >Label</labeltag>
16868 \end_layout
16869
16870 \begin_layout LyX-Code
16871 Contents of the paragraph.
16872 \end_layout
16873
16874 \begin_layout LyX-Code
16875 </tag>
16876 \end_layout
16877
16878 \begin_layout Standard
16879 The label tags are of course omitted if the paragraph does not have a label.
16880 \end_layout
16881
16882 \begin_layout Standard
16883 For an environment that is not some sort of list, the XHTML takes this form:
16884 \end_layout
16885
16886 \begin_layout LyX-Code
16887 <tag attr=
16888 \begin_inset Quotes erd
16889 \end_inset
16890
16891 value
16892 \begin_inset Quotes erd
16893 \end_inset
16894
16895 >
16896 \end_layout
16897
16898 \begin_layout LyX-Code
16899 <itemtag attr=
16900 \begin_inset Quotes erd
16901 \end_inset
16902
16903 value
16904 \begin_inset Quotes erd
16905 \end_inset
16906
16907 ><labeltag attr=
16908 \begin_inset Quotes erd
16909 \end_inset
16910
16911 value
16912 \begin_inset Quotes erd
16913 \end_inset
16914
16915 >Environment Label</labeltag>First paragraph.</itemtag>
16916 \end_layout
16917
16918 \begin_layout LyX-Code
16919 <itemtag>Second paragraph.</itemtag>
16920 \end_layout
16921
16922 \begin_layout LyX-Code
16923 </tag>
16924 \end_layout
16925
16926 \begin_layout Standard
16927 Note that the label is output only for the first paragraph, as it should
16928  be for a theorem, for example.
16929  
16930 \end_layout
16931
16932 \begin_layout Standard
16933 For a list, we have one of these forms:
16934 \end_layout
16935
16936 \begin_layout LyX-Code
16937 <tag attr=
16938 \begin_inset Quotes erd
16939 \end_inset
16940
16941 value
16942 \begin_inset Quotes erd
16943 \end_inset
16944
16945 >
16946 \end_layout
16947
16948 \begin_layout LyX-Code
16949 <itemtag attr=
16950 \begin_inset Quotes erd
16951 \end_inset
16952
16953 value
16954 \begin_inset Quotes erd
16955 \end_inset
16956
16957 ><labeltag attr=
16958 \begin_inset Quotes erd
16959 \end_inset
16960
16961 value
16962 \begin_inset Quotes erd
16963 \end_inset
16964
16965 >List Label</labeltag>First item.</itemtag>
16966 \end_layout
16967
16968 \begin_layout LyX-Code
16969 <itemtag attr=
16970 \begin_inset Quotes erd
16971 \end_inset
16972
16973 value
16974 \begin_inset Quotes erd
16975 \end_inset
16976
16977 ><labeltag attr=
16978 \begin_inset Quotes erd
16979 \end_inset
16980
16981 value
16982 \begin_inset Quotes erd
16983 \end_inset
16984
16985 >List Label</labeltag>Second item.</itemtag>
16986 \end_layout
16987
16988 \begin_layout LyX-Code
16989 </tag>
16990 \end_layout
16991
16992 \begin_layout LyX-Code
16993
16994 \end_layout
16995
16996 \begin_layout LyX-Code
16997 <tag attr=
16998 \begin_inset Quotes erd
16999 \end_inset
17000
17001 value
17002 \begin_inset Quotes erd
17003 \end_inset
17004
17005 >
17006 \end_layout
17007
17008 \begin_layout LyX-Code
17009 <labeltag attr=
17010 \begin_inset Quotes erd
17011 \end_inset
17012
17013 value
17014 \begin_inset Quotes erd
17015 \end_inset
17016
17017 >List Label</labeltag><itemtag attr=
17018 \begin_inset Quotes erd
17019 \end_inset
17020
17021 value
17022 \begin_inset Quotes erd
17023 \end_inset
17024
17025 >First item.</itemtag>
17026 \end_layout
17027
17028 \begin_layout LyX-Code
17029 <labeltag attr=
17030 \begin_inset Quotes erd
17031 \end_inset
17032
17033 value
17034 \begin_inset Quotes erd
17035 \end_inset
17036
17037 >List Label</labeltag><itemtag attr=
17038 \begin_inset Quotes erd
17039 \end_inset
17040
17041 value
17042 \begin_inset Quotes erd
17043 \end_inset
17044
17045 >Second item.</itemtag>
17046 \end_layout
17047
17048 \begin_layout LyX-Code
17049 </tag>
17050 \end_layout
17051
17052 \begin_layout Standard
17053 Note the different orders of 
17054 \begin_inset Flex Code
17055 status collapsed
17056
17057 \begin_layout Plain Layout
17058 labeltag
17059 \end_layout
17060
17061 \end_inset
17062
17063  and 
17064 \begin_inset Flex Code
17065 status collapsed
17066
17067 \begin_layout Plain Layout
17068 itemtag
17069 \end_layout
17070
17071 \end_inset
17072
17073 .
17074  Which order we get depends upon the setting of 
17075 \begin_inset Flex Code
17076 status collapsed
17077
17078 \begin_layout Plain Layout
17079 HTMLLabelFirst
17080 \end_layout
17081
17082 \end_inset
17083
17084 : If 
17085 \begin_inset Flex Code
17086 status collapsed
17087
17088 \begin_layout Plain Layout
17089 HTMLLabelFirst
17090 \end_layout
17091
17092 \end_inset
17093
17094  is false (the default), you get the first of these, with the label within
17095  the item; if true, you get the second, with the label outside the item.
17096 \end_layout
17097
17098 \begin_layout Standard
17099 The specific tags and attributes output for each paragraph type can be controlle
17100 d by means of the layout tags we are about to describe.
17101  As mentioned earlier, however, LyX uses sensible defaults for many of these,
17102  so you often may not need to do very much to get good XHTML output.
17103  Think of the available tags as there so you can tweak things to your liking.
17104 \end_layout
17105
17106 \begin_layout Description
17107 \begin_inset Flex Code
17108 status collapsed
17109
17110 \begin_layout Plain Layout
17111 HTMLAttr
17112 \end_layout
17113
17114 \end_inset
17115
17116  [
17117 \begin_inset Flex Code
17118 status collapsed
17119
17120 \begin_layout Plain Layout
17121 string
17122 \end_layout
17123
17124 \end_inset
17125
17126 ] Specifies attribute information to be output with the main tag.
17127  For example, 
17128 \begin_inset Quotes eld
17129 \end_inset
17130
17131
17132 \begin_inset Flex Code
17133 status collapsed
17134
17135 \begin_layout Plain Layout
17136 class=`mydiv'
17137 \end_layout
17138
17139 \end_inset
17140
17141
17142 \begin_inset Quotes erd
17143 \end_inset
17144
17145 .
17146  By default, LyX will output 
17147 \begin_inset Quotes eld
17148 \end_inset
17149
17150
17151 \begin_inset Flex Code
17152 status collapsed
17153
17154 \begin_layout Plain Layout
17155 class=`layoutname'
17156 \end_layout
17157
17158 \end_inset
17159
17160
17161 \begin_inset Quotes erd
17162 \end_inset
17163
17164 , where 
17165 \begin_inset Flex Code
17166 status collapsed
17167
17168 \begin_layout Plain Layout
17169 layoutname
17170 \end_layout
17171
17172 \end_inset
17173
17174  is the LyX name of the layout, made lowercase, for example: chapter.
17175  This should 
17176 \emph on
17177 not
17178 \emph default
17179  contain any style information.
17180  Use 
17181 \begin_inset Flex Code
17182 status collapsed
17183
17184 \begin_layout Plain Layout
17185 HTMLStyle
17186 \end_layout
17187
17188 \end_inset
17189
17190  for that purpose.
17191 \end_layout
17192
17193 \begin_layout Description
17194 \begin_inset Flex Code
17195 status collapsed
17196
17197 \begin_layout Plain Layout
17198 HTMLForceCSS
17199 \end_layout
17200
17201 \end_inset
17202
17203  [
17204 \begin_inset Flex Code
17205 status collapsed
17206
17207 \begin_layout Plain Layout
17208
17209 \emph on
17210 0
17211 \emph default
17212 ,1
17213 \end_layout
17214
17215 \end_inset
17216
17217 ] Whether to output the default CSS information LyX generates for this layout,
17218  even if additional information is explicitly provided via 
17219 \begin_inset Flex Code
17220 status collapsed
17221
17222 \begin_layout Plain Layout
17223 HTMLStyle
17224 \end_layout
17225
17226 \end_inset
17227
17228 .
17229  Setting this to 
17230 \begin_inset Flex Code
17231 status collapsed
17232
17233 \begin_layout Plain Layout
17234 1
17235 \end_layout
17236
17237 \end_inset
17238
17239  allows you to alter or augment the generated CSS, rather than to override
17240  it completely.
17241  Default is 
17242 \begin_inset Flex Code
17243 status collapsed
17244
17245 \begin_layout Plain Layout
17246 0
17247 \end_layout
17248
17249 \end_inset
17250
17251 .
17252 \end_layout
17253
17254 \begin_layout Description
17255 \begin_inset Flex Code
17256 status collapsed
17257
17258 \begin_layout Plain Layout
17259 HTMLItem
17260 \end_layout
17261
17262 \end_inset
17263
17264  [
17265 \begin_inset Flex Code
17266 status collapsed
17267
17268 \begin_layout Plain Layout
17269 string
17270 \end_layout
17271
17272 \end_inset
17273
17274 ] The tag to be used for individual paragraphs of environments, replacing
17275  
17276 \begin_inset Flex Code
17277 status collapsed
17278
17279 \begin_layout Plain Layout
17280 itemtag
17281 \end_layout
17282
17283 \end_inset
17284
17285  in the examples above.
17286  Defaults to 
17287 \begin_inset Flex Code
17288 status collapsed
17289
17290 \begin_layout Plain Layout
17291 div
17292 \end_layout
17293
17294 \end_inset
17295
17296 .
17297 \end_layout
17298
17299 \begin_layout Description
17300 \begin_inset Flex Code
17301 status collapsed
17302
17303 \begin_layout Plain Layout
17304 HTMLItemAttr
17305 \end_layout
17306
17307 \end_inset
17308
17309  [
17310 \begin_inset Flex Code
17311 status collapsed
17312
17313 \begin_layout Plain Layout
17314 string
17315 \end_layout
17316
17317 \end_inset
17318
17319 ] Attributes for the item tag.
17320  Defaults to 
17321 \begin_inset Quotes eld
17322 \end_inset
17323
17324
17325 \begin_inset Flex Code
17326 status collapsed
17327
17328 \begin_layout Plain Layout
17329 class=`layoutname_item'
17330 \end_layout
17331
17332 \end_inset
17333
17334
17335 \begin_inset Quotes erd
17336 \end_inset
17337
17338 .
17339  This should 
17340 \emph on
17341 not
17342 \emph default
17343  contain any style information.
17344  Use 
17345 \begin_inset Flex Code
17346 status collapsed
17347
17348 \begin_layout Plain Layout
17349 HTMLStyle
17350 \end_layout
17351
17352 \end_inset
17353
17354  for that purpose.
17355 \end_layout
17356
17357 \begin_layout Description
17358 \begin_inset Flex Code
17359 status collapsed
17360
17361 \begin_layout Plain Layout
17362 HTMLLabel
17363 \end_layout
17364
17365 \end_inset
17366
17367  [
17368 \begin_inset Flex Code
17369 status collapsed
17370
17371 \begin_layout Plain Layout
17372 string
17373 \end_layout
17374
17375 \end_inset
17376
17377 ] The tag to be used for paragraph and item labels, replacing 
17378 \begin_inset Flex Code
17379 status collapsed
17380
17381 \begin_layout Plain Layout
17382 labeltag
17383 \end_layout
17384
17385 \end_inset
17386
17387  in the examples above.
17388  Defaults to 
17389 \begin_inset Flex Code
17390 status collapsed
17391
17392 \begin_layout Plain Layout
17393 span
17394 \end_layout
17395
17396 \end_inset
17397
17398 , unless 
17399 \begin_inset Flex Code
17400 status collapsed
17401
17402 \begin_layout Plain Layout
17403 LabelType
17404 \end_layout
17405
17406 \end_inset
17407
17408  is either 
17409 \begin_inset Flex Code
17410 status collapsed
17411
17412 \begin_layout Plain Layout
17413 Top_Environment
17414 \end_layout
17415
17416 \end_inset
17417
17418  or 
17419 \begin_inset Flex Code
17420 status collapsed
17421
17422 \begin_layout Plain Layout
17423 Centered_Top_Environment
17424 \end_layout
17425
17426 \end_inset
17427
17428 , in which case it defaults to 
17429 \begin_inset Flex Code
17430 status collapsed
17431
17432 \begin_layout Plain Layout
17433 div
17434 \end_layout
17435
17436 \end_inset
17437
17438 .
17439 \end_layout
17440
17441 \begin_layout Description
17442 \begin_inset Flex Code
17443 status collapsed
17444
17445 \begin_layout Plain Layout
17446 HTMLLabelAttr
17447 \end_layout
17448
17449 \end_inset
17450
17451  [
17452 \begin_inset Flex Code
17453 status collapsed
17454
17455 \begin_layout Plain Layout
17456 string
17457 \end_layout
17458
17459 \end_inset
17460
17461 ] Attributes for the label tag.
17462  Defaults to 
17463 \begin_inset Quotes eld
17464 \end_inset
17465
17466
17467 \begin_inset Flex Code
17468 status collapsed
17469
17470 \begin_layout Plain Layout
17471 class=`layoutname_label'
17472 \end_layout
17473
17474 \end_inset
17475
17476
17477 \begin_inset Quotes erd
17478 \end_inset
17479
17480 .
17481  This should 
17482 \emph on
17483 not
17484 \emph default
17485  contain any style information.
17486  Use 
17487 \begin_inset Flex Code
17488 status collapsed
17489
17490 \begin_layout Plain Layout
17491 HTMLStyle
17492 \end_layout
17493
17494 \end_inset
17495
17496  for that purpose.
17497 \end_layout
17498
17499 \begin_layout Description
17500 \begin_inset Flex Code
17501 status collapsed
17502
17503 \begin_layout Plain Layout
17504 HTMLLabelFirst
17505 \end_layout
17506
17507 \end_inset
17508
17509  [
17510 \begin_inset Flex Code
17511 status collapsed
17512
17513 \begin_layout Plain Layout
17514
17515 \emph on
17516 0
17517 \emph default
17518 ,1
17519 \end_layout
17520
17521 \end_inset
17522
17523 ] Meaningful only for list-like environments, this tag controls whether
17524  the label tag is output before or inside the item tag.
17525  This is used, for example, in the description environment, where we want
17526  `
17527 \begin_inset Flex Code
17528 status collapsed
17529
17530 \begin_layout Plain Layout
17531 <dt>\SpecialChar \ldots{}
17532 </dt><dd>\SpecialChar \ldots{}
17533 </dd>
17534 \end_layout
17535
17536 \end_inset
17537
17538 .
17539  Default is 
17540 \begin_inset Flex Code
17541 status collapsed
17542
17543 \begin_layout Plain Layout
17544 0
17545 \end_layout
17546
17547 \end_inset
17548
17549 : The label tag is output inside the item tag.
17550 \end_layout
17551
17552 \begin_layout Description
17553 \begin_inset Flex Code
17554 status collapsed
17555
17556 \begin_layout Plain Layout
17557 HTMLPreamble
17558 \end_layout
17559
17560 \end_inset
17561
17562  Information to be output in the 
17563 \begin_inset Flex Code
17564 status collapsed
17565
17566 \begin_layout Plain Layout
17567 <head>
17568 \end_layout
17569
17570 \end_inset
17571
17572  section when this style is used.
17573  This might, for example, be used to include a 
17574 \begin_inset Flex Code
17575 status collapsed
17576
17577 \begin_layout Plain Layout
17578 <script>
17579 \end_layout
17580
17581 \end_inset
17582
17583  block defining an 
17584 \begin_inset Flex Code
17585 status collapsed
17586
17587 \begin_layout Plain Layout
17588 onclick
17589 \end_layout
17590
17591 \end_inset
17592
17593  handler.
17594 \end_layout
17595
17596 \begin_layout Description
17597 \begin_inset Flex Code
17598 status collapsed
17599
17600 \begin_layout Plain Layout
17601 HTMLStyle
17602 \end_layout
17603
17604 \end_inset
17605
17606  CSS style information to be included when this style is used.
17607  Note that this will automatically be wrapped in a layout-generated 
17608 \begin_inset Flex Code
17609 status collapsed
17610
17611 \begin_layout Plain Layout
17612 <style>
17613 \end_layout
17614
17615 \end_inset
17616
17617  block, so only the CSS itself need be included.
17618 \end_layout
17619
17620 \begin_layout Description
17621 \begin_inset Flex Code
17622 status collapsed
17623
17624 \begin_layout Plain Layout
17625 HTMLTag
17626 \end_layout
17627
17628 \end_inset
17629
17630  [
17631 \begin_inset Flex Code
17632 status collapsed
17633
17634 \begin_layout Plain Layout
17635 string
17636 \end_layout
17637
17638 \end_inset
17639
17640 ] The tag to be used for the main label, replacing 
17641 \begin_inset Flex Code
17642 status collapsed
17643
17644 \begin_layout Plain Layout
17645 tag
17646 \end_layout
17647
17648 \end_inset
17649
17650  in the examples above.
17651  Defaults to 
17652 \begin_inset Flex Code
17653 status collapsed
17654
17655 \begin_layout Plain Layout
17656 div
17657 \end_layout
17658
17659 \end_inset
17660
17661 .
17662 \end_layout
17663
17664 \begin_layout Description
17665 \begin_inset Flex Code
17666 status collapsed
17667
17668 \begin_layout Plain Layout
17669 HTMLTitle
17670 \end_layout
17671
17672 \end_inset
17673
17674  [
17675 \begin_inset Flex Code
17676 status collapsed
17677
17678 \begin_layout Plain Layout
17679
17680 \emph on
17681 0
17682 \emph default
17683 ,1
17684 \end_layout
17685
17686 \end_inset
17687
17688 ] Marks this style as the one to be used to generate the 
17689 \begin_inset Flex Code
17690 status collapsed
17691
17692 \begin_layout Plain Layout
17693 <title>
17694 \end_layout
17695
17696 \end_inset
17697
17698  tag for the XHTML file.
17699  By default, it is false.
17700  The 
17701 \begin_inset Flex Code
17702 status collapsed
17703
17704 \begin_layout Plain Layout
17705 stdtitle.inc
17706 \end_layout
17707
17708 \end_inset
17709
17710  file sets it to true for the 
17711 \begin_inset Flex Code
17712 status collapsed
17713
17714 \begin_layout Plain Layout
17715 title
17716 \end_layout
17717
17718 \end_inset
17719
17720  environment.
17721  
17722 \end_layout
17723
17724 \begin_layout Subsection
17725 InsetLayout XHTML
17726 \end_layout
17727
17728 \begin_layout Standard
17729 The XHTML output of insets can also be controlled by information in layout
17730  files.
17731 \begin_inset Foot
17732 status collapsed
17733
17734 \begin_layout Plain Layout
17735 At present, this is true only for 
17736 \begin_inset Quotes eld
17737 \end_inset
17738
17739 text
17740 \begin_inset Quotes erd
17741 \end_inset
17742
17743  insets (insets you can type into) and is not true for 
17744 \begin_inset Quotes eld
17745 \end_inset
17746
17747 command
17748 \begin_inset Quotes erd
17749 \end_inset
17750
17751  insets (insets that are associated with dialog boxes).
17752 \end_layout
17753
17754 \end_inset
17755
17756  Here, too, LyX tries to provide sensible defaults, and it constructs default
17757  CSS style rules.
17758  But everything can be customized.
17759 \end_layout
17760
17761 \begin_layout Standard
17762 The XHTML LyX outputs for an inset has the following form:
17763 \end_layout
17764
17765 \begin_layout LyX-Code
17766 <tag attr=
17767 \begin_inset Quotes erd
17768 \end_inset
17769
17770 value
17771 \begin_inset Quotes erd
17772 \end_inset
17773
17774 >
17775 \end_layout
17776
17777 \begin_layout LyX-Code
17778 <labeltag>Label</labeltag>
17779 \end_layout
17780
17781 \begin_layout LyX-Code
17782 <innertag attr=
17783 \begin_inset Quotes erd
17784 \end_inset
17785
17786 value
17787 \begin_inset Quotes erd
17788 \end_inset
17789
17790 >Contents of the inset.</innertag>
17791 \end_layout
17792
17793 \begin_layout LyX-Code
17794 </tag>
17795 \end_layout
17796
17797 \begin_layout Standard
17798 If the inset permits multiple paragraphs---that is, if 
17799 \begin_inset Flex Code
17800 status collapsed
17801
17802 \begin_layout Plain Layout
17803 MultiPar
17804 \end_layout
17805
17806 \end_inset
17807
17808  is true---then the contents of the inset will itself be output as paragraphs
17809  formatted according to the styles used for those paragraphs (standard,
17810  quote, and the like).
17811  The label tag is of course omitted if the paragraph does not have a label
17812  and, at present, is always 
17813 \begin_inset Flex Code
17814 status collapsed
17815
17816 \begin_layout Plain Layout
17817 span
17818 \end_layout
17819
17820 \end_inset
17821
17822 .
17823  The inner tag is optional and, by default, does not appear.
17824 \end_layout
17825
17826 \begin_layout Standard
17827 The specific tags and attributes output for each inset can be controlled
17828  by means of the following layout tags.
17829 \end_layout
17830
17831 \begin_layout Description
17832 \begin_inset Flex Code
17833 status collapsed
17834
17835 \begin_layout Plain Layout
17836 HTMLAttr
17837 \end_layout
17838
17839 \end_inset
17840
17841  [
17842 \begin_inset Flex Code
17843 status collapsed
17844
17845 \begin_layout Plain Layout
17846 string
17847 \end_layout
17848
17849 \end_inset
17850
17851 ] Specifies attribute information to be output with the main tag.
17852  For example, 
17853 \begin_inset Quotes eld
17854 \end_inset
17855
17856
17857 \begin_inset Flex Code
17858 status collapsed
17859
17860 \begin_layout Plain Layout
17861 class=`myinset' onclick=`\SpecialChar \ldots{}
17862 '
17863 \end_layout
17864
17865 \end_inset
17866
17867
17868 \begin_inset Quotes erd
17869 \end_inset
17870
17871 .
17872  By default, LyX will output 
17873 \begin_inset Quotes eld
17874 \end_inset
17875
17876
17877 \begin_inset Flex Code
17878 status collapsed
17879
17880 \begin_layout Plain Layout
17881 class=`insetname'
17882 \end_layout
17883
17884 \end_inset
17885
17886
17887 \begin_inset Quotes erd
17888 \end_inset
17889
17890 , where 
17891 \begin_inset Flex Code
17892 status collapsed
17893
17894 \begin_layout Plain Layout
17895 insetname
17896 \end_layout
17897
17898 \end_inset
17899
17900  is the LyX name of the inset, made lowercase and with non-alphanumeric
17901  characters converted to underscores, for example: footnote.
17902 \end_layout
17903
17904 \begin_layout Description
17905 \begin_inset Flex Code
17906 status collapsed
17907
17908 \begin_layout Plain Layout
17909 HTMLForceCSS
17910 \end_layout
17911
17912 \end_inset
17913
17914  [
17915 \begin_inset Flex Code
17916 status collapsed
17917
17918 \begin_layout Plain Layout
17919
17920 \emph on
17921 0
17922 \emph default
17923 ,1
17924 \end_layout
17925
17926 \end_inset
17927
17928 ] Whether to output the default CSS information LyX generates for this layout,
17929  even if additional information is explicitly provided via 
17930 \begin_inset Flex Code
17931 status collapsed
17932
17933 \begin_layout Plain Layout
17934 HTMLStyle
17935 \end_layout
17936
17937 \end_inset
17938
17939 .
17940  Setting this to 
17941 \begin_inset Flex Code
17942 status collapsed
17943
17944 \begin_layout Plain Layout
17945 1
17946 \end_layout
17947
17948 \end_inset
17949
17950  allows you to alter or augment the generated CSS, rather than to override
17951  it completely.
17952  Default is 0.
17953 \end_layout
17954
17955 \begin_layout Description
17956 \begin_inset Flex Code
17957 status collapsed
17958
17959 \begin_layout Plain Layout
17960 HTMLInnerAttr
17961 \end_layout
17962
17963 \end_inset
17964
17965  [
17966 \begin_inset Flex Code
17967 status collapsed
17968
17969 \begin_layout Plain Layout
17970 string
17971 \end_layout
17972
17973 \end_inset
17974
17975 ] Attributes for the inner tag.
17976  Defaults to 
17977 \begin_inset Quotes eld
17978 \end_inset
17979
17980
17981 \begin_inset Flex Code
17982 status collapsed
17983
17984 \begin_layout Plain Layout
17985 class=`insetname_inner'
17986 \end_layout
17987
17988 \end_inset
17989
17990
17991 \begin_inset Quotes erd
17992 \end_inset
17993
17994 .
17995 \end_layout
17996
17997 \begin_layout Description
17998 \begin_inset Flex Code
17999 status collapsed
18000
18001 \begin_layout Plain Layout
18002 HTMLInnerTag
18003 \end_layout
18004
18005 \end_inset
18006
18007  [
18008 \begin_inset Flex Code
18009 status collapsed
18010
18011 \begin_layout Plain Layout
18012 string
18013 \end_layout
18014
18015 \end_inset
18016
18017 ] The inner tag, replacing 
18018 \begin_inset Flex Code
18019 status collapsed
18020
18021 \begin_layout Plain Layout
18022 innertag
18023 \end_layout
18024
18025 \end_inset
18026
18027  in the examples above.
18028  By default, there is none.
18029 \end_layout
18030
18031 \begin_layout Description
18032 \begin_inset Flex Code
18033 status collapsed
18034
18035 \begin_layout Plain Layout
18036 HTMLIsBlock
18037 \end_layout
18038
18039 \end_inset
18040
18041  [
18042 \begin_inset Flex Code
18043 status collapsed
18044
18045 \begin_layout Plain Layout
18046 0,
18047 \emph on
18048 1
18049 \end_layout
18050
18051 \end_inset
18052
18053 ] Whether this inset represents a standalone block of text (such as a footnote)
18054  or instead represents material that is included in the surrounding text
18055  (such as a branch).
18056  Defaults to 1.
18057 \end_layout
18058
18059 \begin_layout Description
18060 \begin_inset Flex Code
18061 status collapsed
18062
18063 \begin_layout Plain Layout
18064 HTMLLabel
18065 \end_layout
18066
18067 \end_inset
18068
18069  [
18070 \begin_inset Flex Code
18071 status collapsed
18072
18073 \begin_layout Plain Layout
18074 string
18075 \end_layout
18076
18077 \end_inset
18078
18079 ] A label for this inset, possibly including a reference to a counter.
18080  For example, for footnote, it might be: 
18081 \begin_inset Flex Code
18082 status collapsed
18083
18084 \begin_layout Plain Layout
18085
18086 \backslash
18087 arabic{footnote}
18088 \end_layout
18089
18090 \end_inset
18091
18092 .
18093  This is optional, and there is no default.
18094 \end_layout
18095
18096 \begin_layout Description
18097 \begin_inset Flex Code
18098 status collapsed
18099
18100 \begin_layout Plain Layout
18101 HTMLPreamble
18102 \end_layout
18103
18104 \end_inset
18105
18106  Information to be output in the 
18107 \begin_inset Flex Code
18108 status collapsed
18109
18110 \begin_layout Plain Layout
18111 <head>
18112 \end_layout
18113
18114 \end_inset
18115
18116  section when this style is used.
18117  This might, for example, be used to include a 
18118 \begin_inset Flex Code
18119 status collapsed
18120
18121 \begin_layout Plain Layout
18122 <script>
18123 \end_layout
18124
18125 \end_inset
18126
18127  block defining an 
18128 \begin_inset Flex Code
18129 status collapsed
18130
18131 \begin_layout Plain Layout
18132 onclick
18133 \end_layout
18134
18135 \end_inset
18136
18137  handler.
18138 \end_layout
18139
18140 \begin_layout Description
18141 \begin_inset Flex Code
18142 status collapsed
18143
18144 \begin_layout Plain Layout
18145 HTMLStyle
18146 \end_layout
18147
18148 \end_inset
18149
18150  CSS style information to be included when this style is used.
18151  Note that this will automatically be wrapped in a layout-generated 
18152 \begin_inset Flex Code
18153 status collapsed
18154
18155 \begin_layout Plain Layout
18156 <style>
18157 \end_layout
18158
18159 \end_inset
18160
18161  block, so only the CSS itself need be included.
18162 \end_layout
18163
18164 \begin_layout Description
18165 \begin_inset Flex Code
18166 status collapsed
18167
18168 \begin_layout Plain Layout
18169 HTMLTag
18170 \end_layout
18171
18172 \end_inset
18173
18174  [
18175 \begin_inset Flex Code
18176 status collapsed
18177
18178 \begin_layout Plain Layout
18179 string
18180 \end_layout
18181
18182 \end_inset
18183
18184 ] The tag to be used for the main label, replacing 
18185 \begin_inset Flex Code
18186 status collapsed
18187
18188 \begin_layout Plain Layout
18189 tag
18190 \end_layout
18191
18192 \end_inset
18193
18194  in the examples above.
18195  The default depends upon the setting of 
18196 \begin_inset Flex Code
18197 status collapsed
18198
18199 \begin_layout Plain Layout
18200 MultiPar
18201 \end_layout
18202
18203 \end_inset
18204
18205 : If 
18206 \begin_inset Flex Code
18207 status collapsed
18208
18209 \begin_layout Plain Layout
18210 MultiPar
18211 \end_layout
18212
18213 \end_inset
18214
18215  is true, the default is 
18216 \begin_inset Flex Code
18217 status collapsed
18218
18219 \begin_layout Plain Layout
18220 div
18221 \end_layout
18222
18223 \end_inset
18224
18225 ; if it is false, the default is 
18226 \begin_inset Flex Code
18227 status collapsed
18228
18229 \begin_layout Plain Layout
18230 span
18231 \end_layout
18232
18233 \end_inset
18234
18235 .
18236 \end_layout
18237
18238 \begin_layout Subsection
18239 Float XHTML
18240 \end_layout
18241
18242 \begin_layout Standard
18243 The XHTML output for floats too can be controlled by layout information.
18244  The output has the following form:
18245 \end_layout
18246
18247 \begin_layout LyX-Code
18248 <tag attr=
18249 \begin_inset Quotes erd
18250 \end_inset
18251
18252 value
18253 \begin_inset Quotes erd
18254 \end_inset
18255
18256 >
18257 \end_layout
18258
18259 \begin_layout LyX-Code
18260 Contents of the float.
18261 \end_layout
18262
18263 \begin_layout LyX-Code
18264 </tag>
18265 \end_layout
18266
18267 \begin_layout Standard
18268 The caption, if there is one, is a separate inset and will be output as
18269  such.
18270  Its appearance can be controlled via the InsetLayout for caption insets.
18271  
18272 \end_layout
18273
18274 \begin_layout Description
18275 \begin_inset Flex Code
18276 status collapsed
18277
18278 \begin_layout Plain Layout
18279 HTMLAttr
18280 \end_layout
18281
18282 \end_inset
18283
18284  [
18285 \begin_inset Flex Code
18286 status collapsed
18287
18288 \begin_layout Plain Layout
18289 string
18290 \end_layout
18291
18292 \end_inset
18293
18294 ] Specifies attribute information to be output with the main tag.
18295  For example, 
18296 \begin_inset Quotes eld
18297 \end_inset
18298
18299
18300 \begin_inset Flex Code
18301 status collapsed
18302
18303 \begin_layout Plain Layout
18304 class=`myfloat' onclick=`\SpecialChar \ldots{}
18305 '
18306 \end_layout
18307
18308 \end_inset
18309
18310
18311 \begin_inset Quotes erd
18312 \end_inset
18313
18314 .
18315  By default, LyX will output 
18316 \begin_inset Quotes eld
18317 \end_inset
18318
18319
18320 \begin_inset Flex Code
18321 status collapsed
18322
18323 \begin_layout Plain Layout
18324 class=`float float-floattype'
18325 \end_layout
18326
18327 \end_inset
18328
18329
18330 \begin_inset Quotes erd
18331 \end_inset
18332
18333 , where 
18334 \begin_inset Flex Code
18335 status collapsed
18336
18337 \begin_layout Plain Layout
18338 floattype
18339 \end_layout
18340
18341 \end_inset
18342
18343  is LyX's name for this type of float, as determined by the float declaration
18344  (see 
18345 \begin_inset CommandInset ref
18346 LatexCommand ref
18347 reference "sub:Floats"
18348
18349 \end_inset
18350
18351 ), though made lowercase and with non-alphanumeric characters converted
18352  to underscores, for example: float-table.
18353 \end_layout
18354
18355 \begin_layout Description
18356 \begin_inset Flex Code
18357 status collapsed
18358
18359 \begin_layout Plain Layout
18360 HTMLStyle
18361 \end_layout
18362
18363 \end_inset
18364
18365  CSS style information to be included when this float is used.
18366  Note that this will automatically be wrapped in a layout-generated 
18367 \begin_inset Flex Code
18368 status collapsed
18369
18370 \begin_layout Plain Layout
18371 <style>
18372 \end_layout
18373
18374 \end_inset
18375
18376  block, so only the CSS itself need be included.
18377 \end_layout
18378
18379 \begin_layout Description
18380 \begin_inset Flex Code
18381 status collapsed
18382
18383 \begin_layout Plain Layout
18384 HTMLTag
18385 \end_layout
18386
18387 \end_inset
18388
18389  [
18390 \begin_inset Flex Code
18391 status collapsed
18392
18393 \begin_layout Plain Layout
18394 string
18395 \end_layout
18396
18397 \end_inset
18398
18399 ] The tag to be used for this float, replacing 
18400 \begin_inset Quotes eld
18401 \end_inset
18402
18403
18404 \begin_inset Flex Code
18405 status collapsed
18406
18407 \begin_layout Plain Layout
18408 tag
18409 \end_layout
18410
18411 \end_inset
18412
18413
18414 \begin_inset Quotes erd
18415 \end_inset
18416
18417  in the example above.
18418  The default is 
18419 \begin_inset Flex Code
18420 status collapsed
18421
18422 \begin_layout Plain Layout
18423 div
18424 \end_layout
18425
18426 \end_inset
18427
18428  and will rarely need changing.
18429 \end_layout
18430
18431 \begin_layout Subsection
18432 Bibliography formatting
18433 \end_layout
18434
18435 \begin_layout Standard
18436 The bibliography can be formatted using 
18437 \begin_inset Flex Code
18438 status collapsed
18439
18440 \begin_layout Plain Layout
18441 CiteFormat
18442 \end_layout
18443
18444 \end_inset
18445
18446  blocks.
18447  See Section 
18448 \begin_inset CommandInset ref
18449 LatexCommand ref
18450 reference "sub:Citation-format-description"
18451
18452 \end_inset
18453
18454  for the details.
18455 \end_layout
18456
18457 \begin_layout Subsection
18458 LyX-generated CSS
18459 \end_layout
18460
18461 \begin_layout Standard
18462 We have several times mentioned that LyX will generate default CSS style
18463  rules for both insets and paragraph styles, based upon the other layout
18464  information that is provided.
18465  In this section, we shall say a word about which layout information LyX
18466  uses and how.
18467 \end_layout
18468
18469 \begin_layout Standard
18470 At present, LyX auto-generates CSS only for font information, making use
18471  of the 
18472 \begin_inset Flex Code
18473 status collapsed
18474
18475 \begin_layout Plain Layout
18476 Family
18477 \end_layout
18478
18479 \end_inset
18480
18481
18482 \begin_inset Flex Code
18483 status collapsed
18484
18485 \begin_layout Plain Layout
18486 Series
18487 \end_layout
18488
18489 \end_inset
18490
18491
18492 \begin_inset Flex Code
18493 status collapsed
18494
18495 \begin_layout Plain Layout
18496 Shape
18497 \end_layout
18498
18499 \end_inset
18500
18501 , and 
18502 \begin_inset Flex Code
18503 status collapsed
18504
18505 \begin_layout Plain Layout
18506 Size
18507 \end_layout
18508
18509 \end_inset
18510
18511  specified in the 
18512 \begin_inset Flex Code
18513 status collapsed
18514
18515 \begin_layout Plain Layout
18516 Font
18517 \end_layout
18518
18519 \end_inset
18520
18521  declaration.
18522  (See 
18523 \begin_inset CommandInset ref
18524 LatexCommand ref
18525 reference "sub:Font-description"
18526
18527 \end_inset
18528
18529 .) The translation is mostly straightforward and obvious.
18530  For example, 
18531 \begin_inset Quotes eld
18532 \end_inset
18533
18534
18535 \begin_inset Flex Code
18536 status collapsed
18537
18538 \begin_layout Plain Layout
18539 Family Sans
18540 \end_layout
18541
18542 \end_inset
18543
18544
18545 \begin_inset Quotes erd
18546 \end_inset
18547
18548  becomes 
18549 \begin_inset Quotes eld
18550 \end_inset
18551
18552
18553 \begin_inset Flex Code
18554 status collapsed
18555
18556 \begin_layout Plain Layout
18557 font-family: sans-serif;
18558 \end_layout
18559
18560 \end_inset
18561
18562
18563 \begin_inset Quotes erd
18564 \end_inset
18565
18566 .
18567  The correspondence of LyX sizes and CSS sizes is a little less obvious
18568  but nonetheless intuitive.
18569  See the 
18570 \begin_inset Flex Code
18571 status collapsed
18572
18573 \begin_layout Plain Layout
18574 getSizeCSS()
18575 \end_layout
18576
18577 \end_inset
18578
18579  function in 
18580 \begin_inset Flex URL
18581 status collapsed
18582
18583 \begin_layout Plain Layout
18584
18585 src/FontInfo.cpp
18586 \end_layout
18587
18588 \end_inset
18589
18590  for the details.
18591  
18592 \end_layout
18593
18594 \begin_layout Chapter
18595 Including External Material
18596 \end_layout
18597
18598 \begin_layout Standard
18599 \begin_inset Box Shadowbox
18600 position "t"
18601 hor_pos "c"
18602 has_inner_box 1
18603 inner_pos "t"
18604 use_parbox 0
18605 use_makebox 0
18606 width "100col%"
18607 special "none"
18608 height "1in"
18609 height_special "totalheight"
18610 status open
18611
18612 \begin_layout Plain Layout
18613 WARNING: This portion of the documentation has not been updated for some
18614  time.
18615  We certainly hope that it is still accurate, but there are no guarantees.
18616 \end_layout
18617
18618 \end_inset
18619
18620
18621 \end_layout
18622
18623 \begin_layout Standard
18624 The use of material from sources external to LyX is covered in detail in
18625  the 
18626 \emph on
18627 Embedded Objects
18628 \emph default
18629  manual.
18630  This part of the manual covers what needs to happen behind the scenes for
18631  new sorts of material to be included.
18632 \end_layout
18633
18634 \begin_layout Section
18635 How does it work?
18636 \end_layout
18637
18638 \begin_layout Standard
18639 The external material feature is based on the concept of a 
18640 \emph on
18641 template
18642 \emph default
18643 .
18644  A template is a specification of how LyX should interface with a certain
18645  kind of material.
18646  As bundled, LyX comes with predefined templates for Xfig figures, various
18647  raster format images, chess diagrams, and LilyPond music notation.
18648  You can check the actual list by using the menu 
18649 \begin_inset Flex MenuItem
18650 status collapsed
18651
18652 \begin_layout Plain Layout
18653 Insert\SpecialChar \menuseparator
18654 File\SpecialChar \menuseparator
18655 External Material
18656 \end_layout
18657
18658 \end_inset
18659
18660 .
18661  Furthermore, it is possible to roll your own template to support a specific
18662  kind of material.
18663  Later we'll describe in more detail what is involved, and hopefully you
18664  will submit all the templates you create so we can include them in a later
18665  LyX version.
18666 \end_layout
18667
18668 \begin_layout Standard
18669 Another basic idea of the external material feature is to distinguish between
18670  the original file that serves as a base for final material and the produced
18671  file that is included in your exported or printed document.
18672  For example, consider the case of a figure produced with 
18673 \begin_inset Flex Code
18674 status collapsed
18675
18676 \begin_layout Plain Layout
18677 Xfig
18678 \end_layout
18679
18680 \end_inset
18681
18682 .
18683  The Xfig application itself works on an original file with the 
18684 \begin_inset Flex Code
18685 status collapsed
18686
18687 \begin_layout Plain Layout
18688 .fig
18689 \end_layout
18690
18691 \end_inset
18692
18693  extension.
18694  Within Xfig, you create and change your figure, and when you are done,
18695  you save the 
18696 \begin_inset Flex Code
18697 status collapsed
18698
18699 \begin_layout Plain Layout
18700 fig
18701 \end_layout
18702
18703 \end_inset
18704
18705 -file.
18706  When you want to include the figure in your document, you invoke 
18707 \begin_inset Flex Code
18708 status collapsed
18709
18710 \begin_layout Plain Layout
18711 transfig
18712 \end_layout
18713
18714 \end_inset
18715
18716  in order to create a PostScript file that can readily be included in your
18717  LaTeX file.
18718  In this case, the 
18719 \begin_inset Flex Code
18720 status collapsed
18721
18722 \begin_layout Plain Layout
18723 .fig
18724 \end_layout
18725
18726 \end_inset
18727
18728  file is the original file, and the PostScript file is the produced file.
18729 \end_layout
18730
18731 \begin_layout Standard
18732 This distinction is important in order to allow updating of the material
18733  while you are in the process of writing the document.
18734  Furthermore, it provides us with the flexibility that is needed to support
18735  multiple export formats.
18736  For instance, in the case of a plain text file, it is not exactly an award-winn
18737 ing idea to include the figure as raw PostScript.
18738  Instead, you would either prefer to just include a reference to the figure
18739  or try to invoke some graphics to ASCII converter to make the final result
18740  look similar to the real graphics.
18741  The external material management allows you to do this, because it is parametri
18742 zed on the different export formats that LyX supports.
18743 \end_layout
18744
18745 \begin_layout Standard
18746 Besides supporting the production of different products according to the
18747  exported format, it supports tight integration with editing and viewing
18748  applications.
18749  In the case of an Xfig figure, you are able to invoke Xfig on the original
18750  file with a single click from within the external material dialog in LyX,
18751  and also preview the produced PostScript file with Ghostview with another
18752  click.
18753  No more fiddling around with the command line and/or file browsers to locate
18754  and manipulate the original or produced files.
18755  In this way, you are finally able to take full advantage of the many different
18756  applications that are relevant to use when you write your documents, and
18757  ultimately be more productive.
18758 \end_layout
18759
18760 \begin_layout Section
18761 The external template configuration file
18762 \end_layout
18763
18764 \begin_layout Standard
18765 It is relatively easy to add custom external template definitions to LyX.
18766  However, be aware that doing this in an careless manner most probably 
18767 \emph on
18768 will
18769 \emph default
18770  introduce an easily exploitable security hole.
18771  So before you do this, please read the discussion about security in section
18772  
18773 \begin_inset CommandInset ref
18774 LatexCommand ref
18775 reference "sec:Security-discussion"
18776
18777 \end_inset
18778
18779 .
18780 \end_layout
18781
18782 \begin_layout Standard
18783 Having said that, we encourage you to submit any interesting templates that
18784  you create.
18785  
18786 \end_layout
18787
18788 \begin_layout Standard
18789 The external templates are defined in the 
18790 \begin_inset Flex Code
18791 status collapsed
18792
18793 \begin_layout Plain Layout
18794 LyXDir/lib/external_templates
18795 \end_layout
18796
18797 \end_inset
18798
18799  file.
18800  You can place your own version in 
18801 \begin_inset Flex Code
18802 status collapsed
18803
18804 \begin_layout Plain Layout
18805 UserDir/external_templates
18806 \end_layout
18807
18808 \end_inset
18809
18810 .
18811 \end_layout
18812
18813 \begin_layout Standard
18814 A typical template looks like this:
18815 \end_layout
18816
18817 \begin_layout LyX-Code
18818 Template XFig
18819 \end_layout
18820
18821 \begin_layout LyX-Code
18822 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
18823 \end_layout
18824
18825 \begin_layout LyX-Code
18826 HelpText
18827 \end_layout
18828
18829 \begin_layout LyX-Code
18830 An XFig figure.
18831 \end_layout
18832
18833 \begin_layout LyX-Code
18834 HelpTextEnd
18835 \end_layout
18836
18837 \begin_layout LyX-Code
18838 InputFormat fig
18839 \end_layout
18840
18841 \begin_layout LyX-Code
18842 FileFilter "*.fig"
18843 \end_layout
18844
18845 \begin_layout LyX-Code
18846 AutomaticProduction true
18847 \end_layout
18848
18849 \begin_layout LyX-Code
18850 Transform Rotate
18851 \end_layout
18852
18853 \begin_layout LyX-Code
18854 Transform Resize
18855 \end_layout
18856
18857 \begin_layout LyX-Code
18858 Format LaTeX
18859 \end_layout
18860
18861 \begin_layout LyX-Code
18862 TransformCommand Rotate RotationLatexCommand
18863 \end_layout
18864
18865 \begin_layout LyX-Code
18866 TransformCommand Resize ResizeLatexCommand
18867 \end_layout
18868
18869 \begin_layout LyX-Code
18870 Product "$$RotateFront$$ResizeFront
18871 \end_layout
18872
18873 \begin_layout LyX-Code
18874          
18875 \backslash
18876
18877 \backslash
18878 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
18879 \end_layout
18880
18881 \begin_layout LyX-Code
18882          $$ResizeBack$$RotateBack"
18883 \end_layout
18884
18885 \begin_layout LyX-Code
18886 UpdateFormat pstex
18887 \end_layout
18888
18889 \begin_layout LyX-Code
18890 UpdateResult "$$AbsPath$$Basename.pstex_t"
18891 \end_layout
18892
18893 \begin_layout LyX-Code
18894 Requirement "graphicx"
18895 \end_layout
18896
18897 \begin_layout LyX-Code
18898 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
18899 \end_layout
18900
18901 \begin_layout LyX-Code
18902 ReferencedFile latex "$$AbsPath$$Basename.eps"
18903 \end_layout
18904
18905 \begin_layout LyX-Code
18906 ReferencedFile dvi "$$AbsPath$$Basename.eps"
18907 \end_layout
18908
18909 \begin_layout LyX-Code
18910 FormatEnd
18911 \end_layout
18912
18913 \begin_layout LyX-Code
18914 Format PDFLaTeX
18915 \end_layout
18916
18917 \begin_layout LyX-Code
18918 TransformCommand Rotate RotationLatexCommand
18919 \end_layout
18920
18921 \begin_layout LyX-Code
18922 TransformCommand Resize ResizeLatexCommand
18923 \end_layout
18924
18925 \begin_layout LyX-Code
18926 Product "$$RotateFront$$ResizeFront
18927 \end_layout
18928
18929 \begin_layout LyX-Code
18930          
18931 \backslash
18932
18933 \backslash
18934 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
18935 \end_layout
18936
18937 \begin_layout LyX-Code
18938          $$ResizeBack$$RotateBack"
18939 \end_layout
18940
18941 \begin_layout LyX-Code
18942 UpdateFormat pdftex
18943 \end_layout
18944
18945 \begin_layout LyX-Code
18946 UpdateResult "$$AbsPath$$Basename.pdftex_t"
18947 \end_layout
18948
18949 \begin_layout LyX-Code
18950 Requirement "graphicx"
18951 \end_layout
18952
18953 \begin_layout LyX-Code
18954 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
18955 \end_layout
18956
18957 \begin_layout LyX-Code
18958 ReferencedFile latex "$$AbsPath$$Basename.pdf"
18959 \end_layout
18960
18961 \begin_layout LyX-Code
18962 FormatEnd
18963 \end_layout
18964
18965 \begin_layout LyX-Code
18966 Format Ascii
18967 \end_layout
18968
18969 \begin_layout LyX-Code
18970 Product "$$Contents(
18971 \backslash
18972 "$$AbsPath$$Basename.asc
18973 \backslash
18974 ")"
18975 \end_layout
18976
18977 \begin_layout LyX-Code
18978 UpdateFormat asciixfig
18979 \end_layout
18980
18981 \begin_layout LyX-Code
18982 UpdateResult "$$AbsPath$$Basename.asc"
18983 \end_layout
18984
18985 \begin_layout LyX-Code
18986 FormatEnd
18987 \end_layout
18988
18989 \begin_layout LyX-Code
18990 Format DocBook
18991 \end_layout
18992
18993 \begin_layout LyX-Code
18994 Product "<graphic fileref=
18995 \backslash
18996 "$$AbsOrRelPathMaster$$Basename.eps
18997 \backslash
18998 ">
18999 \end_layout
19000
19001 \begin_layout LyX-Code
19002          </graphic>"
19003 \end_layout
19004
19005 \begin_layout LyX-Code
19006 UpdateFormat eps
19007 \end_layout
19008
19009 \begin_layout LyX-Code
19010 UpdateResult "$$AbsPath$$Basename.eps"
19011 \end_layout
19012
19013 \begin_layout LyX-Code
19014 ReferencedFile docbook "$$AbsPath$$Basename.eps"
19015 \end_layout
19016
19017 \begin_layout LyX-Code
19018 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
19019 \end_layout
19020
19021 \begin_layout LyX-Code
19022 FormatEnd
19023 \end_layout
19024
19025 \begin_layout LyX-Code
19026 Product "[XFig: $$FName]"
19027 \end_layout
19028
19029 \begin_layout LyX-Code
19030 FormatEnd
19031 \end_layout
19032
19033 \begin_layout LyX-Code
19034 TemplateEnd
19035 \end_layout
19036
19037 \begin_layout Standard
19038 As you can see, the template is enclosed in 
19039 \begin_inset Flex Code
19040 status collapsed
19041
19042 \begin_layout Plain Layout
19043 Template
19044 \end_layout
19045
19046 \end_inset
19047
19048  \SpecialChar \ldots{}
19049  
19050 \begin_inset Flex Code
19051 status collapsed
19052
19053 \begin_layout Plain Layout
19054 TemplateEnd
19055 \end_layout
19056
19057 \end_inset
19058
19059 .
19060  It contains a header specifying some general settings and, for each supported
19061  primary document file format, a section 
19062 \begin_inset Flex Code
19063 status collapsed
19064
19065 \begin_layout Plain Layout
19066 Format
19067 \end_layout
19068
19069 \end_inset
19070
19071  \SpecialChar \ldots{}
19072  
19073 \begin_inset Flex Code
19074 status collapsed
19075
19076 \begin_layout Plain Layout
19077 FormatEnd
19078 \end_layout
19079
19080 \end_inset
19081
19082 .
19083 \end_layout
19084
19085 \begin_layout Subsection
19086 The template header
19087 \end_layout
19088
19089 \begin_layout Description
19090 \begin_inset Flex Code
19091 status collapsed
19092
19093 \begin_layout Plain Layout
19094 AutomaticProduction
19095 \begin_inset space ~
19096 \end_inset
19097
19098 true|false
19099 \end_layout
19100
19101 \end_inset
19102
19103  Whether the file represented by the template must be generated by LyX.
19104  This command must occur exactly once.
19105 \end_layout
19106
19107 \begin_layout Description
19108 \begin_inset Flex Code
19109 status collapsed
19110
19111 \begin_layout Plain Layout
19112 FileFilter
19113 \begin_inset space ~
19114 \end_inset
19115
19116 <pattern>
19117 \end_layout
19118
19119 \end_inset
19120
19121  A glob pattern that is used in the file dialog to filter out the desired
19122  files.
19123  If there is more than one possible file extension (e.
19124 \begin_inset space \thinspace{}
19125 \end_inset
19126
19127 g.
19128 \begin_inset space \space{}
19129 \end_inset
19130
19131 tgif has 
19132 \begin_inset Flex Code
19133 status collapsed
19134
19135 \begin_layout Plain Layout
19136 .obj
19137 \end_layout
19138
19139 \end_inset
19140
19141  and 
19142 \begin_inset Flex Code
19143 status collapsed
19144
19145 \begin_layout Plain Layout
19146 .tgo
19147 \end_layout
19148
19149 \end_inset
19150
19151 ), use something like 
19152 \begin_inset Flex Code
19153 status collapsed
19154
19155 \begin_layout Plain Layout
19156 "*.{obj,tgo}"
19157 \end_layout
19158
19159 \end_inset
19160
19161 .
19162  This command must occur exactly once.
19163 \end_layout
19164
19165 \begin_layout Description
19166 \begin_inset Flex Code
19167 status collapsed
19168
19169 \begin_layout Plain Layout
19170 GuiName
19171 \begin_inset space ~
19172 \end_inset
19173
19174 <guiname>
19175 \end_layout
19176
19177 \end_inset
19178
19179  The text that is displayed on the button.
19180  This command must occur exactly once.
19181 \end_layout
19182
19183 \begin_layout Description
19184 \begin_inset Flex Code
19185 status collapsed
19186
19187 \begin_layout Plain Layout
19188 HelpText
19189 \begin_inset space ~
19190 \end_inset
19191
19192 <text>
19193 \begin_inset space ~
19194 \end_inset
19195
19196 HelpTextEnd
19197 \end_layout
19198
19199 \end_inset
19200
19201  The help text that is used in the External dialog.
19202  Provide enough information to explain to the user just what the template
19203  can provide him with.
19204  This command must occur exactly once.
19205 \end_layout
19206
19207 \begin_layout Description
19208 \begin_inset Flex Code
19209 status collapsed
19210
19211 \begin_layout Plain Layout
19212 InputFormat
19213 \begin_inset space ~
19214 \end_inset
19215
19216 <format>
19217 \end_layout
19218
19219 \end_inset
19220
19221  The file format of the original file.
19222  This must be the name of a format that is known to LyX (see section
19223 \begin_inset space ~
19224 \end_inset
19225
19226
19227 \begin_inset CommandInset ref
19228 LatexCommand ref
19229 reference "sec:Formats"
19230
19231 \end_inset
19232
19233 ).
19234  Use 
19235 \begin_inset Quotes eld
19236 \end_inset
19237
19238
19239 \begin_inset Flex Code
19240 status collapsed
19241
19242 \begin_layout Plain Layout
19243 *
19244 \end_layout
19245
19246 \end_inset
19247
19248
19249 \begin_inset Quotes erd
19250 \end_inset
19251
19252  if the template can handle original files of more than one format.
19253  LyX will attempt to interrogate the file itself in order to deduce its
19254  format in this case.
19255  This command must occur exactly once.
19256 \end_layout
19257
19258 \begin_layout Description
19259 \begin_inset Flex Code
19260 status collapsed
19261
19262 \begin_layout Plain Layout
19263 Template
19264 \begin_inset space ~
19265 \end_inset
19266
19267 <id>
19268 \end_layout
19269
19270 \end_inset
19271
19272  A unique name for the template.
19273  It must not contain substitution macros (see below).
19274 \end_layout
19275
19276 \begin_layout Description
19277 \begin_inset Flex Code
19278 status collapsed
19279
19280 \begin_layout Plain Layout
19281 Transform
19282 \begin_inset space ~
19283 \end_inset
19284
19285 Rotate|Resize|Clip|Extra
19286 \end_layout
19287
19288 \end_inset
19289
19290  This command specifies which transformations are supported by this template.
19291  It may occur zero or more times.
19292  This command enables the corresponding tabs in the external dialog.
19293  Each 
19294 \begin_inset Flex Code
19295 status collapsed
19296
19297 \begin_layout Plain Layout
19298 Transform
19299 \end_layout
19300
19301 \end_inset
19302
19303  command must have either a corresponding 
19304 \begin_inset Flex Code
19305 status collapsed
19306
19307 \begin_layout Plain Layout
19308 TransformCommand
19309 \end_layout
19310
19311 \end_inset
19312
19313  or a 
19314 \begin_inset Flex Code
19315 status collapsed
19316
19317 \begin_layout Plain Layout
19318 TransformOption
19319 \end_layout
19320
19321 \end_inset
19322
19323  command in the 
19324 \begin_inset Flex Code
19325 status collapsed
19326
19327 \begin_layout Plain Layout
19328 Format
19329 \end_layout
19330
19331 \end_inset
19332
19333  section.
19334  Otherwise the transformation will not be supported by that format.
19335 \end_layout
19336
19337 \begin_layout Subsection
19338 The Format section
19339 \end_layout
19340
19341 \begin_layout Description
19342 \begin_inset Flex Code
19343 status collapsed
19344
19345 \begin_layout Plain Layout
19346 Format
19347 \begin_inset space ~
19348 \end_inset
19349
19350 LaTeX|PDFLaTeX|PlainText|DocBook
19351 \end_layout
19352
19353 \end_inset
19354
19355  The primary document file format that this format definition is for.
19356  Not every template has a sensible representation in all document file formats.
19357  Please define nevertheless a 
19358 \begin_inset Flex Code
19359 status collapsed
19360
19361 \begin_layout Plain Layout
19362 Format
19363 \end_layout
19364
19365 \end_inset
19366
19367  section for all templates.
19368  Use a dummy text when no representation is available.
19369  Then you can at least see a reference to the external material in the exported
19370  document.
19371 \end_layout
19372
19373 \begin_layout Description
19374 \begin_inset Flex Code
19375 status collapsed
19376
19377 \begin_layout Plain Layout
19378 Option
19379 \begin_inset space ~
19380 \end_inset
19381
19382 <name>
19383 \begin_inset space ~
19384 \end_inset
19385
19386 <value>
19387 \end_layout
19388
19389 \end_inset
19390
19391  This command defines an additional macro 
19392 \begin_inset Flex Code
19393 status collapsed
19394
19395 \begin_layout Plain Layout
19396 $$<name>
19397 \end_layout
19398
19399 \end_inset
19400
19401  for substitution in 
19402 \begin_inset Flex Code
19403 status collapsed
19404
19405 \begin_layout Plain Layout
19406 Product
19407 \end_layout
19408
19409 \end_inset
19410
19411 .
19412  
19413 \begin_inset Flex Code
19414 status collapsed
19415
19416 \begin_layout Plain Layout
19417 <value>
19418 \end_layout
19419
19420 \end_inset
19421
19422  itself may contain substitution macros.
19423  The advantage over using 
19424 \begin_inset Flex Code
19425 status collapsed
19426
19427 \begin_layout Plain Layout
19428 <value>
19429 \end_layout
19430
19431 \end_inset
19432
19433  directly in 
19434 \begin_inset Flex Code
19435 status collapsed
19436
19437 \begin_layout Plain Layout
19438 Product
19439 \end_layout
19440
19441 \end_inset
19442
19443  is that the substituted value of 
19444 \begin_inset Flex Code
19445 status collapsed
19446
19447 \begin_layout Plain Layout
19448 $$<name>
19449 \end_layout
19450
19451 \end_inset
19452
19453  is sanitized so that it is a valid optional argument in the document format.
19454  This command may occur zero or more times.
19455 \end_layout
19456
19457 \begin_layout Description
19458 \begin_inset Flex Code
19459 status collapsed
19460
19461 \begin_layout Plain Layout
19462 Product
19463 \begin_inset space ~
19464 \end_inset
19465
19466 <text>
19467 \end_layout
19468
19469 \end_inset
19470
19471  The text that is inserted in the exported document.
19472  This is actually the most important command and can be quite complex.
19473  This command must occur exactly once.
19474 \end_layout
19475
19476 \begin_layout Description
19477 \begin_inset Flex Code
19478 status collapsed
19479
19480 \begin_layout Plain Layout
19481 Preamble
19482 \begin_inset space ~
19483 \end_inset
19484
19485 <name>
19486 \end_layout
19487
19488 \end_inset
19489
19490  This command specifies a preamble snippet that will be included in the
19491  LaTeX preamble.
19492  It has to be defined using 
19493 \begin_inset Flex Code
19494 status collapsed
19495
19496 \begin_layout Plain Layout
19497 PreambleDef
19498 \end_layout
19499
19500 \end_inset
19501
19502  \SpecialChar \ldots{}
19503  
19504 \begin_inset Flex Code
19505 status collapsed
19506
19507 \begin_layout Plain Layout
19508 PreambleDefEnd
19509 \end_layout
19510
19511 \end_inset
19512
19513 .
19514  This command may occur zero or more times.
19515 \end_layout
19516
19517 \begin_layout Description
19518 \begin_inset Flex Code
19519 status collapsed
19520
19521 \begin_layout Plain Layout
19522 ReferencedFile
19523 \begin_inset space ~
19524 \end_inset
19525
19526 <format>
19527 \begin_inset space ~
19528 \end_inset
19529
19530 <filename>
19531 \end_layout
19532
19533 \end_inset
19534
19535  This command denotes files that are created by the conversion process and
19536  are needed for a particular export format.
19537  If the filename is relative, it is interpreted relative to the master document.
19538  This command may be given zero or more times.
19539 \end_layout
19540
19541 \begin_layout Description
19542 \begin_inset Flex Code
19543 status collapsed
19544
19545 \begin_layout Plain Layout
19546 Requirement
19547 \begin_inset space ~
19548 \end_inset
19549
19550 <package>
19551 \end_layout
19552
19553 \end_inset
19554
19555  The name of a required LaTeX package.
19556  The package is included via 
19557 \begin_inset Flex Code
19558 status collapsed
19559
19560 \begin_layout Plain Layout
19561
19562 \backslash
19563 usepackage{}
19564 \end_layout
19565
19566 \end_inset
19567
19568  in the LaTeX preamble.
19569  This command may occur zero or more times.
19570 \end_layout
19571
19572 \begin_layout Description
19573 \begin_inset Flex Code
19574 status collapsed
19575
19576 \begin_layout Plain Layout
19577 TransformCommand
19578 \begin_inset space ~
19579 \end_inset
19580
19581 Rotate
19582 \begin_inset space ~
19583 \end_inset
19584
19585 RotationLatexCommand
19586 \end_layout
19587
19588 \end_inset
19589
19590  This command specifies that the built in LaTeX command should be used for
19591  rotation.
19592  This command may occur once or not at all.
19593 \end_layout
19594
19595 \begin_layout Description
19596 \begin_inset Flex Code
19597 status collapsed
19598
19599 \begin_layout Plain Layout
19600 TransformCommand
19601 \begin_inset space ~
19602 \end_inset
19603
19604 Resize
19605 \begin_inset space ~
19606 \end_inset
19607
19608 ResizeLatexCommand
19609 \end_layout
19610
19611 \end_inset
19612
19613  This command specifies that the built in LaTeX command should be used for
19614  resizing.
19615  This command may occur once or not at all.
19616 \end_layout
19617
19618 \begin_layout Description
19619 \begin_inset Flex Code
19620 status collapsed
19621
19622 \begin_layout Plain Layout
19623 TransformOption
19624 \begin_inset space ~
19625 \end_inset
19626
19627 Rotate
19628 \begin_inset space ~
19629 \end_inset
19630
19631 RotationLatexOption
19632 \end_layout
19633
19634 \end_inset
19635
19636  This command specifies that rotation is done via an optional argument.
19637  This command may occur once or not at all.
19638 \end_layout
19639
19640 \begin_layout Description
19641 \begin_inset Flex Code
19642 status collapsed
19643
19644 \begin_layout Plain Layout
19645 TransformOption
19646 \begin_inset space ~
19647 \end_inset
19648
19649 Resize
19650 \begin_inset space ~
19651 \end_inset
19652
19653 ResizeLatexOption
19654 \end_layout
19655
19656 \end_inset
19657
19658  This command specifies that resizing is done via an optional argument.
19659  This command may occur once or not at all.
19660 \end_layout
19661
19662 \begin_layout Description
19663 \begin_inset Flex Code
19664 status collapsed
19665
19666 \begin_layout Plain Layout
19667 TransformOption
19668 \begin_inset space ~
19669 \end_inset
19670
19671 Clip
19672 \begin_inset space ~
19673 \end_inset
19674
19675 ClipLatexOption
19676 \end_layout
19677
19678 \end_inset
19679
19680  This command specifies that clipping is done via an optional argument.
19681  This command may occur once or not at all.
19682 \end_layout
19683
19684 \begin_layout Description
19685 \begin_inset Flex Code
19686 status collapsed
19687
19688 \begin_layout Plain Layout
19689 TransformOption
19690 \begin_inset space ~
19691 \end_inset
19692
19693 Extra
19694 \begin_inset space ~
19695 \end_inset
19696
19697 ExtraLatexOption
19698 \end_layout
19699
19700 \end_inset
19701
19702  This command specifies that an extra optional argument is used.
19703  This command may occur once or not at all.
19704 \end_layout
19705
19706 \begin_layout Description
19707 \begin_inset Flex Code
19708 status collapsed
19709
19710 \begin_layout Plain Layout
19711 UpdateFormat
19712 \begin_inset space ~
19713 \end_inset
19714
19715 <format>
19716 \end_layout
19717
19718 \end_inset
19719
19720  The file format of the converted file.
19721  This must be the name of a format that is known to LyX (see the 
19722 \begin_inset Flex MenuItem
19723 status collapsed
19724
19725 \begin_layout Plain Layout
19726
19727 \bar under
19728 T
19729 \bar default
19730 ools\SpecialChar \menuseparator
19731
19732 \bar under
19733 P
19734 \bar default
19735 references\SpecialChar \menuseparator
19736 File Handling\SpecialChar \menuseparator
19737 File Format
19738 \end_layout
19739
19740 \end_inset
19741
19742  dialog).
19743  This command must occur exactly once.
19744 \end_layout
19745
19746 \begin_layout Description
19747 \begin_inset Flex Code
19748 status collapsed
19749
19750 \begin_layout Plain Layout
19751 UpdateResult
19752 \begin_inset space ~
19753 \end_inset
19754
19755 <filename>
19756 \end_layout
19757
19758 \end_inset
19759
19760  The file name of the converted file.
19761  The file name must be absolute.
19762  This command must occur exactly once.
19763 \end_layout
19764
19765 \begin_layout Subsection
19766 Preamble definitions
19767 \end_layout
19768
19769 \begin_layout Standard
19770 The external template configuration file may contain additional preamble
19771  definitions enclosed by 
19772 \begin_inset Flex Code
19773 status collapsed
19774
19775 \begin_layout Plain Layout
19776 PreambleDef
19777 \end_layout
19778
19779 \end_inset
19780
19781  \SpecialChar \ldots{}
19782  
19783 \begin_inset Flex Code
19784 status collapsed
19785
19786 \begin_layout Plain Layout
19787 PreambleDefEnd
19788 \end_layout
19789
19790 \end_inset
19791
19792 .
19793  They can be used by the templates in the 
19794 \begin_inset Flex Code
19795 status collapsed
19796
19797 \begin_layout Plain Layout
19798 Format
19799 \end_layout
19800
19801 \end_inset
19802
19803  section.
19804 \end_layout
19805
19806 \begin_layout Section
19807 The substitution mechanism
19808 \end_layout
19809
19810 \begin_layout Standard
19811 When the external material facility invokes an external program, it is done
19812  on the basis of a command defined in the template configuration file.
19813  These commands can contain various macros that are expanded before execution.
19814  Execution always take place in the directory of the containing document.
19815 \end_layout
19816
19817 \begin_layout Standard
19818 Also, whenever external material is to be displayed, the name will be produced
19819  by the substitution mechanism, and most other commands in the template
19820  definition support substitution as well.
19821 \end_layout
19822
19823 \begin_layout Standard
19824 The available macros are the following:
19825 \end_layout
19826
19827 \begin_layout Description
19828 \begin_inset Flex Code
19829 status collapsed
19830
19831 \begin_layout Plain Layout
19832 $$AbsOrRelPathMaster
19833 \end_layout
19834
19835 \end_inset
19836
19837  The file path, absolute or relative to the master LyX document.
19838 \end_layout
19839
19840 \begin_layout Description
19841 \begin_inset Flex Code
19842 status collapsed
19843
19844 \begin_layout Plain Layout
19845 $$AbsOrRelPathParent
19846 \end_layout
19847
19848 \end_inset
19849
19850  The file path, absolute or relative to the LyX document.
19851 \end_layout
19852
19853 \begin_layout Description
19854 \begin_inset Flex Code
19855 status collapsed
19856
19857 \begin_layout Plain Layout
19858 $$AbsPath
19859 \end_layout
19860
19861 \end_inset
19862
19863  The absolute file path.
19864 \end_layout
19865
19866 \begin_layout Description
19867 \begin_inset Flex Code
19868 status collapsed
19869
19870 \begin_layout Plain Layout
19871 $$Basename
19872 \end_layout
19873
19874 \end_inset
19875
19876  The filename without path and without the extension.
19877 \end_layout
19878
19879 \begin_layout Description
19880 \begin_inset Flex Code
19881 status collapsed
19882
19883 \begin_layout Plain Layout
19884 $$Contents(
19885 \begin_inset Quotes eld
19886 \end_inset
19887
19888 filename.ext
19889 \begin_inset Quotes erd
19890 \end_inset
19891
19892 )
19893 \end_layout
19894
19895 \end_inset
19896
19897  This macro will expand to the contents of the file with the name 
19898 \begin_inset Flex Code
19899 status collapsed
19900
19901 \begin_layout Plain Layout
19902 filename.ext
19903 \end_layout
19904
19905 \end_inset
19906
19907 .
19908 \end_layout
19909
19910 \begin_layout Description
19911 \begin_inset Flex Code
19912 status collapsed
19913
19914 \begin_layout Plain Layout
19915 $$Extension
19916 \end_layout
19917
19918 \end_inset
19919
19920  The file extension (including the dot).
19921 \end_layout
19922
19923 \begin_layout Description
19924 \begin_inset Flex Code
19925 status collapsed
19926
19927 \begin_layout Plain Layout
19928 $$FName
19929 \end_layout
19930
19931 \end_inset
19932
19933  The filename of the file specified in the external material dialog.
19934  This is either an absolute name, or it is relative to the LyX document.
19935 \end_layout
19936
19937 \begin_layout Description
19938 \begin_inset Flex Code
19939 status collapsed
19940
19941 \begin_layout Plain Layout
19942 $$FPath
19943 \end_layout
19944
19945 \end_inset
19946
19947  The path part of 
19948 \begin_inset Flex Code
19949 status collapsed
19950
19951 \begin_layout Plain Layout
19952 $$FName
19953 \end_layout
19954
19955 \end_inset
19956
19957  (absolute name or relative to the LyX document).
19958 \end_layout
19959
19960 \begin_layout Description
19961 \begin_inset Flex Code
19962 status collapsed
19963
19964 \begin_layout Plain Layout
19965 $$RelPathMaster
19966 \end_layout
19967
19968 \end_inset
19969
19970  The file path, relative to the master LyX document.
19971 \end_layout
19972
19973 \begin_layout Description
19974 \begin_inset Flex Code
19975 status collapsed
19976
19977 \begin_layout Plain Layout
19978 $$RelPathParent
19979 \end_layout
19980
19981 \end_inset
19982
19983  The file path, relative to the LyX document.
19984 \end_layout
19985
19986 \begin_layout Description
19987 \begin_inset Flex Code
19988 status collapsed
19989
19990 \begin_layout Plain Layout
19991 $$Sysdir
19992 \end_layout
19993
19994 \end_inset
19995
19996  This macro will expand to the absolute path of the system directory.
19997  This is typically used to point to the various helper scripts that are
19998  bundled with LyX.
19999 \end_layout
20000
20001 \begin_layout Description
20002 \begin_inset Flex Code
20003 status collapsed
20004
20005 \begin_layout Plain Layout
20006 $$Tempname
20007 \end_layout
20008
20009 \end_inset
20010
20011  A name and full path to a temporary file which will be automatically deleted
20012  whenever the containing document is closed, or the external material insertion
20013  deleted.
20014 \end_layout
20015
20016 \begin_layout Standard
20017 All path macros contain a trailing directory separator, so you can construct
20018  e.
20019 \begin_inset space \thinspace{}
20020 \end_inset
20021
20022 g.
20023 \begin_inset space \space{}
20024 \end_inset
20025
20026 the absolute filename with 
20027 \begin_inset Flex Code
20028 status collapsed
20029
20030 \begin_layout Plain Layout
20031 $$AbsPath$$Basename$$Extension
20032 \end_layout
20033
20034 \end_inset
20035
20036 .
20037 \end_layout
20038
20039 \begin_layout Standard
20040 The macros above are substituted in all commands unless otherwise noted.
20041  The command 
20042 \begin_inset Flex Code
20043 status collapsed
20044
20045 \begin_layout Plain Layout
20046 Product
20047 \end_layout
20048
20049 \end_inset
20050
20051  supports additionally the following substitutions if they are enabled by
20052  the 
20053 \begin_inset Flex Code
20054 status collapsed
20055
20056 \begin_layout Plain Layout
20057 Transform
20058 \end_layout
20059
20060 \end_inset
20061
20062  and 
20063 \begin_inset Flex Code
20064 status collapsed
20065
20066 \begin_layout Plain Layout
20067 TransformCommand
20068 \end_layout
20069
20070 \end_inset
20071
20072  commands:
20073 \end_layout
20074
20075 \begin_layout Description
20076 \begin_inset Flex Code
20077 status collapsed
20078
20079 \begin_layout Plain Layout
20080 $$ResizeFront
20081 \end_layout
20082
20083 \end_inset
20084
20085  The front part of the resize command.
20086 \end_layout
20087
20088 \begin_layout Description
20089 \begin_inset Flex Code
20090 status collapsed
20091
20092 \begin_layout Plain Layout
20093 $$ResizeBack
20094 \end_layout
20095
20096 \end_inset
20097
20098  The back part of the resize command.
20099 \end_layout
20100
20101 \begin_layout Description
20102 \begin_inset Flex Code
20103 status collapsed
20104
20105 \begin_layout Plain Layout
20106 $$RotateFront
20107 \end_layout
20108
20109 \end_inset
20110
20111  The front part of the rotation command.
20112 \end_layout
20113
20114 \begin_layout Description
20115 \begin_inset Flex Code
20116 status collapsed
20117
20118 \begin_layout Plain Layout
20119 $$RotateBack
20120 \end_layout
20121
20122 \end_inset
20123
20124  The back part of the rotation command.
20125 \end_layout
20126
20127 \begin_layout Standard
20128 The value string of the 
20129 \begin_inset Flex Code
20130 status collapsed
20131
20132 \begin_layout Plain Layout
20133 Option
20134 \end_layout
20135
20136 \end_inset
20137
20138  command supports additionally the following substitutions if they are enabled
20139  by the 
20140 \begin_inset Flex Code
20141 status collapsed
20142
20143 \begin_layout Plain Layout
20144 Transform
20145 \end_layout
20146
20147 \end_inset
20148
20149  and 
20150 \begin_inset Flex Code
20151 status collapsed
20152
20153 \begin_layout Plain Layout
20154 TransformOption
20155 \end_layout
20156
20157 \end_inset
20158
20159  commands:
20160 \end_layout
20161
20162 \begin_layout Description
20163 \begin_inset Flex Code
20164 status collapsed
20165
20166 \begin_layout Plain Layout
20167 $$Clip
20168 \end_layout
20169
20170 \end_inset
20171
20172  The clip option.
20173 \end_layout
20174
20175 \begin_layout Description
20176 \begin_inset Flex Code
20177 status collapsed
20178
20179 \begin_layout Plain Layout
20180 $$Extra
20181 \end_layout
20182
20183 \end_inset
20184
20185  The extra option.
20186 \end_layout
20187
20188 \begin_layout Description
20189 \begin_inset Flex Code
20190 status collapsed
20191
20192 \begin_layout Plain Layout
20193 $$Resize
20194 \end_layout
20195
20196 \end_inset
20197
20198  The resize option.
20199 \end_layout
20200
20201 \begin_layout Description
20202 \begin_inset Flex Code
20203 status collapsed
20204
20205 \begin_layout Plain Layout
20206 $$Rotate
20207 \end_layout
20208
20209 \end_inset
20210
20211  The rotation option.
20212 \end_layout
20213
20214 \begin_layout Standard
20215 You may ask why there are so many path macros.
20216  There are mainly two reasons:
20217 \end_layout
20218
20219 \begin_layout Enumerate
20220 Relative and absolute file names should remain relative or absolute, respectivel
20221 y.
20222  Users may have reasons to prefer either form.
20223  Relative names are useful for portable documents that should work on different
20224  machines, for example.
20225  Absolute names may be required by some programs.
20226 \end_layout
20227
20228 \begin_layout Enumerate
20229 LaTeX treats relative file names differently than LyX and other programs
20230  in nested included files.
20231  For LyX, a relative file name is always relative to the document that contains
20232  the file name.
20233  For LaTeX, it is always relative to the master document.
20234  These two definitions are identical if you have only one document, but
20235  differ if you have a master document that includes part documents.
20236  That means that relative filenames must be transformed when presented to
20237  LaTeX.
20238  Fortunately LyX does this automatically for you if you choose the right
20239  macros.
20240 \end_layout
20241
20242 \begin_layout Standard
20243 So which path macro should be used in new template definitions? The rule
20244  is not difficult:
20245 \end_layout
20246
20247 \begin_layout Itemize
20248 Use 
20249 \begin_inset Flex Code
20250 status collapsed
20251
20252 \begin_layout Plain Layout
20253 $$AbsPath
20254 \end_layout
20255
20256 \end_inset
20257
20258  if an absolute path is required.
20259 \end_layout
20260
20261 \begin_layout Itemize
20262 Use 
20263 \begin_inset Flex Code
20264 status collapsed
20265
20266 \begin_layout Plain Layout
20267 $$AbsOrRelPathMaster
20268 \end_layout
20269
20270 \end_inset
20271
20272  if the substituted string is some kind of LaTeX input.
20273 \end_layout
20274
20275 \begin_layout Itemize
20276 Else use 
20277 \begin_inset Flex Code
20278 status collapsed
20279
20280 \begin_layout Plain Layout
20281 $$AbsOrRelPathParent
20282 \end_layout
20283
20284 \end_inset
20285
20286  in order to preserve the user's choice.
20287 \end_layout
20288
20289 \begin_layout Standard
20290 There are special cases where this rule does not work and e.
20291 \begin_inset space \thinspace{}
20292 \end_inset
20293
20294 g.
20295 \begin_inset space \space{}
20296 \end_inset
20297
20298 relative names are needed, but normally it will work just fine.
20299  One example for such a case is the command 
20300 \begin_inset Flex Code
20301 status collapsed
20302
20303 \begin_layout Plain Layout
20304 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
20305 \end_layout
20306
20307 \end_inset
20308
20309  in the XFig template above: We can't use the absolute name because the
20310  copier for 
20311 \begin_inset Flex Code
20312 status collapsed
20313
20314 \begin_layout Plain Layout
20315 .pstex_t
20316 \end_layout
20317
20318 \end_inset
20319
20320  files needs the relative name in order to rewrite the file content.
20321 \end_layout
20322
20323 \begin_layout Section
20324 Security discussion
20325 \begin_inset CommandInset label
20326 LatexCommand label
20327 name "sec:Security-discussion"
20328
20329 \end_inset
20330
20331
20332 \end_layout
20333
20334 \begin_layout Standard
20335 The external material feature interfaces with a lot of external programs
20336  and does so automatically, so we have to consider the security implications
20337  of this.
20338  In particular, since you have the option of including your own filenames
20339  and/or parameter strings and those are expanded into a command, it seems
20340  that it would be possible to create a malicious document which executes
20341  arbitrary commands when a user views or prints the document.
20342  This is something we definitely want to avoid.
20343 \end_layout
20344
20345 \begin_layout Standard
20346 However, since the external program commands are specified in the template
20347  configuration file only, there are no security issues if LyX is properly
20348  configured with safe templates only.
20349  This is so because the external programs are invoked with the 
20350 \begin_inset Flex Code
20351 status collapsed
20352
20353 \begin_layout Plain Layout
20354 execvp
20355 \end_layout
20356
20357 \end_inset
20358
20359 -system call rather than the 
20360 \begin_inset Flex Code
20361 status collapsed
20362
20363 \begin_layout Plain Layout
20364 system
20365 \end_layout
20366
20367 \end_inset
20368
20369  system-call, so it's not possible to execute arbitrary commands from the
20370  filename or parameter section via the shell.
20371 \end_layout
20372
20373 \begin_layout Standard
20374 This also implies that you are restricted in what command strings you can
20375  use in the external material templates.
20376  In particular, pipes and redirection are not readily available.
20377  This has to be so if LyX should remain safe.
20378  If you want to use some of the shell features, you should write a safe
20379  script to do this in a controlled manner, and then invoke the script from
20380  the command string.
20381  
20382 \end_layout
20383
20384 \begin_layout Standard
20385 It is possible to design a template that interacts directly with the shell,
20386  but since this would allow a malicious user to execute arbitrary commands
20387  by writing clever filenames and/or parameters, we generally recommend that
20388  you only use safe scripts that work with the 
20389 \begin_inset Flex Code
20390 status collapsed
20391
20392 \begin_layout Plain Layout
20393 execvp
20394 \end_layout
20395
20396 \end_inset
20397
20398  system call in a controlled manner.
20399  Of course, for use in a controlled environment, it can be tempting to just
20400  fall back to use ordinary shell scripts.
20401  If you do so, be aware that you 
20402 \emph on
20403 will
20404 \emph default
20405  provide an easily exploitable security hole in your system.
20406  Of course it stands to reason that such unsafe templates will never be
20407  included in the standard LyX distribution, although we do encourage people
20408  to submit new templates in the open source tradition.
20409  But LyX as shipped from the official distribution channels will never have
20410  unsafe templates.
20411 \end_layout
20412
20413 \begin_layout Standard
20414 Including external material provides a lot of power, and you have to be
20415  careful not to introduce security hazards with this power.
20416  A subtle error in a single line in an innocent looking script can open
20417  the door to huge security problems.
20418  So if you do not fully understand the issues, we recommend that you consult
20419  a knowledgeable security professional or the LyX development team if you
20420  have any questions about whether a given template is safe or not.
20421  And do this before you use it in an uncontrolled environment.
20422 \end_layout
20423
20424 \end_body
20425 \end_document