]> git.lyx.org Git - lyx.git/blob - lib/doc/Customization.lyx
4e70704d7bdf88d464bbbb39de9433e2089994e1
[lyx.git] / lib / doc / Customization.lyx
1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 448
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 1353691469
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.
10369  For the menu, you can define an accelerator by appending the respective
10370  character to the string, divided by 
10371 \begin_inset Quotes eld
10372 \end_inset
10373
10374 |
10375 \begin_inset Quotes erd
10376 \end_inset
10377
10378  (e.
10379 \begin_inset space \thinspace{}
10380 \end_inset
10381
10382 g.
10383  
10384 \begin_inset Flex Code
10385 status collapsed
10386
10387 \begin_layout Plain Layout
10388
10389 \change_inserted -712698321 1353691482
10390 \begin_inset Quotes eld
10391 \end_inset
10392
10393 Short Title|S
10394 \begin_inset Quotes erd
10395 \end_inset
10396
10397
10398 \change_unchanged
10399
10400 \end_layout
10401
10402 \end_inset
10403
10404 ).
10405 \end_layout
10406
10407 \begin_layout Itemize
10408
10409 \change_inserted -712698321 1353680665
10410 \begin_inset Flex Code
10411 status collapsed
10412
10413 \begin_layout Plain Layout
10414
10415 \change_inserted -712698321 1353680616
10416 Tooltip
10417 \end_layout
10418
10419 \end_inset
10420
10421  
10422 \begin_inset Flex Code
10423 status collapsed
10424
10425 \begin_layout Plain Layout
10426
10427 \change_inserted -712698321 1353680623
10428 [string]
10429 \end_layout
10430
10431 \end_inset
10432
10433  A longer explanatory text that appears in the tooltip when hovering over
10434  the argument inset.
10435 \end_layout
10436
10437 \begin_layout Itemize
10438
10439 \change_inserted -712698321 1353680874
10440 \begin_inset Flex Code
10441 status collapsed
10442
10443 \begin_layout Plain Layout
10444
10445 \change_inserted -712698321 1353680732
10446 Mandatory
10447 \end_layout
10448
10449 \end_inset
10450
10451  
10452 \begin_inset Flex Code
10453 status collapsed
10454
10455 \begin_layout Plain Layout
10456
10457 \change_inserted -712698321 1353680738
10458 [int=0]
10459 \end_layout
10460
10461 \end_inset
10462
10463  Declare if this is a mandatory 
10464 \change_inserted 2090807402 1353765594
10465 (1) 
10466 \change_inserted -712698321 1353680874
10467 or an optional 
10468 \change_inserted 2090807402 1353765599
10469 (0) 
10470 \change_inserted -712698321 1353680874
10471 argument.
10472  Mandatory arguments will be output empty if not given, while optional arguments
10473  will not be output at all.
10474  By default, mandatory arguments are delimited by 
10475 \begin_inset Flex Code
10476 status collapsed
10477
10478 \begin_layout Plain Layout
10479
10480 \change_inserted -712698321 1353680808
10481 {...}
10482 \change_unchanged
10483
10484 \end_layout
10485
10486 \end_inset
10487
10488 , while optional arguments are delimited by 
10489 \begin_inset Flex Code
10490 status collapsed
10491
10492 \begin_layout Plain Layout
10493
10494 \change_inserted -712698321 1353680833
10495 [...]
10496 \end_layout
10497
10498 \end_inset
10499
10500
10501 \end_layout
10502
10503 \begin_layout Itemize
10504
10505 \change_inserted -712698321 1353917199
10506 \begin_inset Flex Code
10507 status collapsed
10508
10509 \begin_layout Plain Layout
10510
10511 \change_inserted -712698321 1353680879
10512 Requires
10513 \end_layout
10514
10515 \end_inset
10516
10517  
10518 \begin_inset Flex Code
10519 status collapsed
10520
10521 \begin_layout Plain Layout
10522
10523 \change_inserted -712698321 1353680874
10524 [int=0]
10525 \end_layout
10526
10527 \end_inset
10528
10529  defines another argument (by its number) which this argument requires to
10530  be output if it is itself output.
10531  E.
10532 \begin_inset space \thinspace{}
10533 \end_inset
10534
10535 g., in LaTeX commands, optional arguments often require previous optional
10536  arguments to be output (at least empty), as in 
10537 \begin_inset Flex Code
10538 status collapsed
10539
10540 \begin_layout Plain Layout
10541
10542 \change_inserted -712698321 1353688183
10543
10544 \backslash
10545 command[][arg]{text}
10546 \change_unchanged
10547
10548 \end_layout
10549
10550 \end_inset
10551
10552 .
10553  This can be achieved by the statement 
10554 \begin_inset Flex Code
10555 status collapsed
10556
10557 \begin_layout Plain Layout
10558
10559 \change_inserted -712698321 1353681031
10560 Requires 1
10561 \change_unchanged
10562
10563 \end_layout
10564
10565 \end_inset
10566
10567  within 
10568 \begin_inset Flex Code
10569 status collapsed
10570
10571 \begin_layout Plain Layout
10572
10573 \change_inserted -712698321 1353681045
10574 Argument 2
10575 \change_unchanged
10576
10577 \end_layout
10578
10579 \end_inset
10580
10581 .
10582 \end_layout
10583
10584 \begin_layout Itemize
10585
10586 \change_inserted -712698321 1353681145
10587 \begin_inset Flex Code
10588 status collapsed
10589
10590 \begin_layout Plain Layout
10591
10592 \change_inserted -712698321 1353681072
10593 LeftDelim
10594 \change_unchanged
10595
10596 \end_layout
10597
10598 \end_inset
10599
10600  
10601 \begin_inset Flex Code
10602 status collapsed
10603
10604 \begin_layout Plain Layout
10605
10606 \change_inserted -712698321 1353681067
10607 [string]
10608 \end_layout
10609
10610 \end_inset
10611
10612  defines a custom left delimiter (instead of 
10613 \begin_inset Flex Code
10614 status collapsed
10615
10616 \begin_layout Plain Layout
10617
10618 \change_inserted -712698321 1353681127
10619 {
10620 \change_unchanged
10621
10622 \end_layout
10623
10624 \end_inset
10625
10626  or 
10627 \begin_inset Flex Code
10628 status collapsed
10629
10630 \begin_layout Plain Layout
10631
10632 \change_inserted -712698321 1353681133
10633 [
10634 \change_unchanged
10635
10636 \end_layout
10637
10638 \end_inset
10639
10640 ).
10641 \end_layout
10642
10643 \begin_layout Itemize
10644
10645 \change_inserted -712698321 1353917319
10646 \begin_inset Flex Code
10647 status collapsed
10648
10649 \begin_layout Plain Layout
10650
10651 \change_inserted -712698321 1353681149
10652 RightDelim
10653 \end_layout
10654
10655 \end_inset
10656
10657  
10658 \begin_inset Flex Code
10659 status collapsed
10660
10661 \begin_layout Plain Layout
10662
10663 \change_inserted -712698321 1353681146
10664 [string]
10665 \end_layout
10666
10667 \end_inset
10668
10669  defines a custom right delimiter (instead of 
10670 \begin_inset Flex Code
10671 status collapsed
10672
10673 \begin_layout Plain Layout
10674
10675 \change_inserted -712698321 1353681158
10676 }
10677 \end_layout
10678
10679 \end_inset
10680
10681  or 
10682 \begin_inset Flex Code
10683 status collapsed
10684
10685 \begin_layout Plain Layout
10686
10687 \change_inserted -712698321 1353681161
10688 ]
10689 \end_layout
10690
10691 \end_inset
10692
10693 ).
10694 \end_layout
10695
10696 \begin_layout Itemize
10697
10698 \change_inserted -712698321 1353917320
10699 \begin_inset Flex Code
10700 status collapsed
10701
10702 \begin_layout Plain Layout
10703
10704 \change_inserted -712698321 1353917320
10705 Font
10706 \end_layout
10707
10708 \end_inset
10709
10710  The font used for the argument content.
10711  See section
10712 \begin_inset space ~
10713 \end_inset
10714
10715
10716 \begin_inset CommandInset ref
10717 LatexCommand ref
10718 reference "sub:Font-description"
10719
10720 \end_inset
10721
10722 .
10723 \end_layout
10724
10725 \begin_layout Itemize
10726
10727 \change_inserted -712698321 1353917320
10728 \begin_inset Flex Code
10729 status collapsed
10730
10731 \begin_layout Plain Layout
10732
10733 \change_inserted -712698321 1353917320
10734 LabelFont
10735 \end_layout
10736
10737 \end_inset
10738
10739  The font used for the label.
10740  See section
10741 \begin_inset space ~
10742 \end_inset
10743
10744
10745 \begin_inset CommandInset ref
10746 LatexCommand ref
10747 reference "sub:Font-description"
10748
10749 \end_inset
10750
10751 .
10752 \end_layout
10753
10754 \begin_layout Itemize
10755
10756 \change_inserted -712698321 1353917320
10757 \begin_inset Flex Code
10758 status collapsed
10759
10760 \begin_layout Plain Layout
10761
10762 \change_inserted -712698321 1353917320
10763 Decoration
10764 \end_layout
10765
10766 \end_inset
10767
10768  can be 
10769 \begin_inset Flex Code
10770 status collapsed
10771
10772 \begin_layout Plain Layout
10773
10774 \change_inserted -712698321 1353917320
10775 Classic
10776 \end_layout
10777
10778 \end_inset
10779
10780
10781 \begin_inset Flex Code
10782 status collapsed
10783
10784 \begin_layout Plain Layout
10785
10786 \change_inserted -712698321 1353917320
10787 Minimalistic
10788 \end_layout
10789
10790 \end_inset
10791
10792 , or 
10793 \begin_inset Flex Code
10794 status collapsed
10795
10796 \begin_layout Plain Layout
10797
10798 \change_inserted -712698321 1353917320
10799 Conglomerate
10800 \end_layout
10801
10802 \end_inset
10803
10804 , describing the rendering style used for the inset's frame and buttons.
10805  Default is 
10806 \begin_inset Flex Code
10807 status collapsed
10808
10809 \begin_layout Plain Layout
10810
10811 \change_inserted -712698321 1353917320
10812 Classic
10813 \end_layout
10814
10815 \end_inset
10816
10817 .
10818 \change_unchanged
10819
10820 \end_layout
10821
10822 \end_deeper
10823 \begin_layout Description
10824 \begin_inset Flex Code
10825 status collapsed
10826
10827 \begin_layout Plain Layout
10828 BabelPreamble
10829 \end_layout
10830
10831 \end_inset
10832
10833  Note that this will completely override any prior 
10834 \begin_inset Flex Code
10835 status collapsed
10836
10837 \begin_layout Plain Layout
10838 BabelPreamble
10839 \end_layout
10840
10841 \end_inset
10842
10843  declaration for this style.
10844  Must end with 
10845 \begin_inset Quotes eld
10846 \end_inset
10847
10848
10849 \begin_inset Flex Code
10850 status collapsed
10851
10852 \begin_layout Plain Layout
10853 EndBabelPreamble
10854 \end_layout
10855
10856 \end_inset
10857
10858
10859 \begin_inset Quotes erd
10860 \end_inset
10861
10862 .
10863  See section 
10864 \begin_inset CommandInset ref
10865 LatexCommand ref
10866 reference "sub:I18n"
10867
10868 \end_inset
10869
10870  for details on its use.
10871 \end_layout
10872
10873 \begin_layout Description
10874 \begin_inset Flex Code
10875 status collapsed
10876
10877 \begin_layout Plain Layout
10878 BottomSep
10879 \end_layout
10880
10881 \end_inset
10882
10883  [
10884 \begin_inset Flex Code
10885 status collapsed
10886
10887 \begin_layout Plain Layout
10888 float=0
10889 \end_layout
10890
10891 \end_inset
10892
10893 ]
10894 \begin_inset Foot
10895 status collapsed
10896
10897 \begin_layout Plain Layout
10898 Note that a `float' here is a real number, such as: 1.5.
10899 \end_layout
10900
10901 \end_inset
10902
10903  The vertical space with which the last of a chain of paragraphs with this
10904  style is separated from the following paragraph.
10905  If the next paragraph has another style, the separations are not simply
10906  added, but the maximum is taken.
10907 \end_layout
10908
10909 \begin_layout Description
10910 \begin_inset Flex Code
10911 status collapsed
10912
10913 \begin_layout Plain Layout
10914 Category
10915 \end_layout
10916
10917 \end_inset
10918
10919  
10920 \begin_inset Flex Code
10921 status collapsed
10922
10923 \begin_layout Plain Layout
10924 [string]
10925 \end_layout
10926
10927 \end_inset
10928
10929  The category for this style.
10930  This is used to group related styles in the style combobox on the toolbar.
10931  Any string can be used, but you may want to use existing categories with
10932  your own styles.
10933  
10934 \end_layout
10935
10936 \begin_layout Description
10937 \begin_inset Flex Code
10938 status collapsed
10939
10940 \begin_layout Plain Layout
10941 CommandDepth
10942 \end_layout
10943
10944 \end_inset
10945
10946  Depth of XML command.
10947  Used only with XML-type formats.
10948 \end_layout
10949
10950 \begin_layout Description
10951 \begin_inset Flex Code
10952 status collapsed
10953
10954 \begin_layout Plain Layout
10955 CopyStyle
10956 \end_layout
10957
10958 \end_inset
10959
10960  
10961 \begin_inset Flex Code
10962 status collapsed
10963
10964 \begin_layout Plain Layout
10965 [string]
10966 \end_layout
10967
10968 \end_inset
10969
10970  Copies all the features of an existing style into the current one.
10971  
10972 \end_layout
10973
10974 \begin_layout Description
10975 \begin_inset Flex Code
10976 status collapsed
10977
10978 \begin_layout Plain Layout
10979 DependsOn
10980 \end_layout
10981
10982 \end_inset
10983
10984  The name of a style whose preamble should be output 
10985 \emph on
10986 before
10987 \emph default
10988  this one.
10989  This allows to ensure some ordering of the preamble snippets when macros
10990  definitions depend on one another.
10991 \begin_inset Foot
10992 status collapsed
10993
10994 \begin_layout Plain Layout
10995 Note that, besides that functionality, there is no way to ensure any ordering
10996  of preambles.
10997  The ordering that you see in a given version of LyX may change without
10998  warning in later versions.
10999 \end_layout
11000
11001 \end_inset
11002
11003
11004 \end_layout
11005
11006 \begin_layout Description
11007 \begin_inset Flex Code
11008 status collapsed
11009
11010 \begin_layout Plain Layout
11011 EndLabeltype
11012 \end_layout
11013
11014 \end_inset
11015
11016  [
11017 \begin_inset Flex Code
11018 status collapsed
11019
11020 \begin_layout Plain Layout
11021
11022 \emph on
11023 No_Label
11024 \emph default
11025 , Box, Filled_Box, Static
11026 \end_layout
11027
11028 \end_inset
11029
11030 ] The type of label that stands at the end of the paragraph (or sequence
11031  of paragraphs if 
11032 \begin_inset Flex Code
11033 status collapsed
11034
11035 \begin_layout Plain Layout
11036 LatexType
11037 \end_layout
11038
11039 \end_inset
11040
11041  is 
11042 \begin_inset Flex Code
11043 status collapsed
11044
11045 \begin_layout Plain Layout
11046 Environment
11047 \end_layout
11048
11049 \end_inset
11050
11051
11052 \begin_inset Flex Code
11053 status collapsed
11054
11055 \begin_layout Plain Layout
11056 Item_Environment
11057 \end_layout
11058
11059 \end_inset
11060
11061  or 
11062 \begin_inset Flex Code
11063 status collapsed
11064
11065 \begin_layout Plain Layout
11066 List_Environment
11067 \end_layout
11068
11069 \end_inset
11070
11071 ).
11072  
11073 \begin_inset Flex Code
11074 status collapsed
11075
11076 \begin_layout Plain Layout
11077 No_Label
11078 \end_layout
11079
11080 \end_inset
11081
11082  means 
11083 \begin_inset Quotes eld
11084 \end_inset
11085
11086 nothing
11087 \begin_inset Quotes erd
11088 \end_inset
11089
11090
11091 \begin_inset Flex Code
11092 status collapsed
11093
11094 \begin_layout Plain Layout
11095 Box
11096 \end_layout
11097
11098 \end_inset
11099
11100  (resp.
11101 \begin_inset Flex Code
11102 status collapsed
11103
11104 \begin_layout Plain Layout
11105 \begin_inset space ~
11106 \end_inset
11107
11108 Filled_Box
11109 \end_layout
11110
11111 \end_inset
11112
11113 ) is a white (resp.
11114 \begin_inset space ~
11115 \end_inset
11116
11117 black) square suitable for end of proof markers, 
11118 \begin_inset Flex Code
11119 status collapsed
11120
11121 \begin_layout Plain Layout
11122 Static
11123 \end_layout
11124
11125 \end_inset
11126
11127  is an explicit text string.
11128 \end_layout
11129
11130 \begin_layout Description
11131 \begin_inset Flex Code
11132 status collapsed
11133
11134 \begin_layout Plain Layout
11135 EndLabelString
11136 \end_layout
11137
11138 \end_inset
11139
11140  [
11141 \begin_inset Flex Code
11142 status collapsed
11143
11144 \begin_layout Plain Layout
11145 string=""
11146 \end_layout
11147
11148 \end_inset
11149
11150 ] The string used for a label with a 
11151 \begin_inset Flex Code
11152 status collapsed
11153
11154 \begin_layout Plain Layout
11155 Static
11156 \end_layout
11157
11158 \end_inset
11159
11160  
11161 \begin_inset Flex Code
11162 status collapsed
11163
11164 \begin_layout Plain Layout
11165 EndLabelType
11166 \end_layout
11167
11168 \end_inset
11169
11170 .
11171  
11172 \end_layout
11173
11174 \begin_layout Description
11175 \begin_inset Flex Code
11176 status collapsed
11177
11178 \begin_layout Plain Layout
11179 Font
11180 \end_layout
11181
11182 \end_inset
11183
11184  The font used for both the text body 
11185 \emph on
11186 and
11187 \emph default
11188  the label.
11189  See section
11190 \begin_inset space ~
11191 \end_inset
11192
11193
11194 \begin_inset CommandInset ref
11195 LatexCommand ref
11196 reference "sub:Font-description"
11197
11198 \end_inset
11199
11200 .
11201  Note that defining this font automatically defines the 
11202 \begin_inset Flex Code
11203 status collapsed
11204
11205 \begin_layout Plain Layout
11206 LabelFont
11207 \end_layout
11208
11209 \end_inset
11210
11211  to the same value.
11212  So you should define this one first if you also want to define 
11213 \begin_inset Flex Code
11214 status collapsed
11215
11216 \begin_layout Plain Layout
11217 LabelFont
11218 \end_layout
11219
11220 \end_inset
11221
11222 .
11223 \end_layout
11224
11225 \begin_layout Description
11226 \begin_inset Flex Code
11227 status collapsed
11228
11229 \begin_layout Plain Layout
11230 FreeSpacing
11231 \end_layout
11232
11233 \end_inset
11234
11235  
11236 \begin_inset CommandInset label
11237 LatexCommand label
11238 name "des:FreeSpacing"
11239
11240 \end_inset
11241
11242 [
11243 \begin_inset Flex Code
11244 status collapsed
11245
11246 \begin_layout Plain Layout
11247
11248 \emph on
11249 0
11250 \end_layout
11251
11252 \end_inset
11253
11254
11255 \begin_inset Flex Code
11256 status collapsed
11257
11258 \begin_layout Plain Layout
11259 1
11260 \end_layout
11261
11262 \end_inset
11263
11264 ] Usually LyX doesn't allow you to insert more than one space between words,
11265  since a space is considered as the separation between two words, not a
11266  character or symbol of its own.
11267  This is a very fine thing but sometimes annoying, for example, when typing
11268  program code or plain LaTeX code.
11269  For this reason, 
11270 \begin_inset Flex Code
11271 status collapsed
11272
11273 \begin_layout Plain Layout
11274 FreeSpacing
11275 \end_layout
11276
11277 \end_inset
11278
11279  can be enabled.
11280  Note that LyX will create protected blanks for the additional blanks when
11281  in another mode than LaTeX-mode.
11282 \end_layout
11283
11284 \begin_layout Description
11285 \begin_inset Flex Code
11286 status collapsed
11287
11288 \begin_layout Plain Layout
11289 HTML*
11290 \end_layout
11291
11292 \end_inset
11293
11294  These tags are used with XHTML output.
11295  See 
11296 \begin_inset CommandInset ref
11297 LatexCommand ref
11298 reference "sub:Paragraph-Style-XHTML"
11299
11300 \end_inset
11301
11302 .
11303 \end_layout
11304
11305 \begin_layout Description
11306 \begin_inset Flex Code
11307 status collapsed
11308
11309 \begin_layout Plain Layout
11310 InnerTag
11311 \end_layout
11312
11313 \end_inset
11314
11315  [[FIXME]] (Used only with XML-type formats.)
11316 \end_layout
11317
11318 \begin_layout Description
11319 \begin_inset Flex Code
11320 status collapsed
11321
11322 \begin_layout Plain Layout
11323 InPreamble
11324 \end_layout
11325
11326 \end_inset
11327
11328  
11329 \begin_inset Flex Code
11330 status collapsed
11331
11332 \begin_layout Plain Layout
11333 [1, 0]
11334 \end_layout
11335
11336 \end_inset
11337
11338  If 1, marks the style as to be included in the document preamble rather
11339  than in the document body.
11340  This is useful for document classes that want such information as the title
11341  and author to appear in the preamble.
11342  Note that this works only for styles for which the 
11343 \begin_inset Flex Code
11344 status collapsed
11345
11346 \begin_layout Plain Layout
11347 LatexType
11348 \end_layout
11349
11350 \end_inset
11351
11352  is 
11353 \begin_inset Flex Code
11354 status collapsed
11355
11356 \begin_layout Plain Layout
11357 Command
11358 \end_layout
11359
11360 \end_inset
11361
11362  or 
11363 \begin_inset Flex Code
11364 status collapsed
11365
11366 \begin_layout Plain Layout
11367 Paragraph
11368 \end_layout
11369
11370 \end_inset
11371
11372 .
11373 \end_layout
11374
11375 \begin_layout Description
11376 \begin_inset Flex Code
11377 status collapsed
11378
11379 \begin_layout Plain Layout
11380 InTitle
11381 \end_layout
11382
11383 \end_inset
11384
11385  
11386 \begin_inset Flex Code
11387 status collapsed
11388
11389 \begin_layout Plain Layout
11390 [1, 0]
11391 \end_layout
11392
11393 \end_inset
11394
11395  If 1, marks the style as being part of a title block (see also the 
11396 \begin_inset Flex Code
11397 status collapsed
11398
11399 \begin_layout Plain Layout
11400 TitleLatexType
11401 \end_layout
11402
11403 \end_inset
11404
11405  and 
11406 \begin_inset Flex Code
11407 status collapsed
11408
11409 \begin_layout Plain Layout
11410 TitleLatexName
11411 \end_layout
11412
11413 \end_inset
11414
11415  global entries).
11416 \end_layout
11417
11418 \begin_layout Description
11419 \begin_inset Flex Code
11420 status collapsed
11421
11422 \begin_layout Plain Layout
11423 ItemSep
11424 \end_layout
11425
11426 \end_inset
11427
11428  [
11429 \begin_inset Flex Code
11430 status collapsed
11431
11432 \begin_layout Plain Layout
11433 float=0
11434 \end_layout
11435
11436 \end_inset
11437
11438 ] This provides extra space between paragraphs that have the same style.
11439  If you put other styles into an environment, each is separated with the
11440  environment's 
11441 \begin_inset Flex Code
11442 status collapsed
11443
11444 \begin_layout Plain Layout
11445 Parsep
11446 \end_layout
11447
11448 \end_inset
11449
11450 .
11451  But the whole items of the environment are additionally separated with
11452  this 
11453 \begin_inset Flex Code
11454 status collapsed
11455
11456 \begin_layout Plain Layout
11457 Itemsep
11458 \end_layout
11459
11460 \end_inset
11461
11462 .
11463  Note that this is a
11464 \emph on
11465  multiplier.
11466 \end_layout
11467
11468 \begin_layout Description
11469 \begin_inset Flex Code
11470 status collapsed
11471
11472 \begin_layout Plain Layout
11473 ItemTag
11474 \end_layout
11475
11476 \end_inset
11477
11478  [[FIXME]] (Used only with XML-type formats.)
11479 \end_layout
11480
11481 \begin_layout Description
11482 \begin_inset Flex Code
11483 status collapsed
11484
11485 \begin_layout Plain Layout
11486 KeepEmpty
11487 \end_layout
11488
11489 \end_inset
11490
11491  [
11492 \begin_inset Flex Code
11493 status collapsed
11494
11495 \begin_layout Plain Layout
11496
11497 \emph on
11498 0
11499 \end_layout
11500
11501 \end_inset
11502
11503
11504 \begin_inset Flex Code
11505 status collapsed
11506
11507 \begin_layout Plain Layout
11508 1
11509 \end_layout
11510
11511 \end_inset
11512
11513 ] Usually LyX does not allow you to leave a paragraph empty, since it would
11514  lead to empty LaTeX output.
11515  There are some cases where this could be desirable however: in a letter
11516  template, the required fields can be provided as empty fields, so that
11517  people do not forget them; in some special classes, a style can be used
11518  as some kind of break, which does not contain actual text.
11519 \end_layout
11520
11521 \begin_layout Description
11522 \begin_inset Flex Code
11523 status collapsed
11524
11525 \begin_layout Plain Layout
11526 LabelBottomsep
11527 \end_layout
11528
11529 \end_inset
11530
11531  [float=0] The vertical space between the label and the text body.
11532  Only used for labels that are above the text body (
11533 \begin_inset Flex Code
11534 status collapsed
11535
11536 \begin_layout Plain Layout
11537 Top_Environment
11538 \end_layout
11539
11540 \end_inset
11541
11542
11543 \begin_inset Flex Code
11544 status collapsed
11545
11546 \begin_layout Plain Layout
11547 Centered_Top_Environment
11548 \end_layout
11549
11550 \end_inset
11551
11552 ).
11553 \end_layout
11554
11555 \begin_layout Description
11556 \begin_inset Flex Code
11557 status collapsed
11558
11559 \begin_layout Plain Layout
11560 LabelCounter
11561 \end_layout
11562
11563 \end_inset
11564
11565  [
11566 \begin_inset Flex Code
11567 status collapsed
11568
11569 \begin_layout Plain Layout
11570 string=""
11571 \end_layout
11572
11573 \end_inset
11574
11575 ]
11576 \begin_inset Newline newline
11577 \end_inset
11578
11579 The name of the counter for automatic numbering.
11580  
11581 \begin_inset Newline newline
11582 \end_inset
11583
11584 This 
11585 \emph on
11586 must
11587 \emph default
11588  be given if 
11589 \begin_inset Flex Code
11590 status collapsed
11591
11592 \begin_layout Plain Layout
11593 LabelType
11594 \end_layout
11595
11596 \end_inset
11597
11598  is 
11599 \begin_inset Flex Code
11600 status collapsed
11601
11602 \begin_layout Plain Layout
11603 Counter
11604 \end_layout
11605
11606 \end_inset
11607
11608 .
11609  In that case, the counter will be stepped each time the style appears.
11610  
11611 \begin_inset Newline newline
11612 \end_inset
11613
11614 This 
11615 \emph on
11616 may
11617 \emph default
11618  also be given if 
11619 \begin_inset Flex Code
11620 status collapsed
11621
11622 \begin_layout Plain Layout
11623 LabelType
11624 \end_layout
11625
11626 \end_inset
11627
11628  is 
11629 \begin_inset Flex Code
11630 status collapsed
11631
11632 \begin_layout Plain Layout
11633 Enumerate
11634 \end_layout
11635
11636 \end_inset
11637
11638 , though this case is a bit complicated.
11639  Suppose you declare 
11640 \begin_inset Quotes eld
11641 \end_inset
11642
11643
11644 \begin_inset Flex Code
11645 status collapsed
11646
11647 \begin_layout Plain Layout
11648 LabelCounter myenum
11649 \end_layout
11650
11651 \end_inset
11652
11653
11654 \begin_inset Quotes erd
11655 \end_inset
11656
11657 .
11658  Then the actual counters used are 
11659 \begin_inset Flex Code
11660 status collapsed
11661
11662 \begin_layout Plain Layout
11663 myenumi
11664 \end_layout
11665
11666 \end_inset
11667
11668
11669 \begin_inset Flex Code
11670 status collapsed
11671
11672 \begin_layout Plain Layout
11673 myenumii
11674 \end_layout
11675
11676 \end_inset
11677
11678
11679 \begin_inset Flex Code
11680 status collapsed
11681
11682 \begin_layout Plain Layout
11683 myenumiii
11684 \end_layout
11685
11686 \end_inset
11687
11688 , and 
11689 \begin_inset Flex Code
11690 status collapsed
11691
11692 \begin_layout Plain Layout
11693 myenumiv
11694 \end_layout
11695
11696 \end_inset
11697
11698 , much as in LaTeX.
11699  These counters must all be declared separately.
11700 \begin_inset Newline newline
11701 \end_inset
11702
11703 See Section 
11704 \begin_inset CommandInset ref
11705 LatexCommand ref
11706 reference "sub:Counters"
11707
11708 \end_inset
11709
11710  for details on counters.
11711 \end_layout
11712
11713 \begin_layout Description
11714 \begin_inset Flex Code
11715 status collapsed
11716
11717 \begin_layout Plain Layout
11718 LabelFont
11719 \end_layout
11720
11721 \end_inset
11722
11723  The font used for the label.
11724  See section
11725 \begin_inset space ~
11726 \end_inset
11727
11728
11729 \begin_inset CommandInset ref
11730 LatexCommand ref
11731 reference "sub:Font-description"
11732
11733 \end_inset
11734
11735 .
11736 \end_layout
11737
11738 \begin_layout Description
11739 \begin_inset Flex Code
11740 status collapsed
11741
11742 \begin_layout Plain Layout
11743 LabelIndent
11744 \end_layout
11745
11746 \end_inset
11747
11748  Text that indicates how far a label should be indented.
11749 \end_layout
11750
11751 \begin_layout Description
11752 \begin_inset Flex Code
11753 status collapsed
11754
11755 \begin_layout Plain Layout
11756 Labelsep
11757 \end_layout
11758
11759 \end_inset
11760
11761  [
11762 \begin_inset Flex Code
11763 status collapsed
11764
11765 \begin_layout Plain Layout
11766 string=""
11767 \end_layout
11768
11769 \end_inset
11770
11771 ] The horizontal space between the label and the text body.
11772  Only used for labels that are not above the text body.
11773 \end_layout
11774
11775 \begin_layout Description
11776 \begin_inset Flex Code
11777 status collapsed
11778
11779 \begin_layout Plain Layout
11780 LabelString
11781 \end_layout
11782
11783 \end_inset
11784
11785  [
11786 \begin_inset Flex Code
11787 status collapsed
11788
11789 \begin_layout Plain Layout
11790 string=""
11791 \end_layout
11792
11793 \end_inset
11794
11795 ] The string used for a label with a 
11796 \begin_inset Flex Code
11797 status collapsed
11798
11799 \begin_layout Plain Layout
11800 Static
11801 \end_layout
11802
11803 \end_inset
11804
11805  labeltype.
11806  When 
11807 \begin_inset Flex Code
11808 status collapsed
11809
11810 \begin_layout Plain Layout
11811 LabelCounter
11812 \end_layout
11813
11814 \end_inset
11815
11816  is set, this string can be contain the special formatting commands described
11817  in Section 
11818 \begin_inset CommandInset ref
11819 LatexCommand ref
11820 reference "sub:Counters"
11821
11822 \end_inset
11823
11824 .
11825 \begin_inset Foot
11826 status collapsed
11827
11828 \begin_layout Plain Layout
11829 For the sake of backwards compatibility, the string 
11830 \begin_inset Flex Code
11831 status collapsed
11832
11833 \begin_layout Plain Layout
11834 @
11835 \emph on
11836 style-name
11837 \emph default
11838 @
11839 \end_layout
11840
11841 \end_inset
11842
11843  will be replaced by the expanded 
11844 \begin_inset Flex Code
11845 status collapsed
11846
11847 \begin_layout Plain Layout
11848 LabelString
11849 \end_layout
11850
11851 \end_inset
11852
11853  of style 
11854 \begin_inset Flex Code
11855 status collapsed
11856
11857 \begin_layout Plain Layout
11858
11859 \emph on
11860 style-name
11861 \end_layout
11862
11863 \end_inset
11864
11865 .
11866  This feature is now obsolete and should be replaced by the mechanisms of
11867  Section 
11868 \begin_inset CommandInset ref
11869 LatexCommand ref
11870 reference "sub:Counters"
11871
11872 \end_inset
11873
11874 .
11875 \end_layout
11876
11877 \end_inset
11878
11879
11880 \end_layout
11881
11882 \begin_layout Description
11883 \begin_inset Flex Code
11884 status collapsed
11885
11886 \begin_layout Plain Layout
11887 LabelStringAppendix
11888 \end_layout
11889
11890 \end_inset
11891
11892  [
11893 \begin_inset Flex Code
11894 status collapsed
11895
11896 \begin_layout Plain Layout
11897 string=""
11898 \end_layout
11899
11900 \end_inset
11901
11902 ] This is used inside the appendix instead of 
11903 \begin_inset Flex Code
11904 status collapsed
11905
11906 \begin_layout Plain Layout
11907 LabelString
11908 \end_layout
11909
11910 \end_inset
11911
11912 .
11913  Note that every 
11914 \begin_inset Flex Code
11915 status collapsed
11916
11917 \begin_layout Plain Layout
11918 LabelString
11919 \end_layout
11920
11921 \end_inset
11922
11923  statement resets 
11924 \begin_inset Flex Code
11925 status collapsed
11926
11927 \begin_layout Plain Layout
11928 LabelStringAppendix
11929 \end_layout
11930
11931 \end_inset
11932
11933  too.
11934 \end_layout
11935
11936 \begin_layout Description
11937 \begin_inset Flex Code
11938 status collapsed
11939
11940 \begin_layout Plain Layout
11941 LabelTag
11942 \end_layout
11943
11944 \end_inset
11945
11946  [FIXME] (Used only with XML-type formats.)
11947 \end_layout
11948
11949 \begin_layout Description
11950 \begin_inset Flex Code
11951 status collapsed
11952
11953 \begin_layout Plain Layout
11954 LabelType
11955 \end_layout
11956
11957 \end_inset
11958
11959  [
11960 \begin_inset Flex Code
11961 status collapsed
11962
11963 \begin_layout Plain Layout
11964
11965 \emph on
11966 No_Label
11967 \emph default
11968 , Manual, Static, Top_Environment, Centered_Top_Environment, Counter, Sensitive,
11969  Enumerate, Itemize, Bibliography
11970 \end_layout
11971
11972 \end_inset
11973
11974
11975 \end_layout
11976
11977 \begin_deeper
11978 \begin_layout Itemize
11979 \begin_inset Flex Code
11980 status collapsed
11981
11982 \begin_layout Plain Layout
11983 Manual
11984 \end_layout
11985
11986 \end_inset
11987
11988  means the label is the very first word (up to the first real blank).
11989  Use protected spaces (like
11990 \begin_inset space ~
11991 \end_inset
11992
11993 that one) if you want more than one word as the label.
11994  
11995 \end_layout
11996
11997 \begin_layout Itemize
11998 \begin_inset Flex Code
11999 status collapsed
12000
12001 \begin_layout Plain Layout
12002 Static
12003 \end_layout
12004
12005 \end_inset
12006
12007  means the label is simply whatever 
12008 \begin_inset Flex Code
12009 status collapsed
12010
12011 \begin_layout Plain Layout
12012 LabelString
12013 \end_layout
12014
12015 \end_inset
12016
12017  declares it to be.
12018  Note that this really is `static'.
12019 \end_layout
12020
12021 \begin_layout Itemize
12022 \begin_inset Flex Code
12023 status collapsed
12024
12025 \begin_layout Plain Layout
12026 Top_Environment
12027 \end_layout
12028
12029 \end_inset
12030
12031  and 
12032 \begin_inset Flex Code
12033 status collapsed
12034
12035 \begin_layout Plain Layout
12036 Centered_Top_Environment
12037 \end_layout
12038
12039 \end_inset
12040
12041  are special cases of 
12042 \begin_inset Flex Code
12043 status collapsed
12044
12045 \begin_layout Plain Layout
12046 Static
12047 \end_layout
12048
12049 \end_inset
12050
12051 .
12052  The label will be printed above the paragraph, but only at the top of an
12053  environment or the top of a chain of paragraphs with this style.
12054  This might be used with the 
12055 \begin_inset Flex MenuItem
12056 status collapsed
12057
12058 \begin_layout Plain Layout
12059 Abstract
12060 \end_layout
12061
12062 \end_inset
12063
12064  style, for example.
12065 \end_layout
12066
12067 \begin_layout Itemize
12068 \begin_inset Flex Code
12069 status collapsed
12070
12071 \begin_layout Plain Layout
12072 Sensitive
12073 \end_layout
12074
12075 \end_inset
12076
12077  is a special case for the caption-labels 
12078 \begin_inset Quotes eld
12079 \end_inset
12080
12081 Figure
12082 \begin_inset Quotes erd
12083 \end_inset
12084
12085  and 
12086 \begin_inset Quotes eld
12087 \end_inset
12088
12089 Table
12090 \begin_inset Quotes erd
12091 \end_inset
12092
12093 .
12094  
12095 \begin_inset Flex Code
12096 status collapsed
12097
12098 \begin_layout Plain Layout
12099 Sensitive
12100 \end_layout
12101
12102 \end_inset
12103
12104  means the (hardcoded) label string depends on the kind of float: It is
12105  hardcoded to be `FloatType N', where N is the value of the counter associated
12106  with the float.
12107 \end_layout
12108
12109 \begin_layout Itemize
12110 The 
12111 \begin_inset Flex Code
12112 status collapsed
12113
12114 \begin_layout Plain Layout
12115 Counter
12116 \end_layout
12117
12118 \end_inset
12119
12120  label type defines automatically numbered labels.
12121  The 
12122 \begin_inset Flex Code
12123 status collapsed
12124
12125 \begin_layout Plain Layout
12126 LabelString
12127 \end_layout
12128
12129 \end_inset
12130
12131  will be expanded to resolve any counter references it contains: For example,
12132  it might be 
12133 \begin_inset Quotes eld
12134 \end_inset
12135
12136
12137 \begin_inset Flex Code
12138 status collapsed
12139
12140 \begin_layout Plain Layout
12141 Section 
12142 \backslash
12143 thechapter.
12144 \backslash
12145 thesection
12146 \end_layout
12147
12148 \end_inset
12149
12150
12151 \begin_inset Quotes erd
12152 \end_inset
12153
12154 .
12155  See Section 
12156 \begin_inset CommandInset ref
12157 LatexCommand ref
12158 reference "sub:Counters"
12159
12160 \end_inset
12161
12162  for more information on counters.
12163 \end_layout
12164
12165 \begin_layout Itemize
12166 \begin_inset Flex Code
12167 status collapsed
12168
12169 \begin_layout Plain Layout
12170 Enumerate
12171 \end_layout
12172
12173 \end_inset
12174
12175  produces the usual sort of enumeration labels.
12176  At present, it is hardcoded to use Arabic numerals, lowercase letters,
12177  small Roman numerals, and uppercase letters for the four possible depths.
12178 \end_layout
12179
12180 \begin_layout Itemize
12181 \begin_inset Flex Code
12182 status collapsed
12183
12184 \begin_layout Plain Layout
12185 Itemize
12186 \end_layout
12187
12188 \end_inset
12189
12190  produces various bullets at the different levels.
12191  It is also hardcoded.
12192 \end_layout
12193
12194 \begin_layout Itemize
12195 \begin_inset Flex Code
12196 status collapsed
12197
12198 \begin_layout Plain Layout
12199 Bibliography
12200 \end_layout
12201
12202 \end_inset
12203
12204  is used internally by LyX and should be used only with 
12205 \begin_inset Flex Code
12206 status collapsed
12207
12208 \begin_layout Plain Layout
12209 LatexType BibEnvironment
12210 \end_layout
12211
12212 \end_inset
12213
12214 .
12215 \end_layout
12216
12217 \end_deeper
12218 \begin_layout Description
12219 \begin_inset Flex Code
12220 status collapsed
12221
12222 \begin_layout Plain Layout
12223 LangPreamble
12224 \end_layout
12225
12226 \end_inset
12227
12228  Note that this will completely override any prior 
12229 \begin_inset Flex Code
12230 status collapsed
12231
12232 \begin_layout Plain Layout
12233 LangPreamble
12234 \end_layout
12235
12236 \end_inset
12237
12238  declaration for this style.
12239  Must end with 
12240 \begin_inset Quotes eld
12241 \end_inset
12242
12243
12244 \begin_inset Flex Code
12245 status collapsed
12246
12247 \begin_layout Plain Layout
12248 EndLangPreamble
12249 \end_layout
12250
12251 \end_inset
12252
12253
12254 \begin_inset Quotes erd
12255 \end_inset
12256
12257 .
12258  See section 
12259 \begin_inset CommandInset ref
12260 LatexCommand ref
12261 reference "sub:I18n"
12262
12263 \end_inset
12264
12265  for details on its use.
12266 \end_layout
12267
12268 \begin_layout Description
12269 \begin_inset Flex Code
12270 status collapsed
12271
12272 \begin_layout Plain Layout
12273 LatexName
12274 \end_layout
12275
12276 \end_inset
12277
12278  The name of the corresponding LaTeX stuff.
12279  Either the environment or command name.
12280 \end_layout
12281
12282 \begin_layout Description
12283 \begin_inset Flex Code
12284 status collapsed
12285
12286 \begin_layout Plain Layout
12287 LatexParam
12288 \end_layout
12289
12290 \end_inset
12291
12292  An optional parameter for the corresponding 
12293 \begin_inset Flex Code
12294 status collapsed
12295
12296 \begin_layout Plain Layout
12297 LatexName
12298 \end_layout
12299
12300 \end_inset
12301
12302  stuff.
12303  This parameter cannot be changed from within LyX.
12304 \end_layout
12305
12306 \begin_layout Description
12307 \begin_inset Flex Code
12308 status collapsed
12309
12310 \begin_layout Plain Layout
12311 LatexType
12312 \end_layout
12313
12314 \end_inset
12315
12316  [
12317 \begin_inset Flex Code
12318 status collapsed
12319
12320 \begin_layout Plain Layout
12321
12322 \emph on
12323 Paragraph
12324 \emph default
12325 , Command, Environment, Item_Environment,
12326 \end_layout
12327
12328 \end_inset
12329
12330  
12331 \begin_inset Flex Code
12332 status collapsed
12333
12334 \begin_layout Plain Layout
12335 List_Environment, Bib_Environment
12336 \end_layout
12337
12338 \end_inset
12339
12340 ] How the style should be translated into LaTeX.
12341 \begin_inset Foot
12342 status collapsed
12343
12344 \begin_layout Plain Layout
12345 \begin_inset Flex Code
12346 status collapsed
12347
12348 \begin_layout Plain Layout
12349 LatexType
12350 \end_layout
12351
12352 \end_inset
12353
12354  is perhaps a bit misleading, since these rules apply to SGML classes, too.
12355  Visit the SGML class files for specific examples.
12356 \end_layout
12357
12358 \end_inset
12359
12360
12361 \end_layout
12362
12363 \begin_deeper
12364 \begin_layout Itemize
12365 \begin_inset Flex Code
12366 status collapsed
12367
12368 \begin_layout Plain Layout
12369 Paragraph
12370 \end_layout
12371
12372 \end_inset
12373
12374  means nothing special.
12375  
12376 \end_layout
12377
12378 \begin_layout Itemize
12379 \begin_inset Flex Code
12380 status collapsed
12381
12382 \begin_layout Plain Layout
12383 Command
12384 \end_layout
12385
12386 \end_inset
12387
12388  means 
12389 \begin_inset Flex Code
12390 status collapsed
12391
12392 \begin_layout Plain Layout
12393
12394 \backslash
12395
12396 \emph on
12397 LatexName
12398 \emph default
12399 {\SpecialChar \ldots{}
12400 }
12401 \end_layout
12402
12403 \end_inset
12404
12405 .
12406 \end_layout
12407
12408 \begin_layout Itemize
12409 \begin_inset Flex Code
12410 status collapsed
12411
12412 \begin_layout Plain Layout
12413 Environment
12414 \end_layout
12415
12416 \end_inset
12417
12418  means 
12419 \begin_inset Flex Code
12420 status collapsed
12421
12422 \begin_layout Plain Layout
12423
12424 \backslash
12425 begin{
12426 \emph on
12427 LatexName
12428 \emph default
12429 }\SpecialChar \ldots{}
12430
12431 \backslash
12432 end{
12433 \emph on
12434 LatexName
12435 \emph default
12436 }
12437 \end_layout
12438
12439 \end_inset
12440
12441 .
12442  
12443 \end_layout
12444
12445 \begin_layout Itemize
12446 \begin_inset Flex Code
12447 status collapsed
12448
12449 \begin_layout Plain Layout
12450 Item_Environment
12451 \end_layout
12452
12453 \end_inset
12454
12455  is the same as 
12456 \begin_inset Flex Code
12457 status collapsed
12458
12459 \begin_layout Plain Layout
12460 Environment
12461 \end_layout
12462
12463 \end_inset
12464
12465 , except that an 
12466 \begin_inset Flex Code
12467 status collapsed
12468
12469 \begin_layout Plain Layout
12470
12471 \backslash
12472 item
12473 \end_layout
12474
12475 \end_inset
12476
12477  is generated for each paragraph of this environment.
12478  
12479 \end_layout
12480
12481 \begin_layout Itemize
12482 \begin_inset Flex Code
12483 status collapsed
12484
12485 \begin_layout Plain Layout
12486 List_Environment
12487 \end_layout
12488
12489 \end_inset
12490
12491  is the same as 
12492 \begin_inset Flex Code
12493 status collapsed
12494
12495 \begin_layout Plain Layout
12496 Item_Environment
12497 \end_layout
12498
12499 \end_inset
12500
12501 , except that 
12502 \begin_inset Flex Code
12503 status collapsed
12504
12505 \begin_layout Plain Layout
12506 LabelWidthString
12507 \end_layout
12508
12509 \end_inset
12510
12511  is passed as an argument to the environment.
12512  
12513 \begin_inset Flex Code
12514 status collapsed
12515
12516 \begin_layout Plain Layout
12517 LabelWidthString
12518 \end_layout
12519
12520 \end_inset
12521
12522  can be defined in the 
12523 \begin_inset Flex MenuItem
12524 status collapsed
12525
12526 \begin_layout Plain Layout
12527 Edit\SpecialChar \menuseparator
12528 Paragraph
12529 \begin_inset space ~
12530 \end_inset
12531
12532 settings
12533 \end_layout
12534
12535 \end_inset
12536
12537  dialog.
12538  
12539 \end_layout
12540
12541 \begin_layout Standard
12542 Putting the last few things together, the LaTeX output will be either: 
12543 \end_layout
12544
12545 \begin_layout LyX-Code
12546
12547 \backslash
12548 latexname[latexparam]{\SpecialChar \ldots{}
12549 }
12550 \end_layout
12551
12552 \begin_layout Standard
12553 or: 
12554 \end_layout
12555
12556 \begin_layout LyX-Code
12557
12558 \backslash
12559 begin{latexname}[latexparam] \SpecialChar \ldots{}
12560  
12561 \backslash
12562 end{latexname}.
12563 \end_layout
12564
12565 \begin_layout Standard
12566 depending upon the LaTeX type.
12567 \end_layout
12568
12569 \end_deeper
12570 \begin_layout Description
12571
12572 \change_inserted -712698321 1353866861
12573 \begin_inset Flex Code
12574 status collapsed
12575
12576 \begin_layout Plain Layout
12577
12578 \change_inserted -712698321 1353866852
12579 LeftDelim
12580 \end_layout
12581
12582 \end_inset
12583
12584  [
12585 \begin_inset Flex Code
12586 status collapsed
12587
12588 \begin_layout Plain Layout
12589
12590 \change_inserted -712698321 1353866852
12591 string
12592 \end_layout
12593
12594 \end_inset
12595
12596 ] A string that is put at the beginning of the style content.
12597 \end_layout
12598
12599 \begin_layout Description
12600 \begin_inset Flex Code
12601 status collapsed
12602
12603 \begin_layout Plain Layout
12604 LeftMargin
12605 \end_layout
12606
12607 \end_inset
12608
12609  [
12610 \begin_inset Flex Code
12611 status collapsed
12612
12613 \begin_layout Plain Layout
12614 string=""
12615 \end_layout
12616
12617 \end_inset
12618
12619 ] If you put styles into environments, the leftmargins are not simply added,
12620  but added with a factor 
12621 \begin_inset Formula $\frac{4}{depth+4}$
12622 \end_inset
12623
12624 .
12625  Note that this parameter is also used when the margin is defined as 
12626 \begin_inset Flex Code
12627 status collapsed
12628
12629 \begin_layout Plain Layout
12630 Manual
12631 \end_layout
12632
12633 \end_inset
12634
12635  or 
12636 \begin_inset Flex Code
12637 status collapsed
12638
12639 \begin_layout Plain Layout
12640 Dynamic
12641 \end_layout
12642
12643 \end_inset
12644
12645 .
12646  Then it is added to the manual or dynamic margin.
12647  
12648 \begin_inset Newline newline
12649 \end_inset
12650
12651 The argument is passed as a string.
12652  For example 
12653 \begin_inset Quotes eld
12654 \end_inset
12655
12656
12657 \begin_inset Flex Code
12658 status collapsed
12659
12660 \begin_layout Plain Layout
12661 MM
12662 \end_layout
12663
12664 \end_inset
12665
12666
12667 \begin_inset Quotes erd
12668 \end_inset
12669
12670  means that the paragraph is indented with the width of 
12671 \begin_inset Quotes eld
12672 \end_inset
12673
12674
12675 \begin_inset Flex Code
12676 status collapsed
12677
12678 \begin_layout Plain Layout
12679 MM
12680 \end_layout
12681
12682 \end_inset
12683
12684
12685 \begin_inset Quotes erd
12686 \end_inset
12687
12688  in the normal font.
12689  You can get a negative width by prefixing the string with 
12690 \begin_inset Quotes eld
12691 \end_inset
12692
12693
12694 \begin_inset Flex Code
12695 status collapsed
12696
12697 \begin_layout Plain Layout
12698 -
12699 \end_layout
12700
12701 \end_inset
12702
12703
12704 \begin_inset Quotes erd
12705 \end_inset
12706
12707 .
12708  This way was chosen so that the look is the same with each used screen
12709  font.
12710  
12711 \end_layout
12712
12713 \begin_layout Description
12714 \begin_inset Flex Code
12715 status collapsed
12716
12717 \begin_layout Plain Layout
12718 Margin
12719 \end_layout
12720
12721 \end_inset
12722
12723  [
12724 \begin_inset Flex Code
12725 status collapsed
12726
12727 \begin_layout Plain Layout
12728
12729 \emph on
12730 Static
12731 \emph default
12732 , Manual, Dynamic, First_Dynamic, Right_Address_Box
12733 \end_layout
12734
12735 \end_inset
12736
12737
12738 \begin_inset Newline newline
12739 \end_inset
12740
12741 The kind of margin that the style has on the left side.
12742  
12743 \begin_inset Flex Code
12744 status collapsed
12745
12746 \begin_layout Plain Layout
12747 Static
12748 \end_layout
12749
12750 \end_inset
12751
12752  just means a fixed margin.
12753  
12754 \begin_inset Flex Code
12755 status collapsed
12756
12757 \begin_layout Plain Layout
12758 Manual
12759 \end_layout
12760
12761 \end_inset
12762
12763  means that the left margin depends on the string entered in the 
12764 \begin_inset Flex MenuItem
12765 status collapsed
12766
12767 \begin_layout Plain Layout
12768 Edit\SpecialChar \menuseparator
12769 Paragraph
12770 \begin_inset space ~
12771 \end_inset
12772
12773 Settings
12774 \end_layout
12775
12776 \end_inset
12777
12778  dialog.
12779  This is used to typeset nice lists without tabulators.
12780  
12781 \begin_inset Flex Code
12782 status collapsed
12783
12784 \begin_layout Plain Layout
12785 Dynamic
12786 \end_layout
12787
12788 \end_inset
12789
12790  means that the margin depends on the size of the label.
12791  This is used for automatic enumerated headlines.
12792  It is obvious that the headline 
12793 \begin_inset Quotes eld
12794 \end_inset
12795
12796 5.4.3.2.1 Very long headline
12797 \begin_inset Quotes erd
12798 \end_inset
12799
12800  must have a wider left margin (as wide as 
12801 \begin_inset Quotes eld
12802 \end_inset
12803
12804 5.4.3.2.1
12805 \begin_inset Quotes erd
12806 \end_inset
12807
12808  plus the space) than 
12809 \begin_inset Quotes eld
12810 \end_inset
12811
12812 3.2 Very long headline
12813 \begin_inset Quotes erd
12814 \end_inset
12815
12816 , even if standard 
12817 \begin_inset Quotes eld
12818 \end_inset
12819
12820 word processors
12821 \begin_inset Quotes erd
12822 \end_inset
12823
12824  are not able to do this.
12825  
12826 \begin_inset Flex Code
12827 status collapsed
12828
12829 \begin_layout Plain Layout
12830 First_Dynamic
12831 \end_layout
12832
12833 \end_inset
12834
12835  is similar, but only the very first row of the paragraph is dynamic, while
12836  the others are static; this is used, for example, for descriptions.
12837  
12838 \begin_inset Flex Code
12839 status collapsed
12840
12841 \begin_layout Plain Layout
12842 Right_Address_Box
12843 \end_layout
12844
12845 \end_inset
12846
12847  means the margin is chosen in a way that the longest row of this paragraph
12848  fits to the right margin.
12849  This is used to typeset an address on the right edge of the page.
12850 \end_layout
12851
12852 \begin_layout Description
12853 \begin_inset Flex Code
12854 status collapsed
12855
12856 \begin_layout Plain Layout
12857 NeedProtect
12858 \end_layout
12859
12860 \end_inset
12861
12862  [
12863 \begin_inset Flex Code
12864 status collapsed
12865
12866 \begin_layout Plain Layout
12867
12868 \emph on
12869 0
12870 \end_layout
12871
12872 \end_inset
12873
12874 ,
12875 \begin_inset Flex Code
12876 status collapsed
12877
12878 \begin_layout Plain Layout
12879 1
12880 \end_layout
12881
12882 \end_inset
12883
12884 ] Whether fragile commands in this style should be 
12885 \begin_inset Flex Code
12886 status collapsed
12887
12888 \begin_layout Plain Layout
12889
12890 \backslash
12891 protect
12892 \end_layout
12893
12894 \end_inset
12895
12896 'ed.
12897  (Note: This is 
12898 \emph on
12899 not
12900 \emph default
12901  whether this command should itself be protected.)
12902 \end_layout
12903
12904 \begin_layout Description
12905 \begin_inset Flex Code
12906 status collapsed
12907
12908 \begin_layout Plain Layout
12909 Newline
12910 \end_layout
12911
12912 \end_inset
12913
12914  [
12915 \begin_inset Flex Code
12916 status collapsed
12917
12918 \begin_layout Plain Layout
12919 0
12920 \end_layout
12921
12922 \end_inset
12923
12924
12925 \begin_inset Flex Code
12926 status collapsed
12927
12928 \begin_layout Plain Layout
12929
12930 \emph on
12931 1
12932 \end_layout
12933
12934 \end_inset
12935
12936 ] Whether newlines are translated into LaTeX newlines (
12937 \begin_inset Flex Code
12938 status collapsed
12939
12940 \begin_layout Plain Layout
12941
12942 \backslash
12943
12944 \backslash
12945
12946 \end_layout
12947
12948 \end_inset
12949
12950 ) or not.
12951  The translation can be switched off to allow more comfortable LaTeX editing
12952  inside LyX.
12953 \end_layout
12954
12955 \begin_layout Description
12956 \begin_inset Flex Code
12957 status collapsed
12958
12959 \begin_layout Plain Layout
12960 NextNoIndent
12961 \end_layout
12962
12963 \end_inset
12964
12965  [
12966 \begin_inset Flex Code
12967 status collapsed
12968
12969 \begin_layout Plain Layout
12970 1
12971 \end_layout
12972
12973 \end_inset
12974
12975
12976 \begin_inset Flex Code
12977 status collapsed
12978
12979 \begin_layout Plain Layout
12980
12981 \emph on
12982 0
12983 \end_layout
12984
12985 \end_inset
12986
12987 ] If set to true, and if 
12988 \begin_inset Flex Code
12989 status collapsed
12990
12991 \begin_layout Plain Layout
12992 DefaultStyle
12993 \end_layout
12994
12995 \end_inset
12996
12997  (usually 
12998 \begin_inset Flex Code
12999 status collapsed
13000
13001 \begin_layout Plain Layout
13002 Standard
13003 \end_layout
13004
13005 \end_inset
13006
13007 ) paragraphs are being indented, then the indentation of such a paragraph
13008  following one of this type will be suppressed.
13009  (So this will not affect the display of non-default paragraphs.)
13010 \end_layout
13011
13012 \begin_layout Description
13013 \begin_inset Flex Code
13014 status collapsed
13015
13016 \begin_layout Plain Layout
13017 ObsoletedBy
13018 \end_layout
13019
13020 \end_inset
13021
13022  Name of a style that has replaced this style.
13023  This is used to rename a style, while keeping backward compatibility.
13024 \end_layout
13025
13026 \begin_layout Description
13027
13028 \change_deleted -712698321 1353679722
13029 \begin_inset Flex Code
13030 status collapsed
13031
13032 \begin_layout Plain Layout
13033 OptionalArgs
13034 \end_layout
13035
13036 \end_inset
13037
13038  [
13039 \begin_inset Flex Code
13040 status collapsed
13041
13042 \begin_layout Plain Layout
13043 int=0
13044 \end_layout
13045
13046 \end_inset
13047
13048 ] The number of optional arguments that can be used with this style.
13049  This is useful for things like section headings, and only makes sense with
13050  LaTeX.
13051  Note that, on output, the optional arguments will all precede any required
13052  arguments (see below).
13053  So one can have constructs like:
13054 \end_layout
13055
13056 \begin_deeper
13057 \begin_layout LyX-Code
13058
13059 \change_deleted -712698321 1353679722
13060
13061 \backslash
13062 mycmd[opt1]{req1}{contents of paragraph}
13063 \end_layout
13064
13065 \begin_layout Standard
13066
13067 \change_deleted -712698321 1353679722
13068 but one cannot have things like: 
13069 \end_layout
13070
13071 \begin_layout LyX-Code
13072
13073 \change_deleted -712698321 1353679722
13074
13075 \backslash
13076 mycmd[opt1]{req1}[opt2]{contents of paragraph}
13077 \end_layout
13078
13079 \begin_layout Standard
13080
13081 \change_deleted -712698321 1353679722
13082 at least, not without ERT (with which you can have anything).
13083  
13084 \change_unchanged
13085
13086 \end_layout
13087
13088 \end_deeper
13089 \begin_layout Description
13090 \begin_inset Flex Code
13091 status collapsed
13092
13093 \begin_layout Plain Layout
13094 ParbreakIsNewline
13095 \end_layout
13096
13097 \end_inset
13098
13099  [
13100 \begin_inset Flex Code
13101 status collapsed
13102
13103 \begin_layout Plain Layout
13104
13105 \emph on
13106 0
13107 \end_layout
13108
13109 \end_inset
13110
13111
13112 \begin_inset Flex Code
13113 status collapsed
13114
13115 \begin_layout Plain Layout
13116 1
13117 \end_layout
13118
13119 \end_inset
13120
13121 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
13122  output, but only by a line break; together with 
13123 \begin_inset Flex Code
13124 status collapsed
13125
13126 \begin_layout Plain Layout
13127 PassThru 1
13128 \end_layout
13129
13130 \end_inset
13131
13132 , this allows to emulate a plain text editor (like the ERT inset).
13133 \end_layout
13134
13135 \begin_layout Description
13136 \begin_inset Flex Code
13137 status collapsed
13138
13139 \begin_layout Plain Layout
13140 ParIndent
13141 \end_layout
13142
13143 \end_inset
13144
13145  [
13146 \begin_inset Flex Code
13147 status collapsed
13148
13149 \begin_layout Plain Layout
13150 string=""
13151 \end_layout
13152
13153 \end_inset
13154
13155 ] The indent of the very first line of a paragraph.
13156  The 
13157 \begin_inset Flex Code
13158 status collapsed
13159
13160 \begin_layout Plain Layout
13161 Parindent
13162 \end_layout
13163
13164 \end_inset
13165
13166  will be fixed for a certain style.
13167  The exception is the default style, since the indentation for these paragraphs
13168  can be prohibited with 
13169 \begin_inset Flex Code
13170 status collapsed
13171
13172 \begin_layout Plain Layout
13173 NextNoIndent
13174 \end_layout
13175
13176 \end_inset
13177
13178 .
13179  Also, 
13180 \begin_inset Flex Code
13181 status collapsed
13182
13183 \begin_layout Plain Layout
13184 Standard
13185 \end_layout
13186
13187 \end_inset
13188
13189  style paragraphs inside environments use the 
13190 \begin_inset Flex Code
13191 status collapsed
13192
13193 \begin_layout Plain Layout
13194 Parindent
13195 \end_layout
13196
13197 \end_inset
13198
13199  of the environment, not their native one.
13200  For example, 
13201 \begin_inset Flex Code
13202 status collapsed
13203
13204 \begin_layout Plain Layout
13205 Standard
13206 \end_layout
13207
13208 \end_inset
13209
13210  paragraphs inside an enumeration are not indented.
13211 \end_layout
13212
13213 \begin_layout Description
13214 \begin_inset Flex Code
13215 status collapsed
13216
13217 \begin_layout Plain Layout
13218 Parsep
13219 \end_layout
13220
13221 \end_inset
13222
13223  [
13224 \begin_inset Flex Code
13225 status collapsed
13226
13227 \begin_layout Plain Layout
13228 float=0
13229 \end_layout
13230
13231 \end_inset
13232
13233 ] The vertical space between two paragraphs of this style.
13234 \end_layout
13235
13236 \begin_layout Description
13237 \begin_inset Flex Code
13238 status collapsed
13239
13240 \begin_layout Plain Layout
13241 Parskip
13242 \end_layout
13243
13244 \end_inset
13245
13246  [
13247 \begin_inset Flex Code
13248 status collapsed
13249
13250 \begin_layout Plain Layout
13251 float=0
13252 \end_layout
13253
13254 \end_inset
13255
13256 ] LyX allows the user to choose either 
13257 \begin_inset Quotes eld
13258 \end_inset
13259
13260 indent
13261 \begin_inset Quotes erd
13262 \end_inset
13263
13264  or 
13265 \begin_inset Quotes eld
13266 \end_inset
13267
13268 skip
13269 \begin_inset Quotes erd
13270 \end_inset
13271
13272  to typeset a document.
13273  When 
13274 \begin_inset Quotes eld
13275 \end_inset
13276
13277 indent
13278 \begin_inset Quotes erd
13279 \end_inset
13280
13281  is chosen, this value is completely ignored.
13282  When 
13283 \begin_inset Quotes eld
13284 \end_inset
13285
13286 skip
13287 \begin_inset Quotes erd
13288 \end_inset
13289
13290  is chosen, the parindent of a LaTeXtype 
13291 \begin_inset Quotes eld
13292 \end_inset
13293
13294 Paragraph
13295 \begin_inset Quotes erd
13296 \end_inset
13297
13298  style is ignored and all paragraphs are separated by this parskip argument.
13299  The vertical space is calculated with 
13300 \begin_inset Flex Code
13301 status collapsed
13302
13303 \begin_layout Plain Layout
13304 value
13305 \begin_inset space ~
13306 \end_inset
13307
13308 * DefaultHeight
13309 \end_layout
13310
13311 \end_inset
13312
13313  where 
13314 \begin_inset Flex Code
13315 status collapsed
13316
13317 \begin_layout Plain Layout
13318 DefaultHeight
13319 \end_layout
13320
13321 \end_inset
13322
13323  is the height of a row with the normal font.
13324  This way, the look stays the same with different screen fonts.
13325 \end_layout
13326
13327 \begin_layout Description
13328 \begin_inset Flex Code
13329 status collapsed
13330
13331 \begin_layout Plain Layout
13332 PassThru
13333 \end_layout
13334
13335 \end_inset
13336
13337  [
13338 \begin_inset Flex Code
13339 status collapsed
13340
13341 \begin_layout Plain Layout
13342
13343 \emph on
13344 0
13345 \end_layout
13346
13347 \end_inset
13348
13349
13350 \begin_inset Flex Code
13351 status collapsed
13352
13353 \begin_layout Plain Layout
13354 1
13355 \end_layout
13356
13357 \end_inset
13358
13359 ] Whether the contents of this paragraph should be output in raw form, meaning
13360  without special translations that LaTeX would require.
13361 \end_layout
13362
13363 \begin_layout Description
13364 \begin_inset Flex Code
13365 status collapsed
13366
13367 \begin_layout Plain Layout
13368 Preamble
13369 \end_layout
13370
13371 \end_inset
13372
13373  Information to be included in the LaTeX preamble when this style is used.
13374  Used to define macros, load packages, etc., required by this particular
13375  style.
13376  Must end with 
13377 \begin_inset Quotes eld
13378 \end_inset
13379
13380
13381 \begin_inset Flex Code
13382 status collapsed
13383
13384 \begin_layout Plain Layout
13385 EndPreamble
13386 \end_layout
13387
13388 \end_inset
13389
13390
13391 \begin_inset Quotes erd
13392 \end_inset
13393
13394 .
13395 \end_layout
13396
13397 \begin_layout Description
13398 \begin_inset Flex Code
13399 status collapsed
13400
13401 \begin_layout Plain Layout
13402 RefPrefix
13403 \end_layout
13404
13405 \end_inset
13406
13407  [
13408 \begin_inset Flex Code
13409 status collapsed
13410
13411 \begin_layout Plain Layout
13412 string
13413 \end_layout
13414
13415 \end_inset
13416
13417 ] The prefix to use when creating labels referring to paragraphs of this
13418  type.
13419  This allows the use of formatted references.
13420 \end_layout
13421
13422 \begin_layout Description
13423
13424 \change_deleted -712698321 1353681258
13425 \begin_inset Flex Code
13426 status collapsed
13427
13428 \begin_layout Plain Layout
13429 RequiredArgs
13430 \end_layout
13431
13432 \end_inset
13433
13434  [
13435 \begin_inset Flex Code
13436 status collapsed
13437
13438 \begin_layout Plain Layout
13439 int=0
13440 \end_layout
13441
13442 \end_inset
13443
13444 ] The number of required arguments that the LaTeX command or environment
13445  corresponding to this style expects.
13446  In the case of a command, these are required arguments 
13447 \emph on
13448 other than
13449 \emph default
13450  that associated with the content of the paragraph itself.
13451  These do not actually have to be provided: LyX will output empty arguments
13452  if necessary.
13453  Note that optional arguments will be output before required arguments.
13454  See the discussion of the 
13455 \begin_inset Flex Code
13456 status collapsed
13457
13458 \begin_layout Plain Layout
13459 OptionalArgs
13460 \end_layout
13461
13462 \end_inset
13463
13464  tag above for more information.
13465 \change_unchanged
13466
13467 \end_layout
13468
13469 \begin_layout Description
13470 \begin_inset Flex Code
13471 status collapsed
13472
13473 \begin_layout Plain Layout
13474 Requires 
13475 \end_layout
13476
13477 \end_inset
13478
13479  [
13480 \begin_inset Flex Code
13481 status collapsed
13482
13483 \begin_layout Plain Layout
13484 string
13485 \end_layout
13486
13487 \end_inset
13488
13489 ] Whether the style requires the feature 
13490 \begin_inset Flex Code
13491 status collapsed
13492
13493 \begin_layout Plain Layout
13494 string
13495 \end_layout
13496
13497 \end_inset
13498
13499 .
13500  See the description of 
13501 \begin_inset Flex Code
13502 status collapsed
13503
13504 \begin_layout Plain Layout
13505 Provides
13506 \end_layout
13507
13508 \end_inset
13509
13510  above (page 
13511 \begin_inset CommandInset ref
13512 LatexCommand pageref
13513 reference "des:FreeSpacing"
13514
13515 \end_inset
13516
13517 ) for information on `features'.
13518  
13519 \change_inserted -712698321 1353693134
13520
13521 \end_layout
13522
13523 \begin_layout Description
13524
13525 \change_inserted -712698321 1353693371
13526 \begin_inset Flex Code
13527 status collapsed
13528
13529 \begin_layout Plain Layout
13530
13531 \change_inserted -712698321 1353693146
13532 ResetArgs
13533 \change_unchanged
13534
13535 \end_layout
13536
13537 \end_inset
13538
13539  [
13540 \begin_inset Flex Code
13541 status collapsed
13542
13543 \begin_layout Plain Layout
13544
13545 \change_inserted -712698321 1353693235
13546
13547 \emph on
13548 0
13549 \end_layout
13550
13551 \end_inset
13552
13553 ,
13554 \begin_inset Flex Code
13555 status collapsed
13556
13557 \begin_layout Plain Layout
13558
13559 \change_inserted -712698321 1353693235
13560 1
13561 \end_layout
13562
13563 \end_inset
13564
13565 ] Resets the LaTeX arguments of this style (as defined via the 
13566 \begin_inset Flex Code
13567 status collapsed
13568
13569 \begin_layout Plain Layout
13570
13571 \change_inserted -712698321 1353693371
13572 Argument
13573 \change_unchanged
13574
13575 \end_layout
13576
13577 \end_inset
13578
13579  tag).
13580  This is useful if you have copied a style via 
13581 \begin_inset Flex Code
13582 status collapsed
13583
13584 \begin_layout Plain Layout
13585
13586 \change_inserted -712698321 1353693302
13587 CopyStyle
13588 \change_unchanged
13589
13590 \end_layout
13591
13592 \end_inset
13593
13594 , but you do not want to inherit its (required and optional) arguments.
13595 \change_unchanged
13596
13597 \end_layout
13598
13599 \begin_layout Description
13600
13601 \change_inserted -712698321 1353866881
13602 \begin_inset Flex Code
13603 status collapsed
13604
13605 \begin_layout Plain Layout
13606
13607 \change_inserted -712698321 1353866876
13608 RightDelim
13609 \end_layout
13610
13611 \end_inset
13612
13613  [
13614 \begin_inset Flex Code
13615 status collapsed
13616
13617 \begin_layout Plain Layout
13618
13619 \change_inserted -712698321 1353866873
13620 string
13621 \end_layout
13622
13623 \end_inset
13624
13625 ] A string that is put at the end of the layout content.
13626 \end_layout
13627
13628 \begin_layout Description
13629 \begin_inset Flex Code
13630 status collapsed
13631
13632 \begin_layout Plain Layout
13633 RightMargin
13634 \end_layout
13635
13636 \end_inset
13637
13638  [
13639 \begin_inset Flex Code
13640 status collapsed
13641
13642 \begin_layout Plain Layout
13643 string=""
13644 \end_layout
13645
13646 \end_inset
13647
13648 ] Similar to 
13649 \begin_inset Flex Code
13650 status collapsed
13651
13652 \begin_layout Plain Layout
13653 LeftMargin
13654 \end_layout
13655
13656 \end_inset
13657
13658 .
13659 \end_layout
13660
13661 \begin_layout Description
13662 \begin_inset Flex Code
13663 status collapsed
13664
13665 \begin_layout Plain Layout
13666 Spacing
13667 \end_layout
13668
13669 \end_inset
13670
13671  [
13672 \begin_inset Flex Code
13673 status collapsed
13674
13675 \begin_layout Plain Layout
13676
13677 \emph on
13678 single
13679 \emph default
13680 , onehalf, double, other
13681 \end_layout
13682
13683 \end_inset
13684
13685  
13686 \emph on
13687 value
13688 \emph default
13689 ] This defines what the default spacing should be in the style.
13690  The arguments 
13691 \begin_inset Flex Code
13692 status collapsed
13693
13694 \begin_layout Plain Layout
13695 single
13696 \end_layout
13697
13698 \end_inset
13699
13700
13701 \begin_inset Flex Code
13702 status collapsed
13703
13704 \begin_layout Plain Layout
13705 onehalf
13706 \end_layout
13707
13708 \end_inset
13709
13710  and 
13711 \begin_inset Flex Code
13712 status collapsed
13713
13714 \begin_layout Plain Layout
13715 double
13716 \end_layout
13717
13718 \end_inset
13719
13720  correspond respectively to a multiplier value of 1, 1.25 and 1.667.
13721  If you specify the argument 
13722 \begin_inset Flex Code
13723 status collapsed
13724
13725 \begin_layout Plain Layout
13726 other
13727 \end_layout
13728
13729 \end_inset
13730
13731 , then you should also provide a numerical argument which will be the actual
13732  multiplier value.
13733  Note that, contrary to other parameters, 
13734 \begin_inset Flex Code
13735 status collapsed
13736
13737 \begin_layout Plain Layout
13738 Spacing
13739 \end_layout
13740
13741 \end_inset
13742
13743  implies the generation of specific LaTeX code, using the package 
13744 \family roman
13745
13746 \begin_inset Flex Code
13747 status collapsed
13748
13749 \begin_layout Plain Layout
13750 setspace.sty
13751 \end_layout
13752
13753 \end_inset
13754
13755 .
13756 \end_layout
13757
13758 \begin_layout Description
13759 \begin_inset Flex Code
13760 status collapsed
13761
13762 \begin_layout Plain Layout
13763 Spellcheck
13764 \end_layout
13765
13766 \end_inset
13767
13768  [
13769 \begin_inset Flex Code
13770 status collapsed
13771
13772 \begin_layout Plain Layout
13773 0
13774 \end_layout
13775
13776 \end_inset
13777
13778 ,
13779 \begin_inset Flex Code
13780 status collapsed
13781
13782 \begin_layout Plain Layout
13783
13784 \emph on
13785 1
13786 \end_layout
13787
13788 \end_inset
13789
13790 ] Spellcheck paragraphs of this style.
13791  Default is true.
13792 \end_layout
13793
13794 \begin_layout Description
13795 \begin_inset Flex Code
13796 status collapsed
13797
13798 \begin_layout Plain Layout
13799 TextFont
13800 \end_layout
13801
13802 \end_inset
13803
13804  The font used for the text body .
13805  See section 
13806 \begin_inset CommandInset ref
13807 LatexCommand ref
13808 reference "sub:Font-description"
13809
13810 \end_inset
13811
13812 .
13813 \end_layout
13814
13815 \begin_layout Description
13816 \begin_inset Flex Code
13817 status collapsed
13818
13819 \begin_layout Plain Layout
13820 TocLevel
13821 \end_layout
13822
13823 \end_inset
13824
13825
13826 \series medium
13827  
13828 \begin_inset Flex Code
13829 status collapsed
13830
13831 \begin_layout Plain Layout
13832
13833 \series medium
13834 [int]
13835 \end_layout
13836
13837 \end_inset
13838
13839
13840 \series default
13841  The level of the style in the table of contents.
13842  This is used for automatic numbering of section headings.
13843 \end_layout
13844
13845 \begin_layout Description
13846 \begin_inset Flex Code
13847 status collapsed
13848
13849 \begin_layout Plain Layout
13850 TopSep
13851 \end_layout
13852
13853 \end_inset
13854
13855  [
13856 \begin_inset Flex Code
13857 status collapsed
13858
13859 \begin_layout Plain Layout
13860 float=0
13861 \end_layout
13862
13863 \end_inset
13864
13865 ] The vertical space with which the very first of a chain of paragraphs
13866  with this style is separated from the previous paragraph.
13867  If the previous paragraph has another style, the separations are not simply
13868  added, but the maximum is taken.
13869 \end_layout
13870
13871 \begin_layout Subsection
13872 \begin_inset CommandInset label
13873 LatexCommand label
13874 name "sub:I18n"
13875
13876 \end_inset
13877
13878 Internationalization of Paragraph Styles
13879 \end_layout
13880
13881 \begin_layout Standard
13882 LyX has long supported internationalization of layout information, but,
13883  until version 2.0, this applied only to the user interface and not to, say,
13884  PDF output.
13885  Thus, French authors were forced to resort to ugly hacks if they wanted
13886  `
13887 \lang french
13888 Théorème
13889 \lang english
13890  1' instead of `Theorem 1'.
13891  Thanks to Georg Baum, that is no longer the case.
13892 \end_layout
13893
13894 \begin_layout Standard
13895 If a 
13896 \begin_inset Flex Code
13897 status collapsed
13898
13899 \begin_layout Plain Layout
13900 Style
13901 \end_layout
13902
13903 \end_inset
13904
13905  defines text that is to appear in the typeset document, it may use 
13906 \begin_inset Flex Code
13907 status collapsed
13908
13909 \begin_layout Plain Layout
13910 LangPreamble
13911 \end_layout
13912
13913 \end_inset
13914
13915  and 
13916 \begin_inset Flex Code
13917 status collapsed
13918
13919 \begin_layout Plain Layout
13920 BabelPreamble
13921 \end_layout
13922
13923 \end_inset
13924
13925  to support non-English and even multi-language documents correctly.
13926  The following excerpt (from the 
13927 \begin_inset Flex Code
13928 status collapsed
13929
13930 \begin_layout Plain Layout
13931 theorems-ams.inc
13932 \end_layout
13933
13934 \end_inset
13935
13936  file) shows how this works:
13937 \end_layout
13938
13939 \begin_layout LyX-Code
13940 Preamble
13941 \end_layout
13942
13943 \begin_deeper
13944 \begin_layout LyX-Code
13945   
13946 \backslash
13947 theoremstyle{remark}
13948 \end_layout
13949
13950 \begin_layout LyX-Code
13951   
13952 \backslash
13953 newtheorem{claim}[thm]{
13954 \backslash
13955 protect
13956 \backslash
13957 claimname}
13958 \end_layout
13959
13960 \begin_layout LyX-Code
13961 EndPreamble
13962 \end_layout
13963
13964 \begin_layout LyX-Code
13965 LangPreamble
13966 \end_layout
13967
13968 \begin_layout LyX-Code
13969   
13970 \backslash
13971 providecommand{
13972 \backslash
13973 claimname}{_(Claim)}
13974 \end_layout
13975
13976 \begin_layout LyX-Code
13977 EndLangPreamble
13978 \end_layout
13979
13980 \begin_layout LyX-Code
13981 BabelPreamble
13982 \end_layout
13983
13984 \begin_layout LyX-Code
13985     
13986 \backslash
13987 addto
13988 \backslash
13989 captions$$lang{
13990 \backslash
13991 renewcommand{
13992 \backslash
13993 claimname}{_(Claim)}}
13994 \end_layout
13995
13996 \begin_layout LyX-Code
13997 EndBabelPreamble
13998 \end_layout
13999
14000 \end_deeper
14001 \begin_layout Standard
14002 In principle, any legal LaTeX may appear in the 
14003 \begin_inset Flex Code
14004 status collapsed
14005
14006 \begin_layout Plain Layout
14007 LangPreamble
14008 \end_layout
14009
14010 \end_inset
14011
14012  and 
14013 \begin_inset Flex Code
14014 status collapsed
14015
14016 \begin_layout Plain Layout
14017 BabelPreamble
14018 \end_layout
14019
14020 \end_inset
14021
14022  tags, but in practice they will typically look as they do here.
14023  The key to correct translation of the typeset text is the definition of
14024  the LaTeX command 
14025 \begin_inset Flex Code
14026 status collapsed
14027
14028 \begin_layout Plain Layout
14029
14030 \backslash
14031 claimname
14032 \end_layout
14033
14034 \end_inset
14035
14036  and its use in 
14037 \begin_inset Flex Code
14038 status collapsed
14039
14040 \begin_layout Plain Layout
14041
14042 \backslash
14043 newtheorem
14044 \end_layout
14045
14046 \end_inset
14047
14048 .
14049  
14050 \end_layout
14051
14052 \begin_layout Standard
14053 The 
14054 \begin_inset Flex Code
14055 status collapsed
14056
14057 \begin_layout Plain Layout
14058 LangPreamble
14059 \end_layout
14060
14061 \end_inset
14062
14063  tag provides for internationalization based upon the overall language of
14064  the document.
14065  The contents of the tag will be included in the preamble, just as with
14066  the 
14067 \begin_inset Flex Code
14068 status collapsed
14069
14070 \begin_layout Plain Layout
14071 Preamble
14072 \end_layout
14073
14074 \end_inset
14075
14076  tag.
14077  What makes it special is the use of the 
14078 \begin_inset Quotes eld
14079 \end_inset
14080
14081 function
14082 \begin_inset Quotes erd
14083 \end_inset
14084
14085  
14086 \begin_inset Flex Code
14087 status collapsed
14088
14089 \begin_layout Plain Layout
14090 _()
14091 \end_layout
14092
14093 \end_inset
14094
14095 , which will be replaced, when LyX produces LaTeX output, with the translation
14096  of its argument into the document language.
14097 \end_layout
14098
14099 \begin_layout Standard
14100 The 
14101 \begin_inset Flex Code
14102 status collapsed
14103
14104 \begin_layout Plain Layout
14105 BabelPreamble
14106 \end_layout
14107
14108 \end_inset
14109
14110  tag is more complex, since it is meant to provide support for multi-language
14111  documents and so offers an interface to the 
14112 \begin_inset Flex Code
14113 status collapsed
14114
14115 \begin_layout Plain Layout
14116 babel
14117 \end_layout
14118
14119 \end_inset
14120
14121  package.
14122  Its contents will be added to the preamble once for each language that
14123  appears in the document.
14124  In this case, the argument to 
14125 \begin_inset Flex Code
14126 status collapsed
14127
14128 \begin_layout Plain Layout
14129 _()
14130 \end_layout
14131
14132 \end_inset
14133
14134  will be replaced with its translation into the language in question; the
14135  expression 
14136 \begin_inset Flex Code
14137 status collapsed
14138
14139 \begin_layout Plain Layout
14140 $$lang
14141 \end_layout
14142
14143 \end_inset
14144
14145  is replaced by the language name (as used by the babel package).
14146 \end_layout
14147
14148 \begin_layout Standard
14149 A German document that also included a French section would thus have the
14150  following in the preamble:
14151 \end_layout
14152
14153 \begin_layout LyX-Code
14154
14155 \backslash
14156 addto
14157 \backslash
14158 captionsfrench{
14159 \backslash
14160 renewcommand{
14161 \backslash
14162 claimname}{Affirmation}}   
14163 \backslash
14164 addto
14165 \backslash
14166 captionsngerman{
14167 \backslash
14168 renewcommand{
14169 \backslash
14170 claimname}{Behauptung}}   
14171 \backslash
14172 providecommand{
14173 \backslash
14174 claimname}{Behauptung}
14175 \end_layout
14176
14177 \begin_layout Standard
14178 LaTeX and 
14179 \begin_inset Flex Code
14180 status collapsed
14181
14182 \begin_layout Plain Layout
14183 babel
14184 \end_layout
14185
14186 \end_inset
14187
14188  will then conspire to produce the correct text in the output.
14189 \end_layout
14190
14191 \begin_layout Standard
14192 One important point to note here is that the translations are provided by
14193  LyX itself, through the 
14194 \change_inserted -195340706 1334775793
14195 file 
14196 \begin_inset Flex Code
14197 status collapsed
14198
14199 \begin_layout Plain Layout
14200
14201 \change_inserted -195340706 1334775793
14202 layouttranslations
14203 \end_layout
14204
14205 \end_inset
14206
14207
14208 \change_deleted -195340706 1334775793
14209 same mechanism it uses for internationalization of the user interface
14210 \change_unchanged
14211 .
14212  This means, in effect, that 
14213 \begin_inset Flex Code
14214 status collapsed
14215
14216 \begin_layout Plain Layout
14217 LangPreamble
14218 \end_layout
14219
14220 \end_inset
14221
14222  and 
14223 \begin_inset Flex Code
14224 status collapsed
14225
14226 \begin_layout Plain Layout
14227 BabelPreamble
14228 \end_layout
14229
14230 \end_inset
14231
14232  are really only of use in layout files that are provided with LyX, since
14233  text entered in user-created layout files will not be seen by LyX's internation
14234 alization routines
14235 \change_inserted -195340706 1334775793
14236  unless the 
14237 \begin_inset Flex Code
14238 status collapsed
14239
14240 \begin_layout Plain Layout
14241
14242 \change_inserted -195340706 1334775793
14243 layouttranslations
14244 \end_layout
14245
14246 \end_inset
14247
14248  file is modified accordingly
14249 \change_unchanged
14250 .
14251  That said, however, any layout created with the intention that it will
14252  be included with LyX should use these tags where appropriate.
14253
14254 \change_inserted -195340706 1334775793
14255  Please note that the paragraph style translations provided by LyX will
14256  never change with a minor update (e.g.
14257  from version 2.1.x to 2.1.y).
14258  It is however quite likely that a major update (e.g.
14259  from 2.0.x to 2.1.y) will introduce new translations or corrections.
14260 \change_unchanged
14261
14262 \end_layout
14263
14264 \begin_layout Subsection
14265 Floats
14266 \begin_inset CommandInset label
14267 LatexCommand label
14268 name "sub:Floats"
14269
14270 \end_inset
14271
14272
14273 \end_layout
14274
14275 \begin_layout Standard
14276 Since version 1.3.0 of LyX, it is has been both possible and necessary to
14277  define the floats (
14278 \begin_inset Flex MenuItem
14279 status collapsed
14280
14281 \begin_layout Plain Layout
14282 figure
14283 \end_layout
14284
14285 \end_inset
14286
14287
14288 \begin_inset Flex MenuItem
14289 status collapsed
14290
14291 \begin_layout Plain Layout
14292 table
14293 \end_layout
14294
14295 \end_inset
14296
14297 , \SpecialChar \ldots{}
14298 ) in the text class itself.
14299  Standard floats are included in the file 
14300 \begin_inset Flex Code
14301 status collapsed
14302
14303 \begin_layout Plain Layout
14304 stdfloats.inc
14305 \end_layout
14306
14307 \end_inset
14308
14309 , so you may have to do no more than add
14310 \end_layout
14311
14312 \begin_layout LyX-Code
14313 Input stdfloats.inc
14314 \end_layout
14315
14316 \begin_layout Standard
14317 to your layout file.
14318  If you want to implement a text class that proposes some other float types
14319  (like the AGU class bundled with LyX), the information below will hopefully
14320  help you:
14321 \end_layout
14322
14323 \begin_layout Description
14324 \begin_inset Flex Code
14325 status collapsed
14326
14327 \begin_layout Plain Layout
14328 Extension
14329 \end_layout
14330
14331 \end_inset
14332
14333  [
14334 \begin_inset Flex Code
14335 status collapsed
14336
14337 \begin_layout Plain Layout
14338 string
14339 \end_layout
14340
14341 \end_inset
14342
14343 =
14344 \begin_inset Quotes erd
14345 \end_inset
14346
14347
14348 \begin_inset Quotes erd
14349 \end_inset
14350
14351 ] The file name extension of an auxiliary file for the list of figures (or
14352  whatever).
14353  LaTeX writes the captions to this file.
14354 \end_layout
14355
14356 \begin_layout Description
14357 \begin_inset Flex Code
14358 status collapsed
14359
14360 \begin_layout Plain Layout
14361 GuiName
14362 \end_layout
14363
14364 \end_inset
14365
14366  [
14367 \begin_inset Flex Code
14368 status collapsed
14369
14370 \begin_layout Plain Layout
14371 string
14372 \end_layout
14373
14374 \end_inset
14375
14376 =
14377 \begin_inset Quotes erd
14378 \end_inset
14379
14380
14381 \begin_inset Quotes erd
14382 \end_inset
14383
14384 ] The string that will be used in the menus and also for the caption.
14385  This is translated to the current language if babel is used.
14386 \end_layout
14387
14388 \begin_layout Description
14389 \begin_inset Flex Code
14390 status collapsed
14391
14392 \begin_layout Plain Layout
14393 HTML*
14394 \end_layout
14395
14396 \end_inset
14397
14398  These are used for XHTML output.
14399  See 
14400 \begin_inset CommandInset ref
14401 LatexCommand ref
14402 reference "sec:Tags-for-XHTML"
14403
14404 \end_inset
14405
14406 .
14407 \end_layout
14408
14409 \begin_layout Description
14410 \begin_inset Flex Code
14411 status collapsed
14412
14413 \begin_layout Plain Layout
14414 IsPredefined
14415 \end_layout
14416
14417 \end_inset
14418
14419  [
14420 \emph on
14421
14422 \begin_inset Flex Code
14423 status open
14424
14425 \begin_layout Plain Layout
14426 0
14427 \end_layout
14428
14429 \end_inset
14430
14431
14432 \emph default
14433
14434 \begin_inset Flex Code
14435 status collapsed
14436
14437 \begin_layout Plain Layout
14438 1
14439 \end_layout
14440
14441 \end_inset
14442
14443 ] Indicates whether the float is already defined in the document class or
14444  if we instead need to load 
14445 \begin_inset Flex Code
14446 status collapsed
14447
14448 \begin_layout Plain Layout
14449 float.sty
14450 \end_layout
14451
14452 \end_inset
14453
14454  and use what it provides to define it on-the-fly.
14455  The default is 
14456 \begin_inset Flex Code
14457 status collapsed
14458
14459 \begin_layout Plain Layout
14460 0
14461 \end_layout
14462
14463 \end_inset
14464
14465 , which means: use 
14466 \begin_inset Flex Code
14467 status collapsed
14468
14469 \begin_layout Plain Layout
14470 float.sty
14471 \end_layout
14472
14473 \end_inset
14474
14475 .
14476  It should be set to 
14477 \begin_inset Flex Code
14478 status collapsed
14479
14480 \begin_layout Plain Layout
14481 1
14482 \end_layout
14483
14484 \end_inset
14485
14486  if the float is already defined by the LaTeX document class.
14487 \end_layout
14488
14489 \begin_layout Description
14490 \begin_inset Flex Code
14491 status collapsed
14492
14493 \begin_layout Plain Layout
14494 ListCommand
14495 \end_layout
14496
14497 \end_inset
14498
14499  [
14500 \begin_inset Flex Code
14501 status collapsed
14502
14503 \begin_layout Plain Layout
14504 string
14505 \end_layout
14506
14507 \end_inset
14508
14509 =
14510 \begin_inset Quotes erd
14511 \end_inset
14512
14513
14514 \begin_inset Quotes erd
14515 \end_inset
14516
14517 ] The command used to generate a list of floats of this type; the leading
14518  `
14519 \backslash
14520 ' should be omitted.
14521  This 
14522 \emph on
14523 must
14524 \emph default
14525  be given if 
14526 \begin_inset Flex Code
14527 status collapsed
14528
14529 \begin_layout Plain Layout
14530 UsesFloatPkg
14531 \end_layout
14532
14533 \end_inset
14534
14535  is false, since there is no standard way to generate this command.
14536  It is ignored if 
14537 \begin_inset Flex Code
14538 status collapsed
14539
14540 \begin_layout Plain Layout
14541 UsesFloatPkg
14542 \end_layout
14543
14544 \end_inset
14545
14546  is true, since in that case there is a standard way to define the command.
14547 \end_layout
14548
14549 \begin_layout Description
14550 \begin_inset Flex Code
14551 status collapsed
14552
14553 \begin_layout Plain Layout
14554 ListName
14555 \end_layout
14556
14557 \end_inset
14558
14559  [
14560 \begin_inset Flex Code
14561 status collapsed
14562
14563 \begin_layout Plain Layout
14564 string
14565 \end_layout
14566
14567 \end_inset
14568
14569 =
14570 \begin_inset Quotes erd
14571 \end_inset
14572
14573
14574 \begin_inset Quotes erd
14575 \end_inset
14576
14577 ] A title for a list of floats of this kind (list of figures, tables, or
14578  whatever).
14579  It is used for the screen label within LyX; it is passed to LaTeX for use
14580  as the title there; and it is used as the title in XHTML output.
14581  It will be translated to the document language.
14582 \end_layout
14583
14584 \begin_layout Description
14585 \begin_inset Flex Code
14586 status collapsed
14587
14588 \begin_layout Plain Layout
14589 NumberWithin
14590 \end_layout
14591
14592 \end_inset
14593
14594  [
14595 \begin_inset Flex Code
14596 status collapsed
14597
14598 \begin_layout Plain Layout
14599 string
14600 \end_layout
14601
14602 \end_inset
14603
14604 =
14605 \begin_inset Quotes erd
14606 \end_inset
14607
14608
14609 \begin_inset Quotes erd
14610 \end_inset
14611
14612 ] This (optional) argument determines whether floats of this class will
14613  be numbered within some sectional unit of the document.
14614  For example, if within is equal to 
14615 \begin_inset Flex Code
14616 status collapsed
14617
14618 \begin_layout Plain Layout
14619 chapter
14620 \end_layout
14621
14622 \end_inset
14623
14624 , the floats will be numbered within chapters.
14625  
14626 \end_layout
14627
14628 \begin_layout Description
14629 \begin_inset Flex Code
14630 status collapsed
14631
14632 \begin_layout Plain Layout
14633 Placement
14634 \end_layout
14635
14636 \end_inset
14637
14638  [
14639 \begin_inset Flex Code
14640 status collapsed
14641
14642 \begin_layout Plain Layout
14643 string
14644 \end_layout
14645
14646 \end_inset
14647
14648 =
14649 \begin_inset Quotes erd
14650 \end_inset
14651
14652
14653 \begin_inset Quotes erd
14654 \end_inset
14655
14656 ] The default placement for the given class of floats.
14657  The string should be as in standard LaTeX: 
14658 \begin_inset Flex Code
14659 status collapsed
14660
14661 \begin_layout Plain Layout
14662 t
14663 \end_layout
14664
14665 \end_inset
14666
14667
14668 \begin_inset Flex Code
14669 status collapsed
14670
14671 \begin_layout Plain Layout
14672 b
14673 \end_layout
14674
14675 \end_inset
14676
14677
14678 \begin_inset Flex Code
14679 status collapsed
14680
14681 \begin_layout Plain Layout
14682 p
14683 \end_layout
14684
14685 \end_inset
14686
14687  and 
14688 \begin_inset Flex Code
14689 status collapsed
14690
14691 \begin_layout Plain Layout
14692 h
14693 \end_layout
14694
14695 \end_inset
14696
14697  for top, bottom, page, and here, respectively.
14698 \begin_inset Foot
14699 status collapsed
14700
14701 \begin_layout Plain Layout
14702 Note that the order of these letters in the string is irrelevant, like in
14703  LaTeX.
14704 \end_layout
14705
14706 \end_inset
14707
14708  On top of that there is a new type, 
14709 \begin_inset Flex Code
14710 status collapsed
14711
14712 \begin_layout Plain Layout
14713 H
14714 \end_layout
14715
14716 \end_inset
14717
14718 , which does not really correspond to a float, since it means: put it 
14719 \begin_inset Quotes eld
14720 \end_inset
14721
14722 here
14723 \begin_inset Quotes erd
14724 \end_inset
14725
14726  and nowhere else.
14727  Note however that the 
14728 \begin_inset Flex Code
14729 status collapsed
14730
14731 \begin_layout Plain Layout
14732 H
14733 \end_layout
14734
14735 \end_inset
14736
14737  specifier is special and, because of implementation details, cannot be
14738  used in non-built in float types.
14739  If you do not understand what this means, just use 
14740 \begin_inset Quotes eld
14741 \end_inset
14742
14743
14744 \begin_inset Flex Code
14745 status collapsed
14746
14747 \begin_layout Plain Layout
14748 tbp
14749 \end_layout
14750
14751 \end_inset
14752
14753
14754 \begin_inset Quotes erd
14755 \end_inset
14756
14757 .
14758 \end_layout
14759
14760 \begin_layout Description
14761 \begin_inset Flex Code
14762 status collapsed
14763
14764 \begin_layout Plain Layout
14765 RefPrefix
14766 \end_layout
14767
14768 \end_inset
14769
14770  [
14771 \begin_inset Flex Code
14772 status collapsed
14773
14774 \begin_layout Plain Layout
14775 string
14776 \end_layout
14777
14778 \end_inset
14779
14780 ] The prefix to use when creating labels referring to floats of this type.
14781  This allows the use of formatted references.
14782  Note that you can remove any 
14783 \begin_inset Flex Code
14784 status collapsed
14785
14786 \begin_layout Plain Layout
14787 RefPrefix
14788 \end_layout
14789
14790 \end_inset
14791
14792  set by a copied style by using the special value 
14793 \begin_inset Quotes eld
14794 \end_inset
14795
14796 OFF
14797 \begin_inset Quotes erd
14798 \end_inset
14799
14800 , which must be all caps.
14801 \end_layout
14802
14803 \begin_layout Description
14804 \begin_inset Flex Code
14805 status collapsed
14806
14807 \begin_layout Plain Layout
14808 Style
14809 \end_layout
14810
14811 \end_inset
14812
14813  [
14814 \begin_inset Flex Code
14815 status collapsed
14816
14817 \begin_layout Plain Layout
14818 string
14819 \end_layout
14820
14821 \end_inset
14822
14823 =
14824 \begin_inset Quotes erd
14825 \end_inset
14826
14827
14828 \begin_inset Quotes erd
14829 \end_inset
14830
14831 ] The style used when defining the float using 
14832 \begin_inset Flex Code
14833 status collapsed
14834
14835 \begin_layout Plain Layout
14836
14837 \backslash
14838 newfloat
14839 \end_layout
14840
14841 \end_inset
14842
14843 .
14844 \end_layout
14845
14846 \begin_layout Description
14847 \begin_inset Flex Code
14848 status collapsed
14849
14850 \begin_layout Plain Layout
14851 Type
14852 \end_layout
14853
14854 \end_inset
14855
14856  [
14857 \begin_inset Flex Code
14858 status collapsed
14859
14860 \begin_layout Plain Layout
14861 string
14862 \end_layout
14863
14864 \end_inset
14865
14866 =
14867 \begin_inset Quotes erd
14868 \end_inset
14869
14870
14871 \begin_inset Quotes erd
14872 \end_inset
14873
14874 ] The 
14875 \begin_inset Quotes eld
14876 \end_inset
14877
14878 type
14879 \begin_inset Quotes erd
14880 \end_inset
14881
14882  of the new class of floats, like program or algorithm.
14883  After the appropriate 
14884 \begin_inset Flex Code
14885 status collapsed
14886
14887 \begin_layout Plain Layout
14888
14889 \backslash
14890 newfloat
14891 \end_layout
14892
14893 \end_inset
14894
14895 , commands such as 
14896 \begin_inset Flex Code
14897 status collapsed
14898
14899 \begin_layout Plain Layout
14900
14901 \backslash
14902 begin{program}
14903 \end_layout
14904
14905 \end_inset
14906
14907  or 
14908 \begin_inset Flex Code
14909 status collapsed
14910
14911 \begin_layout Plain Layout
14912
14913 \backslash
14914 end{algorithm*}
14915 \end_layout
14916
14917 \end_inset
14918
14919  will be available.
14920 \end_layout
14921
14922 \begin_layout Description
14923 \begin_inset Flex Code
14924 status collapsed
14925
14926 \begin_layout Plain Layout
14927 UsesFloatPkg
14928 \end_layout
14929
14930 \end_inset
14931
14932  [
14933 \begin_inset Flex Code
14934 status open
14935
14936 \begin_layout Plain Layout
14937 0
14938 \end_layout
14939
14940 \end_inset
14941
14942
14943 \begin_inset Flex Code
14944 status collapsed
14945
14946 \begin_layout Plain Layout
14947
14948 \emph on
14949 1
14950 \end_layout
14951
14952 \end_inset
14953
14954 ] Tells us whether this float is defined using the facilities provided by
14955  
14956 \begin_inset Flex Code
14957 status collapsed
14958
14959 \begin_layout Plain Layout
14960 float.sty
14961 \end_layout
14962
14963 \end_inset
14964
14965 , either by the class file or a package, or on-the-fly by LyX itself.
14966 \end_layout
14967
14968 \begin_layout Standard
14969 Note that defining a float with type 
14970 \begin_inset Flex Code
14971 status collapsed
14972
14973 \begin_layout Plain Layout
14974
14975 \emph on
14976 type
14977 \end_layout
14978
14979 \end_inset
14980
14981  automatically defines the corresponding counter with name 
14982 \begin_inset Flex Code
14983 status collapsed
14984
14985 \begin_layout Plain Layout
14986
14987 \emph on
14988 type
14989 \end_layout
14990
14991 \end_inset
14992
14993 .
14994 \end_layout
14995
14996 \begin_layout Subsection
14997 Flex insets and InsetLayout
14998 \begin_inset CommandInset label
14999 LatexCommand label
15000 name "sub:Flex-insets-and"
15001
15002 \end_inset
15003
15004
15005 \end_layout
15006
15007 \begin_layout Standard
15008 LyX has supported character styles since version 1.4.0; as of version 1.6.0,
15009  these are called Flex insets.
15010  
15011 \end_layout
15012
15013 \begin_layout Standard
15014 Flex insets come in three different kinds: 
15015 \end_layout
15016
15017 \begin_layout Itemize
15018 character style (
15019 \begin_inset Flex Code
15020 status collapsed
15021
15022 \begin_layout Plain Layout
15023 CharStyle
15024 \end_layout
15025
15026 \end_inset
15027
15028 ): These define semantic markup corresponding to such LaTeX commands as
15029  
15030 \begin_inset Flex Code
15031 status collapsed
15032
15033 \begin_layout Plain Layout
15034
15035 \backslash
15036 noun
15037 \end_layout
15038
15039 \end_inset
15040
15041  and 
15042 \begin_inset Flex Code
15043 status collapsed
15044
15045 \begin_layout Plain Layout
15046
15047 \backslash
15048 code
15049 \end_layout
15050
15051 \end_inset
15052
15053 .
15054 \end_layout
15055
15056 \begin_layout Itemize
15057 user custom (
15058 \begin_inset Flex Code
15059 status collapsed
15060
15061 \begin_layout Plain Layout
15062 Custom
15063 \end_layout
15064
15065 \end_inset
15066
15067 ): These can be used to define custom collapsible insets, similar to TeX
15068  code, footnote, and the like.
15069  An obvious example is an endnote inset, which is defined in the 
15070 \begin_inset Flex Code
15071 status collapsed
15072
15073 \begin_layout Plain Layout
15074 endnote
15075 \end_layout
15076
15077 \end_inset
15078
15079  module.
15080 \end_layout
15081
15082 \begin_layout Itemize
15083 XML elements (
15084 \begin_inset Flex Code
15085 status collapsed
15086
15087 \begin_layout Plain Layout
15088 Element
15089 \end_layout
15090
15091 \end_inset
15092
15093 ): For use with DocBook classes.
15094 \end_layout
15095
15096 \begin_layout Standard
15097 Flex insets are defined using the 
15098 \begin_inset Flex Code
15099 status collapsed
15100
15101 \begin_layout Plain Layout
15102 InsetLayout
15103 \end_layout
15104
15105 \end_inset
15106
15107  tag, which shall be explained in a moment.
15108 \end_layout
15109
15110 \begin_layout Standard
15111 The 
15112 \begin_inset Flex Code
15113 status collapsed
15114
15115 \begin_layout Plain Layout
15116 InsetLayout
15117 \end_layout
15118
15119 \end_inset
15120
15121  tag also serves another function: It can be used to customize the general
15122  layout of many different types of insets.
15123  Currently, 
15124 \begin_inset Flex Code
15125 status collapsed
15126
15127 \begin_layout Plain Layout
15128 InsetLayout
15129 \end_layout
15130
15131 \end_inset
15132
15133  can be used to customize the layout parameters for footnotes, marginal
15134  notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
15135  boxes, tables, algorithms, URLs, and optional arguments, as well as to
15136  define Flex insets.
15137 \end_layout
15138
15139 \begin_layout Standard
15140 The 
15141 \begin_inset Flex Code
15142 status collapsed
15143
15144 \begin_layout Plain Layout
15145 InsetLayout
15146 \end_layout
15147
15148 \end_inset
15149
15150  definition must begin with a line of the form:
15151 \end_layout
15152
15153 \begin_layout LyX-Code
15154 InsetLayout <Type>
15155 \end_layout
15156
15157 \begin_layout Standard
15158 Here 
15159 \begin_inset Flex Code
15160 status collapsed
15161
15162 \begin_layout Plain Layout
15163 <Type>
15164 \end_layout
15165
15166 \end_inset
15167
15168  indicates the inset whose layout is being defined, and here there are 
15169 \change_inserted 5863208 1334489266
15170 three
15171 \change_deleted 5863208 1334489267
15172 two
15173 \change_unchanged
15174  cases.
15175 \end_layout
15176
15177 \begin_layout Enumerate
15178 The layout for a pre-existing inset is being modified.
15179  In this case, can be 
15180 \begin_inset Flex Code
15181 status collapsed
15182
15183 \begin_layout Plain Layout
15184 <Type>
15185 \end_layout
15186
15187 \end_inset
15188
15189  any one of the following: 
15190 \begin_inset Flex Code
15191 status collapsed
15192
15193 \begin_layout Plain Layout
15194 Algorithm
15195 \end_layout
15196
15197 \end_inset
15198
15199
15200 \begin_inset Flex Code
15201 status collapsed
15202
15203 \begin_layout Plain Layout
15204 Branch
15205 \end_layout
15206
15207 \end_inset
15208
15209
15210 \begin_inset Flex Code
15211 status collapsed
15212
15213 \begin_layout Plain Layout
15214 Box
15215 \end_layout
15216
15217 \end_inset
15218
15219
15220 \begin_inset Flex Code
15221 status collapsed
15222
15223 \begin_layout Plain Layout
15224 Box:shaded
15225 \end_layout
15226
15227 \end_inset
15228
15229
15230 \begin_inset Flex Code
15231 status collapsed
15232
15233 \begin_layout Plain Layout
15234 ERT
15235 \end_layout
15236
15237 \end_inset
15238
15239
15240 \begin_inset Flex Code
15241 status collapsed
15242
15243 \begin_layout Plain Layout
15244 Figure
15245 \end_layout
15246
15247 \end_inset
15248
15249
15250 \begin_inset Flex Code
15251 status collapsed
15252
15253 \begin_layout Plain Layout
15254 Foot
15255 \end_layout
15256
15257 \end_inset
15258
15259
15260 \begin_inset Flex Code
15261 status collapsed
15262
15263 \begin_layout Plain Layout
15264 Index
15265 \end_layout
15266
15267 \end_inset
15268
15269
15270 \begin_inset Flex Code
15271 status collapsed
15272
15273 \begin_layout Plain Layout
15274 Info
15275 \end_layout
15276
15277 \end_inset
15278
15279
15280 \begin_inset Flex Code
15281 status collapsed
15282
15283 \begin_layout Plain Layout
15284 Info:menu
15285 \end_layout
15286
15287 \end_inset
15288
15289
15290 \begin_inset Flex Code
15291 status collapsed
15292
15293 \begin_layout Plain Layout
15294 Info:shortcut
15295 \end_layout
15296
15297 \end_inset
15298
15299
15300 \begin_inset Flex Code
15301 status collapsed
15302
15303 \begin_layout Plain Layout
15304 Info:shortcuts
15305 \end_layout
15306
15307 \end_inset
15308
15309
15310 \begin_inset Flex Code
15311 status collapsed
15312
15313 \begin_layout Plain Layout
15314 Listings
15315 \end_layout
15316
15317 \end_inset
15318
15319
15320 \begin_inset Flex Code
15321 status collapsed
15322
15323 \begin_layout Plain Layout
15324 Marginal
15325 \end_layout
15326
15327 \end_inset
15328
15329
15330 \begin_inset Flex Code
15331 status collapsed
15332
15333 \begin_layout Plain Layout
15334 Note:Comment
15335 \end_layout
15336
15337 \end_inset
15338
15339
15340 \begin_inset Flex Code
15341 status collapsed
15342
15343 \begin_layout Plain Layout
15344 Note:Note
15345 \end_layout
15346
15347 \end_inset
15348
15349
15350 \begin_inset Flex Code
15351 status collapsed
15352
15353 \begin_layout Plain Layout
15354 Note:Greyedout
15355 \end_layout
15356
15357 \end_inset
15358
15359
15360 \begin_inset Flex Code
15361 status collapsed
15362
15363 \begin_layout Plain Layout
15364
15365 \change_deleted -712698321 1353866704
15366 Opt
15367 \change_unchanged
15368 Arg
15369 \change_inserted -712698321 1353866707
15370 ument
15371 \change_unchanged
15372
15373 \end_layout
15374
15375 \end_inset
15376
15377
15378 \begin_inset Flex Code
15379 status collapsed
15380
15381 \begin_layout Plain Layout
15382 Table
15383 \end_layout
15384
15385 \end_inset
15386
15387 , or 
15388 \begin_inset Flex Code
15389 status collapsed
15390
15391 \begin_layout Plain Layout
15392 URL
15393 \end_layout
15394
15395 \end_inset
15396
15397 .
15398 \end_layout
15399
15400 \begin_layout Enumerate
15401 The layout for a Flex inset is being defined.
15402  In this case, 
15403 \begin_inset Flex Code
15404 status collapsed
15405
15406 \begin_layout Plain Layout
15407 <Type>
15408 \end_layout
15409
15410 \end_inset
15411
15412  must be of the form 
15413 \begin_inset Quotes eld
15414 \end_inset
15415
15416
15417 \begin_inset Flex Code
15418 status collapsed
15419
15420 \begin_layout Plain Layout
15421 Flex:<name>
15422 \end_layout
15423
15424 \end_inset
15425
15426
15427 \begin_inset Quotes erd
15428 \end_inset
15429
15430 , where 
15431 \begin_inset Flex Code
15432 status collapsed
15433
15434 \begin_layout Plain Layout
15435 name
15436 \end_layout
15437
15438 \end_inset
15439
15440  may be be any valid identifier not used by a pre-existing Flex inset.
15441  The identifier may include spaces, but in that case the whole thing must
15442  be wrapped in quotes.
15443  Note that the definition of a flex inset 
15444 \emph on
15445 must 
15446 \emph default
15447 also include a 
15448 \begin_inset Flex Code
15449 status collapsed
15450
15451 \begin_layout Plain Layout
15452 LyXType
15453 \end_layout
15454
15455 \end_inset
15456
15457  entry, declaring which type of inset it defines.
15458 \change_inserted 5863208 1334489312
15459
15460 \end_layout
15461
15462 \begin_layout Enumerate
15463
15464 \change_inserted 5863208 1334492248
15465 The layout for user specific branch is being defined.
15466  In this case, 
15467 \begin_inset Flex Code
15468 status collapsed
15469
15470 \begin_layout Plain Layout
15471
15472 \change_inserted 5863208 1334489384
15473 <Type>
15474 \end_layout
15475
15476 \end_inset
15477
15478  must be of the form 
15479 \begin_inset Quotes eld
15480 \end_inset
15481
15482
15483 \begin_inset Flex Code
15484 status collapsed
15485
15486 \begin_layout Plain Layout
15487
15488 \change_inserted 5863208 1334489392
15489 Branch:<name>
15490 \end_layout
15491
15492 \end_inset
15493
15494
15495 \begin_inset Quotes erd
15496 \end_inset
15497
15498 , where 
15499 \begin_inset Flex Code
15500 status collapsed
15501
15502 \begin_layout Plain Layout
15503
15504 \change_inserted 5863208 1334489384
15505 name
15506 \end_layout
15507
15508 \end_inset
15509
15510  may be be any valid identifier of branch defined in user's document.
15511  The identifier may include spaces, but in that case the whole thing must
15512  be wrapped in quotes.
15513  The main purpose of this feature is to allow LaTeX wrapping around specific
15514  branches as user needs.
15515 \change_unchanged
15516
15517 \end_layout
15518
15519 \begin_layout Standard
15520 The 
15521 \begin_inset Flex Code
15522 status collapsed
15523
15524 \begin_layout Plain Layout
15525 InsetLayout
15526 \end_layout
15527
15528 \end_inset
15529
15530  definition can contain the following entries:
15531 \end_layout
15532
15533 \begin_layout Description
15534
15535 \change_inserted -712698321 1353681390
15536 \begin_inset Flex Code
15537 status collapsed
15538
15539 \begin_layout Plain Layout
15540
15541 \change_inserted -712698321 1353681344
15542 Argument
15543 \end_layout
15544
15545 \end_inset
15546
15547  [
15548 \begin_inset Flex Code
15549 status collapsed
15550
15551 \begin_layout Plain Layout
15552
15553 \change_inserted -712698321 1353681344
15554 int
15555 \end_layout
15556
15557 \end_inset
15558
15559 ] Defines argument number <int> of a command\SpecialChar \slash{}
15560 environment associated with
15561  the current layout.
15562  The definition must end with 
15563 \begin_inset Flex Code
15564 status collapsed
15565
15566 \begin_layout Plain Layout
15567
15568 \change_inserted -712698321 1353681344
15569 EndArgument
15570 \end_layout
15571
15572 \end_inset
15573
15574 .
15575  See section
15576 \begin_inset space ~
15577 \end_inset
15578
15579
15580 \begin_inset CommandInset ref
15581 LatexCommand ref
15582 reference "sub:Paragraph-Styles"
15583
15584 \end_inset
15585
15586  for details.
15587 \end_layout
15588
15589 \begin_layout Description
15590
15591 \change_inserted -195340706 1333913893
15592 \begin_inset Flex Code
15593 status collapsed
15594
15595 \begin_layout Plain Layout
15596 BabelPreamble
15597 \end_layout
15598
15599 \end_inset
15600
15601  Preamble for changing languages.
15602  See section
15603 \begin_inset space ~
15604 \end_inset
15605
15606
15607 \begin_inset CommandInset ref
15608 LatexCommand ref
15609 reference "sub:I18n"
15610
15611 \end_inset
15612
15613 .
15614 \end_layout
15615
15616 \begin_layout Description
15617 \begin_inset Flex Code
15618 status collapsed
15619
15620 \begin_layout Plain Layout
15621 BgColor
15622 \end_layout
15623
15624 \end_inset
15625
15626  The color for the inset's background.
15627  The valid colors are defined in 
15628 \begin_inset Flex Code
15629 status collapsed
15630
15631 \begin_layout Plain Layout
15632 src/ColorCode.h
15633 \end_layout
15634
15635 \end_inset
15636
15637 .
15638 \end_layout
15639
15640 \begin_layout Description
15641 \begin_inset Flex Code
15642 status collapsed
15643
15644 \begin_layout Plain Layout
15645 ContentAsLabel
15646 \end_layout
15647
15648 \end_inset
15649
15650  [
15651 \begin_inset Flex Code
15652 status collapsed
15653
15654 \begin_layout Plain Layout
15655
15656 \emph on
15657 0
15658 \end_layout
15659
15660 \end_inset
15661
15662 ,
15663 \begin_inset Flex Code
15664 status collapsed
15665
15666 \begin_layout Plain Layout
15667 1
15668 \end_layout
15669
15670 \end_inset
15671
15672 ] Whether to use the content of the inset as the label, when the inset is
15673  closed.
15674  Default is false.
15675 \end_layout
15676
15677 \begin_layout Description
15678 \begin_inset Flex Code
15679 status collapsed
15680
15681 \begin_layout Plain Layout
15682 CopyStyle
15683 \end_layout
15684
15685 \end_inset
15686
15687  
15688 \begin_inset Flex Code
15689 status collapsed
15690
15691 \begin_layout Plain Layout
15692 [string]
15693 \end_layout
15694
15695 \end_inset
15696
15697  Copies all the features of an existing style into the current one.
15698  
15699 \end_layout
15700
15701 \begin_layout Description
15702 \begin_inset Flex Code
15703 status collapsed
15704
15705 \begin_layout Plain Layout
15706 CustomPars
15707 \end_layout
15708
15709 \end_inset
15710
15711  [
15712 \begin_inset Flex Code
15713 status collapsed
15714
15715 \begin_layout Plain Layout
15716
15717 \emph on
15718 0
15719 \end_layout
15720
15721 \end_inset
15722
15723 ,
15724 \begin_inset Flex Code
15725 status collapsed
15726
15727 \begin_layout Plain Layout
15728 1
15729 \end_layout
15730
15731 \end_inset
15732
15733 ] Indicates whether the user may employ the Paragraph Settings dialog to
15734  customize the paragraph.
15735 \end_layout
15736
15737 \begin_layout Description
15738 \begin_inset Flex Code
15739 status collapsed
15740
15741 \begin_layout Plain Layout
15742 Decoration
15743 \end_layout
15744
15745 \end_inset
15746
15747  can be 
15748 \begin_inset Flex Code
15749 status collapsed
15750
15751 \begin_layout Plain Layout
15752 Classic
15753 \end_layout
15754
15755 \end_inset
15756
15757
15758 \begin_inset Flex Code
15759 status collapsed
15760
15761 \begin_layout Plain Layout
15762 Minimalistic
15763 \end_layout
15764
15765 \end_inset
15766
15767 , or 
15768 \begin_inset Flex Code
15769 status collapsed
15770
15771 \begin_layout Plain Layout
15772 Conglomerate
15773 \end_layout
15774
15775 \end_inset
15776
15777 , describing the rendering style used for the inset's frame and buttons.
15778  Footnotes generally use 
15779 \begin_inset Flex Code
15780 status collapsed
15781
15782 \begin_layout Plain Layout
15783 Classic
15784 \end_layout
15785
15786 \end_inset
15787
15788 , ERT insets generally 
15789 \begin_inset Flex Code
15790 status collapsed
15791
15792 \begin_layout Plain Layout
15793 Minimalistic
15794 \end_layout
15795
15796 \end_inset
15797
15798 , and character styles 
15799 \begin_inset Flex Code
15800 status collapsed
15801
15802 \begin_layout Plain Layout
15803 Conglomerate
15804 \end_layout
15805
15806 \end_inset
15807
15808 .
15809 \end_layout
15810
15811 \begin_layout Description
15812 \begin_inset Flex Code
15813 status collapsed
15814
15815 \begin_layout Plain Layout
15816 Display
15817 \end_layout
15818
15819 \end_inset
15820
15821  [
15822 \begin_inset Flex Code
15823 status collapsed
15824
15825 \begin_layout Plain Layout
15826 0
15827 \end_layout
15828
15829 \end_inset
15830
15831 ,
15832 \begin_inset Flex Code
15833 status collapsed
15834
15835 \begin_layout Plain Layout
15836
15837 \emph on
15838 1
15839 \end_layout
15840
15841 \end_inset
15842
15843 ] Only useful if 
15844 \begin_inset Flex Code
15845 status collapsed
15846
15847 \begin_layout Plain Layout
15848 LatexType
15849 \end_layout
15850
15851 \end_inset
15852
15853  is 
15854 \begin_inset Flex Code
15855 status collapsed
15856
15857 \begin_layout Plain Layout
15858 Environment
15859 \end_layout
15860
15861 \end_inset
15862
15863 .
15864  Indicates whether the environment will stand on its own in LaTeX output
15865  or will appear inline with the surrounding text.
15866  If set to false, it is supposed that the LaTeX environment ignores white
15867  space (including one newline character) after the 
15868 \begin_inset Flex Code
15869 status collapsed
15870
15871 \begin_layout Plain Layout
15872
15873 \backslash
15874 begin{
15875 \emph on
15876 LatexName
15877 \emph default
15878 }
15879 \end_layout
15880
15881 \end_inset
15882
15883  and 
15884 \begin_inset Flex Code
15885 status collapsed
15886
15887 \begin_layout Plain Layout
15888
15889 \backslash
15890 end{
15891 \emph on
15892 LatexName
15893 \emph default
15894 }
15895 \end_layout
15896
15897 \end_inset
15898
15899  tags.
15900  Default is true.
15901 \end_layout
15902
15903 \begin_layout Description
15904 \begin_inset Flex Code
15905 status collapsed
15906
15907 \begin_layout Plain Layout
15908 End
15909 \end_layout
15910
15911 \end_inset
15912
15913  Required at the end of the InsetLayout declarations.
15914 \end_layout
15915
15916 \begin_layout Description
15917 \begin_inset Flex Code
15918 status collapsed
15919
15920 \begin_layout Plain Layout
15921 Font
15922 \end_layout
15923
15924 \end_inset
15925
15926  The font used for both the text body 
15927 \emph on
15928 and
15929 \emph default
15930  the label.
15931  See section
15932 \begin_inset space ~
15933 \end_inset
15934
15935
15936 \begin_inset CommandInset ref
15937 LatexCommand ref
15938 reference "sub:Font-description"
15939
15940 \end_inset
15941
15942 .
15943  Note that defining this font automatically defines the 
15944 \begin_inset Flex Code
15945 status collapsed
15946
15947 \begin_layout Plain Layout
15948 LabelFont
15949 \end_layout
15950
15951 \end_inset
15952
15953  to the same value, so define this first and define 
15954 \begin_inset Flex Code
15955 status collapsed
15956
15957 \begin_layout Plain Layout
15958 LabelFont
15959 \end_layout
15960
15961 \end_inset
15962
15963  later if you want them to be different.
15964 \change_inserted 155139281 1354130923
15965
15966 \end_layout
15967
15968 \begin_layout Description
15969
15970 \change_inserted 155139281 1354130923
15971 \begin_inset Flex Code
15972 status collapsed
15973
15974 \begin_layout Plain Layout
15975
15976 \change_inserted 155139281 1354130923
15977 ForceLocalFontSwitch
15978 \end_layout
15979
15980 \end_inset
15981
15982  [
15983 \begin_inset Flex Code
15984 status collapsed
15985
15986 \begin_layout Plain Layout
15987
15988 \change_inserted 155139281 1354130923
15989
15990 \emph on
15991 0
15992 \end_layout
15993
15994 \end_inset
15995
15996 ,
15997 \begin_inset Flex Code
15998 status collapsed
15999
16000 \begin_layout Plain Layout
16001
16002 \change_inserted 155139281 1354130923
16003 1
16004 \end_layout
16005
16006 \end_inset
16007
16008 ] When using babel, always use a local font switch (
16009 \begin_inset Flex Code
16010 status collapsed
16011
16012 \begin_layout Plain Layout
16013
16014 \change_inserted 155139281 1354130923
16015
16016 \backslash
16017 foreignlanguage
16018 \end_layout
16019
16020 \end_inset
16021
16022 ), never a global one (such as 
16023 \begin_inset Flex Code
16024 status collapsed
16025
16026 \begin_layout Plain Layout
16027
16028 \change_inserted 155139281 1354130923
16029
16030 \backslash
16031 selectlanguage
16032 \end_layout
16033
16034 \end_inset
16035
16036 ).
16037 \change_unchanged
16038
16039 \end_layout
16040
16041 \begin_layout Description
16042 \begin_inset Flex Code
16043 status collapsed
16044
16045 \begin_layout Plain Layout
16046 ForceLTR
16047 \end_layout
16048
16049 \end_inset
16050
16051  Force the 
16052 \begin_inset Quotes eld
16053 \end_inset
16054
16055 latex
16056 \begin_inset Quotes erd
16057 \end_inset
16058
16059  language, leading to Left-to-Right (latin) output, e.
16060 \begin_inset space \thinspace{}
16061 \end_inset
16062
16063 g.
16064 \begin_inset space \space{}
16065 \end_inset
16066
16067 in TeX code or URL.
16068  A kludge.
16069 \end_layout
16070
16071 \begin_layout Description
16072 \begin_inset Flex Code
16073 status collapsed
16074
16075 \begin_layout Plain Layout
16076 ForcePlain
16077 \end_layout
16078
16079 \end_inset
16080
16081  [
16082 \begin_inset Flex Code
16083 status collapsed
16084
16085 \begin_layout Plain Layout
16086
16087 \emph on
16088 0
16089 \end_layout
16090
16091 \end_inset
16092
16093 ,
16094 \begin_inset Flex Code
16095 status collapsed
16096
16097 \begin_layout Plain Layout
16098 1
16099 \end_layout
16100
16101 \end_inset
16102
16103 ] Indicates whether the 
16104 \begin_inset Flex Code
16105 status collapsed
16106
16107 \begin_layout Plain Layout
16108 PlainLayout
16109 \end_layout
16110
16111 \end_inset
16112
16113  should be used or, instead, the user can change the paragraph style used
16114  in the inset.
16115  Default is false.
16116 \end_layout
16117
16118 \begin_layout Description
16119 \begin_inset Flex Code
16120 status collapsed
16121
16122 \begin_layout Plain Layout
16123 FreeSpacing
16124 \end_layout
16125
16126 \end_inset
16127
16128  [
16129 \begin_inset Flex Code
16130 status collapsed
16131
16132 \begin_layout Plain Layout
16133
16134 \emph on
16135 0
16136 \end_layout
16137
16138 \end_inset
16139
16140
16141 \begin_inset Flex Code
16142 status collapsed
16143
16144 \begin_layout Plain Layout
16145 1
16146 \end_layout
16147
16148 \end_inset
16149
16150 ] Usually LyX doesn't allow you to insert more than one space between words,
16151  since a space is considered as the separation between two words, not a
16152  character or symbol of its own.
16153  This is a very fine thing but sometimes annoying, for example, when typing
16154  program code or plain LaTeX code.
16155  For this reason, 
16156 \begin_inset Flex Code
16157 status collapsed
16158
16159 \begin_layout Plain Layout
16160 FreeSpacing
16161 \end_layout
16162
16163 \end_inset
16164
16165  can be enabled.
16166  Note that LyX will create protected blanks for the additional blanks when
16167  in another mode than LaTeX-mode.
16168  Default is false.
16169 \end_layout
16170
16171 \begin_layout Description
16172 \begin_inset Flex Code
16173 status collapsed
16174
16175 \begin_layout Plain Layout
16176 HTML*
16177 \end_layout
16178
16179 \end_inset
16180
16181  These tags control XHTML output.
16182  See section 
16183 \begin_inset CommandInset ref
16184 LatexCommand ref
16185 reference "sec:Tags-for-XHTML"
16186
16187 \end_inset
16188
16189 .
16190 \end_layout
16191
16192 \begin_layout Description
16193 \begin_inset Flex Code
16194 status collapsed
16195
16196 \begin_layout Plain Layout
16197 InToc
16198 \end_layout
16199
16200 \end_inset
16201
16202  [
16203 \begin_inset Flex Code
16204 status collapsed
16205
16206 \begin_layout Plain Layout
16207
16208 \emph on
16209 0
16210 \end_layout
16211
16212 \end_inset
16213
16214 ,
16215 \begin_inset Flex Code
16216 status collapsed
16217
16218 \begin_layout Plain Layout
16219 1
16220 \end_layout
16221
16222 \end_inset
16223
16224 ] Whether to include the contents of this inset in the strings generated
16225  for the `Outline' pane.
16226  One would not, for example, want the content of a footnote in a section
16227  header to be included in the TOC displayed in the outline, but one would
16228  normally want the content of a character style displayed.
16229  Default is false: not to include.
16230 \end_layout
16231
16232 \begin_layout Description
16233 \begin_inset Flex Code
16234 status collapsed
16235
16236 \begin_layout Plain Layout
16237 KeepEmpty
16238 \end_layout
16239
16240 \end_inset
16241
16242  [
16243 \begin_inset Flex Code
16244 status collapsed
16245
16246 \begin_layout Plain Layout
16247
16248 \emph on
16249 0
16250 \end_layout
16251
16252 \end_inset
16253
16254
16255 \begin_inset Flex Code
16256 status collapsed
16257
16258 \begin_layout Plain Layout
16259 1
16260 \end_layout
16261
16262 \end_inset
16263
16264 ] Usually LyX does not allow you to leave a paragraph empty, since it would
16265  lead to empty LaTeX output.
16266  There are some cases where this could be desirable however: in a letter
16267  template, the required fields can be provided as empty fields, so that
16268  people do not forget them; in some special classes, a style can be used
16269  as some kind of break, which does not contain actual text.
16270  Default is false.
16271 \end_layout
16272
16273 \begin_layout Description
16274 \begin_inset Flex Code
16275 status collapsed
16276
16277 \begin_layout Plain Layout
16278 LabelFont
16279 \end_layout
16280
16281 \end_inset
16282
16283  The font used for the label.
16284  See section
16285 \begin_inset space ~
16286 \end_inset
16287
16288
16289 \begin_inset CommandInset ref
16290 LatexCommand ref
16291 reference "sub:Font-description"
16292
16293 \end_inset
16294
16295 .
16296  Note that this definition can never appear before 
16297 \begin_inset Flex Code
16298 status collapsed
16299
16300 \begin_layout Plain Layout
16301 Font
16302 \end_layout
16303
16304 \end_inset
16305
16306 , lest it be ineffective.
16307 \end_layout
16308
16309 \begin_layout Description
16310 \begin_inset Flex Code
16311 status collapsed
16312
16313 \begin_layout Plain Layout
16314 LabelString
16315 \end_layout
16316
16317 \end_inset
16318
16319  What will be displayed on the button or elsewhere as the inset label.
16320  Some inset types (
16321 \begin_inset Flex Code
16322 status collapsed
16323
16324 \begin_layout Plain Layout
16325 TeX code
16326 \end_layout
16327
16328 \end_inset
16329
16330  and 
16331 \begin_inset Flex Code
16332 status collapsed
16333
16334 \begin_layout Plain Layout
16335 Branch
16336 \end_layout
16337
16338 \end_inset
16339
16340 ) modify this label on the fly.
16341 \end_layout
16342
16343 \begin_layout Description
16344
16345 \change_inserted -195340706 1333913893
16346 \begin_inset Flex Code
16347 status collapsed
16348
16349 \begin_layout Plain Layout
16350 LangPreamble
16351 \end_layout
16352
16353 \end_inset
16354
16355  Language dependent preamble.
16356  See section
16357 \begin_inset space ~
16358 \end_inset
16359
16360
16361 \begin_inset CommandInset ref
16362 LatexCommand ref
16363 reference "sub:I18n"
16364
16365 \end_inset
16366
16367 .
16368 \end_layout
16369
16370 \begin_layout Description
16371 \begin_inset Flex Code
16372 status collapsed
16373
16374 \begin_layout Plain Layout
16375 LatexName
16376 \end_layout
16377
16378 \end_inset
16379
16380  The name of the corresponding LaTeX stuff.
16381  Either the environment or command name.
16382 \end_layout
16383
16384 \begin_layout Description
16385 \begin_inset Flex Code
16386 status collapsed
16387
16388 \begin_layout Plain Layout
16389 LatexParam
16390 \end_layout
16391
16392 \end_inset
16393
16394  The optional parameter for the corresponding 
16395 \begin_inset Flex Code
16396 status collapsed
16397
16398 \begin_layout Plain Layout
16399 LatexName
16400 \end_layout
16401
16402 \end_inset
16403
16404  stuff, including possible bracket pairs like 
16405 \begin_inset Flex Code
16406 status collapsed
16407
16408 \begin_layout Plain Layout
16409 []
16410 \end_layout
16411
16412 \end_inset
16413
16414 .
16415  This parameter cannot be changed from within LyX.
16416 \end_layout
16417
16418 \begin_layout Description
16419 \begin_inset Flex Code
16420 status collapsed
16421
16422 \begin_layout Plain Layout
16423 LatexType
16424 \end_layout
16425
16426 \end_inset
16427
16428  [
16429 \begin_inset Flex Code
16430 status collapsed
16431
16432 \begin_layout Plain Layout
16433
16434 \change_deleted -712698321 1353867544
16435
16436 \emph on
16437 Paragraph
16438 \emph default
16439
16440 \change_unchanged
16441 Command, Environment, 
16442 \change_inserted -712698321 1353867573
16443 None
16444 \change_deleted -712698321 1353867557
16445 Item_Environment,
16446 \change_unchanged
16447
16448 \end_layout
16449
16450 \end_inset
16451
16452  
16453 \begin_inset Flex Code
16454 status collapsed
16455
16456 \begin_layout Plain Layout
16457
16458 \change_deleted -712698321 1353867564
16459 List_Environment
16460 \change_unchanged
16461
16462 \change_deleted -712698321 1353867569
16463 Bib_Environment
16464 \change_unchanged
16465
16466 \end_layout
16467
16468 \end_inset
16469
16470 ] How the style should be translated into LaTeX.
16471 \begin_inset Foot
16472 status collapsed
16473
16474 \begin_layout Plain Layout
16475 \begin_inset Flex Code
16476 status collapsed
16477
16478 \begin_layout Plain Layout
16479 LatexType
16480 \end_layout
16481
16482 \end_inset
16483
16484  is perhaps a bit misleading, since these rules apply to SGML classes, too.
16485  Visit the SGML class files for specific examples.
16486 \end_layout
16487
16488 \end_inset
16489
16490
16491 \end_layout
16492
16493 \begin_deeper
16494 \begin_layout Itemize
16495 \begin_inset Flex Code
16496 status collapsed
16497
16498 \begin_layout Plain Layout
16499
16500 \change_deleted -712698321 1353867582
16501 Paragraph
16502 \change_inserted -712698321 1353867583
16503 None
16504 \change_unchanged
16505
16506 \end_layout
16507
16508 \end_inset
16509
16510  means nothing special.
16511  
16512 \end_layout
16513
16514 \begin_layout Itemize
16515 \begin_inset Flex Code
16516 status collapsed
16517
16518 \begin_layout Plain Layout
16519 Command
16520 \end_layout
16521
16522 \end_inset
16523
16524  means 
16525 \begin_inset Flex Code
16526 status collapsed
16527
16528 \begin_layout Plain Layout
16529
16530 \backslash
16531
16532 \emph on
16533 LatexName
16534 \emph default
16535 {\SpecialChar \ldots{}
16536 }
16537 \end_layout
16538
16539 \end_inset
16540
16541 .
16542 \end_layout
16543
16544 \begin_layout Itemize
16545 \begin_inset Flex Code
16546 status collapsed
16547
16548 \begin_layout Plain Layout
16549 Environment
16550 \end_layout
16551
16552 \end_inset
16553
16554  means 
16555 \begin_inset Flex Code
16556 status collapsed
16557
16558 \begin_layout Plain Layout
16559
16560 \backslash
16561 begin{
16562 \emph on
16563 LatexName
16564 \emph default
16565 }\SpecialChar \ldots{}
16566
16567 \backslash
16568 end{
16569 \emph on
16570 LatexName
16571 \emph default
16572 }
16573 \end_layout
16574
16575 \end_inset
16576
16577 .
16578  
16579 \end_layout
16580
16581 \begin_layout Itemize
16582
16583 \change_deleted -712698321 1353867600
16584 \begin_inset Flex Code
16585 status collapsed
16586
16587 \begin_layout Plain Layout
16588 Item_Environment
16589 \end_layout
16590
16591 \end_inset
16592
16593  is the same as 
16594 \begin_inset Flex Code
16595 status collapsed
16596
16597 \begin_layout Plain Layout
16598 Environment
16599 \end_layout
16600
16601 \end_inset
16602
16603 , except that an 
16604 \begin_inset Flex Code
16605 status collapsed
16606
16607 \begin_layout Plain Layout
16608
16609 \backslash
16610 item
16611 \end_layout
16612
16613 \end_inset
16614
16615  is generated for each paragraph of this environment.
16616  
16617 \end_layout
16618
16619 \begin_layout Itemize
16620
16621 \change_deleted -712698321 1353867600
16622 \begin_inset Flex Code
16623 status collapsed
16624
16625 \begin_layout Plain Layout
16626 List_Environment
16627 \end_layout
16628
16629 \end_inset
16630
16631  is the same as 
16632 \begin_inset Flex Code
16633 status collapsed
16634
16635 \begin_layout Plain Layout
16636 Item_Environment
16637 \end_layout
16638
16639 \end_inset
16640
16641 , except that 
16642 \begin_inset Flex Code
16643 status collapsed
16644
16645 \begin_layout Plain Layout
16646 LabelWidthString
16647 \end_layout
16648
16649 \end_inset
16650
16651  is passed as an argument to the environment.
16652  
16653 \begin_inset Flex Code
16654 status collapsed
16655
16656 \begin_layout Plain Layout
16657 LabelWidthString
16658 \end_layout
16659
16660 \end_inset
16661
16662  can be defined in the 
16663 \begin_inset Flex MenuItem
16664 status collapsed
16665
16666 \begin_layout Plain Layout
16667
16668 \bar under
16669 Edit
16670 \bar default
16671 \SpecialChar \menuseparator
16672
16673 \bar under
16674 P
16675 \bar default
16676 aragraph
16677 \begin_inset space ~
16678 \end_inset
16679
16680 settings
16681 \end_layout
16682
16683 \end_inset
16684
16685  dialog.
16686  
16687 \change_unchanged
16688
16689 \end_layout
16690
16691 \begin_layout Standard
16692 Putting the last few things together, the LaTeX output will be either: 
16693 \end_layout
16694
16695 \begin_layout LyX-Code
16696
16697 \backslash
16698 latexname[latexparam]{\SpecialChar \ldots{}
16699 }
16700 \end_layout
16701
16702 \begin_layout Standard
16703 or: 
16704 \end_layout
16705
16706 \begin_layout LyX-Code
16707
16708 \backslash
16709 begin{latexname}[latexparam] \SpecialChar \ldots{}
16710  
16711 \backslash
16712 end{latexname}.
16713 \end_layout
16714
16715 \begin_layout Standard
16716 depending upon the LaTeX type.
16717 \end_layout
16718
16719 \end_deeper
16720 \begin_layout Description
16721
16722 \change_inserted -712698321 1353866797
16723 \begin_inset Flex Code
16724 status collapsed
16725
16726 \begin_layout Plain Layout
16727
16728 \change_inserted -712698321 1353866742
16729 LeftDelim
16730 \change_unchanged
16731
16732 \end_layout
16733
16734 \end_inset
16735
16736  [
16737 \begin_inset Flex Code
16738 status collapsed
16739
16740 \begin_layout Plain Layout
16741
16742 \change_inserted -712698321 1353866752
16743 string
16744 \end_layout
16745
16746 \end_inset
16747
16748 ] A string that is put at the beginning of the layout content.
16749 \change_inserted 155139281 1354130509
16750
16751 \end_layout
16752
16753 \begin_layout Description
16754 \begin_inset Flex Code
16755 status collapsed
16756
16757 \begin_layout Plain Layout
16758 LyxType
16759 \end_layout
16760
16761 \end_inset
16762
16763  Can be 
16764 \begin_inset Flex Code
16765 status collapsed
16766
16767 \begin_layout Plain Layout
16768 charstyle
16769 \end_layout
16770
16771 \end_inset
16772
16773
16774 \begin_inset Flex Code
16775 status collapsed
16776
16777 \begin_layout Plain Layout
16778 custom
16779 \end_layout
16780
16781 \end_inset
16782
16783
16784 \begin_inset Flex Code
16785 status collapsed
16786
16787 \begin_layout Plain Layout
16788 element
16789 \end_layout
16790
16791 \end_inset
16792
16793 , or 
16794 \begin_inset Flex Code
16795 status collapsed
16796
16797 \begin_layout Plain Layout
16798 end
16799 \end_layout
16800
16801 \end_inset
16802
16803  (indicating a dummy definition ending definitions of charstyles, etc).
16804  This entry is required in and is only meaningful for Flex insets.
16805  Among other things, it determines on which menu this inset will appear.
16806  Setting 
16807 \begin_inset Flex Code
16808 status collapsed
16809
16810 \begin_layout Plain Layout
16811 LyXType
16812 \end_layout
16813
16814 \end_inset
16815
16816  to 
16817 \begin_inset Flex Code
16818 status collapsed
16819
16820 \begin_layout Plain Layout
16821 charstyle
16822 \end_layout
16823
16824 \end_inset
16825
16826  will set 
16827 \begin_inset Flex Code
16828 status collapsed
16829
16830 \begin_layout Plain Layout
16831 MultiPar
16832 \end_layout
16833
16834 \end_inset
16835
16836  to false.
16837  
16838 \begin_inset Flex Code
16839 status collapsed
16840
16841 \begin_layout Plain Layout
16842 MultiPar
16843 \end_layout
16844
16845 \end_inset
16846
16847  can be set to true for charstyle insets, if you wish, by setting it 
16848 \emph on
16849 after
16850 \emph default
16851  you set the 
16852 \begin_inset Flex Code
16853 status collapsed
16854
16855 \begin_layout Plain Layout
16856 LyXType
16857 \end_layout
16858
16859 \end_inset
16860
16861 .
16862 \end_layout
16863
16864 \begin_layout Description
16865 \begin_inset Flex Code
16866 status collapsed
16867
16868 \begin_layout Plain Layout
16869 MultiPar
16870 \end_layout
16871
16872 \end_inset
16873
16874  [
16875 \begin_inset Flex Code
16876 status collapsed
16877
16878 \begin_layout Plain Layout
16879
16880 \emph on
16881 0
16882 \end_layout
16883
16884 \end_inset
16885
16886 ,
16887 \begin_inset Flex Code
16888 status collapsed
16889
16890 \begin_layout Plain Layout
16891 1
16892 \end_layout
16893
16894 \end_inset
16895
16896 ] Whether multiple paragraphs are permitted in this inset.
16897  This will also set 
16898 \begin_inset Flex Code
16899 status collapsed
16900
16901 \begin_layout Plain Layout
16902 CustomPars
16903 \end_layout
16904
16905 \end_inset
16906
16907  to the same value and 
16908 \begin_inset Flex Code
16909 status collapsed
16910
16911 \begin_layout Plain Layout
16912 ForcePlain
16913 \end_layout
16914
16915 \end_inset
16916
16917  to the opposite value.
16918  These can be reset to other values, if they are used 
16919 \emph on
16920 after
16921 \emph default
16922  
16923 \begin_inset Flex Code
16924 status collapsed
16925
16926 \begin_layout Plain Layout
16927 MultiPar
16928 \end_layout
16929
16930 \end_inset
16931
16932 .
16933  Default is true.
16934 \end_layout
16935
16936 \begin_layout Description
16937 \begin_inset Flex Code
16938 status collapsed
16939
16940 \begin_layout Plain Layout
16941 NeedProtect
16942 \end_layout
16943
16944 \end_inset
16945
16946  [
16947 \begin_inset Flex Code
16948 status collapsed
16949
16950 \begin_layout Plain Layout
16951
16952 \emph on
16953 0
16954 \end_layout
16955
16956 \end_inset
16957
16958 ,
16959 \begin_inset Flex Code
16960 status collapsed
16961
16962 \begin_layout Plain Layout
16963 1
16964 \end_layout
16965
16966 \end_inset
16967
16968 ] Whether fragile commands in this inset should be 
16969 \begin_inset Flex Code
16970 status collapsed
16971
16972 \begin_layout Plain Layout
16973
16974 \backslash
16975 protect
16976 \end_layout
16977
16978 \end_inset
16979
16980 'ed.
16981  (Note: This is 
16982 \emph on
16983 not
16984 \emph default
16985  whether the command should itself be protected.) Default is false.
16986 \end_layout
16987
16988 \begin_layout Description
16989 \begin_inset Flex Code
16990 status collapsed
16991
16992 \begin_layout Plain Layout
16993 ParbreakIsNewline
16994 \end_layout
16995
16996 \end_inset
16997
16998  [
16999 \begin_inset Flex Code
17000 status collapsed
17001
17002 \begin_layout Plain Layout
17003
17004 \emph on
17005 0
17006 \end_layout
17007
17008 \end_inset
17009
17010
17011 \begin_inset Flex Code
17012 status collapsed
17013
17014 \begin_layout Plain Layout
17015 1
17016 \end_layout
17017
17018 \end_inset
17019
17020 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
17021  output, but only by a line break; together with 
17022 \begin_inset Flex Code
17023 status collapsed
17024
17025 \begin_layout Plain Layout
17026 PassThru 1
17027 \end_layout
17028
17029 \end_inset
17030
17031 , this allows to emulate a plain text editor (like the ERT inset).
17032  Default is false.
17033 \end_layout
17034
17035 \begin_layout Description
17036 \begin_inset Flex Code
17037 status collapsed
17038
17039 \begin_layout Plain Layout
17040 PassThru
17041 \end_layout
17042
17043 \end_inset
17044
17045  [
17046 \begin_inset Flex Code
17047 status collapsed
17048
17049 \begin_layout Plain Layout
17050
17051 \emph on
17052 0
17053 \end_layout
17054
17055 \end_inset
17056
17057
17058 \begin_inset Flex Code
17059 status collapsed
17060
17061 \begin_layout Plain Layout
17062 1
17063 \end_layout
17064
17065 \end_inset
17066
17067 ] Whether the contents of this paragraph should be output in raw form, meaning
17068  without special translations that LaTeX would require.
17069 \end_layout
17070
17071 \begin_layout Description
17072 \begin_inset Flex Code
17073 status collapsed
17074
17075 \begin_layout Plain Layout
17076 Preamble
17077 \end_layout
17078
17079 \end_inset
17080
17081  Information to be included in the LaTeX preamble when this style is used.
17082  Used to define macros, load packages, etc., required by this particular
17083  style.
17084  Must end with 
17085 \begin_inset Quotes eld
17086 \end_inset
17087
17088
17089 \begin_inset Flex Code
17090 status collapsed
17091
17092 \begin_layout Plain Layout
17093 EndPreamble
17094 \end_layout
17095
17096 \end_inset
17097
17098
17099 \begin_inset Quotes erd
17100 \end_inset
17101
17102 .
17103 \end_layout
17104
17105 \begin_layout Description
17106 \begin_inset Flex Code
17107 status collapsed
17108
17109 \begin_layout Plain Layout
17110 RefPrefix
17111 \end_layout
17112
17113 \end_inset
17114
17115  [
17116 \begin_inset Flex Code
17117 status collapsed
17118
17119 \begin_layout Plain Layout
17120 string
17121 \end_layout
17122
17123 \end_inset
17124
17125 ] The prefix to use when creating labels referring to insets of this type.
17126  This allows the use of formatted references.
17127 \end_layout
17128
17129 \begin_layout Description
17130 \begin_inset Flex Code
17131 status collapsed
17132
17133 \begin_layout Plain Layout
17134 Requires
17135 \end_layout
17136
17137 \end_inset
17138
17139  [
17140 \begin_inset Flex Code
17141 status collapsed
17142
17143 \begin_layout Plain Layout
17144 string
17145 \end_layout
17146
17147 \end_inset
17148
17149 ] Whether the style requires the feature 
17150 \begin_inset Flex Code
17151 status collapsed
17152
17153 \begin_layout Plain Layout
17154 string
17155 \end_layout
17156
17157 \end_inset
17158
17159 .
17160  See the description of 
17161 \begin_inset Flex Code
17162 status collapsed
17163
17164 \begin_layout Plain Layout
17165 Provides
17166 \end_layout
17167
17168 \end_inset
17169
17170  above (page 
17171 \begin_inset CommandInset ref
17172 LatexCommand pageref
17173 reference "des:FreeSpacing"
17174
17175 \end_inset
17176
17177 ) for information on `features'.
17178  
17179 \end_layout
17180
17181 \begin_layout Description
17182 \begin_inset Flex Code
17183 status collapsed
17184
17185 \begin_layout Plain Layout
17186 ResetsFont
17187 \end_layout
17188
17189 \end_inset
17190
17191  [
17192 \begin_inset Flex Code
17193 status collapsed
17194
17195 \begin_layout Plain Layout
17196 0
17197 \end_layout
17198
17199 \end_inset
17200
17201 ,
17202 \begin_inset Flex Code
17203 status collapsed
17204
17205 \begin_layout Plain Layout
17206
17207 \emph on
17208 1
17209 \end_layout
17210
17211 \end_inset
17212
17213 ] Whether this inset should use the font of its surrounding environment
17214  or uses its own.
17215  Default is true: uses its own.
17216 \change_inserted -712698321 1353866806
17217
17218 \end_layout
17219
17220 \begin_layout Description
17221
17222 \change_inserted -712698321 1353866814
17223 \begin_inset Flex Code
17224 status collapsed
17225
17226 \begin_layout Plain Layout
17227
17228 \change_inserted -712698321 1353866810
17229 RightDelim
17230 \end_layout
17231
17232 \end_inset
17233
17234  [
17235 \begin_inset Flex Code
17236 status collapsed
17237
17238 \begin_layout Plain Layout
17239
17240 \change_inserted -712698321 1353866806
17241 string
17242 \end_layout
17243
17244 \end_inset
17245
17246 ] A string that is put at the end of the layout content.
17247 \change_unchanged
17248
17249 \end_layout
17250
17251 \begin_layout Description
17252 \begin_inset Flex Code
17253 status collapsed
17254
17255 \begin_layout Plain Layout
17256 Spellcheck
17257 \end_layout
17258
17259 \end_inset
17260
17261  [
17262 \begin_inset Flex Code
17263 status collapsed
17264
17265 \begin_layout Plain Layout
17266 0
17267 \end_layout
17268
17269 \end_inset
17270
17271 ,
17272 \begin_inset Flex Code
17273 status collapsed
17274
17275 \begin_layout Plain Layout
17276
17277 \emph on
17278 1
17279 \end_layout
17280
17281 \end_inset
17282
17283 ] Spellcheck the contents of this inset.
17284  Default is true.
17285 \end_layout
17286
17287 \begin_layout Subsection
17288 Counters
17289 \begin_inset CommandInset label
17290 LatexCommand label
17291 name "sub:Counters"
17292
17293 \end_inset
17294
17295
17296 \end_layout
17297
17298 \begin_layout Standard
17299 Since version 1.3.0 of LyX, it is both possible and necessary to define the
17300  counters (
17301 \begin_inset Flex MenuItem
17302 status collapsed
17303
17304 \begin_layout Plain Layout
17305 chapter
17306 \end_layout
17307
17308 \end_inset
17309
17310
17311 \begin_inset Flex MenuItem
17312 status collapsed
17313
17314 \begin_layout Plain Layout
17315 figure
17316 \end_layout
17317
17318 \end_inset
17319
17320 , \SpecialChar \ldots{}
17321 ) in the text class itself.
17322  The standard counters are defined in the file 
17323 \begin_inset Flex Code
17324 status collapsed
17325
17326 \begin_layout Plain Layout
17327 stdcounters.inc
17328 \end_layout
17329
17330 \end_inset
17331
17332 , so you may have to do no more than add
17333 \end_layout
17334
17335 \begin_layout LyX-Code
17336 Input stdcounters.inc
17337 \end_layout
17338
17339 \begin_layout Standard
17340 to your layout file to get them to work.
17341  But if you want to define custom counters, then you can do so.
17342  The counter declaration must begin with:
17343 \end_layout
17344
17345 \begin_layout LyX-Code
17346 Counter CounterName
17347 \end_layout
17348
17349 \begin_layout Standard
17350 where of course `
17351 \begin_inset Flex Code
17352 status collapsed
17353
17354 \begin_layout Plain Layout
17355 CounterName
17356 \end_layout
17357
17358 \end_inset
17359
17360 ' is replaced by the name of the counter.
17361  And it must end with 
17362 \begin_inset Quotes eld
17363 \end_inset
17364
17365
17366 \begin_inset Flex Code
17367 status collapsed
17368
17369 \begin_layout Plain Layout
17370 End
17371 \end_layout
17372
17373 \end_inset
17374
17375
17376 \begin_inset Quotes erd
17377 \end_inset
17378
17379 .
17380  The following parameters can also be used:
17381 \end_layout
17382
17383 \begin_layout Description
17384 \begin_inset Flex Code
17385 status collapsed
17386
17387 \begin_layout Plain Layout
17388 LabelString
17389 \end_layout
17390
17391 \end_inset
17392
17393  [
17394 \begin_inset Flex Code
17395 status collapsed
17396
17397 \begin_layout Plain Layout
17398 string
17399 \end_layout
17400
17401 \end_inset
17402
17403 =
17404 \begin_inset Quotes erd
17405 \end_inset
17406
17407
17408 \begin_inset Quotes erd
17409 \end_inset
17410
17411 ] When defined, this string defines how the counter is displayed.
17412  Setting this value sets 
17413 \begin_inset Flex Code
17414 status collapsed
17415
17416 \begin_layout Plain Layout
17417 LabelStringAppendix
17418 \end_layout
17419
17420 \end_inset
17421
17422  to the same value.
17423  The following special constructs can be used in the string:
17424 \end_layout
17425
17426 \begin_deeper
17427 \begin_layout Itemize
17428 \begin_inset Flex Code
17429 status collapsed
17430
17431 \begin_layout Plain Layout
17432
17433 \backslash
17434 thecounter
17435 \end_layout
17436
17437 \end_inset
17438
17439  will be replaced by the expansion of the 
17440 \begin_inset Flex Code
17441 status collapsed
17442
17443 \begin_layout Plain Layout
17444 LabelString
17445 \end_layout
17446
17447 \end_inset
17448
17449  (or 
17450 \begin_inset Flex Code
17451 status collapsed
17452
17453 \begin_layout Plain Layout
17454 LabelStringAppendix
17455 \end_layout
17456
17457 \end_inset
17458
17459 ) of the counter 
17460 \begin_inset Flex Code
17461 status collapsed
17462
17463 \begin_layout Plain Layout
17464 counter
17465 \end_layout
17466
17467 \end_inset
17468
17469 .
17470  
17471 \end_layout
17472
17473 \begin_layout Itemize
17474 counter values can be expressed using LaTeX-like macros 
17475 \begin_inset Flex Code
17476 status collapsed
17477
17478 \begin_layout Plain Layout
17479
17480 \backslash
17481
17482 \emph on
17483 numbertype
17484 \emph default
17485 {
17486 \emph on
17487 counter
17488 \emph default
17489 }
17490 \end_layout
17491
17492 \end_inset
17493
17494 , where 
17495 \begin_inset Flex Code
17496 status collapsed
17497
17498 \begin_layout Plain Layout
17499
17500 \emph on
17501 numbertype
17502 \end_layout
17503
17504 \end_inset
17505
17506  can be:
17507 \begin_inset Foot
17508 status collapsed
17509
17510 \begin_layout Plain Layout
17511
17512 \family roman
17513 \series medium
17514 \shape up
17515 \size normal
17516 \emph off
17517 \bar no
17518 \noun off
17519 \color none
17520 Actually, the situation is a bit more complicated: any
17521 \family default
17522 \series default
17523 \shape default
17524 \emph default
17525 \bar default
17526  
17527 \size default
17528 \emph on
17529 \noun default
17530 \color inherit
17531 numbertype
17532 \family roman
17533 \series medium
17534 \shape up
17535 \size normal
17536 \emph off
17537 \bar no
17538 \noun off
17539  other than those described below will produce arabic numerals.
17540  It would not be surprising to see this change in the future.
17541 \end_layout
17542
17543 \end_inset
17544
17545  
17546 \begin_inset Flex Code
17547 status collapsed
17548
17549 \begin_layout Plain Layout
17550 arabic
17551 \end_layout
17552
17553 \end_inset
17554
17555 : 1, 2, 3,\SpecialChar \ldots{}
17556
17557 \begin_inset Flex Code
17558 status collapsed
17559
17560 \begin_layout Plain Layout
17561 alph
17562 \end_layout
17563
17564 \end_inset
17565
17566  for lower-case letters: a, b, c, \SpecialChar \ldots{}
17567
17568 \begin_inset Flex Code
17569 status collapsed
17570
17571 \begin_layout Plain Layout
17572 Alph
17573 \end_layout
17574
17575 \end_inset
17576
17577  for upper-case letters: A, B, C, \SpecialChar \ldots{}
17578
17579 \begin_inset Flex Code
17580 status collapsed
17581
17582 \begin_layout Plain Layout
17583 roman
17584 \end_layout
17585
17586 \end_inset
17587
17588  for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
17589
17590 \begin_inset Flex Code
17591 status collapsed
17592
17593 \begin_layout Plain Layout
17594 Roman
17595 \end_layout
17596
17597 \end_inset
17598
17599  for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
17600
17601 \begin_inset Flex Code
17602 status collapsed
17603
17604 \begin_layout Plain Layout
17605 hebrew
17606 \end_layout
17607
17608 \end_inset
17609
17610  for hebrew numerals.
17611 \end_layout
17612
17613 \end_deeper
17614 \begin_layout Standard
17615 If LabelString is not defined, a default value is constructed as follows:
17616  if the counter has a master counter 
17617 \begin_inset Flex Code
17618 status collapsed
17619
17620 \begin_layout Plain Layout
17621 master
17622 \end_layout
17623
17624 \end_inset
17625
17626  (defined via 
17627 \begin_inset Flex Code
17628 status collapsed
17629
17630 \begin_layout Plain Layout
17631 Within
17632 \end_layout
17633
17634 \end_inset
17635
17636 ), the string 
17637 \begin_inset Flex Code
17638 status collapsed
17639
17640 \begin_layout Plain Layout
17641
17642 \backslash
17643 themaster.
17644 \backslash
17645 arabic{counter}
17646 \end_layout
17647
17648 \end_inset
17649
17650  is used; otherwise the string 
17651 \begin_inset Flex Code
17652 status collapsed
17653
17654 \begin_layout Plain Layout
17655
17656 \backslash
17657 arabic{counter}
17658 \end_layout
17659
17660 \end_inset
17661
17662  is used.
17663 \end_layout
17664
17665 \begin_layout Description
17666 \begin_inset Flex Code
17667 status collapsed
17668
17669 \begin_layout Plain Layout
17670 LabelStringAppendix
17671 \end_layout
17672
17673 \end_inset
17674
17675  [
17676 \begin_inset Flex Code
17677 status collapsed
17678
17679 \begin_layout Plain Layout
17680 string
17681 \end_layout
17682
17683 \end_inset
17684
17685 =
17686 \begin_inset Quotes erd
17687 \end_inset
17688
17689
17690 \begin_inset Quotes erd
17691 \end_inset
17692
17693 ] Same as 
17694 \begin_inset Flex Code
17695 status collapsed
17696
17697 \begin_layout Plain Layout
17698 LabelString
17699 \end_layout
17700
17701 \end_inset
17702
17703 , but for use in the Appendix.
17704 \end_layout
17705
17706 \begin_layout Description
17707 \begin_inset Flex Code
17708 status collapsed
17709
17710 \begin_layout Plain Layout
17711 PrettyFormat
17712 \end_layout
17713
17714 \end_inset
17715
17716  [
17717 \begin_inset Flex Code
17718 status collapsed
17719
17720 \begin_layout Plain Layout
17721 string
17722 \end_layout
17723
17724 \end_inset
17725
17726 =
17727 \begin_inset Quotes erd
17728 \end_inset
17729
17730
17731 \begin_inset Quotes erd
17732 \end_inset
17733
17734 ] A format for use with formatted references to this counter.
17735  For example, one might want to have references to section numbers appear
17736  as 
17737 \begin_inset Quotes eld
17738 \end_inset
17739
17740 Section 2.4
17741 \begin_inset Quotes erd
17742 \end_inset
17743
17744 .
17745  The string should contain 
17746 \begin_inset Quotes eld
17747 \end_inset
17748
17749 ##
17750 \begin_inset Quotes erd
17751 \end_inset
17752
17753 .
17754  This will be replaced by the counter number itself.
17755  So, for sections, it would be: Section ##.
17756 \end_layout
17757
17758 \begin_layout Description
17759 \begin_inset Flex Code
17760 status collapsed
17761
17762 \begin_layout Plain Layout
17763 Within
17764 \end_layout
17765
17766 \end_inset
17767
17768  [
17769 \begin_inset Flex Code
17770 status collapsed
17771
17772 \begin_layout Plain Layout
17773 string
17774 \end_layout
17775
17776 \end_inset
17777
17778 =
17779 \begin_inset Quotes erd
17780 \end_inset
17781
17782
17783 \begin_inset Quotes erd
17784 \end_inset
17785
17786 ] If this is set to the name of another counter, the present counter will
17787  be reset every time the other one is increased.
17788  For example, 
17789 \begin_inset Flex Code
17790 status collapsed
17791
17792 \begin_layout Plain Layout
17793 subsection
17794 \end_layout
17795
17796 \end_inset
17797
17798  is numbered inside 
17799 \begin_inset Flex Code
17800 status collapsed
17801
17802 \begin_layout Plain Layout
17803 section
17804 \end_layout
17805
17806 \end_inset
17807
17808 .
17809 \end_layout
17810
17811 \begin_layout Subsection
17812 Font description
17813 \begin_inset CommandInset label
17814 LatexCommand label
17815 name "sub:Font-description"
17816
17817 \end_inset
17818
17819
17820 \end_layout
17821
17822 \begin_layout Standard
17823 A font description looks like this:
17824 \end_layout
17825
17826 \begin_layout LyX-Code
17827 Font 
17828 \family roman
17829 \emph on
17830 or
17831 \family default
17832 \emph default
17833  LabelFont
17834 \end_layout
17835
17836 \begin_layout LyX-Code
17837  ...
17838 \end_layout
17839
17840 \begin_layout LyX-Code
17841 EndFont
17842 \end_layout
17843
17844 \begin_layout Standard
17845 The following commands are available:
17846 \end_layout
17847
17848 \begin_layout Description
17849 \begin_inset Flex Code
17850 status collapsed
17851
17852 \begin_layout Plain Layout
17853 Color
17854 \end_layout
17855
17856 \end_inset
17857
17858  [
17859 \begin_inset Flex Code
17860 status collapsed
17861
17862 \begin_layout Plain Layout
17863
17864 \emph on
17865 none
17866 \end_layout
17867
17868 \end_inset
17869
17870
17871 \begin_inset Flex Code
17872 status collapsed
17873
17874 \begin_layout Plain Layout
17875 black
17876 \end_layout
17877
17878 \end_inset
17879
17880
17881 \begin_inset Flex Code
17882 status collapsed
17883
17884 \begin_layout Plain Layout
17885 white
17886 \end_layout
17887
17888 \end_inset
17889
17890
17891 \begin_inset Flex Code
17892 status collapsed
17893
17894 \begin_layout Plain Layout
17895 red
17896 \end_layout
17897
17898 \end_inset
17899
17900
17901 \begin_inset Flex Code
17902 status collapsed
17903
17904 \begin_layout Plain Layout
17905 green
17906 \end_layout
17907
17908 \end_inset
17909
17910
17911 \begin_inset Flex Code
17912 status collapsed
17913
17914 \begin_layout Plain Layout
17915 blue
17916 \end_layout
17917
17918 \end_inset
17919
17920
17921 \begin_inset Flex Code
17922 status collapsed
17923
17924 \begin_layout Plain Layout
17925 cyan
17926 \end_layout
17927
17928 \end_inset
17929
17930
17931 \begin_inset Flex Code
17932 status collapsed
17933
17934 \begin_layout Plain Layout
17935 magenta
17936 \end_layout
17937
17938 \end_inset
17939
17940
17941 \begin_inset Flex Code
17942 status collapsed
17943
17944 \begin_layout Plain Layout
17945 yellow
17946 \end_layout
17947
17948 \end_inset
17949
17950 ]
17951 \end_layout
17952
17953 \begin_layout Description
17954 \begin_inset Flex Code
17955 status collapsed
17956
17957 \begin_layout Plain Layout
17958 Family
17959 \end_layout
17960
17961 \end_inset
17962
17963  [
17964 \begin_inset Flex Code
17965 status collapsed
17966
17967 \begin_layout Plain Layout
17968
17969 \emph on
17970 Roman
17971 \end_layout
17972
17973 \end_inset
17974
17975
17976 \begin_inset Flex Code
17977 status collapsed
17978
17979 \begin_layout Plain Layout
17980 Sans
17981 \end_layout
17982
17983 \end_inset
17984
17985
17986 \begin_inset Flex Code
17987 status collapsed
17988
17989 \begin_layout Plain Layout
17990 Typewriter
17991 \end_layout
17992
17993 \end_inset
17994
17995 ]
17996 \end_layout
17997
17998 \begin_layout Description
17999 \begin_inset Flex Code
18000 status collapsed
18001
18002 \begin_layout Plain Layout
18003 Misc
18004 \end_layout
18005
18006 \end_inset
18007
18008  [
18009 \begin_inset Flex Code
18010 status collapsed
18011
18012 \begin_layout Plain Layout
18013 string
18014 \end_layout
18015
18016 \end_inset
18017
18018 ] Valid arguments are: 
18019 \begin_inset Flex Code
18020 status collapsed
18021
18022 \begin_layout Plain Layout
18023 emph
18024 \end_layout
18025
18026 \end_inset
18027
18028
18029 \begin_inset Flex Code
18030 status collapsed
18031
18032 \begin_layout Plain Layout
18033 noun
18034 \end_layout
18035
18036 \end_inset
18037
18038
18039 \begin_inset Flex Code
18040 status collapsed
18041
18042 \begin_layout Plain Layout
18043 strikeout
18044 \end_layout
18045
18046 \end_inset
18047
18048
18049 \begin_inset Flex Code
18050 status collapsed
18051
18052 \begin_layout Plain Layout
18053 underbar
18054 \end_layout
18055
18056 \end_inset
18057
18058
18059 \begin_inset Flex Code
18060 status collapsed
18061
18062 \begin_layout Plain Layout
18063 uuline
18064 \end_layout
18065
18066 \end_inset
18067
18068
18069 \begin_inset Flex Code
18070 status collapsed
18071
18072 \begin_layout Plain Layout
18073 uwave
18074 \end_layout
18075
18076 \end_inset
18077
18078
18079 \begin_inset Flex Code
18080 status collapsed
18081
18082 \begin_layout Plain Layout
18083 no_emph
18084 \end_layout
18085
18086 \end_inset
18087
18088
18089 \begin_inset Flex Code
18090 status collapsed
18091
18092 \begin_layout Plain Layout
18093 no_noun
18094 \end_layout
18095
18096 \end_inset
18097
18098
18099 \begin_inset Flex Code
18100 status collapsed
18101
18102 \begin_layout Plain Layout
18103 no_strikeout
18104 \end_layout
18105
18106 \end_inset
18107
18108
18109 \begin_inset Flex Code
18110 status collapsed
18111
18112 \begin_layout Plain Layout
18113 no_bar
18114 \end_layout
18115
18116 \end_inset
18117
18118
18119 \begin_inset Flex Code
18120 status collapsed
18121
18122 \begin_layout Plain Layout
18123 no_uuline
18124 \end_layout
18125
18126 \end_inset
18127
18128  and 
18129 \begin_inset Flex Code
18130 status collapsed
18131
18132 \begin_layout Plain Layout
18133 no_uwave
18134 \end_layout
18135
18136 \end_inset
18137
18138 .
18139  Each of these turns on or off the corresponding attribute.
18140  For example, 
18141 \begin_inset Flex Code
18142 status collapsed
18143
18144 \begin_layout Plain Layout
18145 emph
18146 \end_layout
18147
18148 \end_inset
18149
18150  turns on emphasis, and 
18151 \begin_inset Flex Code
18152 status collapsed
18153
18154 \begin_layout Plain Layout
18155 no_emph
18156 \end_layout
18157
18158 \end_inset
18159
18160  turns it off.
18161  
18162 \begin_inset Newline newline
18163 \end_inset
18164
18165 If the latter seems puzzling, remember that the font settings for the present
18166  context are generally inherited from the surrounding context.
18167  So 
18168 \begin_inset Flex Code
18169 status collapsed
18170
18171 \begin_layout Plain Layout
18172 no_emph
18173 \end_layout
18174
18175 \end_inset
18176
18177  would turn off the emphasis that was anyway in effect, say, in a theorem
18178  environment.
18179 \end_layout
18180
18181 \begin_layout Description
18182 \begin_inset Flex Code
18183 status collapsed
18184
18185 \begin_layout Plain Layout
18186 Series
18187 \end_layout
18188
18189 \end_inset
18190
18191  [
18192 \begin_inset Flex Code
18193 status collapsed
18194
18195 \begin_layout Plain Layout
18196
18197 \emph on
18198 Medium
18199 \end_layout
18200
18201 \end_inset
18202
18203
18204 \begin_inset Flex Code
18205 status collapsed
18206
18207 \begin_layout Plain Layout
18208 Bold
18209 \end_layout
18210
18211 \end_inset
18212
18213
18214 \end_layout
18215
18216 \begin_layout Description
18217 \begin_inset Flex Code
18218 status collapsed
18219
18220 \begin_layout Plain Layout
18221 Shape
18222 \end_layout
18223
18224 \end_inset
18225
18226  [
18227 \begin_inset Flex Code
18228 status collapsed
18229
18230 \begin_layout Plain Layout
18231
18232 \emph on
18233 Up
18234 \end_layout
18235
18236 \end_inset
18237
18238
18239 \begin_inset Flex Code
18240 status collapsed
18241
18242 \begin_layout Plain Layout
18243 Italic
18244 \end_layout
18245
18246 \end_inset
18247
18248
18249 \begin_inset Flex Code
18250 status collapsed
18251
18252 \begin_layout Plain Layout
18253 SmallCaps
18254 \end_layout
18255
18256 \end_inset
18257
18258
18259 \begin_inset Flex Code
18260 status collapsed
18261
18262 \begin_layout Plain Layout
18263 Slanted
18264 \end_layout
18265
18266 \end_inset
18267
18268
18269 \end_layout
18270
18271 \begin_layout Description
18272 \begin_inset Flex Code
18273 status collapsed
18274
18275 \begin_layout Plain Layout
18276 Size
18277 \end_layout
18278
18279 \end_inset
18280
18281  [
18282 \begin_inset Flex Code
18283 status collapsed
18284
18285 \begin_layout Plain Layout
18286 tiny
18287 \end_layout
18288
18289 \end_inset
18290
18291
18292 \begin_inset Flex Code
18293 status collapsed
18294
18295 \begin_layout Plain Layout
18296 small
18297 \end_layout
18298
18299 \end_inset
18300
18301
18302 \begin_inset Flex Code
18303 status collapsed
18304
18305 \begin_layout Plain Layout
18306
18307 \emph on
18308 normal
18309 \end_layout
18310
18311 \end_inset
18312
18313
18314 \begin_inset Flex Code
18315 status collapsed
18316
18317 \begin_layout Plain Layout
18318 large
18319 \end_layout
18320
18321 \end_inset
18322
18323
18324 \begin_inset Flex Code
18325 status collapsed
18326
18327 \begin_layout Plain Layout
18328 larger
18329 \end_layout
18330
18331 \end_inset
18332
18333
18334 \begin_inset Flex Code
18335 status collapsed
18336
18337 \begin_layout Plain Layout
18338 largest
18339 \end_layout
18340
18341 \end_inset
18342
18343
18344 \begin_inset Flex Code
18345 status collapsed
18346
18347 \begin_layout Plain Layout
18348 huge
18349 \end_layout
18350
18351 \end_inset
18352
18353
18354 \begin_inset Flex Code
18355 status collapsed
18356
18357 \begin_layout Plain Layout
18358 giant
18359 \end_layout
18360
18361 \end_inset
18362
18363 ]
18364 \end_layout
18365
18366 \begin_layout Subsection
18367 \begin_inset CommandInset label
18368 LatexCommand label
18369 name "sub:Citation-format-description"
18370
18371 \end_inset
18372
18373 Citation format description
18374 \end_layout
18375
18376 \begin_layout Standard
18377 The 
18378 \begin_inset Flex Code
18379 status collapsed
18380
18381 \begin_layout Plain Layout
18382 CiteFormat
18383 \end_layout
18384
18385 \end_inset
18386
18387  blocks are used to describe how bibliographic information should be displayed,
18388  both within LyX itself (in the citation dialog and in tooltips, for example)
18389  and in XHTML output.
18390  Such a block might look like this:
18391 \end_layout
18392
18393 \begin_layout LyX-Code
18394 CiteFormat
18395 \end_layout
18396
18397 \begin_layout LyX-Code
18398  article ...
18399 \end_layout
18400
18401 \begin_layout LyX-Code
18402  book ...
18403 \end_layout
18404
18405 \begin_layout LyX-Code
18406 End
18407 \end_layout
18408
18409 \begin_layout Standard
18410 The individual lines define how the bibliographic information associated
18411  with an article or book, respectively, is to be displayed, and such a definitio
18412 n can be given for any `entry type' that might be present in a BibTeX file.
18413  LyX defines a default format in the source code that will be used if no
18414  specific definition has been given.
18415  LyX predefines several formats in the file 
18416 \begin_inset Flex Code
18417 status collapsed
18418
18419 \begin_layout Plain Layout
18420 stdciteformats.inc
18421 \end_layout
18422
18423 \end_inset
18424
18425 , which is included in most of LyX's document classes.
18426 \end_layout
18427
18428 \begin_layout Standard
18429 The definitions use a simple language that allows BibTeX keys to be replaced
18430  with their values.
18431  Keys should be enclosed in 
18432 \begin_inset Flex Code
18433 status collapsed
18434
18435 \begin_layout Plain Layout
18436 %
18437 \end_layout
18438
18439 \end_inset
18440
18441  signs, e.g.: 
18442 \begin_inset Flex Code
18443 status collapsed
18444
18445 \begin_layout Plain Layout
18446 %author%
18447 \end_layout
18448
18449 \end_inset
18450
18451 .
18452  So a simple definition might look like this:
18453 \end_layout
18454
18455 \begin_layout LyX-Code
18456 misc %author%, 
18457 \begin_inset Quotes eld
18458 \end_inset
18459
18460 %title
18461 \begin_inset Quotes erd
18462 \end_inset
18463
18464 .
18465 \end_layout
18466
18467 \begin_layout Standard
18468 This would print the author, followed by a comma, followed by the title,
18469  in quotes, followed by a period.
18470 \end_layout
18471
18472 \begin_layout Standard
18473 Of course, sometimes you may want to print a key only if it exists.
18474  This can be done by using a conditional construction, such as: 
18475 \begin_inset Flex Code
18476 status collapsed
18477
18478 \begin_layout Plain Layout
18479 {%volume%[[vol.
18480 \begin_inset space ~
18481 \end_inset
18482
18483 %volume%]]}
18484 \end_layout
18485
18486 \end_inset
18487
18488 .
18489  This says: If the 
18490 \begin_inset Flex Code
18491 status collapsed
18492
18493 \begin_layout Plain Layout
18494 volume
18495 \end_layout
18496
18497 \end_inset
18498
18499  key exists, then print 
18500 \begin_inset Quotes eld
18501 \end_inset
18502
18503 vol.
18504 \begin_inset space ~
18505 \end_inset
18506
18507
18508 \begin_inset Quotes erd
18509 \end_inset
18510
18511  followed by the volume key.
18512  It is also possible to have an else clause in the conditional, such as:
18513  
18514 \begin_inset Flex Code
18515 status collapsed
18516
18517 \begin_layout Plain Layout
18518 {%author%[[%author%]][[%editor%, ed.]]}
18519 \end_layout
18520
18521 \end_inset
18522
18523 .
18524  Here, the 
18525 \begin_inset Flex Code
18526 status collapsed
18527
18528 \begin_layout Plain Layout
18529 author
18530 \end_layout
18531
18532 \end_inset
18533
18534  key is printed if it exists; otherwise, the editor key is printed, followed
18535  by 
18536 \begin_inset Quotes eld
18537 \end_inset
18538
18539 ,
18540 \begin_inset space ~
18541 \end_inset
18542
18543 ed.
18544 \begin_inset Quotes erd
18545 \end_inset
18546
18547  Note that the key is again enclosed in 
18548 \begin_inset Flex Code
18549 status collapsed
18550
18551 \begin_layout Plain Layout
18552 %
18553 \end_layout
18554
18555 \end_inset
18556
18557  signs; the entire conditional is enclosed in braces; and the if and else
18558  clauses are enclosed in double brackets, 
18559 \begin_inset Quotes eld
18560 \end_inset
18561
18562
18563 \begin_inset Flex Code
18564 status collapsed
18565
18566 \begin_layout Plain Layout
18567 [[
18568 \end_layout
18569
18570 \end_inset
18571
18572
18573 \begin_inset Quotes eld
18574 \end_inset
18575
18576  and 
18577 \begin_inset Quotes eld
18578 \end_inset
18579
18580
18581 \begin_inset Flex Code
18582 status collapsed
18583
18584 \begin_layout Plain Layout
18585 ]]
18586 \end_layout
18587
18588 \end_inset
18589
18590
18591 \begin_inset Quotes erd
18592 \end_inset
18593
18594 .
18595  There must be no space between any of these.
18596 \end_layout
18597
18598 \begin_layout Standard
18599 There is one other piece of syntax available in definitions, which looks
18600  like this: 
18601 \begin_inset Flex Code
18602 status collapsed
18603
18604 \begin_layout Plain Layout
18605 {!<i>!}
18606 \end_layout
18607
18608 \end_inset
18609
18610 .
18611  This defines a piece of formatting information that is to be used when
18612  creating 
18613 \begin_inset Quotes eld
18614 \end_inset
18615
18616 rich text
18617 \begin_inset Quotes erd
18618 \end_inset
18619
18620 .
18621  Obviously, we do not want to output HTML tags when writing plain text,
18622  so they should be wrapped in 
18623 \begin_inset Quotes eld
18624 \end_inset
18625
18626 {!
18627 \begin_inset Quotes erd
18628 \end_inset
18629
18630  and 
18631 \begin_inset Quotes eld
18632 \end_inset
18633
18634 !}
18635 \begin_inset Quotes erd
18636 \end_inset
18637
18638 .
18639 \end_layout
18640
18641 \begin_layout Standard
18642 Two special sorts of definitions are also possible in a 
18643 \begin_inset Flex Code
18644 status collapsed
18645
18646 \begin_layout Plain Layout
18647 CiteFormat
18648 \end_layout
18649
18650 \end_inset
18651
18652  block.
18653  An example of the first would be:
18654 \end_layout
18655
18656 \begin_layout LyX-Code
18657 !quotetitle 
18658 \begin_inset Quotes eld
18659 \end_inset
18660
18661 %title%
18662 \begin_inset Quotes erd
18663 \end_inset
18664
18665
18666 \end_layout
18667
18668 \begin_layout Standard
18669 This is an abbreviation, or macro, and it can be used by treating it as
18670  if it were a key: 
18671 \begin_inset Flex Code
18672 status collapsed
18673
18674 \begin_layout Plain Layout
18675 %!quotetitle%
18676 \end_layout
18677
18678 \end_inset
18679
18680 .
18681  LyX will treat 
18682 \begin_inset Flex Code
18683 status collapsed
18684
18685 \begin_layout Plain Layout
18686 %!quotetitle%
18687 \end_layout
18688
18689 \end_inset
18690
18691  exactly as it would treat its definition.
18692  So, let us issue the obvious 
18693 \emph on
18694 warning
18695 \emph default
18696 .
18697  Do not do this:
18698 \end_layout
18699
18700 \begin_layout LyX-Code
18701 !funfun %funfun%
18702 \end_layout
18703
18704 \begin_layout Standard
18705 or anything like it.
18706  LyX shouldn't go into an infinite loop, but it may go into a long one before
18707  it gives up.
18708 \end_layout
18709
18710 \begin_layout Standard
18711 The second sort of special definition might look like this:
18712 \end_layout
18713
18714 \begin_layout LyX-Code
18715 _pptext pp.
18716 \end_layout
18717
18718 \begin_layout Standard
18719 This defines a translatable piece of text, which allows relevant parts of
18720  the bibliography to be translated.
18721  It can be included in a definition by treating it as a key: 
18722 \begin_inset Flex Code
18723 status collapsed
18724
18725 \begin_layout Plain Layout
18726 %_pptext%
18727 \end_layout
18728
18729 \end_inset
18730
18731 .
18732  Several of these are predefined in 
18733 \begin_inset Flex Code
18734 status collapsed
18735
18736 \begin_layout Plain Layout
18737 stdciteformats.inc
18738 \end_layout
18739
18740 \end_inset
18741
18742 .
18743  Note that these are not macros, in the sense just defined.
18744  They will not be expanded.
18745 \end_layout
18746
18747 \begin_layout Standard
18748 So here then is an example that use all these features:
18749 \end_layout
18750
18751 \begin_layout LyX-Code
18752 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
18753 \end_layout
18754
18755 \begin_layout Standard
18756 This defines a macro that prints the author, followed by a comma, if the
18757  
18758 \begin_inset Flex Code
18759 status collapsed
18760
18761 \begin_layout Plain Layout
18762 author
18763 \end_layout
18764
18765 \end_inset
18766
18767  key is defined, or else prints the name of the editor, followed by the
18768  
18769 \begin_inset Flex Code
18770 status collapsed
18771
18772 \begin_layout Plain Layout
18773 _edtext
18774 \end_layout
18775
18776 \end_inset
18777
18778  or its translation (it is by default 
18779 \begin_inset Quotes eld
18780 \end_inset
18781
18782 ed.
18783 \begin_inset Quotes erd
18784 \end_inset
18785
18786 ), if the 
18787 \begin_inset Flex Code
18788 status collapsed
18789
18790 \begin_layout Plain Layout
18791 editor
18792 \end_layout
18793
18794 \end_inset
18795
18796  key is defined.
18797  Note that this is in fact defined in 
18798 \begin_inset Flex Code
18799 status collapsed
18800
18801 \begin_layout Plain Layout
18802 stdciteformats.inc
18803 \end_layout
18804
18805 \end_inset
18806
18807 , so you can use it in your own definitions, or re-definitions, if you load
18808  that file first.
18809 \end_layout
18810
18811 \begin_layout Section
18812 \begin_inset CommandInset label
18813 LatexCommand label
18814 name "sec:Tags-for-XHTML"
18815
18816 \end_inset
18817
18818 Tags for XHTML output
18819 \end_layout
18820
18821 \begin_layout Standard
18822 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
18823  by layout information.
18824  In general, LyX provides sensible defaults and, as mentioned earlier, it
18825  will even construct default CSS style rules from the other layout tags.
18826  For example, LyX will attempt to use the information provided in the 
18827 \begin_inset Flex Code
18828 status collapsed
18829
18830 \begin_layout Plain Layout
18831 Font
18832 \end_layout
18833
18834 \end_inset
18835
18836  declaration for the Chapter style to write CSS that will appropriately
18837  format chapter headings.
18838 \end_layout
18839
18840 \begin_layout Standard
18841 In many cases, then, you may not have to do anything at all to get acceptable
18842  XHTML output for your own environments, custom insets, and so forth.
18843  But in some cases you will, and so LyX provides a number of layout tags
18844  that can be used to customize the XHTML and CSS that are generated.
18845 \end_layout
18846
18847 \begin_layout Standard
18848 Note that there are two tags, 
18849 \begin_inset Flex Code
18850 status collapsed
18851
18852 \begin_layout Plain Layout
18853 HTMLPreamble
18854 \end_layout
18855
18856 \end_inset
18857
18858  and 
18859 \begin_inset Flex Code
18860 status collapsed
18861
18862 \begin_layout Plain Layout
18863 AddToHTMLPreamble
18864 \end_layout
18865
18866 \end_inset
18867
18868  that may appear outside style and inset declarations.
18869  See 
18870 \begin_inset CommandInset ref
18871 LatexCommand ref
18872 reference "sub:General-text-class"
18873
18874 \end_inset
18875
18876  for details on these.
18877 \end_layout
18878
18879 \begin_layout Subsection
18880 \begin_inset CommandInset label
18881 LatexCommand label
18882 name "sub:Paragraph-Style-XHTML"
18883
18884 \end_inset
18885
18886 Paragraph styles
18887 \end_layout
18888
18889 \begin_layout Standard
18890 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
18891  dealing with a normal paragraph, a command, or an environment, where this
18892  is itself determined by the contents of the corresponding 
18893 \begin_inset Flex Code
18894 status collapsed
18895
18896 \begin_layout Plain Layout
18897 LaTeXType
18898 \end_layout
18899
18900 \end_inset
18901
18902  tag.
18903  
18904 \end_layout
18905
18906 \begin_layout Standard
18907 For a command or normal paragraph, the output XHTML has the following form:
18908 \end_layout
18909
18910 \begin_layout LyX-Code
18911 <tag attr=
18912 \begin_inset Quotes erd
18913 \end_inset
18914
18915 value
18916 \begin_inset Quotes erd
18917 \end_inset
18918
18919 >
18920 \end_layout
18921
18922 \begin_layout LyX-Code
18923 <labeltag attr=
18924 \begin_inset Quotes erd
18925 \end_inset
18926
18927 value
18928 \begin_inset Quotes erd
18929 \end_inset
18930
18931 >Label</labeltag>
18932 \end_layout
18933
18934 \begin_layout LyX-Code
18935 Contents of the paragraph.
18936 \end_layout
18937
18938 \begin_layout LyX-Code
18939 </tag>
18940 \end_layout
18941
18942 \begin_layout Standard
18943 The label tags are of course omitted if the paragraph does not have a label.
18944 \end_layout
18945
18946 \begin_layout Standard
18947 For an environment that is not some sort of list, the XHTML takes this form:
18948 \end_layout
18949
18950 \begin_layout LyX-Code
18951 <tag attr=
18952 \begin_inset Quotes erd
18953 \end_inset
18954
18955 value
18956 \begin_inset Quotes erd
18957 \end_inset
18958
18959 >
18960 \end_layout
18961
18962 \begin_layout LyX-Code
18963 <itemtag attr=
18964 \begin_inset Quotes erd
18965 \end_inset
18966
18967 value
18968 \begin_inset Quotes erd
18969 \end_inset
18970
18971 ><labeltag attr=
18972 \begin_inset Quotes erd
18973 \end_inset
18974
18975 value
18976 \begin_inset Quotes erd
18977 \end_inset
18978
18979 >Environment Label</labeltag>First paragraph.</itemtag>
18980 \end_layout
18981
18982 \begin_layout LyX-Code
18983 <itemtag>Second paragraph.</itemtag>
18984 \end_layout
18985
18986 \begin_layout LyX-Code
18987 </tag>
18988 \end_layout
18989
18990 \begin_layout Standard
18991 Note that the label is output only for the first paragraph, as it should
18992  be for a theorem, for example.
18993  
18994 \end_layout
18995
18996 \begin_layout Standard
18997 For a list, we have one of these forms:
18998 \end_layout
18999
19000 \begin_layout LyX-Code
19001 <tag attr=
19002 \begin_inset Quotes erd
19003 \end_inset
19004
19005 value
19006 \begin_inset Quotes erd
19007 \end_inset
19008
19009 >
19010 \end_layout
19011
19012 \begin_layout LyX-Code
19013 <itemtag attr=
19014 \begin_inset Quotes erd
19015 \end_inset
19016
19017 value
19018 \begin_inset Quotes erd
19019 \end_inset
19020
19021 ><labeltag attr=
19022 \begin_inset Quotes erd
19023 \end_inset
19024
19025 value
19026 \begin_inset Quotes erd
19027 \end_inset
19028
19029 >List Label</labeltag>First item.</itemtag>
19030 \end_layout
19031
19032 \begin_layout LyX-Code
19033 <itemtag attr=
19034 \begin_inset Quotes erd
19035 \end_inset
19036
19037 value
19038 \begin_inset Quotes erd
19039 \end_inset
19040
19041 ><labeltag attr=
19042 \begin_inset Quotes erd
19043 \end_inset
19044
19045 value
19046 \begin_inset Quotes erd
19047 \end_inset
19048
19049 >List Label</labeltag>Second item.</itemtag>
19050 \end_layout
19051
19052 \begin_layout LyX-Code
19053 </tag>
19054 \end_layout
19055
19056 \begin_layout LyX-Code
19057
19058 \end_layout
19059
19060 \begin_layout LyX-Code
19061 <tag attr=
19062 \begin_inset Quotes erd
19063 \end_inset
19064
19065 value
19066 \begin_inset Quotes erd
19067 \end_inset
19068
19069 >
19070 \end_layout
19071
19072 \begin_layout LyX-Code
19073 <labeltag attr=
19074 \begin_inset Quotes erd
19075 \end_inset
19076
19077 value
19078 \begin_inset Quotes erd
19079 \end_inset
19080
19081 >List Label</labeltag><itemtag attr=
19082 \begin_inset Quotes erd
19083 \end_inset
19084
19085 value
19086 \begin_inset Quotes erd
19087 \end_inset
19088
19089 >First item.</itemtag>
19090 \end_layout
19091
19092 \begin_layout LyX-Code
19093 <labeltag attr=
19094 \begin_inset Quotes erd
19095 \end_inset
19096
19097 value
19098 \begin_inset Quotes erd
19099 \end_inset
19100
19101 >List Label</labeltag><itemtag attr=
19102 \begin_inset Quotes erd
19103 \end_inset
19104
19105 value
19106 \begin_inset Quotes erd
19107 \end_inset
19108
19109 >Second item.</itemtag>
19110 \end_layout
19111
19112 \begin_layout LyX-Code
19113 </tag>
19114 \end_layout
19115
19116 \begin_layout Standard
19117 Note the different orders of 
19118 \begin_inset Flex Code
19119 status collapsed
19120
19121 \begin_layout Plain Layout
19122 labeltag
19123 \end_layout
19124
19125 \end_inset
19126
19127  and 
19128 \begin_inset Flex Code
19129 status collapsed
19130
19131 \begin_layout Plain Layout
19132 itemtag
19133 \end_layout
19134
19135 \end_inset
19136
19137 .
19138  Which order we get depends upon the setting of 
19139 \begin_inset Flex Code
19140 status collapsed
19141
19142 \begin_layout Plain Layout
19143 HTMLLabelFirst
19144 \end_layout
19145
19146 \end_inset
19147
19148 : If 
19149 \begin_inset Flex Code
19150 status collapsed
19151
19152 \begin_layout Plain Layout
19153 HTMLLabelFirst
19154 \end_layout
19155
19156 \end_inset
19157
19158  is false (the default), you get the first of these, with the label within
19159  the item; if true, you get the second, with the label outside the item.
19160 \end_layout
19161
19162 \begin_layout Standard
19163 The specific tags and attributes output for each paragraph type can be controlle
19164 d by means of the layout tags we are about to describe.
19165  As mentioned earlier, however, LyX uses sensible defaults for many of these,
19166  so you often may not need to do very much to get good XHTML output.
19167  Think of the available tags as there so you can tweak things to your liking.
19168 \end_layout
19169
19170 \begin_layout Description
19171 \begin_inset Flex Code
19172 status collapsed
19173
19174 \begin_layout Plain Layout
19175 HTMLAttr
19176 \end_layout
19177
19178 \end_inset
19179
19180  [
19181 \begin_inset Flex Code
19182 status collapsed
19183
19184 \begin_layout Plain Layout
19185 string
19186 \end_layout
19187
19188 \end_inset
19189
19190 ] Specifies attribute information to be output with the main tag.
19191  For example, 
19192 \begin_inset Quotes eld
19193 \end_inset
19194
19195
19196 \begin_inset Flex Code
19197 status collapsed
19198
19199 \begin_layout Plain Layout
19200 class=`mydiv'
19201 \end_layout
19202
19203 \end_inset
19204
19205
19206 \begin_inset Quotes erd
19207 \end_inset
19208
19209 .
19210  By default, LyX will output 
19211 \begin_inset Quotes eld
19212 \end_inset
19213
19214
19215 \begin_inset Flex Code
19216 status collapsed
19217
19218 \begin_layout Plain Layout
19219 class=`layoutname'
19220 \end_layout
19221
19222 \end_inset
19223
19224
19225 \begin_inset Quotes erd
19226 \end_inset
19227
19228 , where 
19229 \begin_inset Flex Code
19230 status collapsed
19231
19232 \begin_layout Plain Layout
19233 layoutname
19234 \end_layout
19235
19236 \end_inset
19237
19238  is the LyX name of the layout, made lowercase, for example: chapter.
19239  This should 
19240 \emph on
19241 not
19242 \emph default
19243  contain any style information.
19244  Use 
19245 \begin_inset Flex Code
19246 status collapsed
19247
19248 \begin_layout Plain Layout
19249 HTMLStyle
19250 \end_layout
19251
19252 \end_inset
19253
19254  for that purpose.
19255 \end_layout
19256
19257 \begin_layout Description
19258 \begin_inset Flex Code
19259 status collapsed
19260
19261 \begin_layout Plain Layout
19262 HTMLForceCSS
19263 \end_layout
19264
19265 \end_inset
19266
19267  [
19268 \begin_inset Flex Code
19269 status collapsed
19270
19271 \begin_layout Plain Layout
19272
19273 \emph on
19274 0
19275 \emph default
19276 ,1
19277 \end_layout
19278
19279 \end_inset
19280
19281 ] Whether to output the default CSS information LyX generates for this layout,
19282  even if additional information is explicitly provided via 
19283 \begin_inset Flex Code
19284 status collapsed
19285
19286 \begin_layout Plain Layout
19287 HTMLStyle
19288 \end_layout
19289
19290 \end_inset
19291
19292 .
19293  Setting this to 
19294 \begin_inset Flex Code
19295 status collapsed
19296
19297 \begin_layout Plain Layout
19298 1
19299 \end_layout
19300
19301 \end_inset
19302
19303  allows you to alter or augment the generated CSS, rather than to override
19304  it completely.
19305  Default is 
19306 \begin_inset Flex Code
19307 status collapsed
19308
19309 \begin_layout Plain Layout
19310 0
19311 \end_layout
19312
19313 \end_inset
19314
19315 .
19316 \end_layout
19317
19318 \begin_layout Description
19319 \begin_inset Flex Code
19320 status collapsed
19321
19322 \begin_layout Plain Layout
19323 HTMLItem
19324 \end_layout
19325
19326 \end_inset
19327
19328  [
19329 \begin_inset Flex Code
19330 status collapsed
19331
19332 \begin_layout Plain Layout
19333 string
19334 \end_layout
19335
19336 \end_inset
19337
19338 ] The tag to be used for individual paragraphs of environments, replacing
19339  
19340 \begin_inset Flex Code
19341 status collapsed
19342
19343 \begin_layout Plain Layout
19344 itemtag
19345 \end_layout
19346
19347 \end_inset
19348
19349  in the examples above.
19350  Defaults to 
19351 \begin_inset Flex Code
19352 status collapsed
19353
19354 \begin_layout Plain Layout
19355 div
19356 \end_layout
19357
19358 \end_inset
19359
19360 .
19361 \end_layout
19362
19363 \begin_layout Description
19364 \begin_inset Flex Code
19365 status collapsed
19366
19367 \begin_layout Plain Layout
19368 HTMLItemAttr
19369 \end_layout
19370
19371 \end_inset
19372
19373  [
19374 \begin_inset Flex Code
19375 status collapsed
19376
19377 \begin_layout Plain Layout
19378 string
19379 \end_layout
19380
19381 \end_inset
19382
19383 ] Attributes for the item tag.
19384  Defaults to 
19385 \begin_inset Quotes eld
19386 \end_inset
19387
19388
19389 \begin_inset Flex Code
19390 status collapsed
19391
19392 \begin_layout Plain Layout
19393 class=`layoutname_item'
19394 \end_layout
19395
19396 \end_inset
19397
19398
19399 \begin_inset Quotes erd
19400 \end_inset
19401
19402 .
19403  This should 
19404 \emph on
19405 not
19406 \emph default
19407  contain any style information.
19408  Use 
19409 \begin_inset Flex Code
19410 status collapsed
19411
19412 \begin_layout Plain Layout
19413 HTMLStyle
19414 \end_layout
19415
19416 \end_inset
19417
19418  for that purpose.
19419 \end_layout
19420
19421 \begin_layout Description
19422 \begin_inset Flex Code
19423 status collapsed
19424
19425 \begin_layout Plain Layout
19426 HTMLLabel
19427 \end_layout
19428
19429 \end_inset
19430
19431  [
19432 \begin_inset Flex Code
19433 status collapsed
19434
19435 \begin_layout Plain Layout
19436 string
19437 \end_layout
19438
19439 \end_inset
19440
19441 ] The tag to be used for paragraph and item labels, replacing 
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  in the examples above.
19452  Defaults to 
19453 \begin_inset Flex Code
19454 status collapsed
19455
19456 \begin_layout Plain Layout
19457 span
19458 \end_layout
19459
19460 \end_inset
19461
19462 , unless 
19463 \begin_inset Flex Code
19464 status collapsed
19465
19466 \begin_layout Plain Layout
19467 LabelType
19468 \end_layout
19469
19470 \end_inset
19471
19472  is either 
19473 \begin_inset Flex Code
19474 status collapsed
19475
19476 \begin_layout Plain Layout
19477 Top_Environment
19478 \end_layout
19479
19480 \end_inset
19481
19482  or 
19483 \begin_inset Flex Code
19484 status collapsed
19485
19486 \begin_layout Plain Layout
19487 Centered_Top_Environment
19488 \end_layout
19489
19490 \end_inset
19491
19492 , in which case it defaults to 
19493 \begin_inset Flex Code
19494 status collapsed
19495
19496 \begin_layout Plain Layout
19497 div
19498 \end_layout
19499
19500 \end_inset
19501
19502 .
19503 \end_layout
19504
19505 \begin_layout Description
19506 \begin_inset Flex Code
19507 status collapsed
19508
19509 \begin_layout Plain Layout
19510 HTMLLabelAttr
19511 \end_layout
19512
19513 \end_inset
19514
19515  [
19516 \begin_inset Flex Code
19517 status collapsed
19518
19519 \begin_layout Plain Layout
19520 string
19521 \end_layout
19522
19523 \end_inset
19524
19525 ] Attributes for the label tag.
19526  Defaults to 
19527 \begin_inset Quotes eld
19528 \end_inset
19529
19530
19531 \begin_inset Flex Code
19532 status collapsed
19533
19534 \begin_layout Plain Layout
19535 class=`layoutname_label'
19536 \end_layout
19537
19538 \end_inset
19539
19540
19541 \begin_inset Quotes erd
19542 \end_inset
19543
19544 .
19545  This should 
19546 \emph on
19547 not
19548 \emph default
19549  contain any style information.
19550  Use 
19551 \begin_inset Flex Code
19552 status collapsed
19553
19554 \begin_layout Plain Layout
19555 HTMLStyle
19556 \end_layout
19557
19558 \end_inset
19559
19560  for that purpose.
19561 \end_layout
19562
19563 \begin_layout Description
19564 \begin_inset Flex Code
19565 status collapsed
19566
19567 \begin_layout Plain Layout
19568 HTMLLabelFirst
19569 \end_layout
19570
19571 \end_inset
19572
19573  [
19574 \begin_inset Flex Code
19575 status collapsed
19576
19577 \begin_layout Plain Layout
19578
19579 \emph on
19580 0
19581 \emph default
19582 ,1
19583 \end_layout
19584
19585 \end_inset
19586
19587 ] Meaningful only for list-like environments, this tag controls whether
19588  the label tag is output before or inside the item tag.
19589  This is used, for example, in the description environment, where we want
19590  `
19591 \begin_inset Flex Code
19592 status collapsed
19593
19594 \begin_layout Plain Layout
19595 <dt>\SpecialChar \ldots{}
19596 </dt><dd>\SpecialChar \ldots{}
19597 </dd>
19598 \end_layout
19599
19600 \end_inset
19601
19602 .
19603  Default is 
19604 \begin_inset Flex Code
19605 status collapsed
19606
19607 \begin_layout Plain Layout
19608 0
19609 \end_layout
19610
19611 \end_inset
19612
19613 : The label tag is output inside the item tag.
19614 \end_layout
19615
19616 \begin_layout Description
19617 \begin_inset Flex Code
19618 status collapsed
19619
19620 \begin_layout Plain Layout
19621 HTMLPreamble
19622 \end_layout
19623
19624 \end_inset
19625
19626  Information to be output in the 
19627 \begin_inset Flex Code
19628 status collapsed
19629
19630 \begin_layout Plain Layout
19631 <head>
19632 \end_layout
19633
19634 \end_inset
19635
19636  section when this style is used.
19637  This might, for example, be used to include a 
19638 \begin_inset Flex Code
19639 status collapsed
19640
19641 \begin_layout Plain Layout
19642 <script>
19643 \end_layout
19644
19645 \end_inset
19646
19647  block defining an 
19648 \begin_inset Flex Code
19649 status collapsed
19650
19651 \begin_layout Plain Layout
19652 onclick
19653 \end_layout
19654
19655 \end_inset
19656
19657  handler.
19658 \end_layout
19659
19660 \begin_layout Description
19661 \begin_inset Flex Code
19662 status collapsed
19663
19664 \begin_layout Plain Layout
19665 HTMLStyle
19666 \end_layout
19667
19668 \end_inset
19669
19670  CSS style information to be included when this style is used.
19671  Note that this will automatically be wrapped in a layout-generated 
19672 \begin_inset Flex Code
19673 status collapsed
19674
19675 \begin_layout Plain Layout
19676 <style>
19677 \end_layout
19678
19679 \end_inset
19680
19681  block, so only the CSS itself need be included.
19682 \end_layout
19683
19684 \begin_layout Description
19685 \begin_inset Flex Code
19686 status collapsed
19687
19688 \begin_layout Plain Layout
19689 HTMLTag
19690 \end_layout
19691
19692 \end_inset
19693
19694  [
19695 \begin_inset Flex Code
19696 status collapsed
19697
19698 \begin_layout Plain Layout
19699 string
19700 \end_layout
19701
19702 \end_inset
19703
19704 ] The tag to be used for the main label, replacing 
19705 \begin_inset Flex Code
19706 status collapsed
19707
19708 \begin_layout Plain Layout
19709 tag
19710 \end_layout
19711
19712 \end_inset
19713
19714  in the examples above.
19715  Defaults to 
19716 \begin_inset Flex Code
19717 status collapsed
19718
19719 \begin_layout Plain Layout
19720 div
19721 \end_layout
19722
19723 \end_inset
19724
19725 .
19726 \end_layout
19727
19728 \begin_layout Description
19729 \begin_inset Flex Code
19730 status collapsed
19731
19732 \begin_layout Plain Layout
19733 HTMLTitle
19734 \end_layout
19735
19736 \end_inset
19737
19738  [
19739 \begin_inset Flex Code
19740 status collapsed
19741
19742 \begin_layout Plain Layout
19743
19744 \emph on
19745 0
19746 \emph default
19747 ,1
19748 \end_layout
19749
19750 \end_inset
19751
19752 ] Marks this style as the one to be used to generate the 
19753 \begin_inset Flex Code
19754 status collapsed
19755
19756 \begin_layout Plain Layout
19757 <title>
19758 \end_layout
19759
19760 \end_inset
19761
19762  tag for the XHTML file.
19763  By default, it is false.
19764  The 
19765 \begin_inset Flex Code
19766 status collapsed
19767
19768 \begin_layout Plain Layout
19769 stdtitle.inc
19770 \end_layout
19771
19772 \end_inset
19773
19774  file sets it to true for the 
19775 \begin_inset Flex Code
19776 status collapsed
19777
19778 \begin_layout Plain Layout
19779 title
19780 \end_layout
19781
19782 \end_inset
19783
19784  environment.
19785  
19786 \end_layout
19787
19788 \begin_layout Subsection
19789 InsetLayout XHTML
19790 \end_layout
19791
19792 \begin_layout Standard
19793 The XHTML output of insets can also be controlled by information in layout
19794  files.
19795 \begin_inset Foot
19796 status collapsed
19797
19798 \begin_layout Plain Layout
19799 At present, this is true only for 
19800 \begin_inset Quotes eld
19801 \end_inset
19802
19803 text
19804 \begin_inset Quotes erd
19805 \end_inset
19806
19807  insets (insets you can type into) and is not true for 
19808 \begin_inset Quotes eld
19809 \end_inset
19810
19811 command
19812 \begin_inset Quotes erd
19813 \end_inset
19814
19815  insets (insets that are associated with dialog boxes).
19816 \end_layout
19817
19818 \end_inset
19819
19820  Here, too, LyX tries to provide sensible defaults, and it constructs default
19821  CSS style rules.
19822  But everything can be customized.
19823 \end_layout
19824
19825 \begin_layout Standard
19826 The XHTML LyX outputs for an inset has the following form:
19827 \end_layout
19828
19829 \begin_layout LyX-Code
19830 <tag attr=
19831 \begin_inset Quotes erd
19832 \end_inset
19833
19834 value
19835 \begin_inset Quotes erd
19836 \end_inset
19837
19838 >
19839 \end_layout
19840
19841 \begin_layout LyX-Code
19842 <labeltag>Label</labeltag>
19843 \end_layout
19844
19845 \begin_layout LyX-Code
19846 <innertag attr=
19847 \begin_inset Quotes erd
19848 \end_inset
19849
19850 value
19851 \begin_inset Quotes erd
19852 \end_inset
19853
19854 >Contents of the inset.</innertag>
19855 \end_layout
19856
19857 \begin_layout LyX-Code
19858 </tag>
19859 \end_layout
19860
19861 \begin_layout Standard
19862 If the inset permits multiple paragraphs---that is, if 
19863 \begin_inset Flex Code
19864 status collapsed
19865
19866 \begin_layout Plain Layout
19867 MultiPar
19868 \end_layout
19869
19870 \end_inset
19871
19872  is true---then the contents of the inset will itself be output as paragraphs
19873  formatted according to the styles used for those paragraphs (standard,
19874  quote, and the like).
19875  The label tag is of course omitted if the paragraph does not have a label
19876  and, at present, is always 
19877 \begin_inset Flex Code
19878 status collapsed
19879
19880 \begin_layout Plain Layout
19881 span
19882 \end_layout
19883
19884 \end_inset
19885
19886 .
19887  The inner tag is optional and, by default, does not appear.
19888 \end_layout
19889
19890 \begin_layout Standard
19891 The specific tags and attributes output for each inset can be controlled
19892  by means of the following layout tags.
19893 \end_layout
19894
19895 \begin_layout Description
19896 \begin_inset Flex Code
19897 status collapsed
19898
19899 \begin_layout Plain Layout
19900 HTMLAttr
19901 \end_layout
19902
19903 \end_inset
19904
19905  [
19906 \begin_inset Flex Code
19907 status collapsed
19908
19909 \begin_layout Plain Layout
19910 string
19911 \end_layout
19912
19913 \end_inset
19914
19915 ] Specifies attribute information to be output with the main tag.
19916  For example, 
19917 \begin_inset Quotes eld
19918 \end_inset
19919
19920
19921 \begin_inset Flex Code
19922 status collapsed
19923
19924 \begin_layout Plain Layout
19925 class=`myinset' onclick=`\SpecialChar \ldots{}
19926 '
19927 \end_layout
19928
19929 \end_inset
19930
19931
19932 \begin_inset Quotes erd
19933 \end_inset
19934
19935 .
19936  By default, LyX will output 
19937 \begin_inset Quotes eld
19938 \end_inset
19939
19940
19941 \begin_inset Flex Code
19942 status collapsed
19943
19944 \begin_layout Plain Layout
19945 class=`insetname'
19946 \end_layout
19947
19948 \end_inset
19949
19950
19951 \begin_inset Quotes erd
19952 \end_inset
19953
19954 , where 
19955 \begin_inset Flex Code
19956 status collapsed
19957
19958 \begin_layout Plain Layout
19959 insetname
19960 \end_layout
19961
19962 \end_inset
19963
19964  is the LyX name of the inset, made lowercase and with non-alphanumeric
19965  characters converted to underscores, for example: footnote.
19966 \end_layout
19967
19968 \begin_layout Description
19969 \begin_inset Flex Code
19970 status collapsed
19971
19972 \begin_layout Plain Layout
19973 HTMLForceCSS
19974 \end_layout
19975
19976 \end_inset
19977
19978  [
19979 \begin_inset Flex Code
19980 status collapsed
19981
19982 \begin_layout Plain Layout
19983
19984 \emph on
19985 0
19986 \emph default
19987 ,1
19988 \end_layout
19989
19990 \end_inset
19991
19992 ] Whether to output the default CSS information LyX generates for this layout,
19993  even if additional information is explicitly provided via 
19994 \begin_inset Flex Code
19995 status collapsed
19996
19997 \begin_layout Plain Layout
19998 HTMLStyle
19999 \end_layout
20000
20001 \end_inset
20002
20003 .
20004  Setting this to 
20005 \begin_inset Flex Code
20006 status collapsed
20007
20008 \begin_layout Plain Layout
20009 1
20010 \end_layout
20011
20012 \end_inset
20013
20014  allows you to alter or augment the generated CSS, rather than to override
20015  it completely.
20016  Default is 0.
20017 \end_layout
20018
20019 \begin_layout Description
20020 \begin_inset Flex Code
20021 status collapsed
20022
20023 \begin_layout Plain Layout
20024 HTMLInnerAttr
20025 \end_layout
20026
20027 \end_inset
20028
20029  [
20030 \begin_inset Flex Code
20031 status collapsed
20032
20033 \begin_layout Plain Layout
20034 string
20035 \end_layout
20036
20037 \end_inset
20038
20039 ] Attributes for the inner tag.
20040  Defaults to 
20041 \begin_inset Quotes eld
20042 \end_inset
20043
20044
20045 \begin_inset Flex Code
20046 status collapsed
20047
20048 \begin_layout Plain Layout
20049 class=`insetname_inner'
20050 \end_layout
20051
20052 \end_inset
20053
20054
20055 \begin_inset Quotes erd
20056 \end_inset
20057
20058 .
20059 \end_layout
20060
20061 \begin_layout Description
20062 \begin_inset Flex Code
20063 status collapsed
20064
20065 \begin_layout Plain Layout
20066 HTMLInnerTag
20067 \end_layout
20068
20069 \end_inset
20070
20071  [
20072 \begin_inset Flex Code
20073 status collapsed
20074
20075 \begin_layout Plain Layout
20076 string
20077 \end_layout
20078
20079 \end_inset
20080
20081 ] The inner tag, replacing 
20082 \begin_inset Flex Code
20083 status collapsed
20084
20085 \begin_layout Plain Layout
20086 innertag
20087 \end_layout
20088
20089 \end_inset
20090
20091  in the examples above.
20092  By default, there is none.
20093 \end_layout
20094
20095 \begin_layout Description
20096 \begin_inset Flex Code
20097 status collapsed
20098
20099 \begin_layout Plain Layout
20100 HTMLIsBlock
20101 \end_layout
20102
20103 \end_inset
20104
20105  [
20106 \begin_inset Flex Code
20107 status collapsed
20108
20109 \begin_layout Plain Layout
20110 0,
20111 \emph on
20112 1
20113 \end_layout
20114
20115 \end_inset
20116
20117 ] Whether this inset represents a standalone block of text (such as a footnote)
20118  or instead represents material that is included in the surrounding text
20119  (such as a branch).
20120  Defaults to 1.
20121 \end_layout
20122
20123 \begin_layout Description
20124 \begin_inset Flex Code
20125 status collapsed
20126
20127 \begin_layout Plain Layout
20128 HTMLLabel
20129 \end_layout
20130
20131 \end_inset
20132
20133  [
20134 \begin_inset Flex Code
20135 status collapsed
20136
20137 \begin_layout Plain Layout
20138 string
20139 \end_layout
20140
20141 \end_inset
20142
20143 ] A label for this inset, possibly including a reference to a counter.
20144  For example, for footnote, it might be: 
20145 \begin_inset Flex Code
20146 status collapsed
20147
20148 \begin_layout Plain Layout
20149
20150 \backslash
20151 arabic{footnote}
20152 \end_layout
20153
20154 \end_inset
20155
20156 .
20157  This is optional, and there is no default.
20158 \end_layout
20159
20160 \begin_layout Description
20161 \begin_inset Flex Code
20162 status collapsed
20163
20164 \begin_layout Plain Layout
20165 HTMLPreamble
20166 \end_layout
20167
20168 \end_inset
20169
20170  Information to be output in the 
20171 \begin_inset Flex Code
20172 status collapsed
20173
20174 \begin_layout Plain Layout
20175 <head>
20176 \end_layout
20177
20178 \end_inset
20179
20180  section when this style is used.
20181  This might, for example, be used to include a 
20182 \begin_inset Flex Code
20183 status collapsed
20184
20185 \begin_layout Plain Layout
20186 <script>
20187 \end_layout
20188
20189 \end_inset
20190
20191  block defining an 
20192 \begin_inset Flex Code
20193 status collapsed
20194
20195 \begin_layout Plain Layout
20196 onclick
20197 \end_layout
20198
20199 \end_inset
20200
20201  handler.
20202 \end_layout
20203
20204 \begin_layout Description
20205 \begin_inset Flex Code
20206 status collapsed
20207
20208 \begin_layout Plain Layout
20209 HTMLStyle
20210 \end_layout
20211
20212 \end_inset
20213
20214  CSS style information to be included when this style is used.
20215  Note that this will automatically be wrapped in a layout-generated 
20216 \begin_inset Flex Code
20217 status collapsed
20218
20219 \begin_layout Plain Layout
20220 <style>
20221 \end_layout
20222
20223 \end_inset
20224
20225  block, so only the CSS itself need be included.
20226 \end_layout
20227
20228 \begin_layout Description
20229 \begin_inset Flex Code
20230 status collapsed
20231
20232 \begin_layout Plain Layout
20233 HTMLTag
20234 \end_layout
20235
20236 \end_inset
20237
20238  [
20239 \begin_inset Flex Code
20240 status collapsed
20241
20242 \begin_layout Plain Layout
20243 string
20244 \end_layout
20245
20246 \end_inset
20247
20248 ] The tag to be used for the main label, replacing 
20249 \begin_inset Flex Code
20250 status collapsed
20251
20252 \begin_layout Plain Layout
20253 tag
20254 \end_layout
20255
20256 \end_inset
20257
20258  in the examples above.
20259  The default depends upon the setting of 
20260 \begin_inset Flex Code
20261 status collapsed
20262
20263 \begin_layout Plain Layout
20264 MultiPar
20265 \end_layout
20266
20267 \end_inset
20268
20269 : If 
20270 \begin_inset Flex Code
20271 status collapsed
20272
20273 \begin_layout Plain Layout
20274 MultiPar
20275 \end_layout
20276
20277 \end_inset
20278
20279  is true, the default is 
20280 \begin_inset Flex Code
20281 status collapsed
20282
20283 \begin_layout Plain Layout
20284 div
20285 \end_layout
20286
20287 \end_inset
20288
20289 ; if it is false, the default is 
20290 \begin_inset Flex Code
20291 status collapsed
20292
20293 \begin_layout Plain Layout
20294 span
20295 \end_layout
20296
20297 \end_inset
20298
20299 .
20300 \end_layout
20301
20302 \begin_layout Subsection
20303 Float XHTML
20304 \end_layout
20305
20306 \begin_layout Standard
20307 The XHTML output for floats too can be controlled by layout information.
20308  The output has the following form:
20309 \end_layout
20310
20311 \begin_layout LyX-Code
20312 <tag attr=
20313 \begin_inset Quotes erd
20314 \end_inset
20315
20316 value
20317 \begin_inset Quotes erd
20318 \end_inset
20319
20320 >
20321 \end_layout
20322
20323 \begin_layout LyX-Code
20324 Contents of the float.
20325 \end_layout
20326
20327 \begin_layout LyX-Code
20328 </tag>
20329 \end_layout
20330
20331 \begin_layout Standard
20332 The caption, if there is one, is a separate inset and will be output as
20333  such.
20334  Its appearance can be controlled via the InsetLayout for caption insets.
20335  
20336 \end_layout
20337
20338 \begin_layout Description
20339 \begin_inset Flex Code
20340 status collapsed
20341
20342 \begin_layout Plain Layout
20343 HTMLAttr
20344 \end_layout
20345
20346 \end_inset
20347
20348  [
20349 \begin_inset Flex Code
20350 status collapsed
20351
20352 \begin_layout Plain Layout
20353 string
20354 \end_layout
20355
20356 \end_inset
20357
20358 ] Specifies attribute information to be output with the main tag.
20359  For example, 
20360 \begin_inset Quotes eld
20361 \end_inset
20362
20363
20364 \begin_inset Flex Code
20365 status collapsed
20366
20367 \begin_layout Plain Layout
20368 class=`myfloat' onclick=`\SpecialChar \ldots{}
20369 '
20370 \end_layout
20371
20372 \end_inset
20373
20374
20375 \begin_inset Quotes erd
20376 \end_inset
20377
20378 .
20379  By default, LyX will output 
20380 \begin_inset Quotes eld
20381 \end_inset
20382
20383
20384 \begin_inset Flex Code
20385 status collapsed
20386
20387 \begin_layout Plain Layout
20388 class=`float float-floattype'
20389 \end_layout
20390
20391 \end_inset
20392
20393
20394 \begin_inset Quotes erd
20395 \end_inset
20396
20397 , where 
20398 \begin_inset Flex Code
20399 status collapsed
20400
20401 \begin_layout Plain Layout
20402 floattype
20403 \end_layout
20404
20405 \end_inset
20406
20407  is LyX's name for this type of float, as determined by the float declaration
20408  (see 
20409 \begin_inset CommandInset ref
20410 LatexCommand ref
20411 reference "sub:Floats"
20412
20413 \end_inset
20414
20415 ), though made lowercase and with non-alphanumeric characters converted
20416  to underscores, for example: float-table.
20417 \end_layout
20418
20419 \begin_layout Description
20420 \begin_inset Flex Code
20421 status collapsed
20422
20423 \begin_layout Plain Layout
20424 HTMLStyle
20425 \end_layout
20426
20427 \end_inset
20428
20429  CSS style information to be included when this float is used.
20430  Note that this will automatically be wrapped in a layout-generated 
20431 \begin_inset Flex Code
20432 status collapsed
20433
20434 \begin_layout Plain Layout
20435 <style>
20436 \end_layout
20437
20438 \end_inset
20439
20440  block, so only the CSS itself need be included.
20441 \end_layout
20442
20443 \begin_layout Description
20444 \begin_inset Flex Code
20445 status collapsed
20446
20447 \begin_layout Plain Layout
20448 HTMLTag
20449 \end_layout
20450
20451 \end_inset
20452
20453  [
20454 \begin_inset Flex Code
20455 status collapsed
20456
20457 \begin_layout Plain Layout
20458 string
20459 \end_layout
20460
20461 \end_inset
20462
20463 ] The tag to be used for this float, replacing 
20464 \begin_inset Quotes eld
20465 \end_inset
20466
20467
20468 \begin_inset Flex Code
20469 status collapsed
20470
20471 \begin_layout Plain Layout
20472 tag
20473 \end_layout
20474
20475 \end_inset
20476
20477
20478 \begin_inset Quotes erd
20479 \end_inset
20480
20481  in the example above.
20482  The default is 
20483 \begin_inset Flex Code
20484 status collapsed
20485
20486 \begin_layout Plain Layout
20487 div
20488 \end_layout
20489
20490 \end_inset
20491
20492  and will rarely need changing.
20493 \end_layout
20494
20495 \begin_layout Subsection
20496 Bibliography formatting
20497 \end_layout
20498
20499 \begin_layout Standard
20500 The bibliography can be formatted using 
20501 \begin_inset Flex Code
20502 status collapsed
20503
20504 \begin_layout Plain Layout
20505 CiteFormat
20506 \end_layout
20507
20508 \end_inset
20509
20510  blocks.
20511  See Section 
20512 \begin_inset CommandInset ref
20513 LatexCommand ref
20514 reference "sub:Citation-format-description"
20515
20516 \end_inset
20517
20518  for the details.
20519 \end_layout
20520
20521 \begin_layout Subsection
20522 LyX-generated CSS
20523 \end_layout
20524
20525 \begin_layout Standard
20526 We have several times mentioned that LyX will generate default CSS style
20527  rules for both insets and paragraph styles, based upon the other layout
20528  information that is provided.
20529  In this section, we shall say a word about which layout information LyX
20530  uses and how.
20531 \end_layout
20532
20533 \begin_layout Standard
20534 At present, LyX auto-generates CSS only for font information, making use
20535  of the 
20536 \begin_inset Flex Code
20537 status collapsed
20538
20539 \begin_layout Plain Layout
20540 Family
20541 \end_layout
20542
20543 \end_inset
20544
20545
20546 \begin_inset Flex Code
20547 status collapsed
20548
20549 \begin_layout Plain Layout
20550 Series
20551 \end_layout
20552
20553 \end_inset
20554
20555
20556 \begin_inset Flex Code
20557 status collapsed
20558
20559 \begin_layout Plain Layout
20560 Shape
20561 \end_layout
20562
20563 \end_inset
20564
20565 , and 
20566 \begin_inset Flex Code
20567 status collapsed
20568
20569 \begin_layout Plain Layout
20570 Size
20571 \end_layout
20572
20573 \end_inset
20574
20575  specified in the 
20576 \begin_inset Flex Code
20577 status collapsed
20578
20579 \begin_layout Plain Layout
20580 Font
20581 \end_layout
20582
20583 \end_inset
20584
20585  declaration.
20586  (See 
20587 \begin_inset CommandInset ref
20588 LatexCommand ref
20589 reference "sub:Font-description"
20590
20591 \end_inset
20592
20593 .) The translation is mostly straightforward and obvious.
20594  For example, 
20595 \begin_inset Quotes eld
20596 \end_inset
20597
20598
20599 \begin_inset Flex Code
20600 status collapsed
20601
20602 \begin_layout Plain Layout
20603 Family Sans
20604 \end_layout
20605
20606 \end_inset
20607
20608
20609 \begin_inset Quotes erd
20610 \end_inset
20611
20612  becomes 
20613 \begin_inset Quotes eld
20614 \end_inset
20615
20616
20617 \begin_inset Flex Code
20618 status collapsed
20619
20620 \begin_layout Plain Layout
20621 font-family: sans-serif;
20622 \end_layout
20623
20624 \end_inset
20625
20626
20627 \begin_inset Quotes erd
20628 \end_inset
20629
20630 .
20631  The correspondence of LyX sizes and CSS sizes is a little less obvious
20632  but nonetheless intuitive.
20633  See the 
20634 \begin_inset Flex Code
20635 status collapsed
20636
20637 \begin_layout Plain Layout
20638 getSizeCSS()
20639 \end_layout
20640
20641 \end_inset
20642
20643  function in 
20644 \begin_inset Flex URL
20645 status collapsed
20646
20647 \begin_layout Plain Layout
20648
20649 src/FontInfo.cpp
20650 \end_layout
20651
20652 \end_inset
20653
20654  for the details.
20655 \end_layout
20656
20657 \begin_layout Chapter
20658 Including External Material
20659 \end_layout
20660
20661 \begin_layout Standard
20662 \begin_inset Box Shadowbox
20663 position "t"
20664 hor_pos "c"
20665 has_inner_box 1
20666 inner_pos "t"
20667 use_parbox 0
20668 use_makebox 0
20669 width "100col%"
20670 special "none"
20671 height "1in"
20672 height_special "totalheight"
20673 status open
20674
20675 \begin_layout Plain Layout
20676 WARNING: This portion of the documentation has not been updated for some
20677  time.
20678  We certainly hope that it is still accurate, but there are no guarantees.
20679 \end_layout
20680
20681 \end_inset
20682
20683
20684 \end_layout
20685
20686 \begin_layout Standard
20687 The use of material from sources external to LyX is covered in detail in
20688  the 
20689 \emph on
20690 Embedded Objects
20691 \emph default
20692  manual.
20693  This part of the manual covers what needs to happen behind the scenes for
20694  new sorts of material to be included.
20695 \end_layout
20696
20697 \begin_layout Section
20698 How does it work?
20699 \end_layout
20700
20701 \begin_layout Standard
20702 The external material feature is based on the concept of a 
20703 \emph on
20704 template
20705 \emph default
20706 .
20707  A template is a specification of how LyX should interface with a certain
20708  kind of material.
20709  As bundled, LyX comes with predefined templates for Xfig figures, various
20710  raster format images, chess diagrams, and LilyPond music notation.
20711  You can check the actual list by using the menu 
20712 \begin_inset Flex MenuItem
20713 status collapsed
20714
20715 \begin_layout Plain Layout
20716 Insert\SpecialChar \menuseparator
20717 File\SpecialChar \menuseparator
20718 External Material
20719 \end_layout
20720
20721 \end_inset
20722
20723 .
20724  Furthermore, it is possible to roll your own template to support a specific
20725  kind of material.
20726  Later we'll describe in more detail what is involved, and hopefully you
20727  will submit all the templates you create so we can include them in a later
20728  LyX version.
20729 \end_layout
20730
20731 \begin_layout Standard
20732 Another basic idea of the external material feature is to distinguish between
20733  the original file that serves as a base for final material and the produced
20734  file that is included in your exported or printed document.
20735  For example, consider the case of a figure produced with 
20736 \begin_inset Flex Code
20737 status collapsed
20738
20739 \begin_layout Plain Layout
20740 Xfig
20741 \end_layout
20742
20743 \end_inset
20744
20745 .
20746  The Xfig application itself works on an original file with the 
20747 \begin_inset Flex Code
20748 status collapsed
20749
20750 \begin_layout Plain Layout
20751 .fig
20752 \end_layout
20753
20754 \end_inset
20755
20756  extension.
20757  Within Xfig, you create and change your figure, and when you are done,
20758  you save the 
20759 \begin_inset Flex Code
20760 status collapsed
20761
20762 \begin_layout Plain Layout
20763 fig
20764 \end_layout
20765
20766 \end_inset
20767
20768 -file.
20769  When you want to include the figure in your document, you invoke 
20770 \begin_inset Flex Code
20771 status collapsed
20772
20773 \begin_layout Plain Layout
20774 transfig
20775 \end_layout
20776
20777 \end_inset
20778
20779  in order to create a PostScript file that can readily be included in your
20780  LaTeX file.
20781  In this case, the 
20782 \begin_inset Flex Code
20783 status collapsed
20784
20785 \begin_layout Plain Layout
20786 .fig
20787 \end_layout
20788
20789 \end_inset
20790
20791  file is the original file, and the PostScript file is the produced file.
20792 \end_layout
20793
20794 \begin_layout Standard
20795 This distinction is important in order to allow updating of the material
20796  while you are in the process of writing the document.
20797  Furthermore, it provides us with the flexibility that is needed to support
20798  multiple export formats.
20799  For instance, in the case of a plain text file, it is not exactly an award-winn
20800 ing idea to include the figure as raw PostScript.
20801  Instead, you would either prefer to just include a reference to the figure
20802  or try to invoke some graphics to ASCII converter to make the final result
20803  look similar to the real graphics.
20804  The external material management allows you to do this, because it is parametri
20805 zed on the different export formats that LyX supports.
20806 \end_layout
20807
20808 \begin_layout Standard
20809 Besides supporting the production of different products according to the
20810  exported format, it supports tight integration with editing and viewing
20811  applications.
20812  In the case of an Xfig figure, you are able to invoke Xfig on the original
20813  file with a single click from within the external material dialog in LyX,
20814  and also preview the produced PostScript file with Ghostview with another
20815  click.
20816  No more fiddling around with the command line and/or file browsers to locate
20817  and manipulate the original or produced files.
20818  In this way, you are finally able to take full advantage of the many different
20819  applications that are relevant to use when you write your documents, and
20820  ultimately be more productive.
20821 \end_layout
20822
20823 \begin_layout Section
20824 The external template configuration file
20825 \end_layout
20826
20827 \begin_layout Standard
20828 It is relatively easy to add custom external template definitions to LyX.
20829  However, be aware that doing this in an careless manner most probably 
20830 \emph on
20831 will
20832 \emph default
20833  introduce an easily exploitable security hole.
20834  So before you do this, please read the discussion about security in section
20835  
20836 \begin_inset CommandInset ref
20837 LatexCommand ref
20838 reference "sec:Security-discussion"
20839
20840 \end_inset
20841
20842 .
20843 \end_layout
20844
20845 \begin_layout Standard
20846 Having said that, we encourage you to submit any interesting templates that
20847  you create.
20848  
20849 \end_layout
20850
20851 \begin_layout Standard
20852 The external templates are defined in the 
20853 \begin_inset Flex Code
20854 status collapsed
20855
20856 \begin_layout Plain Layout
20857 LyXDir/lib/external_templates
20858 \end_layout
20859
20860 \end_inset
20861
20862  file.
20863  You can place your own version in 
20864 \begin_inset Flex Code
20865 status collapsed
20866
20867 \begin_layout Plain Layout
20868 UserDir/external_templates
20869 \end_layout
20870
20871 \end_inset
20872
20873 .
20874 \end_layout
20875
20876 \begin_layout Standard
20877 A typical template looks like this:
20878 \end_layout
20879
20880 \begin_layout LyX-Code
20881 Template XFig
20882 \end_layout
20883
20884 \begin_layout LyX-Code
20885 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
20886 \end_layout
20887
20888 \begin_layout LyX-Code
20889 HelpText
20890 \end_layout
20891
20892 \begin_layout LyX-Code
20893 An XFig figure.
20894 \end_layout
20895
20896 \begin_layout LyX-Code
20897 HelpTextEnd
20898 \end_layout
20899
20900 \begin_layout LyX-Code
20901 InputFormat fig
20902 \end_layout
20903
20904 \begin_layout LyX-Code
20905 FileFilter "*.fig"
20906 \end_layout
20907
20908 \begin_layout LyX-Code
20909 AutomaticProduction true
20910 \end_layout
20911
20912 \begin_layout LyX-Code
20913 Transform Rotate
20914 \end_layout
20915
20916 \begin_layout LyX-Code
20917 Transform Resize
20918 \end_layout
20919
20920 \begin_layout LyX-Code
20921 Format LaTeX
20922 \end_layout
20923
20924 \begin_layout LyX-Code
20925 TransformCommand Rotate RotationLatexCommand
20926 \end_layout
20927
20928 \begin_layout LyX-Code
20929 TransformCommand Resize ResizeLatexCommand
20930 \end_layout
20931
20932 \begin_layout LyX-Code
20933 Product "$$RotateFront$$ResizeFront
20934 \end_layout
20935
20936 \begin_layout LyX-Code
20937          
20938 \backslash
20939
20940 \backslash
20941 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
20942 \end_layout
20943
20944 \begin_layout LyX-Code
20945          $$ResizeBack$$RotateBack"
20946 \end_layout
20947
20948 \begin_layout LyX-Code
20949 UpdateFormat pstex
20950 \end_layout
20951
20952 \begin_layout LyX-Code
20953 UpdateResult "$$AbsPath$$Basename.pstex_t"
20954 \end_layout
20955
20956 \begin_layout LyX-Code
20957 Requirement "graphicx"
20958 \end_layout
20959
20960 \begin_layout LyX-Code
20961 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
20962 \end_layout
20963
20964 \begin_layout LyX-Code
20965 ReferencedFile latex "$$AbsPath$$Basename.eps"
20966 \end_layout
20967
20968 \begin_layout LyX-Code
20969 ReferencedFile dvi "$$AbsPath$$Basename.eps"
20970 \end_layout
20971
20972 \begin_layout LyX-Code
20973 FormatEnd
20974 \end_layout
20975
20976 \begin_layout LyX-Code
20977 Format PDFLaTeX
20978 \end_layout
20979
20980 \begin_layout LyX-Code
20981 TransformCommand Rotate RotationLatexCommand
20982 \end_layout
20983
20984 \begin_layout LyX-Code
20985 TransformCommand Resize ResizeLatexCommand
20986 \end_layout
20987
20988 \begin_layout LyX-Code
20989 Product "$$RotateFront$$ResizeFront
20990 \end_layout
20991
20992 \begin_layout LyX-Code
20993          
20994 \backslash
20995
20996 \backslash
20997 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
20998 \end_layout
20999
21000 \begin_layout LyX-Code
21001          $$ResizeBack$$RotateBack"
21002 \end_layout
21003
21004 \begin_layout LyX-Code
21005 UpdateFormat pdftex
21006 \end_layout
21007
21008 \begin_layout LyX-Code
21009 UpdateResult "$$AbsPath$$Basename.pdftex_t"
21010 \end_layout
21011
21012 \begin_layout LyX-Code
21013 Requirement "graphicx"
21014 \end_layout
21015
21016 \begin_layout LyX-Code
21017 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
21018 \end_layout
21019
21020 \begin_layout LyX-Code
21021 ReferencedFile latex "$$AbsPath$$Basename.pdf"
21022 \end_layout
21023
21024 \begin_layout LyX-Code
21025 FormatEnd
21026 \end_layout
21027
21028 \begin_layout LyX-Code
21029 Format Ascii
21030 \end_layout
21031
21032 \begin_layout LyX-Code
21033 Product "$$Contents(
21034 \backslash
21035 "$$AbsPath$$Basename.asc
21036 \backslash
21037 ")"
21038 \end_layout
21039
21040 \begin_layout LyX-Code
21041 UpdateFormat asciixfig
21042 \end_layout
21043
21044 \begin_layout LyX-Code
21045 UpdateResult "$$AbsPath$$Basename.asc"
21046 \end_layout
21047
21048 \begin_layout LyX-Code
21049 FormatEnd
21050 \end_layout
21051
21052 \begin_layout LyX-Code
21053 Format DocBook
21054 \end_layout
21055
21056 \begin_layout LyX-Code
21057 Product "<graphic fileref=
21058 \backslash
21059 "$$AbsOrRelPathMaster$$Basename.eps
21060 \backslash
21061 ">
21062 \end_layout
21063
21064 \begin_layout LyX-Code
21065          </graphic>"
21066 \end_layout
21067
21068 \begin_layout LyX-Code
21069 UpdateFormat eps
21070 \end_layout
21071
21072 \begin_layout LyX-Code
21073 UpdateResult "$$AbsPath$$Basename.eps"
21074 \end_layout
21075
21076 \begin_layout LyX-Code
21077 ReferencedFile docbook "$$AbsPath$$Basename.eps"
21078 \end_layout
21079
21080 \begin_layout LyX-Code
21081 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
21082 \end_layout
21083
21084 \begin_layout LyX-Code
21085 FormatEnd
21086 \end_layout
21087
21088 \begin_layout LyX-Code
21089 Product "[XFig: $$FName]"
21090 \end_layout
21091
21092 \begin_layout LyX-Code
21093 FormatEnd
21094 \end_layout
21095
21096 \begin_layout LyX-Code
21097 TemplateEnd
21098 \end_layout
21099
21100 \begin_layout Standard
21101 As you can see, the template is enclosed in 
21102 \begin_inset Flex Code
21103 status collapsed
21104
21105 \begin_layout Plain Layout
21106 Template
21107 \end_layout
21108
21109 \end_inset
21110
21111  \SpecialChar \ldots{}
21112  
21113 \begin_inset Flex Code
21114 status collapsed
21115
21116 \begin_layout Plain Layout
21117 TemplateEnd
21118 \end_layout
21119
21120 \end_inset
21121
21122 .
21123  It contains a header specifying some general settings and, for each supported
21124  primary document file format, a section 
21125 \begin_inset Flex Code
21126 status collapsed
21127
21128 \begin_layout Plain Layout
21129 Format
21130 \end_layout
21131
21132 \end_inset
21133
21134  \SpecialChar \ldots{}
21135  
21136 \begin_inset Flex Code
21137 status collapsed
21138
21139 \begin_layout Plain Layout
21140 FormatEnd
21141 \end_layout
21142
21143 \end_inset
21144
21145 .
21146 \end_layout
21147
21148 \begin_layout Subsection
21149 The template header
21150 \end_layout
21151
21152 \begin_layout Description
21153 \begin_inset Flex Code
21154 status collapsed
21155
21156 \begin_layout Plain Layout
21157 AutomaticProduction
21158 \begin_inset space ~
21159 \end_inset
21160
21161 true|false
21162 \end_layout
21163
21164 \end_inset
21165
21166  Whether the file represented by the template must be generated by LyX.
21167  This command must occur exactly once.
21168 \end_layout
21169
21170 \begin_layout Description
21171 \begin_inset Flex Code
21172 status collapsed
21173
21174 \begin_layout Plain Layout
21175 FileFilter
21176 \begin_inset space ~
21177 \end_inset
21178
21179 <pattern>
21180 \end_layout
21181
21182 \end_inset
21183
21184  A glob pattern that is used in the file dialog to filter out the desired
21185  files.
21186  If there is more than one possible file extension (e.
21187 \begin_inset space \thinspace{}
21188 \end_inset
21189
21190 g.
21191 \begin_inset space \space{}
21192 \end_inset
21193
21194 tgif has 
21195 \begin_inset Flex Code
21196 status collapsed
21197
21198 \begin_layout Plain Layout
21199 .obj
21200 \end_layout
21201
21202 \end_inset
21203
21204  and 
21205 \begin_inset Flex Code
21206 status collapsed
21207
21208 \begin_layout Plain Layout
21209 .tgo
21210 \end_layout
21211
21212 \end_inset
21213
21214 ), use something like 
21215 \begin_inset Flex Code
21216 status collapsed
21217
21218 \begin_layout Plain Layout
21219 "*.{obj,tgo}"
21220 \end_layout
21221
21222 \end_inset
21223
21224 .
21225  This command must occur exactly once.
21226 \end_layout
21227
21228 \begin_layout Description
21229 \begin_inset Flex Code
21230 status collapsed
21231
21232 \begin_layout Plain Layout
21233 GuiName
21234 \begin_inset space ~
21235 \end_inset
21236
21237 <guiname>
21238 \end_layout
21239
21240 \end_inset
21241
21242  The text that is displayed on the button.
21243  This command must occur exactly once.
21244 \end_layout
21245
21246 \begin_layout Description
21247 \begin_inset Flex Code
21248 status collapsed
21249
21250 \begin_layout Plain Layout
21251 HelpText
21252 \begin_inset space ~
21253 \end_inset
21254
21255 <text>
21256 \begin_inset space ~
21257 \end_inset
21258
21259 HelpTextEnd
21260 \end_layout
21261
21262 \end_inset
21263
21264  The help text that is used in the External dialog.
21265  Provide enough information to explain to the user just what the template
21266  can provide him with.
21267  This command must occur exactly once.
21268 \end_layout
21269
21270 \begin_layout Description
21271 \begin_inset Flex Code
21272 status collapsed
21273
21274 \begin_layout Plain Layout
21275 InputFormat
21276 \begin_inset space ~
21277 \end_inset
21278
21279 <format>
21280 \end_layout
21281
21282 \end_inset
21283
21284  The file format of the original file.
21285  This must be the name of a format that is known to LyX (see section
21286 \begin_inset space ~
21287 \end_inset
21288
21289
21290 \begin_inset CommandInset ref
21291 LatexCommand ref
21292 reference "sec:Formats"
21293
21294 \end_inset
21295
21296 ).
21297  Use 
21298 \begin_inset Quotes eld
21299 \end_inset
21300
21301
21302 \begin_inset Flex Code
21303 status collapsed
21304
21305 \begin_layout Plain Layout
21306 *
21307 \end_layout
21308
21309 \end_inset
21310
21311
21312 \begin_inset Quotes erd
21313 \end_inset
21314
21315  if the template can handle original files of more than one format.
21316  LyX will attempt to interrogate the file itself in order to deduce its
21317  format in this case.
21318  This command must occur exactly once.
21319 \end_layout
21320
21321 \begin_layout Description
21322 \begin_inset Flex Code
21323 status collapsed
21324
21325 \begin_layout Plain Layout
21326 Template
21327 \begin_inset space ~
21328 \end_inset
21329
21330 <id>
21331 \end_layout
21332
21333 \end_inset
21334
21335  A unique name for the template.
21336  It must not contain substitution macros (see below).
21337 \end_layout
21338
21339 \begin_layout Description
21340 \begin_inset Flex Code
21341 status collapsed
21342
21343 \begin_layout Plain Layout
21344 Transform
21345 \begin_inset space ~
21346 \end_inset
21347
21348 Rotate|Resize|Clip|Extra
21349 \end_layout
21350
21351 \end_inset
21352
21353  This command specifies which transformations are supported by this template.
21354  It may occur zero or more times.
21355  This command enables the corresponding tabs in the external dialog.
21356  Each 
21357 \begin_inset Flex Code
21358 status collapsed
21359
21360 \begin_layout Plain Layout
21361 Transform
21362 \end_layout
21363
21364 \end_inset
21365
21366  command must have either a corresponding 
21367 \begin_inset Flex Code
21368 status collapsed
21369
21370 \begin_layout Plain Layout
21371 TransformCommand
21372 \end_layout
21373
21374 \end_inset
21375
21376  or a 
21377 \begin_inset Flex Code
21378 status collapsed
21379
21380 \begin_layout Plain Layout
21381 TransformOption
21382 \end_layout
21383
21384 \end_inset
21385
21386  command in the 
21387 \begin_inset Flex Code
21388 status collapsed
21389
21390 \begin_layout Plain Layout
21391 Format
21392 \end_layout
21393
21394 \end_inset
21395
21396  section.
21397  Otherwise the transformation will not be supported by that format.
21398 \end_layout
21399
21400 \begin_layout Subsection
21401 The Format section
21402 \end_layout
21403
21404 \begin_layout Description
21405 \begin_inset Flex Code
21406 status collapsed
21407
21408 \begin_layout Plain Layout
21409 Format
21410 \begin_inset space ~
21411 \end_inset
21412
21413 LaTeX|PDFLaTeX|PlainText|DocBook
21414 \end_layout
21415
21416 \end_inset
21417
21418  The primary document file format that this format definition is for.
21419  Not every template has a sensible representation in all document file formats.
21420  Please define nevertheless a 
21421 \begin_inset Flex Code
21422 status collapsed
21423
21424 \begin_layout Plain Layout
21425 Format
21426 \end_layout
21427
21428 \end_inset
21429
21430  section for all templates.
21431  Use a dummy text when no representation is available.
21432  Then you can at least see a reference to the external material in the exported
21433  document.
21434 \end_layout
21435
21436 \begin_layout Description
21437 \begin_inset Flex Code
21438 status collapsed
21439
21440 \begin_layout Plain Layout
21441 Option
21442 \begin_inset space ~
21443 \end_inset
21444
21445 <name>
21446 \begin_inset space ~
21447 \end_inset
21448
21449 <value>
21450 \end_layout
21451
21452 \end_inset
21453
21454  This command defines an additional macro 
21455 \begin_inset Flex Code
21456 status collapsed
21457
21458 \begin_layout Plain Layout
21459 $$<name>
21460 \end_layout
21461
21462 \end_inset
21463
21464  for substitution in 
21465 \begin_inset Flex Code
21466 status collapsed
21467
21468 \begin_layout Plain Layout
21469 Product
21470 \end_layout
21471
21472 \end_inset
21473
21474 .
21475  
21476 \begin_inset Flex Code
21477 status collapsed
21478
21479 \begin_layout Plain Layout
21480 <value>
21481 \end_layout
21482
21483 \end_inset
21484
21485  itself may contain substitution macros.
21486  The advantage over using 
21487 \begin_inset Flex Code
21488 status collapsed
21489
21490 \begin_layout Plain Layout
21491 <value>
21492 \end_layout
21493
21494 \end_inset
21495
21496  directly in 
21497 \begin_inset Flex Code
21498 status collapsed
21499
21500 \begin_layout Plain Layout
21501 Product
21502 \end_layout
21503
21504 \end_inset
21505
21506  is that the substituted value of 
21507 \begin_inset Flex Code
21508 status collapsed
21509
21510 \begin_layout Plain Layout
21511 $$<name>
21512 \end_layout
21513
21514 \end_inset
21515
21516  is sanitized so that it is a valid optional argument in the document format.
21517  This command may occur zero or more times.
21518 \end_layout
21519
21520 \begin_layout Description
21521 \begin_inset Flex Code
21522 status collapsed
21523
21524 \begin_layout Plain Layout
21525 Product
21526 \begin_inset space ~
21527 \end_inset
21528
21529 <text>
21530 \end_layout
21531
21532 \end_inset
21533
21534  The text that is inserted in the exported document.
21535  This is actually the most important command and can be quite complex.
21536  This command must occur exactly once.
21537 \end_layout
21538
21539 \begin_layout Description
21540 \begin_inset Flex Code
21541 status collapsed
21542
21543 \begin_layout Plain Layout
21544 Preamble
21545 \begin_inset space ~
21546 \end_inset
21547
21548 <name>
21549 \end_layout
21550
21551 \end_inset
21552
21553  This command specifies a preamble snippet that will be included in the
21554  LaTeX preamble.
21555  It has to be defined using 
21556 \begin_inset Flex Code
21557 status collapsed
21558
21559 \begin_layout Plain Layout
21560 PreambleDef
21561 \end_layout
21562
21563 \end_inset
21564
21565  \SpecialChar \ldots{}
21566  
21567 \begin_inset Flex Code
21568 status collapsed
21569
21570 \begin_layout Plain Layout
21571 PreambleDefEnd
21572 \end_layout
21573
21574 \end_inset
21575
21576 .
21577  This command may occur zero or more times.
21578 \end_layout
21579
21580 \begin_layout Description
21581 \begin_inset Flex Code
21582 status collapsed
21583
21584 \begin_layout Plain Layout
21585 ReferencedFile
21586 \begin_inset space ~
21587 \end_inset
21588
21589 <format>
21590 \begin_inset space ~
21591 \end_inset
21592
21593 <filename>
21594 \end_layout
21595
21596 \end_inset
21597
21598  This command denotes files that are created by the conversion process and
21599  are needed for a particular export format.
21600  If the filename is relative, it is interpreted relative to the master document.
21601  This command may be given zero or more times.
21602 \end_layout
21603
21604 \begin_layout Description
21605 \begin_inset Flex Code
21606 status collapsed
21607
21608 \begin_layout Plain Layout
21609 Requirement
21610 \begin_inset space ~
21611 \end_inset
21612
21613 <package>
21614 \end_layout
21615
21616 \end_inset
21617
21618  The name of a required LaTeX package.
21619  The package is included via 
21620 \begin_inset Flex Code
21621 status collapsed
21622
21623 \begin_layout Plain Layout
21624
21625 \backslash
21626 usepackage{}
21627 \end_layout
21628
21629 \end_inset
21630
21631  in the LaTeX preamble.
21632  This command may occur zero or more times.
21633 \end_layout
21634
21635 \begin_layout Description
21636 \begin_inset Flex Code
21637 status collapsed
21638
21639 \begin_layout Plain Layout
21640 TransformCommand
21641 \begin_inset space ~
21642 \end_inset
21643
21644 Rotate
21645 \begin_inset space ~
21646 \end_inset
21647
21648 RotationLatexCommand
21649 \end_layout
21650
21651 \end_inset
21652
21653  This command specifies that the built in LaTeX command should be used for
21654  rotation.
21655  This command may occur once or not at all.
21656 \end_layout
21657
21658 \begin_layout Description
21659 \begin_inset Flex Code
21660 status collapsed
21661
21662 \begin_layout Plain Layout
21663 TransformCommand
21664 \begin_inset space ~
21665 \end_inset
21666
21667 Resize
21668 \begin_inset space ~
21669 \end_inset
21670
21671 ResizeLatexCommand
21672 \end_layout
21673
21674 \end_inset
21675
21676  This command specifies that the built in LaTeX command should be used for
21677  resizing.
21678  This command may occur once or not at all.
21679 \end_layout
21680
21681 \begin_layout Description
21682 \begin_inset Flex Code
21683 status collapsed
21684
21685 \begin_layout Plain Layout
21686 TransformOption
21687 \begin_inset space ~
21688 \end_inset
21689
21690 Rotate
21691 \begin_inset space ~
21692 \end_inset
21693
21694 RotationLatexOption
21695 \end_layout
21696
21697 \end_inset
21698
21699  This command specifies that rotation is done via an optional argument.
21700  This command may occur once or not at all.
21701 \end_layout
21702
21703 \begin_layout Description
21704 \begin_inset Flex Code
21705 status collapsed
21706
21707 \begin_layout Plain Layout
21708 TransformOption
21709 \begin_inset space ~
21710 \end_inset
21711
21712 Resize
21713 \begin_inset space ~
21714 \end_inset
21715
21716 ResizeLatexOption
21717 \end_layout
21718
21719 \end_inset
21720
21721  This command specifies that resizing is done via an optional argument.
21722  This command may occur once or not at all.
21723 \end_layout
21724
21725 \begin_layout Description
21726 \begin_inset Flex Code
21727 status collapsed
21728
21729 \begin_layout Plain Layout
21730 TransformOption
21731 \begin_inset space ~
21732 \end_inset
21733
21734 Clip
21735 \begin_inset space ~
21736 \end_inset
21737
21738 ClipLatexOption
21739 \end_layout
21740
21741 \end_inset
21742
21743  This command specifies that clipping is done via an optional argument.
21744  This command may occur once or not at all.
21745 \end_layout
21746
21747 \begin_layout Description
21748 \begin_inset Flex Code
21749 status collapsed
21750
21751 \begin_layout Plain Layout
21752 TransformOption
21753 \begin_inset space ~
21754 \end_inset
21755
21756 Extra
21757 \begin_inset space ~
21758 \end_inset
21759
21760 ExtraLatexOption
21761 \end_layout
21762
21763 \end_inset
21764
21765  This command specifies that an extra optional argument is used.
21766  This command may occur once or not at all.
21767 \end_layout
21768
21769 \begin_layout Description
21770 \begin_inset Flex Code
21771 status collapsed
21772
21773 \begin_layout Plain Layout
21774 UpdateFormat
21775 \begin_inset space ~
21776 \end_inset
21777
21778 <format>
21779 \end_layout
21780
21781 \end_inset
21782
21783  The file format of the converted file.
21784  This must be the name of a format that is known to LyX (see the 
21785 \begin_inset Flex MenuItem
21786 status collapsed
21787
21788 \begin_layout Plain Layout
21789
21790 \bar under
21791 T
21792 \bar default
21793 ools\SpecialChar \menuseparator
21794
21795 \bar under
21796 P
21797 \bar default
21798 references\SpecialChar \menuseparator
21799 File Handling\SpecialChar \menuseparator
21800 File Format
21801 \end_layout
21802
21803 \end_inset
21804
21805  dialog).
21806  This command must occur exactly once.
21807 \end_layout
21808
21809 \begin_layout Description
21810 \begin_inset Flex Code
21811 status collapsed
21812
21813 \begin_layout Plain Layout
21814 UpdateResult
21815 \begin_inset space ~
21816 \end_inset
21817
21818 <filename>
21819 \end_layout
21820
21821 \end_inset
21822
21823  The file name of the converted file.
21824  The file name must be absolute.
21825  This command must occur exactly once.
21826 \end_layout
21827
21828 \begin_layout Subsection
21829 Preamble definitions
21830 \end_layout
21831
21832 \begin_layout Standard
21833 The external template configuration file may contain additional preamble
21834  definitions enclosed by 
21835 \begin_inset Flex Code
21836 status collapsed
21837
21838 \begin_layout Plain Layout
21839 PreambleDef
21840 \end_layout
21841
21842 \end_inset
21843
21844  \SpecialChar \ldots{}
21845  
21846 \begin_inset Flex Code
21847 status collapsed
21848
21849 \begin_layout Plain Layout
21850 PreambleDefEnd
21851 \end_layout
21852
21853 \end_inset
21854
21855 .
21856  They can be used by the templates in the 
21857 \begin_inset Flex Code
21858 status collapsed
21859
21860 \begin_layout Plain Layout
21861 Format
21862 \end_layout
21863
21864 \end_inset
21865
21866  section.
21867 \end_layout
21868
21869 \begin_layout Section
21870 The substitution mechanism
21871 \end_layout
21872
21873 \begin_layout Standard
21874 When the external material facility invokes an external program, it is done
21875  on the basis of a command defined in the template configuration file.
21876  These commands can contain various macros that are expanded before execution.
21877  Execution always take place in the directory of the containing document.
21878 \end_layout
21879
21880 \begin_layout Standard
21881 Also, whenever external material is to be displayed, the name will be produced
21882  by the substitution mechanism, and most other commands in the template
21883  definition support substitution as well.
21884 \end_layout
21885
21886 \begin_layout Standard
21887 The available macros are the following:
21888 \end_layout
21889
21890 \begin_layout Description
21891 \begin_inset Flex Code
21892 status collapsed
21893
21894 \begin_layout Plain Layout
21895 $$AbsOrRelPathMaster
21896 \end_layout
21897
21898 \end_inset
21899
21900  The file path, absolute or relative to the master LyX document.
21901 \end_layout
21902
21903 \begin_layout Description
21904 \begin_inset Flex Code
21905 status collapsed
21906
21907 \begin_layout Plain Layout
21908 $$AbsOrRelPathParent
21909 \end_layout
21910
21911 \end_inset
21912
21913  The file path, absolute or relative to the LyX document.
21914 \end_layout
21915
21916 \begin_layout Description
21917 \begin_inset Flex Code
21918 status collapsed
21919
21920 \begin_layout Plain Layout
21921 $$AbsPath
21922 \end_layout
21923
21924 \end_inset
21925
21926  The absolute file path.
21927 \end_layout
21928
21929 \begin_layout Description
21930 \begin_inset Flex Code
21931 status collapsed
21932
21933 \begin_layout Plain Layout
21934 $$Basename
21935 \end_layout
21936
21937 \end_inset
21938
21939  The filename without path and without the extension.
21940 \end_layout
21941
21942 \begin_layout Description
21943 \begin_inset Flex Code
21944 status collapsed
21945
21946 \begin_layout Plain Layout
21947 $$Contents(
21948 \begin_inset Quotes eld
21949 \end_inset
21950
21951 filename.ext
21952 \begin_inset Quotes erd
21953 \end_inset
21954
21955 )
21956 \end_layout
21957
21958 \end_inset
21959
21960  This macro will expand to the contents of the file with the name 
21961 \begin_inset Flex Code
21962 status collapsed
21963
21964 \begin_layout Plain Layout
21965 filename.ext
21966 \end_layout
21967
21968 \end_inset
21969
21970 .
21971 \end_layout
21972
21973 \begin_layout Description
21974 \begin_inset Flex Code
21975 status collapsed
21976
21977 \begin_layout Plain Layout
21978 $$Extension
21979 \end_layout
21980
21981 \end_inset
21982
21983  The file extension (including the dot).
21984 \end_layout
21985
21986 \begin_layout Description
21987 \begin_inset Flex Code
21988 status collapsed
21989
21990 \begin_layout Plain Layout
21991 $$FName
21992 \end_layout
21993
21994 \end_inset
21995
21996  The filename of the file specified in the external material dialog.
21997  This is either an absolute name, or it is relative to the LyX document.
21998 \end_layout
21999
22000 \begin_layout Description
22001 \begin_inset Flex Code
22002 status collapsed
22003
22004 \begin_layout Plain Layout
22005 $$FPath
22006 \end_layout
22007
22008 \end_inset
22009
22010  The path part of 
22011 \begin_inset Flex Code
22012 status collapsed
22013
22014 \begin_layout Plain Layout
22015 $$FName
22016 \end_layout
22017
22018 \end_inset
22019
22020  (absolute name or relative to the LyX document).
22021 \end_layout
22022
22023 \begin_layout Description
22024 \begin_inset Flex Code
22025 status collapsed
22026
22027 \begin_layout Plain Layout
22028 $$RelPathMaster
22029 \end_layout
22030
22031 \end_inset
22032
22033  The file path, relative to the master LyX document.
22034 \end_layout
22035
22036 \begin_layout Description
22037 \begin_inset Flex Code
22038 status collapsed
22039
22040 \begin_layout Plain Layout
22041 $$RelPathParent
22042 \end_layout
22043
22044 \end_inset
22045
22046  The file path, relative to the LyX document.
22047 \end_layout
22048
22049 \begin_layout Description
22050 \begin_inset Flex Code
22051 status collapsed
22052
22053 \begin_layout Plain Layout
22054 $$Sysdir
22055 \end_layout
22056
22057 \end_inset
22058
22059  This macro will expand to the absolute path of the system directory.
22060  This is typically used to point to the various helper scripts that are
22061  bundled with LyX.
22062 \end_layout
22063
22064 \begin_layout Description
22065 \begin_inset Flex Code
22066 status collapsed
22067
22068 \begin_layout Plain Layout
22069 $$Tempname
22070 \end_layout
22071
22072 \end_inset
22073
22074  A name and full path to a temporary file which will be automatically deleted
22075  whenever the containing document is closed, or the external material insertion
22076  deleted.
22077 \end_layout
22078
22079 \begin_layout Standard
22080 All path macros contain a trailing directory separator, so you can construct
22081  e.
22082 \begin_inset space \thinspace{}
22083 \end_inset
22084
22085 g.
22086 \begin_inset space \space{}
22087 \end_inset
22088
22089 the absolute filename with 
22090 \begin_inset Flex Code
22091 status collapsed
22092
22093 \begin_layout Plain Layout
22094 $$AbsPath$$Basename$$Extension
22095 \end_layout
22096
22097 \end_inset
22098
22099 .
22100 \end_layout
22101
22102 \begin_layout Standard
22103 The macros above are substituted in all commands unless otherwise noted.
22104  The command 
22105 \begin_inset Flex Code
22106 status collapsed
22107
22108 \begin_layout Plain Layout
22109 Product
22110 \end_layout
22111
22112 \end_inset
22113
22114  supports additionally the following substitutions if they are enabled by
22115  the 
22116 \begin_inset Flex Code
22117 status collapsed
22118
22119 \begin_layout Plain Layout
22120 Transform
22121 \end_layout
22122
22123 \end_inset
22124
22125  and 
22126 \begin_inset Flex Code
22127 status collapsed
22128
22129 \begin_layout Plain Layout
22130 TransformCommand
22131 \end_layout
22132
22133 \end_inset
22134
22135  commands:
22136 \end_layout
22137
22138 \begin_layout Description
22139 \begin_inset Flex Code
22140 status collapsed
22141
22142 \begin_layout Plain Layout
22143 $$ResizeFront
22144 \end_layout
22145
22146 \end_inset
22147
22148  The front part of the resize command.
22149 \end_layout
22150
22151 \begin_layout Description
22152 \begin_inset Flex Code
22153 status collapsed
22154
22155 \begin_layout Plain Layout
22156 $$ResizeBack
22157 \end_layout
22158
22159 \end_inset
22160
22161  The back part of the resize command.
22162 \end_layout
22163
22164 \begin_layout Description
22165 \begin_inset Flex Code
22166 status collapsed
22167
22168 \begin_layout Plain Layout
22169 $$RotateFront
22170 \end_layout
22171
22172 \end_inset
22173
22174  The front part of the rotation command.
22175 \end_layout
22176
22177 \begin_layout Description
22178 \begin_inset Flex Code
22179 status collapsed
22180
22181 \begin_layout Plain Layout
22182 $$RotateBack
22183 \end_layout
22184
22185 \end_inset
22186
22187  The back part of the rotation command.
22188 \end_layout
22189
22190 \begin_layout Standard
22191 The value string of the 
22192 \begin_inset Flex Code
22193 status collapsed
22194
22195 \begin_layout Plain Layout
22196 Option
22197 \end_layout
22198
22199 \end_inset
22200
22201  command supports additionally the following substitutions if they are enabled
22202  by the 
22203 \begin_inset Flex Code
22204 status collapsed
22205
22206 \begin_layout Plain Layout
22207 Transform
22208 \end_layout
22209
22210 \end_inset
22211
22212  and 
22213 \begin_inset Flex Code
22214 status collapsed
22215
22216 \begin_layout Plain Layout
22217 TransformOption
22218 \end_layout
22219
22220 \end_inset
22221
22222  commands:
22223 \end_layout
22224
22225 \begin_layout Description
22226 \begin_inset Flex Code
22227 status collapsed
22228
22229 \begin_layout Plain Layout
22230 $$Clip
22231 \end_layout
22232
22233 \end_inset
22234
22235  The clip option.
22236 \end_layout
22237
22238 \begin_layout Description
22239 \begin_inset Flex Code
22240 status collapsed
22241
22242 \begin_layout Plain Layout
22243 $$Extra
22244 \end_layout
22245
22246 \end_inset
22247
22248  The extra option.
22249 \end_layout
22250
22251 \begin_layout Description
22252 \begin_inset Flex Code
22253 status collapsed
22254
22255 \begin_layout Plain Layout
22256 $$Resize
22257 \end_layout
22258
22259 \end_inset
22260
22261  The resize option.
22262 \end_layout
22263
22264 \begin_layout Description
22265 \begin_inset Flex Code
22266 status collapsed
22267
22268 \begin_layout Plain Layout
22269 $$Rotate
22270 \end_layout
22271
22272 \end_inset
22273
22274  The rotation option.
22275 \end_layout
22276
22277 \begin_layout Standard
22278 You may ask why there are so many path macros.
22279  There are mainly two reasons:
22280 \end_layout
22281
22282 \begin_layout Enumerate
22283 Relative and absolute file names should remain relative or absolute, respectivel
22284 y.
22285  Users may have reasons to prefer either form.
22286  Relative names are useful for portable documents that should work on different
22287  machines, for example.
22288  Absolute names may be required by some programs.
22289 \end_layout
22290
22291 \begin_layout Enumerate
22292 LaTeX treats relative file names differently than LyX and other programs
22293  in nested included files.
22294  For LyX, a relative file name is always relative to the document that contains
22295  the file name.
22296  For LaTeX, it is always relative to the master document.
22297  These two definitions are identical if you have only one document, but
22298  differ if you have a master document that includes part documents.
22299  That means that relative filenames must be transformed when presented to
22300  LaTeX.
22301  Fortunately LyX does this automatically for you if you choose the right
22302  macros.
22303 \end_layout
22304
22305 \begin_layout Standard
22306 So which path macro should be used in new template definitions? The rule
22307  is not difficult:
22308 \end_layout
22309
22310 \begin_layout Itemize
22311 Use 
22312 \begin_inset Flex Code
22313 status collapsed
22314
22315 \begin_layout Plain Layout
22316 $$AbsPath
22317 \end_layout
22318
22319 \end_inset
22320
22321  if an absolute path is required.
22322 \end_layout
22323
22324 \begin_layout Itemize
22325 Use 
22326 \begin_inset Flex Code
22327 status collapsed
22328
22329 \begin_layout Plain Layout
22330 $$AbsOrRelPathMaster
22331 \end_layout
22332
22333 \end_inset
22334
22335  if the substituted string is some kind of LaTeX input.
22336 \end_layout
22337
22338 \begin_layout Itemize
22339 Else use 
22340 \begin_inset Flex Code
22341 status collapsed
22342
22343 \begin_layout Plain Layout
22344 $$AbsOrRelPathParent
22345 \end_layout
22346
22347 \end_inset
22348
22349  in order to preserve the user's choice.
22350 \end_layout
22351
22352 \begin_layout Standard
22353 There are special cases where this rule does not work and e.
22354 \begin_inset space \thinspace{}
22355 \end_inset
22356
22357 g.
22358 \begin_inset space \space{}
22359 \end_inset
22360
22361 relative names are needed, but normally it will work just fine.
22362  One example for such a case is the command 
22363 \begin_inset Flex Code
22364 status collapsed
22365
22366 \begin_layout Plain Layout
22367 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22368 \end_layout
22369
22370 \end_inset
22371
22372  in the XFig template above: We can't use the absolute name because the
22373  copier for 
22374 \begin_inset Flex Code
22375 status collapsed
22376
22377 \begin_layout Plain Layout
22378 .pstex_t
22379 \end_layout
22380
22381 \end_inset
22382
22383  files needs the relative name in order to rewrite the file content.
22384 \end_layout
22385
22386 \begin_layout Section
22387 Security discussion
22388 \begin_inset CommandInset label
22389 LatexCommand label
22390 name "sec:Security-discussion"
22391
22392 \end_inset
22393
22394
22395 \end_layout
22396
22397 \begin_layout Standard
22398 The external material feature interfaces with a lot of external programs
22399  and does so automatically, so we have to consider the security implications
22400  of this.
22401  In particular, since you have the option of including your own filenames
22402  and/or parameter strings and those are expanded into a command, it seems
22403  that it would be possible to create a malicious document which executes
22404  arbitrary commands when a user views or prints the document.
22405  This is something we definitely want to avoid.
22406 \end_layout
22407
22408 \begin_layout Standard
22409 However, since the external program commands are specified in the template
22410  configuration file only, there are no security issues if LyX is properly
22411  configured with safe templates only.
22412  This is so because the external programs are invoked with the 
22413 \begin_inset Flex Code
22414 status collapsed
22415
22416 \begin_layout Plain Layout
22417 execvp
22418 \end_layout
22419
22420 \end_inset
22421
22422 -system call rather than the 
22423 \begin_inset Flex Code
22424 status collapsed
22425
22426 \begin_layout Plain Layout
22427 system
22428 \end_layout
22429
22430 \end_inset
22431
22432  system-call, so it's not possible to execute arbitrary commands from the
22433  filename or parameter section via the shell.
22434 \end_layout
22435
22436 \begin_layout Standard
22437 This also implies that you are restricted in what command strings you can
22438  use in the external material templates.
22439  In particular, pipes and redirection are not readily available.
22440  This has to be so if LyX should remain safe.
22441  If you want to use some of the shell features, you should write a safe
22442  script to do this in a controlled manner, and then invoke the script from
22443  the command string.
22444  
22445 \end_layout
22446
22447 \begin_layout Standard
22448 It is possible to design a template that interacts directly with the shell,
22449  but since this would allow a malicious user to execute arbitrary commands
22450  by writing clever filenames and/or parameters, we generally recommend that
22451  you only use safe scripts that work with the 
22452 \begin_inset Flex Code
22453 status collapsed
22454
22455 \begin_layout Plain Layout
22456 execvp
22457 \end_layout
22458
22459 \end_inset
22460
22461  system call in a controlled manner.
22462  Of course, for use in a controlled environment, it can be tempting to just
22463  fall back to use ordinary shell scripts.
22464  If you do so, be aware that you 
22465 \emph on
22466 will
22467 \emph default
22468  provide an easily exploitable security hole in your system.
22469  Of course it stands to reason that such unsafe templates will never be
22470  included in the standard LyX distribution, although we do encourage people
22471  to submit new templates in the open source tradition.
22472  But LyX as shipped from the official distribution channels will never have
22473  unsafe templates.
22474 \end_layout
22475
22476 \begin_layout Standard
22477 Including external material provides a lot of power, and you have to be
22478  careful not to introduce security hazards with this power.
22479  A subtle error in a single line in an innocent looking script can open
22480  the door to huge security problems.
22481  So if you do not fully understand the issues, we recommend that you consult
22482  a knowledgeable security professional or the LyX development team if you
22483  have any questions about whether a given template is safe or not.
22484  And do this before you use it in an uncontrolled environment.
22485 \end_layout
22486
22487 \end_body
22488 \end_document