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