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