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
65 \inputencoding default
68 \font_typewriter default
69 \font_default_family default
75 \paperfontsize default
84 \paperorientation portrait
87 \paragraph_separation indent
89 \quotes_language english
92 \paperpagestyle headings
93 \tracking_changes false
105 Customizing LyX: Features for the Advanced User
113 \begin_layout Standard
115 Principal maintainer of this file is
120 If you have comments or error corrections, please send them to the LyX
121 Documentation mailing list, <lyx-docs@lists.lyx.org>.
129 \begin_layout Standard
130 \begin_inset CommandInset toc
131 LatexCommand tableofcontents
138 \begin_layout Chapter
142 \begin_layout Standard
143 This manual covers the customization features present in LyX.
144 In it, we discuss issues like keyboard shortcuts, screen previewing options,
145 printer options, sending commands to LyX via the LyX Server, internationalizati
146 on, installing new LaTeX classes and LyX layouts, etc.
147 We can't possibly hope to touch on everything you can change---our developers
148 add new features faster than we can document them---but we will explain
149 the most common customizations and hopefully point you in the right direction
150 for some of the more obscure ones.
153 \begin_layout Chapter
154 LyX configuration files
157 \begin_layout Standard
158 \begin_inset CommandInset label
164 This chapter aims to help you to find your way through the LyX configuration
166 Before continuing to read this chapter, you should find out where your
167 LyX library directory is by using
172 elp\SpecialChar \menuseparator
180 This directory is the place where LyX places its system-wide configuration
181 files, and we will simply name it
185 in the remainder of this document.
189 \begin_layout Section
197 \begin_layout Standard
202 and its sub-directories contain a number of files and that can be used
203 to customise LyX's behaviour.
204 You can change many of these files from within LyX itself through the
209 ools\SpecialChar \menuseparator
217 Most customization that you might want to do to LyX is possible through
219 However, many other inner aspects of LyX can be customized by modifying
225 They fall in different categories, described in the following subsections.
228 \begin_layout Subsection
229 Automatically generated files
232 \begin_layout Standard
233 These files are generated when you configure LyX.
234 They contain various default values that are guessed by inspection.
235 In general, it is not a good idea to modify them, since they might be overwritt
240 \labelwidthstring 00.00.0000
247 contains defaults for various commands.
251 \labelwidthstring 00.00.0000
258 contains the list of packages that have been recognized by LyX.
259 It is currently unused by the LyX program itself, but the information extracted
260 , and more, is made available with
265 elp\SpecialChar \menuseparator
277 \labelwidthstring 00.00.0000
284 is the list of text classes that have been found in your
288 directory, along with the associated LaTeX document class and their description.
292 \labelwidthstring 00.00.0000
297 is automatically generated during configuration from the file
304 \begin_layout Subsection
309 \labelwidthstring 00.00.0000
316 this directory contains files with the extension
320 that define the keybindings used in LyX (see section\InsetSpace ~
322 \begin_inset CommandInset ref
324 reference "sec:bindings"
329 If there exists an internationalized version of the bind file named
333 , that will be used first.
334 See Chapter\InsetSpace ~
336 \begin_inset CommandInset ref
338 reference "chap:i18n"
343 \begin_inset CommandInset ref
345 reference "sec:bindings"
353 \labelwidthstring 00.00.0000
360 contains graphics files that can be included in documents.
365 \labelwidthstring 00.00.0000
372 contains LyX documentation files (including the one you are currently reading).
377 deserves special attention, as noted above.
378 If there exists an internationalized version of the help-document with
383 prepended to the name, that will be used first.
384 See Chapter\InsetSpace ~
386 \begin_inset CommandInset ref
388 reference "chap:i18n"
396 \labelwidthstring 00.00.0000
403 contains example files that explain how to use some features.
404 In the file browser, press the
412 \labelwidthstring 00.00.0000
417 contains image files that are used by the
422 In addition, it also contains the individual icons used in the toolbar
423 and the banners that can be shown when LyX is launched.
427 \labelwidthstring 00.00.0000
434 contains keyboard keymapping files.
435 See Chapter\InsetSpace ~
437 \begin_inset CommandInset ref
439 reference "sec:keymap"
447 \labelwidthstring 00.00.0000
454 contains the text class files described in Chapter\InsetSpace ~
456 \begin_inset CommandInset ref
458 reference "chap:textclass"
466 \labelwidthstring 00.00.0000
471 contains some files that demonstrate the capabilities of the
473 External\InsetSpace ~
480 \labelwidthstring 00.00.0000
485 contains the standard LyX template files described in Chapter\InsetSpace ~
487 \begin_inset CommandInset ref
489 reference "sec:templates"
497 \labelwidthstring 00.00.0000
502 contains some LaTeX cls files distributed with LyX.
506 \labelwidthstring 00.00.0000
511 contains files with the extension
515 that define the user interface to LyX.
516 That is, the files define which items appear in which menus and the items
517 appearing on the toolbar.
518 See Chapter\InsetSpace ~
520 \begin_inset CommandInset ref
529 \begin_layout Subsection
530 Files you don't want to modify
533 \begin_layout Standard
534 These files are used internally by LyX and you generally do not need to
535 modify them unless you are a developer.
539 \labelwidthstring 00.00.0000
546 this file contains the list of LyX developers.
547 The contents are displayed with the menu entry
552 elp\SpecialChar \menuseparator
560 \labelwidthstring 00.00.0000
567 this is a LaTeX script used during the configuration process.
572 \labelwidthstring 00.00.0000
579 this is the script that is used to re-configure LyX.
580 It creates configuration files in the directory it was run from.
583 \begin_layout Subsection
584 Other files needing a line or two...
588 \labelwidthstring 00.00.0000
593 this contains tables describing how different character encodings can be
598 \labelwidthstring 00.00.0000
603 this file contains the templates available to the new
605 External\InsetSpace ~
612 \labelwidthstring 00.00.0000
617 this file contains a list of all the languages currently supported by LyX.
620 \begin_layout Section
621 Your local configuration directory
624 \begin_layout Standard
625 Even if you are using LyX as an unprivileged user, you might want to change
626 LyX configuration for your own use.
631 directory contains all your personal configuration files.
632 This is the directory described as
633 \begin_inset Quotes eld
637 \begin_inset Quotes erd
645 elp\SpecialChar \menuseparator
650 This directory is used as a mirror of
654 , which means that every file in
658 is a replacement for the corresponding file in
663 Any configuration file described in the above sections can be placed either
664 in the system-wide directory, in which case it will affect all users, or
665 in your local directory for your own use.
668 \begin_layout Standard
669 To make things clearer, let's provide a few examples:
672 \begin_layout Itemize
673 The preferences set in the
678 ools\SpecialChar \menuseparator
685 dialog are saved to a file
696 \begin_layout Itemize
697 When you reconfigure using
702 ools\SpecialChar \menuseparator
713 and the resulting files are written in your local configuration directory
714 (see section\InsetSpace ~
716 \begin_inset CommandInset ref
718 reference "sec:autodetected"
722 to have a list of the
726 settings affected by this section).
727 This means that any additional text class file that you might have added
732 will be added to the list of classes in the
737 ayout\SpecialChar \menuseparator
747 \begin_layout Itemize
748 Similarly, if you have installed some LaTeX document classes in your home
749 directory, that LaTeX can find with your
753 path, they will show up in your list of text classes.
757 \begin_layout Standard
758 as long as LyX or yourself have a
762 file for it, of course.
770 \begin_layout Itemize
771 If you get some updated documentation from LyX ftp site and cannot install
772 it because you do not have sysadmin rights on your system, you can just
787 \begin_layout Section
788 Running LyX with multiple configurations
791 \begin_layout Standard
792 The configuration freedom of the local configuration directory may not suffice
793 if you want to have more than one configuration at your disposal.
794 For example, you may want to be use different key bindings or printer settings
796 You can achieve this by having several such directories.
797 You then specify which directory to use at run-time.
800 \begin_layout Standard
801 Invoking LyX with the command line switch
809 instructs the program to read the configuration from that directory, and
810 not from the default directory (you can determine the default directory
811 by running LyX without this switch as described above).
812 If this directory does not exist, LyX offers to create it for you, just
813 like it does for the default directory on the first time you run the program.
814 You can modify the configuration options in this additional
818 exactly as you would for the default directory.
819 These directories are completely independent (but read on).
820 Note that setting the environment variable
824 to some value has exactly the same effect
829 \begin_layout Standard
830 Having several configurations also requires more maintenance: if you want
831 to add a new layout to
835 which you want available from all your configurations, you must add it
836 to each directory separately.
837 You can avoid this with the following trick: after LyX creates the additional
838 directory, most of the subdirectories (see above) are empty.
839 If you want the new configuration to mirror an existing one, replace the
840 empty subdirectory with a symbolic link to the matching subdirectory in
841 the existing configuration.
848 subirectory, however, since it contains a file written by the configuration
849 script (also accessible through
854 ools\SpecialChar \menuseparator
860 \begin_inset CommandInset ref
862 reference "sec:autodetected"
868 which is configuration-specific.
871 \begin_layout Chapter
879 \begin_layout Section
880 Using the dialog for the first time
883 \begin_layout Standard
888 file will contain only changes that you have made to the default behaviour,
889 some of which is hard-coded into LyX and some of which is contained in
892 LyXDir/lyxrc.defaults
895 Note that in both files lines beginning with a
896 \begin_inset Quotes eld
904 \begin_inset Quotes erd
907 are just comments and not interpreted.
908 However, only system administrators should edit
918 ools\SpecialChar \menuseparator
925 dialog to create and modify their own
932 \begin_layout Standard
938 ools\SpecialChar \menuseparator
945 dialog will be largely self-explanatory.
946 Almost all the commands have an associated comment, so you shouldn't have
947 too much trouble modifying it to taste.
948 Before we highlight a few of the more important commands below, however,
953 ing some of your changes (e.g., screen fonts) will have an instant effect.
955 changing the bind file) will not.
956 If nothing appears to have changed, just
960 the changes and restart LyX.
963 \begin_layout Section
967 \begin_layout Standard
968 The font used to display your documents on the LyX screen is very important,
969 since you'll be reading all your documents with this font.
970 Therefore it is important that the font is as readable and good-looking
972 The LyX team tried to provide the best possible default font for you, but
973 since practically all X11 systems are different, it's likely that the default
974 fonts will be sub-optimal on your system.
975 Fortunately, you can do something about this.
976 Before we explain how to do this, you should learn a bit more about fonts
977 so that you are better prepared for choosing your fonts, because it is
978 a trade-off that is specific to your preferences and the capabilities of
982 \begin_layout Standard
983 Notice that this section only deals with the fonts on the
987 inside the LyX window.
988 The fonts that appear on the
996 are independent from these fonts, and are determined by the document class.
1001 to learn how to change the font of the printed version of your document.
1004 \begin_layout Standard
1005 Basically, screen fonts come in two different kinds: scalable outline fonts
1006 and non-scalable bitmap fonts.
1007 This distinction seems a bit arbitrary, since non-scalable fonts are actually
1008 scalable in most modern font renderers.
1009 The difference lies in the
1013 of the scaling, and the
1018 The most important decision is thus whether you should use non-scalable
1019 bitmap fonts or scalable outline fonts.
1022 \begin_layout Standard
1023 The scalable fonts are built from
1027 of the single glyphs (i.e.
1028 characters) in the font.
1029 This means that each glyph is defined using mathematical curves that are
1030 well suited for scaling to any requested size.
1031 This mathematical definition is interpreted by the font renderer and turned
1032 into a small picture composed of pixels according to which size and glyph,
1033 the programmer requests.
1034 This means that scalable fonts will look pretty good in all sizes.
1035 Well, almost all sizes.
1036 Since scalable fonts are defined in an abstract way, it can be hard to
1037 provide a good rendering at small sizes, where each pixel has to be very
1038 carefully computed to provide a good image.
1039 Technically it is possible to do this from the mathematical definition,
1040 but in order to keep the rendering reasonably fast, tradeoffs have to be
1041 made, and the result is that scalable fonts can be difficult to read at
1045 \begin_layout Standard
1046 Bitmap fonts on the other hand, are defined by bitmap graphics from the
1047 start, so they will look good at all the sizes they are meant for.
1048 However, they don't scale well, because in order to scale a glyph, each
1049 pixel is enlarged into several pixels.
1050 It is the same effect that happens if you try to enlarge a picture in
1054 or any other picture manipulation program.
1055 In order to relieve this effect, bitmap fonts are typically provided in
1056 several fixed sizes typically from around 8 pixels high up to 34 pixels
1057 or so high in steps according to what is believed to be useful.
1058 The advantage of bitmap fonts is that no complicated computations are necessary
1059 to display each glyph, so bitmap fonts are thus faster displayed than scalable
1061 The disadvantage is that sizes that don't exists as fixed versions have
1062 to be scaled by doubling pixels, and thus look bad.
1065 \begin_layout Standard
1066 The net result of all this, is that bitmap fonts are generally best for
1067 the small sizes, where they are available, while scalable fonts are generally
1068 best for large sizes.
1069 The logical conclusion would thus be to use bitmap fonts for the small
1070 sizes, and scalable fonts for the large sizes.
1071 Unfortunately, this is not a good idea, since bitmap fonts and scalable
1072 fonts are not designed to be used together, so the overall look of such
1073 a scheme would be bad.
1074 The best you can do is thus to try both schemes and decide for yourself
1078 \begin_layout Standard
1079 By default, LyX uses non-scalable bitmap fonts (when using the XForms frontend).
1084 is used, for sans serif fonts,
1092 is used as the monospaced/typewriter font.
1095 \begin_layout Standard
1096 In the following, we will describe what to do if the text does not look
1098 We'll start with the most important parameters: DPI and font zoom.
1101 \begin_layout Subsection
1102 DPI setting and Font Zoom
1105 \begin_layout Standard
1106 LyX automatically tries to scale the fonts to look as close as the paper
1107 output size as possible, except for the so-called font zoom factor.
1110 \begin_layout Standard
1111 In order for this to work on all systems, it relies on the screen DPI (dots
1112 per inch) setting to be correct.
1113 The DPI setting for your system is autodetected by LyX using the information
1114 the X server can provide.
1115 You can check what LyX autodetects the DPI setting to, by running LyX as
1123 \begin_layout Standard
1124 On many systems, X is not set up correctly, so you should check that it
1127 \begin_inset Quotes eld
1135 \begin_inset Quotes erd
1138 and write down what the DPI is for the resolution you use (this will be
1139 close to the value LyX detects).
1140 It is the number mentioned as
1141 \begin_inset Quotes eld
1145 \begin_inset Quotes erd
1149 Also write down the number of pixels you have in the width (the first number
1151 \begin_inset Quotes eld
1155 \begin_inset Quotes erd
1161 \begin_layout Standard
1162 Then get the good old ruler out of the closet, and measure the width of
1163 the visible screen-image on your monitor.
1164 Convert this measurement to inches if you used a centimeter ruler by dividing
1166 Now you can determine the correct DPI setting for your screen by dividing
1167 the number of pixels in the width by the width of the screen-image on the
1169 If this number is more than, say, 5 DPI from the detected value, you should
1170 either fix the X setup, or at least tell LyX that the DPI is different
1171 than the detected value.
1174 \begin_layout Standard
1175 If you can't fix the X setup (which of course is best since other programs
1176 than LyX will benefit from this as well), you can tell LyX the correct
1184 \begin_layout Standard
1185 If the text is too small or too big for your taste, you should fiddle with
1186 the font zoom setting.
1187 This setting is used to scale the point size of the text.
1188 If your DPI setting is correct, and the font zoom setting is set to 100,
1189 this means that LyX will try to display the text exactly the same size
1190 as it will appear on the paper-output.
1191 If you set the zoom factor to 200, the text will try to be 2 times as big
1193 Of course, this will only happen if LyX can find a font that has the appropriat
1194 e size, which you can't count on.
1195 Since LyX is a WYSIWYM system anyways, this limitation isn't much of an
1199 \begin_layout Standard
1200 The default font zoom setting is 150, since a monitor is typically wider
1201 than a piece of paper, but you should try to fiddle with it through the
1215 dialog to find a size that you like.
1216 When you've found a setting that seems to work nicely for you (tip: use
1224 button to keep the dialog open while you experiment), you can make this
1225 setting the default by using the
1235 \begin_layout Standard
1236 While it is often possible to find a suitable size for the text on the screen,
1237 this doesn't necessarily mean that the fonts are the best ones available
1239 In order to help you get the most out of your system, you can use the font
1240 definition commands to fine-tune the look of the text in greater detail
1244 \begin_layout Subsection
1245 Font definition commands
1248 \begin_layout Standard
1249 As mentioned, LyX uses non-scalable bitmap fonts by default with the XForms
1255 is used, for sans serif fonts,
1263 is used as the monospaced/typewriter font.
1266 \begin_layout Standard
1267 You can change all of these from within the
1272 The number of fonts that are available on different systems vary, but the
1277 should be available everywhere.
1278 Use that program to find candidate fonts.
1279 When you've found a font that you like, try to insert the first two elements
1281 \begin_inset Quotes eld
1285 \begin_inset Quotes erd
1289 \begin_inset Quotes eld
1293 \begin_inset Quotes erd
1300 ) in the appropriate field in the
1312 LyX will then reformat your document using the new font, and if you like
1313 the font, you should
1321 One place to start for a new font is to see if the scalable font
1322 \begin_inset Quotes eld
1326 \begin_inset Quotes erd
1330 Tip: You can see whether a font is a bitmap font or a scalable font by
1332 \begin_inset Quotes eld
1336 \begin_inset Quotes erd
1340 \begin_inset Quotes eld
1344 \begin_inset Quotes erd
1352 If the value 0 is available, the font is scalable.
1353 If the value 0 isn't available, the font is a bitmap font.
1356 \begin_layout Standard
1357 Before you go about scrapping a bitmap font because the larger sizes look
1359 \begin_inset Quotes eld
1363 \begin_inset Quotes erd
1366 , you should toggle the
1367 \begin_inset Quotes eld
1371 \begin_inset Quotes erd
1375 This is only useful if you use bitmap fonts, because only these don't scale
1377 If you define this flag, LyX will only use the fixed font sizes that are
1378 available, and this guarantees that all bitmap fonts look well.
1379 (You can see which individual font sizes are available with the
1388 .) However, the prize is that the difference between the size of the fonts
1389 on screen and the size of fonts on paper will be larger because LyX will
1390 have to be satisfied with the closest available size, and not try to scale
1392 Also, you can risk that some logically different sizes, such as
1400 , will be mapped to the same screen font, making it hard for you to see
1401 the difference on screen.
1402 We've decided not to use scalable fonts by default because of these artifacts,
1403 but since LyX is a WYSIWYM system, many people like to use the flag anyways,
1404 well-knowing that the font size on the screen can't be trusted.
1405 But remember that this flag only makes a difference when you use bitmap
1407 Scalable fonts won't be affected for reasons you should understand by now.
1410 \begin_layout Standard
1411 One final note regarding this flag: you should know that there is nothing
1412 wrong with using bitmap and scalable fonts at the same time for different
1414 For instance, it's common to use the scalable
1415 \begin_inset Quotes eld
1419 \begin_inset Quotes erd
1422 for the serif text together with a bitmap version of
1423 \begin_inset Quotes eld
1427 \begin_inset Quotes erd
1431 And you can safely select the
1432 \begin_inset Quotes eld
1436 \begin_inset Quotes erd
1439 button without worries: It will only apply to the Helvetica font.
1442 \begin_layout Standard
1443 Sometimes the artifacts introduced by use of the flag can be relieved by
1444 using the fine-detail screen font sizes which defines which point sizes
1445 the different logical font sizes correspond to.
1450 to see exactly what concrete fonts the logical sizes map to, and try adjusting
1451 the corresponding entries in the
1455 dialog until you've managed to hit the nail and get the fonts you want.
1456 This can be hard to do, because LyX uses the DPI setting and the font zoom
1457 settings to calculate which exact screen font size to ask the X server
1458 for, thus obfuscating the mapping.
1459 If you can't make it by trial-and-error, you can make the process more
1460 transparent if you set both the DPI setting and font zoom settings to 100---eve
1461 n when this is known to be wrong.
1462 This will of course make your scalable fonts look weird, so use with care.
1465 \begin_layout Subsection
1469 \begin_layout Standard
1470 By default, LyX will use fonts meant to write Western European text, including
1471 all kinds of English.
1472 This is defined through the so-called
1481 If you want to use LyX to write for instance Eastern European text, Cyrillic
1482 or any other language not covered by the ISO-8859-1 font encoding, you
1483 can define a different one with the encoding setting.
1484 This requires you to have special fonts installed.
1489 to see whether this is the case: check the
1490 \begin_inset Quotes eld
1494 \begin_inset Quotes erd
1498 \begin_inset Quotes eld
1502 \begin_inset Quotes erd
1505 fields for ISO-8859-X values different from ISO-8859-1, and search for
1506 one that contains the national characters of your language.
1507 If you find any, enter this encoding in the dialog.
1508 If not, go searching the Web for appropriate fonts.
1509 For the Qt frontend, it's recommended you use an iso646 font set.
1512 \begin_layout Standard
1513 When you've set LyX up to use a different font encoding, you should also
1514 consider changing the font used by dialog windows in LyX.
1521 dialog will not be understandable unless you tell LyX to use a different
1523 By default the menu font is set to
1525 -*-helvetica-medium-r
1527 , but often Helvetica is not available in the font encoding you need, so
1528 the dialog allows this to be changed.
1531 \begin_layout Standard
1532 As you can see, there are quite a few options that can be used to fine tune
1533 the look of your fonts.
1534 This should not scare you from fiddling with the settings, because after
1535 all, you will hopefully be using LyX for many hours in the future.
1536 And contrary to real WYSIWYG word processors where you are tied to using
1537 fonts that have to look good both on paper and on screen, LyX gives you
1538 the possibility of using fonts that are designed to look good on the screen
1539 while using a different set of fonts to look good on paper.
1542 \begin_layout Section
1544 \begin_inset CommandInset label
1553 \begin_layout Standard
1554 Bindings are used to, well, bind a function to a key.
1555 Several prepackaged binding files are available: a CUA set of bindings
1556 (familiar as the typical set of PC and CDE set of keyboard shortcuts),
1557 an Emacs set of bindings, for those of us who follow the One True Way and
1558 refuse to lower our standards,
1562 \begin_layout Standard
1563 I'm kidding here, of course!
1568 as well as specialty bindings (broadway and hollywood) and other languages
1569 (French, German, etc.).
1572 \begin_layout Standard
1573 If, however, you'd like to customise the keybindings to your own exacting
1574 tastes, then copy the best-fit file in
1583 Don't forget to load this new file into LyX using the
1588 (For the moment you'll have to restart LyX for these changes to take effect.)
1591 \begin_layout Standard
1592 LyX supports internationalization of the user interface (see Chapter\InsetSpace ~
1594 \begin_inset CommandInset ref
1596 reference "chap:i18n"
1605 is set, with the environment variable
1609 , LyX will try to use bindfiles by prepending
1614 For example, you can put a translated copy of some standard bind file in
1619 directory, and LyX will use it automatically.
1622 \begin_layout Standard
1627 files is straightforward:
1630 \begin_layout Standard
1635 bind <key combination> <lyx-function>
1638 \begin_layout Standard
1639 Both key combination and lyx-function (including any arguments) must be
1640 enclosed in "double quotes".
1641 All the LyX functions are listed in the
1648 \begin_layout Section
1650 \begin_inset CommandInset label
1659 \begin_layout Standard
1660 The appearance of both the menu and toolbar may both be changed using the
1675 For the moment, only one file exists,
1679 , but feel free to experiment.
1680 Just copy the file to the
1684 directory and play! Note that, for the moment, you'll have to restart LyX
1685 for these changes to take effect.
1688 \begin_layout Standard
1693 files is straightforward: have a look at
1706 entries must be ended with an explicit
1731 s and in the case of the
1732 \begin_inset Quotes eld
1736 \begin_inset Quotes erd
1744 One small word of warning.
1749 s may be inserted in a
1757 , but they are defined as
1768 \begin_layout Section
1769 \begin_inset CommandInset label
1771 name "sec:converters-etc"
1775 Converters, Formats, and Copiers
1778 \begin_layout Standard
1779 LyX has a powerful mechanism to convert to and from any file format using
1784 \begin_layout Subsection
1788 \begin_layout Standard
1789 The first step is to define your file formats if they are not already defined.
1792 Tools\SpecialChar \menuseparator
1793 Preferences:Converters
1796 Enter a new format name; a new GUI name (used in e.\InsetSpace \thinspace{}
1806 menus); and a file extension.
1811 \begin_layout Standard
1816 option tells LyX that a format is suitable for document export.
1817 If this is is set and if a suitable conversion route exists, the format
1820 File\SpecialChar \menuseparator
1824 The format will also appear in the
1828 menu if it has a specified viewer.
1829 Pure image formats, e.\InsetSpace \thinspace{}
1835 , should not use this option.
1836 Formats that can both represent vector graphics and documents like e.\InsetSpace \thinspace{}
1845 \begin_layout Standard
1848 Vector graphics format
1850 tells LyX that a format can contain vector graphics.
1851 This information is used to determine the target format of included graphics
1857 Included graphics may need to be converted to either
1873 cannot handle other image formats.
1874 If an included graphic is not already in
1886 format, it is converted to
1890 if the vector format option is set, and otherwise to
1897 \begin_layout Standard
1898 A Format can have a Viewer and Editor program associated with it.
1899 For example, you might want to use
1903 to view PostScript files.
1904 You can enter the program call and its options to the corresponding fields.
1905 For the call you can use the four variable listed in the next section.
1906 The viewer is launched when you view an image in LyX or use the
1911 If the operating system has a default viewer associated to a format, this
1912 viewer is used instead of the one defined here when you enter in the Viewer
1914 \begin_inset Quotes eld
1922 \begin_inset Quotes erd
1926 The editor is for example launched when you press the
1941 \begin_layout Subsection
1945 \begin_layout Standard
1946 Each format can have a Copier associated with it.
1947 These are defined in the
1949 Tools\SpecialChar \menuseparator
1953 Since all conversions from one format to another take place in LyX's temporary
1954 directory, it is sometimes necessary to modify a file before copying it
1955 to the temporary directory in order that the conversion may be performed.
1959 \begin_layout Standard
1960 For example, the file may refer to other files---images, for example---using
1961 relative filenames, and these may become invalid when the file is copied
1962 to the temporary directory.
1967 This is done by the Copier: It copies a file to (or from) the temporary
1968 directory and may modify it in the process.
1971 \begin_layout Standard
1972 Copiers may also be used for other purposes.
1973 For example, if appropriate converters are found, LyX will automatically
1974 install copiers for the
1984 When these formats are exported, the copier sees that not just the main
1985 HTML file but various associated files (style files, images, etc.) are also
1987 All these files are written to a subdirectory of the directory in which
1988 the original LyX file was found.
1992 \begin_layout Standard
1993 This copier can be customized.
1995 \begin_inset Quotes eld
1999 \begin_inset Quotes erd
2002 argument takes a comma-separated list of extensions to be copied; if it
2003 is omitted, all files will be copied.
2005 \begin_inset Quotes eld
2009 \begin_inset Quotes erd
2012 argument determines the extension added to the generated directory.
2014 \begin_inset Quotes eld
2022 \begin_inset Quotes erd
2025 , so HTML generated from
2027 /path/to/filename.lyx
2031 /path/to/filename.html.LyXconv
2042 \begin_layout Standard
2043 The definitions of the copiers may use four variables:
2047 \labelwidthstring 00.00.0000
2048 $$s The LyX system directory (e.\InsetSpace \thinspace{}
2058 \labelwidthstring 00.00.0000
2063 \labelwidthstring 00.00.0000
2068 \labelwidthstring 00.00.0000
2069 $$l The `LaTeX name'
2072 \begin_layout Standard
2073 The latter is to be given in a form suitable for inclusion in a LaTeX's
2080 command and is relevant only when exporting files suitable for such inclusion.
2083 \begin_layout Standard
2084 Copiers can be used to do almost anything with output files.
2085 For example, suppose you want generated pdf files to be copied to a special
2087 \begin_inset Flex CharStyle:Code
2090 \begin_layout Standard
2097 Then you could write a shell script such as this one:
2100 \begin_layout Standard
2101 \begin_inset listings
2105 \begin_layout Standard
2110 \begin_layout Standard
2115 \begin_layout Standard
2117 TOFILE=`basename $2`
2120 \begin_layout Standard
2122 cp $FROMFILE /home/you/pdf/$TOFILE
2127 Save that in your local LyX directory---say,
2128 \begin_inset Flex CharStyle:Code
2131 \begin_layout Standard
2132 /home/you/.lyx/scripts/pdfcopier.sh
2137 ---and make it executable, if you need to do so on your platform.
2140 Tools\SpecialChar \menuseparator
2147 format---or one of the other pdf formats---and enter
2148 \begin_inset Flex CharStyle:Code
2151 \begin_layout Standard
2152 pdfcopier.sh $$i $$o
2165 \begin_layout Subsection
2169 \begin_layout Standard
2170 To define a new converter, select an existing one, select a different format
2176 and\InsetSpace \thinspace{}
2177 /\InsetSpace \thinspace{}
2183 drop-down list, modify the
2187 field, and press the
2194 \begin_layout Standard
2195 You do not have to define converters between all the formats between which
2196 you want to convert.
2197 For example, you will note that there is no `LyX to PostScript' converter,
2198 but LyX will export PostScript.
2199 It does so by first creating a LaTeX file (no converter needs to be defined
2200 for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2201 and finally converts the resulting DVI file to PostScript.
2202 LyX finds such `chains' of converters automatically, and it will always
2203 choose the shortest possible chain.
2204 You can, though, still define multiple conversion methods between file
2206 For example, the standard LyX configuration provides three ways to convert
2207 LaTeX to PDF: Directly, using
2211 ; via (DVI and) PostScript, using
2220 To define such alternate chains, you must define multiple target `file
2221 formats', as described in the next section.
2222 For example in the standard configuration the formats named
2234 are defined, all of which share the extension
2241 \begin_layout Standard
2242 Several variables can be used in the definition of converters:
2246 \labelwidthstring 00.00.0000
2247 $$s The LyX system directory
2251 \labelwidthstring 00.00.0000
2256 \labelwidthstring 00.00.0000
2261 \labelwidthstring 00.00.0000
2262 $$b The base filename of the input file
2266 \labelwidthstring 00.00.0000
2267 $$p The path to the input file
2270 \begin_layout Standard
2276 field you can enter the following flags, separated by commas:
2280 \labelwidthstring 00.00.0000
2281 latex This converter runs some form of LaTeX.
2282 This will make LyX's LaTeX error logs available.
2286 \labelwidthstring 00.00.0000
2287 needaux Needs the LaTeX
2291 file for the conversion.
2295 \labelwidthstring 00.00.0000
2299 \begin_layout Standard
2300 The following three flags are not really flags at all because they take
2311 \labelwidthstring 00.00.0000
2312 parselog If set, the converter's standard error will be redirected to a
2317 , and the script given as argument will be run as:
2319 script <infile.out >infile.log
2322 The argument may contain $$s.
2326 \labelwidthstring 00.00.0000
2327 resultdir The name of the directory in which the
2331 will dump the generated files.
2332 LyX will not create this directory, and it does not copy anything into
2333 it, though it will copy this directory to the destination.
2334 The argument may contain $$b, which will be replaced by the basename of
2335 the input and output files, respectively, when the directory is copied.
2338 that resultdir and usetempdir make no sense together.
2339 The latter will be ignored if the former is given.
2343 \labelwidthstring 00.00.0000
2344 resultfile Determines the output filename and may, contain $$b.
2345 Sensible only with resultdir, and optional even then; if not given, it
2346 defaults to `index'.
2349 \begin_layout Standard
2350 None of these last three are presently used in any of the converters that
2351 are installed with LyX.
2353 \begin_inset CommandInset ref
2355 reference "sub:LyX-and-Literate"
2359 of the Extended Features guide for some examples of how you might use parselog.
2362 \begin_layout Section
2363 BibTeX and makeindex
2366 \begin_layout Standard
2367 Both the bibliography generating command (default
2371 ) and the index generating command (default
2384 As an alternative for
2396 \begin_layout Standard
2397 The command to enter is
2403 makeindex.sh -m $$lang
2406 \begin_layout Standard
2407 where the placeholder
2411 will be replaced by the chosen document (babel) language.
2415 \begin_layout Standard
2416 have installed the packages
2433 at a shell prompt for a help page.
2436 \begin_layout Section
2437 Plain text export options
2440 \begin_layout Standard
2441 \begin_inset VSpace bigskip
2447 \begin_layout Standard
2449 There are a couple of commands that can be used to
2450 \begin_inset Quotes eld
2454 \begin_inset Quotes erd
2457 exported plain text files.
2458 Note that LyX automatically detects and uses the best settings for your
2459 system at installation time, but you can modify them if you disagree with
2463 \begin_layout Description
2467 Plain text\InsetSpace ~
2471 This option defines the command used to produce better plain text tables
2476 UNIX-commands (refer to their manpages for more information about them).
2477 Setting this as empty tells LyX to use the internal (inferior) formatter.
2480 \begin_layout Description
2484 Plain text\InsetSpace ~
2489 With this command you can set the default line length of the plain text
2491 Setting it to 0 means endless lines.
2494 \begin_layout Section
2498 \begin_layout Standard
2499 There are a bunch of configuration options that are used for interaction
2500 with the external print command from LyX.
2501 Normally the defaults are fine: if, however, your print command takes different
2502 option names, you can modify them here.
2505 \begin_layout Subsection
2509 \begin_layout Standard
2510 You can change the colors used by LyX on-screen using the new
2515 Alternatively, if you're feeling particularly perverse you could use the
2520 bindable function (see the
2525 Input would have the format:
2528 \begin_layout Standard
2531 set-color LyXName X11Color
2534 \begin_layout Standard
2535 Here is a (partial) list of the functions and default colors:
2538 \begin_layout Standard
2540 \begin_inset Tabular
2541 <lyxtabular version="3" rows="10" columns="3">
2543 <column alignment="left" valignment="top" leftline="true" width="0pt">
2544 <column alignment="left" valignment="top" leftline="true" width="0pt">
2545 <column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
2546 <row topline="true" bottomline="true">
2547 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2550 \begin_layout Standard
2565 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2568 \begin_layout Standard
2583 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2586 \begin_layout Standard
2602 <row topline="true">
2603 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2606 \begin_layout Standard
2621 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2624 \begin_layout Standard
2639 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2642 \begin_layout Standard
2658 <row topline="true">
2659 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2662 \begin_layout Standard
2677 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2680 \begin_layout Standard
2695 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2698 \begin_layout Standard
2714 <row topline="true">
2715 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2718 \begin_layout Standard
2733 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2736 \begin_layout Standard
2751 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2754 \begin_layout Standard
2770 <row topline="true">
2771 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2774 \begin_layout Standard
2789 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2792 \begin_layout Standard
2807 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2810 \begin_layout Standard
2826 <row topline="true">
2827 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2830 \begin_layout Standard
2845 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2848 \begin_layout Standard
2858 fraction Lines, brackets, etc.
2863 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2866 \begin_layout Standard
2882 <row topline="true">
2883 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2886 \begin_layout Standard
2901 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2904 \begin_layout Standard
2910 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2913 \begin_layout Standard
2929 <row topline="true">
2930 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2933 \begin_layout Standard
2948 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2951 \begin_layout Standard
2957 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2960 \begin_layout Standard
2976 <row topline="true">
2977 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2980 \begin_layout Standard
2995 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2998 \begin_layout Standard
3004 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3007 \begin_layout Standard
3023 <row topline="true" bottomline="true">
3024 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
3027 \begin_layout Standard
3042 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
3045 \begin_layout Standard
3055 selection background
3060 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3063 \begin_layout Standard
3086 \begin_layout Section
3087 The autodetected settings
3090 \begin_layout Standard
3091 \begin_inset CommandInset label
3093 name "sec:autodetected"
3097 There are several items that are detected for you when you run
3104 \SpecialChar \menuseparator
3110 In this section, we list those which pertain to the user preferences.
3113 \begin_layout Description
3119 plaintext_roff_command
3134 , depending on what is available.
3137 \begin_layout Description
3150 plus a bunch of options.
3153 \begin_layout Description
3166 on systems (so-called System V) who have this command, and
3170 otherwise (BSD systems).
3173 \begin_layout Description
3179 print_spool_printerprefix
3190 , depending on whether
3201 \begin_layout Description
3218 fonts are found and LaTeX has support for these fonts built-in.
3219 You can set it manually if you only have the so-called
3226 \begin_layout Section
3230 \begin_layout Standard
3231 There are many other configuration options that can be used to customize
3233 We still need to document them here, but again, most should be fairly obvious.
3234 Please ask on the mailing lists if you need some more information; it may
3235 even prompt us to expand this section.
3238 \begin_layout Chapter
3239 Internationalizing LyX
3240 \begin_inset CommandInset label
3249 \begin_layout Standard
3250 LyX supports using a translated interface.
3251 Last time we checked, LyX provided text in 14 languages together with the
3252 default English text.
3253 The language of choice is called your
3258 (For further reading on locale settings, see also the documentation for
3259 locale that comes with your operating system.
3260 For Linux, the manual page for locale(5) could be a good place to start).
3263 \begin_layout Standard
3264 Notice that these translations will work, but do contain a few flaws.
3265 In particular, all dialogs have been designed with the English text in
3266 mind, which means that some of the translated text will be too large to
3267 fit within the space allocated.
3268 This is only a display problem and will not cause any harm.
3269 Also, you will find that some of the translations do not define short-cut
3270 keys for everything.
3271 Sometimes, there are simply not enough free letters to do it.
3272 Other times, the translator just hasn't got around to doing it yet.
3273 Our localization team -- which you may wish to join -- will try to fix
3274 these shortcomings in future versions of LyX.
3277 \begin_layout Section
3278 Selecting an alternative language for the user interface
3281 \begin_layout Standard
3282 This feature is disabled by default, meaning that system default language
3284 To enable an alternative language, you have to set an appropriate environment
3292 for csh class shells
3307 with the two letter code (or four letter code, like
3311 for British English) for the language you want.
3317 Besides the user interface texts being translated, also the appropriate
3318 manuals will be presented under the Help menu -- if available.
3321 \begin_layout Standard
3322 On some systems, you may have to redefine
3334 , to override the system settings; their preference is in this order
3338 \begin_layout Standard
3339 The shell variable LANGUAGE has been disabled in LyX for technical reasons.
3345 , which corresponds to the way GNU
3350 Consult your system documentation.
3351 Normally, you'll want to put the appropriate line in a shell script run
3352 on start-up, so that the translation is on by default.
3353 Remember that this affects
3357 localized packages, not only LyX!
3360 \begin_layout Standard
3361 If LyX is configured and compiled with
3362 \begin_inset Quotes eld
3370 \begin_inset Quotes erd
3373 , this mechanism will not work.
3376 \begin_layout Section
3380 \begin_layout Subsection
3381 Translating the graphical user interface (text messages).
3384 \begin_layout Standard
3389 library to handle the internationalization of the interface.
3390 To have LyX speak your favorite language in all menus and dialogs, you
3395 -file for that language.
3396 When this is available, you'll have to generate a mo-file from it and install
3402 The process of doing all of this is explained in the documentation for
3407 , but in short, this is what you do (
3411 denotes the language code):
3414 \begin_layout Standard
3418 \begin_layout Standard
3430 \begin_layout Itemize
3433 LYX-SOURCE-DIR/po/lyx.pot
3446 doesn't exist, it can be remade with
3450 in that directory, or you can use an existing po-file for some other language
3454 \begin_layout Itemize
3461 \begin_layout Standard
3462 We recommend that you use Emacs to do this, since the
3466 distribution includes a nice mode that supports you in doing this.
3474 For some menu- and widget-labels, there are also shortcut keys that should
3476 Those keys are marked after a `|', and should be translated according to
3477 the words and phrases of the
3482 There is a tool named
3486 written in Prolog in
3488 LYX-SOURCE-DIR/development/tools/
3490 that may be useful to help determine short-cut keys.
3491 Note that XForms (version 0.86 at least) can't handle anything but 7-bit
3492 characters as shortcut keys.
3493 You should also fill also out the information at the beginning of the new
3498 -file with your email-address, etc., so people know where to reach you with
3499 suggestions and entertaining flames.
3502 \begin_layout Itemize
3511 This can be done with
3532 \begin_layout Itemize
3537 -file to your locale-tree, at the correct directory for application messages
3542 , and under the name
3551 /usr/local/share/locale/
3562 \begin_layout Standard
3566 \begin_layout Standard
3578 \begin_layout Standard
3579 Adding a new po-file to the
3583 of LyX involves altering the configure scripts and more, but the way
3587 works, you don't actually need the source-code of LyX to translate it---having
3603 \begin_layout Standard
3604 If you've written a translation file for a language that LyX does not currently
3605 support, feel free to submit it for inclusion by sending a patch.
3606 In this case, we recommend that you read the
3614 directory for more instructions.
3617 \begin_layout Subsubsection
3621 \begin_layout Standard
3622 Sometimes it turns out that one english message needs to be translated into
3623 different messages in the target language.
3624 One example is the message
3628 which has the german translation
3645 does not handle such ambigous translations.
3646 Therefore you have to add some context information to the message: Instead
3653 To[[as in 'From format x to format y']]
3657 To[[as in 'From page x to page y']].
3660 Now the two occurences of
3668 and can be translated correctly to
3683 \begin_layout Standard
3684 Of course the context information needs to be stripped off the original
3685 message when no translation is used.
3686 Therefore you have to put it in double square brackets at the end of the
3687 message (see the example above).
3688 The translation mechanism of LyX ensures that everything in double square
3689 brackets at the end of messages is removed before displaying the message.
3692 \begin_layout Subsection
3693 Translating the documentation.
3696 \begin_layout Standard
3697 The online documentation (in the
3704 -menu) can (and should!) be translated.
3705 If there are translated versions of the documentation available
3709 \begin_layout Standard
3710 As of February 2003, almost all of the docs have been translated into German
3716 has been translated into at least 12 other languages, with other translations
3718 The library of translated documents is growing rapidly.
3723 , and the locale is set accordingly, these will be used automagically by
3725 LyX looks for translated versions as
3739 denotes the language as set by the environmental variable
3744 If there are none, the default English versions will be displayed.
3745 Note that the translated versions must have the same filenames (
3749 above) as the original.
3750 If you feel up to translating the documentation (an excellent way to proof-read
3751 the original documentation BTW!), there are a few things you should do
3755 \begin_layout Itemize
3760 , the guide to writing LyX documentation.
3761 Pay special attention to the translator's section.
3764 \begin_layout Itemize
3765 Check out the documentation translation web page at
3766 \begin_inset Flex URL
3769 \begin_layout Standard
3770 http://www.devel.lyx.org
3776 That way, you can find out which (if any) documents have already been translate
3777 d into your language.
3778 You can also find out who (if anyone) is organizing the effort to translate
3779 the documentation into your language.
3780 If no one is organizing the effort, please let us know that you're interested.
3783 \begin_layout Standard
3784 Once you get to actually translating, here's a few hints for you that may
3788 \begin_layout Itemize
3789 Join the documentation team! There is information on how to do that in
3798 elp\SpecialChar \menuseparator
3805 ), which by the way is the first document you should translate.
3808 \begin_layout Itemize
3809 Learn the typographic conventions for the language you are translating to.
3810 Typography is an ancient art and over the centuries, a great variety of
3811 conventions have developed throughout different parts of the world.
3812 Also study the professional terminology amongst typographers in your country.
3813 Inventing your own terminology will only confuse the users.
3816 (Warning! Typography is addictive!)
3819 \begin_layout Itemize
3820 Make a copy of the document.
3821 This will be your working copy.
3822 You can use this as your personal translated help-file by placing it in
3830 \begin_layout Itemize
3831 Sometimes the original document (from the LyX-team) will be updated.
3832 Use the ViewCVS tool available at
3833 \begin_inset Flex URL
3836 \begin_layout Standard
3837 http://www.lyx.org/viewcvs.cgi/lyxdoc/
3842 to see what has been changed
3846 \begin_layout Standard
3847 Alternatively, you can keep a copy of the latest version of the English
3848 document which you've translated.
3854 That way you can easily see which parts of the translated document need
3858 \begin_layout Itemize
3859 If you ever find an error in the original document, fix it and notify the
3860 rest of the documentation team of the changes! (You didn't forget to join
3861 the documentation team did you?)
3864 \begin_layout Section
3865 International Keyboard Support
3868 \begin_layout Standard
3871 [Editor's Note: The following section is by
3879 It needs to be fixed to conform to the new Documentation Style sheet and
3880 to make use of the new v1.0 features.
3881 The whole thing also needs to be merged with the section following it.-jw]
3884 \begin_layout Subsection
3885 Defining Own Keymaps: Keymap File Format
3888 \begin_layout Standard
3889 Let's look at a keyboard definition file a little closer.
3890 It is a plain text file defining
3893 \begin_layout Itemize
3894 key-to-key or key-to-string translations
3897 \begin_layout Itemize
3901 \begin_layout Itemize
3902 dead keys exceptions
3905 \begin_layout Standard
3906 To define key-to-key or key-to-string translation, use this command:
3909 \begin_layout Quotation
3925 \begin_layout Standard
3930 is the key to be translated and
3934 is the string to be inserted into the document.
3935 To define dead keys, use:
3938 \begin_layout Quotation
3954 \begin_layout Standard
3964 The following dead keys are supported (shortcut name is in parentheses):
3967 \begin_layout Quotation
3975 \begin_layout Quotation
3981 \begin_layout Quotation
3987 \begin_layout Quotation
3993 \begin_layout Quotation
3999 \begin_layout Quotation
4006 \begin_layout Standard
4018 \begin_layout Quotation
4024 \begin_layout Quotation
4031 \begin_layout Standard
4043 \begin_layout Quotation
4049 \begin_layout Quotation
4055 \begin_layout Quotation
4062 \begin_layout Standard
4074 \begin_layout Quotation
4081 \begin_layout Standard
4093 \begin_layout Quotation
4099 \begin_layout Quotation
4100 hungarian umlaut (hug)
4105 \begin_layout Quotation
4111 \begin_layout Quotation
4118 \begin_layout Standard
4130 \begin_layout Standard
4131 Since in many international keyboards there are exceptions to what some
4132 dead keys should do, you can define them using
4135 \begin_layout Quotation
4144 deadkey key outstring
4147 \begin_layout Standard
4148 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
4152 \begin_layout Quotation
4166 \begin_layout Standard
4167 to make it work correctly.
4168 Also, you have to define as exceptions dead keys over i and j, to remove
4169 the dot from them before inserting an accent mark.
4170 I will change this when the time comes, but so far I haven't had time.
4173 \begin_layout Standard
4174 Oh, and about characters: backslash is escaped, so to enter it, you'll need
4180 have different meaning.
4185 marks comments, quotes start and end LaTeX-style commands.
4186 To enter quote, you'll need to use
4205 \begin_layout Standard
4206 If you make a keyboard description file that works for your language, please
4207 mail it to me, so I can include it in the next keymap distribution.
4210 \begin_layout Standard
4211 More keywords will be supported in keymap configuration file in future,
4215 \begin_layout Itemize
4233 \begin_layout Itemize
4248 an external keymap translation program
4251 \begin_layout Standard
4252 Also, it should look into
4256 file for defaults, too (for example, a
4262 option to include default keyboard).
4265 \begin_layout Section
4266 International Keymap Stuff
4267 \begin_inset CommandInset label
4276 \begin_layout Standard
4277 The next two sections describe the
4289 file syntax in detail.
4290 These sections should help you design your own key map if the ones provided
4291 do not meet your needs.
4294 \begin_layout Subsection
4298 \begin_layout Standard
4307 file maps keystrokes to characters or strings.
4308 As the name suggests it sets a keyboard mapping.
4333 are described in this section.
4337 \labelwidthstring 00.00.0000
4344 Map a character to a string
4347 \begin_layout LyX-Code
4362 \begin_layout Standard
4395 the double-quote (")
4412 must be escaped with a preceding backslash (
4423 \begin_layout Standard
4430 statement to cause the symbol
4436 to be output for the keystroke
4445 \begin_layout LyX-Code
4452 \labelwidthstring 00.00.0000
4459 Specify an accent character
4462 \begin_layout LyX-Code
4471 \begin_layout Standard
4472 This will make the cha
4510 This is the dead key
4514 \begin_layout Standard
4521 refers to a key that does not produce a character by itself, but when followed
4522 with another key, produces the desired accent character.
4523 For example, a German characte
4525 r with an umlaut like
4535 can be produced in this manner.
4544 \begin_layout Standard
4557 and then another key not in
4574 followed by the other, unallowed key, as output.
4583 cancels a dead key, so if
4600 , the cursor will not go one position backwards but will instead cancel
4617 might have had on the next keystroke.
4621 \begin_layout Standard
4622 The following example specifies that the character ' is to be an acute accent,
4623 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4626 \begin_layout LyX-Code
4629 kmod ' acute aeiouAEIOU
4633 \labelwidthstring 00.00.0000
4638 Specify an exception to the accent character
4641 \begin_layout LyX-Code
4650 \begin_layout Standard
4651 This defines an exce
4692 have been assigned a keystroke with a previous
4715 must not belong in the
4767 If such a declaration does not exist in
4823 \begin_layout Standard
4824 The following command produces causes äi to be produced when you enter acute-i
4828 \begin_layout LyX-Code
4843 \labelwidthstring 00.00.0000
4848 Combine two accent characters
4851 \begin_layout LyX-Code
4857 accent1 accent2 allowed
4860 \begin_layout Standard
4861 This one is getting pretty esoteric.
4862 It allows you to combine the effect
4943 \begin_layout Standard
4944 Consider this example from the
4953 \begin_layout LyX-Code
4956 kmod ; acute aeioyvhAEIOYVH
4960 kcomb acute umlaut iyIY
4963 \begin_layout Standard
4964 This allows you to press
4970 and get the effect of
4987 in this case cancels the last dead key, so if you press
5004 \begin_layout Subsection
5008 \begin_layout Standard
5015 mapping is performed, a
5022 file maps the strings that the symbols generate to characters in the current
5024 The LyX distribution currently includes at least the
5039 \begin_layout Standard
5046 file is a sequence of declarations of the form
5049 \begin_layout LyX-Code
5062 \begin_layout Standard
5063 For example, in order to map
5071 to the corresponding character in the iso-8859-1 set (233), the following
5075 \begin_layout LyX-Code
5083 \begin_layout Standard
5106 the same character can apply to more than one string.
5117 \begin_layout LyX-Code
5143 \begin_layout Standard
5144 If LyX cannot find a mapping for the string produced by the keystroke or
5145 a deadkey sequence, it will check if it looks like an accented char and
5146 try to draw an accent over the character on screen.
5149 \begin_layout Subsection
5153 \begin_layout Standard
5154 There is a second way to add support for international characters through
5155 so-called dead-keys.
5156 A dead-key works in combination with a letter to produce an accented character.
5157 Here, we'll explain how to create a really simple dead-key to illustrate
5161 \begin_layout Standard
5162 Suppose you happen to need the circumflex character,
5163 \begin_inset Quotes eld
5167 \begin_inset Quotes erd
5175 -key [a.k.a.\InsetSpace ~
5180 ] to the LyX command
5189 Now, whenever you type the
5193 -key followed by a letter, that letter will have a circumflex accent on
5195 For example, the sequence
5196 \begin_inset Quotes eld
5204 \begin_inset Quotes erd
5207 produces the letter:
5208 \begin_inset Quotes eld
5212 \begin_inset Quotes erd
5216 If you tried to type
5217 \begin_inset Quotes eld
5225 \begin_inset Quotes erd
5228 , however, LyX will complain with a beep, since a
5229 \begin_inset Quotes eld
5237 \begin_inset Quotes erd
5240 never takes a circumflex accent.
5245 after a dead-key produces the bare-accent.
5246 Please note this last point! If you bind a key to a dead-key, you'll need
5247 to rebind the character on that key to yet another key.
5252 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5255 \begin_layout Standard
5256 One common way to bind dead-keys is to use
5268 in combination with an accent, like
5269 \begin_inset Quotes eld
5277 \begin_inset Quotes erd
5281 \begin_inset Quotes eld
5289 \begin_inset Quotes erd
5293 \begin_inset Quotes eld
5301 \begin_inset Quotes erd
5305 Another way involves using
5313 [remember them from section?] to set up the special
5322 acts in some ways just like
5326 and permits you to bind keys to accented characters.
5327 You can also turn keys into dead-keys by binding them to something like
5332 and then binding this symbolic key to the corresponding LyX command.
5336 \begin_layout Standard
5341 : This is exactly what I do in my
5359 and a bunch of these
5360 \begin_inset Quotes eld
5368 \begin_inset Quotes erd
5371 symbolic keys bound such things as
5382 This is how I produce my accented characters.
5387 You can make just about anything into the
5395 keys, a spare function key, etc.
5396 As for the LyX commands that produce accents, check the entry for
5405 You'll find the complete list there.
5408 \begin_layout Subsection
5409 Saving your Language Configuration
5412 \begin_layout Standard
5413 \begin_inset CommandInset label
5419 You can edit your preferences so that your desired language environment
5420 is automatically configured when LyX starts up, via the
5425 dit\SpecialChar \menuseparator
5435 \begin_layout Chapter
5436 Installing New Document Classes, Layouts, and Templates
5437 \begin_inset CommandInset label
5439 name "chap:textclass"
5447 \begin_layout Standard
5448 Installing New Document Classes
5456 \begin_layout Standard
5457 In this chapter, we describe the procedures for creating and installing
5458 new LyX layout and template files, as well as offer a refresher on correctly
5459 installing new LaTeX document classes.
5460 Some definitions: a document class is a LaTeX file (usually ending in
5468 ) which describes the format of a document such as an article, report, journal
5470 and all the commands needed to realize that format.
5471 A layout file is a LyX file which corresponds to a LaTeX document class
5472 and which tells LyX how to
5473 \begin_inset Quotes eld
5477 \begin_inset Quotes erd
5480 things on the screen to make the display look something like the final
5482 More precisely, a layout file describes a
5483 \begin_inset Quotes eld
5487 \begin_inset Quotes erd
5490 which is the internal construct LyX uses to render the screen display.
5492 \begin_inset Quotes eld
5496 \begin_inset Quotes erd
5500 \begin_inset Quotes eld
5504 \begin_inset Quotes erd
5507 can be used somewhat interchangeably, but it is better to refer to the
5508 file as the layout, and the thing living in LyX's memory as the text class.
5509 A template file is simply a LyX document which contains a set of predefined
5510 entries for a given document class which are generally required for that
5512 Templates are especially useful for things like journal manuscripts which
5513 are to be submitted electronically.
5516 \begin_layout Section
5517 Installing a new LaTeX package
5520 \begin_layout Standard
5521 Some installations may not include a LaTeX package that you would like to
5523 For example, you might need FoilTeX, a common (and very powerful) package
5524 for preparing slides or viewgraphs for overhead projectors.
5525 Here are the formal steps involved in getting the package up and running
5526 if you are using teTeX or some other web2c based distribution.
5530 \begin_layout Enumerate
5531 Get the package from CTAN or wherever.
5535 \begin_layout Standard
5538 Inventory of your LaTeX configuration
5540 manual for details of what CTAN is and where supported document classes
5549 \begin_layout Enumerate
5554 (this usually lives in the directory
5558 , though you can run
5563 It describes how to add a local
5567 directory; follow the instructions.
5568 You need to insert the name of your local
5581 is a logical place to install software that did not come with your distribution
5587 Usually, you will have to modify only two things:
5591 \begin_layout Enumerate
5596 to the directory you chose; e.g.
5601 TEXMFLOCAL = /usr/local/texmf
5604 \begin_layout Enumerate
5618 TEXMF = {$HOMETEXMF,!!$TEXMFLOCAL,!!$TEXMFMAIN}
5622 \begin_layout Enumerate
5633 You must follow the directory structure of your existing
5637 directory (for example, latex packages should go under
5639 /usr/local/texmf/tex/latex/
5644 \begin_layout Enumerate
5645 Install the package.
5646 For example, you would unpack the FoilTeX tarball and create
5648 /usr/local/texmf/tex/latex/foiltex
5655 directory contains various files.
5658 \begin_layout Enumerate
5666 /usr/local/texmf/ls-R
5671 \begin_layout Enumerate
5672 From within LyX, do:
5677 ools\SpecialChar \menuseparator
5688 \begin_layout Standard
5689 Now you should see your new package---for example
5698 ayout\SpecialChar \menuseparator
5713 Note that there are simpler ways of installing packages: you can add a
5714 link to the new package directory in the system LaTeX directory (
5718 , don't forget to then run
5722 ), or sometimes simply set the
5726 environment variable to include the new package.
5727 However, the formal procedure described in
5731 is guaranteed to work, so you should follow it unless circumstances absolutely
5732 prevent it: such as, when you don't have superuser access.
5735 \begin_layout Section
5736 \begin_inset CommandInset label
5745 \begin_layout Standard
5746 This section describes how to write and install your own LyX layout files
5747 (also known as text classes) and walks through the
5751 text class format as an example.
5756 files describe what paragraph styles are available for a given document
5757 class and how LyX should display them.
5758 We try to provide a thorough description of the process here; however,
5759 there are so many different types of documents supported by LaTeX classes
5760 that we can't hope to cover every different possibility or problem you
5762 (The LyX users' list is frequented by people with lots of experience with
5763 layout design who are willing to share what they've learned.)
5766 \begin_layout Standard
5767 As you prepare to write a new layout, it is extremely helpful to look at
5768 the example layouts distributed with LyX.
5769 If you use a nice LaTeX document class that might be of interest for others,
5770 too, and have a nice corresponding LyX layout, feel free to contribute
5771 the stuff to us, so we may put it into the distribution.
5772 There is also a section on the LyX wiki for this kind of material.
5775 \begin_layout Standard
5776 All the tags described in this chapter are case-insensitive; this means
5789 are really the same command.
5790 The possible values are printed in brackets after the feature's name.
5791 The default value if a feature isn't specified inside a text class-description
5799 If the argument has a datatype like
5800 \begin_inset Quotes eld
5804 \begin_inset Quotes erd
5808 \begin_inset Quotes eld
5812 \begin_inset Quotes erd
5815 , the default is shown like this:
5825 \begin_layout Subsection
5829 \begin_layout Standard
5830 Similar to layout files, and new with LyX 1.6, are layout
5835 Modules are to LaTeX packages much as layouts are to LaTeX classes, and
5836 some modules---such as the URL module---provide support for just such a
5838 In a sense, layout modules are similar to included files---files like stdsectio
5839 ns.inc---in that modules are not specific to a given document layout but
5840 may be used with many different layouts.
5841 The difference is that using a layout module does not require editing the
5843 Rather, modules are selected in the
5848 ocument\SpecialChar \menuseparator
5858 \begin_layout Standard
5859 Building modules is the easiest way to get started with layout editing,
5860 since it can be as simple as adding a single new paragraph or flex inset.
5861 But modules may, in principle, contain anything a layout file can contain.
5864 \begin_layout Standard
5865 A module must begin with a line like the following:
5868 \begin_layout LyX-Code
5871 DeclareLyXModule[url.sty]{Adds a character style for the
5876 \begin_layout Standard
5877 The argument in square brackets is optional: It declares any LaTeX packages
5878 on which the module depends.
5879 The two mandatory arguments, in curly brackets, are a short description
5880 of the module and the name of the module, as they should appear in
5882 Document\SpecialChar \menuseparator
5889 \begin_layout Standard
5890 After creating a new module, you will need to reconfigure and then restart
5891 LyX for it to appear in the menu.
5892 However, changes you make to the module will be seen immediately, if you
5895 Document\SpecialChar \menuseparator
5898 , make some change (or even just highlight something), and then hit
5899 \begin_inset Quotes eld
5903 \begin_inset Quotes erd
5907 It is strongly recommended that you save your work before doing so.
5908 It is, in fact, strongly recommended that you not attempt to create or
5909 edit modules while simultaneously working on documents.
5910 Though of course the developers strive to keep LyX stable in such situations,
5911 syntax errors and the like in your module file could cause strange behavior.
5914 \begin_layout Subsection
5915 Supporting new document classes
5918 \begin_layout Standard
5919 There are two situations you are likely to encounter when wanting to support
5920 a new LaTeX document class, involving LaTeX2e class (
5929 Supporting a style file is usually fairly easy.
5930 Supporting a new document class is a bit harder.
5933 \begin_layout Subsection
5941 \begin_layout Standard
5942 If your new document class is provided as a style file that is used in conjuncti
5943 on with an existing, supported document class---for the sake of the example,
5944 we'll assume that the style file is called
5948 and it is meant to be used with
5952 , which is a standard class---start by copying the existing class's layout
5953 file into your local directory:
5956 \begin_layout LyX-Code
5957 cp report.layout ~/.lyx/layouts/myclass.layout
5960 \begin_layout Standard
5965 and change the line:
5968 \begin_layout LyX-Code
5971 DeclareLaTeXClass{report}
5974 \begin_layout Standard
5978 \begin_layout LyX-Code
5981 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
5984 \begin_layout Standard
5988 \begin_layout LyX-Code
5998 \begin_layout Standard
5999 near the top of the file.
6002 \begin_layout Standard
6003 Start LyX and select
6008 ools\SpecialChar \menuseparator
6016 Then restart LyX and try creating a new document.
6021 " as a document class option in the
6026 ocument\SpecialChar \menuseparator
6034 It is likely that some of the sectioning commands and such in your new
6035 class will work differently from how they worked in the base class---
6039 in this example---so you can fiddle around with the settings for the different
6040 sections if you wish.
6041 See below for more discussion on this.
6044 \begin_layout Subsection
6052 \begin_layout Standard
6053 There are two possibilities here.
6054 One is that the class file is itself based upon an existing document class.
6055 For example, many thesis classes are based upon
6060 To see whether yours is, look for a line like
6063 \begin_layout LyX-Code
6069 \begin_layout Standard
6071 If so, then you may proceed largely as in the previous section, though
6072 the DeclareLaTeXClass line will be different.
6073 If your new class is thesis, and it is based upon book, then the line should
6077 \begin_layout LyX-Code
6080 DeclareLaTeXClass[myclass, book]{thesis}
6083 \begin_layout Standard
6084 If, on the other hand, the new class is not based upon an existing class,
6085 you will probably have to
6086 \begin_inset Quotes eld
6090 \begin_inset Quotes erd
6094 We strongly suggest copying an existing layout file which uses a similar
6095 LaTeX class and then modifying it, if you can do so.
6096 At least use an existing file as a starting point so you can find out what
6097 items you need to worry about.
6098 Again, the specifics are covered below.
6101 \begin_layout Section
6102 Declaring a new text class
6105 \begin_layout Standard
6106 When it's finally time to get your hands dirty and create or edit your own
6107 layout file, the following sections describe what you're up against.
6108 Our advice is to go slowly, save and test often, listen to soothing music,
6109 and enjoy one or two of your favorite adult beverages; more if you are
6110 getting particularly stuck.
6111 It's really not that hard, except that the multitude of options can become
6112 overwhelming if you try to do to much in one sitting.
6113 Go have another adult beverage, just for good measure.
6116 \begin_layout Standard
6120 \begin_layout Standard
6121 Lines in a layout file which begin with a
6126 There is one exception to this rule: all layouts should begin with lines
6130 \begin_layout LyX-Code
6133 #% Do not delete the line below; configure depends on this
6136 \begin_layout LyX-Code
6141 DeclareLaTeXClass{article}
6144 \begin_layout Standard
6145 The second line is used when you configure LyX.
6146 The layout file is read by the LaTeX script
6150 , in a special mode where
6155 The first line is just a LaTeX comment, and the second one contains the
6156 declaration of the text class.
6157 If these lines appear in a file named
6161 , then they define a text class of name
6165 (the name of the layout file) which uses the LaTeX document class
6169 (the default is to use the same name as the layout).
6171 \begin_inset Quotes eld
6175 \begin_inset Quotes erd
6178 that appears above is used as a description of the text class in the
6183 ocument\SpecialChar \menuseparator
6193 \begin_layout Standard
6194 Let's assume that you wrote your own text class that uses the
6198 documentclass, but where you changed the appearance of the section headings.
6199 If you put it in a file
6203 , the header of this file should be:
6206 \begin_layout LyX-Code
6209 #% Do not delete the line below; configure depends on this
6212 \begin_layout LyX-Code
6217 DeclareLaTeXClass[article]{article (with my own headings)}
6220 \begin_layout Standard
6221 This declares a text class
6225 , associated with the LaTeX document class
6230 \begin_inset Quotes eld
6233 article (with my own headings)
6234 \begin_inset Quotes erd
6238 If your text class depends on several packages, you can declare it as:
6241 \begin_layout LyX-Code
6244 #% Do not delete the line below; configure depends on this
6247 \begin_layout LyX-Code
6252 DeclareLaTeXClass[article,foo.sty]{article (with my own headings)}
6255 \begin_layout Standard
6256 This indicates that your text class uses the foo.sty package.
6257 Finally, it is also possible to declare classes for DocBook code.
6258 Typical declarations will look like
6261 \begin_layout LyX-Code
6264 #% Do not delete the line below; configure depends on this
6267 \begin_layout LyX-Code
6272 DeclareDocBookClass[article]{SGML (DocBook article)}
6275 \begin_layout Standard
6276 Note that these declarations can also be given an optional parameter declaring
6277 the name of the document class (but not a list).
6280 \begin_layout Standard
6281 When the text class has been modified to your taste, all you have to do
6282 is to copy it either in
6295 ools\SpecialChar \menuseparator
6303 Exit LyX and restart it; then your new text class should be available along
6307 \begin_layout Standard
6308 In versions of LyX prior to 1.6, you had to restart LyX to see any changes
6309 you made to your layout files.
6310 As a result, editing layout files could be very time consuming.
6311 Beginning with 1.6, however, you can force a reload of the layout currently
6312 in use by using the LyX function
6317 There is no default binding for this function---though, of course, you
6318 can bind it to a key yourself (see section
6319 \begin_inset CommandInset ref
6321 reference "sec:bindings"
6326 You should simply enter this command in the mini-buffer.
6331 : This is very much an `advanced feature'.
6336 recommended that you save your work before using this function.
6341 recommended that you not attempt to edit your layout while simultaneously
6342 working on a document that you care about.
6343 Use a test document.
6344 Syntax errors and the like in your layout file could cause peculiar behavior.
6345 In particular, such errors could cause LyX to regard the current layout
6346 as invalid and to attempt to switch to some other layout.
6347 The LyX team strives to keep LyX stable in such situations, but safe is
6351 \begin_layout Subsection
6355 \begin_layout Standard
6356 The first non-comment line must contain the file format number:
6359 \begin_layout Description
6370 ] This tag was introduced with LyX 1.4.0 (layout files of LyX 1.3.x and earlier
6371 don't have an explicit file format).
6372 The file format that is documented here is
6379 \begin_layout Subsection
6380 General text class parameters
6383 \begin_layout Standard
6384 These are the general parameters which describe the form of the entire document:
6387 \begin_layout Standard
6391 \begin_layout Standard
6403 \begin_layout Description
6417 ] Whether the class-default should have one or two columns.
6418 Can be changed in the
6423 ocument\SpecialChar \menuseparator
6431 This setting (same goes for
6435 , too) is important: if your text class has two columns by default but you
6436 forget to set it correctly, the
6444 be output when you select
6453 ocument\SpecialChar \menuseparator
6461 \begin_layout Description
6475 ] Whether the class-default should be printing on one or both sides of the
6477 Can be changed in the
6482 ocument\SpecialChar \menuseparator
6492 \begin_layout Description
6506 ] The class default pagestyle.
6507 Can be changed in the
6512 ocument\SpecialChar \menuseparator
6522 \begin_layout Description
6526 ClassOptions\SpecialChar \ldots{}
6530 This section describes various global options supported by the document
6532 See Section\InsetSpace ~
6534 \begin_inset CommandInset ref
6536 reference "sec:classoptions"
6543 \begin_layout Description
6561 ] Whether the class already provides the feature
6566 A feature is in general the name of a package (amsmath, makeidx, \SpecialChar \ldots{}
6568 macro (url, boldsymbol,\SpecialChar \ldots{}
6569 ); the complete list of supported features is unfortunat
6573 \begin_layout Description
6580 This is used to describe the default font of the document.
6581 See Section\InsetSpace ~
6583 \begin_inset CommandInset ref
6585 reference "sec:fonts"
6592 \begin_layout Description
6603 ] This is the style that will be assigned to new paragraphs, usually
6608 This will default to the first defined style if not given, but you are
6609 highly encouraged to use this directive.
6612 \begin_layout Description
6629 ] Indicates what kind of markup is used to define the title of a document.
6634 means that the macro with name
6638 will be inserted after the last layout which has
6639 \begin_inset Quotes eld
6647 \begin_inset Quotes erd
6655 corresponds to the case where the block of paragraphs which have
6656 \begin_inset Quotes eld
6664 \begin_inset Quotes erd
6667 should be enclosed into the
6676 \begin_layout Description
6687 ] The name of the command/environment mentionned above.
6690 \begin_layout Description
6694 Preamble\SpecialChar \ldots{}
6698 A set of macro definitions that will be output at the beginning of the
6700 Use this for global definitions.
6703 \begin_layout Description
6710 As its name implies, this command allows you to include another layout
6711 definition file within yours to avoid duplicating commands.
6712 Common examples are the standard layout files, for example,
6716 , which contains most of the basic layouts.
6719 \begin_layout Description
6723 Style\SpecialChar \ldots{}
6727 This sequence defines a new style.
6728 If the style already exists, it will redefine some of its parameters instead.
6729 See Section\InsetSpace ~
6731 \begin_inset CommandInset ref
6733 reference "sec:style"
6740 \begin_layout Description
6747 This command deletes an existing style.
6748 This is particularly useful when you want to suppress a style that has
6749 be defined in an input file.
6752 \begin_layout Description
6756 Float\SpecialChar \ldots{}
6760 This sequence defines a new float.
6761 See Section\InsetSpace ~
6763 \begin_inset CommandInset ref
6765 reference "sec:floats"
6772 \begin_layout Description
6779 This command deletes an existing float.
6780 This is particularly useful when you want to suppress a float that has
6781 be defined in an input file.
6784 \begin_layout Description
6788 InsetLayout\SpecialChar \ldots{}
6792 This section (re-)defines the layout of an inset.
6793 It can be applied to an existing inset of to a new, user-defined inset,
6794 e.g., a new character style.
6795 See Section\InsetSpace ~
6797 \begin_inset CommandInset ref
6799 reference "sec:charstyle"
6806 \begin_layout Description
6810 Counter\SpecialChar \ldots{}
6814 This sequence defines a new counter.
6815 See Section\InsetSpace ~
6817 \begin_inset CommandInset ref
6819 reference "sec:counter"
6826 \begin_layout Standard
6830 \begin_layout Standard
6842 \begin_layout Subsection
6850 \begin_layout Standard
6851 \begin_inset CommandInset label
6853 name "sec:classoptions"
6861 section can contain the following entries:
6864 \begin_layout Description
6875 ] The list of available font sizes for the document's main font, separated
6877 \begin_inset Quotes eld
6885 \begin_inset Quotes erd
6891 \begin_layout Description
6900 string="empty|plain|headings|fancy"
6902 ] The list of available page styles, separated by
6903 \begin_inset Quotes eld
6911 \begin_inset Quotes erd
6917 \begin_layout Description
6928 ] Some document class options, separated by a comma, that will be added
6929 to the optional part of the
6938 \begin_layout Subsection
6939 Specific Paragraph Layouts
6942 \begin_layout Standard
6943 \begin_inset CommandInset label
6949 A paragraph layout description looks like this
6953 \begin_layout Standard
6954 Note that this will either define a new layout or modify an existing one.
6962 \begin_layout LyX-Code
6969 \begin_layout LyX-Code
6973 \begin_layout LyX-Code
6977 \begin_layout Standard
6978 where the following commands are allowed:
6981 \begin_layout Standard
6985 \begin_layout Standard
6997 \begin_layout Description
7008 This is used to copy all the features of an existing layout into the current
7013 \begin_layout Description
7025 , Command, Environment, Item_Environment,
7031 ] How the layout should be translated into LaTeX.
7036 means nothing special.
7049 {\SpecialChar \ldots{}
7064 }\SpecialChar \ldots{}
7088 is generated for each paragraph of this environment.
7101 is passed as an argument to the environment.
7106 can be defined in the
7111 ayout\SpecialChar \menuseparator
7125 is perhaps a bit misleading, since these rules apply to SGML classes, too.
7126 Visit the SGML class files for specific examples.
7129 \begin_layout Description
7140 If 1, marks the layout as being part of a title block (see also the
7151 \begin_layout Description
7158 The name of the corresponding LaTeX stuff.
7159 Either the environment or command name.
7162 \begin_layout Description
7169 The optional parameter for the corresponding
7176 This parameter cannot be changed from within LyX.
7179 \begin_layout Description
7190 ] The number of optional arguments that can be used with this layout.
7191 This is useful for things like section headings, and only makes sense with
7195 \begin_layout Description
7207 , Manual, Dynamic, First_Dynamic, Right_Address_Box
7211 The kind of margin that the layout has on the left side.
7216 just means a fixed margin.
7221 means that the left margin depends on the string entered in the
7226 dit\SpecialChar \menuseparator
7231 aragraph\InsetSpace ~
7235 This is used to typeset nice lists without tabulators.
7240 means that the margin depends on the size of the label.
7241 This is used for automatic enumerated headlines.
7242 It is obvious that the headline
7243 \begin_inset Quotes eld
7246 5.4.3.2.1 Very long headline
7247 \begin_inset Quotes erd
7250 must have a wider left margin (as wide as
7251 \begin_inset Quotes eld
7255 \begin_inset Quotes erd
7258 plus the space) than
7259 \begin_inset Quotes eld
7262 3.2 Very long headline
7263 \begin_inset Quotes erd
7266 , even if other word processors are not able to do this.
7271 is similar, but only the very first row of the paragraph is dynamic, while
7272 the others are static; this is used, for example, for descriptions.
7277 means the margin is chosen in a way that the longest row of this paragraph
7278 fits to the right margin.
7279 This is used to typeset an address on the right edge of the page.
7282 \begin_layout Description
7299 ] Whether the following Paragraph is allowed to indent its very first row.
7304 means that it is not allowed to do so,
7308 means it could do so if it wants to.
7311 \begin_layout Description
7322 ] The indent of the very first line of a paragraph.
7323 The argument is passed as a string.
7328 means that the paragraph is indented with the width of
7337 You can get a negative width by prefixing the string with
7342 This way was chosen so that the look is the same with each used screen
7348 will be fixed for a certain layout.
7349 The exception is Standard layout, since the indentation of a Standard layout
7350 paragraph can be prohibited with
7355 Also, Standard layout paragraphs inside environments use the
7359 of the environment, not their native one.
7360 For example, Standard paragraphs inside an enumeration are not indented.
7363 \begin_layout Description
7374 ] LyX allows to choose either
7375 \begin_inset Quotes eld
7379 \begin_inset Quotes erd
7383 \begin_inset Quotes eld
7387 \begin_inset Quotes erd
7390 to typeset a document.
7392 \begin_inset Quotes eld
7396 \begin_inset Quotes erd
7399 is chosen, this value is completely ignored.
7401 \begin_inset Quotes eld
7405 \begin_inset Quotes erd
7408 is chosen, the parindent of a LaTeXtype
7409 \begin_inset Quotes eld
7413 \begin_inset Quotes erd
7416 layout is ignored and all paragraphs are additionally separated by this
7418 The vertical space is calculated with
7420 value*DefaultHeight()
7426 is the height of a row with the normal font.
7427 This way, the look stays the same with different screen fonts.
7430 \begin_layout Description
7441 ] The vertical space with which the very first of a chain of paragraphs
7442 with this layout is separated from the previous paragraph.
7443 If the previous paragraph has another layout, the separations are not simply
7444 added, but the maximum is taken.
7447 \begin_layout Description
7462 for the very last paragraph.
7465 \begin_layout Description
7476 ] The vertical space between two paragraphs of this layout.
7479 \begin_layout Description
7490 ] This is an extra space between the paragraphs of an environment layout.
7491 If you put other layouts into an environment, each is separated with the
7497 But the whole items of the environment are additionally separated with
7506 \begin_layout Description
7517 ] If you put layouts into environments, the leftmargins are not simply added,
7518 but added with a factor
7519 \begin_inset Formula $\frac{4}{depth+4}$
7523 Note that this parameter is also used when the border is defined as
7532 Then it is added to the manual or dynamic border.
7533 This string has the same meaning as for
7540 \begin_layout Description
7558 \begin_layout Description
7570 , Manual, Static, Top_Environment,
7572 Centered_Top_Environment, Sensitive,
7581 means the label is the very first word (up to the first real blank).
7586 means it is defined in the layout (see
7597 Centered_Top_Environment
7599 are special cases of
7604 The label will be printed above the paragraph, but only at the top of an
7605 environment or the top of a chain of paragraphs with this layout.
7606 Usage is for example the
7615 This is also the case for
7619 labels with latex type
7623 , in order to make layouts for theorems work correctly.
7628 is a special case for the caption-labels
7629 \begin_inset Quotes eld
7633 \begin_inset Quotes erd
7637 \begin_inset Quotes eld
7641 \begin_inset Quotes erd
7649 means the (hardcoded) label string depends on the kind of float.
7654 label type defines automatically numbered labels.
7657 \begin_layout Description
7670 The name of the counter for automatic numbering (see Section\InsetSpace ~
7672 \begin_inset CommandInset ref
7674 reference "sec:counter"
7679 This must be given if
7692 \begin_layout Description
7703 ] The horizontal space between the label and the text body.
7704 Only used for labels that are not above the text body.
7707 \begin_layout Description
7714 [float=0] The vertical space between the label and the text body.
7715 Only used for labels that are above the text body (
7721 Centered_Top_Environment
7726 \begin_layout Description
7737 ] The string used for a label with a
7746 this string is also used as a suggestion for the
7750 that can be set in the
7755 dit\SpecialChar \menuseparator
7760 aragraph\InsetSpace ~
7770 is set, this string can be contain the special formatting commands described
7771 in Section\InsetSpace ~
7773 \begin_inset CommandInset ref
7775 reference "sec:counter"
7780 For the sake of backwards compatibility, the string
7788 will be replaced by the expanded
7799 This feature is now obsolete and should be replaced by the mechanisms of
7800 Section\InsetSpace ~
7802 \begin_inset CommandInset ref
7804 reference "sec:counter"
7811 \begin_layout Description
7822 ] This is used inside the appendix instead of
7843 \begin_layout Description
7850 The level of the style in the table of contents.
7851 This is used for automatic numbering of section headings.
7854 \begin_layout Description
7866 , Box, Filled_Box, Static
7868 ] The type of label that stands at the end of the paragraph (or sequence
7891 \begin_inset Quotes eld
7895 \begin_inset Quotes erd
7907 ) is a white (resp.\InsetSpace ~
7908 black) square suitable for end of proof markers,
7912 is an explicit text string.
7915 \begin_layout Description
7926 ] The string used for a label with a
7938 \begin_layout Description
7950 , left, right, center
7952 ] Paragraph alignment.
7955 \begin_layout Description
7967 , left, right, center
7974 Some LaTeX styles prohibit certain alignments, since those wouldn't make
7976 For example a right-aligned or centered enumeration isn't possible.
7979 \begin_layout Description
7993 ] With this parameter the
7998 \begin_inset Quotes eld
8001 Vertical space above
8002 \begin_inset Quotes erd
8010 dit\SpecialChar \menuseparator
8015 aragraph\InsetSpace ~
8018 dialog can be set when initializing a paragraph with this layout
8022 \begin_layout Standard
8025 Note from Jean-Marc:
8027 I'm not sure that this setting has much use, and it should probably be
8028 removed in later versions.
8037 \begin_layout Description
8058 \begin_layout Description
8072 ] Whether fragile commands in this layout should be
8081 \begin_layout Description
8098 ] Whether newlines are translated into LaTeX newlines (
8107 The translation can be switched off to allow more comfortable LaTeX editing
8111 \begin_layout Description
8125 ] Whether the contents of this paragraph should be output in raw form, meaning
8126 without special translations that LaTeX would require.
8127 This somehow replaces the older
8134 \begin_layout Description
8148 ] Usually LyX doesn't allow you to insert more than one space between words,
8149 since a space is considered as the separation between two words, not a
8150 character or symbol of its own.
8151 This is a very fine thing but sometimes annoying, for example when typing
8152 program code or plain LaTeX code.
8158 Note that LyX will create protected blanks for the additional blanks when
8159 in another mode than LaTeX-mode.
8162 \begin_layout Description
8176 ] Usually LyX does not allow you to leave a paragraph empty, since it would
8177 lead to empty LaTeX output.
8178 There are some cases where this could be desirable however: in a letter
8179 template, the required fields can be provided as empty fields, so that
8180 people do not forget them; in some special classes, a layout can be used
8181 as some kind of break, which does not contain actual text.
8184 \begin_layout Description
8196 , onehalf, double, other
8202 ] This defines what the default spacing should be in the layout.
8215 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
8216 If you specify the argument
8220 , then you should also provide a numerical argument which will be the actual
8222 Note that, contrary to other parameters,
8226 implies the generation of specific LaTeX code, using the package
8233 \begin_layout Description
8240 The font used for both the text body
8245 See section\InsetSpace ~
8247 \begin_inset CommandInset ref
8249 reference "sec:fonts"
8254 Note that defining this font automatically defines the
8261 \begin_layout Description
8268 The font used for the text body .
8269 See section\InsetSpace ~
8271 \begin_inset CommandInset ref
8273 reference "sec:fonts"
8280 \begin_layout Description
8287 The font used for the label.
8288 See section\InsetSpace ~
8290 \begin_inset CommandInset ref
8292 reference "sec:fonts"
8299 \begin_layout Description
8303 Preamble\SpecialChar \ldots{}
8307 A set of macro definitions that will be output at the beginning of the
8308 LaTeX files when the layout is used.
8309 Use this to define the macros needed by this particular layout.
8312 \begin_layout Description
8319 the name of a style which preamble should be output
8323 the one mentionned above.
8324 This allows to ensure some ordering of the preamble snippets when macros
8325 definitions depend on one another
8329 \begin_layout Standard
8330 Note that, besides that functionality, there is no way to ensure any ordering
8332 The ordering that you see in a given version of LyX may change without
8333 warning in later versions.
8341 \begin_layout Standard
8345 \begin_layout Standard
8357 \begin_layout Subsection
8361 \begin_layout Standard
8362 \begin_inset CommandInset label
8368 Since version 1.3.0 of LyX, it is necessary to define the floats (
8376 , \SpecialChar \ldots{}
8377 ) in the text class itself.
8378 If you are looking here to learn how to upgrade an existing text class,
8379 it will probably turn out that all you have to do is to add
8382 \begin_layout LyX-Code
8386 \begin_layout Standard
8387 at a reasonable location of the text class.
8391 \begin_layout Standard
8392 Don't forget to also have a look at counters in next section.
8397 If you want to implement a text class that proposes some other float types
8398 (like the AGU class bundled with LyX), the information below will hopefully
8402 \begin_layout Description
8414 \begin_inset Quotes erd
8418 \begin_inset Quotes erd
8422 \begin_inset Quotes eld
8426 \begin_inset Quotes erd
8429 of the new class of floats, like program or algorithm.
8430 After the appropriate
8451 \begin_layout Description
8463 \begin_inset Quotes erd
8467 \begin_inset Quotes erd
8470 ] The string that will be used in the menus and also for the caption.
8473 \begin_layout Description
8494 if the float is already defined by the documentclass.
8499 , the float will be defined using the LaTeX package
8506 \begin_layout Description
8518 \begin_inset Quotes erd
8522 \begin_inset Quotes erd
8525 ] This (optional) argument determines whether floats of this class will
8526 be numbered within some sectional unit of the document.
8527 For example, if within is equal to
8531 , the floats will be numbered within chapters.
8535 \begin_layout Description
8547 \begin_inset Quotes erd
8551 \begin_inset Quotes erd
8554 ] The style used when defining the float using
8563 \begin_layout Description
8575 \begin_inset Quotes erd
8579 \begin_inset Quotes erd
8582 ] The default placement for the given class of floats.
8583 They are like in standard LaTeX:
8599 for top, bottom, page, and here, respectively.
8603 \begin_layout Standard
8604 Note that the order of these letters in the string is irrelevant, like in
8610 On top of that there is a new type,
8614 , which does not really correspond to a float, since it means: put it
8615 \begin_inset Quotes eld
8619 \begin_inset Quotes erd
8623 Note, however that the
8627 specifier is special and, because of implementation details cannot be used
8628 in non-builtin float types.
8629 If you do not understand what this means, just use
8636 \begin_layout Description
8648 \begin_inset Quotes erd
8652 \begin_inset Quotes erd
8655 ] The file name extension of an auxiliary file for the list of figures (or
8657 LaTeX writes the captions to this file.
8660 \begin_layout Description
8672 \begin_inset Quotes erd
8676 \begin_inset Quotes erd
8679 ] The heading used for the list of floats.
8682 \begin_layout Standard
8683 Note that defining a float with type
8689 automatically defines the corresponding counter with name
8698 \begin_layout Subsection
8699 Inset layouts and Flex insets
8702 \begin_layout Standard
8703 \begin_inset CommandInset label
8705 name "sec:charstyle"
8709 You can define character styles since version 1.4.0 of LyX; since version
8710 1.6.0 these are called Flex insets.
8714 \begin_layout Standard
8715 Furthermore it is possible to define the general layout of many different
8717 Currently layout parameters can be defined for footnotes, marginal notes,
8718 note insets, ERT insets, branch insets, and Flex insets.
8719 The latter are definable from the user GUI and come in three different
8720 kinds: character style (
8728 ), and XML element (
8736 \begin_layout Standard
8741 definition starting line is of the form
8744 \begin_layout LyX-Code
8745 InsetLayout <Type> <Name>
8748 \begin_layout Standard
8752 \begin_layout Standard
8759 Foot, Margin, Note, Flex
8764 \begin_layout Standard
8769 can be empty (for foot- and marginal notes, branches and ERT) or one of
8787 Here, the second part of the name can be chosen freely (for CharStyle,
8788 Custom and Element), or from a predefined list (for Note).
8791 \begin_layout Standard
8796 section can contain the following entries:
8799 \begin_layout Description
8822 (indicating a dummy definition ending definitions of charstyles etc.).
8823 This entry is only meaningful for Flex (user definable) insets, the three
8824 types of which are CharStyle, Custom and Element.
8827 \begin_layout Description
8843 Minimalistic or Conglomerate
8846 , describing the rendering style used for the inset's frame and buttons.
8849 \begin_layout Description
8856 defines what will be displayed on the button or elsewhere as the inset
8858 Some inset types (ERT and Branch) modify this label on the fly.
8861 \begin_layout Description
8868 The font used for both the text body
8873 See section\InsetSpace ~
8875 \begin_inset CommandInset ref
8877 reference "sec:fonts"
8882 Note that defining this font automatically defines the
8889 \begin_layout Description
8896 The font used for the label.
8897 See section\InsetSpace ~
8899 \begin_inset CommandInset ref
8901 reference "sec:fonts"
8906 Note that this definition can never appear before
8910 , lest it be ineffective (see above)
8913 \begin_layout Description
8920 The name of the corresponding LaTeX stuff.
8921 Either the environment or command name.
8924 \begin_layout Description
8931 The optional parameter for the corresponding
8937 stuff, including possible bracket pairs like
8942 This parameter cannot be changed from within LyX.
8945 \begin_layout Description
8952 See section\InsetSpace ~
8954 \begin_inset CommandInset ref
8956 reference "sec:style"
8963 \begin_layout Description
8967 Preamble\SpecialChar \ldots{}
8971 See section\InsetSpace ~
8973 \begin_inset CommandInset ref
8975 reference "sec:style"
8982 \begin_layout Subsection
8986 \begin_layout Standard
8987 \begin_inset CommandInset label
8993 Since version 1.3.0 of LyX, it is necessary to define the counters (
9001 , \SpecialChar \ldots{}
9002 ) in the text class itself.
9003 If you are looking here to learn how to upgrade an existing text class,
9004 it will probably turn out that all you have to do is to add
9007 \begin_layout LyX-Code
9008 Input stdcounters.inc
9011 \begin_layout Standard
9012 The following parameters can be used:
9015 \begin_layout Description
9027 \begin_inset Quotes erd
9031 \begin_inset Quotes erd
9034 ] The name of the counter.
9037 \begin_layout Description
9049 \begin_inset Quotes erd
9053 \begin_inset Quotes erd
9056 ] If this is set to the name of another counter, the present counter will
9057 be reset everytime the other one is increased.
9069 \begin_layout Description
9073 LabelString [string=""]
9076 when this is defined, this string defines how the counter is displayed.
9077 Setting this value resets
9082 The following special constructs can be used in the string:
9086 \begin_layout Itemize
9093 will be replaced by the expansion of the
9106 If these are empty, a default value is constructed as follows: if the counter
9107 has a master counter
9119 is used; otherwise the string
9128 \begin_layout Itemize
9129 counter values can be expressed using LaTeX-like macros
9153 \begin_layout Description
9164 to arabic numerals, like 1, 2, 3\SpecialChar \ldots{}
9169 \begin_layout Standard
9179 Actually, the situation is a bit more complicated than that: any
9198 other than those descibed below will produce arabic numerals.
9199 It would not be surprising to see this change in the future.
9207 \begin_layout Description
9214 for lower-case letters: a, b, c, \SpecialChar \ldots{}
9218 \begin_layout Description
9225 for upper-case letters: A, B, C, \SpecialChar \ldots{}
9229 \begin_layout Description
9236 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
9240 \begin_layout Description
9247 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
9251 \begin_layout Description
9258 for hebrew numerals.
9263 \begin_layout Description
9267 LabelStringAppendix [string=""]
9274 , for use in appendix.
9277 \begin_layout Subsection
9281 \begin_layout Standard
9282 \begin_inset CommandInset label
9288 A font description looks like that:
9291 \begin_layout LyX-Code
9301 \begin_layout LyX-Code
9305 \begin_layout LyX-Code
9309 \begin_layout Standard
9310 and the following commands are available:
9313 \begin_layout Description
9330 \begin_layout Description
9347 \begin_layout Description
9359 , Italic, SmallCaps, Slanted
9364 \begin_layout Description
9380 , large, larger, largest, huge, giant
9385 \begin_layout Description
9397 , black, white, red, green, blue, cyan, magenta, yellow
9402 \begin_layout Subsection
9403 Upgrading old layout files
9406 \begin_layout Standard
9407 The file format of layout files changes from time to time, so old layout
9408 files need to be converted.
9409 This process has been automated in LyX 1.4.0: If LyX reads an old format
9410 layout file it will call the conversion tool
9412 $LyXDir/scripts/layout2layout.py
9414 and convert it to a temporary file in current format.
9415 The original file is left untouched, so that you can still use it with
9417 If you want to convert the layout file permanently, just call the converter
9421 \begin_layout LyX-Code
9422 python $LyXDir/scripts/layout2layout.py myclass.layout myclassnew.layout
9425 \begin_layout Standard
9437 \begin_layout Standard
9438 The automatic conversion does only handle syntax changes.
9439 It cannot handle the case where the contents of included files was changed.
9440 For example, layout files based on
9453 If you get error messages about undefined counters, try to convert your
9473 \begin_layout Section
9475 \begin_inset CommandInset label
9477 name "sec:templates"
9484 \begin_layout Standard
9485 Templates are created just like usual documents.
9486 The only difference is that usual documents contain all possible settings,
9487 including the fontscheme and the papersize.
9488 Usually a user doesn't want a template to overwrite his defaults in these
9490 For that reason, the designer of a template should remove the corresponding
9503 from the template LyX file.
9504 This can be done with any simple text-editor, for example
9516 \begin_layout Standard
9517 Put the edited template files you create in
9521 , copy the ones you use from the global template directory in
9525 to the same place, and redefine the template path in the
9530 dit\SpecialChar \menuseparator
9549 \begin_layout Standard
9550 Note that there is a template which has a particular meaning:
9555 This template is loaded everytime you create a new document with
9562 \SpecialChar \menuseparator
9570 in order to provide useful defaults.
9571 To create this template from inside LyX, all you have to do is to open
9572 a document with the correct settings, and use the
9578 e as Document Defaults
9583 \begin_layout Chapter
9584 Including External Material
9587 \begin_layout Section
9591 \begin_layout Standard
9592 \begin_inset Note Note
9595 \begin_layout Standard
9596 This section is completely outdated.
9601 One often requested feature from LyX users is to be able to interface LyX
9602 with Xfig, Dia, or other similar applications that specialize in producing
9603 a certain kind of diagram, figure, schematic or whatever material might
9604 be relevant to include in your document.
9605 Previously, it was only possible to include boring, static, fixed images
9606 in LyX documents with the graphics feature, but there are several limitations
9607 attached to this approach:
9610 \begin_layout Itemize
9611 If you want to change the figure, you have to invoke an external program
9615 \begin_layout Itemize
9616 LyX does not notice that the referenced files change, so the on-screen display
9617 can fast become obsolete, and this is aggravated by the lack of a means
9618 of updating the display
9621 \begin_layout Itemize
9622 The graphics stuff does not provide any mechanisms for coping with different
9623 exported formats such as DocBook, HTML or plain text
9626 \begin_layout Standard
9627 The external material facility attempts to solve all of these problems
9631 \begin_layout Standard
9632 Even if the graphics facility can't solve all problems, it is still valuable
9633 because it does provide in-line preview of the graphics, and supports advanced
9634 geometric transformations with a comfortable user interface.
9640 It does this by offering a general method to interface LyX to external
9642 Instead of introducing a long list of different constructs tailored for
9643 each specific application, we chose to sacrifice the in-line displaying
9644 of the included material in order to provide a general construct to cover
9645 a wide range of applications.
9646 The result is the external material construct.
9647 External material presents itself in the document simply as a button, but
9648 don't let this fool you.
9649 When you click on it, a dialog will appear that allows you to chose exactly
9650 what material to include, and in the following sections you will learn
9651 that this is indeed a powerful mechanism that can solve all of the above
9655 \begin_layout Section
9659 \begin_layout Standard
9660 The external material feature is based on the concept of a
9665 A template is a specification of how LyX should interface with a certain
9667 As bundled, LyX comes with predefined templates for Xfig figures, Dia diagrams,
9668 various raster format images, gnuplot, and more.
9669 You can check the actual list by using the menu
9671 Insert\SpecialChar \menuseparator
9672 File\SpecialChar \menuseparator
9681 Furthermore, it is possible to roll your own template to support a specific
9683 Later we'll describe in more detail what is involved, and hopefully you
9684 will submit all the templates you create so we can include them in a later
9688 \begin_layout Standard
9689 Another basic idea of the external material feature is to distinguish between
9690 the original file that serves as a base for final material and the produced
9691 file that is included in your exported or printed document.
9692 For example, consider the case of a figure produced with
9697 The Xfig application itself works on an original file with the
9702 Within XFig, you create and change your figure, and when you are done,
9708 When you want to include the figure in your document, you invoke
9712 in order to create a PostScript file that can readily be included in your
9718 file is the original file, and the PostScript file is the produced file.
9721 \begin_layout Standard
9722 This distinction is important in order to allow updating of the material
9723 while you are in the process of writing the document.
9724 Furthermore, it provides us with the flexibility that is needed to support
9725 multiple export formats.
9726 For instance, in the case of a plain text file, it is not exactly an award-winn
9727 ing idea to include the figure as raw PostScript.
9728 Instead, you'd either prefer to just include a reference to the figure,
9729 or try to invoke some graphics to Ascii converter to make the final result
9730 look similar to the real graphics.
9731 The external material management allows you to do this, because it is parameter
9732 ized on the different export formats that LyX supports.
9735 \begin_layout Standard
9736 Besides supporting the production of different products according to the
9737 exported format, it supports tight integration with editing and viewing
9739 In the case of an XFig figure, you are able to invoke
9743 on the original file with a single click from within the external material
9744 dialog in LyX, and also preview the produced PostScript file with
9749 No more fiddling around with the command line and/or file browsers to locate
9750 and manipulate the original or produced files.
9751 In this way, you are finally able to take full advantage of the many different
9752 applications that are relevant to use when you write your documents, and
9753 ultimately be more productive.
9756 \begin_layout Section
9757 External material dialog
9760 \begin_layout Standard
9765 dialog is described in the
9774 \begin_layout Section
9778 \begin_layout Standard
9779 In this section, we should include some examples of use of the external
9781 Those examples could include:
9784 \begin_layout Itemize
9785 External raster images
9788 \begin_layout Itemize
9789 External XFig figures
9792 \begin_layout Itemize
9796 \begin_layout Itemize
9800 \begin_layout Itemize
9801 The use of makefiles
9804 \begin_layout Itemize
9805 Recursive external LyX templates
9808 \begin_layout Section
9809 The external template configuration file
9812 \begin_layout Standard
9813 It is relatively easy to add custom external template definitions to LyX.
9814 However, be aware this doing this in an careless manner most probably
9818 introduce an easily exploitable security hole.
9819 So before you do this, please read the discussion about security which
9823 \begin_layout Standard
9824 Having said that, we encourage you to submit any interesting templates that
9829 \begin_layout Standard
9830 The external templates are defined in the
9832 lib/external_templates
9835 You can place your own version in
9837 .lyx/external_templates
9842 \begin_layout Standard
9843 A typical template looks like this:
9846 \begin_layout LyX-Code
9850 \begin_layout LyX-Code
9851 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
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
9874 \begin_layout LyX-Code
9875 AutomaticProduction true
9878 \begin_layout LyX-Code
9882 \begin_layout LyX-Code
9886 \begin_layout LyX-Code
9890 \begin_layout LyX-Code
9891 TransformCommand Rotate RotationLatexCommand
9894 \begin_layout LyX-Code
9895 TransformCommand Resize ResizeLatexCommand
9898 \begin_layout LyX-Code
9899 Product "$$RotateFront$$ResizeFront
9902 \begin_layout LyX-Code
9907 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
9910 \begin_layout LyX-Code
9911 $$ResizeBack$$RotateBack"
9914 \begin_layout LyX-Code
9918 \begin_layout LyX-Code
9919 UpdateResult "$$AbsPath$$Basename.pstex_t"
9922 \begin_layout LyX-Code
9923 Requirement "graphicx"
9926 \begin_layout LyX-Code
9927 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
9930 \begin_layout LyX-Code
9931 ReferencedFile latex "$$AbsPath$$Basename.eps"
9934 \begin_layout LyX-Code
9935 ReferencedFile dvi "$$AbsPath$$Basename.eps"
9938 \begin_layout LyX-Code
9942 \begin_layout LyX-Code
9946 \begin_layout LyX-Code
9947 TransformCommand Rotate RotationLatexCommand
9950 \begin_layout LyX-Code
9951 TransformCommand Resize ResizeLatexCommand
9954 \begin_layout LyX-Code
9955 Product "$$RotateFront$$ResizeFront
9958 \begin_layout LyX-Code
9963 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
9966 \begin_layout LyX-Code
9967 $$ResizeBack$$RotateBack"
9970 \begin_layout LyX-Code
9974 \begin_layout LyX-Code
9975 UpdateResult "$$AbsPath$$Basename.pdftex_t"
9978 \begin_layout LyX-Code
9979 Requirement "graphicx"
9982 \begin_layout LyX-Code
9983 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
9986 \begin_layout LyX-Code
9987 ReferencedFile latex "$$AbsPath$$Basename.pdf"
9990 \begin_layout LyX-Code
9994 \begin_layout LyX-Code
9998 \begin_layout LyX-Code
9999 Product "$$Contents(
10001 "$$AbsPath$$Basename.asc
10006 \begin_layout LyX-Code
10007 UpdateFormat asciixfig
10010 \begin_layout LyX-Code
10011 UpdateResult "$$AbsPath$$Basename.asc"
10014 \begin_layout LyX-Code
10018 \begin_layout LyX-Code
10022 \begin_layout LyX-Code
10023 Product "<graphic fileref=
10025 "$$AbsOrRelPathMaster$$Basename.eps
10030 \begin_layout LyX-Code
10034 \begin_layout LyX-Code
10038 \begin_layout LyX-Code
10039 UpdateResult "$$AbsPath$$Basename.eps"
10042 \begin_layout LyX-Code
10043 ReferencedFile docbook "$$AbsPath$$Basename.eps"
10046 \begin_layout LyX-Code
10047 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
10050 \begin_layout LyX-Code
10054 \begin_layout LyX-Code
10055 Product "[XFig: $$FName]"
10058 \begin_layout LyX-Code
10062 \begin_layout LyX-Code
10066 \begin_layout Standard
10067 As you can see, the template is enclosed in
10071 \SpecialChar \ldots{}
10077 It contains a header specifying some general settings, and for each supported
10078 primary document file format a section
10082 \SpecialChar \ldots{}
10090 \begin_layout Subsection
10091 The template header
10094 \begin_layout Description
10098 Template\InsetSpace ~
10102 A unique name for the template.
10103 It must not contain substitution macros (see below).
10106 \begin_layout Description
10110 GuiName\InsetSpace ~
10114 The text that is displayed on the button.
10115 This command must occur exactly once.
10118 \begin_layout Description
10122 HelpText\InsetSpace ~
10123 <text>\InsetSpace ~
10127 The help text that is used in the External dialog.
10128 Provide enough information to explain to the user just what the template
10129 can provide him with.
10130 This command must occur exactly once.
10133 \begin_layout Description
10137 InputFormat\InsetSpace ~
10141 The file format of the original file.
10142 This must be the name of a format that is known to LyX (see the
10147 ools\SpecialChar \menuseparator
10152 references:Conversion
10159 if the template can handle original files of more than one format.
10160 LyX will attempt to interrogate the file itself in order to deduce its
10161 format in this case.
10162 This command must occur exactly once.
10165 \begin_layout Description
10169 FileFilter\InsetSpace ~
10173 A glob pattern that is used in the file dialog to filter out the desired
10175 If there is more than one possible file extension (e.g.\InsetSpace ~
10184 ), use something like
10189 This command must occur exactly once.
10192 \begin_layout Description
10196 AutomaticProduction\InsetSpace ~
10200 Wether the file represented by the template must be generated by LyX.
10201 This command must occur exactly once.
10204 \begin_layout Description
10208 Transform\InsetSpace ~
10209 Rotate|Resize|Clip|Extra
10212 This command specifies which transformations are supported by this template.
10213 It may occur zero or more times.
10214 This command enables the corresponding tabs in the external dialog.
10219 command must have either a corresponding
10232 Otherwise the transformation will not be supported by that format.
10235 \begin_layout Subsection
10239 \begin_layout Description
10243 Format\InsetSpace ~
10244 LaTeX|PDFLaTeX|PlainText|DocBook
10247 The primary document file format that this format definition is for.
10248 Not every template has a sensible representation in all document file formats.
10249 Please define nevertheless a
10253 section for all formats.
10254 Use a dummy text when no representation is available.
10255 Then you can at least see a reference to the external material in the exported
10259 \begin_layout Description
10263 TransformCommand\InsetSpace ~
10264 Rotate\InsetSpace ~
10265 RotationLatexCommand
10268 This command specifies that the built in LaTeX command should be used for
10270 This command may occur once or not at all.
10273 \begin_layout Description
10277 TransformCommand\InsetSpace ~
10278 Resize\InsetSpace ~
10282 This command specifies that the built in LaTeX command should be used for
10284 This command may occur once or not at all.
10287 \begin_layout Description
10291 TransformOption\InsetSpace ~
10292 Rotate\InsetSpace ~
10293 RotationLatexOption
10296 This command specifies that rotation is done via an optional argument.
10297 This command may occur once or not at all.
10300 \begin_layout Description
10304 TransformOption\InsetSpace ~
10305 Resize\InsetSpace ~
10309 This command specifies that resizing is done via an optional argument.
10310 This command may occur once or not at all.
10313 \begin_layout Description
10317 TransformOption\InsetSpace ~
10322 This command specifies that clipping is done via an optional argument.
10323 This command may occur once or not at all.
10326 \begin_layout Description
10330 TransformOption\InsetSpace ~
10335 This command specifies that an extra optional argument is used.
10336 This command may occur once or not at all.
10339 \begin_layout Description
10343 Product\InsetSpace ~
10347 The text that is inserted in the exported document.
10348 This is actually the most important command and can be quite complex.
10349 This command must occur exactly once.
10352 \begin_layout Description
10356 UpdateFormat\InsetSpace ~
10360 The file format of the converted file.
10361 This must be the name of a format that is known to LyX (see the
10366 ools\SpecialChar \menuseparator
10371 references:Conversion
10374 This command must occur exactly once.
10377 \begin_layout Description
10381 UpdateResult\InsetSpace ~
10385 The file name of the converted file.
10386 The file name must be absolute.
10387 This command must occur exactly once.
10390 \begin_layout Description
10394 ReferencedFile\InsetSpace ~
10395 <format>\InsetSpace ~
10399 This command denotes files that are created by the conversion process and
10400 are needed for a particular export format.
10401 If the filename is relative, it is interpreted relative to the master document.
10402 This command may be given zero or more times.
10405 \begin_layout Description
10409 Requirement\InsetSpace ~
10413 The name of a required LaTeX package.
10414 The package is included via
10420 in the LaTeX preamble.
10421 This command may occur zero or more times.
10424 \begin_layout Description
10428 Preamble\InsetSpace ~
10432 This command specifies a preamble snippet that will be included in the
10434 It has to be defined using
10438 \SpecialChar \ldots{}
10444 This command may occur zero or more times.
10447 \begin_layout Description
10451 Option\InsetSpace ~
10452 <name>\InsetSpace ~
10456 This command defines an additional macro
10460 for substitution in
10469 itself may contain substitution macros.
10470 The advantage over using
10478 is that the substituted value of
10482 is sanitized so that it is a valid optional argument in the document format.
10483 This command may occur zero or more times.
10486 \begin_layout Subsection
10487 Preamble definitions
10490 \begin_layout Standard
10491 The external template configuration file may contain additional preamble
10492 definitions enclosed by
10496 \SpecialChar \ldots{}
10502 They can be used by the templates in the
10509 \begin_layout Section
10510 The substitution mechanism
10513 \begin_layout Standard
10514 When the external material facility invokes an external program, it is done
10515 on the basis of a command defined in the template configuration file.
10516 These commands can contain various macros that are expanded before execution.
10517 Execution always take place in the directory of the containing document.
10520 \begin_layout Standard
10521 Also, whenever external material is to be displayed, the name will be produced
10522 by the substitution mechanism, and most other commands in the template
10523 definition support substitution as well.
10526 \begin_layout Standard
10527 The available macros are the following:
10530 \begin_layout Description
10531 $$FName The filename of the file specified in the external material dialog.
10532 This is either an absolute name, or it is relative to the LyX document.
10535 \begin_layout Description
10536 $$Basename The filename without path and without the extension.
10539 \begin_layout Description
10540 $$Extension The file extension (including the dot).
10543 \begin_layout Description
10544 $$FPath The path part of
10548 (absolute name or relative to the LyX document).
10551 \begin_layout Description
10552 $$AbsPath The absolute file path.
10555 \begin_layout Description
10556 $$RelPathMaster The file path, relative to the master LyX document.
10559 \begin_layout Description
10560 $$RelPathParent The file path, relative to the LyX document.
10563 \begin_layout Description
10564 $$AbsOrRelPathMaster The file path, absolute or relative to the master LyX
10568 \begin_layout Description
10569 $$AbsOrRelPathParent The file path, absolute or relative to the LyX document.
10572 \begin_layout Description
10573 $$Tempname A name and full path to a temporary file which will be automatically
10574 deleted whenever the containing document is closed, or the external material
10578 \begin_layout Description
10580 \begin_inset Quotes eld
10584 \begin_inset Quotes erd
10587 ) This macro will expand to the contents of the file with the name
10594 \begin_layout Description
10595 $$Sysdir This macro will expand to the absolute path of the system directory.
10596 This is typically used to point to the various helper scripts that are
10600 \begin_layout Standard
10601 All path macros contain a trailing directory separator, so you can construct
10603 the absolute filename with
10605 $$AbsPath$$Basename$$Extension
10610 \begin_layout Standard
10611 The macros above are substituted in all commands unless otherwise noted.
10616 supports additionally the following substitutions if they are enabled by
10628 \begin_layout Description
10629 $$ResizeFront The front part of the resize command.
10632 \begin_layout Description
10633 $$ResizeBack The back part of the resize command.
10636 \begin_layout Description
10637 $$RotateFront The front part of the rotation command.
10640 \begin_layout Description
10641 $$RotateBack The back part of the rotation command.
10644 \begin_layout Standard
10645 The value string of the
10649 command supports additionally the following substitutions if they are enabled
10661 \begin_layout Description
10662 $$Clip The clip option.
10665 \begin_layout Description
10666 $$Extra The extra option.
10669 \begin_layout Description
10670 $$Resize The resize option.
10673 \begin_layout Description
10674 $$Rotate The rotation option.
10677 \begin_layout Standard
10678 You may ask why there are so many path macros.
10679 There are mainly two reasons:
10682 \begin_layout Standard
10683 First, relative and absolute file names should remain relative or absolute,
10685 Users may have reasons to prefer either form.
10686 Relative names are useful for portable documents that should work on different
10687 machines, for example.
10688 Absolute names may be required by some programs.
10691 \begin_layout Standard
10692 Second, LaTeX treats relative file names differently than LyX and other
10693 programs in nested included files.
10694 For LyX, a relative file name is always relative to the document that contains
10696 For LaTeX, it is always relative to the master document.
10697 These two definitions are identical if you have only one document, but
10698 differ if you have a master document that includes part documents.
10699 That means that relative filenames must be transformed when presented to
10701 Fortunately LyX does this automatically for you if you choose the right
10705 \begin_layout Standard
10706 So which path macro should be used in new template definitions? The rule
10710 \begin_layout Itemize
10715 if an absolute path is required.
10718 \begin_layout Itemize
10721 $$AbsOrRelPathMaster
10723 if the substituted string is some kind of LaTeX input.
10726 \begin_layout Itemize
10729 $$AbsOrRelPathParent
10731 in order to preserve the user's choice.
10734 \begin_layout Standard
10735 There are special cases where this rule does not work and e.g.\InsetSpace ~
10737 are needed, but normally it will work just fine.
10738 One example for such a case is the command
10740 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
10742 in the XFig template above: We can't use the absolute name because the
10747 files needs the relative name in order to rewrite the file content.
10750 \begin_layout Section
10751 Security discussion
10754 \begin_layout Standard
10755 \begin_inset Note Note
10758 \begin_layout Standard
10759 This section is outdated
10764 The external material feature interfaces with a lot of external programs
10765 and does so automatically, so we have to consider the security implications
10767 In particular, since you have the option of including your own filenames
10768 and/or parameter strings and those are expanded into a command, it seems
10769 that it would be possible to create a malicious document which executes
10770 arbitrary commands when a user views or prints the document.
10771 This is something we definately want to avoid.
10774 \begin_layout Standard
10775 However, since the external program commands are specified in the template
10776 configuration file only, there are no security issues if LyX is properly
10777 configured with safe templates only.
10778 This is so because the external programs are invoked with the
10782 -system call rather than the
10786 system-call, so it's not possible to execute arbitrary commands from the
10787 filename or parameter section via the shell.
10790 \begin_layout Standard
10791 This also implies that you are restricted in what command strings you can
10792 use in the external material templates.
10793 In particular, pipes and redirection are not readily available.
10794 This has to be so if LyX should remain safe.
10795 If you want to use some of the shell features, you should write a safe
10796 script to do this in a controlled manner, and then invoke the script from
10797 the command string.
10802 directory of the LyX installation, you can find a safe wrapper script
10804 general_command_wrapper.py
10806 that supports redirection of input and output.
10807 That can serve as an example for how to write safe template scripts.
10808 For a more advanced example that uses
10812 and friends, take a look at the
10819 \begin_layout Standard
10820 It is possible to design a template that interacts directly with the shell,
10821 but since this would allow a malicious user to execute arbitrary commands
10822 by writing clever filenames and/or parameters, we generally recommend that
10823 you only use safe scripts that work with the
10827 system call in a controlled manner.
10828 Of course, for use in a controlled environment, it can be tempting to just
10829 fall back to use ordinary shell scripts.
10830 If you do so, be aware that you
10834 provide an easily exploitable security hole in your system.
10835 Of course it stands to reason that such unsafe templates will never be
10836 included in the standard LyX distribution, although we do encourage people
10837 to submit new templates in the open source tradition.
10838 But LyX as shipped from the official distribution channels will never have
10842 \begin_layout Standard
10843 Including external material provides a lot of power, and you have to be
10844 careful not to introduce security hazards with this power.
10845 A subtle error in a single line in an innocent looking script can open
10846 the door to huge security problems.
10847 So if you do not fully understand the issues, we recommend that you consult
10848 a knowledgable security professional or the LyX development team if you
10849 have any questions about whether a given template is safe or not.
10850 And do this before you use it in an uncontrolled environment.
10853 \begin_layout Chapter
10857 \begin_layout Section
10861 \begin_layout Standard
10862 The LyX server is a method implemented in LyX that will enable other programs
10863 to talk to LyX, invoke LyX commands, and retrieve information about the
10864 LyX internal state.
10865 This is only intended for advanced users, but they should find it useful.
10868 \begin_layout Section
10869 Starting the LyX Server
10872 \begin_layout Standard
10873 The LyX server works through the use of a pair of named pipes.
10874 These are usually located in your home directory and have the names
10875 \begin_inset Quotes eld
10883 \begin_inset Quotes erd
10887 \begin_inset Quotes eld
10895 \begin_inset Quotes erd
10899 External programs write into
10903 and read back data from
10908 The stem of the pipe names can be defined in the
10913 ools\SpecialChar \menuseparator
10920 dialog, for example
10922 "/home/myhome/.lyxpipe"
10927 \begin_layout Standard
10936 ' to create the pipes.
10937 The above setting also has the effect of activating the LyX server.
10938 If one of the pipes already exists, LyX will assume that another LyX process
10939 is already running and will not start the server.
10940 To have several LyX processes with servers at the same time, you have to
10941 change the configuration between the start of the programs.
10944 \begin_layout Standard
10945 If you are developing a client program, you might find it useful to enable
10946 debugging information from the LyX server.
10947 Do this by starting LyX as
10949 lyx -dbg lyxserver.
10952 \begin_layout Standard
10953 Warning: if LyX crashes, it may not manage to remove the pipes; in this
10954 case you must remove them manually.
10955 If LyX starts and the pipes exist already, it will not start any server.
10958 \begin_layout Standard
10959 Other than this, there are a few points to consider:
10962 \begin_layout Itemize
10963 Both server and clients must run on UNIX or OS/2 machines.
10964 Communications between LyX on UNIX and clients on OS/2 or vice versa is
10965 not possible right now.
10968 \begin_layout Itemize
10969 On OS/2, only one client can connect to LyXServer at a time.
10972 \begin_layout Itemize
10973 On OS/2, clients must open inpipe with
10980 \begin_layout Standard
10981 You can find a complete example client written in C in the source distribution
10984 development/server_monitor.c
10989 \begin_layout Section
10990 Normal communication
10993 \begin_layout Standard
10994 To issue a LyX call, the client writes a line of ASCII text into the input
10996 This line has the following format:
10999 \begin_layout Quote
11013 \begin_layout Standard
11018 is a name that the client can choose arbitrarily.
11019 Its only use is that LyX will echo it if it sends an answer - so a client
11020 can dispatch results from different requesters.
11023 \begin_layout Standard
11028 is the function you want LyX to perform.
11029 It is the same as the commands you'd use in the minibuffer.
11032 \begin_layout Standard
11037 is an optional argument which is meaningful only to some functions (for
11039 \begin_inset Quotes eld
11043 \begin_inset Quotes erd
11046 which will insert the argument as text at the cursor position.)
11049 \begin_layout Standard
11050 The answer from LyX will arrive in the output pipe and be of the form
11053 \begin_layout Quote
11067 \begin_layout Standard
11076 are just echoed from the command request, while
11080 is more or less useful information filled according to how the command
11081 execution worked out.
11082 Some commands will return information about the internal state of LyX,
11084 \begin_inset Quotes eld
11088 \begin_inset Quotes erd
11091 , while other will return an empty data-response.
11092 This means that the command execution went fine.
11095 \begin_layout Standard
11096 In case of errors, the response from LyX will have this form
11099 \begin_layout Quote
11113 \begin_layout Standard
11118 should contain an explanation of why the command failed.
11121 \begin_layout Standard
11125 \begin_layout LyX-Code
11126 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
11129 \begin_layout LyX-Code
11130 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
11132 read a <~/.lyxpipe.out
11137 \begin_layout Section
11141 \begin_layout Standard
11142 LyX can notify clients of events going on asynchronously.
11143 Currently it will only do this if the user binds a key sequence with the
11145 \begin_inset Quotes eld
11149 \begin_inset Quotes erd
11153 The format of the string LyX sends is as follows:
11156 \begin_layout Quote
11165 \begin_layout Standard
11170 is the printed representation of the key sequence that was actually typed
11174 \begin_layout Standard
11175 This mechanism can be used to extend LyX's command set and implement macros:
11176 bind some key sequence to
11177 \begin_inset Quotes eld
11181 \begin_inset Quotes erd
11184 , start a client that listens on the out pipe, dispatches the command according
11185 to the sequence and starts a function that may use LyX calls and LyX requests
11186 to issue a command or a series of commands to LyX.
11189 \begin_layout Section
11190 The simple LyX Server Protocol
11193 \begin_layout Standard
11194 LyX implements a simple protocol that can be used for session management.
11195 All messages are of the form
11198 \begin_layout Quote
11208 \begin_layout Standard
11214 \begin_inset Quotes eld
11218 \begin_inset Quotes erd
11222 \begin_inset Quotes eld
11226 \begin_inset Quotes erd
11231 \begin_inset Quotes eld
11235 \begin_inset Quotes erd
11238 is received from a client, LyX will report back to inform the client that
11239 it's listening to it's messages, while
11240 \begin_inset Quotes eld
11244 \begin_inset Quotes erd
11247 sent from LyX will inform clients that LyX is closing.
11250 \begin_layout Chapter
11255 \begin_layout Standard
11256 This appendix is a huge cross-reference to all the English language keybindings.
11257 Originally, we simply wanted to list all of the key bindings followed by
11258 the function it's bound to.
11259 That way, a user can look up a key to find out what it does.
11260 We then decided, what the hey, why not include the default toolbar and
11261 menu bindings, too.
11262 Please note this section is likely to be very out of date.
11265 \begin_layout Standard
11266 The form is really self-explanatory, but here are a few tips: all entries
11267 are arranged roughly alphabetically for a given modifier (
11276 For the general keyboard layout, simpler prefixes precede the more complex
11286 All entries were gleaned from the default user interface and binding files
11287 located in the directories
11289 \SpecialChar \ldots{}
11294 \SpecialChar \ldots{}
11297 ; they should be treated as the final word on the bindings.
11300 \begin_layout Standard
11301 As a final note, be aware that some window managers (such as FVWM) take
11302 control of some of the function keys or motion keys.
11307 is listed here as generating
11311 , but FVWM grabs it and uses it to change virtual desktops instead.
11312 Very annoying unless you instruct your window manager to stop intercepting
11316 \begin_layout Section
11320 \begin_layout LyX-Code
11324 \begin_layout LyX-Code
11328 \begin_layout LyX-Code
11332 \begin_layout LyX-Code
11333 Icon "buffer-write"
11336 \begin_layout LyX-Code
11337 Icon "buffer-print"
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
11388 \begin_layout LyX-Code
11389 Icon "footnote-insert"
11392 \begin_layout LyX-Code
11393 Icon "marginpar-insert"
11396 \begin_layout LyX-Code
11400 \begin_layout LyX-Code
11404 \begin_layout LyX-Code
11405 Icon "figure-insert"
11408 \begin_layout LyX-Code
11409 Icon "dialog-tabular-insert"
11412 \begin_layout LyX-Code
11416 \begin_layout Section
11420 \begin_layout Standard
11421 Note that the following bindings are for LyX with English menus.
11422 The second character of the binding depends on the menu language.
11424 \begin_inset Quotes eld
11432 \begin_inset Quotes erd
11435 is with German menus
11436 \begin_inset Quotes eld
11444 \begin_inset Quotes erd
11448 To find out the shortcuts of your language press the Meta (Alt)-key and
11449 press then the keys of the underlined characters of the menu names.
11452 \begin_layout Subsection
11457 \labelwidthstring 00.00.0000
11469 \labelwidthstring 00.00.0000
11481 \labelwidthstring 00.00.0000
11493 \labelwidthstring 00.00.0000
11507 \labelwidthstring 00.00.0000
11519 \labelwidthstring 00.00.0000
11533 \labelwidthstring 00.00.0000
11545 \labelwidthstring 00.00.0000
11557 \labelwidthstring 00.00.0000
11569 \labelwidthstring 00.00.0000
11581 \labelwidthstring 00.00.0000
11589 buffer-new-template
11593 \labelwidthstring 00.00.0000
11608 \labelwidthstring 00.00.0000
11619 \labelwidthstring 00.00.0000
11630 \labelwidthstring 00.00.0000
11641 \labelwidthstring 00.00.0000
11652 \labelwidthstring 00.00.0000
11663 \labelwidthstring 00.00.0000
11675 \labelwidthstring 00.00.0000
11686 \begin_layout Subsection
11691 \labelwidthstring 00.00.0000
11703 \labelwidthstring 00.00.0000
11715 \labelwidthstring 00.00.0000
11727 \labelwidthstring 00.00.0000
11739 \labelwidthstring 00.00.0000
11751 \labelwidthstring 00.00.0000
11763 \labelwidthstring 00.00.0000
11778 \labelwidthstring 00.00.0000
11785 tabular-feature append-row
11789 \labelwidthstring 00.00.0000
11796 tabular-feature toggle-line-bottom
11800 \labelwidthstring 00.00.0000
11807 tabular-feature align-center
11811 \labelwidthstring 00.00.0000
11818 tabular-feature delete-column
11822 \labelwidthstring 00.00.0000
11829 tabular-feature align-left
11833 \labelwidthstring 00.00.0000
11840 tabular-feature align-right
11844 \labelwidthstring 00.00.0000
11851 tabular-feature toggle-line-left
11855 \labelwidthstring 00.00.0000
11862 tabular-feature multicolumn
11866 \labelwidthstring 00.00.0000
11873 tabular-feature valign-center
11877 \labelwidthstring 00.00.0000
11884 tabular-feature valign-top
11888 \labelwidthstring 00.00.0000
11895 tabular-feature toggle-line-right
11899 \labelwidthstring 00.00.0000
11906 tabular-feature toggle-line-top
11910 \labelwidthstring 00.00.0000
11917 tabular-feature append-column
11921 \labelwidthstring 00.00.0000
11928 tabular-feature valign-bottom
11932 \labelwidthstring 00.00.0000
11939 tabular-feature delete-row
11944 \labelwidthstring 00.00.0000
11957 \labelwidthstring 00.00.0000
11964 floats-operate openfoot
11968 \labelwidthstring 00.00.0000
11975 floats-operate closefoot
11979 \labelwidthstring 00.00.0000
11986 floats-operate openfig
11990 \labelwidthstring 00.00.0000
12001 \labelwidthstring 00.00.0000
12012 \labelwidthstring 00.00.0000
12019 floats-operate closefig
12024 \labelwidthstring 00.00.0000
12036 \labelwidthstring 00.00.0000
12050 \labelwidthstring 00.00.0000
12062 \labelwidthstring 00.00.0000
12074 \labelwidthstring 00.00.0000
12088 \labelwidthstring 00.00.0000
12100 \labelwidthstring 00.00.0000
12115 \labelwidthstring 00.00.0000
12122 primary-selection-paste
12126 \labelwidthstring 00.00.0000
12133 primary-selection-paste paragraph
12137 \begin_layout Subsection
12142 \labelwidthstring 00.00.0000
12157 \labelwidthstring 00.00.0000
12164 buffer-float-insert algorithm
12168 \labelwidthstring 00.00.0000
12175 buffer-float-insert wide-tab
12179 \labelwidthstring 00.00.0000
12186 buffer-float-insert figure
12190 \labelwidthstring 00.00.0000
12197 buffer-float-insert table
12201 \labelwidthstring 00.00.0000
12208 buffer-float-insert wide-fig
12213 \labelwidthstring 00.00.0000
12221 dialog-tabular-insert
12225 \labelwidthstring 00.00.0000
12237 \labelwidthstring 00.00.0000
12249 \labelwidthstring 00.00.0000
12257 buffer-child-insert
12261 \labelwidthstring 00.00.0000
12273 \labelwidthstring 00.00.0000
12285 \labelwidthstring 00.00.0000
12297 \labelwidthstring 00.00.0000
12309 \labelwidthstring 00.00.0000
12321 \labelwidthstring 00.00.0000
12333 \labelwidthstring 00.00.0000
12345 \labelwidthstring 00.00.0000
12360 \labelwidthstring 00.00.0000
12371 \labelwidthstring 00.00.0000
12382 \labelwidthstring 00.00.0000
12393 \labelwidthstring 00.00.0000
12404 \labelwidthstring 00.00.0000
12415 \labelwidthstring 00.00.0000
12427 \labelwidthstring 00.00.0000
12439 \labelwidthstring 00.00.0000
12454 \labelwidthstring 00.00.0000
12461 protected-space-insert
12465 \labelwidthstring 00.00.0000
12472 end-of-sentence-period-insert
12476 \labelwidthstring 00.00.0000
12487 \labelwidthstring 00.00.0000
12498 \labelwidthstring 00.00.0000
12509 \labelwidthstring 00.00.0000
12516 menu-separator-insert
12520 \labelwidthstring 00.00.0000
12527 hyphenation-point-insert
12531 \labelwidthstring 00.00.0000
12542 \labelwidthstring 00.00.0000
12549 command-sequence math-insert ^;math-mode;
12553 \labelwidthstring 00.00.0000
12560 command-sequence math-insert _;math-mode;
12565 \labelwidthstring 00.00.0000
12580 \labelwidthstring 00.00.0000
12587 file-insert-plaintext lines
12591 \labelwidthstring 00.00.0000
12598 file-insert-plaintext paragraphs
12602 \labelwidthstring 00.00.0000
12614 \labelwidthstring 00.00.0000
12626 \labelwidthstring 00.00.0000
12638 \labelwidthstring 00.00.0000
12649 \begin_layout Subsection
12654 \labelwidthstring 00.00.0000
12666 \labelwidthstring 00.00.0000
12678 \labelwidthstring 00.00.0000
12690 \labelwidthstring 00.00.0000
12702 \labelwidthstring 00.00.0000
12714 \labelwidthstring 00.00.0000
12726 \labelwidthstring 00.00.0000
12738 \labelwidthstring 00.00.0000
12750 \labelwidthstring 00.00.0000
12758 layout-save-default
12762 \labelwidthstring 00.00.0000
12774 \labelwidthstring 00.00.0000
12786 \labelwidthstring 00.00.0000
12797 \begin_layout Subsubsection
12800 Layout\SpecialChar \menuseparator
12807 \labelwidthstring 00.00.0000
12819 \labelwidthstring 00.00.0000
12831 \labelwidthstring 00.00.0000
12843 \labelwidthstring 00.00.0000
12855 \labelwidthstring 00.00.0000
12867 \labelwidthstring 00.00.0000
12879 \labelwidthstring 00.00.0000
12891 \labelwidthstring 00.00.0000
12903 \labelwidthstring 00.00.0000
12915 \labelwidthstring 00.00.0000
12927 \labelwidthstring 00.00.0000
12939 \labelwidthstring 00.00.0000
12951 \labelwidthstring 00.00.0000
12963 \labelwidthstring 00.00.0000
12975 \labelwidthstring 00.00.0000
12987 \labelwidthstring 00.00.0000
12999 \labelwidthstring 00.00.0000
13011 \labelwidthstring 00.00.0000
13023 \labelwidthstring 00.00.0000
13035 \labelwidthstring 00.00.0000
13047 \labelwidthstring 00.00.0000
13059 \labelwidthstring 00.00.0000
13071 \labelwidthstring 00.00.0000
13083 \labelwidthstring 00.00.0000
13095 \labelwidthstring 00.00.0000
13107 \labelwidthstring 00.00.0000
13119 \labelwidthstring 00.00.0000
13131 \labelwidthstring 00.00.0000
13143 \labelwidthstring 00.00.0000
13155 \labelwidthstring 00.00.0000
13167 \labelwidthstring 00.00.0000
13179 \labelwidthstring 00.00.0000
13190 \begin_layout Subsection
13194 \begin_layout Subsection
13198 \begin_layout Subsection
13202 \begin_layout Subsection
13207 \labelwidthstring 00.00.0000
13219 \labelwidthstring 00.00.0000
13231 \labelwidthstring 00.00.0000
13243 \labelwidthstring 00.00.0000
13255 \labelwidthstring 00.00.0000
13267 \labelwidthstring 00.00.0000
13275 layout ShortFoilhead
13279 \labelwidthstring 00.00.0000
13291 \labelwidthstring 00.00.0000
13303 \labelwidthstring 00.00.0000
13315 \labelwidthstring 00.00.0000
13327 \labelwidthstring 00.00.0000
13335 layout ShortRotatefoilhead
13339 \labelwidthstring 00.00.0000
13351 \labelwidthstring 00.00.0000
13363 \labelwidthstring 00.00.0000
13375 \labelwidthstring 00.00.0000
13383 drop-layouts-choice
13387 \labelwidthstring 00.00.0000
13402 \labelwidthstring 00.00.0000
13417 \labelwidthstring 00.00.0000
13429 \labelwidthstring 00.00.0000
13441 \labelwidthstring 00.00.0000
13449 layout Subsubsection
13453 \labelwidthstring 00.00.0000
13465 \labelwidthstring 00.00.0000
13473 layout Subparagraph
13477 \labelwidthstring 00.00.0000
13481 asterisk\InsetSpace ~
13490 \labelwidthstring 00.00.0000
13494 asterisk\InsetSpace ~
13503 \labelwidthstring 00.00.0000
13507 asterisk\InsetSpace ~
13516 \labelwidthstring 00.00.0000
13520 asterisk\InsetSpace ~
13529 \labelwidthstring 00.00.0000
13533 asterisk\InsetSpace ~
13538 layout Subsubsection*
13542 \labelwidthstring 00.00.0000
13546 asterisk\InsetSpace ~
13555 \labelwidthstring 00.00.0000
13559 asterisk\InsetSpace ~
13564 layout Subparagraph*
13568 \labelwidthstring 00.00.0000
13580 \labelwidthstring 00.00.0000
13588 layout Bibliography
13592 \labelwidthstring 00.00.0000
13604 \labelwidthstring 00.00.0000
13616 \labelwidthstring 00.00.0000
13628 \labelwidthstring 00.00.0000
13640 \labelwidthstring 00.00.0000
13652 \labelwidthstring 00.00.0000
13660 layout Rotatefoilhead
13664 \labelwidthstring 00.00.0000
13672 layout RightAddress
13676 \labelwidthstring 00.00.0000
13688 \labelwidthstring 00.00.0000
13700 \labelwidthstring 00.00.0000
13712 \labelwidthstring 00.00.0000
13723 \begin_layout Standard
13724 These ones are kept for backwards compatibility, but only make sense on
13729 \labelwidthstring 00.00.0000
13741 \labelwidthstring 00.00.0000
13749 layout Subsubsection*
13753 \labelwidthstring 00.00.0000
13764 \begin_layout Section
13768 \begin_layout Subsection
13775 \labelwidthstring 00.00.0000
13786 \labelwidthstring 00.00.0000
13797 \labelwidthstring 00.00.0000
13808 \labelwidthstring 00.00.0000
13819 \labelwidthstring 00.00.0000
13830 \labelwidthstring 00.00.0000
13841 \labelwidthstring 00.00.0000
13848 hyphenation-point-insert
13852 \labelwidthstring 00.00.0000
13863 \labelwidthstring 00.00.0000
13870 line-delete-forward
13874 \labelwidthstring 00.00.0000
13885 \labelwidthstring 00.00.0000
13896 \labelwidthstring 00.00.0000
13907 \labelwidthstring 00.00.0000
13918 \labelwidthstring 00.00.0000
13929 \labelwidthstring 00.00.0000
13940 \labelwidthstring 00.00.0000
13951 \labelwidthstring 00.00.0000
13962 \labelwidthstring 00.00.0000
13973 \labelwidthstring 00.00.0000
13984 \labelwidthstring 00.00.0000
13995 \labelwidthstring 00.00.0000
14006 \labelwidthstring 00.00.0000
14018 \labelwidthstring 00.00.0000
14030 \labelwidthstring 00.00.0000
14042 \labelwidthstring 00.00.0000
14054 \labelwidthstring 00.00.0000
14067 \labelwidthstring 00.00.0000
14079 \labelwidthstring 00.00.0000
14091 \labelwidthstring 00.00.0000
14103 \labelwidthstring 00.00.0000
14115 \labelwidthstring 00.00.0000
14128 \labelwidthstring 00.00.0000
14140 \labelwidthstring 00.00.0000
14152 \labelwidthstring 00.00.0000
14165 \labelwidthstring 00.00.0000
14178 \labelwidthstring 00.00.0000
14191 \labelwidthstring 00.00.0000
14204 \labelwidthstring 00.00.0000
14217 \labelwidthstring 00.00.0000
14230 \labelwidthstring 00.00.0000
14242 \labelwidthstring 00.00.0000
14254 \labelwidthstring 00.00.0000
14266 \labelwidthstring 00.00.0000
14274 menu-open Documents
14278 \labelwidthstring 00.00.0000
14290 \labelwidthstring 00.00.0000
14302 \labelwidthstring 00.00.0000
14314 \labelwidthstring 00.00.0000
14326 \labelwidthstring 00.00.0000
14338 \labelwidthstring 00.00.0000
14346 buffer-toggle-read-only
14350 \labelwidthstring 00.00.0000
14362 \labelwidthstring 00.00.0000
14374 \labelwidthstring 00.00.0000
14386 \labelwidthstring 00.00.0000
14397 \labelwidthstring 00.00.0000
14408 \labelwidthstring 00.00.0000
14419 \labelwidthstring 00.00.0000
14430 \labelwidthstring 00.00.0000
14441 \labelwidthstring 00.00.0000
14452 \labelwidthstring 00.00.0000
14463 \labelwidthstring 00.00.0000
14474 \labelwidthstring 00.00.0000
14485 \labelwidthstring 00.00.0000
14496 \labelwidthstring 00.00.0000
14507 \labelwidthstring 00.00.0000
14518 \labelwidthstring 00.00.0000
14529 \labelwidthstring 00.00.0000
14540 \labelwidthstring 00.00.0000
14547 word-delete-forward
14551 \labelwidthstring 00.00.0000
14558 word-delete-backward
14562 \labelwidthstring 00.00.0000
14573 \labelwidthstring 00.00.0000
14580 end-of-sentence-period-insert
14584 \labelwidthstring 00.00.0000
14591 protected-space-insert
14595 \labelwidthstring 00.00.0000
14606 \labelwidthstring 00.00.0000
14617 \labelwidthstring 00.00.0000
14628 \labelwidthstring 00.00.0000
14639 \labelwidthstring 00.00.0000
14650 \labelwidthstring 00.00.0000
14661 \labelwidthstring 00.00.0000
14668 buffer-begin-select
14672 \labelwidthstring 00.00.0000
14683 \labelwidthstring 00.00.0000
14690 paragraph-up-select
14694 \labelwidthstring 00.00.0000
14701 paragraph-down-select
14705 \labelwidthstring 00.00.0000
14712 word-backward-select
14716 \labelwidthstring 00.00.0000
14723 word-forward-select
14727 \labelwidthstring 00.00.0000
14738 \labelwidthstring 00.00.0000
14745 word-delete-forward
14749 \labelwidthstring 00.00.0000
14760 \labelwidthstring 00.00.0000
14771 \labelwidthstring 00.00.0000
14782 \labelwidthstring 00.00.0000
14793 \labelwidthstring 00.00.0000
14800 break-paragraph-keep-layout
14804 \labelwidthstring 00.00.0000
14814 \begin_layout Subsection
14821 \labelwidthstring 00.00.0000
14832 \labelwidthstring 00.00.0000
14843 \labelwidthstring 00.00.0000
14854 \labelwidthstring 00.00.0000
14865 \labelwidthstring 00.00.0000
14876 \labelwidthstring 00.00.0000
14887 \labelwidthstring 00.00.0000
14898 \labelwidthstring 00.00.0000
14909 \labelwidthstring 00.00.0000
14920 \labelwidthstring 00.00.0000
14931 \labelwidthstring 00.00.0000
14942 \labelwidthstring 00.00.0000
14953 \labelwidthstring 00.00.0000
14964 \labelwidthstring 00.00.0000
14975 \labelwidthstring 00.00.0000
14986 \labelwidthstring 00.00.0000
14997 \labelwidthstring 00.00.0000
15008 \labelwidthstring 00.00.0000
15019 \labelwidthstring 00.00.0000
15030 \labelwidthstring 00.00.0000
15041 \labelwidthstring 00.00.0000
15052 \labelwidthstring 00.00.0000
15063 \labelwidthstring 00.00.0000
15070 protected-space-insert
15074 \labelwidthstring 00.00.0000
15085 \labelwidthstring 00.00.0000
15096 \labelwidthstring 00.00.0000
15107 \labelwidthstring 00.00.0000
15114 buffer-new-template
15118 \labelwidthstring 00.00.0000
15129 \labelwidthstring 00.00.0000
15140 \labelwidthstring 00.00.0000
15151 \labelwidthstring 00.00.0000
15162 \labelwidthstring 00.00.0000
15173 \labelwidthstring 00.00.0000
15184 \labelwidthstring 00.00.0000
15195 \labelwidthstring 00.00.0000
15202 end-of-sentence-period-insert
15206 \labelwidthstring 00.00.0000
15217 \labelwidthstring 00.00.0000
15228 \labelwidthstring 00.00.0000
15235 hyphenation-point-insert
15239 \labelwidthstring 00.00.0000
15250 \labelwidthstring 00.00.0000
15257 protected-space-insert
15261 \labelwidthstring 00.00.0000
15272 \labelwidthstring 00.00.0000
15283 \labelwidthstring 00.00.0000
15294 \labelwidthstring 00.00.0000
15305 \labelwidthstring 00.00.0000
15316 \labelwidthstring 00.00.0000
15327 \labelwidthstring 00.00.0000
15338 \labelwidthstring 00.00.0000
15349 \labelwidthstring 00.00.0000
15360 \labelwidthstring 00.00.0000
15371 \labelwidthstring 00.00.0000
15382 \labelwidthstring 00.00.0000
15393 \labelwidthstring 00.00.0000
15404 \labelwidthstring 00.00.0000
15415 \labelwidthstring 00.00.0000
15426 \labelwidthstring 00.00.0000
15433 word-delete-forward
15437 \labelwidthstring 00.00.0000
15444 word-delete-backward
15448 \labelwidthstring 00.00.0000
15459 \labelwidthstring 00.00.0000
15470 \labelwidthstring 00.00.0000
15481 \labelwidthstring 00.00.0000
15492 \labelwidthstring 00.00.0000
15499 paragraph-down-select
15503 \labelwidthstring 00.00.0000
15514 \labelwidthstring 00.00.0000
15521 buffer-begin-select
15525 \labelwidthstring 00.00.0000
15532 word-backward-select
15536 \labelwidthstring 00.00.0000
15543 word-forward-select
15547 \labelwidthstring 00.00.0000
15554 paragraph-up-select
15558 \labelwidthstring 00.00.0000
15569 \labelwidthstring 00.00.0000
15576 break-paragraph-keep-layout
15580 \labelwidthstring 00.00.0000
15591 \labelwidthstring 00.00.0000
15602 \labelwidthstring 00.00.0000
15613 \labelwidthstring 00.00.0000
15624 \labelwidthstring 00.00.0000
15635 \labelwidthstring 00.00.0000
15646 \labelwidthstring 00.00.0000
15657 \labelwidthstring 00.00.0000
15668 \labelwidthstring 00.00.0000
15679 \labelwidthstring 00.00.0000
15690 \labelwidthstring 00.00.0000
15700 \begin_layout Subsection
15706 \begin_layout Standard
15707 These are LyX keyboard definitions for mathematics, similar to those of
15711 \begin_layout Standard
15712 The bindings file and the present documentation were prepared by Serge Winitzki
15713 with assistance from Jean-Marc Lasgouttes.
15714 Version 1.3, for LyX 1.2.x and 1.3.x.
15717 \begin_layout Standard
15718 These definitions make it a lot easier to type equations without using the
15719 mouse, especially for people familiar with Scientific Word.
15720 The standard LyX bindings such as
15731 \begin_layout Standard
15732 Tip: to find the "LyX bind name" for a key, look at the status bar after
15733 typing some non-existent key combination.
15735 to find how "Ctrl-&" is referenced, press Ctrl-S and then Ctrl-&: the status
15736 bar shows "C-s S-C-ampersand." (This does not work in LyX 1.3.0!)
15740 \labelwidthstring 00.00.0000
15749 -- Copy, cut, paste is as in Sciword,
15765 \labelwidthstring 00.00.0000
15774 -- Display equation toggle: type
15778 to insert a displayed formula (
15783 \begin_inset Quotes eld
15787 \begin_inset Quotes erd
15795 in a displayed formula to convert it back to an inline formula.
15799 \labelwidthstring 00.00.0000
15814 to insert a fraction (
15819 \begin_inset Quotes eld
15823 \begin_inset Quotes erd
15827 You can also select an expression and type
15831 to convert it to the numerator of a fraction.
15840 end of the denominator will delete the numerator and convert the denominator
15845 \labelwidthstring 00.00.0000
15857 \begin_inset Formula $\int$
15865 \begin_inset Quotes eld
15869 \begin_inset Quotes erd
15876 \labelwidthstring 00.00.0000
15883 line-delete-forward
15885 -- Emacs-like binding: delete forward of cursor to end of line.
15889 \labelwidthstring 00.00.0000
15898 -- A text/math toggle (
15903 \begin_inset Quotes eld
15907 \begin_inset Quotes erd
15910 ): switches to math in text mode, and also inserts roman text in math mode.
15920 \begin_inset Quotes eld
15924 \begin_inset Quotes erd
15931 \labelwidthstring 00.00.0000
15940 -- Add/remove numbering in a single equation.
15944 \labelwidthstring 00.00.0000
15953 -- Add/remove numbering at a line in equation arrays.
15956 \begin_layout Standard
15957 The above commands are toggles that control the numbering of equations (
15962 \begin_inset Quotes eld
15966 \begin_inset Quotes erd
15970 Note: when deleting a number in a labeled eqnarray, the label is not really
15971 removed (the TeX code becomes
15972 \begin_inset Quotes eld
15984 \begin_inset Quotes erd
15987 ) and this generates a (harmless) LaTeX warning.
15991 \labelwidthstring 00.00.0000
16000 -- Open a new document.
16005 \labelwidthstring 00.00.0000
16014 -- Insert a quote character " (
16019 \begin_inset Quotes eld
16023 \begin_inset Quotes erd
16028 \begin_inset Quotes eld
16032 \begin_inset Quotes erd
16035 double quote character that you get by default.
16039 \labelwidthstring 00.00.0000
16050 -- Square root sign
16051 \begin_inset Formula $\sqrt{x}$
16059 \begin_inset Quotes eld
16063 \begin_inset Quotes erd
16070 \labelwidthstring 00.00.0000
16082 \begin_inset Formula $\sqrt[n]{x}$
16089 \labelwidthstring 00.00.0000
16098 -- Another binding for a switch between the text and the math mode (
16103 \begin_inset Quotes eld
16107 \begin_inset Quotes erd
16111 Note that the roman text inserted in math mode is special.
16115 \labelwidthstring 00.00.0000
16128 the selected text (text mode only, use things like
16144 \labelwidthstring 00.00.0000
16153 -- W*ndows heritage.
16157 \labelwidthstring 00.00.0000
16166 -- Close the current document (again, a W*ndows heritage).
16170 \labelwidthstring 00.00.0000
16181 \labelwidthstring 00.00.0000
16192 \labelwidthstring 00.00.0000
16202 \begin_inset Quotes eld
16206 \begin_inset Quotes erd
16210 \begin_inset Quotes eld
16214 \begin_inset Quotes erd
16220 \begin_layout Standard
16221 Bracket delimiters: press
16225 -<bracket key> to insert a matching pair of delimiters.
16230 inserts a pair of parentheses
16231 \begin_inset Formula $\left[\right]$
16239 does the same thing.) It will switch to math mode if needed.
16240 The supported characters are ( [ { < |.
16241 It is the same to press the right or the left bracket.
16242 The corresponding delimiters are
16243 \begin_inset Formula $\left(\right)$
16247 \begin_inset Formula $\left[\right]$
16251 \begin_inset Formula $\left\{ \right\} $
16255 \begin_inset Formula $\left\langle \right\rangle $
16259 \begin_inset Formula $\left|\right|$
16264 \begin_inset Quotes eld
16268 \begin_inset Quotes erd
16271 and resize with their contents.
16272 Use Math Panel to get other or non-matching delimiters.
16273 Press backspace on the
16277 delimiter to remove both
16278 \begin_inset Quotes eld
16282 \begin_inset Quotes erd
16285 delimiters without removing their contents.
16289 \labelwidthstring 00.00.0000
16298 -- for convenience, pressing
16312 \labelwidthstring 00.00.0000
16323 \labelwidthstring 00.00.0000
16334 \labelwidthstring 00.00.0000
16345 \labelwidthstring 00.00.0000
16356 \labelwidthstring 00.00.0000
16367 \labelwidthstring 00.00.0000
16374 math-delim langle rangle
16376 -- angular delimiters
16377 \begin_inset Formula $\left\langle \right\rangle $
16380 , not to confuse with ordinary < > signs.
16384 \labelwidthstring 00.00.0000
16391 math-delim langle rangle
16394 \begin_layout Standard
16395 The bar bracket: on some keyboards (e.g.\InsetSpace ~
16396 some British ones), the bar character
16401 -something and on some wayward Unices to "brokenbar".
16402 So we define all of these keys as well.
16406 \labelwidthstring 00.00.0000
16417 \labelwidthstring 00.00.0000
16428 \labelwidthstring 00.00.0000
16439 \labelwidthstring 00.00.0000
16450 \labelwidthstring 00.00.0000
16460 \begin_layout Standard
16461 Accents are in most cases
16465 -<accent key>, e.g.\InsetSpace ~
16479 for tilde (you also need to press
16485 \begin_inset Quotes eld
16497 \begin_inset Quotes erd
16501 Some accents work only in math mode and others only in text mode.
16505 \labelwidthstring 00.00.0000
16514 -- overdot accent, ȧ (text mode only).
16518 \labelwidthstring 00.00.0000
16530 \begin_inset Formula $\dot{a}$
16533 (math mode only -- in physics this denotes a first derivative).
16537 \labelwidthstring 00.00.0000
16548 -- Vector accent over math
16549 \begin_inset Formula $\overrightarrow{x}$
16556 \labelwidthstring 00.00.0000
16565 -- umlaut accent, ä (text mode only)
16569 \labelwidthstring 00.00.0000
16580 -- double dot accent,
16581 \begin_inset Formula $\ddot{a}$
16584 (math mode only -- in physics this denotes a second derivative).
16585 To get a triple dot in math mode, use
16593 \labelwidthstring 00.00.0000
16602 -- grave accent à (text mode only, use
16612 \labelwidthstring 00.00.0000
16621 -- tilde accent ã (text mode only, use
16631 \labelwidthstring 00.00.0000
16640 -- acute accent á (text mode only, use
16650 \labelwidthstring 00.00.0000
16659 -- circumflex (caret) accent â (text mode only, use
16668 \begin_layout Standard
16670 The new key S-F2 for creating a LaTeX file seems handy.
16674 \labelwidthstring 00.00.0000
16683 -- Save current document.
16687 \labelwidthstring 00.00.0000
16694 buffer-export latex
16696 -- Write a LaTeX file for the current document.
16700 \labelwidthstring 00.00.0000
16709 -- Find and replace dialog.
16713 \labelwidthstring 00.00.0000
16730 \labelwidthstring 00.00.0000
16743 to quit LyX is the W*ndows w*ndow manager's mnemonic.
16746 \begin_layout Standard
16755 are used to switch fonts.
16760 to switch back to the normal font.
16761 The non-default font switches
16769 all work as toggles.
16770 They also work on the whole word if you put the cursor in the middle of
16771 the word, or if you select some text.
16775 \labelwidthstring 00.00.0000
16784 -- stop using any special font
16788 \labelwidthstring 00.00.0000
16805 \labelwidthstring 00.00.0000
16822 \labelwidthstring 00.00.0000
16839 \labelwidthstring 00.00.0000
16853 (Used sometimes for people's names.)
16856 \begin_layout Standard
16862 \begin_inset Quotes eld
16866 \begin_inset Quotes erd
16873 key (useful e.g.\InsetSpace ~
16874 if the keyboard has no working
16881 \begin_layout Standard
16882 Here are some Sciword-inspired mnemonics for frequently used math symbols.
16883 Many symbols start with a
16892 cannot be itself bound to anything.
16896 \labelwidthstring 00.00.0000
16908 \begin_inset Quotes eld
16912 \begin_inset Quotes erd
16916 \begin_inset Formula $\prime$
16920 This is frequently unnecessary: in most cases the normal apostrophe works
16923 \begin_inset Formula $x'+2x=0$
16926 , but in some cases this would generate a double superscript error in LaTeX.
16928 \begin_inset Formula $x^{\prime2}$
16932 \begin_inset Formula $x$
16935 prime squared) must be entered with the prime character.
16939 \labelwidthstring 00.00.0000
16947 command-sequence math-superscript; math-insert
16951 -- Insert a prime as a superscript (see example above).
16955 \labelwidthstring 00.00.0000
16964 -- Insert an upper index.
16971 \labelwidthstring 00.00.0000
16980 -- Insert a lower index.
16987 \labelwidthstring 00.00.0000
16999 -- Partial derivative symbol
17000 \begin_inset Formula $\partial$
17007 \labelwidthstring 00.00.0000
17019 -- Summation symbol
17020 \begin_inset Formula $\sum$
17023 (not the same as the Greek letter uppercase Sigma
17024 \begin_inset Formula $\Sigma$
17027 because it can resize and allows smart upper/lower limits).
17031 \labelwidthstring 00.00.0000
17044 \begin_inset Formula $\prod$
17047 (not the same as the Greek letter uppercase Pi,
17048 \begin_inset Formula $\Pi$
17055 \labelwidthstring 00.00.0000
17068 \begin_inset Formula $\infty$
17075 \labelwidthstring 00.00.0000
17088 \begin_inset Formula $\times$
17095 \labelwidthstring 00.00.0000
17105 -- Insert a stacked array
17106 \begin_inset Formula $\begin{array}{c}
17108 \end{array}\end{array}$
17112 (Frequently useful in formulae.)
17116 \labelwidthstring 00.00.0000
17127 \begin_inset Formula $\times$
17131 \begin_inset Formula $\begin{array}{ccc}
17136 (Then you can modify its size using the
17138 Edit\SpecialChar \menuseparator
17145 \labelwidthstring 00.00.0000
17158 \begin_inset Quotes eld
17162 \begin_inset Quotes erd
17166 \begin_inset Formula $\dagger$
17173 \labelwidthstring 00.00.0000
17186 \begin_inset Quotes eld
17190 \begin_inset Quotes erd
17194 \begin_inset Formula $\equiv$
17201 \labelwidthstring 00.00.0000
17213 \begin_inset Quotes eld
17216 Approximate equality
17217 \begin_inset Quotes erd
17221 \begin_inset Formula $\approx$
17228 \labelwidthstring 00.00.0000
17240 \begin_inset Quotes eld
17244 \begin_inset Quotes erd
17248 \begin_inset Formula $\sim$
17255 \labelwidthstring 00.00.0000
17267 \begin_inset Formula $\rightarrow$
17271 \begin_inset Formula $\lim_{x\rightarrow0}$
17278 \labelwidthstring 00.00.0000
17290 \begin_inset Formula $\leq$
17297 \labelwidthstring 00.00.0000
17308 -- Greater-or-equal
17309 \begin_inset Formula $\geq$
17316 \labelwidthstring 00.00.0000
17329 \begin_inset Quotes eld
17333 \begin_inset Quotes erd
17337 \begin_inset Formula $\ll$
17340 (useful in physics)
17344 \labelwidthstring 00.00.0000
17357 \begin_inset Quotes eld
17361 \begin_inset Quotes erd
17365 \begin_inset Formula $\gg$
17371 \begin_layout Subsection
17372 Standard math bindings
17376 \labelwidthstring 00.00.0000
17390 \labelwidthstring 00.00.0000
17402 \labelwidthstring 00.00.0000
17414 \labelwidthstring 00.00.0000
17428 \labelwidthstring 00.00.0000
17440 \labelwidthstring 00.00.0000
17452 \labelwidthstring 00.00.0000
17466 \labelwidthstring 00.00.0000
17478 \labelwidthstring 00.00.0000
17490 \labelwidthstring 00.00.0000
17502 \labelwidthstring 00.00.0000
17516 \labelwidthstring 00.00.0000
17530 \labelwidthstring 00.00.0000
17544 \labelwidthstring 00.00.0000
17558 \labelwidthstring 00.00.0000
17572 \labelwidthstring 00.00.0000
17586 \labelwidthstring 00.00.0000
17598 \labelwidthstring 00.00.0000
17612 \labelwidthstring 00.00.0000
17624 \labelwidthstring 00.00.0000
17636 \labelwidthstring 00.00.0000
17648 \labelwidthstring 00.00.0000
17660 \labelwidthstring 00.00.0000
17674 \labelwidthstring 00.00.0000
17686 \labelwidthstring 00.00.0000
17698 \labelwidthstring 00.00.0000
17710 \labelwidthstring 00.00.0000
17718 math-delim langle rangle
17722 \labelwidthstring 00.00.0000
17730 math-delim rangle langle
17734 \labelwidthstring 00.00.0000
17746 \labelwidthstring 00.00.0000
17760 \labelwidthstring 00.00.0000
17773 \begin_layout Subsection
17778 \labelwidthstring 00.00.0000
17790 \labelwidthstring 00.00.0000
17802 \labelwidthstring 00.00.0000
17814 \labelwidthstring 00.00.0000
17826 \labelwidthstring 00.00.0000