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