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 Endnotes module---provide support for just such
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[endnotes.sty]{Adds an endnote inset.}{Endnotes}
5868 \begin_layout Standard
5869 The argument in square brackets is optional: It declares any LaTeX packages
5870 on which the module depends.
5871 The two mandatory arguments, in curly brackets, are a short description
5872 of the module and the name of the module, as they should appear in
5874 Document\SpecialChar \menuseparator
5881 \begin_layout Standard
5882 After creating a new module, you will need to reconfigure and then restart
5883 LyX for it to appear in the menu.
5884 However, changes you make to the module will be seen immediately, if you
5887 Document\SpecialChar \menuseparator
5890 , make some change (or even just highlight something), and then hit
5891 \begin_inset Quotes eld
5895 \begin_inset Quotes erd
5901 It is strongly recommended that you save your work before doing so
5904 In fact, it is strongly recommended that you not attempt to create or edit
5905 modules while simultaneously working on documents.
5906 Though of course the developers strive to keep LyX stable in such situations,
5907 syntax errors and the like in your module file could cause strange behavior.
5910 \begin_layout Subsection
5911 Supporting new document classes
5914 \begin_layout Standard
5915 There are two situations you are likely to encounter when wanting to support
5916 a new LaTeX document class, involving LaTeX2e class (
5925 Supporting a style file is usually fairly easy.
5926 Supporting a new document class is a bit harder.
5929 \begin_layout Subsection
5937 \begin_layout Standard
5938 If your new document class is provided as a style file that is used in conjuncti
5939 on with an existing, supported document class---for the sake of the example,
5940 we'll assume that the style file is called
5944 and it is meant to be used with
5948 , which is a standard class---start by copying the existing class's layout
5949 file into your local directory:
5952 \begin_layout LyX-Code
5953 cp report.layout ~/.lyx/layouts/myclass.layout
5956 \begin_layout Standard
5961 and change the line:
5964 \begin_layout LyX-Code
5967 DeclareLaTeXClass{report}
5970 \begin_layout Standard
5974 \begin_layout LyX-Code
5977 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
5980 \begin_layout Standard
5984 \begin_layout LyX-Code
5994 \begin_layout Standard
5995 near the top of the file.
5998 \begin_layout Standard
5999 Start LyX and select
6004 ools\SpecialChar \menuseparator
6012 Then restart LyX and try creating a new document.
6017 " as a document class option in the
6022 ocument\SpecialChar \menuseparator
6030 It is likely that some of the sectioning commands and such in your new
6031 class will work differently from how they worked in the base class---
6035 in this example---so you can fiddle around with the settings for the different
6036 sections if you wish.
6037 See below for more discussion on this.
6040 \begin_layout Subsection
6048 \begin_layout Standard
6049 There are two possibilities here.
6050 One is that the class file is itself based upon an existing document class.
6051 For example, many thesis classes are based upon
6056 To see whether yours is, look for a line like
6059 \begin_layout LyX-Code
6065 \begin_layout Standard
6067 If so, then you may proceed largely as in the previous section, though
6068 the DeclareLaTeXClass line will be different.
6069 If your new class is thesis, and it is based upon book, then the line should
6073 \begin_layout LyX-Code
6076 DeclareLaTeXClass[myclass, book]{thesis}
6079 \begin_layout Standard
6080 If, on the other hand, the new class is not based upon an existing class,
6081 you will probably have to
6082 \begin_inset Quotes eld
6086 \begin_inset Quotes erd
6090 We strongly suggest copying an existing layout file which uses a similar
6091 LaTeX class and then modifying it, if you can do so.
6092 At least use an existing file as a starting point so you can find out what
6093 items you need to worry about.
6094 Again, the specifics are covered below.
6097 \begin_layout Section
6098 Declaring a new text class
6101 \begin_layout Standard
6102 When it's finally time to get your hands dirty and create or edit your own
6103 layout file, the following sections describe what you're up against.
6104 Our advice is to go slowly, save and test often, listen to soothing music,
6105 and enjoy one or two of your favorite adult beverages; more if you are
6106 getting particularly stuck.
6107 It's really not that hard, except that the multitude of options can become
6108 overwhelming if you try to do to much in one sitting.
6109 Go have another adult beverage, just for good measure.
6112 \begin_layout Standard
6116 \begin_layout Standard
6117 Lines in a layout file which begin with a
6122 There is one exception to this rule: all layouts should begin with lines
6126 \begin_layout LyX-Code
6129 #% Do not delete the line below; configure depends on this
6132 \begin_layout LyX-Code
6137 DeclareLaTeXClass{article}
6140 \begin_layout Standard
6141 The second line is used when you configure LyX.
6142 The layout file is read by the LaTeX script
6146 , in a special mode where
6151 The first line is just a LaTeX comment, and the second one contains the
6152 declaration of the text class.
6153 If these lines appear in a file named
6157 , then they define a text class of name
6161 (the name of the layout file) which uses the LaTeX document class
6165 (the default is to use the same name as the layout).
6167 \begin_inset Quotes eld
6171 \begin_inset Quotes erd
6174 that appears above is used as a description of the text class in the
6179 ocument\SpecialChar \menuseparator
6189 \begin_layout Standard
6190 Let's assume that you wrote your own text class that uses the
6194 documentclass, but where you changed the appearance of the section headings.
6195 If you put it in a file
6199 , the header of this file should be:
6202 \begin_layout LyX-Code
6205 #% Do not delete the line below; configure depends on this
6208 \begin_layout LyX-Code
6213 DeclareLaTeXClass[article]{article (with my own headings)}
6216 \begin_layout Standard
6217 This declares a text class
6221 , associated with the LaTeX document class
6226 \begin_inset Quotes eld
6229 article (with my own headings)
6230 \begin_inset Quotes erd
6234 If your text class depends on several packages, you can declare it as:
6237 \begin_layout LyX-Code
6240 #% Do not delete the line below; configure depends on this
6243 \begin_layout LyX-Code
6248 DeclareLaTeXClass[article,foo.sty]{article (with my own headings)}
6251 \begin_layout Standard
6252 This indicates that your text class uses the foo.sty package.
6253 Finally, it is also possible to declare classes for DocBook code.
6254 Typical declarations will look like
6257 \begin_layout LyX-Code
6260 #% Do not delete the line below; configure depends on this
6263 \begin_layout LyX-Code
6268 DeclareDocBookClass[article]{SGML (DocBook article)}
6271 \begin_layout Standard
6272 Note that these declarations can also be given an optional parameter declaring
6273 the name of the document class (but not a list).
6276 \begin_layout Standard
6277 When the text class has been modified to your taste, all you have to do
6278 is to copy it either in
6291 ools\SpecialChar \menuseparator
6299 Exit LyX and restart it; then your new text class should be available along
6303 \begin_layout Standard
6304 In versions of LyX prior to 1.6, you had to restart LyX to see any changes
6305 you made to your layout files.
6306 As a result, editing layout files could be very time consuming.
6307 Beginning with 1.6, however, you can force a reload of the layout currently
6308 in use by using the LyX function
6313 There is no default binding for this function---though, of course, you
6314 can bind it to a key yourself (see section
6315 \begin_inset CommandInset ref
6317 reference "sec:bindings"
6322 You should simply enter this command in the mini-buffer.
6327 : This is very much an `advanced feature'.
6332 recommended that you save your work before using this function.
6337 recommended that you not attempt to edit your layout while simultaneously
6338 working on a document that you care about.
6339 Use a test document.
6340 Syntax errors and the like in your layout file could cause peculiar behavior.
6341 In particular, such errors could cause LyX to regard the current layout
6342 as invalid and to attempt to switch to some other layout.
6343 The LyX team strives to keep LyX stable in such situations, but safe is
6347 \begin_layout Subsection
6351 \begin_layout Standard
6352 The first non-comment line must contain the file format number:
6355 \begin_layout Description
6366 ] This tag was introduced with LyX 1.4.0 (layout files of LyX 1.3.x and earlier
6367 don't have an explicit file format).
6368 The file format that is documented here is
6375 \begin_layout Subsection
6376 General text class parameters
6379 \begin_layout Standard
6380 These are the general parameters which describe the form of the entire document:
6383 \begin_layout Standard
6387 \begin_layout Standard
6399 \begin_layout Description
6413 ] Whether the class-default should have one or two columns.
6414 Can be changed in the
6419 ocument\SpecialChar \menuseparator
6427 This setting (same goes for
6431 , too) is important: if your text class has two columns by default but you
6432 forget to set it correctly, the
6440 be output when you select
6449 ocument\SpecialChar \menuseparator
6457 \begin_layout Description
6471 ] Whether the class-default should be printing on one or both sides of the
6473 Can be changed in the
6478 ocument\SpecialChar \menuseparator
6488 \begin_layout Description
6502 ] The class default pagestyle.
6503 Can be changed in the
6508 ocument\SpecialChar \menuseparator
6518 \begin_layout Description
6522 ClassOptions\SpecialChar \ldots{}
6526 This section describes various global options supported by the document
6528 See Section\InsetSpace ~
6530 \begin_inset CommandInset ref
6532 reference "sec:classoptions"
6539 \begin_layout Description
6557 ] Whether the class already provides the feature
6562 A feature is in general the name of a package (amsmath, makeidx, \SpecialChar \ldots{}
6564 macro (url, boldsymbol,\SpecialChar \ldots{}
6565 ); the complete list of supported features is unfortunat
6569 \begin_layout Description
6576 This is used to describe the default font of the document.
6577 See Section\InsetSpace ~
6579 \begin_inset CommandInset ref
6581 reference "sec:fonts"
6588 \begin_layout Description
6599 ] This is the style that will be assigned to new paragraphs, usually
6604 This will default to the first defined style if not given, but you are
6605 highly encouraged to use this directive.
6608 \begin_layout Description
6625 ] Indicates what kind of markup is used to define the title of a document.
6630 means that the macro with name
6634 will be inserted after the last layout which has
6635 \begin_inset Quotes eld
6643 \begin_inset Quotes erd
6651 corresponds to the case where the block of paragraphs which have
6652 \begin_inset Quotes eld
6660 \begin_inset Quotes erd
6663 should be enclosed into the
6672 \begin_layout Description
6683 ] The name of the command/environment mentionned above.
6686 \begin_layout Description
6690 Preamble\SpecialChar \ldots{}
6694 A set of macro definitions that will be output at the beginning of the
6696 Use this for global definitions.
6699 \begin_layout Description
6706 As its name implies, this command allows you to include another layout
6707 definition file within yours to avoid duplicating commands.
6708 Common examples are the standard layout files, for example,
6712 , which contains most of the basic layouts.
6715 \begin_layout Description
6719 Style\SpecialChar \ldots{}
6723 This sequence defines a new style.
6724 If the style already exists, it will redefine some of its parameters instead.
6725 See Section\InsetSpace ~
6727 \begin_inset CommandInset ref
6729 reference "sec:style"
6736 \begin_layout Description
6743 This command deletes an existing style.
6744 This is particularly useful when you want to suppress a style that has
6745 be defined in an input file.
6748 \begin_layout Description
6752 Float\SpecialChar \ldots{}
6756 This sequence defines a new float.
6757 See Section\InsetSpace ~
6759 \begin_inset CommandInset ref
6761 reference "sec:floats"
6768 \begin_layout Description
6775 This command deletes an existing float.
6776 This is particularly useful when you want to suppress a float that has
6777 be defined in an input file.
6780 \begin_layout Description
6784 InsetLayout\SpecialChar \ldots{}
6788 This section (re-)defines the layout of an inset.
6789 It can be applied to an existing inset of to a new, user-defined inset,
6790 e.g., a new character style.
6791 See Section\InsetSpace ~
6793 \begin_inset CommandInset ref
6795 reference "sec:charstyle"
6802 \begin_layout Description
6806 Counter\SpecialChar \ldots{}
6810 This sequence defines a new counter.
6811 See Section\InsetSpace ~
6813 \begin_inset CommandInset ref
6815 reference "sec:counter"
6822 \begin_layout Standard
6826 \begin_layout Standard
6838 \begin_layout Subsection
6846 \begin_layout Standard
6847 \begin_inset CommandInset label
6849 name "sec:classoptions"
6857 section can contain the following entries:
6860 \begin_layout Description
6871 ] The list of available font sizes for the document's main font, separated
6873 \begin_inset Quotes eld
6881 \begin_inset Quotes erd
6887 \begin_layout Description
6896 string="empty|plain|headings|fancy"
6898 ] The list of available page styles, separated by
6899 \begin_inset Quotes eld
6907 \begin_inset Quotes erd
6913 \begin_layout Description
6924 ] Some document class options, separated by a comma, that will be added
6925 to the optional part of the
6934 \begin_layout Subsection
6935 Specific Paragraph Layouts
6938 \begin_layout Standard
6939 \begin_inset CommandInset label
6945 A paragraph layout description looks like this
6949 \begin_layout Standard
6950 Note that this will either define a new layout or modify an existing one.
6958 \begin_layout LyX-Code
6965 \begin_layout LyX-Code
6969 \begin_layout LyX-Code
6973 \begin_layout Standard
6974 where the following commands are allowed:
6977 \begin_layout Standard
6981 \begin_layout Standard
6993 \begin_layout Description
7004 This is used to copy all the features of an existing layout into the current
7009 \begin_layout Description
7021 , Command, Environment, Item_Environment,
7027 ] How the layout should be translated into LaTeX.
7032 means nothing special.
7045 {\SpecialChar \ldots{}
7060 }\SpecialChar \ldots{}
7084 is generated for each paragraph of this environment.
7097 is passed as an argument to the environment.
7102 can be defined in the
7107 ayout\SpecialChar \menuseparator
7121 is perhaps a bit misleading, since these rules apply to SGML classes, too.
7122 Visit the SGML class files for specific examples.
7125 \begin_layout Description
7136 If 1, marks the layout as being part of a title block (see also the
7147 \begin_layout Description
7154 The name of the corresponding LaTeX stuff.
7155 Either the environment or command name.
7158 \begin_layout Description
7165 The optional parameter for the corresponding
7172 This parameter cannot be changed from within LyX.
7175 \begin_layout Description
7186 ] The number of optional arguments that can be used with this layout.
7187 This is useful for things like section headings, and only makes sense with
7191 \begin_layout Description
7203 , Manual, Dynamic, First_Dynamic, Right_Address_Box
7207 The kind of margin that the layout has on the left side.
7212 just means a fixed margin.
7217 means that the left margin depends on the string entered in the
7222 dit\SpecialChar \menuseparator
7227 aragraph\InsetSpace ~
7231 This is used to typeset nice lists without tabulators.
7236 means that the margin depends on the size of the label.
7237 This is used for automatic enumerated headlines.
7238 It is obvious that the headline
7239 \begin_inset Quotes eld
7242 5.4.3.2.1 Very long headline
7243 \begin_inset Quotes erd
7246 must have a wider left margin (as wide as
7247 \begin_inset Quotes eld
7251 \begin_inset Quotes erd
7254 plus the space) than
7255 \begin_inset Quotes eld
7258 3.2 Very long headline
7259 \begin_inset Quotes erd
7262 , even if other word processors are not able to do this.
7267 is similar, but only the very first row of the paragraph is dynamic, while
7268 the others are static; this is used, for example, for descriptions.
7273 means the margin is chosen in a way that the longest row of this paragraph
7274 fits to the right margin.
7275 This is used to typeset an address on the right edge of the page.
7278 \begin_layout Description
7295 ] Whether the following Paragraph is allowed to indent its very first row.
7300 means that it is not allowed to do so,
7304 means it could do so if it wants to.
7307 \begin_layout Description
7318 ] The indent of the very first line of a paragraph.
7319 The argument is passed as a string.
7324 means that the paragraph is indented with the width of
7333 You can get a negative width by prefixing the string with
7338 This way was chosen so that the look is the same with each used screen
7344 will be fixed for a certain layout.
7345 The exception is Standard layout, since the indentation of a Standard layout
7346 paragraph can be prohibited with
7351 Also, Standard layout paragraphs inside environments use the
7355 of the environment, not their native one.
7356 For example, Standard paragraphs inside an enumeration are not indented.
7359 \begin_layout Description
7370 ] LyX allows to choose either
7371 \begin_inset Quotes eld
7375 \begin_inset Quotes erd
7379 \begin_inset Quotes eld
7383 \begin_inset Quotes erd
7386 to typeset a document.
7388 \begin_inset Quotes eld
7392 \begin_inset Quotes erd
7395 is chosen, this value is completely ignored.
7397 \begin_inset Quotes eld
7401 \begin_inset Quotes erd
7404 is chosen, the parindent of a LaTeXtype
7405 \begin_inset Quotes eld
7409 \begin_inset Quotes erd
7412 layout is ignored and all paragraphs are additionally separated by this
7414 The vertical space is calculated with
7416 value*DefaultHeight()
7422 is the height of a row with the normal font.
7423 This way, the look stays the same with different screen fonts.
7426 \begin_layout Description
7437 ] The vertical space with which the very first of a chain of paragraphs
7438 with this layout is separated from the previous paragraph.
7439 If the previous paragraph has another layout, the separations are not simply
7440 added, but the maximum is taken.
7443 \begin_layout Description
7458 for the very last paragraph.
7461 \begin_layout Description
7472 ] The vertical space between two paragraphs of this layout.
7475 \begin_layout Description
7486 ] This is an extra space between the paragraphs of an environment layout.
7487 If you put other layouts into an environment, each is separated with the
7493 But the whole items of the environment are additionally separated with
7502 \begin_layout Description
7513 ] If you put layouts into environments, the leftmargins are not simply added,
7514 but added with a factor
7515 \begin_inset Formula $\frac{4}{depth+4}$
7519 Note that this parameter is also used when the border is defined as
7528 Then it is added to the manual or dynamic border.
7529 This string has the same meaning as for
7536 \begin_layout Description
7554 \begin_layout Description
7566 , Manual, Static, Top_Environment,
7568 Centered_Top_Environment, Sensitive,
7577 means the label is the very first word (up to the first real blank).
7582 means it is defined in the layout (see
7593 Centered_Top_Environment
7595 are special cases of
7600 The label will be printed above the paragraph, but only at the top of an
7601 environment or the top of a chain of paragraphs with this layout.
7602 Usage is for example the
7611 This is also the case for
7615 labels with latex type
7619 , in order to make layouts for theorems work correctly.
7624 is a special case for the caption-labels
7625 \begin_inset Quotes eld
7629 \begin_inset Quotes erd
7633 \begin_inset Quotes eld
7637 \begin_inset Quotes erd
7645 means the (hardcoded) label string depends on the kind of float.
7650 label type defines automatically numbered labels.
7653 \begin_layout Description
7666 The name of the counter for automatic numbering (see Section\InsetSpace ~
7668 \begin_inset CommandInset ref
7670 reference "sec:counter"
7675 This must be given if
7688 \begin_layout Description
7699 ] The horizontal space between the label and the text body.
7700 Only used for labels that are not above the text body.
7703 \begin_layout Description
7710 [float=0] The vertical space between the label and the text body.
7711 Only used for labels that are above the text body (
7717 Centered_Top_Environment
7722 \begin_layout Description
7733 ] The string used for a label with a
7742 this string is also used as a suggestion for the
7746 that can be set in the
7751 dit\SpecialChar \menuseparator
7756 aragraph\InsetSpace ~
7766 is set, this string can be contain the special formatting commands described
7767 in Section\InsetSpace ~
7769 \begin_inset CommandInset ref
7771 reference "sec:counter"
7776 For the sake of backwards compatibility, the string
7784 will be replaced by the expanded
7795 This feature is now obsolete and should be replaced by the mechanisms of
7796 Section\InsetSpace ~
7798 \begin_inset CommandInset ref
7800 reference "sec:counter"
7807 \begin_layout Description
7818 ] This is used inside the appendix instead of
7839 \begin_layout Description
7846 The level of the style in the table of contents.
7847 This is used for automatic numbering of section headings.
7850 \begin_layout Description
7862 , Box, Filled_Box, Static
7864 ] The type of label that stands at the end of the paragraph (or sequence
7887 \begin_inset Quotes eld
7891 \begin_inset Quotes erd
7903 ) is a white (resp.\InsetSpace ~
7904 black) square suitable for end of proof markers,
7908 is an explicit text string.
7911 \begin_layout Description
7922 ] The string used for a label with a
7934 \begin_layout Description
7946 , left, right, center
7948 ] Paragraph alignment.
7951 \begin_layout Description
7963 , left, right, center
7970 Some LaTeX styles prohibit certain alignments, since those wouldn't make
7972 For example a right-aligned or centered enumeration isn't possible.
7975 \begin_layout Description
7989 ] With this parameter the
7994 \begin_inset Quotes eld
7997 Vertical space above
7998 \begin_inset Quotes erd
8006 dit\SpecialChar \menuseparator
8011 aragraph\InsetSpace ~
8014 dialog can be set when initializing a paragraph with this layout
8018 \begin_layout Standard
8021 Note from Jean-Marc:
8023 I'm not sure that this setting has much use, and it should probably be
8024 removed in later versions.
8033 \begin_layout Description
8054 \begin_layout Description
8068 ] Whether fragile commands in this layout should be
8077 \begin_layout Description
8094 ] Whether newlines are translated into LaTeX newlines (
8103 The translation can be switched off to allow more comfortable LaTeX editing
8107 \begin_layout Description
8121 ] Whether the contents of this paragraph should be output in raw form, meaning
8122 without special translations that LaTeX would require.
8123 This somehow replaces the older
8130 \begin_layout Description
8144 ] Usually LyX doesn't allow you to insert more than one space between words,
8145 since a space is considered as the separation between two words, not a
8146 character or symbol of its own.
8147 This is a very fine thing but sometimes annoying, for example when typing
8148 program code or plain LaTeX code.
8154 Note that LyX will create protected blanks for the additional blanks when
8155 in another mode than LaTeX-mode.
8158 \begin_layout Description
8172 ] Usually LyX does not allow you to leave a paragraph empty, since it would
8173 lead to empty LaTeX output.
8174 There are some cases where this could be desirable however: in a letter
8175 template, the required fields can be provided as empty fields, so that
8176 people do not forget them; in some special classes, a layout can be used
8177 as some kind of break, which does not contain actual text.
8180 \begin_layout Description
8192 , onehalf, double, other
8198 ] This defines what the default spacing should be in the layout.
8211 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
8212 If you specify the argument
8216 , then you should also provide a numerical argument which will be the actual
8218 Note that, contrary to other parameters,
8222 implies the generation of specific LaTeX code, using the package
8229 \begin_layout Description
8236 The font used for both the text body
8241 See section\InsetSpace ~
8243 \begin_inset CommandInset ref
8245 reference "sec:fonts"
8250 Note that defining this font automatically defines the
8257 \begin_layout Description
8264 The font used for the text body .
8265 See section\InsetSpace ~
8267 \begin_inset CommandInset ref
8269 reference "sec:fonts"
8276 \begin_layout Description
8283 The font used for the label.
8284 See section\InsetSpace ~
8286 \begin_inset CommandInset ref
8288 reference "sec:fonts"
8295 \begin_layout Description
8299 Preamble\SpecialChar \ldots{}
8303 A set of macro definitions that will be output at the beginning of the
8304 LaTeX files when the layout is used.
8305 Use this to define the macros needed by this particular layout.
8308 \begin_layout Description
8315 the name of a style which preamble should be output
8319 the one mentionned above.
8320 This allows to ensure some ordering of the preamble snippets when macros
8321 definitions depend on one another
8325 \begin_layout Standard
8326 Note that, besides that functionality, there is no way to ensure any ordering
8328 The ordering that you see in a given version of LyX may change without
8329 warning in later versions.
8337 \begin_layout Standard
8341 \begin_layout Standard
8353 \begin_layout Subsection
8357 \begin_layout Standard
8358 \begin_inset CommandInset label
8364 Since version 1.3.0 of LyX, it is necessary to define the floats (
8372 , \SpecialChar \ldots{}
8373 ) in the text class itself.
8374 If you are looking here to learn how to upgrade an existing text class,
8375 it will probably turn out that all you have to do is to add
8378 \begin_layout LyX-Code
8382 \begin_layout Standard
8383 at a reasonable location of the text class.
8387 \begin_layout Standard
8388 Don't forget to also have a look at counters in next section.
8393 If you want to implement a text class that proposes some other float types
8394 (like the AGU class bundled with LyX), the information below will hopefully
8398 \begin_layout Description
8410 \begin_inset Quotes erd
8414 \begin_inset Quotes erd
8418 \begin_inset Quotes eld
8422 \begin_inset Quotes erd
8425 of the new class of floats, like program or algorithm.
8426 After the appropriate
8447 \begin_layout Description
8459 \begin_inset Quotes erd
8463 \begin_inset Quotes erd
8466 ] The string that will be used in the menus and also for the caption.
8469 \begin_layout Description
8490 if the float is already defined by the documentclass.
8495 , the float will be defined using the LaTeX package
8502 \begin_layout Description
8514 \begin_inset Quotes erd
8518 \begin_inset Quotes erd
8521 ] This (optional) argument determines whether floats of this class will
8522 be numbered within some sectional unit of the document.
8523 For example, if within is equal to
8527 , the floats will be numbered within chapters.
8531 \begin_layout Description
8543 \begin_inset Quotes erd
8547 \begin_inset Quotes erd
8550 ] The style used when defining the float using
8559 \begin_layout Description
8571 \begin_inset Quotes erd
8575 \begin_inset Quotes erd
8578 ] The default placement for the given class of floats.
8579 They are like in standard LaTeX:
8595 for top, bottom, page, and here, respectively.
8599 \begin_layout Standard
8600 Note that the order of these letters in the string is irrelevant, like in
8606 On top of that there is a new type,
8610 , which does not really correspond to a float, since it means: put it
8611 \begin_inset Quotes eld
8615 \begin_inset Quotes erd
8619 Note, however that the
8623 specifier is special and, because of implementation details cannot be used
8624 in non-builtin float types.
8625 If you do not understand what this means, just use
8632 \begin_layout Description
8644 \begin_inset Quotes erd
8648 \begin_inset Quotes erd
8651 ] The file name extension of an auxiliary file for the list of figures (or
8653 LaTeX writes the captions to this file.
8656 \begin_layout Description
8668 \begin_inset Quotes erd
8672 \begin_inset Quotes erd
8675 ] The heading used for the list of floats.
8678 \begin_layout Standard
8679 Note that defining a float with type
8685 automatically defines the corresponding counter with name
8694 \begin_layout Subsection
8695 Inset layouts and Flex insets
8698 \begin_layout Standard
8699 \begin_inset CommandInset label
8701 name "sec:charstyle"
8705 You can define character styles since version 1.4.0 of LyX; since version
8706 1.6.0 these are called Flex insets.
8710 \begin_layout Standard
8711 Furthermore it is possible to define the general layout of many different
8713 Currently layout parameters can be defined for footnotes, marginal notes,
8714 note insets, ERT insets, branch insets, and Flex insets.
8715 The latter are definable from the user GUI and come in three different
8716 kinds: character style (
8724 ), and XML element (
8732 \begin_layout Standard
8737 definition starting line is of the form
8740 \begin_layout LyX-Code
8741 InsetLayout <Type> <Name>
8744 \begin_layout Standard
8748 \begin_layout Standard
8755 Foot, Margin, Note, Flex
8760 \begin_layout Standard
8765 can be empty (for foot- and marginal notes, branches and ERT) or one of
8783 Here, the second part of the name can be chosen freely (for CharStyle,
8784 Custom and Element), or from a predefined list (for Note).
8787 \begin_layout Standard
8792 section can contain the following entries:
8795 \begin_layout Description
8818 (indicating a dummy definition ending definitions of charstyles etc.).
8819 This entry is only meaningful for Flex (user definable) insets, the three
8820 types of which are CharStyle, Custom and Element.
8823 \begin_layout Description
8839 Minimalistic or Conglomerate
8842 , describing the rendering style used for the inset's frame and buttons.
8845 \begin_layout Description
8852 defines what will be displayed on the button or elsewhere as the inset
8854 Some inset types (ERT and Branch) modify this label on the fly.
8857 \begin_layout Description
8864 The font used for both the text body
8869 See section\InsetSpace ~
8871 \begin_inset CommandInset ref
8873 reference "sec:fonts"
8878 Note that defining this font automatically defines the
8885 \begin_layout Description
8892 The font used for the label.
8893 See section\InsetSpace ~
8895 \begin_inset CommandInset ref
8897 reference "sec:fonts"
8902 Note that this definition can never appear before
8906 , lest it be ineffective (see above)
8909 \begin_layout Description
8916 The name of the corresponding LaTeX stuff.
8917 Either the environment or command name.
8920 \begin_layout Description
8927 The optional parameter for the corresponding
8933 stuff, including possible bracket pairs like
8938 This parameter cannot be changed from within LyX.
8941 \begin_layout Description
8948 See section\InsetSpace ~
8950 \begin_inset CommandInset ref
8952 reference "sec:style"
8959 \begin_layout Description
8963 Preamble\SpecialChar \ldots{}
8967 See section\InsetSpace ~
8969 \begin_inset CommandInset ref
8971 reference "sec:style"
8978 \begin_layout Subsection
8982 \begin_layout Standard
8983 \begin_inset CommandInset label
8989 Since version 1.3.0 of LyX, it is necessary to define the counters (
8997 , \SpecialChar \ldots{}
8998 ) in the text class itself.
8999 If you are looking here to learn how to upgrade an existing text class,
9000 it will probably turn out that all you have to do is to add
9003 \begin_layout LyX-Code
9004 Input stdcounters.inc
9007 \begin_layout Standard
9008 The following parameters can be used:
9011 \begin_layout Description
9023 \begin_inset Quotes erd
9027 \begin_inset Quotes erd
9030 ] The name of the counter.
9033 \begin_layout Description
9045 \begin_inset Quotes erd
9049 \begin_inset Quotes erd
9052 ] If this is set to the name of another counter, the present counter will
9053 be reset everytime the other one is increased.
9065 \begin_layout Description
9069 LabelString [string=""]
9072 when this is defined, this string defines how the counter is displayed.
9073 Setting this value resets
9078 The following special constructs can be used in the string:
9082 \begin_layout Itemize
9089 will be replaced by the expansion of the
9102 If these are empty, a default value is constructed as follows: if the counter
9103 has a master counter
9115 is used; otherwise the string
9124 \begin_layout Itemize
9125 counter values can be expressed using LaTeX-like macros
9149 \begin_layout Description
9160 to arabic numerals, like 1, 2, 3\SpecialChar \ldots{}
9165 \begin_layout Standard
9175 Actually, the situation is a bit more complicated than that: any
9194 other than those descibed below will produce arabic numerals.
9195 It would not be surprising to see this change in the future.
9203 \begin_layout Description
9210 for lower-case letters: a, b, c, \SpecialChar \ldots{}
9214 \begin_layout Description
9221 for upper-case letters: A, B, C, \SpecialChar \ldots{}
9225 \begin_layout Description
9232 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
9236 \begin_layout Description
9243 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
9247 \begin_layout Description
9254 for hebrew numerals.
9259 \begin_layout Description
9263 LabelStringAppendix [string=""]
9270 , for use in appendix.
9273 \begin_layout Subsection
9277 \begin_layout Standard
9278 \begin_inset CommandInset label
9284 A font description looks like that:
9287 \begin_layout LyX-Code
9297 \begin_layout LyX-Code
9301 \begin_layout LyX-Code
9305 \begin_layout Standard
9306 and the following commands are available:
9309 \begin_layout Description
9326 \begin_layout Description
9343 \begin_layout Description
9355 , Italic, SmallCaps, Slanted
9360 \begin_layout Description
9376 , large, larger, largest, huge, giant
9381 \begin_layout Description
9393 , black, white, red, green, blue, cyan, magenta, yellow
9398 \begin_layout Subsection
9399 Upgrading old layout files
9402 \begin_layout Standard
9403 The file format of layout files changes from time to time, so old layout
9404 files need to be converted.
9405 This process has been automated in LyX 1.4.0: If LyX reads an old format
9406 layout file it will call the conversion tool
9408 $LyXDir/scripts/layout2layout.py
9410 and convert it to a temporary file in current format.
9411 The original file is left untouched, so that you can still use it with
9413 If you want to convert the layout file permanently, just call the converter
9417 \begin_layout LyX-Code
9418 python $LyXDir/scripts/layout2layout.py myclass.layout myclassnew.layout
9421 \begin_layout Standard
9433 \begin_layout Standard
9434 The automatic conversion does only handle syntax changes.
9435 It cannot handle the case where the contents of included files was changed.
9436 For example, layout files based on
9449 If you get error messages about undefined counters, try to convert your
9469 \begin_layout Section
9471 \begin_inset CommandInset label
9473 name "sec:templates"
9480 \begin_layout Standard
9481 Templates are created just like usual documents.
9482 The only difference is that usual documents contain all possible settings,
9483 including the fontscheme and the papersize.
9484 Usually a user doesn't want a template to overwrite his defaults in these
9486 For that reason, the designer of a template should remove the corresponding
9499 from the template LyX file.
9500 This can be done with any simple text-editor, for example
9512 \begin_layout Standard
9513 Put the edited template files you create in
9517 , copy the ones you use from the global template directory in
9521 to the same place, and redefine the template path in the
9526 dit\SpecialChar \menuseparator
9545 \begin_layout Standard
9546 Note that there is a template which has a particular meaning:
9551 This template is loaded everytime you create a new document with
9558 \SpecialChar \menuseparator
9566 in order to provide useful defaults.
9567 To create this template from inside LyX, all you have to do is to open
9568 a document with the correct settings, and use the
9574 e as Document Defaults
9579 \begin_layout Chapter
9580 Including External Material
9583 \begin_layout Section
9587 \begin_layout Standard
9588 \begin_inset Note Note
9591 \begin_layout Standard
9592 This section is completely outdated.
9597 One often requested feature from LyX users is to be able to interface LyX
9598 with Xfig, Dia, or other similar applications that specialize in producing
9599 a certain kind of diagram, figure, schematic or whatever material might
9600 be relevant to include in your document.
9601 Previously, it was only possible to include boring, static, fixed images
9602 in LyX documents with the graphics feature, but there are several limitations
9603 attached to this approach:
9606 \begin_layout Itemize
9607 If you want to change the figure, you have to invoke an external program
9611 \begin_layout Itemize
9612 LyX does not notice that the referenced files change, so the on-screen display
9613 can fast become obsolete, and this is aggravated by the lack of a means
9614 of updating the display
9617 \begin_layout Itemize
9618 The graphics stuff does not provide any mechanisms for coping with different
9619 exported formats such as DocBook, HTML or plain text
9622 \begin_layout Standard
9623 The external material facility attempts to solve all of these problems
9627 \begin_layout Standard
9628 Even if the graphics facility can't solve all problems, it is still valuable
9629 because it does provide in-line preview of the graphics, and supports advanced
9630 geometric transformations with a comfortable user interface.
9636 It does this by offering a general method to interface LyX to external
9638 Instead of introducing a long list of different constructs tailored for
9639 each specific application, we chose to sacrifice the in-line displaying
9640 of the included material in order to provide a general construct to cover
9641 a wide range of applications.
9642 The result is the external material construct.
9643 External material presents itself in the document simply as a button, but
9644 don't let this fool you.
9645 When you click on it, a dialog will appear that allows you to chose exactly
9646 what material to include, and in the following sections you will learn
9647 that this is indeed a powerful mechanism that can solve all of the above
9651 \begin_layout Section
9655 \begin_layout Standard
9656 The external material feature is based on the concept of a
9661 A template is a specification of how LyX should interface with a certain
9663 As bundled, LyX comes with predefined templates for Xfig figures, Dia diagrams,
9664 various raster format images, gnuplot, and more.
9665 You can check the actual list by using the menu
9667 Insert\SpecialChar \menuseparator
9668 File\SpecialChar \menuseparator
9677 Furthermore, it is possible to roll your own template to support a specific
9679 Later we'll describe in more detail what is involved, and hopefully you
9680 will submit all the templates you create so we can include them in a later
9684 \begin_layout Standard
9685 Another basic idea of the external material feature is to distinguish between
9686 the original file that serves as a base for final material and the produced
9687 file that is included in your exported or printed document.
9688 For example, consider the case of a figure produced with
9693 The Xfig application itself works on an original file with the
9698 Within XFig, you create and change your figure, and when you are done,
9704 When you want to include the figure in your document, you invoke
9708 in order to create a PostScript file that can readily be included in your
9714 file is the original file, and the PostScript file is the produced file.
9717 \begin_layout Standard
9718 This distinction is important in order to allow updating of the material
9719 while you are in the process of writing the document.
9720 Furthermore, it provides us with the flexibility that is needed to support
9721 multiple export formats.
9722 For instance, in the case of a plain text file, it is not exactly an award-winn
9723 ing idea to include the figure as raw PostScript.
9724 Instead, you'd either prefer to just include a reference to the figure,
9725 or try to invoke some graphics to Ascii converter to make the final result
9726 look similar to the real graphics.
9727 The external material management allows you to do this, because it is parameter
9728 ized on the different export formats that LyX supports.
9731 \begin_layout Standard
9732 Besides supporting the production of different products according to the
9733 exported format, it supports tight integration with editing and viewing
9735 In the case of an XFig figure, you are able to invoke
9739 on the original file with a single click from within the external material
9740 dialog in LyX, and also preview the produced PostScript file with
9745 No more fiddling around with the command line and/or file browsers to locate
9746 and manipulate the original or produced files.
9747 In this way, you are finally able to take full advantage of the many different
9748 applications that are relevant to use when you write your documents, and
9749 ultimately be more productive.
9752 \begin_layout Section
9753 External material dialog
9756 \begin_layout Standard
9761 dialog is described in the
9770 \begin_layout Section
9774 \begin_layout Standard
9775 In this section, we should include some examples of use of the external
9777 Those examples could include:
9780 \begin_layout Itemize
9781 External raster images
9784 \begin_layout Itemize
9785 External XFig figures
9788 \begin_layout Itemize
9792 \begin_layout Itemize
9796 \begin_layout Itemize
9797 The use of makefiles
9800 \begin_layout Itemize
9801 Recursive external LyX templates
9804 \begin_layout Section
9805 The external template configuration file
9808 \begin_layout Standard
9809 It is relatively easy to add custom external template definitions to LyX.
9810 However, be aware this doing this in an careless manner most probably
9814 introduce an easily exploitable security hole.
9815 So before you do this, please read the discussion about security which
9819 \begin_layout Standard
9820 Having said that, we encourage you to submit any interesting templates that
9825 \begin_layout Standard
9826 The external templates are defined in the
9828 lib/external_templates
9831 You can place your own version in
9833 .lyx/external_templates
9838 \begin_layout Standard
9839 A typical template looks like this:
9842 \begin_layout LyX-Code
9846 \begin_layout LyX-Code
9847 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
9850 \begin_layout LyX-Code
9854 \begin_layout LyX-Code
9858 \begin_layout LyX-Code
9862 \begin_layout LyX-Code
9866 \begin_layout LyX-Code
9870 \begin_layout LyX-Code
9871 AutomaticProduction true
9874 \begin_layout LyX-Code
9878 \begin_layout LyX-Code
9882 \begin_layout LyX-Code
9886 \begin_layout LyX-Code
9887 TransformCommand Rotate RotationLatexCommand
9890 \begin_layout LyX-Code
9891 TransformCommand Resize ResizeLatexCommand
9894 \begin_layout LyX-Code
9895 Product "$$RotateFront$$ResizeFront
9898 \begin_layout LyX-Code
9903 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
9906 \begin_layout LyX-Code
9907 $$ResizeBack$$RotateBack"
9910 \begin_layout LyX-Code
9914 \begin_layout LyX-Code
9915 UpdateResult "$$AbsPath$$Basename.pstex_t"
9918 \begin_layout LyX-Code
9919 Requirement "graphicx"
9922 \begin_layout LyX-Code
9923 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
9926 \begin_layout LyX-Code
9927 ReferencedFile latex "$$AbsPath$$Basename.eps"
9930 \begin_layout LyX-Code
9931 ReferencedFile dvi "$$AbsPath$$Basename.eps"
9934 \begin_layout LyX-Code
9938 \begin_layout LyX-Code
9942 \begin_layout LyX-Code
9943 TransformCommand Rotate RotationLatexCommand
9946 \begin_layout LyX-Code
9947 TransformCommand Resize ResizeLatexCommand
9950 \begin_layout LyX-Code
9951 Product "$$RotateFront$$ResizeFront
9954 \begin_layout LyX-Code
9959 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
9962 \begin_layout LyX-Code
9963 $$ResizeBack$$RotateBack"
9966 \begin_layout LyX-Code
9970 \begin_layout LyX-Code
9971 UpdateResult "$$AbsPath$$Basename.pdftex_t"
9974 \begin_layout LyX-Code
9975 Requirement "graphicx"
9978 \begin_layout LyX-Code
9979 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
9982 \begin_layout LyX-Code
9983 ReferencedFile latex "$$AbsPath$$Basename.pdf"
9986 \begin_layout LyX-Code
9990 \begin_layout LyX-Code
9994 \begin_layout LyX-Code
9995 Product "$$Contents(
9997 "$$AbsPath$$Basename.asc
10002 \begin_layout LyX-Code
10003 UpdateFormat asciixfig
10006 \begin_layout LyX-Code
10007 UpdateResult "$$AbsPath$$Basename.asc"
10010 \begin_layout LyX-Code
10014 \begin_layout LyX-Code
10018 \begin_layout LyX-Code
10019 Product "<graphic fileref=
10021 "$$AbsOrRelPathMaster$$Basename.eps
10026 \begin_layout LyX-Code
10030 \begin_layout LyX-Code
10034 \begin_layout LyX-Code
10035 UpdateResult "$$AbsPath$$Basename.eps"
10038 \begin_layout LyX-Code
10039 ReferencedFile docbook "$$AbsPath$$Basename.eps"
10042 \begin_layout LyX-Code
10043 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
10046 \begin_layout LyX-Code
10050 \begin_layout LyX-Code
10051 Product "[XFig: $$FName]"
10054 \begin_layout LyX-Code
10058 \begin_layout LyX-Code
10062 \begin_layout Standard
10063 As you can see, the template is enclosed in
10067 \SpecialChar \ldots{}
10073 It contains a header specifying some general settings, and for each supported
10074 primary document file format a section
10078 \SpecialChar \ldots{}
10086 \begin_layout Subsection
10087 The template header
10090 \begin_layout Description
10094 Template\InsetSpace ~
10098 A unique name for the template.
10099 It must not contain substitution macros (see below).
10102 \begin_layout Description
10106 GuiName\InsetSpace ~
10110 The text that is displayed on the button.
10111 This command must occur exactly once.
10114 \begin_layout Description
10118 HelpText\InsetSpace ~
10119 <text>\InsetSpace ~
10123 The help text that is used in the External dialog.
10124 Provide enough information to explain to the user just what the template
10125 can provide him with.
10126 This command must occur exactly once.
10129 \begin_layout Description
10133 InputFormat\InsetSpace ~
10137 The file format of the original file.
10138 This must be the name of a format that is known to LyX (see the
10143 ools\SpecialChar \menuseparator
10148 references:Conversion
10155 if the template can handle original files of more than one format.
10156 LyX will attempt to interrogate the file itself in order to deduce its
10157 format in this case.
10158 This command must occur exactly once.
10161 \begin_layout Description
10165 FileFilter\InsetSpace ~
10169 A glob pattern that is used in the file dialog to filter out the desired
10171 If there is more than one possible file extension (e.g.\InsetSpace ~
10180 ), use something like
10185 This command must occur exactly once.
10188 \begin_layout Description
10192 AutomaticProduction\InsetSpace ~
10196 Wether the file represented by the template must be generated by LyX.
10197 This command must occur exactly once.
10200 \begin_layout Description
10204 Transform\InsetSpace ~
10205 Rotate|Resize|Clip|Extra
10208 This command specifies which transformations are supported by this template.
10209 It may occur zero or more times.
10210 This command enables the corresponding tabs in the external dialog.
10215 command must have either a corresponding
10228 Otherwise the transformation will not be supported by that format.
10231 \begin_layout Subsection
10235 \begin_layout Description
10239 Format\InsetSpace ~
10240 LaTeX|PDFLaTeX|PlainText|DocBook
10243 The primary document file format that this format definition is for.
10244 Not every template has a sensible representation in all document file formats.
10245 Please define nevertheless a
10249 section for all formats.
10250 Use a dummy text when no representation is available.
10251 Then you can at least see a reference to the external material in the exported
10255 \begin_layout Description
10259 TransformCommand\InsetSpace ~
10260 Rotate\InsetSpace ~
10261 RotationLatexCommand
10264 This command specifies that the built in LaTeX command should be used for
10266 This command may occur once or not at all.
10269 \begin_layout Description
10273 TransformCommand\InsetSpace ~
10274 Resize\InsetSpace ~
10278 This command specifies that the built in LaTeX command should be used for
10280 This command may occur once or not at all.
10283 \begin_layout Description
10287 TransformOption\InsetSpace ~
10288 Rotate\InsetSpace ~
10289 RotationLatexOption
10292 This command specifies that rotation is done via an optional argument.
10293 This command may occur once or not at all.
10296 \begin_layout Description
10300 TransformOption\InsetSpace ~
10301 Resize\InsetSpace ~
10305 This command specifies that resizing is done via an optional argument.
10306 This command may occur once or not at all.
10309 \begin_layout Description
10313 TransformOption\InsetSpace ~
10318 This command specifies that clipping is done via an optional argument.
10319 This command may occur once or not at all.
10322 \begin_layout Description
10326 TransformOption\InsetSpace ~
10331 This command specifies that an extra optional argument is used.
10332 This command may occur once or not at all.
10335 \begin_layout Description
10339 Product\InsetSpace ~
10343 The text that is inserted in the exported document.
10344 This is actually the most important command and can be quite complex.
10345 This command must occur exactly once.
10348 \begin_layout Description
10352 UpdateFormat\InsetSpace ~
10356 The file format of the converted file.
10357 This must be the name of a format that is known to LyX (see the
10362 ools\SpecialChar \menuseparator
10367 references:Conversion
10370 This command must occur exactly once.
10373 \begin_layout Description
10377 UpdateResult\InsetSpace ~
10381 The file name of the converted file.
10382 The file name must be absolute.
10383 This command must occur exactly once.
10386 \begin_layout Description
10390 ReferencedFile\InsetSpace ~
10391 <format>\InsetSpace ~
10395 This command denotes files that are created by the conversion process and
10396 are needed for a particular export format.
10397 If the filename is relative, it is interpreted relative to the master document.
10398 This command may be given zero or more times.
10401 \begin_layout Description
10405 Requirement\InsetSpace ~
10409 The name of a required LaTeX package.
10410 The package is included via
10416 in the LaTeX preamble.
10417 This command may occur zero or more times.
10420 \begin_layout Description
10424 Preamble\InsetSpace ~
10428 This command specifies a preamble snippet that will be included in the
10430 It has to be defined using
10434 \SpecialChar \ldots{}
10440 This command may occur zero or more times.
10443 \begin_layout Description
10447 Option\InsetSpace ~
10448 <name>\InsetSpace ~
10452 This command defines an additional macro
10456 for substitution in
10465 itself may contain substitution macros.
10466 The advantage over using
10474 is that the substituted value of
10478 is sanitized so that it is a valid optional argument in the document format.
10479 This command may occur zero or more times.
10482 \begin_layout Subsection
10483 Preamble definitions
10486 \begin_layout Standard
10487 The external template configuration file may contain additional preamble
10488 definitions enclosed by
10492 \SpecialChar \ldots{}
10498 They can be used by the templates in the
10505 \begin_layout Section
10506 The substitution mechanism
10509 \begin_layout Standard
10510 When the external material facility invokes an external program, it is done
10511 on the basis of a command defined in the template configuration file.
10512 These commands can contain various macros that are expanded before execution.
10513 Execution always take place in the directory of the containing document.
10516 \begin_layout Standard
10517 Also, whenever external material is to be displayed, the name will be produced
10518 by the substitution mechanism, and most other commands in the template
10519 definition support substitution as well.
10522 \begin_layout Standard
10523 The available macros are the following:
10526 \begin_layout Description
10527 $$FName The filename of the file specified in the external material dialog.
10528 This is either an absolute name, or it is relative to the LyX document.
10531 \begin_layout Description
10532 $$Basename The filename without path and without the extension.
10535 \begin_layout Description
10536 $$Extension The file extension (including the dot).
10539 \begin_layout Description
10540 $$FPath The path part of
10544 (absolute name or relative to the LyX document).
10547 \begin_layout Description
10548 $$AbsPath The absolute file path.
10551 \begin_layout Description
10552 $$RelPathMaster The file path, relative to the master LyX document.
10555 \begin_layout Description
10556 $$RelPathParent The file path, relative to the LyX document.
10559 \begin_layout Description
10560 $$AbsOrRelPathMaster The file path, absolute or relative to the master LyX
10564 \begin_layout Description
10565 $$AbsOrRelPathParent The file path, absolute or relative to the LyX document.
10568 \begin_layout Description
10569 $$Tempname A name and full path to a temporary file which will be automatically
10570 deleted whenever the containing document is closed, or the external material
10574 \begin_layout Description
10576 \begin_inset Quotes eld
10580 \begin_inset Quotes erd
10583 ) This macro will expand to the contents of the file with the name
10590 \begin_layout Description
10591 $$Sysdir This macro will expand to the absolute path of the system directory.
10592 This is typically used to point to the various helper scripts that are
10596 \begin_layout Standard
10597 All path macros contain a trailing directory separator, so you can construct
10599 the absolute filename with
10601 $$AbsPath$$Basename$$Extension
10606 \begin_layout Standard
10607 The macros above are substituted in all commands unless otherwise noted.
10612 supports additionally the following substitutions if they are enabled by
10624 \begin_layout Description
10625 $$ResizeFront The front part of the resize command.
10628 \begin_layout Description
10629 $$ResizeBack The back part of the resize command.
10632 \begin_layout Description
10633 $$RotateFront The front part of the rotation command.
10636 \begin_layout Description
10637 $$RotateBack The back part of the rotation command.
10640 \begin_layout Standard
10641 The value string of the
10645 command supports additionally the following substitutions if they are enabled
10657 \begin_layout Description
10658 $$Clip The clip option.
10661 \begin_layout Description
10662 $$Extra The extra option.
10665 \begin_layout Description
10666 $$Resize The resize option.
10669 \begin_layout Description
10670 $$Rotate The rotation option.
10673 \begin_layout Standard
10674 You may ask why there are so many path macros.
10675 There are mainly two reasons:
10678 \begin_layout Standard
10679 First, relative and absolute file names should remain relative or absolute,
10681 Users may have reasons to prefer either form.
10682 Relative names are useful for portable documents that should work on different
10683 machines, for example.
10684 Absolute names may be required by some programs.
10687 \begin_layout Standard
10688 Second, LaTeX treats relative file names differently than LyX and other
10689 programs in nested included files.
10690 For LyX, a relative file name is always relative to the document that contains
10692 For LaTeX, it is always relative to the master document.
10693 These two definitions are identical if you have only one document, but
10694 differ if you have a master document that includes part documents.
10695 That means that relative filenames must be transformed when presented to
10697 Fortunately LyX does this automatically for you if you choose the right
10701 \begin_layout Standard
10702 So which path macro should be used in new template definitions? The rule
10706 \begin_layout Itemize
10711 if an absolute path is required.
10714 \begin_layout Itemize
10717 $$AbsOrRelPathMaster
10719 if the substituted string is some kind of LaTeX input.
10722 \begin_layout Itemize
10725 $$AbsOrRelPathParent
10727 in order to preserve the user's choice.
10730 \begin_layout Standard
10731 There are special cases where this rule does not work and e.g.\InsetSpace ~
10733 are needed, but normally it will work just fine.
10734 One example for such a case is the command
10736 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
10738 in the XFig template above: We can't use the absolute name because the
10743 files needs the relative name in order to rewrite the file content.
10746 \begin_layout Section
10747 Security discussion
10750 \begin_layout Standard
10751 \begin_inset Note Note
10754 \begin_layout Standard
10755 This section is outdated
10760 The external material feature interfaces with a lot of external programs
10761 and does so automatically, so we have to consider the security implications
10763 In particular, since you have the option of including your own filenames
10764 and/or parameter strings and those are expanded into a command, it seems
10765 that it would be possible to create a malicious document which executes
10766 arbitrary commands when a user views or prints the document.
10767 This is something we definately want to avoid.
10770 \begin_layout Standard
10771 However, since the external program commands are specified in the template
10772 configuration file only, there are no security issues if LyX is properly
10773 configured with safe templates only.
10774 This is so because the external programs are invoked with the
10778 -system call rather than the
10782 system-call, so it's not possible to execute arbitrary commands from the
10783 filename or parameter section via the shell.
10786 \begin_layout Standard
10787 This also implies that you are restricted in what command strings you can
10788 use in the external material templates.
10789 In particular, pipes and redirection are not readily available.
10790 This has to be so if LyX should remain safe.
10791 If you want to use some of the shell features, you should write a safe
10792 script to do this in a controlled manner, and then invoke the script from
10793 the command string.
10798 directory of the LyX installation, you can find a safe wrapper script
10800 general_command_wrapper.py
10802 that supports redirection of input and output.
10803 That can serve as an example for how to write safe template scripts.
10804 For a more advanced example that uses
10808 and friends, take a look at the
10815 \begin_layout Standard
10816 It is possible to design a template that interacts directly with the shell,
10817 but since this would allow a malicious user to execute arbitrary commands
10818 by writing clever filenames and/or parameters, we generally recommend that
10819 you only use safe scripts that work with the
10823 system call in a controlled manner.
10824 Of course, for use in a controlled environment, it can be tempting to just
10825 fall back to use ordinary shell scripts.
10826 If you do so, be aware that you
10830 provide an easily exploitable security hole in your system.
10831 Of course it stands to reason that such unsafe templates will never be
10832 included in the standard LyX distribution, although we do encourage people
10833 to submit new templates in the open source tradition.
10834 But LyX as shipped from the official distribution channels will never have
10838 \begin_layout Standard
10839 Including external material provides a lot of power, and you have to be
10840 careful not to introduce security hazards with this power.
10841 A subtle error in a single line in an innocent looking script can open
10842 the door to huge security problems.
10843 So if you do not fully understand the issues, we recommend that you consult
10844 a knowledgable security professional or the LyX development team if you
10845 have any questions about whether a given template is safe or not.
10846 And do this before you use it in an uncontrolled environment.
10849 \begin_layout Chapter
10853 \begin_layout Section
10857 \begin_layout Standard
10858 The LyX server is a method implemented in LyX that will enable other programs
10859 to talk to LyX, invoke LyX commands, and retrieve information about the
10860 LyX internal state.
10861 This is only intended for advanced users, but they should find it useful.
10864 \begin_layout Section
10865 Starting the LyX Server
10868 \begin_layout Standard
10869 The LyX server works through the use of a pair of named pipes.
10870 These are usually located in your home directory and have the names
10871 \begin_inset Quotes eld
10879 \begin_inset Quotes erd
10883 \begin_inset Quotes eld
10891 \begin_inset Quotes erd
10895 External programs write into
10899 and read back data from
10904 The stem of the pipe names can be defined in the
10909 ools\SpecialChar \menuseparator
10916 dialog, for example
10918 "/home/myhome/.lyxpipe"
10923 \begin_layout Standard
10932 ' to create the pipes.
10933 The above setting also has the effect of activating the LyX server.
10934 If one of the pipes already exists, LyX will assume that another LyX process
10935 is already running and will not start the server.
10936 To have several LyX processes with servers at the same time, you have to
10937 change the configuration between the start of the programs.
10940 \begin_layout Standard
10941 If you are developing a client program, you might find it useful to enable
10942 debugging information from the LyX server.
10943 Do this by starting LyX as
10945 lyx -dbg lyxserver.
10948 \begin_layout Standard
10949 Warning: if LyX crashes, it may not manage to remove the pipes; in this
10950 case you must remove them manually.
10951 If LyX starts and the pipes exist already, it will not start any server.
10954 \begin_layout Standard
10955 Other than this, there are a few points to consider:
10958 \begin_layout Itemize
10959 Both server and clients must run on UNIX or OS/2 machines.
10960 Communications between LyX on UNIX and clients on OS/2 or vice versa is
10961 not possible right now.
10964 \begin_layout Itemize
10965 On OS/2, only one client can connect to LyXServer at a time.
10968 \begin_layout Itemize
10969 On OS/2, clients must open inpipe with
10976 \begin_layout Standard
10977 You can find a complete example client written in C in the source distribution
10980 development/server_monitor.c
10985 \begin_layout Section
10986 Normal communication
10989 \begin_layout Standard
10990 To issue a LyX call, the client writes a line of ASCII text into the input
10992 This line has the following format:
10995 \begin_layout Quote
11009 \begin_layout Standard
11014 is a name that the client can choose arbitrarily.
11015 Its only use is that LyX will echo it if it sends an answer - so a client
11016 can dispatch results from different requesters.
11019 \begin_layout Standard
11024 is the function you want LyX to perform.
11025 It is the same as the commands you'd use in the minibuffer.
11028 \begin_layout Standard
11033 is an optional argument which is meaningful only to some functions (for
11035 \begin_inset Quotes eld
11039 \begin_inset Quotes erd
11042 which will insert the argument as text at the cursor position.)
11045 \begin_layout Standard
11046 The answer from LyX will arrive in the output pipe and be of the form
11049 \begin_layout Quote
11063 \begin_layout Standard
11072 are just echoed from the command request, while
11076 is more or less useful information filled according to how the command
11077 execution worked out.
11078 Some commands will return information about the internal state of LyX,
11080 \begin_inset Quotes eld
11084 \begin_inset Quotes erd
11087 , while other will return an empty data-response.
11088 This means that the command execution went fine.
11091 \begin_layout Standard
11092 In case of errors, the response from LyX will have this form
11095 \begin_layout Quote
11109 \begin_layout Standard
11114 should contain an explanation of why the command failed.
11117 \begin_layout Standard
11121 \begin_layout LyX-Code
11122 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
11125 \begin_layout LyX-Code
11126 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
11128 read a <~/.lyxpipe.out
11133 \begin_layout Section
11137 \begin_layout Standard
11138 LyX can notify clients of events going on asynchronously.
11139 Currently it will only do this if the user binds a key sequence with the
11141 \begin_inset Quotes eld
11145 \begin_inset Quotes erd
11149 The format of the string LyX sends is as follows:
11152 \begin_layout Quote
11161 \begin_layout Standard
11166 is the printed representation of the key sequence that was actually typed
11170 \begin_layout Standard
11171 This mechanism can be used to extend LyX's command set and implement macros:
11172 bind some key sequence to
11173 \begin_inset Quotes eld
11177 \begin_inset Quotes erd
11180 , start a client that listens on the out pipe, dispatches the command according
11181 to the sequence and starts a function that may use LyX calls and LyX requests
11182 to issue a command or a series of commands to LyX.
11185 \begin_layout Section
11186 The simple LyX Server Protocol
11189 \begin_layout Standard
11190 LyX implements a simple protocol that can be used for session management.
11191 All messages are of the form
11194 \begin_layout Quote
11204 \begin_layout Standard
11210 \begin_inset Quotes eld
11214 \begin_inset Quotes erd
11218 \begin_inset Quotes eld
11222 \begin_inset Quotes erd
11227 \begin_inset Quotes eld
11231 \begin_inset Quotes erd
11234 is received from a client, LyX will report back to inform the client that
11235 it's listening to it's messages, while
11236 \begin_inset Quotes eld
11240 \begin_inset Quotes erd
11243 sent from LyX will inform clients that LyX is closing.
11246 \begin_layout Chapter
11251 \begin_layout Standard
11252 This appendix is a huge cross-reference to all the English language keybindings.
11253 Originally, we simply wanted to list all of the key bindings followed by
11254 the function it's bound to.
11255 That way, a user can look up a key to find out what it does.
11256 We then decided, what the hey, why not include the default toolbar and
11257 menu bindings, too.
11258 Please note this section is likely to be very out of date.
11261 \begin_layout Standard
11262 The form is really self-explanatory, but here are a few tips: all entries
11263 are arranged roughly alphabetically for a given modifier (
11272 For the general keyboard layout, simpler prefixes precede the more complex
11282 All entries were gleaned from the default user interface and binding files
11283 located in the directories
11285 \SpecialChar \ldots{}
11290 \SpecialChar \ldots{}
11293 ; they should be treated as the final word on the bindings.
11296 \begin_layout Standard
11297 As a final note, be aware that some window managers (such as FVWM) take
11298 control of some of the function keys or motion keys.
11303 is listed here as generating
11307 , but FVWM grabs it and uses it to change virtual desktops instead.
11308 Very annoying unless you instruct your window manager to stop intercepting
11312 \begin_layout Section
11316 \begin_layout LyX-Code
11320 \begin_layout LyX-Code
11324 \begin_layout LyX-Code
11328 \begin_layout LyX-Code
11329 Icon "buffer-write"
11332 \begin_layout LyX-Code
11333 Icon "buffer-print"
11336 \begin_layout LyX-Code
11340 \begin_layout LyX-Code
11344 \begin_layout LyX-Code
11348 \begin_layout LyX-Code
11352 \begin_layout LyX-Code
11356 \begin_layout LyX-Code
11360 \begin_layout LyX-Code
11364 \begin_layout LyX-Code
11368 \begin_layout LyX-Code
11372 \begin_layout LyX-Code
11376 \begin_layout LyX-Code
11380 \begin_layout LyX-Code
11384 \begin_layout LyX-Code
11385 Icon "footnote-insert"
11388 \begin_layout LyX-Code
11389 Icon "marginpar-insert"
11392 \begin_layout LyX-Code
11396 \begin_layout LyX-Code
11400 \begin_layout LyX-Code
11401 Icon "figure-insert"
11404 \begin_layout LyX-Code
11405 Icon "dialog-tabular-insert"
11408 \begin_layout LyX-Code
11412 \begin_layout Section
11416 \begin_layout Standard
11417 Note that the following bindings are for LyX with English menus.
11418 The second character of the binding depends on the menu language.
11420 \begin_inset Quotes eld
11428 \begin_inset Quotes erd
11431 is with German menus
11432 \begin_inset Quotes eld
11440 \begin_inset Quotes erd
11444 To find out the shortcuts of your language press the Meta (Alt)-key and
11445 press then the keys of the underlined characters of the menu names.
11448 \begin_layout Subsection
11453 \labelwidthstring 00.00.0000
11465 \labelwidthstring 00.00.0000
11477 \labelwidthstring 00.00.0000
11489 \labelwidthstring 00.00.0000
11503 \labelwidthstring 00.00.0000
11515 \labelwidthstring 00.00.0000
11529 \labelwidthstring 00.00.0000
11541 \labelwidthstring 00.00.0000
11553 \labelwidthstring 00.00.0000
11565 \labelwidthstring 00.00.0000
11577 \labelwidthstring 00.00.0000
11585 buffer-new-template
11589 \labelwidthstring 00.00.0000
11604 \labelwidthstring 00.00.0000
11615 \labelwidthstring 00.00.0000
11626 \labelwidthstring 00.00.0000
11637 \labelwidthstring 00.00.0000
11648 \labelwidthstring 00.00.0000
11659 \labelwidthstring 00.00.0000
11671 \labelwidthstring 00.00.0000
11682 \begin_layout Subsection
11687 \labelwidthstring 00.00.0000
11699 \labelwidthstring 00.00.0000
11711 \labelwidthstring 00.00.0000
11723 \labelwidthstring 00.00.0000
11735 \labelwidthstring 00.00.0000
11747 \labelwidthstring 00.00.0000
11759 \labelwidthstring 00.00.0000
11774 \labelwidthstring 00.00.0000
11781 tabular-feature append-row
11785 \labelwidthstring 00.00.0000
11792 tabular-feature toggle-line-bottom
11796 \labelwidthstring 00.00.0000
11803 tabular-feature align-center
11807 \labelwidthstring 00.00.0000
11814 tabular-feature delete-column
11818 \labelwidthstring 00.00.0000
11825 tabular-feature align-left
11829 \labelwidthstring 00.00.0000
11836 tabular-feature align-right
11840 \labelwidthstring 00.00.0000
11847 tabular-feature toggle-line-left
11851 \labelwidthstring 00.00.0000
11858 tabular-feature multicolumn
11862 \labelwidthstring 00.00.0000
11869 tabular-feature valign-center
11873 \labelwidthstring 00.00.0000
11880 tabular-feature valign-top
11884 \labelwidthstring 00.00.0000
11891 tabular-feature toggle-line-right
11895 \labelwidthstring 00.00.0000
11902 tabular-feature toggle-line-top
11906 \labelwidthstring 00.00.0000
11913 tabular-feature append-column
11917 \labelwidthstring 00.00.0000
11924 tabular-feature valign-bottom
11928 \labelwidthstring 00.00.0000
11935 tabular-feature delete-row
11940 \labelwidthstring 00.00.0000
11953 \labelwidthstring 00.00.0000
11960 floats-operate openfoot
11964 \labelwidthstring 00.00.0000
11971 floats-operate closefoot
11975 \labelwidthstring 00.00.0000
11982 floats-operate openfig
11986 \labelwidthstring 00.00.0000
11997 \labelwidthstring 00.00.0000
12008 \labelwidthstring 00.00.0000
12015 floats-operate closefig
12020 \labelwidthstring 00.00.0000
12032 \labelwidthstring 00.00.0000
12046 \labelwidthstring 00.00.0000
12058 \labelwidthstring 00.00.0000
12070 \labelwidthstring 00.00.0000
12084 \labelwidthstring 00.00.0000
12096 \labelwidthstring 00.00.0000
12111 \labelwidthstring 00.00.0000
12118 primary-selection-paste
12122 \labelwidthstring 00.00.0000
12129 primary-selection-paste paragraph
12133 \begin_layout Subsection
12138 \labelwidthstring 00.00.0000
12153 \labelwidthstring 00.00.0000
12160 buffer-float-insert algorithm
12164 \labelwidthstring 00.00.0000
12171 buffer-float-insert wide-tab
12175 \labelwidthstring 00.00.0000
12182 buffer-float-insert figure
12186 \labelwidthstring 00.00.0000
12193 buffer-float-insert table
12197 \labelwidthstring 00.00.0000
12204 buffer-float-insert wide-fig
12209 \labelwidthstring 00.00.0000
12217 dialog-tabular-insert
12221 \labelwidthstring 00.00.0000
12233 \labelwidthstring 00.00.0000
12245 \labelwidthstring 00.00.0000
12253 buffer-child-insert
12257 \labelwidthstring 00.00.0000
12269 \labelwidthstring 00.00.0000
12281 \labelwidthstring 00.00.0000
12293 \labelwidthstring 00.00.0000
12305 \labelwidthstring 00.00.0000
12317 \labelwidthstring 00.00.0000
12329 \labelwidthstring 00.00.0000
12341 \labelwidthstring 00.00.0000
12356 \labelwidthstring 00.00.0000
12367 \labelwidthstring 00.00.0000
12378 \labelwidthstring 00.00.0000
12389 \labelwidthstring 00.00.0000
12400 \labelwidthstring 00.00.0000
12411 \labelwidthstring 00.00.0000
12423 \labelwidthstring 00.00.0000
12435 \labelwidthstring 00.00.0000
12450 \labelwidthstring 00.00.0000
12457 protected-space-insert
12461 \labelwidthstring 00.00.0000
12468 end-of-sentence-period-insert
12472 \labelwidthstring 00.00.0000
12483 \labelwidthstring 00.00.0000
12494 \labelwidthstring 00.00.0000
12505 \labelwidthstring 00.00.0000
12512 menu-separator-insert
12516 \labelwidthstring 00.00.0000
12523 hyphenation-point-insert
12527 \labelwidthstring 00.00.0000
12538 \labelwidthstring 00.00.0000
12545 command-sequence math-insert ^;math-mode;
12549 \labelwidthstring 00.00.0000
12556 command-sequence math-insert _;math-mode;
12561 \labelwidthstring 00.00.0000
12576 \labelwidthstring 00.00.0000
12583 file-insert-plaintext lines
12587 \labelwidthstring 00.00.0000
12594 file-insert-plaintext paragraphs
12598 \labelwidthstring 00.00.0000
12610 \labelwidthstring 00.00.0000
12622 \labelwidthstring 00.00.0000
12634 \labelwidthstring 00.00.0000
12645 \begin_layout Subsection
12650 \labelwidthstring 00.00.0000
12662 \labelwidthstring 00.00.0000
12674 \labelwidthstring 00.00.0000
12686 \labelwidthstring 00.00.0000
12698 \labelwidthstring 00.00.0000
12710 \labelwidthstring 00.00.0000
12722 \labelwidthstring 00.00.0000
12734 \labelwidthstring 00.00.0000
12746 \labelwidthstring 00.00.0000
12754 layout-save-default
12758 \labelwidthstring 00.00.0000
12770 \labelwidthstring 00.00.0000
12782 \labelwidthstring 00.00.0000
12793 \begin_layout Subsubsection
12796 Layout\SpecialChar \menuseparator
12803 \labelwidthstring 00.00.0000
12815 \labelwidthstring 00.00.0000
12827 \labelwidthstring 00.00.0000
12839 \labelwidthstring 00.00.0000
12851 \labelwidthstring 00.00.0000
12863 \labelwidthstring 00.00.0000
12875 \labelwidthstring 00.00.0000
12887 \labelwidthstring 00.00.0000
12899 \labelwidthstring 00.00.0000
12911 \labelwidthstring 00.00.0000
12923 \labelwidthstring 00.00.0000
12935 \labelwidthstring 00.00.0000
12947 \labelwidthstring 00.00.0000
12959 \labelwidthstring 00.00.0000
12971 \labelwidthstring 00.00.0000
12983 \labelwidthstring 00.00.0000
12995 \labelwidthstring 00.00.0000
13007 \labelwidthstring 00.00.0000
13019 \labelwidthstring 00.00.0000
13031 \labelwidthstring 00.00.0000
13043 \labelwidthstring 00.00.0000
13055 \labelwidthstring 00.00.0000
13067 \labelwidthstring 00.00.0000
13079 \labelwidthstring 00.00.0000
13091 \labelwidthstring 00.00.0000
13103 \labelwidthstring 00.00.0000
13115 \labelwidthstring 00.00.0000
13127 \labelwidthstring 00.00.0000
13139 \labelwidthstring 00.00.0000
13151 \labelwidthstring 00.00.0000
13163 \labelwidthstring 00.00.0000
13175 \labelwidthstring 00.00.0000
13186 \begin_layout Subsection
13190 \begin_layout Subsection
13194 \begin_layout Subsection
13198 \begin_layout Subsection
13203 \labelwidthstring 00.00.0000
13215 \labelwidthstring 00.00.0000
13227 \labelwidthstring 00.00.0000
13239 \labelwidthstring 00.00.0000
13251 \labelwidthstring 00.00.0000
13263 \labelwidthstring 00.00.0000
13271 layout ShortFoilhead
13275 \labelwidthstring 00.00.0000
13287 \labelwidthstring 00.00.0000
13299 \labelwidthstring 00.00.0000
13311 \labelwidthstring 00.00.0000
13323 \labelwidthstring 00.00.0000
13331 layout ShortRotatefoilhead
13335 \labelwidthstring 00.00.0000
13347 \labelwidthstring 00.00.0000
13359 \labelwidthstring 00.00.0000
13371 \labelwidthstring 00.00.0000
13379 drop-layouts-choice
13383 \labelwidthstring 00.00.0000
13398 \labelwidthstring 00.00.0000
13413 \labelwidthstring 00.00.0000
13425 \labelwidthstring 00.00.0000
13437 \labelwidthstring 00.00.0000
13445 layout Subsubsection
13449 \labelwidthstring 00.00.0000
13461 \labelwidthstring 00.00.0000
13469 layout Subparagraph
13473 \labelwidthstring 00.00.0000
13477 asterisk\InsetSpace ~
13486 \labelwidthstring 00.00.0000
13490 asterisk\InsetSpace ~
13499 \labelwidthstring 00.00.0000
13503 asterisk\InsetSpace ~
13512 \labelwidthstring 00.00.0000
13516 asterisk\InsetSpace ~
13525 \labelwidthstring 00.00.0000
13529 asterisk\InsetSpace ~
13534 layout Subsubsection*
13538 \labelwidthstring 00.00.0000
13542 asterisk\InsetSpace ~
13551 \labelwidthstring 00.00.0000
13555 asterisk\InsetSpace ~
13560 layout Subparagraph*
13564 \labelwidthstring 00.00.0000
13576 \labelwidthstring 00.00.0000
13584 layout Bibliography
13588 \labelwidthstring 00.00.0000
13600 \labelwidthstring 00.00.0000
13612 \labelwidthstring 00.00.0000
13624 \labelwidthstring 00.00.0000
13636 \labelwidthstring 00.00.0000
13648 \labelwidthstring 00.00.0000
13656 layout Rotatefoilhead
13660 \labelwidthstring 00.00.0000
13668 layout RightAddress
13672 \labelwidthstring 00.00.0000
13684 \labelwidthstring 00.00.0000
13696 \labelwidthstring 00.00.0000
13708 \labelwidthstring 00.00.0000
13719 \begin_layout Standard
13720 These ones are kept for backwards compatibility, but only make sense on
13725 \labelwidthstring 00.00.0000
13737 \labelwidthstring 00.00.0000
13745 layout Subsubsection*
13749 \labelwidthstring 00.00.0000
13760 \begin_layout Section
13764 \begin_layout Subsection
13771 \labelwidthstring 00.00.0000
13782 \labelwidthstring 00.00.0000
13793 \labelwidthstring 00.00.0000
13804 \labelwidthstring 00.00.0000
13815 \labelwidthstring 00.00.0000
13826 \labelwidthstring 00.00.0000
13837 \labelwidthstring 00.00.0000
13844 hyphenation-point-insert
13848 \labelwidthstring 00.00.0000
13859 \labelwidthstring 00.00.0000
13866 line-delete-forward
13870 \labelwidthstring 00.00.0000
13881 \labelwidthstring 00.00.0000
13892 \labelwidthstring 00.00.0000
13903 \labelwidthstring 00.00.0000
13914 \labelwidthstring 00.00.0000
13925 \labelwidthstring 00.00.0000
13936 \labelwidthstring 00.00.0000
13947 \labelwidthstring 00.00.0000
13958 \labelwidthstring 00.00.0000
13969 \labelwidthstring 00.00.0000
13980 \labelwidthstring 00.00.0000
13991 \labelwidthstring 00.00.0000
14002 \labelwidthstring 00.00.0000
14014 \labelwidthstring 00.00.0000
14026 \labelwidthstring 00.00.0000
14038 \labelwidthstring 00.00.0000
14050 \labelwidthstring 00.00.0000
14063 \labelwidthstring 00.00.0000
14075 \labelwidthstring 00.00.0000
14087 \labelwidthstring 00.00.0000
14099 \labelwidthstring 00.00.0000
14111 \labelwidthstring 00.00.0000
14124 \labelwidthstring 00.00.0000
14136 \labelwidthstring 00.00.0000
14148 \labelwidthstring 00.00.0000
14161 \labelwidthstring 00.00.0000
14174 \labelwidthstring 00.00.0000
14187 \labelwidthstring 00.00.0000
14200 \labelwidthstring 00.00.0000
14213 \labelwidthstring 00.00.0000
14226 \labelwidthstring 00.00.0000
14238 \labelwidthstring 00.00.0000
14250 \labelwidthstring 00.00.0000
14262 \labelwidthstring 00.00.0000
14270 menu-open Documents
14274 \labelwidthstring 00.00.0000
14286 \labelwidthstring 00.00.0000
14298 \labelwidthstring 00.00.0000
14310 \labelwidthstring 00.00.0000
14322 \labelwidthstring 00.00.0000
14334 \labelwidthstring 00.00.0000
14342 buffer-toggle-read-only
14346 \labelwidthstring 00.00.0000
14358 \labelwidthstring 00.00.0000
14370 \labelwidthstring 00.00.0000
14382 \labelwidthstring 00.00.0000
14393 \labelwidthstring 00.00.0000
14404 \labelwidthstring 00.00.0000
14415 \labelwidthstring 00.00.0000
14426 \labelwidthstring 00.00.0000
14437 \labelwidthstring 00.00.0000
14448 \labelwidthstring 00.00.0000
14459 \labelwidthstring 00.00.0000
14470 \labelwidthstring 00.00.0000
14481 \labelwidthstring 00.00.0000
14492 \labelwidthstring 00.00.0000
14503 \labelwidthstring 00.00.0000
14514 \labelwidthstring 00.00.0000
14525 \labelwidthstring 00.00.0000
14536 \labelwidthstring 00.00.0000
14543 word-delete-forward
14547 \labelwidthstring 00.00.0000
14554 word-delete-backward
14558 \labelwidthstring 00.00.0000
14569 \labelwidthstring 00.00.0000
14576 end-of-sentence-period-insert
14580 \labelwidthstring 00.00.0000
14587 protected-space-insert
14591 \labelwidthstring 00.00.0000
14602 \labelwidthstring 00.00.0000
14613 \labelwidthstring 00.00.0000
14624 \labelwidthstring 00.00.0000
14635 \labelwidthstring 00.00.0000
14646 \labelwidthstring 00.00.0000
14657 \labelwidthstring 00.00.0000
14664 buffer-begin-select
14668 \labelwidthstring 00.00.0000
14679 \labelwidthstring 00.00.0000
14686 paragraph-up-select
14690 \labelwidthstring 00.00.0000
14697 paragraph-down-select
14701 \labelwidthstring 00.00.0000
14708 word-backward-select
14712 \labelwidthstring 00.00.0000
14719 word-forward-select
14723 \labelwidthstring 00.00.0000
14734 \labelwidthstring 00.00.0000
14741 word-delete-forward
14745 \labelwidthstring 00.00.0000
14756 \labelwidthstring 00.00.0000
14767 \labelwidthstring 00.00.0000
14778 \labelwidthstring 00.00.0000
14789 \labelwidthstring 00.00.0000
14796 break-paragraph-keep-layout
14800 \labelwidthstring 00.00.0000
14810 \begin_layout Subsection
14817 \labelwidthstring 00.00.0000
14828 \labelwidthstring 00.00.0000
14839 \labelwidthstring 00.00.0000
14850 \labelwidthstring 00.00.0000
14861 \labelwidthstring 00.00.0000
14872 \labelwidthstring 00.00.0000
14883 \labelwidthstring 00.00.0000
14894 \labelwidthstring 00.00.0000
14905 \labelwidthstring 00.00.0000
14916 \labelwidthstring 00.00.0000
14927 \labelwidthstring 00.00.0000
14938 \labelwidthstring 00.00.0000
14949 \labelwidthstring 00.00.0000
14960 \labelwidthstring 00.00.0000
14971 \labelwidthstring 00.00.0000
14982 \labelwidthstring 00.00.0000
14993 \labelwidthstring 00.00.0000
15004 \labelwidthstring 00.00.0000
15015 \labelwidthstring 00.00.0000
15026 \labelwidthstring 00.00.0000
15037 \labelwidthstring 00.00.0000
15048 \labelwidthstring 00.00.0000
15059 \labelwidthstring 00.00.0000
15066 protected-space-insert
15070 \labelwidthstring 00.00.0000
15081 \labelwidthstring 00.00.0000
15092 \labelwidthstring 00.00.0000
15103 \labelwidthstring 00.00.0000
15110 buffer-new-template
15114 \labelwidthstring 00.00.0000
15125 \labelwidthstring 00.00.0000
15136 \labelwidthstring 00.00.0000
15147 \labelwidthstring 00.00.0000
15158 \labelwidthstring 00.00.0000
15169 \labelwidthstring 00.00.0000
15180 \labelwidthstring 00.00.0000
15191 \labelwidthstring 00.00.0000
15198 end-of-sentence-period-insert
15202 \labelwidthstring 00.00.0000
15213 \labelwidthstring 00.00.0000
15224 \labelwidthstring 00.00.0000
15231 hyphenation-point-insert
15235 \labelwidthstring 00.00.0000
15246 \labelwidthstring 00.00.0000
15253 protected-space-insert
15257 \labelwidthstring 00.00.0000
15268 \labelwidthstring 00.00.0000
15279 \labelwidthstring 00.00.0000
15290 \labelwidthstring 00.00.0000
15301 \labelwidthstring 00.00.0000
15312 \labelwidthstring 00.00.0000
15323 \labelwidthstring 00.00.0000
15334 \labelwidthstring 00.00.0000
15345 \labelwidthstring 00.00.0000
15356 \labelwidthstring 00.00.0000
15367 \labelwidthstring 00.00.0000
15378 \labelwidthstring 00.00.0000
15389 \labelwidthstring 00.00.0000
15400 \labelwidthstring 00.00.0000
15411 \labelwidthstring 00.00.0000
15422 \labelwidthstring 00.00.0000
15429 word-delete-forward
15433 \labelwidthstring 00.00.0000
15440 word-delete-backward
15444 \labelwidthstring 00.00.0000
15455 \labelwidthstring 00.00.0000
15466 \labelwidthstring 00.00.0000
15477 \labelwidthstring 00.00.0000
15488 \labelwidthstring 00.00.0000
15495 paragraph-down-select
15499 \labelwidthstring 00.00.0000
15510 \labelwidthstring 00.00.0000
15517 buffer-begin-select
15521 \labelwidthstring 00.00.0000
15528 word-backward-select
15532 \labelwidthstring 00.00.0000
15539 word-forward-select
15543 \labelwidthstring 00.00.0000
15550 paragraph-up-select
15554 \labelwidthstring 00.00.0000
15565 \labelwidthstring 00.00.0000
15572 break-paragraph-keep-layout
15576 \labelwidthstring 00.00.0000
15587 \labelwidthstring 00.00.0000
15598 \labelwidthstring 00.00.0000
15609 \labelwidthstring 00.00.0000
15620 \labelwidthstring 00.00.0000
15631 \labelwidthstring 00.00.0000
15642 \labelwidthstring 00.00.0000
15653 \labelwidthstring 00.00.0000
15664 \labelwidthstring 00.00.0000
15675 \labelwidthstring 00.00.0000
15686 \labelwidthstring 00.00.0000
15696 \begin_layout Subsection
15702 \begin_layout Standard
15703 These are LyX keyboard definitions for mathematics, similar to those of
15707 \begin_layout Standard
15708 The bindings file and the present documentation were prepared by Serge Winitzki
15709 with assistance from Jean-Marc Lasgouttes.
15710 Version 1.3, for LyX 1.2.x and 1.3.x.
15713 \begin_layout Standard
15714 These definitions make it a lot easier to type equations without using the
15715 mouse, especially for people familiar with Scientific Word.
15716 The standard LyX bindings such as
15727 \begin_layout Standard
15728 Tip: to find the "LyX bind name" for a key, look at the status bar after
15729 typing some non-existent key combination.
15731 to find how "Ctrl-&" is referenced, press Ctrl-S and then Ctrl-&: the status
15732 bar shows "C-s S-C-ampersand." (This does not work in LyX 1.3.0!)
15736 \labelwidthstring 00.00.0000
15745 -- Copy, cut, paste is as in Sciword,
15761 \labelwidthstring 00.00.0000
15770 -- Display equation toggle: type
15774 to insert a displayed formula (
15779 \begin_inset Quotes eld
15783 \begin_inset Quotes erd
15791 in a displayed formula to convert it back to an inline formula.
15795 \labelwidthstring 00.00.0000
15810 to insert a fraction (
15815 \begin_inset Quotes eld
15819 \begin_inset Quotes erd
15823 You can also select an expression and type
15827 to convert it to the numerator of a fraction.
15836 end of the denominator will delete the numerator and convert the denominator
15841 \labelwidthstring 00.00.0000
15853 \begin_inset Formula $\int$
15861 \begin_inset Quotes eld
15865 \begin_inset Quotes erd
15872 \labelwidthstring 00.00.0000
15879 line-delete-forward
15881 -- Emacs-like binding: delete forward of cursor to end of line.
15885 \labelwidthstring 00.00.0000
15894 -- A text/math toggle (
15899 \begin_inset Quotes eld
15903 \begin_inset Quotes erd
15906 ): switches to math in text mode, and also inserts roman text in math mode.
15916 \begin_inset Quotes eld
15920 \begin_inset Quotes erd
15927 \labelwidthstring 00.00.0000
15936 -- Add/remove numbering in a single equation.
15940 \labelwidthstring 00.00.0000
15949 -- Add/remove numbering at a line in equation arrays.
15952 \begin_layout Standard
15953 The above commands are toggles that control the numbering of equations (
15958 \begin_inset Quotes eld
15962 \begin_inset Quotes erd
15966 Note: when deleting a number in a labeled eqnarray, the label is not really
15967 removed (the TeX code becomes
15968 \begin_inset Quotes eld
15980 \begin_inset Quotes erd
15983 ) and this generates a (harmless) LaTeX warning.
15987 \labelwidthstring 00.00.0000
15996 -- Open a new document.
16001 \labelwidthstring 00.00.0000
16010 -- Insert a quote character " (
16015 \begin_inset Quotes eld
16019 \begin_inset Quotes erd
16024 \begin_inset Quotes eld
16028 \begin_inset Quotes erd
16031 double quote character that you get by default.
16035 \labelwidthstring 00.00.0000
16046 -- Square root sign
16047 \begin_inset Formula $\sqrt{x}$
16055 \begin_inset Quotes eld
16059 \begin_inset Quotes erd
16066 \labelwidthstring 00.00.0000
16078 \begin_inset Formula $\sqrt[n]{x}$
16085 \labelwidthstring 00.00.0000
16094 -- Another binding for a switch between the text and the math mode (
16099 \begin_inset Quotes eld
16103 \begin_inset Quotes erd
16107 Note that the roman text inserted in math mode is special.
16111 \labelwidthstring 00.00.0000
16124 the selected text (text mode only, use things like
16140 \labelwidthstring 00.00.0000
16149 -- W*ndows heritage.
16153 \labelwidthstring 00.00.0000
16162 -- Close the current document (again, a W*ndows heritage).
16166 \labelwidthstring 00.00.0000
16177 \labelwidthstring 00.00.0000
16188 \labelwidthstring 00.00.0000
16198 \begin_inset Quotes eld
16202 \begin_inset Quotes erd
16206 \begin_inset Quotes eld
16210 \begin_inset Quotes erd
16216 \begin_layout Standard
16217 Bracket delimiters: press
16221 -<bracket key> to insert a matching pair of delimiters.
16226 inserts a pair of parentheses
16227 \begin_inset Formula $\left[\right]$
16235 does the same thing.) It will switch to math mode if needed.
16236 The supported characters are ( [ { < |.
16237 It is the same to press the right or the left bracket.
16238 The corresponding delimiters are
16239 \begin_inset Formula $\left(\right)$
16243 \begin_inset Formula $\left[\right]$
16247 \begin_inset Formula $\left\{ \right\} $
16251 \begin_inset Formula $\left\langle \right\rangle $
16255 \begin_inset Formula $\left|\right|$
16260 \begin_inset Quotes eld
16264 \begin_inset Quotes erd
16267 and resize with their contents.
16268 Use Math Panel to get other or non-matching delimiters.
16269 Press backspace on the
16273 delimiter to remove both
16274 \begin_inset Quotes eld
16278 \begin_inset Quotes erd
16281 delimiters without removing their contents.
16285 \labelwidthstring 00.00.0000
16294 -- for convenience, pressing
16308 \labelwidthstring 00.00.0000
16319 \labelwidthstring 00.00.0000
16330 \labelwidthstring 00.00.0000
16341 \labelwidthstring 00.00.0000
16352 \labelwidthstring 00.00.0000
16363 \labelwidthstring 00.00.0000
16370 math-delim langle rangle
16372 -- angular delimiters
16373 \begin_inset Formula $\left\langle \right\rangle $
16376 , not to confuse with ordinary < > signs.
16380 \labelwidthstring 00.00.0000
16387 math-delim langle rangle
16390 \begin_layout Standard
16391 The bar bracket: on some keyboards (e.g.\InsetSpace ~
16392 some British ones), the bar character
16397 -something and on some wayward Unices to "brokenbar".
16398 So we define all of these keys as well.
16402 \labelwidthstring 00.00.0000
16413 \labelwidthstring 00.00.0000
16424 \labelwidthstring 00.00.0000
16435 \labelwidthstring 00.00.0000
16446 \labelwidthstring 00.00.0000
16456 \begin_layout Standard
16457 Accents are in most cases
16461 -<accent key>, e.g.\InsetSpace ~
16475 for tilde (you also need to press
16481 \begin_inset Quotes eld
16493 \begin_inset Quotes erd
16497 Some accents work only in math mode and others only in text mode.
16501 \labelwidthstring 00.00.0000
16510 -- overdot accent, ȧ (text mode only).
16514 \labelwidthstring 00.00.0000
16526 \begin_inset Formula $\dot{a}$
16529 (math mode only -- in physics this denotes a first derivative).
16533 \labelwidthstring 00.00.0000
16544 -- Vector accent over math
16545 \begin_inset Formula $\overrightarrow{x}$
16552 \labelwidthstring 00.00.0000
16561 -- umlaut accent, ä (text mode only)
16565 \labelwidthstring 00.00.0000
16576 -- double dot accent,
16577 \begin_inset Formula $\ddot{a}$
16580 (math mode only -- in physics this denotes a second derivative).
16581 To get a triple dot in math mode, use
16589 \labelwidthstring 00.00.0000
16598 -- grave accent à (text mode only, use
16608 \labelwidthstring 00.00.0000
16617 -- tilde accent ã (text mode only, use
16627 \labelwidthstring 00.00.0000
16636 -- acute accent á (text mode only, use
16646 \labelwidthstring 00.00.0000
16655 -- circumflex (caret) accent â (text mode only, use
16664 \begin_layout Standard
16666 The new key S-F2 for creating a LaTeX file seems handy.
16670 \labelwidthstring 00.00.0000
16679 -- Save current document.
16683 \labelwidthstring 00.00.0000
16690 buffer-export latex
16692 -- Write a LaTeX file for the current document.
16696 \labelwidthstring 00.00.0000
16705 -- Find and replace dialog.
16709 \labelwidthstring 00.00.0000
16726 \labelwidthstring 00.00.0000
16739 to quit LyX is the W*ndows w*ndow manager's mnemonic.
16742 \begin_layout Standard
16751 are used to switch fonts.
16756 to switch back to the normal font.
16757 The non-default font switches
16765 all work as toggles.
16766 They also work on the whole word if you put the cursor in the middle of
16767 the word, or if you select some text.
16771 \labelwidthstring 00.00.0000
16780 -- stop using any special font
16784 \labelwidthstring 00.00.0000
16801 \labelwidthstring 00.00.0000
16818 \labelwidthstring 00.00.0000
16835 \labelwidthstring 00.00.0000
16849 (Used sometimes for people's names.)
16852 \begin_layout Standard
16858 \begin_inset Quotes eld
16862 \begin_inset Quotes erd
16869 key (useful e.g.\InsetSpace ~
16870 if the keyboard has no working
16877 \begin_layout Standard
16878 Here are some Sciword-inspired mnemonics for frequently used math symbols.
16879 Many symbols start with a
16888 cannot be itself bound to anything.
16892 \labelwidthstring 00.00.0000
16904 \begin_inset Quotes eld
16908 \begin_inset Quotes erd
16912 \begin_inset Formula $\prime$
16916 This is frequently unnecessary: in most cases the normal apostrophe works
16919 \begin_inset Formula $x'+2x=0$
16922 , but in some cases this would generate a double superscript error in LaTeX.
16924 \begin_inset Formula $x^{\prime2}$
16928 \begin_inset Formula $x$
16931 prime squared) must be entered with the prime character.
16935 \labelwidthstring 00.00.0000
16943 command-sequence math-superscript; math-insert
16947 -- Insert a prime as a superscript (see example above).
16951 \labelwidthstring 00.00.0000
16960 -- Insert an upper index.
16967 \labelwidthstring 00.00.0000
16976 -- Insert a lower index.
16983 \labelwidthstring 00.00.0000
16995 -- Partial derivative symbol
16996 \begin_inset Formula $\partial$
17003 \labelwidthstring 00.00.0000
17015 -- Summation symbol
17016 \begin_inset Formula $\sum$
17019 (not the same as the Greek letter uppercase Sigma
17020 \begin_inset Formula $\Sigma$
17023 because it can resize and allows smart upper/lower limits).
17027 \labelwidthstring 00.00.0000
17040 \begin_inset Formula $\prod$
17043 (not the same as the Greek letter uppercase Pi,
17044 \begin_inset Formula $\Pi$
17051 \labelwidthstring 00.00.0000
17064 \begin_inset Formula $\infty$
17071 \labelwidthstring 00.00.0000
17084 \begin_inset Formula $\times$
17091 \labelwidthstring 00.00.0000
17101 -- Insert a stacked array
17102 \begin_inset Formula $\begin{array}{c}
17104 \end{array}\end{array}$
17108 (Frequently useful in formulae.)
17112 \labelwidthstring 00.00.0000
17123 \begin_inset Formula $\times$
17127 \begin_inset Formula $\begin{array}{ccc}
17132 (Then you can modify its size using the
17134 Edit\SpecialChar \menuseparator
17141 \labelwidthstring 00.00.0000
17154 \begin_inset Quotes eld
17158 \begin_inset Quotes erd
17162 \begin_inset Formula $\dagger$
17169 \labelwidthstring 00.00.0000
17182 \begin_inset Quotes eld
17186 \begin_inset Quotes erd
17190 \begin_inset Formula $\equiv$
17197 \labelwidthstring 00.00.0000
17209 \begin_inset Quotes eld
17212 Approximate equality
17213 \begin_inset Quotes erd
17217 \begin_inset Formula $\approx$
17224 \labelwidthstring 00.00.0000
17236 \begin_inset Quotes eld
17240 \begin_inset Quotes erd
17244 \begin_inset Formula $\sim$
17251 \labelwidthstring 00.00.0000
17263 \begin_inset Formula $\rightarrow$
17267 \begin_inset Formula $\lim_{x\rightarrow0}$
17274 \labelwidthstring 00.00.0000
17286 \begin_inset Formula $\leq$
17293 \labelwidthstring 00.00.0000
17304 -- Greater-or-equal
17305 \begin_inset Formula $\geq$
17312 \labelwidthstring 00.00.0000
17325 \begin_inset Quotes eld
17329 \begin_inset Quotes erd
17333 \begin_inset Formula $\ll$
17336 (useful in physics)
17340 \labelwidthstring 00.00.0000
17353 \begin_inset Quotes eld
17357 \begin_inset Quotes erd
17361 \begin_inset Formula $\gg$
17367 \begin_layout Subsection
17368 Standard math bindings
17372 \labelwidthstring 00.00.0000
17386 \labelwidthstring 00.00.0000
17398 \labelwidthstring 00.00.0000
17410 \labelwidthstring 00.00.0000
17424 \labelwidthstring 00.00.0000
17436 \labelwidthstring 00.00.0000
17448 \labelwidthstring 00.00.0000
17462 \labelwidthstring 00.00.0000
17474 \labelwidthstring 00.00.0000
17486 \labelwidthstring 00.00.0000
17498 \labelwidthstring 00.00.0000
17512 \labelwidthstring 00.00.0000
17526 \labelwidthstring 00.00.0000
17540 \labelwidthstring 00.00.0000
17554 \labelwidthstring 00.00.0000
17568 \labelwidthstring 00.00.0000
17582 \labelwidthstring 00.00.0000
17594 \labelwidthstring 00.00.0000
17608 \labelwidthstring 00.00.0000
17620 \labelwidthstring 00.00.0000
17632 \labelwidthstring 00.00.0000
17644 \labelwidthstring 00.00.0000
17656 \labelwidthstring 00.00.0000
17670 \labelwidthstring 00.00.0000
17682 \labelwidthstring 00.00.0000
17694 \labelwidthstring 00.00.0000
17706 \labelwidthstring 00.00.0000
17714 math-delim langle rangle
17718 \labelwidthstring 00.00.0000
17726 math-delim rangle langle
17730 \labelwidthstring 00.00.0000
17742 \labelwidthstring 00.00.0000
17756 \labelwidthstring 00.00.0000
17769 \begin_layout Subsection
17774 \labelwidthstring 00.00.0000
17786 \labelwidthstring 00.00.0000
17798 \labelwidthstring 00.00.0000
17810 \labelwidthstring 00.00.0000
17822 \labelwidthstring 00.00.0000