1 #LyX 1.6.0svn created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 % This preamble is designed to ensure that the User's Guide prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the User's Guide 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
16 \usepackage{ifpdf} % part of the hyperref bundle
17 \ifpdf % if pdflatex is used
19 % set fonts for nicer pdf view
20 \IfFileExists{lmodern.sty}{\usepackage{lmodern}}{%
21 \usepackage[scaled=0.92]{helvet}
23 \usepackage{courier} }
25 % link all cross references and URLs in pdf output
26 \usepackage[colorlinks=true, bookmarks, bookmarksnumbered,
27 linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,
28 pdfpagelayout=OneColumn, pdfnewwindow=true,
29 pdfstartview=XYZ, plainpages=false, pdfpagelabels,
30 pdfauthor={LyX Team}, pdftex,
31 pdftitle={Customizing LyX: Features for the Advanced User},pdfsubject={LyX-documentation Customization},
32 pdfkeywords={LyX, documentation}
35 \else % if dvi or ps is produced
37 % link all cross references and URLs in dvi output
38 \usepackage[ps2pdf]{hyperref}
40 \fi % end if pdflatex is used
42 % the pages of the TOC are numbered roman
43 % and a pdf-bookmark for the TOC is added
45 \let\myTOC\tableofcontents
46 \renewcommand\tableofcontents{%
47 \pdfbookmark[1]{Contents}{}
50 \pagenumbering{arabic} }
52 % redefine the \LyX macro for PDF bookmarks
53 \def\LyX{\texorpdfstring{%
54 L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
57 % used for multi-column text
64 \inputencoding default
67 \font_typewriter default
68 \font_default_family default
74 \paperfontsize default
83 \paperorientation portrait
86 \paragraph_separation indent
88 \quotes_language english
91 \paperpagestyle headings
92 \tracking_changes false
101 Customizing LyX: Features for the Advanced User
109 \begin_layout Standard
111 Principal maintainer of this file is
116 If you have comments or error corrections, please send them to the LyX
117 Documentation mailing list, <lyx-docs@lists.lyx.org>.
125 \begin_layout Standard
126 \begin_inset CommandInset toc
127 LatexCommand tableofcontents
134 \begin_layout Chapter
138 \begin_layout Standard
139 This manual covers the customization features present in LyX.
140 In it, we discuss issues like keyboard shortcuts, screen previewing options,
141 printer options, sending commands to LyX via the LyX Server, internationalizati
142 on, installing new LaTeX classes and LyX layouts, etc.
143 We can't possibly hope to touch on everything you can change---our developers
144 add new features faster than we can document them---but we will explain
145 the most common customizations and hopefully point you in the right direction
146 for some of the more obscure ones.
149 \begin_layout Chapter
150 LyX configuration files
153 \begin_layout Standard
154 \begin_inset CommandInset label
160 This chapter aims to help you to find your way through the LyX configuration
162 Before continuing to read this chapter, you should find out where your
163 LyX library directory is by using
168 elp\SpecialChar \menuseparator
176 This directory is the place where LyX places its system-wide configuration
177 files, and we will simply name it
181 in the remainder of this document.
185 \begin_layout Section
193 \begin_layout Standard
198 and its sub-directories contain a number of files and that can be used
199 to customise LyX's behaviour.
200 You can change many of these files from within LyX itself through the
205 ools\SpecialChar \menuseparator
213 Most customization that you might want to do to LyX is possible through
215 However, many other inner aspects of LyX can be customized by modifying
221 They fall in different categories, described in the following subsections.
224 \begin_layout Subsection
225 Automatically generated files
228 \begin_layout Standard
229 These files are generated when you configure LyX.
230 They contain various default values that are guessed by inspection.
231 In general, it is not a good idea to modify them, since they might be overwritt
236 \labelwidthstring 00.00.0000
243 contains defaults for various commands.
247 \labelwidthstring 00.00.0000
254 contains the list of packages that have been recognized by LyX.
255 It is currently unused by the LyX program itself, but the information extracted
256 , and more, is made available with
261 elp\SpecialChar \menuseparator
273 \labelwidthstring 00.00.0000
280 is the list of text classes that have been found in your
284 directory, along with the associated LaTeX document class and their description.
288 \labelwidthstring 00.00.0000
293 is automatically generated during configuration from the file
300 \begin_layout Subsection
305 \labelwidthstring 00.00.0000
312 this directory contains files with the extension
316 that define the keybindings used in LyX (see section\InsetSpace ~
318 \begin_inset CommandInset ref
320 reference "sec:bindings"
325 If there exists an internationalized version of the bind file named
329 , that will be used first.
330 See Chapter\InsetSpace ~
332 \begin_inset CommandInset ref
334 reference "chap:i18n"
339 \begin_inset CommandInset ref
341 reference "sec:bindings"
349 \labelwidthstring 00.00.0000
356 contains graphics files that can be included in documents.
361 \labelwidthstring 00.00.0000
368 contains LyX documentation files (including the one you are currently reading).
373 deserves special attention, as noted above.
374 If there exists an internationalized version of the help-document with
379 prepended to the name, that will be used first.
380 See Chapter\InsetSpace ~
382 \begin_inset CommandInset ref
384 reference "chap:i18n"
392 \labelwidthstring 00.00.0000
399 contains example files that explain how to use some features.
400 In the file browser, press the
408 \labelwidthstring 00.00.0000
413 contains image files that are used by the
418 In addition, it also contains the individual icons used in the toolbar
419 and the banners that can be shown when LyX is launched.
423 \labelwidthstring 00.00.0000
430 contains keyboard keymapping files.
431 See Chapter\InsetSpace ~
433 \begin_inset CommandInset ref
435 reference "sec:keymap"
443 \labelwidthstring 00.00.0000
450 contains the text class files described in Chapter\InsetSpace ~
452 \begin_inset CommandInset ref
454 reference "chap:textclass"
462 \labelwidthstring 00.00.0000
467 contains some files that demonstrate the capabilities of the
469 External\InsetSpace ~
476 \labelwidthstring 00.00.0000
481 contains the standard LyX template files described in Chapter\InsetSpace ~
483 \begin_inset CommandInset ref
485 reference "sec:templates"
493 \labelwidthstring 00.00.0000
498 contains some LaTeX cls files distributed with LyX.
502 \labelwidthstring 00.00.0000
507 contains files with the extension
511 that define the user interface to LyX.
512 That is, the files define which items appear in which menus and the items
513 appearing on the toolbar.
514 See Chapter\InsetSpace ~
516 \begin_inset CommandInset ref
525 \begin_layout Subsection
526 Files you don't want to modify
529 \begin_layout Standard
530 These files are used internally by LyX and you generally do not need to
531 modify them unless you are a developer.
535 \labelwidthstring 00.00.0000
542 this file contains the list of LyX developers.
543 The contents are displayed with the menu entry
548 elp\SpecialChar \menuseparator
556 \labelwidthstring 00.00.0000
563 this is a LaTeX script used during the configuration process.
568 \labelwidthstring 00.00.0000
575 this is the script that is used to re-configure LyX.
576 It creates configuration files in the directory it was run from.
579 \begin_layout Subsection
580 Other files needing a line or two...
584 \labelwidthstring 00.00.0000
589 this contains tables describing how different character encodings can be
594 \labelwidthstring 00.00.0000
599 this file contains the templates available to the new
601 External\InsetSpace ~
608 \labelwidthstring 00.00.0000
613 this file contains a list of all the languages currently supported by LyX.
616 \begin_layout Section
617 Your local configuration directory
620 \begin_layout Standard
621 Even if you are using LyX as an unprivileged user, you might want to change
622 LyX configuration for your own use.
627 directory contains all your personal configuration files.
628 This is the directory described as
629 \begin_inset Quotes eld
633 \begin_inset Quotes erd
641 elp\SpecialChar \menuseparator
646 This directory is used as a mirror of
650 , which means that every file in
654 is a replacement for the corresponding file in
659 Any configuration file described in the above sections can be placed either
660 in the system-wide directory, in which case it will affect all users, or
661 in your local directory for your own use.
664 \begin_layout Standard
665 To make things clearer, let's provide a few examples:
668 \begin_layout Itemize
669 The preferences set in the
674 ools\SpecialChar \menuseparator
681 dialog are saved to a file
692 \begin_layout Itemize
693 When you reconfigure using
698 ools\SpecialChar \menuseparator
709 and the resulting files are written in your local configuration directory
710 (see section\InsetSpace ~
712 \begin_inset CommandInset ref
714 reference "sec:autodetected"
718 to have a list of the
722 settings affected by this section).
723 This means that any additional text class file that you might have added
728 will be added to the list of classes in the
733 ayout\SpecialChar \menuseparator
743 \begin_layout Itemize
744 Similarly, if you have installed some LaTeX document classes in your home
745 directory, that LaTeX can find with your
749 path, they will show up in your list of text classes.
753 \begin_layout Standard
754 as long as LyX or yourself have a
758 file for it, of course.
766 \begin_layout Itemize
767 If you get some updated documentation from LyX ftp site and cannot install
768 it because you do not have sysadmin rights on your system, you can just
783 \begin_layout Section
784 Running LyX with multiple configurations
787 \begin_layout Standard
788 The configuration freedom of the local configuration directory may not suffice
789 if you want to have more than one configuration at your disposal.
790 For example, you may want to be use different key bindings or printer settings
792 You can achieve this by having several such directories.
793 You then specify which directory to use at run-time.
796 \begin_layout Standard
797 Invoking LyX with the command line switch
805 instructs the program to read the configuration from that directory, and
806 not from the default directory (you can determine the default directory
807 by running LyX without this switch as described above).
808 If this directory does not exist, LyX offers to create it for you, just
809 like it does for the default directory on the first time you run the program.
810 You can modify the configuration options in this additional
814 exactly as you would for the default directory.
815 These directories are completely independent (but read on).
816 Note that setting the environment variable
820 to some value has exactly the same effect
825 \begin_layout Standard
826 Having several configurations also requires more maintenance: if you want
827 to add a new layout to
831 which you want available from all your configurations, you must add it
832 to each directory separately.
833 You can avoid this with the following trick: after LyX creates the additional
834 directory, most of the subdirectories (see above) are empty.
835 If you want the new configuration to mirror an existing one, replace the
836 empty subdirectory with a symbolic link to the matching subdirectory in
837 the existing configuration.
844 subirectory, however, since it contains a file written by the configuration
845 script (also accessible through
850 ools\SpecialChar \menuseparator
856 \begin_inset CommandInset ref
858 reference "sec:autodetected"
864 which is configuration-specific.
867 \begin_layout Chapter
875 \begin_layout Section
876 Using the dialog for the first time
879 \begin_layout Standard
884 file will contain only changes that you have made to the default behaviour,
885 some of which is hard-coded into LyX and some of which is contained in
888 LyXDir/lyxrc.defaults
891 Note that in both files lines beginning with a
892 \begin_inset Quotes eld
900 \begin_inset Quotes erd
903 are just comments and not interpreted.
904 However, only system administrators should edit
914 ools\SpecialChar \menuseparator
921 dialog to create and modify their own
928 \begin_layout Standard
934 ools\SpecialChar \menuseparator
941 dialog will be largely self-explanatory.
942 Almost all the commands have an associated comment, so you shouldn't have
943 too much trouble modifying it to taste.
944 Before we highlight a few of the more important commands below, however,
949 ing some of your changes (e.g., screen fonts) will have an instant effect.
951 changing the bind file) will not.
952 If nothing appears to have changed, just
956 the changes and restart LyX.
959 \begin_layout Section
963 \begin_layout Standard
964 The font used to display your documents on the LyX screen is very important,
965 since you'll be reading all your documents with this font.
966 Therefore it is important that the font is as readable and good-looking
968 The LyX team tried to provide the best possible default font for you, but
969 since practically all X11 systems are different, it's likely that the default
970 fonts will be sub-optimal on your system.
971 Fortunately, you can do something about this.
972 Before we explain how to do this, you should learn a bit more about fonts
973 so that you are better prepared for choosing your fonts, because it is
974 a trade-off that is specific to your preferences and the capabilities of
978 \begin_layout Standard
979 Notice that this section only deals with the fonts on the
983 inside the LyX window.
984 The fonts that appear on the
992 are independent from these fonts, and are determined by the document class.
997 to learn how to change the font of the printed version of your document.
1000 \begin_layout Standard
1001 Basically, screen fonts come in two different kinds: scalable outline fonts
1002 and non-scalable bitmap fonts.
1003 This distinction seems a bit arbitrary, since non-scalable fonts are actually
1004 scalable in most modern font renderers.
1005 The difference lies in the
1009 of the scaling, and the
1014 The most important decision is thus whether you should use non-scalable
1015 bitmap fonts or scalable outline fonts.
1018 \begin_layout Standard
1019 The scalable fonts are built from
1023 of the single glyphs (i.e.
1024 characters) in the font.
1025 This means that each glyph is defined using mathematical curves that are
1026 well suited for scaling to any requested size.
1027 This mathematical definition is interpreted by the font renderer and turned
1028 into a small picture composed of pixels according to which size and glyph,
1029 the programmer requests.
1030 This means that scalable fonts will look pretty good in all sizes.
1031 Well, almost all sizes.
1032 Since scalable fonts are defined in an abstract way, it can be hard to
1033 provide a good rendering at small sizes, where each pixel has to be very
1034 carefully computed to provide a good image.
1035 Technically it is possible to do this from the mathematical definition,
1036 but in order to keep the rendering reasonably fast, tradeoffs have to be
1037 made, and the result is that scalable fonts can be difficult to read at
1041 \begin_layout Standard
1042 Bitmap fonts on the other hand, are defined by bitmap graphics from the
1043 start, so they will look good at all the sizes they are meant for.
1044 However, they don't scale well, because in order to scale a glyph, each
1045 pixel is enlarged into several pixels.
1046 It is the same effect that happens if you try to enlarge a picture in
1050 or any other picture manipulation program.
1051 In order to relieve this effect, bitmap fonts are typically provided in
1052 several fixed sizes typically from around 8 pixels high up to 34 pixels
1053 or so high in steps according to what is believed to be useful.
1054 The advantage of bitmap fonts is that no complicated computations are necessary
1055 to display each glyph, so bitmap fonts are thus faster displayed than scalable
1057 The disadvantage is that sizes that don't exists as fixed versions have
1058 to be scaled by doubling pixels, and thus look bad.
1061 \begin_layout Standard
1062 The net result of all this, is that bitmap fonts are generally best for
1063 the small sizes, where they are available, while scalable fonts are generally
1064 best for large sizes.
1065 The logical conclusion would thus be to use bitmap fonts for the small
1066 sizes, and scalable fonts for the large sizes.
1067 Unfortunately, this is not a good idea, since bitmap fonts and scalable
1068 fonts are not designed to be used together, so the overall look of such
1069 a scheme would be bad.
1070 The best you can do is thus to try both schemes and decide for yourself
1074 \begin_layout Standard
1075 By default, LyX uses non-scalable bitmap fonts (when using the XForms frontend).
1080 is used, for sans serif fonts,
1088 is used as the monospaced/typewriter font.
1091 \begin_layout Standard
1092 In the following, we will describe what to do if the text does not look
1094 We'll start with the most important parameters: DPI and font zoom.
1097 \begin_layout Subsection
1098 DPI setting and Font Zoom
1101 \begin_layout Standard
1102 LyX automatically tries to scale the fonts to look as close as the paper
1103 output size as possible, except for the so-called font zoom factor.
1106 \begin_layout Standard
1107 In order for this to work on all systems, it relies on the screen DPI (dots
1108 per inch) setting to be correct.
1109 The DPI setting for your system is autodetected by LyX using the information
1110 the X server can provide.
1111 You can check what LyX autodetects the DPI setting to, by running LyX as
1119 \begin_layout Standard
1120 On many systems, X is not set up correctly, so you should check that it
1123 \begin_inset Quotes eld
1131 \begin_inset Quotes erd
1134 and write down what the DPI is for the resolution you use (this will be
1135 close to the value LyX detects).
1136 It is the number mentioned as
1137 \begin_inset Quotes eld
1141 \begin_inset Quotes erd
1145 Also write down the number of pixels you have in the width (the first number
1147 \begin_inset Quotes eld
1151 \begin_inset Quotes erd
1157 \begin_layout Standard
1158 Then get the good old ruler out of the closet, and measure the width of
1159 the visible screen-image on your monitor.
1160 Convert this measurement to inches if you used a centimeter ruler by dividing
1162 Now you can determine the correct DPI setting for your screen by dividing
1163 the number of pixels in the width by the width of the screen-image on the
1165 If this number is more than, say, 5 DPI from the detected value, you should
1166 either fix the X setup, or at least tell LyX that the DPI is different
1167 than the detected value.
1170 \begin_layout Standard
1171 If you can't fix the X setup (which of course is best since other programs
1172 than LyX will benefit from this as well), you can tell LyX the correct
1180 \begin_layout Standard
1181 If the text is too small or too big for your taste, you should fiddle with
1182 the font zoom setting.
1183 This setting is used to scale the point size of the text.
1184 If your DPI setting is correct, and the font zoom setting is set to 100,
1185 this means that LyX will try to display the text exactly the same size
1186 as it will appear on the paper-output.
1187 If you set the zoom factor to 200, the text will try to be 2 times as big
1189 Of course, this will only happen if LyX can find a font that has the appropriat
1190 e size, which you can't count on.
1191 Since LyX is a WYSIWYM system anyways, this limitation isn't much of an
1195 \begin_layout Standard
1196 The default font zoom setting is 150, since a monitor is typically wider
1197 than a piece of paper, but you should try to fiddle with it through the
1211 dialog to find a size that you like.
1212 When you've found a setting that seems to work nicely for you (tip: use
1220 button to keep the dialog open while you experiment), you can make this
1221 setting the default by using the
1231 \begin_layout Standard
1232 While it is often possible to find a suitable size for the text on the screen,
1233 this doesn't necessarily mean that the fonts are the best ones available
1235 In order to help you get the most out of your system, you can use the font
1236 definition commands to fine-tune the look of the text in greater detail
1240 \begin_layout Subsection
1241 Font definition commands
1244 \begin_layout Standard
1245 As mentioned, LyX uses non-scalable bitmap fonts by default with the XForms
1251 is used, for sans serif fonts,
1259 is used as the monospaced/typewriter font.
1262 \begin_layout Standard
1263 You can change all of these from within the
1268 The number of fonts that are available on different systems vary, but the
1273 should be available everywhere.
1274 Use that program to find candidate fonts.
1275 When you've found a font that you like, try to insert the first two elements
1277 \begin_inset Quotes eld
1281 \begin_inset Quotes erd
1285 \begin_inset Quotes eld
1289 \begin_inset Quotes erd
1296 ) in the appropriate field in the
1308 LyX will then reformat your document using the new font, and if you like
1309 the font, you should
1317 One place to start for a new font is to see if the scalable font
1318 \begin_inset Quotes eld
1322 \begin_inset Quotes erd
1326 Tip: You can see whether a font is a bitmap font or a scalable font by
1328 \begin_inset Quotes eld
1332 \begin_inset Quotes erd
1336 \begin_inset Quotes eld
1340 \begin_inset Quotes erd
1348 If the value 0 is available, the font is scalable.
1349 If the value 0 isn't available, the font is a bitmap font.
1352 \begin_layout Standard
1353 Before you go about scrapping a bitmap font because the larger sizes look
1355 \begin_inset Quotes eld
1359 \begin_inset Quotes erd
1362 , you should toggle the
1363 \begin_inset Quotes eld
1367 \begin_inset Quotes erd
1371 This is only useful if you use bitmap fonts, because only these don't scale
1373 If you define this flag, LyX will only use the fixed font sizes that are
1374 available, and this guarantees that all bitmap fonts look well.
1375 (You can see which individual font sizes are available with the
1384 .) However, the prize is that the difference between the size of the fonts
1385 on screen and the size of fonts on paper will be larger because LyX will
1386 have to be satisfied with the closest available size, and not try to scale
1388 Also, you can risk that some logically different sizes, such as
1396 , will be mapped to the same screen font, making it hard for you to see
1397 the difference on screen.
1398 We've decided not to use scalable fonts by default because of these artifacts,
1399 but since LyX is a WYSIWYM system, many people like to use the flag anyways,
1400 well-knowing that the font size on the screen can't be trusted.
1401 But remember that this flag only makes a difference when you use bitmap
1403 Scalable fonts won't be affected for reasons you should understand by now.
1406 \begin_layout Standard
1407 One final note regarding this flag: you should know that there is nothing
1408 wrong with using bitmap and scalable fonts at the same time for different
1410 For instance, it's common to use the scalable
1411 \begin_inset Quotes eld
1415 \begin_inset Quotes erd
1418 for the serif text together with a bitmap version of
1419 \begin_inset Quotes eld
1423 \begin_inset Quotes erd
1427 And you can safely select the
1428 \begin_inset Quotes eld
1432 \begin_inset Quotes erd
1435 button without worries: It will only apply to the Helvetica font.
1438 \begin_layout Standard
1439 Sometimes the artifacts introduced by use of the flag can be relieved by
1440 using the fine-detail screen font sizes which defines which point sizes
1441 the different logical font sizes correspond to.
1446 to see exactly what concrete fonts the logical sizes map to, and try adjusting
1447 the corresponding entries in the
1451 dialog until you've managed to hit the nail and get the fonts you want.
1452 This can be hard to do, because LyX uses the DPI setting and the font zoom
1453 settings to calculate which exact screen font size to ask the X server
1454 for, thus obfuscating the mapping.
1455 If you can't make it by trial-and-error, you can make the process more
1456 transparent if you set both the DPI setting and font zoom settings to 100---eve
1457 n when this is known to be wrong.
1458 This will of course make your scalable fonts look weird, so use with care.
1461 \begin_layout Subsection
1465 \begin_layout Standard
1466 By default, LyX will use fonts meant to write Western European text, including
1467 all kinds of English.
1468 This is defined through the so-called
1477 If you want to use LyX to write for instance Eastern European text, Cyrillic
1478 or any other language not covered by the ISO-8859-1 font encoding, you
1479 can define a different one with the encoding setting.
1480 This requires you to have special fonts installed.
1485 to see whether this is the case: check the
1486 \begin_inset Quotes eld
1490 \begin_inset Quotes erd
1494 \begin_inset Quotes eld
1498 \begin_inset Quotes erd
1501 fields for ISO-8859-X values different from ISO-8859-1, and search for
1502 one that contains the national characters of your language.
1503 If you find any, enter this encoding in the dialog.
1504 If not, go searching the Web for appropriate fonts.
1505 For the Qt frontend, it's recommended you use an iso646 font set.
1508 \begin_layout Standard
1509 When you've set LyX up to use a different font encoding, you should also
1510 consider changing the font used by dialog windows in LyX.
1517 dialog will not be understandable unless you tell LyX to use a different
1519 By default the menu font is set to
1521 -*-helvetica-medium-r
1523 , but often Helvetica is not available in the font encoding you need, so
1524 the dialog allows this to be changed.
1527 \begin_layout Standard
1528 As you can see, there are quite a few options that can be used to fine tune
1529 the look of your fonts.
1530 This should not scare you from fiddling with the settings, because after
1531 all, you will hopefully be using LyX for many hours in the future.
1532 And contrary to real WYSIWYG word processors where you are tied to using
1533 fonts that have to look good both on paper and on screen, LyX gives you
1534 the possibility of using fonts that are designed to look good on the screen
1535 while using a different set of fonts to look good on paper.
1538 \begin_layout Section
1540 \begin_inset CommandInset label
1549 \begin_layout Standard
1550 Bindings are used to, well, bind a function to a key.
1551 Several prepackaged binding files are available: a CUA set of bindings
1552 (familiar as the typical set of PC and CDE set of keyboard shortcuts),
1553 an Emacs set of bindings, for those of us who follow the One True Way and
1554 refuse to lower our standards,
1558 \begin_layout Standard
1559 I'm kidding here, of course!
1564 as well as specialty bindings (broadway and hollywood) and other languages
1565 (French, German, etc.).
1568 \begin_layout Standard
1569 If, however, you'd like to customise the keybindings to your own exacting
1570 tastes, then copy the best-fit file in
1579 Don't forget to load this new file into LyX using the
1584 (For the moment you'll have to restart LyX for these changes to take effect.)
1587 \begin_layout Standard
1588 LyX supports internationalization of the user interface (see Chapter\InsetSpace ~
1590 \begin_inset CommandInset ref
1592 reference "chap:i18n"
1601 is set, with the environment variable
1605 , LyX will try to use bindfiles by prepending
1610 For example, you can put a translated copy of some standard bind file in
1615 directory, and LyX will use it automatically.
1618 \begin_layout Standard
1623 files is straightforward:
1626 \begin_layout Standard
1631 bind <key combination> <lyx-function>
1634 \begin_layout Standard
1635 Both key combination and lyx-function (including any arguments) must be
1636 enclosed in "double quotes".
1637 All the LyX functions are listed in the
1644 \begin_layout Section
1646 \begin_inset CommandInset label
1655 \begin_layout Standard
1656 The appearance of both the menu and toolbar may both be changed using the
1671 For the moment, only one file exists,
1675 , but feel free to experiment.
1676 Just copy the file to the
1680 directory and play! Note that, for the moment, you'll have to restart LyX
1681 for these changes to take effect.
1684 \begin_layout Standard
1689 files is straightforward: have a look at
1702 entries must be ended with an explicit
1727 s and in the case of the
1728 \begin_inset Quotes eld
1732 \begin_inset Quotes erd
1740 One small word of warning.
1745 s may be inserted in a
1753 , but they are defined as
1764 \begin_layout Section
1765 \begin_inset CommandInset label
1767 name "sec:converters-etc"
1771 Converters, Formats, and Copiers
1774 \begin_layout Standard
1775 LyX has a powerful mechanism to convert to and from any file format using
1780 \begin_layout Subsection
1784 \begin_layout Standard
1785 The first step is to define your file formats if they are not already defined.
1788 Tools\SpecialChar \menuseparator
1789 Preferences:Converters
1792 Enter a new format name; a new GUI name (used in e.\InsetSpace \thinspace{}
1802 menus); and a file extension.
1807 \begin_layout Standard
1812 option tells LyX that a format is suitable for document export.
1813 If this is is set and if a suitable conversion route exists, the format
1816 File\SpecialChar \menuseparator
1820 The format will also appear in the
1824 menu if it has a specified viewer.
1825 Pure image formats, e.\InsetSpace \thinspace{}
1831 , should not use this option.
1832 Formats that can both represent vector graphics and documents like e.\InsetSpace \thinspace{}
1841 \begin_layout Standard
1844 Vector graphics format
1846 tells LyX that a format can contain vector graphics.
1847 This information is used to determine the target format of included graphics
1853 Included graphics may need to be converted to either
1869 cannot handle other image formats.
1870 If an included graphic is not already in
1882 format, it is converted to
1886 if the vector format option is set, and otherwise to
1893 \begin_layout Standard
1894 A Format can have a Viewer and Editor program associated with it.
1895 For example, you might want to use
1899 to view PostScript files.
1900 You can enter the program call and its options to the corresponding fields.
1901 For the call you can use the four variable listed in the next section.
1902 The viewer is launched when you view an image in LyX or use the
1907 If the operating system has a default viewer associated to a format, this
1908 viewer is used instead of the one defined here when you enter in the Viewer
1910 \begin_inset Quotes eld
1918 \begin_inset Quotes erd
1922 The editor is for example launched when you press the
1937 \begin_layout Subsection
1941 \begin_layout Standard
1942 Each format can have a Copier associated with it.
1943 These are defined in the
1945 Tools\SpecialChar \menuseparator
1949 Since all conversions from one format to another take place in LyX's temporary
1950 directory, it is sometimes necessary to modify a file before copying it
1951 to the temporary directory in order that the conversion may be performed.
1955 \begin_layout Standard
1956 For example, the file may refer to other files---images, for example---using
1957 relative filenames, and these may become invalid when the file is copied
1958 to the temporary directory.
1963 This is done by the Copier: It copies a file to (or from) the temporary
1964 directory and may modify it in the process.
1967 \begin_layout Standard
1968 Copiers may also be used for other purposes.
1969 For example, if appropriate converters are found, LyX will automatically
1970 install copiers for the
1980 When these formats are exported, the copier sees that not just the main
1981 HTML file but various associated files (style files, images, etc.) are also
1983 All these files are written to a subdirectory of the directory in which
1984 the original LyX file was found.
1988 \begin_layout Standard
1989 This copier can be customized.
1991 \begin_inset Quotes eld
1995 \begin_inset Quotes erd
1998 argument takes a comma-separated list of extensions to be copied; if it
1999 is omitted, all files will be copied.
2001 \begin_inset Quotes eld
2005 \begin_inset Quotes erd
2008 argument determines the extension added to the generated directory.
2010 \begin_inset Quotes eld
2018 \begin_inset Quotes erd
2021 , so HTML generated from
2023 /path/to/filename.lyx
2027 /path/to/filename.html.LyXconv
2038 \begin_layout Standard
2039 The definitions of the copiers may use four variables:
2043 \labelwidthstring 00.00.0000
2044 $$s The LyX system directory (e.\InsetSpace \thinspace{}
2054 \labelwidthstring 00.00.0000
2059 \labelwidthstring 00.00.0000
2064 \labelwidthstring 00.00.0000
2065 $$l The `LaTeX name'
2068 \begin_layout Standard
2069 The latter is to be given in a form suitable for inclusion in a LaTeX's
2076 command and is relevant only when exporting files suitable for such inclusion.
2079 \begin_layout Standard
2080 Copiers can be used to do almost anything with output files.
2081 For example, suppose you want generated pdf files to be copied to a special
2083 \begin_inset Flex CharStyle:Code
2086 \begin_layout Standard
2093 Then you could write a shell script such as this one:
2096 \begin_layout Standard
2097 \begin_inset listings
2101 \begin_layout Standard
2105 \begin_layout Standard
2109 \begin_layout Standard
2110 TOFILE=`basename $2`
2113 \begin_layout Standard
2114 cp $FROMFILE /home/you/pdf/$TOFILE
2119 Save that in your local LyX directory---say,
2120 \begin_inset Flex CharStyle:Code
2123 \begin_layout Standard
2124 /home/you/.lyx/scripts/pdfcopier.sh
2129 ---and make it executable, if you need to do so on your platform.
2132 Tools\SpecialChar \menuseparator
2139 format---or one of the other pdf formats---and enter
2140 \begin_inset Flex CharStyle:Code
2143 \begin_layout Standard
2144 pdfcopier.sh $$i $$o
2157 \begin_layout Subsection
2161 \begin_layout Standard
2162 To define a new converter, select an existing one, select a different format
2168 and\InsetSpace \thinspace{}
2169 /\InsetSpace \thinspace{}
2175 drop-down list, modify the
2179 field, and press the
2186 \begin_layout Standard
2187 You do not have to define converters between all the formats between which
2188 you want to convert.
2189 For example, you will note that there is no `LyX to PostScript' converter,
2190 but LyX will export PostScript.
2191 It does so by first creating a LaTeX file (no converter needs to be defined
2192 for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2193 and finally converts the resulting DVI file to PostScript.
2194 LyX finds such `chains' of converters automatically, and it will always
2195 choose the shortest possible chain.
2196 You can, though, still define multiple conversion methods between file
2198 For example, the standard LyX configuration provides three ways to convert
2199 LaTeX to PDF: Directly, using
2203 ; via (DVI and) PostScript, using
2212 To define such alternate chains, you must define multiple target `file
2213 formats', as described in the next section.
2214 For example in the standard configuration the formats named
2226 are defined, all of which share the extension
2233 \begin_layout Standard
2234 Several variables can be used in the definition of converters:
2238 \labelwidthstring 00.00.0000
2239 $$s The LyX system directory
2243 \labelwidthstring 00.00.0000
2248 \labelwidthstring 00.00.0000
2253 \labelwidthstring 00.00.0000
2254 $$b The base filename of the input file
2258 \labelwidthstring 00.00.0000
2259 $$p The path to the input file
2262 \begin_layout Standard
2268 field you can enter the following flags, separated by commas:
2272 \labelwidthstring 00.00.0000
2273 latex This converter runs some form of LaTeX.
2274 This will make LyX's LaTeX error logs available.
2278 \labelwidthstring 00.00.0000
2279 needaux Needs the LaTeX
2283 file for the conversion.
2287 \labelwidthstring 00.00.0000
2291 \begin_layout Standard
2292 The following three flags are not really flags at all because they take
2303 \labelwidthstring 00.00.0000
2304 parselog If set, the converter's standard error will be redirected to a
2309 , and the script given as argument will be run as:
2311 script <infile.out >infile.log
2314 The argument may contain $$s.
2318 \labelwidthstring 00.00.0000
2319 resultdir The name of the directory in which the
2323 will dump the generated files.
2324 LyX will not create this directory, and it does not copy anything into
2325 it, though it will copy this directory to the destination.
2326 The argument may contain $$b, which will be replaced by the basename of
2327 the input and output files, respectively, when the directory is copied.
2330 that resultdir and usetempdir make no sense together.
2331 The latter will be ignored if the former is given.
2335 \labelwidthstring 00.00.0000
2336 resultfile Determines the output filename and may, contain $$b.
2337 Sensible only with resultdir, and optional even then; if not given, it
2338 defaults to `index'.
2341 \begin_layout Standard
2342 None of these last three are presently used in any of the converters that
2343 are installed with LyX.
2345 \begin_inset CommandInset ref
2347 reference "sub:LyX-and-Literate"
2351 of the Extended Features guide for some examples of how you might use parselog.
2354 \begin_layout Section
2355 BibTeX and makeindex
2358 \begin_layout Standard
2359 Both the bibliography generating command (default
2363 ) and the index generating command (default
2376 As an alternative for
2388 \begin_layout Standard
2389 The command to enter is
2395 makeindex.sh -m $$lang
2398 \begin_layout Standard
2399 where the placeholder
2403 will be replaced by the chosen document (babel) language.
2407 \begin_layout Standard
2408 have installed the packages
2425 at a shell prompt for a help page.
2428 \begin_layout Section
2429 Plain text export options
2432 \begin_layout Standard
2433 \begin_inset VSpace bigskip
2439 \begin_layout Standard
2441 There are a couple of commands that can be used to
2442 \begin_inset Quotes eld
2446 \begin_inset Quotes erd
2449 exported plain text files.
2450 Note that LyX automatically detects and uses the best settings for your
2451 system at installation time, but you can modify them if you disagree with
2455 \begin_layout Description
2459 Plain text\InsetSpace ~
2463 This option defines the command used to produce better plain text tables
2468 UNIX-commands (refer to their manpages for more information about them).
2469 Setting this as empty tells LyX to use the internal (inferior) formatter.
2472 \begin_layout Description
2476 Plain text\InsetSpace ~
2481 With this command you can set the default line length of the plain text
2483 Setting it to 0 means endless lines.
2486 \begin_layout Section
2490 \begin_layout Standard
2491 There are a bunch of configuration options that are used for interaction
2492 with the external print command from LyX.
2493 Normally the defaults are fine: if, however, your print command takes different
2494 option names, you can modify them here.
2497 \begin_layout Subsection
2501 \begin_layout Standard
2502 You can change the colors used by LyX on-screen using the new
2507 Alternatively, if you're feeling particularly perverse you could use the
2512 bindable function (see the
2517 Input would have the format:
2520 \begin_layout Standard
2523 set-color LyXName X11Color
2526 \begin_layout Standard
2527 Here is a (partial) list of the functions and default colors:
2530 \begin_layout Standard
2532 \begin_inset Tabular
2533 <lyxtabular version="3" rows="10" columns="3">
2535 <column alignment="left" valignment="top" leftline="true" width="0pt">
2536 <column alignment="left" valignment="top" leftline="true" width="0pt">
2537 <column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
2538 <row topline="true" bottomline="true">
2539 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2542 \begin_layout Standard
2557 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2560 \begin_layout Standard
2575 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2578 \begin_layout Standard
2594 <row topline="true">
2595 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2598 \begin_layout Standard
2613 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2616 \begin_layout Standard
2631 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2634 \begin_layout Standard
2650 <row topline="true">
2651 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2654 \begin_layout Standard
2669 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2672 \begin_layout Standard
2687 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2690 \begin_layout Standard
2706 <row topline="true">
2707 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2710 \begin_layout Standard
2725 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2728 \begin_layout Standard
2743 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2746 \begin_layout Standard
2762 <row topline="true">
2763 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2766 \begin_layout Standard
2781 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2784 \begin_layout Standard
2799 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2802 \begin_layout Standard
2818 <row topline="true">
2819 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2822 \begin_layout Standard
2837 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2840 \begin_layout Standard
2850 fraction Lines, brackets, etc.
2855 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2858 \begin_layout Standard
2874 <row topline="true">
2875 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2878 \begin_layout Standard
2893 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2896 \begin_layout Standard
2902 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2905 \begin_layout Standard
2921 <row topline="true">
2922 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2925 \begin_layout Standard
2940 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2943 \begin_layout Standard
2949 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2952 \begin_layout Standard
2968 <row topline="true">
2969 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2972 \begin_layout Standard
2987 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2990 \begin_layout Standard
2996 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2999 \begin_layout Standard
3015 <row topline="true" bottomline="true">
3016 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
3019 \begin_layout Standard
3034 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
3037 \begin_layout Standard
3047 selection background
3052 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3055 \begin_layout Standard
3078 \begin_layout Section
3079 The autodetected settings
3082 \begin_layout Standard
3083 \begin_inset CommandInset label
3085 name "sec:autodetected"
3089 There are several items that are detected for you when you run
3096 \SpecialChar \menuseparator
3102 In this section, we list those which pertain to the user preferences.
3105 \begin_layout Description
3111 plaintext_roff_command
3126 , depending on what is available.
3129 \begin_layout Description
3142 plus a bunch of options.
3145 \begin_layout Description
3158 on systems (so-called System V) who have this command, and
3162 otherwise (BSD systems).
3165 \begin_layout Description
3171 print_spool_printerprefix
3182 , depending on whether
3193 \begin_layout Description
3210 fonts are found and LaTeX has support for these fonts built-in.
3211 You can set it manually if you only have the so-called
3218 \begin_layout Section
3222 \begin_layout Standard
3223 There are many other configuration options that can be used to customize
3225 We still need to document them here, but again, most should be fairly obvious.
3226 Please ask on the mailing lists if you need some more information; it may
3227 even prompt us to expand this section.
3230 \begin_layout Chapter
3231 Internationalizing LyX
3232 \begin_inset CommandInset label
3241 \begin_layout Standard
3242 LyX supports using a translated interface.
3243 Last time we checked, LyX provided text in 14 languages together with the
3244 default English text.
3245 The language of choice is called your
3250 (For further reading on locale settings, see also the documentation for
3251 locale that comes with your operating system.
3252 For Linux, the manual page for locale(5) could be a good place to start).
3255 \begin_layout Standard
3256 Notice that these translations will work, but do contain a few flaws.
3257 In particular, all dialogs have been designed with the English text in
3258 mind, which means that some of the translated text will be too large to
3259 fit within the space allocated.
3260 This is only a display problem and will not cause any harm.
3261 Also, you will find that some of the translations do not define short-cut
3262 keys for everything.
3263 Sometimes, there are simply not enough free letters to do it.
3264 Other times, the translator just hasn't got around to doing it yet.
3265 Our localization team -- which you may wish to join -- will try to fix
3266 these shortcomings in future versions of LyX.
3269 \begin_layout Section
3270 Selecting an alternative language for the user interface
3273 \begin_layout Standard
3274 This feature is disabled by default, meaning that system default language
3276 To enable an alternative language, you have to set an appropriate environment
3284 for csh class shells
3299 with the two letter code (or four letter code, like
3303 for British English) for the language you want.
3309 Besides the user interface texts being translated, also the appropriate
3310 manuals will be presented under the Help menu -- if available.
3313 \begin_layout Standard
3314 On some systems, you may have to redefine
3326 , to override the system settings; their preference is in this order
3330 \begin_layout Standard
3331 The shell variable LANGUAGE has been disabled in LyX for technical reasons.
3337 , which corresponds to the way GNU
3342 Consult your system documentation.
3343 Normally, you'll want to put the appropriate line in a shell script run
3344 on start-up, so that the translation is on by default.
3345 Remember that this affects
3349 localized packages, not only LyX!
3352 \begin_layout Standard
3353 If LyX is configured and compiled with
3354 \begin_inset Quotes eld
3362 \begin_inset Quotes erd
3365 , this mechanism will not work.
3368 \begin_layout Section
3372 \begin_layout Subsection
3373 Translating the graphical user interface (text messages).
3376 \begin_layout Standard
3381 library to handle the internationalization of the interface.
3382 To have LyX speak your favorite language in all menus and dialogs, you
3387 -file for that language.
3388 When this is available, you'll have to generate a mo-file from it and install
3394 The process of doing all of this is explained in the documentation for
3399 , but in short, this is what you do (
3403 denotes the language code):
3406 \begin_layout Standard
3410 \begin_layout Standard
3422 \begin_layout Itemize
3425 LYX-SOURCE-DIR/po/lyx.pot
3438 doesn't exist, it can be remade with
3442 in that directory, or you can use an existing po-file for some other language
3446 \begin_layout Itemize
3453 \begin_layout Standard
3454 We recommend that you use Emacs to do this, since the
3458 distribution includes a nice mode that supports you in doing this.
3466 For some menu- and widget-labels, there are also shortcut keys that should
3468 Those keys are marked after a `|', and should be translated according to
3469 the words and phrases of the
3474 There is a tool named
3478 written in Prolog in
3480 LYX-SOURCE-DIR/development/tools/
3482 that may be useful to help determine short-cut keys.
3483 Note that XForms (version 0.86 at least) can't handle anything but 7-bit
3484 characters as shortcut keys.
3485 You should also fill also out the information at the beginning of the new
3490 -file with your email-address, etc., so people know where to reach you with
3491 suggestions and entertaining flames.
3494 \begin_layout Itemize
3503 This can be done with
3524 \begin_layout Itemize
3529 -file to your locale-tree, at the correct directory for application messages
3534 , and under the name
3543 /usr/local/share/locale/
3554 \begin_layout Standard
3558 \begin_layout Standard
3570 \begin_layout Standard
3571 Adding a new po-file to the
3575 of LyX involves altering the configure scripts and more, but the way
3579 works, you don't actually need the source-code of LyX to translate it---having
3595 \begin_layout Standard
3596 If you've written a translation file for a language that LyX does not currently
3597 support, feel free to submit it for inclusion by sending a patch.
3598 In this case, we recommend that you read the
3606 directory for more instructions.
3609 \begin_layout Subsubsection
3613 \begin_layout Standard
3614 Sometimes it turns out that one english message needs to be translated into
3615 different messages in the target language.
3616 One example is the message
3620 which has the german translation
3637 does not handle such ambigous translations.
3638 Therefore you have to add some context information to the message: Instead
3645 To[[as in 'From format x to format y']]
3649 To[[as in 'From page x to page y']].
3652 Now the two occurences of
3660 and can be translated correctly to
3675 \begin_layout Standard
3676 Of course the context information needs to be stripped off the original
3677 message when no translation is used.
3678 Therefore you have to put it in double square brackets at the end of the
3679 message (see the example above).
3680 The translation mechanism of LyX ensures that everything in double square
3681 brackets at the end of messages is removed before displaying the message.
3684 \begin_layout Subsection
3685 Translating the documentation.
3688 \begin_layout Standard
3689 The online documentation (in the
3696 -menu) can (and should!) be translated.
3697 If there are translated versions of the documentation available
3701 \begin_layout Standard
3702 As of February 2003, almost all of the docs have been translated into German
3708 has been translated into at least 12 other languages, with other translations
3710 The library of translated documents is growing rapidly.
3715 , and the locale is set accordingly, these will be used automagically by
3717 LyX looks for translated versions as
3731 denotes the language as set by the environmental variable
3736 If there are none, the default English versions will be displayed.
3737 Note that the translated versions must have the same filenames (
3741 above) as the original.
3742 If you feel up to translating the documentation (an excellent way to proof-read
3743 the original documentation BTW!), there are a few things you should do
3747 \begin_layout Itemize
3752 , the guide to writing LyX documentation.
3753 Pay special attention to the translator's section.
3756 \begin_layout Itemize
3757 Check out the documentation translation web page at
3758 \begin_inset Flex URL
3761 \begin_layout Standard
3763 http://www.devel.lyx.org
3769 That way, you can find out which (if any) documents have already been translate
3770 d into your language.
3771 You can also find out who (if anyone) is organizing the effort to translate
3772 the documentation into your language.
3773 If no one is organizing the effort, please let us know that you're interested.
3776 \begin_layout Standard
3777 Once you get to actually translating, here's a few hints for you that may
3781 \begin_layout Itemize
3782 Join the documentation team! There is information on how to do that in
3791 elp\SpecialChar \menuseparator
3798 ), which by the way is the first document you should translate.
3801 \begin_layout Itemize
3802 Learn the typographic conventions for the language you are translating to.
3803 Typography is an ancient art and over the centuries, a great variety of
3804 conventions have developed throughout different parts of the world.
3805 Also study the professional terminology amongst typographers in your country.
3806 Inventing your own terminology will only confuse the users.
3809 (Warning! Typography is addictive!)
3812 \begin_layout Itemize
3813 Make a copy of the document.
3814 This will be your working copy.
3815 You can use this as your personal translated help-file by placing it in
3823 \begin_layout Itemize
3824 Sometimes the original document (from the LyX-team) will be updated.
3825 Use the ViewCVS tool available at
3826 \begin_inset Flex URL
3829 \begin_layout Standard
3831 http://www.lyx.org/viewcvs.cgi/lyxdoc/
3836 to see what has been changed
3840 \begin_layout Standard
3841 Alternatively, you can keep a copy of the latest version of the English
3842 document which you've translated.
3848 That way you can easily see which parts of the translated document need
3852 \begin_layout Itemize
3853 If you ever find an error in the original document, fix it and notify the
3854 rest of the documentation team of the changes! (You didn't forget to join
3855 the documentation team did you?)
3858 \begin_layout Section
3859 International Keyboard Support
3862 \begin_layout Standard
3865 [Editor's Note: The following section is by
3873 It needs to be fixed to conform to the new Documentation Style sheet and
3874 to make use of the new v1.0 features.
3875 The whole thing also needs to be merged with the section following it.-jw]
3878 \begin_layout Subsection
3879 Defining Own Keymaps: Keymap File Format
3882 \begin_layout Standard
3883 Let's look at a keyboard definition file a little closer.
3884 It is a plain text file defining
3887 \begin_layout Itemize
3888 key-to-key or key-to-string translations
3891 \begin_layout Itemize
3895 \begin_layout Itemize
3896 dead keys exceptions
3899 \begin_layout Standard
3900 To define key-to-key or key-to-string translation, use this command:
3903 \begin_layout Quotation
3919 \begin_layout Standard
3924 is the key to be translated and
3928 is the string to be inserted into the document.
3929 To define dead keys, use:
3932 \begin_layout Quotation
3948 \begin_layout Standard
3958 The following dead keys are supported (shortcut name is in parentheses):
3961 \begin_layout Quotation
3969 \begin_layout Quotation
3975 \begin_layout Quotation
3981 \begin_layout Quotation
3987 \begin_layout Quotation
3993 \begin_layout Quotation
4000 \begin_layout Standard
4012 \begin_layout Quotation
4018 \begin_layout Quotation
4025 \begin_layout Standard
4037 \begin_layout Quotation
4043 \begin_layout Quotation
4049 \begin_layout Quotation
4056 \begin_layout Standard
4068 \begin_layout Quotation
4075 \begin_layout Standard
4087 \begin_layout Quotation
4093 \begin_layout Quotation
4094 hungarian umlaut (hug)
4099 \begin_layout Quotation
4105 \begin_layout Quotation
4112 \begin_layout Standard
4124 \begin_layout Standard
4125 Since in many international keyboards there are exceptions to what some
4126 dead keys should do, you can define them using
4129 \begin_layout Quotation
4138 deadkey key outstring
4141 \begin_layout Standard
4142 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
4146 \begin_layout Quotation
4160 \begin_layout Standard
4161 to make it work correctly.
4162 Also, you have to define as exceptions dead keys over i and j, to remove
4163 the dot from them before inserting an accent mark.
4164 I will change this when the time comes, but so far I haven't had time.
4167 \begin_layout Standard
4168 Oh, and about characters: backslash is escaped, so to enter it, you'll need
4174 have different meaning.
4179 marks comments, quotes start and end LaTeX-style commands.
4180 To enter quote, you'll need to use
4199 \begin_layout Standard
4200 If you make a keyboard description file that works for your language, please
4201 mail it to me, so I can include it in the next keymap distribution.
4204 \begin_layout Standard
4205 More keywords will be supported in keymap configuration file in future,
4209 \begin_layout Itemize
4227 \begin_layout Itemize
4242 an external keymap translation program
4245 \begin_layout Standard
4246 Also, it should look into
4250 file for defaults, too (for example, a
4256 option to include default keyboard).
4259 \begin_layout Section
4260 International Keymap Stuff
4261 \begin_inset CommandInset label
4270 \begin_layout Standard
4271 The next two sections describe the
4283 file syntax in detail.
4284 These sections should help you design your own key map if the ones provided
4285 do not meet your needs.
4288 \begin_layout Subsection
4292 \begin_layout Standard
4301 file maps keystrokes to characters or strings.
4302 As the name suggests it sets a keyboard mapping.
4327 are described in this section.
4331 \labelwidthstring 00.00.0000
4338 Map a character to a string
4341 \begin_layout LyX-Code
4356 \begin_layout Standard
4389 the double-quote (")
4406 must be escaped with a preceding backslash (
4417 \begin_layout Standard
4424 statement to cause the symbol
4430 to be output for the keystroke
4439 \begin_layout LyX-Code
4446 \labelwidthstring 00.00.0000
4453 Specify an accent character
4456 \begin_layout LyX-Code
4465 \begin_layout Standard
4466 This will make the cha
4504 This is the dead key
4508 \begin_layout Standard
4515 refers to a key that does not produce a character by itself, but when followed
4516 with another key, produces the desired accent character.
4517 For example, a German characte
4519 r with an umlaut like
4529 can be produced in this manner.
4538 \begin_layout Standard
4551 and then another key not in
4568 followed by the other, unallowed key, as output.
4577 cancels a dead key, so if
4594 , the cursor will not go one position backwards but will instead cancel
4611 might have had on the next keystroke.
4615 \begin_layout Standard
4616 The following example specifies that the character ' is to be an acute accent,
4617 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4620 \begin_layout LyX-Code
4623 kmod ' acute aeiouAEIOU
4627 \labelwidthstring 00.00.0000
4632 Specify an exception to the accent character
4635 \begin_layout LyX-Code
4644 \begin_layout Standard
4645 This defines an exce
4686 have been assigned a keystroke with a previous
4709 must not belong in the
4761 If such a declaration does not exist in
4817 \begin_layout Standard
4818 The following command produces causes äi to be produced when you enter acute-i
4822 \begin_layout LyX-Code
4837 \labelwidthstring 00.00.0000
4842 Combine two accent characters
4845 \begin_layout LyX-Code
4851 accent1 accent2 allowed
4854 \begin_layout Standard
4855 This one is getting pretty esoteric.
4856 It allows you to combine the effect
4937 \begin_layout Standard
4938 Consider this example from the
4947 \begin_layout LyX-Code
4950 kmod ; acute aeioyvhAEIOYVH
4954 kcomb acute umlaut iyIY
4957 \begin_layout Standard
4958 This allows you to press
4964 and get the effect of
4981 in this case cancels the last dead key, so if you press
4998 \begin_layout Subsection
5002 \begin_layout Standard
5009 mapping is performed, a
5016 file maps the strings that the symbols generate to characters in the current
5018 The LyX distribution currently includes at least the
5033 \begin_layout Standard
5040 file is a sequence of declarations of the form
5043 \begin_layout LyX-Code
5056 \begin_layout Standard
5057 For example, in order to map
5065 to the corresponding character in the iso-8859-1 set (233), the following
5069 \begin_layout LyX-Code
5077 \begin_layout Standard
5100 the same character can apply to more than one string.
5111 \begin_layout LyX-Code
5137 \begin_layout Standard
5138 If LyX cannot find a mapping for the string produced by the keystroke or
5139 a deadkey sequence, it will check if it looks like an accented char and
5140 try to draw an accent over the character on screen.
5143 \begin_layout Subsection
5147 \begin_layout Standard
5148 There is a second way to add support for international characters through
5149 so-called dead-keys.
5150 A dead-key works in combination with a letter to produce an accented character.
5151 Here, we'll explain how to create a really simple dead-key to illustrate
5155 \begin_layout Standard
5156 Suppose you happen to need the circumflex character,
5157 \begin_inset Quotes eld
5161 \begin_inset Quotes erd
5169 -key [a.k.a.\InsetSpace ~
5174 ] to the LyX command
5183 Now, whenever you type the
5187 -key followed by a letter, that letter will have a circumflex accent on
5189 For example, the sequence
5190 \begin_inset Quotes eld
5198 \begin_inset Quotes erd
5201 produces the letter:
5202 \begin_inset Quotes eld
5206 \begin_inset Quotes erd
5210 If you tried to type
5211 \begin_inset Quotes eld
5219 \begin_inset Quotes erd
5222 , however, LyX will complain with a beep, since a
5223 \begin_inset Quotes eld
5231 \begin_inset Quotes erd
5234 never takes a circumflex accent.
5239 after a dead-key produces the bare-accent.
5240 Please note this last point! If you bind a key to a dead-key, you'll need
5241 to rebind the character on that key to yet another key.
5246 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5249 \begin_layout Standard
5250 One common way to bind dead-keys is to use
5262 in combination with an accent, like
5263 \begin_inset Quotes eld
5271 \begin_inset Quotes erd
5275 \begin_inset Quotes eld
5283 \begin_inset Quotes erd
5287 \begin_inset Quotes eld
5295 \begin_inset Quotes erd
5299 Another way involves using
5307 [remember them from section?] to set up the special
5316 acts in some ways just like
5320 and permits you to bind keys to accented characters.
5321 You can also turn keys into dead-keys by binding them to something like
5326 and then binding this symbolic key to the corresponding LyX command.
5330 \begin_layout Standard
5335 : This is exactly what I do in my
5353 and a bunch of these
5354 \begin_inset Quotes eld
5362 \begin_inset Quotes erd
5365 symbolic keys bound such things as
5376 This is how I produce my accented characters.
5381 You can make just about anything into the
5389 keys, a spare function key, etc.
5390 As for the LyX commands that produce accents, check the entry for
5399 You'll find the complete list there.
5402 \begin_layout Subsection
5403 Saving your Language Configuration
5406 \begin_layout Standard
5407 \begin_inset CommandInset label
5413 You can edit your preferences so that your desired language environment
5414 is automatically configured when LyX starts up, via the
5419 dit\SpecialChar \menuseparator
5429 \begin_layout Chapter
5430 Installing New Document Classes, Layouts, and Templates
5431 \begin_inset CommandInset label
5433 name "chap:textclass"
5441 \begin_layout Standard
5442 Installing New Document Classes
5450 \begin_layout Standard
5451 In this chapter, we describe the procedures for creating and installing
5452 new LyX layout and template files, as well as offer a refresher on correctly
5453 installing new LaTeX document classes.
5454 Some definitions: a document class is a LaTeX file (usually ending in
5462 ) which describes the format of a document such as an article, report, journal
5464 and all the commands needed to realize that format.
5465 A layout file is a LyX file which corresponds to a LaTeX document class
5466 and which tells LyX how to
5467 \begin_inset Quotes eld
5471 \begin_inset Quotes erd
5474 things on the screen to make the display look something like the final
5476 More precisely, a layout file describes a
5477 \begin_inset Quotes eld
5481 \begin_inset Quotes erd
5484 which is the internal construct LyX uses to render the screen display.
5486 \begin_inset Quotes eld
5490 \begin_inset Quotes erd
5494 \begin_inset Quotes eld
5498 \begin_inset Quotes erd
5501 can be used somewhat interchangeably, but it is better to refer to the
5502 file as the layout, and the thing living in LyX's memory as the text class.
5503 A template file is simply a LyX document which contains a set of predefined
5504 entries for a given document class which are generally required for that
5506 Templates are especially useful for things like journal manuscripts which
5507 are to be submitted electronically.
5510 \begin_layout Section
5511 Installing a new LaTeX package
5514 \begin_layout Standard
5515 Some installations may not include a LaTeX package that you would like to
5517 For example, you might need FoilTeX, a common (and very powerful) package
5518 for preparing slides or viewgraphs for overhead projectors.
5519 Here are the formal steps involved in getting the package up and running
5520 if you are using teTeX or some other web2c based distribution.
5524 \begin_layout Enumerate
5525 Get the package from CTAN or wherever.
5529 \begin_layout Standard
5532 Inventory of your LaTeX configuration
5534 manual for details of what CTAN is and where supported document classes
5543 \begin_layout Enumerate
5548 (this usually lives in the directory
5552 , though you can run
5557 It describes how to add a local
5561 directory; follow the instructions.
5562 You need to insert the name of your local
5575 is a logical place to install software that did not come with your distribution
5581 Usually, you will have to modify only two things:
5585 \begin_layout Enumerate
5590 to the directory you chose; e.g.
5595 TEXMFLOCAL = /usr/local/texmf
5598 \begin_layout Enumerate
5612 TEXMF = {$HOMETEXMF,!!$TEXMFLOCAL,!!$TEXMFMAIN}
5616 \begin_layout Enumerate
5627 You must follow the directory structure of your existing
5631 directory (for example, latex packages should go under
5633 /usr/local/texmf/tex/latex/
5638 \begin_layout Enumerate
5639 Install the package.
5640 For example, you would unpack the FoilTeX tarball and create
5642 /usr/local/texmf/tex/latex/foiltex
5649 directory contains various files.
5652 \begin_layout Enumerate
5660 /usr/local/texmf/ls-R
5665 \begin_layout Enumerate
5666 From within LyX, do:
5671 ools\SpecialChar \menuseparator
5682 \begin_layout Standard
5683 Now you should see your new package---for example
5692 ayout\SpecialChar \menuseparator
5707 Note that there are simpler ways of installing packages: you can add a
5708 link to the new package directory in the system LaTeX directory (
5712 , don't forget to then run
5716 ), or sometimes simply set the
5720 environment variable to include the new package.
5721 However, the formal procedure described in
5725 is guaranteed to work, so you should follow it unless circumstances absolutely
5726 prevent it: such as, when you don't have superuser access.
5729 \begin_layout Section
5730 \begin_inset CommandInset label
5739 \begin_layout Standard
5740 This section describes how to write and install your own LyX layout files
5741 (also known as text classes) and walks through the
5745 text class format as an example.
5750 files describe what paragraph styles are available for a given document
5751 class and how LyX should display them.
5752 We try to provide a thorough description of the process here; however,
5753 there are so many different types of documents supported by LaTeX classes
5754 that we can't hope to cover every different possibility or problem you
5756 (The LyX users' list is frequented by people with lots of experience with
5757 layout design who are willing to share what they've learned.)
5760 \begin_layout Standard
5761 As you prepare to write a new layout, it is extremely helpful to look at
5762 the example layouts distributed with LyX.
5763 If you use a nice LaTeX document class that might be of interest for others,
5764 too, and have a nice corresponding LyX layout, feel free to contribute
5765 the stuff to us, so we may put it into the distribution.
5766 There is also a section on the LyX wiki for this kind of material.
5769 \begin_layout Standard
5770 All the tags described in this chapter are case-insensitive; this means
5783 are really the same command.
5784 The possible values are printed in brackets after the feature's name.
5785 The default value if a feature isn't specified inside a text class-description
5793 If the argument has a datatype like
5794 \begin_inset Quotes eld
5798 \begin_inset Quotes erd
5802 \begin_inset Quotes eld
5806 \begin_inset Quotes erd
5809 , the default is shown like this:
5819 \begin_layout Subsection
5823 \begin_layout Standard
5824 Similar to layout files, and new with LyX 1.6, are layout
5829 Modules are to LaTeX packages much as layouts are to LaTeX classes, and
5830 some modules---such as the URL module---provide support for just such a
5832 In a sense, layout modules are similar to included files---files like stdsectio
5833 ns.inc---in that modules are not specific to a given document layout but
5834 may be used with many different layouts.
5835 The difference is that using a layout module does not require editing the
5837 Rather, modules are selected in the
5842 ocument\SpecialChar \menuseparator
5852 \begin_layout Standard
5853 Building modules is the easiest way to get started with layout editing,
5854 since it can be as simple as adding a single new paragraph or flex inset.
5855 But modules may, in principle, contain anything a layout file can contain.
5858 \begin_layout Standard
5859 A module must begin with a line like the following:
5862 \begin_layout LyX-Code
5865 DeclareLyXModule[url.sty]{Adds a character style for the
5870 \begin_layout Standard
5871 The argument in square brackets is optional: It declares any LaTeX packages
5872 on which the module depends.
5873 The two mandatory arguments, in curly brackets, are a short description
5874 of the module and the name of the module, as they should appear in
5876 Document\SpecialChar \menuseparator
5883 \begin_layout Standard
5884 After creating a new module, you will need to reconfigure and then restart
5885 LyX for it to appear in the menu.
5886 However, changes you make to the module will be seen immediately, if you
5889 Document\SpecialChar \menuseparator
5892 , make some change (or even just highlight something), and then hit
5893 \begin_inset Quotes eld
5897 \begin_inset Quotes erd
5901 It is strongly recommended that you save your work before doing so.
5902 It is, in fact, strongly recommended that you not attempt to create or
5903 edit modules while simultaneously working on documents.
5904 Though of course the developers strive to keep LyX stable in such situations,
5905 syntax errors and the like in your module file could cause strange behavior.
5908 \begin_layout Subsection
5909 Supporting new document classes
5912 \begin_layout Standard
5913 There are two situations you are likely to encounter when wanting to support
5914 a new LaTeX document class, involving LaTeX2e class (
5923 Supporting a style file is usually fairly easy.
5924 Supporting a new document class is a bit harder.
5927 \begin_layout Subsection
5935 \begin_layout Standard
5936 If your new document class is provided as a style file that is used in conjuncti
5937 on with an existing, supported document class---for the sake of the example,
5938 we'll assume that the style file is called
5942 and it is meant to be used with
5946 , which is a standard class---start by copying the existing class's layout
5947 file into your local directory:
5950 \begin_layout LyX-Code
5951 cp report.layout ~/.lyx/layouts/myclass.layout
5954 \begin_layout Standard
5959 and change the line:
5962 \begin_layout LyX-Code
5965 DeclareLaTeXClass{report}
5968 \begin_layout Standard
5972 \begin_layout LyX-Code
5975 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
5978 \begin_layout Standard
5982 \begin_layout LyX-Code
5992 \begin_layout Standard
5993 near the top of the file.
5996 \begin_layout Standard
5997 Start LyX and select
6002 ools\SpecialChar \menuseparator
6010 Then restart LyX and try creating a new document.
6015 " as a document class option in the
6020 ocument\SpecialChar \menuseparator
6028 It is likely that some of the sectioning commands and such in your new
6029 class will work differently from how they worked in the base class---
6033 in this example---so you can fiddle around with the settings for the different
6034 sections if you wish.
6035 See below for more discussion on this.
6038 \begin_layout Subsection
6046 \begin_layout Standard
6047 There are two possibilities here.
6048 One is that the class file is itself based upon an existing document class.
6049 For example, many thesis classes are based upon
6054 To see whether yours is, look for a line like
6057 \begin_layout LyX-Code
6063 \begin_layout Standard
6065 If so, then you may proceed largely as in the previous section, though
6066 the DeclareLaTeXClass line will be different.
6067 If your new class is thesis, and it is based upon book, then the line should
6071 \begin_layout LyX-Code
6074 DeclareLaTeXClass[myclass, book]{thesis}
6077 \begin_layout Standard
6078 If, on the other hand, the new class is not based upon an existing class,
6079 you will probably have to
6080 \begin_inset Quotes eld
6084 \begin_inset Quotes erd
6088 We strongly suggest copying an existing layout file which uses a similar
6089 LaTeX class and then modifying it, if you can do so.
6090 At least use an existing file as a starting point so you can find out what
6091 items you need to worry about.
6092 Again, the specifics are covered below.
6095 \begin_layout Section
6096 Declaring a new text class
6099 \begin_layout Standard
6100 When it's finally time to get your hands dirty and create or edit your own
6101 layout file, the following sections describe what you're up against.
6102 Our advice is to go slowly, save and test often, listen to soothing music,
6103 and enjoy one or two of your favorite adult beverages; more if you are
6104 getting particularly stuck.
6105 It's really not that hard, except that the multitude of options can become
6106 overwhelming if you try to do to much in one sitting.
6107 Go have another adult beverage, just for good measure.
6110 \begin_layout Standard
6114 \begin_layout Standard
6115 Lines in a layout file which begin with a
6120 There is one exception to this rule: all layouts should begin with lines
6124 \begin_layout LyX-Code
6127 #% Do not delete the line below; configure depends on this
6130 \begin_layout LyX-Code
6135 DeclareLaTeXClass{article}
6138 \begin_layout Standard
6139 The second line is used when you configure LyX.
6140 The layout file is read by the LaTeX script
6144 , in a special mode where
6149 The first line is just a LaTeX comment, and the second one contains the
6150 declaration of the text class.
6151 If these lines appear in a file named
6155 , then they define a text class of name
6159 (the name of the layout file) which uses the LaTeX document class
6163 (the default is to use the same name as the layout).
6165 \begin_inset Quotes eld
6169 \begin_inset Quotes erd
6172 that appears above is used as a description of the text class in the
6177 ocument\SpecialChar \menuseparator
6187 \begin_layout Standard
6188 Let's assume that you wrote your own text class that uses the
6192 documentclass, but where you changed the appearance of the section headings.
6193 If you put it in a file
6197 , the header of this file should be:
6200 \begin_layout LyX-Code
6203 #% Do not delete the line below; configure depends on this
6206 \begin_layout LyX-Code
6211 DeclareLaTeXClass[article]{article (with my own headings)}
6214 \begin_layout Standard
6215 This declares a text class
6219 , associated with the LaTeX document class
6224 \begin_inset Quotes eld
6227 article (with my own headings)
6228 \begin_inset Quotes erd
6232 If your text class depends on several packages, you can declare it as:
6235 \begin_layout LyX-Code
6238 #% Do not delete the line below; configure depends on this
6241 \begin_layout LyX-Code
6246 DeclareLaTeXClass[article,foo.sty]{article (with my own headings)}
6249 \begin_layout Standard
6250 This indicates that your text class uses the foo.sty package.
6251 Finally, it is also possible to declare classes for DocBook code.
6252 Typical declarations will look like
6255 \begin_layout LyX-Code
6258 #% Do not delete the line below; configure depends on this
6261 \begin_layout LyX-Code
6266 DeclareDocBookClass[article]{SGML (DocBook article)}
6269 \begin_layout Standard
6270 Note that these declarations can also be given an optional parameter declaring
6271 the name of the document class (but not a list).
6274 \begin_layout Standard
6275 When the text class has been modified to your taste, all you have to do
6276 is to copy it either in
6289 ools\SpecialChar \menuseparator
6297 Exit LyX and restart it; then your new text class should be available along
6301 \begin_layout Standard
6302 In versions of LyX prior to 1.6, you had to restart LyX to see any changes
6303 you made to your layout files.
6304 As a result, editing layout files could be very time consuming.
6305 Beginning with 1.6, however, you can force a reload of the layout currently
6306 in use by using the LyX function
6311 There is no default binding for this function---though, of course, you
6312 can bind it to a key yourself (see section
6313 \begin_inset CommandInset ref
6315 reference "sec:bindings"
6320 You should simply enter this command in the mini-buffer.
6325 : This is very much an `advanced feature'.
6330 recommended that you save your work before using this function.
6335 recommended that you not attempt to edit your layout while simultaneously
6336 working on a document that you care about.
6337 Use a test document.
6338 Syntax errors and the like in your layout file could cause peculiar behavior.
6339 In particular, such errors could cause LyX to regard the current layout
6340 as invalid and to attempt to switch to some other layout.
6341 The LyX team strives to keep LyX stable in such situations, but safe is
6345 \begin_layout Subsection
6349 \begin_layout Standard
6350 The first non-comment line must contain the file format number:
6353 \begin_layout Description
6364 ] This tag was introduced with LyX 1.4.0 (layout files of LyX 1.3.x and earlier
6365 don't have an explicit file format).
6366 The file format that is documented here is
6373 \begin_layout Subsection
6374 General text class parameters
6377 \begin_layout Standard
6378 These are the general parameters which describe the form of the entire document:
6381 \begin_layout Standard
6385 \begin_layout Standard
6397 \begin_layout Description
6411 ] Whether the class-default should have one or two columns.
6412 Can be changed in the
6417 ocument\SpecialChar \menuseparator
6425 This setting (same goes for
6429 , too) is important: if your text class has two columns by default but you
6430 forget to set it correctly, the
6438 be output when you select
6447 ocument\SpecialChar \menuseparator
6455 \begin_layout Description
6469 ] Whether the class-default should be printing on one or both sides of the
6471 Can be changed in the
6476 ocument\SpecialChar \menuseparator
6486 \begin_layout Description
6500 ] The class default pagestyle.
6501 Can be changed in the
6506 ocument\SpecialChar \menuseparator
6516 \begin_layout Description
6520 ClassOptions\SpecialChar \ldots{}
6524 This section describes various global options supported by the document
6526 See Section\InsetSpace ~
6528 \begin_inset CommandInset ref
6530 reference "sec:classoptions"
6537 \begin_layout Description
6555 ] Whether the class already provides the feature
6560 A feature is in general the name of a package (amsmath, makeidx, \SpecialChar \ldots{}
6562 macro (url, boldsymbol,\SpecialChar \ldots{}
6563 ); the complete list of supported features is unfortunat
6567 \begin_layout Description
6574 This is used to describe the default font of the document.
6575 See Section\InsetSpace ~
6577 \begin_inset CommandInset ref
6579 reference "sec:fonts"
6586 \begin_layout Description
6597 ] This is the style that will be assigned to new paragraphs, usually
6602 This will default to the first defined style if not given, but you are
6603 highly encouraged to use this directive.
6606 \begin_layout Description
6623 ] Indicates what kind of markup is used to define the title of a document.
6628 means that the macro with name
6632 will be inserted after the last layout which has
6633 \begin_inset Quotes eld
6641 \begin_inset Quotes erd
6649 corresponds to the case where the block of paragraphs which have
6650 \begin_inset Quotes eld
6658 \begin_inset Quotes erd
6661 should be enclosed into the
6670 \begin_layout Description
6681 ] The name of the command/environment mentionned above.
6684 \begin_layout Description
6688 Preamble\SpecialChar \ldots{}
6692 A set of macro definitions that will be output at the beginning of the
6694 Use this for global definitions.
6697 \begin_layout Description
6704 As its name implies, this command allows you to include another layout
6705 definition file within yours to avoid duplicating commands.
6706 Common examples are the standard layout files, for example,
6710 , which contains most of the basic layouts.
6713 \begin_layout Description
6717 Style\SpecialChar \ldots{}
6721 This sequence defines a new style.
6722 If the style already exists, it will redefine some of its parameters instead.
6723 See Section\InsetSpace ~
6725 \begin_inset CommandInset ref
6727 reference "sec:style"
6734 \begin_layout Description
6741 This command deletes an existing style.
6742 This is particularly useful when you want to suppress a style that has
6743 be defined in an input file.
6746 \begin_layout Description
6750 Float\SpecialChar \ldots{}
6754 This sequence defines a new float.
6755 See Section\InsetSpace ~
6757 \begin_inset CommandInset ref
6759 reference "sec:floats"
6766 \begin_layout Description
6773 This command deletes an existing float.
6774 This is particularly useful when you want to suppress a float that has
6775 be defined in an input file.
6778 \begin_layout Description
6782 InsetLayout\SpecialChar \ldots{}
6786 This section (re-)defines the layout of an inset.
6787 It can be applied to an existing inset of to a new, user-defined inset,
6788 e.g., a new character style.
6789 See Section\InsetSpace ~
6791 \begin_inset CommandInset ref
6793 reference "sec:charstyle"
6800 \begin_layout Description
6804 Counter\SpecialChar \ldots{}
6808 This sequence defines a new counter.
6809 See Section\InsetSpace ~
6811 \begin_inset CommandInset ref
6813 reference "sec:counter"
6820 \begin_layout Standard
6824 \begin_layout Standard
6836 \begin_layout Subsection
6844 \begin_layout Standard
6845 \begin_inset CommandInset label
6847 name "sec:classoptions"
6855 section can contain the following entries:
6858 \begin_layout Description
6869 ] The list of available font sizes for the document's main font, separated
6871 \begin_inset Quotes eld
6879 \begin_inset Quotes erd
6885 \begin_layout Description
6894 string="empty|plain|headings|fancy"
6896 ] The list of available page styles, separated by
6897 \begin_inset Quotes eld
6905 \begin_inset Quotes erd
6911 \begin_layout Description
6922 ] Some document class options, separated by a comma, that will be added
6923 to the optional part of the
6932 \begin_layout Subsection
6933 Specific Paragraph Layouts
6936 \begin_layout Standard
6937 \begin_inset CommandInset label
6943 A paragraph layout description looks like this
6947 \begin_layout Standard
6948 Note that this will either define a new layout or modify an existing one.
6956 \begin_layout LyX-Code
6963 \begin_layout LyX-Code
6967 \begin_layout LyX-Code
6971 \begin_layout Standard
6972 where the following commands are allowed:
6975 \begin_layout Standard
6979 \begin_layout Standard
6991 \begin_layout Description
7002 This is used to copy all the features of an existing layout into the current
7007 \begin_layout Description
7019 , Command, Environment, Item_Environment,
7025 ] How the layout should be translated into LaTeX.
7030 means nothing special.
7043 {\SpecialChar \ldots{}
7058 }\SpecialChar \ldots{}
7082 is generated for each paragraph of this environment.
7095 is passed as an argument to the environment.
7100 can be defined in the
7105 ayout\SpecialChar \menuseparator
7119 is perhaps a bit misleading, since these rules apply to SGML classes, too.
7120 Visit the SGML class files for specific examples.
7123 \begin_layout Description
7134 If 1, marks the layout as being part of a title block (see also the
7145 \begin_layout Description
7152 The name of the corresponding LaTeX stuff.
7153 Either the environment or command name.
7156 \begin_layout Description
7163 The optional parameter for the corresponding
7170 This parameter cannot be changed from within LyX.
7173 \begin_layout Description
7184 ] The number of optional arguments that can be used with this layout.
7185 This is useful for things like section headings, and only makes sense with
7189 \begin_layout Description
7201 , Manual, Dynamic, First_Dynamic, Right_Address_Box
7205 The kind of margin that the layout has on the left side.
7210 just means a fixed margin.
7215 means that the left margin depends on the string entered in the
7220 dit\SpecialChar \menuseparator
7225 aragraph\InsetSpace ~
7229 This is used to typeset nice lists without tabulators.
7234 means that the margin depends on the size of the label.
7235 This is used for automatic enumerated headlines.
7236 It is obvious that the headline
7237 \begin_inset Quotes eld
7240 5.4.3.2.1 Very long headline
7241 \begin_inset Quotes erd
7244 must have a wider left margin (as wide as
7245 \begin_inset Quotes eld
7249 \begin_inset Quotes erd
7252 plus the space) than
7253 \begin_inset Quotes eld
7256 3.2 Very long headline
7257 \begin_inset Quotes erd
7260 , even if other word processors are not able to do this.
7265 is similar, but only the very first row of the paragraph is dynamic, while
7266 the others are static; this is used, for example, for descriptions.
7271 means the margin is chosen in a way that the longest row of this paragraph
7272 fits to the right margin.
7273 This is used to typeset an address on the right edge of the page.
7276 \begin_layout Description
7293 ] Whether the following Paragraph is allowed to indent its very first row.
7298 means that it is not allowed to do so,
7302 means it could do so if it wants to.
7305 \begin_layout Description
7316 ] The indent of the very first line of a paragraph.
7317 The argument is passed as a string.
7322 means that the paragraph is indented with the width of
7331 You can get a negative width by prefixing the string with
7336 This way was chosen so that the look is the same with each used screen
7342 will be fixed for a certain layout.
7343 The exception is Standard layout, since the indentation of a Standard layout
7344 paragraph can be prohibited with
7349 Also, Standard layout paragraphs inside environments use the
7353 of the environment, not their native one.
7354 For example, Standard paragraphs inside an enumeration are not indented.
7357 \begin_layout Description
7368 ] LyX allows to choose either
7369 \begin_inset Quotes eld
7373 \begin_inset Quotes erd
7377 \begin_inset Quotes eld
7381 \begin_inset Quotes erd
7384 to typeset a document.
7386 \begin_inset Quotes eld
7390 \begin_inset Quotes erd
7393 is chosen, this value is completely ignored.
7395 \begin_inset Quotes eld
7399 \begin_inset Quotes erd
7402 is chosen, the parindent of a LaTeXtype
7403 \begin_inset Quotes eld
7407 \begin_inset Quotes erd
7410 layout is ignored and all paragraphs are additionally separated by this
7412 The vertical space is calculated with
7414 value*DefaultHeight()
7420 is the height of a row with the normal font.
7421 This way, the look stays the same with different screen fonts.
7424 \begin_layout Description
7435 ] The vertical space with which the very first of a chain of paragraphs
7436 with this layout is separated from the previous paragraph.
7437 If the previous paragraph has another layout, the separations are not simply
7438 added, but the maximum is taken.
7441 \begin_layout Description
7456 for the very last paragraph.
7459 \begin_layout Description
7470 ] The vertical space between two paragraphs of this layout.
7473 \begin_layout Description
7484 ] This is an extra space between the paragraphs of an environment layout.
7485 If you put other layouts into an environment, each is separated with the
7491 But the whole items of the environment are additionally separated with
7500 \begin_layout Description
7511 ] If you put layouts into environments, the leftmargins are not simply added,
7512 but added with a factor
7513 \begin_inset Formula $\frac{4}{depth+4}$
7517 Note that this parameter is also used when the border is defined as
7526 Then it is added to the manual or dynamic border.
7527 This string has the same meaning as for
7534 \begin_layout Description
7552 \begin_layout Description
7564 , Manual, Static, Top_Environment,
7566 Centered_Top_Environment, Sensitive,
7575 means the label is the very first word (up to the first real blank).
7580 means it is defined in the layout (see
7591 Centered_Top_Environment
7593 are special cases of
7598 The label will be printed above the paragraph, but only at the top of an
7599 environment or the top of a chain of paragraphs with this layout.
7600 Usage is for example the
7609 This is also the case for
7613 labels with latex type
7617 , in order to make layouts for theorems work correctly.
7622 is a special case for the caption-labels
7623 \begin_inset Quotes eld
7627 \begin_inset Quotes erd
7631 \begin_inset Quotes eld
7635 \begin_inset Quotes erd
7643 means the (hardcoded) label string depends on the kind of float.
7648 label type defines automatically numbered labels.
7651 \begin_layout Description
7664 The name of the counter for automatic numbering (see Section\InsetSpace ~
7666 \begin_inset CommandInset ref
7668 reference "sec:counter"
7673 This must be given if
7686 \begin_layout Description
7697 ] The horizontal space between the label and the text body.
7698 Only used for labels that are not above the text body.
7701 \begin_layout Description
7708 [float=0] The vertical space between the label and the text body.
7709 Only used for labels that are above the text body (
7715 Centered_Top_Environment
7720 \begin_layout Description
7731 ] The string used for a label with a
7740 this string is also used as a suggestion for the
7744 that can be set in the
7749 dit\SpecialChar \menuseparator
7754 aragraph\InsetSpace ~
7764 is set, this string can be contain the special formatting commands described
7765 in Section\InsetSpace ~
7767 \begin_inset CommandInset ref
7769 reference "sec:counter"
7774 For the sake of backwards compatibility, the string
7782 will be replaced by the expanded
7793 This feature is now obsolete and should be replaced by the mechanisms of
7794 Section\InsetSpace ~
7796 \begin_inset CommandInset ref
7798 reference "sec:counter"
7805 \begin_layout Description
7816 ] This is used inside the appendix instead of
7837 \begin_layout Description
7844 The level of the style in the table of contents.
7845 This is used for automatic numbering of section headings.
7848 \begin_layout Description
7860 , Box, Filled_Box, Static
7862 ] The type of label that stands at the end of the paragraph (or sequence
7885 \begin_inset Quotes eld
7889 \begin_inset Quotes erd
7901 ) is a white (resp.\InsetSpace ~
7902 black) square suitable for end of proof markers,
7906 is an explicit text string.
7909 \begin_layout Description
7920 ] The string used for a label with a
7932 \begin_layout Description
7944 , left, right, center
7946 ] Paragraph alignment.
7949 \begin_layout Description
7961 , left, right, center
7968 Some LaTeX styles prohibit certain alignments, since those wouldn't make
7970 For example a right-aligned or centered enumeration isn't possible.
7973 \begin_layout Description
7987 ] With this parameter the
7992 \begin_inset Quotes eld
7995 Vertical space above
7996 \begin_inset Quotes erd
8004 dit\SpecialChar \menuseparator
8009 aragraph\InsetSpace ~
8012 dialog can be set when initializing a paragraph with this layout
8016 \begin_layout Standard
8019 Note from Jean-Marc:
8021 I'm not sure that this setting has much use, and it should probably be
8022 removed in later versions.
8031 \begin_layout Description
8052 \begin_layout Description
8066 ] Whether fragile commands in this layout should be
8075 \begin_layout Description
8092 ] Whether newlines are translated into LaTeX newlines (
8101 The translation can be switched off to allow more comfortable LaTeX editing
8105 \begin_layout Description
8119 ] Whether the contents of this paragraph should be output in raw form, meaning
8120 without special translations that LaTeX would require.
8121 This somehow replaces the older
8128 \begin_layout Description
8142 ] Usually LyX doesn't allow you to insert more than one space between words,
8143 since a space is considered as the separation between two words, not a
8144 character or symbol of its own.
8145 This is a very fine thing but sometimes annoying, for example when typing
8146 program code or plain LaTeX code.
8152 Note that LyX will create protected blanks for the additional blanks when
8153 in another mode than LaTeX-mode.
8156 \begin_layout Description
8170 ] Usually LyX does not allow you to leave a paragraph empty, since it would
8171 lead to empty LaTeX output.
8172 There are some cases where this could be desirable however: in a letter
8173 template, the required fields can be provided as empty fields, so that
8174 people do not forget them; in some special classes, a layout can be used
8175 as some kind of break, which does not contain actual text.
8178 \begin_layout Description
8190 , onehalf, double, other
8196 ] This defines what the default spacing should be in the layout.
8209 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
8210 If you specify the argument
8214 , then you should also provide a numerical argument which will be the actual
8216 Note that, contrary to other parameters,
8220 implies the generation of specific LaTeX code, using the package
8227 \begin_layout Description
8234 The font used for both the text body
8239 See section\InsetSpace ~
8241 \begin_inset CommandInset ref
8243 reference "sec:fonts"
8248 Note that defining this font automatically defines the
8255 \begin_layout Description
8262 The font used for the text body .
8263 See section\InsetSpace ~
8265 \begin_inset CommandInset ref
8267 reference "sec:fonts"
8274 \begin_layout Description
8281 The font used for the label.
8282 See section\InsetSpace ~
8284 \begin_inset CommandInset ref
8286 reference "sec:fonts"
8293 \begin_layout Description
8297 Preamble\SpecialChar \ldots{}
8301 A set of macro definitions that will be output at the beginning of the
8302 LaTeX files when the layout is used.
8303 Use this to define the macros needed by this particular layout.
8306 \begin_layout Description
8313 the name of a style which preamble should be output
8317 the one mentionned above.
8318 This allows to ensure some ordering of the preamble snippets when macros
8319 definitions depend on one another
8323 \begin_layout Standard
8324 Note that, besides that functionality, there is no way to ensure any ordering
8326 The ordering that you see in a given version of LyX may change without
8327 warning in later versions.
8335 \begin_layout Standard
8339 \begin_layout Standard
8351 \begin_layout Subsection
8355 \begin_layout Standard
8356 \begin_inset CommandInset label
8362 Since version 1.3.0 of LyX, it is necessary to define the floats (
8370 , \SpecialChar \ldots{}
8371 ) in the text class itself.
8372 If you are looking here to learn how to upgrade an existing text class,
8373 it will probably turn out that all you have to do is to add
8376 \begin_layout LyX-Code
8380 \begin_layout Standard
8381 at a reasonable location of the text class.
8385 \begin_layout Standard
8386 Don't forget to also have a look at counters in next section.
8391 If you want to implement a text class that proposes some other float types
8392 (like the AGU class bundled with LyX), the information below will hopefully
8396 \begin_layout Description
8408 \begin_inset Quotes erd
8412 \begin_inset Quotes erd
8416 \begin_inset Quotes eld
8420 \begin_inset Quotes erd
8423 of the new class of floats, like program or algorithm.
8424 After the appropriate
8445 \begin_layout Description
8457 \begin_inset Quotes erd
8461 \begin_inset Quotes erd
8464 ] The string that will be used in the menus and also for the caption.
8467 \begin_layout Description
8488 if the float is already defined by the documentclass.
8493 , the float will be defined using the LaTeX package
8500 \begin_layout Description
8512 \begin_inset Quotes erd
8516 \begin_inset Quotes erd
8519 ] This (optional) argument determines whether floats of this class will
8520 be numbered within some sectional unit of the document.
8521 For example, if within is equal to
8525 , the floats will be numbered within chapters.
8529 \begin_layout Description
8541 \begin_inset Quotes erd
8545 \begin_inset Quotes erd
8548 ] The style used when defining the float using
8557 \begin_layout Description
8569 \begin_inset Quotes erd
8573 \begin_inset Quotes erd
8576 ] The default placement for the given class of floats.
8577 They are like in standard LaTeX:
8593 for top, bottom, page, and here, respectively.
8597 \begin_layout Standard
8598 Note that the order of these letters in the string is irrelevant, like in
8604 On top of that there is a new type,
8608 , which does not really correspond to a float, since it means: put it
8609 \begin_inset Quotes eld
8613 \begin_inset Quotes erd
8617 Note, however that the
8621 specifier is special and, because of implementation details cannot be used
8622 in non-builtin float types.
8623 If you do not understand what this means, just use
8630 \begin_layout Description
8642 \begin_inset Quotes erd
8646 \begin_inset Quotes erd
8649 ] The file name extension of an auxiliary file for the list of figures (or
8651 LaTeX writes the captions to this file.
8654 \begin_layout Description
8666 \begin_inset Quotes erd
8670 \begin_inset Quotes erd
8673 ] The heading used for the list of floats.
8676 \begin_layout Standard
8677 Note that defining a float with type
8683 automatically defines the corresponding counter with name
8692 \begin_layout Subsection
8693 Inset layouts and Flex insets
8696 \begin_layout Standard
8697 \begin_inset CommandInset label
8699 name "sec:charstyle"
8703 You can define character styles since version 1.4.0 of LyX; since version
8704 1.6.0 these are called Flex insets.
8708 \begin_layout Standard
8709 Furthermore it is possible to define the general layout of many different
8711 Currently layout parameters can be defined for footnotes, marginal notes,
8712 note insets, ERT insets, branch insets, and Flex insets.
8713 The latter are definable from the user GUI and come in three different
8714 kinds: character style (
8722 ), and XML element (
8730 \begin_layout Standard
8735 definition starting line is of the form
8738 \begin_layout LyX-Code
8739 InsetLayout <Type> <Name>
8742 \begin_layout Standard
8746 \begin_layout Standard
8753 Foot, Margin, Note, Flex
8758 \begin_layout Standard
8763 can be empty (for foot- and marginal notes, branches and ERT) or one of
8781 Here, the second part of the name can be chosen freely (for CharStyle,
8782 Custom and Element), or from a predefined list (for Note).
8785 \begin_layout Standard
8790 section can contain the following entries:
8793 \begin_layout Description
8816 (indicating a dummy definition ending definitions of charstyles etc.).
8817 This entry is only meaningful for Flex (user definable) insets, the three
8818 types of which are CharStyle, Custom and Element.
8821 \begin_layout Description
8837 Minimalistic or Conglomerate
8840 , describing the rendering style used for the inset's frame and buttons.
8843 \begin_layout Description
8850 defines what will be displayed on the button or elsewhere as the inset
8852 Some inset types (ERT and Branch) modify this label on the fly.
8855 \begin_layout Description
8862 The font used for both the text body
8867 See section\InsetSpace ~
8869 \begin_inset CommandInset ref
8871 reference "sec:fonts"
8876 Note that defining this font automatically defines the
8883 \begin_layout Description
8890 The font used for the label.
8891 See section\InsetSpace ~
8893 \begin_inset CommandInset ref
8895 reference "sec:fonts"
8900 Note that this definition can never appear before
8904 , lest it be ineffective (see above)
8907 \begin_layout Description
8914 The name of the corresponding LaTeX stuff.
8915 Either the environment or command name.
8918 \begin_layout Description
8925 The optional parameter for the corresponding
8931 stuff, including possible bracket pairs like
8936 This parameter cannot be changed from within LyX.
8939 \begin_layout Description
8946 See section\InsetSpace ~
8948 \begin_inset CommandInset ref
8950 reference "sec:style"
8957 \begin_layout Description
8961 Preamble\SpecialChar \ldots{}
8965 See section\InsetSpace ~
8967 \begin_inset CommandInset ref
8969 reference "sec:style"
8976 \begin_layout Subsection
8980 \begin_layout Standard
8981 \begin_inset CommandInset label
8987 Since version 1.3.0 of LyX, it is necessary to define the counters (
8995 , \SpecialChar \ldots{}
8996 ) in the text class itself.
8997 If you are looking here to learn how to upgrade an existing text class,
8998 it will probably turn out that all you have to do is to add
9001 \begin_layout LyX-Code
9002 Input stdcounters.inc
9005 \begin_layout Standard
9006 The following parameters can be used:
9009 \begin_layout Description
9021 \begin_inset Quotes erd
9025 \begin_inset Quotes erd
9028 ] The name of the counter.
9031 \begin_layout Description
9043 \begin_inset Quotes erd
9047 \begin_inset Quotes erd
9050 ] If this is set to the name of another counter, the present counter will
9051 be reset everytime the other one is increased.
9063 \begin_layout Description
9067 LabelString [string=""]
9070 when this is defined, this string defines how the counter is displayed.
9071 Setting this value resets
9076 The following special constructs can be used in the string:
9080 \begin_layout Itemize
9087 will be replaced by the expansion of the
9100 If these are empty, a default value is constructed as follows: if the counter
9101 has a master counter
9113 is used; otherwise the string
9122 \begin_layout Itemize
9123 counter values can be expressed using LaTeX-like macros
9147 \begin_layout Description
9158 to arabic numerals, like 1, 2, 3\SpecialChar \ldots{}
9163 \begin_layout Standard
9173 Actually, the situation is a bit more complicated than that: any
9192 other than those descibed below will produce arabic numerals.
9193 It would not be surprising to see this change in the future.
9201 \begin_layout Description
9208 for lower-case letters: a, b, c, \SpecialChar \ldots{}
9212 \begin_layout Description
9219 for upper-case letters: A, B, C, \SpecialChar \ldots{}
9223 \begin_layout Description
9230 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
9234 \begin_layout Description
9241 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
9245 \begin_layout Description
9252 for hebrew numerals.
9257 \begin_layout Description
9261 LabelStringAppendix [string=""]
9268 , for use in appendix.
9271 \begin_layout Subsection
9275 \begin_layout Standard
9276 \begin_inset CommandInset label
9282 A font description looks like that:
9285 \begin_layout LyX-Code
9295 \begin_layout LyX-Code
9299 \begin_layout LyX-Code
9303 \begin_layout Standard
9304 and the following commands are available:
9307 \begin_layout Description
9324 \begin_layout Description
9341 \begin_layout Description
9353 , Italic, SmallCaps, Slanted
9358 \begin_layout Description
9374 , large, larger, largest, huge, giant
9379 \begin_layout Description
9391 , black, white, red, green, blue, cyan, magenta, yellow
9396 \begin_layout Subsection
9397 Upgrading old layout files
9400 \begin_layout Standard
9401 The file format of layout files changes from time to time, so old layout
9402 files need to be converted.
9403 This process has been automated in LyX 1.4.0: If LyX reads an old format
9404 layout file it will call the conversion tool
9406 $LyXDir/scripts/layout2layout.py
9408 and convert it to a temporary file in current format.
9409 The original file is left untouched, so that you can still use it with
9411 If you want to convert the layout file permanently, just call the converter
9415 \begin_layout LyX-Code
9416 python $LyXDir/scripts/layout2layout.py myclass.layout myclassnew.layout
9419 \begin_layout Standard
9431 \begin_layout Standard
9432 The automatic conversion does only handle syntax changes.
9433 It cannot handle the case where the contents of included files was changed.
9434 For example, layout files based on
9447 If you get error messages about undefined counters, try to convert your
9467 \begin_layout Section
9469 \begin_inset CommandInset label
9471 name "sec:templates"
9478 \begin_layout Standard
9479 Templates are created just like usual documents.
9480 The only difference is that usual documents contain all possible settings,
9481 including the fontscheme and the papersize.
9482 Usually a user doesn't want a template to overwrite his defaults in these
9484 For that reason, the designer of a template should remove the corresponding
9497 from the template LyX file.
9498 This can be done with any simple text-editor, for example
9510 \begin_layout Standard
9511 Put the edited template files you create in
9515 , copy the ones you use from the global template directory in
9519 to the same place, and redefine the template path in the
9524 dit\SpecialChar \menuseparator
9543 \begin_layout Standard
9544 Note that there is a template which has a particular meaning:
9549 This template is loaded everytime you create a new document with
9556 \SpecialChar \menuseparator
9564 in order to provide useful defaults.
9565 To create this template from inside LyX, all you have to do is to open
9566 a document with the correct settings, and use the
9572 e as Document Defaults
9577 \begin_layout Chapter
9578 Including External Material
9581 \begin_layout Section
9585 \begin_layout Standard
9586 \begin_inset Note Note
9589 \begin_layout Standard
9590 This section is completely outdated.
9595 One often requested feature from LyX users is to be able to interface LyX
9596 with Xfig, Dia, or other similar applications that specialize in producing
9597 a certain kind of diagram, figure, schematic or whatever material might
9598 be relevant to include in your document.
9599 Previously, it was only possible to include boring, static, fixed images
9600 in LyX documents with the graphics feature, but there are several limitations
9601 attached to this approach:
9604 \begin_layout Itemize
9605 If you want to change the figure, you have to invoke an external program
9609 \begin_layout Itemize
9610 LyX does not notice that the referenced files change, so the on-screen display
9611 can fast become obsolete, and this is aggravated by the lack of a means
9612 of updating the display
9615 \begin_layout Itemize
9616 The graphics stuff does not provide any mechanisms for coping with different
9617 exported formats such as DocBook, HTML or plain text
9620 \begin_layout Standard
9621 The external material facility attempts to solve all of these problems
9625 \begin_layout Standard
9626 Even if the graphics facility can't solve all problems, it is still valuable
9627 because it does provide in-line preview of the graphics, and supports advanced
9628 geometric transformations with a comfortable user interface.
9634 It does this by offering a general method to interface LyX to external
9636 Instead of introducing a long list of different constructs tailored for
9637 each specific application, we chose to sacrifice the in-line displaying
9638 of the included material in order to provide a general construct to cover
9639 a wide range of applications.
9640 The result is the external material construct.
9641 External material presents itself in the document simply as a button, but
9642 don't let this fool you.
9643 When you click on it, a dialog will appear that allows you to chose exactly
9644 what material to include, and in the following sections you will learn
9645 that this is indeed a powerful mechanism that can solve all of the above
9649 \begin_layout Section
9653 \begin_layout Standard
9654 The external material feature is based on the concept of a
9659 A template is a specification of how LyX should interface with a certain
9661 As bundled, LyX comes with predefined templates for Xfig figures, Dia diagrams,
9662 various raster format images, gnuplot, and more.
9663 You can check the actual list by using the menu
9665 Insert\SpecialChar \menuseparator
9666 File\SpecialChar \menuseparator
9675 Furthermore, it is possible to roll your own template to support a specific
9677 Later we'll describe in more detail what is involved, and hopefully you
9678 will submit all the templates you create so we can include them in a later
9682 \begin_layout Standard
9683 Another basic idea of the external material feature is to distinguish between
9684 the original file that serves as a base for final material and the produced
9685 file that is included in your exported or printed document.
9686 For example, consider the case of a figure produced with
9691 The Xfig application itself works on an original file with the
9696 Within XFig, you create and change your figure, and when you are done,
9702 When you want to include the figure in your document, you invoke
9706 in order to create a PostScript file that can readily be included in your
9712 file is the original file, and the PostScript file is the produced file.
9715 \begin_layout Standard
9716 This distinction is important in order to allow updating of the material
9717 while you are in the process of writing the document.
9718 Furthermore, it provides us with the flexibility that is needed to support
9719 multiple export formats.
9720 For instance, in the case of a plain text file, it is not exactly an award-winn
9721 ing idea to include the figure as raw PostScript.
9722 Instead, you'd either prefer to just include a reference to the figure,
9723 or try to invoke some graphics to Ascii converter to make the final result
9724 look similar to the real graphics.
9725 The external material management allows you to do this, because it is parameter
9726 ized on the different export formats that LyX supports.
9729 \begin_layout Standard
9730 Besides supporting the production of different products according to the
9731 exported format, it supports tight integration with editing and viewing
9733 In the case of an XFig figure, you are able to invoke
9737 on the original file with a single click from within the external material
9738 dialog in LyX, and also preview the produced PostScript file with
9743 No more fiddling around with the command line and/or file browsers to locate
9744 and manipulate the original or produced files.
9745 In this way, you are finally able to take full advantage of the many different
9746 applications that are relevant to use when you write your documents, and
9747 ultimately be more productive.
9750 \begin_layout Section
9751 External material dialog
9754 \begin_layout Standard
9759 dialog is described in the
9768 \begin_layout Section
9772 \begin_layout Standard
9773 In this section, we should include some examples of use of the external
9775 Those examples could include:
9778 \begin_layout Itemize
9779 External raster images
9782 \begin_layout Itemize
9783 External XFig figures
9786 \begin_layout Itemize
9790 \begin_layout Itemize
9794 \begin_layout Itemize
9795 The use of makefiles
9798 \begin_layout Itemize
9799 Recursive external LyX templates
9802 \begin_layout Section
9803 The external template configuration file
9806 \begin_layout Standard
9807 It is relatively easy to add custom external template definitions to LyX.
9808 However, be aware this doing this in an careless manner most probably
9812 introduce an easily exploitable security hole.
9813 So before you do this, please read the discussion about security which
9817 \begin_layout Standard
9818 Having said that, we encourage you to submit any interesting templates that
9823 \begin_layout Standard
9824 The external templates are defined in the
9826 lib/external_templates
9829 You can place your own version in
9831 .lyx/external_templates
9836 \begin_layout Standard
9837 A typical template looks like this:
9840 \begin_layout LyX-Code
9844 \begin_layout LyX-Code
9845 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
9848 \begin_layout LyX-Code
9852 \begin_layout LyX-Code
9856 \begin_layout LyX-Code
9860 \begin_layout LyX-Code
9864 \begin_layout LyX-Code
9868 \begin_layout LyX-Code
9869 AutomaticProduction true
9872 \begin_layout LyX-Code
9876 \begin_layout LyX-Code
9880 \begin_layout LyX-Code
9884 \begin_layout LyX-Code
9885 TransformCommand Rotate RotationLatexCommand
9888 \begin_layout LyX-Code
9889 TransformCommand Resize ResizeLatexCommand
9892 \begin_layout LyX-Code
9893 Product "$$RotateFront$$ResizeFront
9896 \begin_layout LyX-Code
9901 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
9904 \begin_layout LyX-Code
9905 $$ResizeBack$$RotateBack"
9908 \begin_layout LyX-Code
9912 \begin_layout LyX-Code
9913 UpdateResult "$$AbsPath$$Basename.pstex_t"
9916 \begin_layout LyX-Code
9917 Requirement "graphicx"
9920 \begin_layout LyX-Code
9921 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
9924 \begin_layout LyX-Code
9925 ReferencedFile latex "$$AbsPath$$Basename.eps"
9928 \begin_layout LyX-Code
9929 ReferencedFile dvi "$$AbsPath$$Basename.eps"
9932 \begin_layout LyX-Code
9936 \begin_layout LyX-Code
9940 \begin_layout LyX-Code
9941 TransformCommand Rotate RotationLatexCommand
9944 \begin_layout LyX-Code
9945 TransformCommand Resize ResizeLatexCommand
9948 \begin_layout LyX-Code
9949 Product "$$RotateFront$$ResizeFront
9952 \begin_layout LyX-Code
9957 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
9960 \begin_layout LyX-Code
9961 $$ResizeBack$$RotateBack"
9964 \begin_layout LyX-Code
9968 \begin_layout LyX-Code
9969 UpdateResult "$$AbsPath$$Basename.pdftex_t"
9972 \begin_layout LyX-Code
9973 Requirement "graphicx"
9976 \begin_layout LyX-Code
9977 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
9980 \begin_layout LyX-Code
9981 ReferencedFile latex "$$AbsPath$$Basename.pdf"
9984 \begin_layout LyX-Code
9988 \begin_layout LyX-Code
9992 \begin_layout LyX-Code
9993 Product "$$Contents(
9995 "$$AbsPath$$Basename.asc
10000 \begin_layout LyX-Code
10001 UpdateFormat asciixfig
10004 \begin_layout LyX-Code
10005 UpdateResult "$$AbsPath$$Basename.asc"
10008 \begin_layout LyX-Code
10012 \begin_layout LyX-Code
10016 \begin_layout LyX-Code
10017 Product "<graphic fileref=
10019 "$$AbsOrRelPathMaster$$Basename.eps
10024 \begin_layout LyX-Code
10028 \begin_layout LyX-Code
10032 \begin_layout LyX-Code
10033 UpdateResult "$$AbsPath$$Basename.eps"
10036 \begin_layout LyX-Code
10037 ReferencedFile docbook "$$AbsPath$$Basename.eps"
10040 \begin_layout LyX-Code
10041 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
10044 \begin_layout LyX-Code
10048 \begin_layout LyX-Code
10049 Product "[XFig: $$FName]"
10052 \begin_layout LyX-Code
10056 \begin_layout LyX-Code
10060 \begin_layout Standard
10061 As you can see, the template is enclosed in
10065 \SpecialChar \ldots{}
10071 It contains a header specifying some general settings, and for each supported
10072 primary document file format a section
10076 \SpecialChar \ldots{}
10084 \begin_layout Subsection
10085 The template header
10088 \begin_layout Description
10092 Template\InsetSpace ~
10096 A unique name for the template.
10097 It must not contain substitution macros (see below).
10100 \begin_layout Description
10104 GuiName\InsetSpace ~
10108 The text that is displayed on the button.
10109 This command must occur exactly once.
10112 \begin_layout Description
10116 HelpText\InsetSpace ~
10117 <text>\InsetSpace ~
10121 The help text that is used in the External dialog.
10122 Provide enough information to explain to the user just what the template
10123 can provide him with.
10124 This command must occur exactly once.
10127 \begin_layout Description
10131 InputFormat\InsetSpace ~
10135 The file format of the original file.
10136 This must be the name of a format that is known to LyX (see the
10141 ools\SpecialChar \menuseparator
10146 references:Conversion
10153 if the template can handle original files of more than one format.
10154 LyX will attempt to interrogate the file itself in order to deduce its
10155 format in this case.
10156 This command must occur exactly once.
10159 \begin_layout Description
10163 FileFilter\InsetSpace ~
10167 A glob pattern that is used in the file dialog to filter out the desired
10169 If there is more than one possible file extension (e.g.\InsetSpace ~
10178 ), use something like
10183 This command must occur exactly once.
10186 \begin_layout Description
10190 AutomaticProduction\InsetSpace ~
10194 Wether the file represented by the template must be generated by LyX.
10195 This command must occur exactly once.
10198 \begin_layout Description
10202 Transform\InsetSpace ~
10203 Rotate|Resize|Clip|Extra
10206 This command specifies which transformations are supported by this template.
10207 It may occur zero or more times.
10208 This command enables the corresponding tabs in the external dialog.
10213 command must have either a corresponding
10226 Otherwise the transformation will not be supported by that format.
10229 \begin_layout Subsection
10233 \begin_layout Description
10237 Format\InsetSpace ~
10238 LaTeX|PDFLaTeX|PlainText|DocBook
10241 The primary document file format that this format definition is for.
10242 Not every template has a sensible representation in all document file formats.
10243 Please define nevertheless a
10247 section for all formats.
10248 Use a dummy text when no representation is available.
10249 Then you can at least see a reference to the external material in the exported
10253 \begin_layout Description
10257 TransformCommand\InsetSpace ~
10258 Rotate\InsetSpace ~
10259 RotationLatexCommand
10262 This command specifies that the built in LaTeX command should be used for
10264 This command may occur once or not at all.
10267 \begin_layout Description
10271 TransformCommand\InsetSpace ~
10272 Resize\InsetSpace ~
10276 This command specifies that the built in LaTeX command should be used for
10278 This command may occur once or not at all.
10281 \begin_layout Description
10285 TransformOption\InsetSpace ~
10286 Rotate\InsetSpace ~
10287 RotationLatexOption
10290 This command specifies that rotation is done via an optional argument.
10291 This command may occur once or not at all.
10294 \begin_layout Description
10298 TransformOption\InsetSpace ~
10299 Resize\InsetSpace ~
10303 This command specifies that resizing is done via an optional argument.
10304 This command may occur once or not at all.
10307 \begin_layout Description
10311 TransformOption\InsetSpace ~
10316 This command specifies that clipping is done via an optional argument.
10317 This command may occur once or not at all.
10320 \begin_layout Description
10324 TransformOption\InsetSpace ~
10329 This command specifies that an extra optional argument is used.
10330 This command may occur once or not at all.
10333 \begin_layout Description
10337 Product\InsetSpace ~
10341 The text that is inserted in the exported document.
10342 This is actually the most important command and can be quite complex.
10343 This command must occur exactly once.
10346 \begin_layout Description
10350 UpdateFormat\InsetSpace ~
10354 The file format of the converted file.
10355 This must be the name of a format that is known to LyX (see the
10360 ools\SpecialChar \menuseparator
10365 references:Conversion
10368 This command must occur exactly once.
10371 \begin_layout Description
10375 UpdateResult\InsetSpace ~
10379 The file name of the converted file.
10380 The file name must be absolute.
10381 This command must occur exactly once.
10384 \begin_layout Description
10388 ReferencedFile\InsetSpace ~
10389 <format>\InsetSpace ~
10393 This command denotes files that are created by the conversion process and
10394 are needed for a particular export format.
10395 If the filename is relative, it is interpreted relative to the master document.
10396 This command may be given zero or more times.
10399 \begin_layout Description
10403 Requirement\InsetSpace ~
10407 The name of a required LaTeX package.
10408 The package is included via
10414 in the LaTeX preamble.
10415 This command may occur zero or more times.
10418 \begin_layout Description
10422 Preamble\InsetSpace ~
10426 This command specifies a preamble snippet that will be included in the
10428 It has to be defined using
10432 \SpecialChar \ldots{}
10438 This command may occur zero or more times.
10441 \begin_layout Description
10445 Option\InsetSpace ~
10446 <name>\InsetSpace ~
10450 This command defines an additional macro
10454 for substitution in
10463 itself may contain substitution macros.
10464 The advantage over using
10472 is that the substituted value of
10476 is sanitized so that it is a valid optional argument in the document format.
10477 This command may occur zero or more times.
10480 \begin_layout Subsection
10481 Preamble definitions
10484 \begin_layout Standard
10485 The external template configuration file may contain additional preamble
10486 definitions enclosed by
10490 \SpecialChar \ldots{}
10496 They can be used by the templates in the
10503 \begin_layout Section
10504 The substitution mechanism
10507 \begin_layout Standard
10508 When the external material facility invokes an external program, it is done
10509 on the basis of a command defined in the template configuration file.
10510 These commands can contain various macros that are expanded before execution.
10511 Execution always take place in the directory of the containing document.
10514 \begin_layout Standard
10515 Also, whenever external material is to be displayed, the name will be produced
10516 by the substitution mechanism, and most other commands in the template
10517 definition support substitution as well.
10520 \begin_layout Standard
10521 The available macros are the following:
10524 \begin_layout Description
10525 $$FName The filename of the file specified in the external material dialog.
10526 This is either an absolute name, or it is relative to the LyX document.
10529 \begin_layout Description
10530 $$Basename The filename without path and without the extension.
10533 \begin_layout Description
10534 $$Extension The file extension (including the dot).
10537 \begin_layout Description
10538 $$FPath The path part of
10542 (absolute name or relative to the LyX document).
10545 \begin_layout Description
10546 $$AbsPath The absolute file path.
10549 \begin_layout Description
10550 $$RelPathMaster The file path, relative to the master LyX document.
10553 \begin_layout Description
10554 $$RelPathParent The file path, relative to the LyX document.
10557 \begin_layout Description
10558 $$AbsOrRelPathMaster The file path, absolute or relative to the master LyX
10562 \begin_layout Description
10563 $$AbsOrRelPathParent The file path, absolute or relative to the LyX document.
10566 \begin_layout Description
10567 $$Tempname A name and full path to a temporary file which will be automatically
10568 deleted whenever the containing document is closed, or the external material
10572 \begin_layout Description
10574 \begin_inset Quotes eld
10578 \begin_inset Quotes erd
10581 ) This macro will expand to the contents of the file with the name
10588 \begin_layout Description
10589 $$Sysdir This macro will expand to the absolute path of the system directory.
10590 This is typically used to point to the various helper scripts that are
10594 \begin_layout Standard
10595 All path macros contain a trailing directory separator, so you can construct
10597 the absolute filename with
10599 $$AbsPath$$Basename$$Extension
10604 \begin_layout Standard
10605 The macros above are substituted in all commands unless otherwise noted.
10610 supports additionally the following substitutions if they are enabled by
10622 \begin_layout Description
10623 $$ResizeFront The front part of the resize command.
10626 \begin_layout Description
10627 $$ResizeBack The back part of the resize command.
10630 \begin_layout Description
10631 $$RotateFront The front part of the rotation command.
10634 \begin_layout Description
10635 $$RotateBack The back part of the rotation command.
10638 \begin_layout Standard
10639 The value string of the
10643 command supports additionally the following substitutions if they are enabled
10655 \begin_layout Description
10656 $$Clip The clip option.
10659 \begin_layout Description
10660 $$Extra The extra option.
10663 \begin_layout Description
10664 $$Resize The resize option.
10667 \begin_layout Description
10668 $$Rotate The rotation option.
10671 \begin_layout Standard
10672 You may ask why there are so many path macros.
10673 There are mainly two reasons:
10676 \begin_layout Standard
10677 First, relative and absolute file names should remain relative or absolute,
10679 Users may have reasons to prefer either form.
10680 Relative names are useful for portable documents that should work on different
10681 machines, for example.
10682 Absolute names may be required by some programs.
10685 \begin_layout Standard
10686 Second, LaTeX treats relative file names differently than LyX and other
10687 programs in nested included files.
10688 For LyX, a relative file name is always relative to the document that contains
10690 For LaTeX, it is always relative to the master document.
10691 These two definitions are identical if you have only one document, but
10692 differ if you have a master document that includes part documents.
10693 That means that relative filenames must be transformed when presented to
10695 Fortunately LyX does this automatically for you if you choose the right
10699 \begin_layout Standard
10700 So which path macro should be used in new template definitions? The rule
10704 \begin_layout Itemize
10709 if an absolute path is required.
10712 \begin_layout Itemize
10715 $$AbsOrRelPathMaster
10717 if the substituted string is some kind of LaTeX input.
10720 \begin_layout Itemize
10723 $$AbsOrRelPathParent
10725 in order to preserve the user's choice.
10728 \begin_layout Standard
10729 There are special cases where this rule does not work and e.g.\InsetSpace ~
10731 are needed, but normally it will work just fine.
10732 One example for such a case is the command
10734 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
10736 in the XFig template above: We can't use the absolute name because the
10741 files needs the relative name in order to rewrite the file content.
10744 \begin_layout Section
10745 Security discussion
10748 \begin_layout Standard
10749 \begin_inset Note Note
10752 \begin_layout Standard
10753 This section is outdated
10758 The external material feature interfaces with a lot of external programs
10759 and does so automatically, so we have to consider the security implications
10761 In particular, since you have the option of including your own filenames
10762 and/or parameter strings and those are expanded into a command, it seems
10763 that it would be possible to create a malicious document which executes
10764 arbitrary commands when a user views or prints the document.
10765 This is something we definately want to avoid.
10768 \begin_layout Standard
10769 However, since the external program commands are specified in the template
10770 configuration file only, there are no security issues if LyX is properly
10771 configured with safe templates only.
10772 This is so because the external programs are invoked with the
10776 -system call rather than the
10780 system-call, so it's not possible to execute arbitrary commands from the
10781 filename or parameter section via the shell.
10784 \begin_layout Standard
10785 This also implies that you are restricted in what command strings you can
10786 use in the external material templates.
10787 In particular, pipes and redirection are not readily available.
10788 This has to be so if LyX should remain safe.
10789 If you want to use some of the shell features, you should write a safe
10790 script to do this in a controlled manner, and then invoke the script from
10791 the command string.
10796 directory of the LyX installation, you can find a safe wrapper script
10798 general_command_wrapper.py
10800 that supports redirection of input and output.
10801 That can serve as an example for how to write safe template scripts.
10802 For a more advanced example that uses
10806 and friends, take a look at the
10813 \begin_layout Standard
10814 It is possible to design a template that interacts directly with the shell,
10815 but since this would allow a malicious user to execute arbitrary commands
10816 by writing clever filenames and/or parameters, we generally recommend that
10817 you only use safe scripts that work with the
10821 system call in a controlled manner.
10822 Of course, for use in a controlled environment, it can be tempting to just
10823 fall back to use ordinary shell scripts.
10824 If you do so, be aware that you
10828 provide an easily exploitable security hole in your system.
10829 Of course it stands to reason that such unsafe templates will never be
10830 included in the standard LyX distribution, although we do encourage people
10831 to submit new templates in the open source tradition.
10832 But LyX as shipped from the official distribution channels will never have
10836 \begin_layout Standard
10837 Including external material provides a lot of power, and you have to be
10838 careful not to introduce security hazards with this power.
10839 A subtle error in a single line in an innocent looking script can open
10840 the door to huge security problems.
10841 So if you do not fully understand the issues, we recommend that you consult
10842 a knowledgable security professional or the LyX development team if you
10843 have any questions about whether a given template is safe or not.
10844 And do this before you use it in an uncontrolled environment.
10847 \begin_layout Chapter
10851 \begin_layout Section
10855 \begin_layout Standard
10856 The LyX server is a method implemented in LyX that will enable other programs
10857 to talk to LyX, invoke LyX commands, and retrieve information about the
10858 LyX internal state.
10859 This is only intended for advanced users, but they should find it useful.
10862 \begin_layout Section
10863 Starting the LyX Server
10866 \begin_layout Standard
10867 The LyX server works through the use of a pair of named pipes.
10868 These are usually located in your home directory and have the names
10869 \begin_inset Quotes eld
10877 \begin_inset Quotes erd
10881 \begin_inset Quotes eld
10889 \begin_inset Quotes erd
10893 External programs write into
10897 and read back data from
10902 The stem of the pipe names can be defined in the
10907 ools\SpecialChar \menuseparator
10914 dialog, for example
10916 "/home/myhome/.lyxpipe"
10921 \begin_layout Standard
10930 ' to create the pipes.
10931 The above setting also has the effect of activating the LyX server.
10932 If one of the pipes already exists, LyX will assume that another LyX process
10933 is already running and will not start the server.
10934 To have several LyX processes with servers at the same time, you have to
10935 change the configuration between the start of the programs.
10938 \begin_layout Standard
10939 If you are developing a client program, you might find it useful to enable
10940 debugging information from the LyX server.
10941 Do this by starting LyX as
10943 lyx -dbg lyxserver.
10946 \begin_layout Standard
10947 Warning: if LyX crashes, it may not manage to remove the pipes; in this
10948 case you must remove them manually.
10949 If LyX starts and the pipes exist already, it will not start any server.
10952 \begin_layout Standard
10953 Other than this, there are a few points to consider:
10956 \begin_layout Itemize
10957 Both server and clients must run on UNIX or OS/2 machines.
10958 Communications between LyX on UNIX and clients on OS/2 or vice versa is
10959 not possible right now.
10962 \begin_layout Itemize
10963 On OS/2, only one client can connect to LyXServer at a time.
10966 \begin_layout Itemize
10967 On OS/2, clients must open inpipe with
10974 \begin_layout Standard
10975 You can find a complete example client written in C in the source distribution
10978 development/server_monitor.c
10983 \begin_layout Section
10984 Normal communication
10987 \begin_layout Standard
10988 To issue a LyX call, the client writes a line of ASCII text into the input
10990 This line has the following format:
10993 \begin_layout Quote
11007 \begin_layout Standard
11012 is a name that the client can choose arbitrarily.
11013 Its only use is that LyX will echo it if it sends an answer - so a client
11014 can dispatch results from different requesters.
11017 \begin_layout Standard
11022 is the function you want LyX to perform.
11023 It is the same as the commands you'd use in the minibuffer.
11026 \begin_layout Standard
11031 is an optional argument which is meaningful only to some functions (for
11033 \begin_inset Quotes eld
11037 \begin_inset Quotes erd
11040 which will insert the argument as text at the cursor position.)
11043 \begin_layout Standard
11044 The answer from LyX will arrive in the output pipe and be of the form
11047 \begin_layout Quote
11061 \begin_layout Standard
11070 are just echoed from the command request, while
11074 is more or less useful information filled according to how the command
11075 execution worked out.
11076 Some commands will return information about the internal state of LyX,
11078 \begin_inset Quotes eld
11082 \begin_inset Quotes erd
11085 , while other will return an empty data-response.
11086 This means that the command execution went fine.
11089 \begin_layout Standard
11090 In case of errors, the response from LyX will have this form
11093 \begin_layout Quote
11107 \begin_layout Standard
11112 should contain an explanation of why the command failed.
11115 \begin_layout Standard
11119 \begin_layout LyX-Code
11120 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
11123 \begin_layout LyX-Code
11124 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
11126 read a <~/.lyxpipe.out
11131 \begin_layout Section
11135 \begin_layout Standard
11136 LyX can notify clients of events going on asynchronously.
11137 Currently it will only do this if the user binds a key sequence with the
11139 \begin_inset Quotes eld
11143 \begin_inset Quotes erd
11147 The format of the string LyX sends is as follows:
11150 \begin_layout Quote
11159 \begin_layout Standard
11164 is the printed representation of the key sequence that was actually typed
11168 \begin_layout Standard
11169 This mechanism can be used to extend LyX's command set and implement macros:
11170 bind some key sequence to
11171 \begin_inset Quotes eld
11175 \begin_inset Quotes erd
11178 , start a client that listens on the out pipe, dispatches the command according
11179 to the sequence and starts a function that may use LyX calls and LyX requests
11180 to issue a command or a series of commands to LyX.
11183 \begin_layout Section
11184 The simple LyX Server Protocol
11187 \begin_layout Standard
11188 LyX implements a simple protocol that can be used for session management.
11189 All messages are of the form
11192 \begin_layout Quote
11202 \begin_layout Standard
11208 \begin_inset Quotes eld
11212 \begin_inset Quotes erd
11216 \begin_inset Quotes eld
11220 \begin_inset Quotes erd
11225 \begin_inset Quotes eld
11229 \begin_inset Quotes erd
11232 is received from a client, LyX will report back to inform the client that
11233 it's listening to it's messages, while
11234 \begin_inset Quotes eld
11238 \begin_inset Quotes erd
11241 sent from LyX will inform clients that LyX is closing.
11244 \begin_layout Chapter
11249 \begin_layout Standard
11250 This appendix is a huge cross-reference to all the English language keybindings.
11251 Originally, we simply wanted to list all of the key bindings followed by
11252 the function it's bound to.
11253 That way, a user can look up a key to find out what it does.
11254 We then decided, what the hey, why not include the default toolbar and
11255 menu bindings, too.
11256 Please note this section is likely to be very out of date.
11259 \begin_layout Standard
11260 The form is really self-explanatory, but here are a few tips: all entries
11261 are arranged roughly alphabetically for a given modifier (
11270 For the general keyboard layout, simpler prefixes precede the more complex
11280 All entries were gleaned from the default user interface and binding files
11281 located in the directories
11283 \SpecialChar \ldots{}
11288 \SpecialChar \ldots{}
11291 ; they should be treated as the final word on the bindings.
11294 \begin_layout Standard
11295 As a final note, be aware that some window managers (such as FVWM) take
11296 control of some of the function keys or motion keys.
11301 is listed here as generating
11305 , but FVWM grabs it and uses it to change virtual desktops instead.
11306 Very annoying unless you instruct your window manager to stop intercepting
11310 \begin_layout Section
11314 \begin_layout LyX-Code
11318 \begin_layout LyX-Code
11322 \begin_layout LyX-Code
11326 \begin_layout LyX-Code
11327 Icon "buffer-write"
11330 \begin_layout LyX-Code
11331 Icon "buffer-print"
11334 \begin_layout LyX-Code
11338 \begin_layout LyX-Code
11342 \begin_layout LyX-Code
11346 \begin_layout LyX-Code
11350 \begin_layout LyX-Code
11354 \begin_layout LyX-Code
11358 \begin_layout LyX-Code
11362 \begin_layout LyX-Code
11366 \begin_layout LyX-Code
11370 \begin_layout LyX-Code
11374 \begin_layout LyX-Code
11378 \begin_layout LyX-Code
11382 \begin_layout LyX-Code
11383 Icon "footnote-insert"
11386 \begin_layout LyX-Code
11387 Icon "marginpar-insert"
11390 \begin_layout LyX-Code
11394 \begin_layout LyX-Code
11398 \begin_layout LyX-Code
11399 Icon "figure-insert"
11402 \begin_layout LyX-Code
11403 Icon "dialog-tabular-insert"
11406 \begin_layout LyX-Code
11410 \begin_layout Section
11414 \begin_layout Standard
11415 Note that the following bindings are for LyX with English menus.
11416 The second character of the binding depends on the menu language.
11418 \begin_inset Quotes eld
11426 \begin_inset Quotes erd
11429 is with German menus
11430 \begin_inset Quotes eld
11438 \begin_inset Quotes erd
11442 To find out the shortcuts of your language press the Meta (Alt)-key and
11443 press then the keys of the underlined characters of the menu names.
11446 \begin_layout Subsection
11451 \labelwidthstring 00.00.0000
11463 \labelwidthstring 00.00.0000
11475 \labelwidthstring 00.00.0000
11487 \labelwidthstring 00.00.0000
11501 \labelwidthstring 00.00.0000
11513 \labelwidthstring 00.00.0000
11527 \labelwidthstring 00.00.0000
11539 \labelwidthstring 00.00.0000
11551 \labelwidthstring 00.00.0000
11563 \labelwidthstring 00.00.0000
11575 \labelwidthstring 00.00.0000
11583 buffer-new-template
11587 \labelwidthstring 00.00.0000
11602 \labelwidthstring 00.00.0000
11613 \labelwidthstring 00.00.0000
11624 \labelwidthstring 00.00.0000
11635 \labelwidthstring 00.00.0000
11646 \labelwidthstring 00.00.0000
11657 \labelwidthstring 00.00.0000
11669 \labelwidthstring 00.00.0000
11680 \begin_layout Subsection
11685 \labelwidthstring 00.00.0000
11697 \labelwidthstring 00.00.0000
11709 \labelwidthstring 00.00.0000
11721 \labelwidthstring 00.00.0000
11733 \labelwidthstring 00.00.0000
11745 \labelwidthstring 00.00.0000
11757 \labelwidthstring 00.00.0000
11772 \labelwidthstring 00.00.0000
11779 tabular-feature append-row
11783 \labelwidthstring 00.00.0000
11790 tabular-feature toggle-line-bottom
11794 \labelwidthstring 00.00.0000
11801 tabular-feature align-center
11805 \labelwidthstring 00.00.0000
11812 tabular-feature delete-column
11816 \labelwidthstring 00.00.0000
11823 tabular-feature align-left
11827 \labelwidthstring 00.00.0000
11834 tabular-feature align-right
11838 \labelwidthstring 00.00.0000
11845 tabular-feature toggle-line-left
11849 \labelwidthstring 00.00.0000
11856 tabular-feature multicolumn
11860 \labelwidthstring 00.00.0000
11867 tabular-feature valign-center
11871 \labelwidthstring 00.00.0000
11878 tabular-feature valign-top
11882 \labelwidthstring 00.00.0000
11889 tabular-feature toggle-line-right
11893 \labelwidthstring 00.00.0000
11900 tabular-feature toggle-line-top
11904 \labelwidthstring 00.00.0000
11911 tabular-feature append-column
11915 \labelwidthstring 00.00.0000
11922 tabular-feature valign-bottom
11926 \labelwidthstring 00.00.0000
11933 tabular-feature delete-row
11938 \labelwidthstring 00.00.0000
11951 \labelwidthstring 00.00.0000
11958 floats-operate openfoot
11962 \labelwidthstring 00.00.0000
11969 floats-operate closefoot
11973 \labelwidthstring 00.00.0000
11980 floats-operate openfig
11984 \labelwidthstring 00.00.0000
11995 \labelwidthstring 00.00.0000
12006 \labelwidthstring 00.00.0000
12013 floats-operate closefig
12018 \labelwidthstring 00.00.0000
12030 \labelwidthstring 00.00.0000
12044 \labelwidthstring 00.00.0000
12056 \labelwidthstring 00.00.0000
12068 \labelwidthstring 00.00.0000
12082 \labelwidthstring 00.00.0000
12094 \labelwidthstring 00.00.0000
12109 \labelwidthstring 00.00.0000
12116 primary-selection-paste
12120 \labelwidthstring 00.00.0000
12127 primary-selection-paste paragraph
12131 \begin_layout Subsection
12136 \labelwidthstring 00.00.0000
12151 \labelwidthstring 00.00.0000
12158 buffer-float-insert algorithm
12162 \labelwidthstring 00.00.0000
12169 buffer-float-insert wide-tab
12173 \labelwidthstring 00.00.0000
12180 buffer-float-insert figure
12184 \labelwidthstring 00.00.0000
12191 buffer-float-insert table
12195 \labelwidthstring 00.00.0000
12202 buffer-float-insert wide-fig
12207 \labelwidthstring 00.00.0000
12215 dialog-tabular-insert
12219 \labelwidthstring 00.00.0000
12231 \labelwidthstring 00.00.0000
12243 \labelwidthstring 00.00.0000
12251 buffer-child-insert
12255 \labelwidthstring 00.00.0000
12267 \labelwidthstring 00.00.0000
12279 \labelwidthstring 00.00.0000
12291 \labelwidthstring 00.00.0000
12303 \labelwidthstring 00.00.0000
12315 \labelwidthstring 00.00.0000
12327 \labelwidthstring 00.00.0000
12339 \labelwidthstring 00.00.0000
12354 \labelwidthstring 00.00.0000
12365 \labelwidthstring 00.00.0000
12376 \labelwidthstring 00.00.0000
12387 \labelwidthstring 00.00.0000
12398 \labelwidthstring 00.00.0000
12409 \labelwidthstring 00.00.0000
12421 \labelwidthstring 00.00.0000
12433 \labelwidthstring 00.00.0000
12448 \labelwidthstring 00.00.0000
12455 protected-space-insert
12459 \labelwidthstring 00.00.0000
12466 end-of-sentence-period-insert
12470 \labelwidthstring 00.00.0000
12481 \labelwidthstring 00.00.0000
12492 \labelwidthstring 00.00.0000
12503 \labelwidthstring 00.00.0000
12510 menu-separator-insert
12514 \labelwidthstring 00.00.0000
12521 hyphenation-point-insert
12525 \labelwidthstring 00.00.0000
12536 \labelwidthstring 00.00.0000
12543 command-sequence math-insert ^;math-mode;
12547 \labelwidthstring 00.00.0000
12554 command-sequence math-insert _;math-mode;
12559 \labelwidthstring 00.00.0000
12574 \labelwidthstring 00.00.0000
12581 file-insert-plaintext lines
12585 \labelwidthstring 00.00.0000
12592 file-insert-plaintext paragraphs
12596 \labelwidthstring 00.00.0000
12608 \labelwidthstring 00.00.0000
12620 \labelwidthstring 00.00.0000
12632 \labelwidthstring 00.00.0000
12643 \begin_layout Subsection
12648 \labelwidthstring 00.00.0000
12660 \labelwidthstring 00.00.0000
12672 \labelwidthstring 00.00.0000
12684 \labelwidthstring 00.00.0000
12696 \labelwidthstring 00.00.0000
12708 \labelwidthstring 00.00.0000
12720 \labelwidthstring 00.00.0000
12732 \labelwidthstring 00.00.0000
12744 \labelwidthstring 00.00.0000
12752 layout-save-default
12756 \labelwidthstring 00.00.0000
12768 \labelwidthstring 00.00.0000
12780 \labelwidthstring 00.00.0000
12791 \begin_layout Subsubsection
12794 Layout\SpecialChar \menuseparator
12801 \labelwidthstring 00.00.0000
12813 \labelwidthstring 00.00.0000
12825 \labelwidthstring 00.00.0000
12837 \labelwidthstring 00.00.0000
12849 \labelwidthstring 00.00.0000
12861 \labelwidthstring 00.00.0000
12873 \labelwidthstring 00.00.0000
12885 \labelwidthstring 00.00.0000
12897 \labelwidthstring 00.00.0000
12909 \labelwidthstring 00.00.0000
12921 \labelwidthstring 00.00.0000
12933 \labelwidthstring 00.00.0000
12945 \labelwidthstring 00.00.0000
12957 \labelwidthstring 00.00.0000
12969 \labelwidthstring 00.00.0000
12981 \labelwidthstring 00.00.0000
12993 \labelwidthstring 00.00.0000
13005 \labelwidthstring 00.00.0000
13017 \labelwidthstring 00.00.0000
13029 \labelwidthstring 00.00.0000
13041 \labelwidthstring 00.00.0000
13053 \labelwidthstring 00.00.0000
13065 \labelwidthstring 00.00.0000
13077 \labelwidthstring 00.00.0000
13089 \labelwidthstring 00.00.0000
13101 \labelwidthstring 00.00.0000
13113 \labelwidthstring 00.00.0000
13125 \labelwidthstring 00.00.0000
13137 \labelwidthstring 00.00.0000
13149 \labelwidthstring 00.00.0000
13161 \labelwidthstring 00.00.0000
13173 \labelwidthstring 00.00.0000
13184 \begin_layout Subsection
13188 \begin_layout Subsection
13192 \begin_layout Subsection
13196 \begin_layout Subsection
13201 \labelwidthstring 00.00.0000
13213 \labelwidthstring 00.00.0000
13225 \labelwidthstring 00.00.0000
13237 \labelwidthstring 00.00.0000
13249 \labelwidthstring 00.00.0000
13261 \labelwidthstring 00.00.0000
13269 layout ShortFoilhead
13273 \labelwidthstring 00.00.0000
13285 \labelwidthstring 00.00.0000
13297 \labelwidthstring 00.00.0000
13309 \labelwidthstring 00.00.0000
13321 \labelwidthstring 00.00.0000
13329 layout ShortRotatefoilhead
13333 \labelwidthstring 00.00.0000
13345 \labelwidthstring 00.00.0000
13357 \labelwidthstring 00.00.0000
13369 \labelwidthstring 00.00.0000
13377 drop-layouts-choice
13381 \labelwidthstring 00.00.0000
13396 \labelwidthstring 00.00.0000
13411 \labelwidthstring 00.00.0000
13423 \labelwidthstring 00.00.0000
13435 \labelwidthstring 00.00.0000
13443 layout Subsubsection
13447 \labelwidthstring 00.00.0000
13459 \labelwidthstring 00.00.0000
13467 layout Subparagraph
13471 \labelwidthstring 00.00.0000
13475 asterisk\InsetSpace ~
13484 \labelwidthstring 00.00.0000
13488 asterisk\InsetSpace ~
13497 \labelwidthstring 00.00.0000
13501 asterisk\InsetSpace ~
13510 \labelwidthstring 00.00.0000
13514 asterisk\InsetSpace ~
13523 \labelwidthstring 00.00.0000
13527 asterisk\InsetSpace ~
13532 layout Subsubsection*
13536 \labelwidthstring 00.00.0000
13540 asterisk\InsetSpace ~
13549 \labelwidthstring 00.00.0000
13553 asterisk\InsetSpace ~
13558 layout Subparagraph*
13562 \labelwidthstring 00.00.0000
13574 \labelwidthstring 00.00.0000
13582 layout Bibliography
13586 \labelwidthstring 00.00.0000
13598 \labelwidthstring 00.00.0000
13610 \labelwidthstring 00.00.0000
13622 \labelwidthstring 00.00.0000
13634 \labelwidthstring 00.00.0000
13646 \labelwidthstring 00.00.0000
13654 layout Rotatefoilhead
13658 \labelwidthstring 00.00.0000
13666 layout RightAddress
13670 \labelwidthstring 00.00.0000
13682 \labelwidthstring 00.00.0000
13694 \labelwidthstring 00.00.0000
13706 \labelwidthstring 00.00.0000
13717 \begin_layout Standard
13718 These ones are kept for backwards compatibility, but only make sense on
13723 \labelwidthstring 00.00.0000
13735 \labelwidthstring 00.00.0000
13743 layout Subsubsection*
13747 \labelwidthstring 00.00.0000
13758 \begin_layout Section
13762 \begin_layout Subsection
13769 \labelwidthstring 00.00.0000
13780 \labelwidthstring 00.00.0000
13791 \labelwidthstring 00.00.0000
13802 \labelwidthstring 00.00.0000
13813 \labelwidthstring 00.00.0000
13824 \labelwidthstring 00.00.0000
13835 \labelwidthstring 00.00.0000
13842 hyphenation-point-insert
13846 \labelwidthstring 00.00.0000
13857 \labelwidthstring 00.00.0000
13864 line-delete-forward
13868 \labelwidthstring 00.00.0000
13879 \labelwidthstring 00.00.0000
13890 \labelwidthstring 00.00.0000
13901 \labelwidthstring 00.00.0000
13912 \labelwidthstring 00.00.0000
13923 \labelwidthstring 00.00.0000
13934 \labelwidthstring 00.00.0000
13945 \labelwidthstring 00.00.0000
13956 \labelwidthstring 00.00.0000
13967 \labelwidthstring 00.00.0000
13978 \labelwidthstring 00.00.0000
13989 \labelwidthstring 00.00.0000
14000 \labelwidthstring 00.00.0000
14012 \labelwidthstring 00.00.0000
14024 \labelwidthstring 00.00.0000
14036 \labelwidthstring 00.00.0000
14048 \labelwidthstring 00.00.0000
14061 \labelwidthstring 00.00.0000
14073 \labelwidthstring 00.00.0000
14085 \labelwidthstring 00.00.0000
14097 \labelwidthstring 00.00.0000
14109 \labelwidthstring 00.00.0000
14122 \labelwidthstring 00.00.0000
14134 \labelwidthstring 00.00.0000
14146 \labelwidthstring 00.00.0000
14159 \labelwidthstring 00.00.0000
14172 \labelwidthstring 00.00.0000
14185 \labelwidthstring 00.00.0000
14198 \labelwidthstring 00.00.0000
14211 \labelwidthstring 00.00.0000
14224 \labelwidthstring 00.00.0000
14236 \labelwidthstring 00.00.0000
14248 \labelwidthstring 00.00.0000
14260 \labelwidthstring 00.00.0000
14268 menu-open Documents
14272 \labelwidthstring 00.00.0000
14284 \labelwidthstring 00.00.0000
14296 \labelwidthstring 00.00.0000
14308 \labelwidthstring 00.00.0000
14320 \labelwidthstring 00.00.0000
14332 \labelwidthstring 00.00.0000
14340 buffer-toggle-read-only
14344 \labelwidthstring 00.00.0000
14356 \labelwidthstring 00.00.0000
14368 \labelwidthstring 00.00.0000
14380 \labelwidthstring 00.00.0000
14391 \labelwidthstring 00.00.0000
14402 \labelwidthstring 00.00.0000
14413 \labelwidthstring 00.00.0000
14424 \labelwidthstring 00.00.0000
14435 \labelwidthstring 00.00.0000
14446 \labelwidthstring 00.00.0000
14457 \labelwidthstring 00.00.0000
14468 \labelwidthstring 00.00.0000
14479 \labelwidthstring 00.00.0000
14490 \labelwidthstring 00.00.0000
14501 \labelwidthstring 00.00.0000
14512 \labelwidthstring 00.00.0000
14523 \labelwidthstring 00.00.0000
14534 \labelwidthstring 00.00.0000
14541 word-delete-forward
14545 \labelwidthstring 00.00.0000
14552 word-delete-backward
14556 \labelwidthstring 00.00.0000
14567 \labelwidthstring 00.00.0000
14574 end-of-sentence-period-insert
14578 \labelwidthstring 00.00.0000
14585 protected-space-insert
14589 \labelwidthstring 00.00.0000
14600 \labelwidthstring 00.00.0000
14611 \labelwidthstring 00.00.0000
14622 \labelwidthstring 00.00.0000
14633 \labelwidthstring 00.00.0000
14644 \labelwidthstring 00.00.0000
14655 \labelwidthstring 00.00.0000
14662 buffer-begin-select
14666 \labelwidthstring 00.00.0000
14677 \labelwidthstring 00.00.0000
14684 paragraph-up-select
14688 \labelwidthstring 00.00.0000
14695 paragraph-down-select
14699 \labelwidthstring 00.00.0000
14706 word-backward-select
14710 \labelwidthstring 00.00.0000
14717 word-forward-select
14721 \labelwidthstring 00.00.0000
14732 \labelwidthstring 00.00.0000
14739 word-delete-forward
14743 \labelwidthstring 00.00.0000
14754 \labelwidthstring 00.00.0000
14765 \labelwidthstring 00.00.0000
14776 \labelwidthstring 00.00.0000
14787 \labelwidthstring 00.00.0000
14794 break-paragraph-keep-layout
14798 \labelwidthstring 00.00.0000
14808 \begin_layout Subsection
14815 \labelwidthstring 00.00.0000
14826 \labelwidthstring 00.00.0000
14837 \labelwidthstring 00.00.0000
14848 \labelwidthstring 00.00.0000
14859 \labelwidthstring 00.00.0000
14870 \labelwidthstring 00.00.0000
14881 \labelwidthstring 00.00.0000
14892 \labelwidthstring 00.00.0000
14903 \labelwidthstring 00.00.0000
14914 \labelwidthstring 00.00.0000
14925 \labelwidthstring 00.00.0000
14936 \labelwidthstring 00.00.0000
14947 \labelwidthstring 00.00.0000
14958 \labelwidthstring 00.00.0000
14969 \labelwidthstring 00.00.0000
14980 \labelwidthstring 00.00.0000
14991 \labelwidthstring 00.00.0000
15002 \labelwidthstring 00.00.0000
15013 \labelwidthstring 00.00.0000
15024 \labelwidthstring 00.00.0000
15035 \labelwidthstring 00.00.0000
15046 \labelwidthstring 00.00.0000
15057 \labelwidthstring 00.00.0000
15064 protected-space-insert
15068 \labelwidthstring 00.00.0000
15079 \labelwidthstring 00.00.0000
15090 \labelwidthstring 00.00.0000
15101 \labelwidthstring 00.00.0000
15108 buffer-new-template
15112 \labelwidthstring 00.00.0000
15123 \labelwidthstring 00.00.0000
15134 \labelwidthstring 00.00.0000
15145 \labelwidthstring 00.00.0000
15156 \labelwidthstring 00.00.0000
15167 \labelwidthstring 00.00.0000
15178 \labelwidthstring 00.00.0000
15189 \labelwidthstring 00.00.0000
15196 end-of-sentence-period-insert
15200 \labelwidthstring 00.00.0000
15211 \labelwidthstring 00.00.0000
15222 \labelwidthstring 00.00.0000
15229 hyphenation-point-insert
15233 \labelwidthstring 00.00.0000
15244 \labelwidthstring 00.00.0000
15251 protected-space-insert
15255 \labelwidthstring 00.00.0000
15266 \labelwidthstring 00.00.0000
15277 \labelwidthstring 00.00.0000
15288 \labelwidthstring 00.00.0000
15299 \labelwidthstring 00.00.0000
15310 \labelwidthstring 00.00.0000
15321 \labelwidthstring 00.00.0000
15332 \labelwidthstring 00.00.0000
15343 \labelwidthstring 00.00.0000
15354 \labelwidthstring 00.00.0000
15365 \labelwidthstring 00.00.0000
15376 \labelwidthstring 00.00.0000
15387 \labelwidthstring 00.00.0000
15398 \labelwidthstring 00.00.0000
15409 \labelwidthstring 00.00.0000
15420 \labelwidthstring 00.00.0000
15427 word-delete-forward
15431 \labelwidthstring 00.00.0000
15438 word-delete-backward
15442 \labelwidthstring 00.00.0000
15453 \labelwidthstring 00.00.0000
15464 \labelwidthstring 00.00.0000
15475 \labelwidthstring 00.00.0000
15486 \labelwidthstring 00.00.0000
15493 paragraph-down-select
15497 \labelwidthstring 00.00.0000
15508 \labelwidthstring 00.00.0000
15515 buffer-begin-select
15519 \labelwidthstring 00.00.0000
15526 word-backward-select
15530 \labelwidthstring 00.00.0000
15537 word-forward-select
15541 \labelwidthstring 00.00.0000
15548 paragraph-up-select
15552 \labelwidthstring 00.00.0000
15563 \labelwidthstring 00.00.0000
15570 break-paragraph-keep-layout
15574 \labelwidthstring 00.00.0000
15585 \labelwidthstring 00.00.0000
15596 \labelwidthstring 00.00.0000
15607 \labelwidthstring 00.00.0000
15618 \labelwidthstring 00.00.0000
15629 \labelwidthstring 00.00.0000
15640 \labelwidthstring 00.00.0000
15651 \labelwidthstring 00.00.0000
15662 \labelwidthstring 00.00.0000
15673 \labelwidthstring 00.00.0000
15684 \labelwidthstring 00.00.0000
15694 \begin_layout Subsection
15700 \begin_layout Standard
15701 These are LyX keyboard definitions for mathematics, similar to those of
15705 \begin_layout Standard
15706 The bindings file and the present documentation were prepared by Serge Winitzki
15707 with assistance from Jean-Marc Lasgouttes.
15708 Version 1.3, for LyX 1.2.x and 1.3.x.
15711 \begin_layout Standard
15712 These definitions make it a lot easier to type equations without using the
15713 mouse, especially for people familiar with Scientific Word.
15714 The standard LyX bindings such as
15725 \begin_layout Standard
15726 Tip: to find the "LyX bind name" for a key, look at the status bar after
15727 typing some non-existent key combination.
15729 to find how "Ctrl-&" is referenced, press Ctrl-S and then Ctrl-&: the status
15730 bar shows "C-s S-C-ampersand." (This does not work in LyX 1.3.0!)
15734 \labelwidthstring 00.00.0000
15743 -- Copy, cut, paste is as in Sciword,
15759 \labelwidthstring 00.00.0000
15768 -- Display equation toggle: type
15772 to insert a displayed formula (
15777 \begin_inset Quotes eld
15781 \begin_inset Quotes erd
15789 in a displayed formula to convert it back to an inline formula.
15793 \labelwidthstring 00.00.0000
15808 to insert a fraction (
15813 \begin_inset Quotes eld
15817 \begin_inset Quotes erd
15821 You can also select an expression and type
15825 to convert it to the numerator of a fraction.
15834 end of the denominator will delete the numerator and convert the denominator
15839 \labelwidthstring 00.00.0000
15851 \begin_inset Formula $\int$
15859 \begin_inset Quotes eld
15863 \begin_inset Quotes erd
15870 \labelwidthstring 00.00.0000
15877 line-delete-forward
15879 -- Emacs-like binding: delete forward of cursor to end of line.
15883 \labelwidthstring 00.00.0000
15892 -- A text/math toggle (
15897 \begin_inset Quotes eld
15901 \begin_inset Quotes erd
15904 ): switches to math in text mode, and also inserts roman text in math mode.
15914 \begin_inset Quotes eld
15918 \begin_inset Quotes erd
15925 \labelwidthstring 00.00.0000
15934 -- Add/remove numbering in a single equation.
15938 \labelwidthstring 00.00.0000
15947 -- Add/remove numbering at a line in equation arrays.
15950 \begin_layout Standard
15951 The above commands are toggles that control the numbering of equations (
15956 \begin_inset Quotes eld
15960 \begin_inset Quotes erd
15964 Note: when deleting a number in a labeled eqnarray, the label is not really
15965 removed (the TeX code becomes
15966 \begin_inset Quotes eld
15978 \begin_inset Quotes erd
15981 ) and this generates a (harmless) LaTeX warning.
15985 \labelwidthstring 00.00.0000
15994 -- Open a new document.
15999 \labelwidthstring 00.00.0000
16008 -- Insert a quote character " (
16013 \begin_inset Quotes eld
16017 \begin_inset Quotes erd
16022 \begin_inset Quotes eld
16026 \begin_inset Quotes erd
16029 double quote character that you get by default.
16033 \labelwidthstring 00.00.0000
16044 -- Square root sign
16045 \begin_inset Formula $\sqrt{x}$
16053 \begin_inset Quotes eld
16057 \begin_inset Quotes erd
16064 \labelwidthstring 00.00.0000
16076 \begin_inset Formula $\sqrt[n]{x}$
16083 \labelwidthstring 00.00.0000
16092 -- Another binding for a switch between the text and the math mode (
16097 \begin_inset Quotes eld
16101 \begin_inset Quotes erd
16105 Note that the roman text inserted in math mode is special.
16109 \labelwidthstring 00.00.0000
16122 the selected text (text mode only, use things like
16138 \labelwidthstring 00.00.0000
16147 -- W*ndows heritage.
16151 \labelwidthstring 00.00.0000
16160 -- Close the current document (again, a W*ndows heritage).
16164 \labelwidthstring 00.00.0000
16175 \labelwidthstring 00.00.0000
16186 \labelwidthstring 00.00.0000
16196 \begin_inset Quotes eld
16200 \begin_inset Quotes erd
16204 \begin_inset Quotes eld
16208 \begin_inset Quotes erd
16214 \begin_layout Standard
16215 Bracket delimiters: press
16219 -<bracket key> to insert a matching pair of delimiters.
16224 inserts a pair of parentheses
16225 \begin_inset Formula $\left[\right]$
16233 does the same thing.) It will switch to math mode if needed.
16234 The supported characters are ( [ { < |.
16235 It is the same to press the right or the left bracket.
16236 The corresponding delimiters are
16237 \begin_inset Formula $\left(\right)$
16241 \begin_inset Formula $\left[\right]$
16245 \begin_inset Formula $\left\{ \right\} $
16249 \begin_inset Formula $\left\langle \right\rangle $
16253 \begin_inset Formula $\left|\right|$
16258 \begin_inset Quotes eld
16262 \begin_inset Quotes erd
16265 and resize with their contents.
16266 Use Math Panel to get other or non-matching delimiters.
16267 Press backspace on the
16271 delimiter to remove both
16272 \begin_inset Quotes eld
16276 \begin_inset Quotes erd
16279 delimiters without removing their contents.
16283 \labelwidthstring 00.00.0000
16292 -- for convenience, pressing
16306 \labelwidthstring 00.00.0000
16317 \labelwidthstring 00.00.0000
16328 \labelwidthstring 00.00.0000
16339 \labelwidthstring 00.00.0000
16350 \labelwidthstring 00.00.0000
16361 \labelwidthstring 00.00.0000
16368 math-delim langle rangle
16370 -- angular delimiters
16371 \begin_inset Formula $\left\langle \right\rangle $
16374 , not to confuse with ordinary < > signs.
16378 \labelwidthstring 00.00.0000
16385 math-delim langle rangle
16388 \begin_layout Standard
16389 The bar bracket: on some keyboards (e.g.\InsetSpace ~
16390 some British ones), the bar character
16395 -something and on some wayward Unices to "brokenbar".
16396 So we define all of these keys as well.
16400 \labelwidthstring 00.00.0000
16411 \labelwidthstring 00.00.0000
16422 \labelwidthstring 00.00.0000
16433 \labelwidthstring 00.00.0000
16444 \labelwidthstring 00.00.0000
16454 \begin_layout Standard
16455 Accents are in most cases
16459 -<accent key>, e.g.\InsetSpace ~
16473 for tilde (you also need to press
16479 \begin_inset Quotes eld
16491 \begin_inset Quotes erd
16495 Some accents work only in math mode and others only in text mode.
16499 \labelwidthstring 00.00.0000
16508 -- overdot accent, ȧ (text mode only).
16512 \labelwidthstring 00.00.0000
16524 \begin_inset Formula $\dot{a}$
16527 (math mode only -- in physics this denotes a first derivative).
16531 \labelwidthstring 00.00.0000
16542 -- Vector accent over math
16543 \begin_inset Formula $\overrightarrow{x}$
16550 \labelwidthstring 00.00.0000
16559 -- umlaut accent, ä (text mode only)
16563 \labelwidthstring 00.00.0000
16574 -- double dot accent,
16575 \begin_inset Formula $\ddot{a}$
16578 (math mode only -- in physics this denotes a second derivative).
16579 To get a triple dot in math mode, use
16587 \labelwidthstring 00.00.0000
16596 -- grave accent à (text mode only, use
16606 \labelwidthstring 00.00.0000
16615 -- tilde accent ã (text mode only, use
16625 \labelwidthstring 00.00.0000
16634 -- acute accent á (text mode only, use
16644 \labelwidthstring 00.00.0000
16653 -- circumflex (caret) accent â (text mode only, use
16662 \begin_layout Standard
16664 The new key S-F2 for creating a LaTeX file seems handy.
16668 \labelwidthstring 00.00.0000
16677 -- Save current document.
16681 \labelwidthstring 00.00.0000
16688 buffer-export latex
16690 -- Write a LaTeX file for the current document.
16694 \labelwidthstring 00.00.0000
16703 -- Find and replace dialog.
16707 \labelwidthstring 00.00.0000
16724 \labelwidthstring 00.00.0000
16737 to quit LyX is the W*ndows w*ndow manager's mnemonic.
16740 \begin_layout Standard
16749 are used to switch fonts.
16754 to switch back to the normal font.
16755 The non-default font switches
16763 all work as toggles.
16764 They also work on the whole word if you put the cursor in the middle of
16765 the word, or if you select some text.
16769 \labelwidthstring 00.00.0000
16778 -- stop using any special font
16782 \labelwidthstring 00.00.0000
16799 \labelwidthstring 00.00.0000
16816 \labelwidthstring 00.00.0000
16833 \labelwidthstring 00.00.0000
16847 (Used sometimes for people's names.)
16850 \begin_layout Standard
16856 \begin_inset Quotes eld
16860 \begin_inset Quotes erd
16867 key (useful e.g.\InsetSpace ~
16868 if the keyboard has no working
16875 \begin_layout Standard
16876 Here are some Sciword-inspired mnemonics for frequently used math symbols.
16877 Many symbols start with a
16886 cannot be itself bound to anything.
16890 \labelwidthstring 00.00.0000
16902 \begin_inset Quotes eld
16906 \begin_inset Quotes erd
16910 \begin_inset Formula $\prime$
16914 This is frequently unnecessary: in most cases the normal apostrophe works
16917 \begin_inset Formula $x'+2x=0$
16920 , but in some cases this would generate a double superscript error in LaTeX.
16922 \begin_inset Formula $x^{\prime2}$
16926 \begin_inset Formula $x$
16929 prime squared) must be entered with the prime character.
16933 \labelwidthstring 00.00.0000
16941 command-sequence math-superscript; math-insert
16945 -- Insert a prime as a superscript (see example above).
16949 \labelwidthstring 00.00.0000
16958 -- Insert an upper index.
16965 \labelwidthstring 00.00.0000
16974 -- Insert a lower index.
16981 \labelwidthstring 00.00.0000
16993 -- Partial derivative symbol
16994 \begin_inset Formula $\partial$
17001 \labelwidthstring 00.00.0000
17013 -- Summation symbol
17014 \begin_inset Formula $\sum$
17017 (not the same as the Greek letter uppercase Sigma
17018 \begin_inset Formula $\Sigma$
17021 because it can resize and allows smart upper/lower limits).
17025 \labelwidthstring 00.00.0000
17038 \begin_inset Formula $\prod$
17041 (not the same as the Greek letter uppercase Pi,
17042 \begin_inset Formula $\Pi$
17049 \labelwidthstring 00.00.0000
17062 \begin_inset Formula $\infty$
17069 \labelwidthstring 00.00.0000
17082 \begin_inset Formula $\times$
17089 \labelwidthstring 00.00.0000
17099 -- Insert a stacked array
17100 \begin_inset Formula $\begin{array}{c}
17102 \end{array}\end{array}$
17106 (Frequently useful in formulae.)
17110 \labelwidthstring 00.00.0000
17121 \begin_inset Formula $\times$
17125 \begin_inset Formula $\begin{array}{ccc}
17130 (Then you can modify its size using the
17132 Edit\SpecialChar \menuseparator
17139 \labelwidthstring 00.00.0000
17152 \begin_inset Quotes eld
17156 \begin_inset Quotes erd
17160 \begin_inset Formula $\dagger$
17167 \labelwidthstring 00.00.0000
17180 \begin_inset Quotes eld
17184 \begin_inset Quotes erd
17188 \begin_inset Formula $\equiv$
17195 \labelwidthstring 00.00.0000
17207 \begin_inset Quotes eld
17210 Approximate equality
17211 \begin_inset Quotes erd
17215 \begin_inset Formula $\approx$
17222 \labelwidthstring 00.00.0000
17234 \begin_inset Quotes eld
17238 \begin_inset Quotes erd
17242 \begin_inset Formula $\sim$
17249 \labelwidthstring 00.00.0000
17261 \begin_inset Formula $\rightarrow$
17265 \begin_inset Formula $\lim_{x\rightarrow0}$
17272 \labelwidthstring 00.00.0000
17284 \begin_inset Formula $\leq$
17291 \labelwidthstring 00.00.0000
17302 -- Greater-or-equal
17303 \begin_inset Formula $\geq$
17310 \labelwidthstring 00.00.0000
17323 \begin_inset Quotes eld
17327 \begin_inset Quotes erd
17331 \begin_inset Formula $\ll$
17334 (useful in physics)
17338 \labelwidthstring 00.00.0000
17351 \begin_inset Quotes eld
17355 \begin_inset Quotes erd
17359 \begin_inset Formula $\gg$
17365 \begin_layout Subsection
17366 Standard math bindings
17370 \labelwidthstring 00.00.0000
17384 \labelwidthstring 00.00.0000
17396 \labelwidthstring 00.00.0000
17408 \labelwidthstring 00.00.0000
17422 \labelwidthstring 00.00.0000
17434 \labelwidthstring 00.00.0000
17446 \labelwidthstring 00.00.0000
17460 \labelwidthstring 00.00.0000
17472 \labelwidthstring 00.00.0000
17484 \labelwidthstring 00.00.0000
17496 \labelwidthstring 00.00.0000
17510 \labelwidthstring 00.00.0000
17524 \labelwidthstring 00.00.0000
17538 \labelwidthstring 00.00.0000
17552 \labelwidthstring 00.00.0000
17566 \labelwidthstring 00.00.0000
17580 \labelwidthstring 00.00.0000
17592 \labelwidthstring 00.00.0000
17606 \labelwidthstring 00.00.0000
17618 \labelwidthstring 00.00.0000
17630 \labelwidthstring 00.00.0000
17642 \labelwidthstring 00.00.0000
17654 \labelwidthstring 00.00.0000
17668 \labelwidthstring 00.00.0000
17680 \labelwidthstring 00.00.0000
17692 \labelwidthstring 00.00.0000
17704 \labelwidthstring 00.00.0000
17712 math-delim langle rangle
17716 \labelwidthstring 00.00.0000
17724 math-delim rangle langle
17728 \labelwidthstring 00.00.0000
17740 \labelwidthstring 00.00.0000
17754 \labelwidthstring 00.00.0000
17767 \begin_layout Subsection
17772 \labelwidthstring 00.00.0000
17784 \labelwidthstring 00.00.0000
17796 \labelwidthstring 00.00.0000
17808 \labelwidthstring 00.00.0000
17820 \labelwidthstring 00.00.0000