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
102 Customizing LyX: Features for the Advanced User
110 \begin_layout Standard
112 Principal maintainer of this file is
117 If you have comments or error corrections, please send them to the LyX
118 Documentation mailing list, <lyx-docs@lists.lyx.org>.
126 \begin_layout Standard
127 \begin_inset CommandInset toc
128 LatexCommand tableofcontents
135 \begin_layout Chapter
139 \begin_layout Standard
140 This manual covers the customization features present in LyX.
141 In it, we discuss issues like keyboard shortcuts, screen previewing options,
142 printer options, sending commands to LyX via the LyX Server, internationalizati
143 on, installing new LaTeX classes and LyX layouts, etc.
144 We can't possibly hope to touch on everything you can change---our developers
145 add new features faster than we can document them---but we will explain
146 the most common customizations and hopefully point you in the right direction
147 for some of the more obscure ones.
150 \begin_layout Chapter
151 LyX configuration files
154 \begin_layout Standard
155 \begin_inset CommandInset label
161 This chapter aims to help you to find your way through the LyX configuration
163 Before continuing to read this chapter, you should find out where your
164 LyX library directory is by using
169 elp\SpecialChar \menuseparator
177 This directory is the place where LyX places its system-wide configuration
178 files, and we will simply name it
182 in the remainder of this document.
186 \begin_layout Section
194 \begin_layout Standard
199 and its sub-directories contain a number of files and that can be used
200 to customise LyX's behaviour.
201 You can change many of these files from within LyX itself through the
206 ools\SpecialChar \menuseparator
214 Most customization that you might want to do to LyX is possible through
216 However, many other inner aspects of LyX can be customized by modifying
222 They fall in different categories, described in the following subsections.
225 \begin_layout Subsection
226 Automatically generated files
229 \begin_layout Standard
230 These files are generated when you configure LyX.
231 They contain various default values that are guessed by inspection.
232 In general, it is not a good idea to modify them, since they might be overwritt
237 \labelwidthstring 00.00.0000
244 contains defaults for various commands.
248 \labelwidthstring 00.00.0000
255 contains the list of packages that have been recognized by LyX.
256 It is currently unused by the LyX program itself, but the information extracted
257 , and more, is made available with
262 elp\SpecialChar \menuseparator
274 \labelwidthstring 00.00.0000
281 is the list of text classes that have been found in your
285 directory, along with the associated LaTeX document class and their description.
289 \labelwidthstring 00.00.0000
294 is automatically generated during configuration from the file
301 \begin_layout Subsection
306 \labelwidthstring 00.00.0000
313 this directory contains files with the extension
317 that define the keybindings used in LyX (see section\InsetSpace ~
319 \begin_inset CommandInset ref
321 reference "sec:bindings"
326 If there exists an internationalized version of the bind file named
330 , that will be used first.
331 See Chapter\InsetSpace ~
333 \begin_inset CommandInset ref
335 reference "chap:i18n"
340 \begin_inset CommandInset ref
342 reference "sec:bindings"
350 \labelwidthstring 00.00.0000
357 contains graphics files that can be included in documents.
362 \labelwidthstring 00.00.0000
369 contains LyX documentation files (including the one you are currently reading).
374 deserves special attention, as noted above.
375 If there exists an internationalized version of the help-document with
380 prepended to the name, that will be used first.
381 See Chapter\InsetSpace ~
383 \begin_inset CommandInset ref
385 reference "chap:i18n"
393 \labelwidthstring 00.00.0000
400 contains example files that explain how to use some features.
401 In the file browser, press the
409 \labelwidthstring 00.00.0000
414 contains image files that are used by the
419 In addition, it also contains the individual icons used in the toolbar
420 and the banners that can be shown when LyX is launched.
424 \labelwidthstring 00.00.0000
431 contains keyboard keymapping files.
432 See Chapter\InsetSpace ~
434 \begin_inset CommandInset ref
436 reference "sec:keymap"
444 \labelwidthstring 00.00.0000
451 contains the text class files described in Chapter\InsetSpace ~
453 \begin_inset CommandInset ref
455 reference "chap:textclass"
463 \labelwidthstring 00.00.0000
468 contains some files that demonstrate the capabilities of the
470 External\InsetSpace ~
477 \labelwidthstring 00.00.0000
482 contains the standard LyX template files described in Chapter\InsetSpace ~
484 \begin_inset CommandInset ref
486 reference "sec:templates"
494 \labelwidthstring 00.00.0000
499 contains some LaTeX cls files distributed with LyX.
503 \labelwidthstring 00.00.0000
508 contains files with the extension
512 that define the user interface to LyX.
513 That is, the files define which items appear in which menus and the items
514 appearing on the toolbar.
515 See Chapter\InsetSpace ~
517 \begin_inset CommandInset ref
526 \begin_layout Subsection
527 Files you don't want to modify
530 \begin_layout Standard
531 These files are used internally by LyX and you generally do not need to
532 modify them unless you are a developer.
536 \labelwidthstring 00.00.0000
543 this file contains the list of LyX developers.
544 The contents are displayed with the menu entry
549 elp\SpecialChar \menuseparator
557 \labelwidthstring 00.00.0000
564 this is a LaTeX script used during the configuration process.
569 \labelwidthstring 00.00.0000
576 this is the script that is used to re-configure LyX.
577 It creates configuration files in the directory it was run from.
580 \begin_layout Subsection
581 Other files needing a line or two...
585 \labelwidthstring 00.00.0000
590 this contains tables describing how different character encodings can be
595 \labelwidthstring 00.00.0000
600 this file contains the templates available to the new
602 External\InsetSpace ~
609 \labelwidthstring 00.00.0000
614 this file contains a list of all the languages currently supported by LyX.
617 \begin_layout Section
618 Your local configuration directory
621 \begin_layout Standard
622 Even if you are using LyX as an unprivileged user, you might want to change
623 LyX configuration for your own use.
628 directory contains all your personal configuration files.
629 This is the directory described as
630 \begin_inset Quotes eld
634 \begin_inset Quotes erd
642 elp\SpecialChar \menuseparator
647 This directory is used as a mirror of
651 , which means that every file in
655 is a replacement for the corresponding file in
660 Any configuration file described in the above sections can be placed either
661 in the system-wide directory, in which case it will affect all users, or
662 in your local directory for your own use.
665 \begin_layout Standard
666 To make things clearer, let's provide a few examples:
669 \begin_layout Itemize
670 The preferences set in the
675 ools\SpecialChar \menuseparator
682 dialog are saved to a file
693 \begin_layout Itemize
694 When you reconfigure using
699 ools\SpecialChar \menuseparator
710 and the resulting files are written in your local configuration directory
711 (see section\InsetSpace ~
713 \begin_inset CommandInset ref
715 reference "sec:autodetected"
719 to have a list of the
723 settings affected by this section).
724 This means that any additional text class file that you might have added
729 will be added to the list of classes in the
734 ayout\SpecialChar \menuseparator
744 \begin_layout Itemize
745 Similarly, if you have installed some LaTeX document classes in your home
746 directory, that LaTeX can find with your
750 path, they will show up in your list of text classes.
754 \begin_layout Standard
755 as long as LyX or yourself have a
759 file for it, of course.
767 \begin_layout Itemize
768 If you get some updated documentation from LyX ftp site and cannot install
769 it because you do not have sysadmin rights on your system, you can just
784 \begin_layout Section
785 Running LyX with multiple configurations
788 \begin_layout Standard
789 The configuration freedom of the local configuration directory may not suffice
790 if you want to have more than one configuration at your disposal.
791 For example, you may want to be use different key bindings or printer settings
793 You can achieve this by having several such directories.
794 You then specify which directory to use at run-time.
797 \begin_layout Standard
798 Invoking LyX with the command line switch
806 instructs the program to read the configuration from that directory, and
807 not from the default directory (you can determine the default directory
808 by running LyX without this switch as described above).
809 If this directory does not exist, LyX offers to create it for you, just
810 like it does for the default directory on the first time you run the program.
811 You can modify the configuration options in this additional
815 exactly as you would for the default directory.
816 These directories are completely independent (but read on).
817 Note that setting the environment variable
821 to some value has exactly the same effect
826 \begin_layout Standard
827 Having several configurations also requires more maintenance: if you want
828 to add a new layout to
832 which you want available from all your configurations, you must add it
833 to each directory separately.
834 You can avoid this with the following trick: after LyX creates the additional
835 directory, most of the subdirectories (see above) are empty.
836 If you want the new configuration to mirror an existing one, replace the
837 empty subdirectory with a symbolic link to the matching subdirectory in
838 the existing configuration.
845 subirectory, however, since it contains a file written by the configuration
846 script (also accessible through
851 ools\SpecialChar \menuseparator
857 \begin_inset CommandInset ref
859 reference "sec:autodetected"
865 which is configuration-specific.
868 \begin_layout Chapter
876 \begin_layout Section
877 Using the dialog for the first time
880 \begin_layout Standard
885 file will contain only changes that you have made to the default behaviour,
886 some of which is hard-coded into LyX and some of which is contained in
889 LyXDir/lyxrc.defaults
892 Note that in both files lines beginning with a
893 \begin_inset Quotes eld
901 \begin_inset Quotes erd
904 are just comments and not interpreted.
905 However, only system administrators should edit
915 ools\SpecialChar \menuseparator
922 dialog to create and modify their own
929 \begin_layout Standard
935 ools\SpecialChar \menuseparator
942 dialog will be largely self-explanatory.
943 Almost all the commands have an associated comment, so you shouldn't have
944 too much trouble modifying it to taste.
945 Before we highlight a few of the more important commands below, however,
950 ing some of your changes (e.g., screen fonts) will have an instant effect.
952 changing the bind file) will not.
953 If nothing appears to have changed, just
957 the changes and restart LyX.
960 \begin_layout Section
964 \begin_layout Standard
965 The font used to display your documents on the LyX screen is very important,
966 since you'll be reading all your documents with this font.
967 Therefore it is important that the font is as readable and good-looking
969 The LyX team tried to provide the best possible default font for you, but
970 since practically all X11 systems are different, it's likely that the default
971 fonts will be sub-optimal on your system.
972 Fortunately, you can do something about this.
973 Before we explain how to do this, you should learn a bit more about fonts
974 so that you are better prepared for choosing your fonts, because it is
975 a trade-off that is specific to your preferences and the capabilities of
979 \begin_layout Standard
980 Notice that this section only deals with the fonts on the
984 inside the LyX window.
985 The fonts that appear on the
993 are independent from these fonts, and are determined by the document class.
998 to learn how to change the font of the printed version of your document.
1001 \begin_layout Standard
1002 Basically, screen fonts come in two different kinds: scalable outline fonts
1003 and non-scalable bitmap fonts.
1004 This distinction seems a bit arbitrary, since non-scalable fonts are actually
1005 scalable in most modern font renderers.
1006 The difference lies in the
1010 of the scaling, and the
1015 The most important decision is thus whether you should use non-scalable
1016 bitmap fonts or scalable outline fonts.
1019 \begin_layout Standard
1020 The scalable fonts are built from
1024 of the single glyphs (i.e.
1025 characters) in the font.
1026 This means that each glyph is defined using mathematical curves that are
1027 well suited for scaling to any requested size.
1028 This mathematical definition is interpreted by the font renderer and turned
1029 into a small picture composed of pixels according to which size and glyph,
1030 the programmer requests.
1031 This means that scalable fonts will look pretty good in all sizes.
1032 Well, almost all sizes.
1033 Since scalable fonts are defined in an abstract way, it can be hard to
1034 provide a good rendering at small sizes, where each pixel has to be very
1035 carefully computed to provide a good image.
1036 Technically it is possible to do this from the mathematical definition,
1037 but in order to keep the rendering reasonably fast, tradeoffs have to be
1038 made, and the result is that scalable fonts can be difficult to read at
1042 \begin_layout Standard
1043 Bitmap fonts on the other hand, are defined by bitmap graphics from the
1044 start, so they will look good at all the sizes they are meant for.
1045 However, they don't scale well, because in order to scale a glyph, each
1046 pixel is enlarged into several pixels.
1047 It is the same effect that happens if you try to enlarge a picture in
1051 or any other picture manipulation program.
1052 In order to relieve this effect, bitmap fonts are typically provided in
1053 several fixed sizes typically from around 8 pixels high up to 34 pixels
1054 or so high in steps according to what is believed to be useful.
1055 The advantage of bitmap fonts is that no complicated computations are necessary
1056 to display each glyph, so bitmap fonts are thus faster displayed than scalable
1058 The disadvantage is that sizes that don't exists as fixed versions have
1059 to be scaled by doubling pixels, and thus look bad.
1062 \begin_layout Standard
1063 The net result of all this, is that bitmap fonts are generally best for
1064 the small sizes, where they are available, while scalable fonts are generally
1065 best for large sizes.
1066 The logical conclusion would thus be to use bitmap fonts for the small
1067 sizes, and scalable fonts for the large sizes.
1068 Unfortunately, this is not a good idea, since bitmap fonts and scalable
1069 fonts are not designed to be used together, so the overall look of such
1070 a scheme would be bad.
1071 The best you can do is thus to try both schemes and decide for yourself
1075 \begin_layout Standard
1076 By default, LyX uses non-scalable bitmap fonts (when using the XForms frontend).
1081 is used, for sans serif fonts,
1089 is used as the monospaced/typewriter font.
1092 \begin_layout Standard
1093 In the following, we will describe what to do if the text does not look
1095 We'll start with the most important parameters: DPI and font zoom.
1098 \begin_layout Subsection
1099 DPI setting and Font Zoom
1102 \begin_layout Standard
1103 LyX automatically tries to scale the fonts to look as close as the paper
1104 output size as possible, except for the so-called font zoom factor.
1107 \begin_layout Standard
1108 In order for this to work on all systems, it relies on the screen DPI (dots
1109 per inch) setting to be correct.
1110 The DPI setting for your system is autodetected by LyX using the information
1111 the X server can provide.
1112 You can check what LyX autodetects the DPI setting to, by running LyX as
1120 \begin_layout Standard
1121 On many systems, X is not set up correctly, so you should check that it
1124 \begin_inset Quotes eld
1132 \begin_inset Quotes erd
1135 and write down what the DPI is for the resolution you use (this will be
1136 close to the value LyX detects).
1137 It is the number mentioned as
1138 \begin_inset Quotes eld
1142 \begin_inset Quotes erd
1146 Also write down the number of pixels you have in the width (the first number
1148 \begin_inset Quotes eld
1152 \begin_inset Quotes erd
1158 \begin_layout Standard
1159 Then get the good old ruler out of the closet, and measure the width of
1160 the visible screen-image on your monitor.
1161 Convert this measurement to inches if you used a centimeter ruler by dividing
1163 Now you can determine the correct DPI setting for your screen by dividing
1164 the number of pixels in the width by the width of the screen-image on the
1166 If this number is more than, say, 5 DPI from the detected value, you should
1167 either fix the X setup, or at least tell LyX that the DPI is different
1168 than the detected value.
1171 \begin_layout Standard
1172 If you can't fix the X setup (which of course is best since other programs
1173 than LyX will benefit from this as well), you can tell LyX the correct
1181 \begin_layout Standard
1182 If the text is too small or too big for your taste, you should fiddle with
1183 the font zoom setting.
1184 This setting is used to scale the point size of the text.
1185 If your DPI setting is correct, and the font zoom setting is set to 100,
1186 this means that LyX will try to display the text exactly the same size
1187 as it will appear on the paper-output.
1188 If you set the zoom factor to 200, the text will try to be 2 times as big
1190 Of course, this will only happen if LyX can find a font that has the appropriat
1191 e size, which you can't count on.
1192 Since LyX is a WYSIWYM system anyways, this limitation isn't much of an
1196 \begin_layout Standard
1197 The default font zoom setting is 150, since a monitor is typically wider
1198 than a piece of paper, but you should try to fiddle with it through the
1212 dialog to find a size that you like.
1213 When you've found a setting that seems to work nicely for you (tip: use
1221 button to keep the dialog open while you experiment), you can make this
1222 setting the default by using the
1232 \begin_layout Standard
1233 While it is often possible to find a suitable size for the text on the screen,
1234 this doesn't necessarily mean that the fonts are the best ones available
1236 In order to help you get the most out of your system, you can use the font
1237 definition commands to fine-tune the look of the text in greater detail
1241 \begin_layout Subsection
1242 Font definition commands
1245 \begin_layout Standard
1246 As mentioned, LyX uses non-scalable bitmap fonts by default with the XForms
1252 is used, for sans serif fonts,
1260 is used as the monospaced/typewriter font.
1263 \begin_layout Standard
1264 You can change all of these from within the
1269 The number of fonts that are available on different systems vary, but the
1274 should be available everywhere.
1275 Use that program to find candidate fonts.
1276 When you've found a font that you like, try to insert the first two elements
1278 \begin_inset Quotes eld
1282 \begin_inset Quotes erd
1286 \begin_inset Quotes eld
1290 \begin_inset Quotes erd
1297 ) in the appropriate field in the
1309 LyX will then reformat your document using the new font, and if you like
1310 the font, you should
1318 One place to start for a new font is to see if the scalable font
1319 \begin_inset Quotes eld
1323 \begin_inset Quotes erd
1327 Tip: You can see whether a font is a bitmap font or a scalable font by
1329 \begin_inset Quotes eld
1333 \begin_inset Quotes erd
1337 \begin_inset Quotes eld
1341 \begin_inset Quotes erd
1349 If the value 0 is available, the font is scalable.
1350 If the value 0 isn't available, the font is a bitmap font.
1353 \begin_layout Standard
1354 Before you go about scrapping a bitmap font because the larger sizes look
1356 \begin_inset Quotes eld
1360 \begin_inset Quotes erd
1363 , you should toggle the
1364 \begin_inset Quotes eld
1368 \begin_inset Quotes erd
1372 This is only useful if you use bitmap fonts, because only these don't scale
1374 If you define this flag, LyX will only use the fixed font sizes that are
1375 available, and this guarantees that all bitmap fonts look well.
1376 (You can see which individual font sizes are available with the
1385 .) However, the prize is that the difference between the size of the fonts
1386 on screen and the size of fonts on paper will be larger because LyX will
1387 have to be satisfied with the closest available size, and not try to scale
1389 Also, you can risk that some logically different sizes, such as
1397 , will be mapped to the same screen font, making it hard for you to see
1398 the difference on screen.
1399 We've decided not to use scalable fonts by default because of these artifacts,
1400 but since LyX is a WYSIWYM system, many people like to use the flag anyways,
1401 well-knowing that the font size on the screen can't be trusted.
1402 But remember that this flag only makes a difference when you use bitmap
1404 Scalable fonts won't be affected for reasons you should understand by now.
1407 \begin_layout Standard
1408 One final note regarding this flag: you should know that there is nothing
1409 wrong with using bitmap and scalable fonts at the same time for different
1411 For instance, it's common to use the scalable
1412 \begin_inset Quotes eld
1416 \begin_inset Quotes erd
1419 for the serif text together with a bitmap version of
1420 \begin_inset Quotes eld
1424 \begin_inset Quotes erd
1428 And you can safely select the
1429 \begin_inset Quotes eld
1433 \begin_inset Quotes erd
1436 button without worries: It will only apply to the Helvetica font.
1439 \begin_layout Standard
1440 Sometimes the artifacts introduced by use of the flag can be relieved by
1441 using the fine-detail screen font sizes which defines which point sizes
1442 the different logical font sizes correspond to.
1447 to see exactly what concrete fonts the logical sizes map to, and try adjusting
1448 the corresponding entries in the
1452 dialog until you've managed to hit the nail and get the fonts you want.
1453 This can be hard to do, because LyX uses the DPI setting and the font zoom
1454 settings to calculate which exact screen font size to ask the X server
1455 for, thus obfuscating the mapping.
1456 If you can't make it by trial-and-error, you can make the process more
1457 transparent if you set both the DPI setting and font zoom settings to 100---eve
1458 n when this is known to be wrong.
1459 This will of course make your scalable fonts look weird, so use with care.
1462 \begin_layout Subsection
1466 \begin_layout Standard
1467 By default, LyX will use fonts meant to write Western European text, including
1468 all kinds of English.
1469 This is defined through the so-called
1478 If you want to use LyX to write for instance Eastern European text, Cyrillic
1479 or any other language not covered by the ISO-8859-1 font encoding, you
1480 can define a different one with the encoding setting.
1481 This requires you to have special fonts installed.
1486 to see whether this is the case: check the
1487 \begin_inset Quotes eld
1491 \begin_inset Quotes erd
1495 \begin_inset Quotes eld
1499 \begin_inset Quotes erd
1502 fields for ISO-8859-X values different from ISO-8859-1, and search for
1503 one that contains the national characters of your language.
1504 If you find any, enter this encoding in the dialog.
1505 If not, go searching the Web for appropriate fonts.
1506 For the Qt frontend, it's recommended you use an iso646 font set.
1509 \begin_layout Standard
1510 When you've set LyX up to use a different font encoding, you should also
1511 consider changing the font used by dialog windows in LyX.
1518 dialog will not be understandable unless you tell LyX to use a different
1520 By default the menu font is set to
1522 -*-helvetica-medium-r
1524 , but often Helvetica is not available in the font encoding you need, so
1525 the dialog allows this to be changed.
1528 \begin_layout Standard
1529 As you can see, there are quite a few options that can be used to fine tune
1530 the look of your fonts.
1531 This should not scare you from fiddling with the settings, because after
1532 all, you will hopefully be using LyX for many hours in the future.
1533 And contrary to real WYSIWYG word processors where you are tied to using
1534 fonts that have to look good both on paper and on screen, LyX gives you
1535 the possibility of using fonts that are designed to look good on the screen
1536 while using a different set of fonts to look good on paper.
1539 \begin_layout Section
1541 \begin_inset CommandInset label
1550 \begin_layout Standard
1551 Bindings are used to, well, bind a function to a key.
1552 Several prepackaged binding files are available: a CUA set of bindings
1553 (familiar as the typical set of PC and CDE set of keyboard shortcuts),
1554 an Emacs set of bindings, for those of us who follow the One True Way and
1555 refuse to lower our standards,
1559 \begin_layout Standard
1560 I'm kidding here, of course!
1565 as well as specialty bindings (broadway and hollywood) and other languages
1566 (French, German, etc.).
1569 \begin_layout Standard
1570 If, however, you'd like to customise the keybindings to your own exacting
1571 tastes, then copy the best-fit file in
1580 Don't forget to load this new file into LyX using the
1585 (For the moment you'll have to restart LyX for these changes to take effect.)
1588 \begin_layout Standard
1589 LyX supports internationalization of the user interface (see Chapter\InsetSpace ~
1591 \begin_inset CommandInset ref
1593 reference "chap:i18n"
1602 is set, with the environment variable
1606 , LyX will try to use bindfiles by prepending
1611 For example, you can put a translated copy of some standard bind file in
1616 directory, and LyX will use it automatically.
1619 \begin_layout Standard
1624 files is straightforward:
1627 \begin_layout Standard
1632 bind <key combination> <lyx-function>
1635 \begin_layout Standard
1636 Both key combination and lyx-function (including any arguments) must be
1637 enclosed in "double quotes".
1638 All the LyX functions are listed in the
1645 \begin_layout Section
1647 \begin_inset CommandInset label
1656 \begin_layout Standard
1657 The appearance of both the menu and toolbar may both be changed using the
1672 For the moment, only one file exists,
1676 , but feel free to experiment.
1677 Just copy the file to the
1681 directory and play! Note that, for the moment, you'll have to restart LyX
1682 for these changes to take effect.
1685 \begin_layout Standard
1690 files is straightforward: have a look at
1703 entries must be ended with an explicit
1728 s and in the case of the
1729 \begin_inset Quotes eld
1733 \begin_inset Quotes erd
1741 One small word of warning.
1746 s may be inserted in a
1754 , but they are defined as
1765 \begin_layout Section
1766 \begin_inset CommandInset label
1768 name "sec:converters-etc"
1772 Converters, Formats, and Copiers
1775 \begin_layout Standard
1776 LyX has a powerful mechanism to convert to and from any file format using
1781 \begin_layout Subsection
1785 \begin_layout Standard
1786 The first step is to define your file formats if they are not already defined.
1789 Tools\SpecialChar \menuseparator
1790 Preferences:Converters
1793 Enter a new format name; a new GUI name (used in e.\InsetSpace \thinspace{}
1803 menus); and a file extension.
1808 \begin_layout Standard
1813 option tells LyX that a format is suitable for document export.
1814 If this is is set and if a suitable conversion route exists, the format
1817 File\SpecialChar \menuseparator
1821 The format will also appear in the
1825 menu if it has a specified viewer.
1826 Pure image formats, e.\InsetSpace \thinspace{}
1832 , should not use this option.
1833 Formats that can both represent vector graphics and documents like e.\InsetSpace \thinspace{}
1842 \begin_layout Standard
1845 Vector graphics format
1847 tells LyX that a format can contain vector graphics.
1848 This information is used to determine the target format of included graphics
1854 Included graphics may need to be converted to either
1870 cannot handle other image formats.
1871 If an included graphic is not already in
1883 format, it is converted to
1887 if the vector format option is set, and otherwise to
1894 \begin_layout Standard
1895 A Format can have a Viewer and Editor program associated with it.
1896 For example, you might want to use
1900 to view PostScript files.
1901 You can enter the program call and its options to the corresponding fields.
1902 For the call you can use the four variable listed in the next section.
1903 The viewer is launched when you view an image in LyX or use the
1908 If the operating system has a default viewer associated to a format, this
1909 viewer is used instead of the one defined here when you enter in the Viewer
1911 \begin_inset Quotes eld
1919 \begin_inset Quotes erd
1923 The editor is for example launched when you press the
1938 \begin_layout Subsection
1942 \begin_layout Standard
1943 Each format can have a Copier associated with it.
1944 These are defined in the
1946 Tools\SpecialChar \menuseparator
1950 Since all conversions from one format to another take place in LyX's temporary
1951 directory, it is sometimes necessary to modify a file before copying it
1952 to the temporary directory in order that the conversion may be performed.
1956 \begin_layout Standard
1957 For example, the file may refer to other files---images, for example---using
1958 relative filenames, and these may become invalid when the file is copied
1959 to the temporary directory.
1964 This is done by the Copier: It copies a file to (or from) the temporary
1965 directory and may modify it in the process.
1968 \begin_layout Standard
1969 Copiers may also be used for other purposes.
1970 For example, if appropriate converters are found, LyX will automatically
1971 install copiers for the
1981 When these formats are exported, the copier sees that not just the main
1982 HTML file but various associated files (style files, images, etc.) are also
1984 All these files are written to a subdirectory of the directory in which
1985 the original LyX file was found.
1989 \begin_layout Standard
1990 This copier can be customized.
1992 \begin_inset Quotes eld
1996 \begin_inset Quotes erd
1999 argument takes a comma-separated list of extensions to be copied; if it
2000 is omitted, all files will be copied.
2002 \begin_inset Quotes eld
2006 \begin_inset Quotes erd
2009 argument determines the extension added to the generated directory.
2011 \begin_inset Quotes eld
2019 \begin_inset Quotes erd
2022 , so HTML generated from
2024 /path/to/filename.lyx
2028 /path/to/filename.html.LyXconv
2039 \begin_layout Standard
2040 The definitions of the copiers may use four variables:
2044 \labelwidthstring 00.00.0000
2045 $$s The LyX system directory (e.\InsetSpace \thinspace{}
2055 \labelwidthstring 00.00.0000
2060 \labelwidthstring 00.00.0000
2065 \labelwidthstring 00.00.0000
2066 $$l The `LaTeX name'
2069 \begin_layout Standard
2070 The latter is to be given in a form suitable for inclusion in a LaTeX's
2077 command and is relevant only when exporting files suitable for such inclusion.
2080 \begin_layout Standard
2081 Copiers can be used to do almost anything with output files.
2082 For example, suppose you want generated pdf files to be copied to a special
2084 \begin_inset Flex CharStyle:Code
2087 \begin_layout Standard
2094 Then you could write a shell script such as this one:
2097 \begin_layout Standard
2098 \begin_inset listings
2102 \begin_layout Standard
2107 \begin_layout Standard
2112 \begin_layout Standard
2114 TOFILE=`basename $2`
2117 \begin_layout Standard
2119 cp $FROMFILE /home/you/pdf/$TOFILE
2124 Save that in your local LyX directory---say,
2125 \begin_inset Flex CharStyle:Code
2128 \begin_layout Standard
2129 /home/you/.lyx/scripts/pdfcopier.sh
2134 ---and make it executable, if you need to do so on your platform.
2137 Tools\SpecialChar \menuseparator
2144 format---or one of the other pdf formats---and enter
2145 \begin_inset Flex CharStyle:Code
2148 \begin_layout Standard
2149 pdfcopier.sh $$i $$o
2162 \begin_layout Subsection
2166 \begin_layout Standard
2167 To define a new converter, select an existing one, select a different format
2173 and\InsetSpace \thinspace{}
2174 /\InsetSpace \thinspace{}
2180 drop-down list, modify the
2184 field, and press the
2191 \begin_layout Standard
2192 You do not have to define converters between all the formats between which
2193 you want to convert.
2194 For example, you will note that there is no `LyX to PostScript' converter,
2195 but LyX will export PostScript.
2196 It does so by first creating a LaTeX file (no converter needs to be defined
2197 for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2198 and finally converts the resulting DVI file to PostScript.
2199 LyX finds such `chains' of converters automatically, and it will always
2200 choose the shortest possible chain.
2201 You can, though, still define multiple conversion methods between file
2203 For example, the standard LyX configuration provides three ways to convert
2204 LaTeX to PDF: Directly, using
2208 ; via (DVI and) PostScript, using
2217 To define such alternate chains, you must define multiple target `file
2218 formats', as described in the next section.
2219 For example in the standard configuration the formats named
2231 are defined, all of which share the extension
2238 \begin_layout Standard
2239 Several variables can be used in the definition of converters:
2243 \labelwidthstring 00.00.0000
2244 $$s The LyX system directory
2248 \labelwidthstring 00.00.0000
2253 \labelwidthstring 00.00.0000
2258 \labelwidthstring 00.00.0000
2259 $$b The base filename of the input file
2263 \labelwidthstring 00.00.0000
2264 $$p The path to the input file
2267 \begin_layout Standard
2273 field you can enter the following flags, separated by commas:
2277 \labelwidthstring 00.00.0000
2278 latex This converter runs some form of LaTeX.
2279 This will make LyX's LaTeX error logs available.
2283 \labelwidthstring 00.00.0000
2284 needaux Needs the LaTeX
2288 file for the conversion.
2292 \labelwidthstring 00.00.0000
2296 \begin_layout Standard
2297 The following three flags are not really flags at all because they take
2308 \labelwidthstring 00.00.0000
2309 parselog If set, the converter's standard error will be redirected to a
2314 , and the script given as argument will be run as:
2316 script <infile.out >infile.log
2319 The argument may contain $$s.
2323 \labelwidthstring 00.00.0000
2324 resultdir The name of the directory in which the
2328 will dump the generated files.
2329 LyX will not create this directory, and it does not copy anything into
2330 it, though it will copy this directory to the destination.
2331 The argument may contain $$b, which will be replaced by the basename of
2332 the input and output files, respectively, when the directory is copied.
2335 that resultdir and usetempdir make no sense together.
2336 The latter will be ignored if the former is given.
2340 \labelwidthstring 00.00.0000
2341 resultfile Determines the output filename and may, contain $$b.
2342 Sensible only with resultdir, and optional even then; if not given, it
2343 defaults to `index'.
2346 \begin_layout Standard
2347 None of these last three are presently used in any of the converters that
2348 are installed with LyX.
2350 \begin_inset CommandInset ref
2352 reference "sub:LyX-and-Literate"
2356 of the Extended Features guide for some examples of how you might use parselog.
2359 \begin_layout Section
2360 BibTeX and makeindex
2363 \begin_layout Standard
2364 Both the bibliography generating command (default
2368 ) and the index generating command (default
2381 As an alternative for
2393 \begin_layout Standard
2394 The command to enter is
2400 makeindex.sh -m $$lang
2403 \begin_layout Standard
2404 where the placeholder
2408 will be replaced by the chosen document (babel) language.
2412 \begin_layout Standard
2413 have installed the packages
2430 at a shell prompt for a help page.
2433 \begin_layout Section
2434 Plain text export options
2437 \begin_layout Standard
2438 \begin_inset VSpace bigskip
2444 \begin_layout Standard
2446 There are a couple of commands that can be used to
2447 \begin_inset Quotes eld
2451 \begin_inset Quotes erd
2454 exported plain text files.
2455 Note that LyX automatically detects and uses the best settings for your
2456 system at installation time, but you can modify them if you disagree with
2460 \begin_layout Description
2464 Plain text\InsetSpace ~
2468 This option defines the command used to produce better plain text tables
2473 UNIX-commands (refer to their manpages for more information about them).
2474 Setting this as empty tells LyX to use the internal (inferior) formatter.
2477 \begin_layout Description
2481 Plain text\InsetSpace ~
2486 With this command you can set the default line length of the plain text
2488 Setting it to 0 means endless lines.
2491 \begin_layout Section
2495 \begin_layout Standard
2496 There are a bunch of configuration options that are used for interaction
2497 with the external print command from LyX.
2498 Normally the defaults are fine: if, however, your print command takes different
2499 option names, you can modify them here.
2502 \begin_layout Subsection
2506 \begin_layout Standard
2507 You can change the colors used by LyX on-screen using the new
2512 Alternatively, if you're feeling particularly perverse you could use the
2517 bindable function (see the
2522 Input would have the format:
2525 \begin_layout Standard
2528 set-color LyXName X11Color
2531 \begin_layout Standard
2532 Here is a (partial) list of the functions and default colors:
2535 \begin_layout Standard
2537 \begin_inset Tabular
2538 <lyxtabular version="3" rows="10" columns="3">
2540 <column alignment="left" valignment="top" leftline="true" width="0pt">
2541 <column alignment="left" valignment="top" leftline="true" width="0pt">
2542 <column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
2543 <row topline="true" bottomline="true">
2544 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2547 \begin_layout Standard
2562 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2565 \begin_layout Standard
2580 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2583 \begin_layout Standard
2599 <row topline="true">
2600 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2603 \begin_layout Standard
2618 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2621 \begin_layout Standard
2636 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2639 \begin_layout Standard
2655 <row topline="true">
2656 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2659 \begin_layout Standard
2674 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2677 \begin_layout Standard
2692 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2695 \begin_layout Standard
2711 <row topline="true">
2712 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2715 \begin_layout Standard
2730 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2733 \begin_layout Standard
2748 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2751 \begin_layout Standard
2767 <row topline="true">
2768 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2771 \begin_layout Standard
2786 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2789 \begin_layout Standard
2804 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2807 \begin_layout Standard
2823 <row topline="true">
2824 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2827 \begin_layout Standard
2842 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2845 \begin_layout Standard
2855 fraction Lines, brackets, etc.
2860 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2863 \begin_layout Standard
2879 <row topline="true">
2880 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2883 \begin_layout Standard
2898 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2901 \begin_layout Standard
2907 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2910 \begin_layout Standard
2926 <row topline="true">
2927 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2930 \begin_layout Standard
2945 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2948 \begin_layout Standard
2954 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2957 \begin_layout Standard
2973 <row topline="true">
2974 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2977 \begin_layout Standard
2992 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2995 \begin_layout Standard
3001 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3004 \begin_layout Standard
3020 <row topline="true" bottomline="true">
3021 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
3024 \begin_layout Standard
3039 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
3042 \begin_layout Standard
3052 selection background
3057 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3060 \begin_layout Standard
3083 \begin_layout Section
3084 The autodetected settings
3087 \begin_layout Standard
3088 \begin_inset CommandInset label
3090 name "sec:autodetected"
3094 There are several items that are detected for you when you run
3101 \SpecialChar \menuseparator
3107 In this section, we list those which pertain to the user preferences.
3110 \begin_layout Description
3116 plaintext_roff_command
3131 , depending on what is available.
3134 \begin_layout Description
3147 plus a bunch of options.
3150 \begin_layout Description
3163 on systems (so-called System V) who have this command, and
3167 otherwise (BSD systems).
3170 \begin_layout Description
3176 print_spool_printerprefix
3187 , depending on whether
3198 \begin_layout Description
3215 fonts are found and LaTeX has support for these fonts built-in.
3216 You can set it manually if you only have the so-called
3223 \begin_layout Section
3227 \begin_layout Standard
3228 There are many other configuration options that can be used to customize
3230 We still need to document them here, but again, most should be fairly obvious.
3231 Please ask on the mailing lists if you need some more information; it may
3232 even prompt us to expand this section.
3235 \begin_layout Chapter
3236 Internationalizing LyX
3237 \begin_inset CommandInset label
3246 \begin_layout Standard
3247 LyX supports using a translated interface.
3248 Last time we checked, LyX provided text in 14 languages together with the
3249 default English text.
3250 The language of choice is called your
3255 (For further reading on locale settings, see also the documentation for
3256 locale that comes with your operating system.
3257 For Linux, the manual page for locale(5) could be a good place to start).
3260 \begin_layout Standard
3261 Notice that these translations will work, but do contain a few flaws.
3262 In particular, all dialogs have been designed with the English text in
3263 mind, which means that some of the translated text will be too large to
3264 fit within the space allocated.
3265 This is only a display problem and will not cause any harm.
3266 Also, you will find that some of the translations do not define short-cut
3267 keys for everything.
3268 Sometimes, there are simply not enough free letters to do it.
3269 Other times, the translator just hasn't got around to doing it yet.
3270 Our localization team -- which you may wish to join -- will try to fix
3271 these shortcomings in future versions of LyX.
3274 \begin_layout Section
3275 Selecting an alternative language for the user interface
3278 \begin_layout Standard
3279 This feature is disabled by default, meaning that system default language
3281 To enable an alternative language, you have to set an appropriate environment
3289 for csh class shells
3304 with the two letter code (or four letter code, like
3308 for British English) for the language you want.
3314 Besides the user interface texts being translated, also the appropriate
3315 manuals will be presented under the Help menu -- if available.
3318 \begin_layout Standard
3319 On some systems, you may have to redefine
3331 , to override the system settings; their preference is in this order
3335 \begin_layout Standard
3336 The shell variable LANGUAGE has been disabled in LyX for technical reasons.
3342 , which corresponds to the way GNU
3347 Consult your system documentation.
3348 Normally, you'll want to put the appropriate line in a shell script run
3349 on start-up, so that the translation is on by default.
3350 Remember that this affects
3354 localized packages, not only LyX!
3357 \begin_layout Standard
3358 If LyX is configured and compiled with
3359 \begin_inset Quotes eld
3367 \begin_inset Quotes erd
3370 , this mechanism will not work.
3373 \begin_layout Section
3377 \begin_layout Subsection
3378 Translating the graphical user interface (text messages).
3381 \begin_layout Standard
3386 library to handle the internationalization of the interface.
3387 To have LyX speak your favorite language in all menus and dialogs, you
3392 -file for that language.
3393 When this is available, you'll have to generate a mo-file from it and install
3399 The process of doing all of this is explained in the documentation for
3404 , but in short, this is what you do (
3408 denotes the language code):
3411 \begin_layout Standard
3415 \begin_layout Standard
3427 \begin_layout Itemize
3430 LYX-SOURCE-DIR/po/lyx.pot
3443 doesn't exist, it can be remade with
3447 in that directory, or you can use an existing po-file for some other language
3451 \begin_layout Itemize
3458 \begin_layout Standard
3459 We recommend that you use Emacs to do this, since the
3463 distribution includes a nice mode that supports you in doing this.
3471 For some menu- and widget-labels, there are also shortcut keys that should
3473 Those keys are marked after a `|', and should be translated according to
3474 the words and phrases of the
3479 There is a tool named
3483 written in Prolog in
3485 LYX-SOURCE-DIR/development/tools/
3487 that may be useful to help determine short-cut keys.
3488 Note that XForms (version 0.86 at least) can't handle anything but 7-bit
3489 characters as shortcut keys.
3490 You should also fill also out the information at the beginning of the new
3495 -file with your email-address, etc., so people know where to reach you with
3496 suggestions and entertaining flames.
3499 \begin_layout Itemize
3508 This can be done with
3529 \begin_layout Itemize
3534 -file to your locale-tree, at the correct directory for application messages
3539 , and under the name
3548 /usr/local/share/locale/
3559 \begin_layout Standard
3563 \begin_layout Standard
3575 \begin_layout Standard
3576 Adding a new po-file to the
3580 of LyX involves altering the configure scripts and more, but the way
3584 works, you don't actually need the source-code of LyX to translate it---having
3600 \begin_layout Standard
3601 If you've written a translation file for a language that LyX does not currently
3602 support, feel free to submit it for inclusion by sending a patch.
3603 In this case, we recommend that you read the
3611 directory for more instructions.
3614 \begin_layout Subsubsection
3618 \begin_layout Standard
3619 Sometimes it turns out that one english message needs to be translated into
3620 different messages in the target language.
3621 One example is the message
3625 which has the german translation
3642 does not handle such ambigous translations.
3643 Therefore you have to add some context information to the message: Instead
3650 To[[as in 'From format x to format y']]
3654 To[[as in 'From page x to page y']].
3657 Now the two occurences of
3665 and can be translated correctly to
3680 \begin_layout Standard
3681 Of course the context information needs to be stripped off the original
3682 message when no translation is used.
3683 Therefore you have to put it in double square brackets at the end of the
3684 message (see the example above).
3685 The translation mechanism of LyX ensures that everything in double square
3686 brackets at the end of messages is removed before displaying the message.
3689 \begin_layout Subsection
3690 Translating the documentation.
3693 \begin_layout Standard
3694 The online documentation (in the
3701 -menu) can (and should!) be translated.
3702 If there are translated versions of the documentation available
3706 \begin_layout Standard
3707 As of February 2003, almost all of the docs have been translated into German
3713 has been translated into at least 12 other languages, with other translations
3715 The library of translated documents is growing rapidly.
3720 , and the locale is set accordingly, these will be used automagically by
3722 LyX looks for translated versions as
3736 denotes the language as set by the environmental variable
3741 If there are none, the default English versions will be displayed.
3742 Note that the translated versions must have the same filenames (
3746 above) as the original.
3747 If you feel up to translating the documentation (an excellent way to proof-read
3748 the original documentation BTW!), there are a few things you should do
3752 \begin_layout Itemize
3757 , the guide to writing LyX documentation.
3758 Pay special attention to the translator's section.
3761 \begin_layout Itemize
3762 Check out the documentation translation web page at
3763 \begin_inset Flex URL
3766 \begin_layout Standard
3767 http://www.devel.lyx.org
3773 That way, you can find out which (if any) documents have already been translate
3774 d into your language.
3775 You can also find out who (if anyone) is organizing the effort to translate
3776 the documentation into your language.
3777 If no one is organizing the effort, please let us know that you're interested.
3780 \begin_layout Standard
3781 Once you get to actually translating, here's a few hints for you that may
3785 \begin_layout Itemize
3786 Join the documentation team! There is information on how to do that in
3795 elp\SpecialChar \menuseparator
3802 ), which by the way is the first document you should translate.
3805 \begin_layout Itemize
3806 Learn the typographic conventions for the language you are translating to.
3807 Typography is an ancient art and over the centuries, a great variety of
3808 conventions have developed throughout different parts of the world.
3809 Also study the professional terminology amongst typographers in your country.
3810 Inventing your own terminology will only confuse the users.
3813 (Warning! Typography is addictive!)
3816 \begin_layout Itemize
3817 Make a copy of the document.
3818 This will be your working copy.
3819 You can use this as your personal translated help-file by placing it in
3827 \begin_layout Itemize
3828 Sometimes the original document (from the LyX-team) will be updated.
3829 Use the ViewCVS tool available at
3830 \begin_inset Flex URL
3833 \begin_layout Standard
3834 http://www.lyx.org/viewcvs.cgi/lyxdoc/
3839 to see what has been changed
3843 \begin_layout Standard
3844 Alternatively, you can keep a copy of the latest version of the English
3845 document which you've translated.
3851 That way you can easily see which parts of the translated document need
3855 \begin_layout Itemize
3856 If you ever find an error in the original document, fix it and notify the
3857 rest of the documentation team of the changes! (You didn't forget to join
3858 the documentation team did you?)
3861 \begin_layout Section
3862 International Keyboard Support
3865 \begin_layout Standard
3868 [Editor's Note: The following section is by
3876 It needs to be fixed to conform to the new Documentation Style sheet and
3877 to make use of the new v1.0 features.
3878 The whole thing also needs to be merged with the section following it.-jw]
3881 \begin_layout Subsection
3882 Defining Own Keymaps: Keymap File Format
3885 \begin_layout Standard
3886 Let's look at a keyboard definition file a little closer.
3887 It is a plain text file defining
3890 \begin_layout Itemize
3891 key-to-key or key-to-string translations
3894 \begin_layout Itemize
3898 \begin_layout Itemize
3899 dead keys exceptions
3902 \begin_layout Standard
3903 To define key-to-key or key-to-string translation, use this command:
3906 \begin_layout Quotation
3922 \begin_layout Standard
3927 is the key to be translated and
3931 is the string to be inserted into the document.
3932 To define dead keys, use:
3935 \begin_layout Quotation
3951 \begin_layout Standard
3961 The following dead keys are supported (shortcut name is in parentheses):
3964 \begin_layout Quotation
3972 \begin_layout Quotation
3978 \begin_layout Quotation
3984 \begin_layout Quotation
3990 \begin_layout Quotation
3996 \begin_layout Quotation
4003 \begin_layout Standard
4015 \begin_layout Quotation
4021 \begin_layout Quotation
4028 \begin_layout Standard
4040 \begin_layout Quotation
4046 \begin_layout Quotation
4052 \begin_layout Quotation
4059 \begin_layout Standard
4071 \begin_layout Quotation
4078 \begin_layout Standard
4090 \begin_layout Quotation
4096 \begin_layout Quotation
4097 hungarian umlaut (hug)
4102 \begin_layout Quotation
4108 \begin_layout Quotation
4115 \begin_layout Standard
4127 \begin_layout Standard
4128 Since in many international keyboards there are exceptions to what some
4129 dead keys should do, you can define them using
4132 \begin_layout Quotation
4141 deadkey key outstring
4144 \begin_layout Standard
4145 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
4149 \begin_layout Quotation
4163 \begin_layout Standard
4164 to make it work correctly.
4165 Also, you have to define as exceptions dead keys over i and j, to remove
4166 the dot from them before inserting an accent mark.
4167 I will change this when the time comes, but so far I haven't had time.
4170 \begin_layout Standard
4171 Oh, and about characters: backslash is escaped, so to enter it, you'll need
4177 have different meaning.
4182 marks comments, quotes start and end LaTeX-style commands.
4183 To enter quote, you'll need to use
4202 \begin_layout Standard
4203 If you make a keyboard description file that works for your language, please
4204 mail it to me, so I can include it in the next keymap distribution.
4207 \begin_layout Standard
4208 More keywords will be supported in keymap configuration file in future,
4212 \begin_layout Itemize
4230 \begin_layout Itemize
4245 an external keymap translation program
4248 \begin_layout Standard
4249 Also, it should look into
4253 file for defaults, too (for example, a
4259 option to include default keyboard).
4262 \begin_layout Section
4263 International Keymap Stuff
4264 \begin_inset CommandInset label
4273 \begin_layout Standard
4274 The next two sections describe the
4286 file syntax in detail.
4287 These sections should help you design your own key map if the ones provided
4288 do not meet your needs.
4291 \begin_layout Subsection
4295 \begin_layout Standard
4304 file maps keystrokes to characters or strings.
4305 As the name suggests it sets a keyboard mapping.
4330 are described in this section.
4334 \labelwidthstring 00.00.0000
4341 Map a character to a string
4344 \begin_layout LyX-Code
4359 \begin_layout Standard
4392 the double-quote (")
4409 must be escaped with a preceding backslash (
4420 \begin_layout Standard
4427 statement to cause the symbol
4433 to be output for the keystroke
4442 \begin_layout LyX-Code
4449 \labelwidthstring 00.00.0000
4456 Specify an accent character
4459 \begin_layout LyX-Code
4468 \begin_layout Standard
4469 This will make the cha
4507 This is the dead key
4511 \begin_layout Standard
4518 refers to a key that does not produce a character by itself, but when followed
4519 with another key, produces the desired accent character.
4520 For example, a German characte
4522 r with an umlaut like
4532 can be produced in this manner.
4541 \begin_layout Standard
4554 and then another key not in
4571 followed by the other, unallowed key, as output.
4580 cancels a dead key, so if
4597 , the cursor will not go one position backwards but will instead cancel
4614 might have had on the next keystroke.
4618 \begin_layout Standard
4619 The following example specifies that the character ' is to be an acute accent,
4620 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4623 \begin_layout LyX-Code
4626 kmod ' acute aeiouAEIOU
4630 \labelwidthstring 00.00.0000
4635 Specify an exception to the accent character
4638 \begin_layout LyX-Code
4647 \begin_layout Standard
4648 This defines an exce
4689 have been assigned a keystroke with a previous
4712 must not belong in the
4764 If such a declaration does not exist in
4820 \begin_layout Standard
4821 The following command produces causes äi to be produced when you enter acute-i
4825 \begin_layout LyX-Code
4840 \labelwidthstring 00.00.0000
4845 Combine two accent characters
4848 \begin_layout LyX-Code
4854 accent1 accent2 allowed
4857 \begin_layout Standard
4858 This one is getting pretty esoteric.
4859 It allows you to combine the effect
4940 \begin_layout Standard
4941 Consider this example from the
4950 \begin_layout LyX-Code
4953 kmod ; acute aeioyvhAEIOYVH
4957 kcomb acute umlaut iyIY
4960 \begin_layout Standard
4961 This allows you to press
4967 and get the effect of
4984 in this case cancels the last dead key, so if you press
5001 \begin_layout Subsection
5005 \begin_layout Standard
5012 mapping is performed, a
5019 file maps the strings that the symbols generate to characters in the current
5021 The LyX distribution currently includes at least the
5036 \begin_layout Standard
5043 file is a sequence of declarations of the form
5046 \begin_layout LyX-Code
5059 \begin_layout Standard
5060 For example, in order to map
5068 to the corresponding character in the iso-8859-1 set (233), the following
5072 \begin_layout LyX-Code
5080 \begin_layout Standard
5103 the same character can apply to more than one string.
5114 \begin_layout LyX-Code
5140 \begin_layout Standard
5141 If LyX cannot find a mapping for the string produced by the keystroke or
5142 a deadkey sequence, it will check if it looks like an accented char and
5143 try to draw an accent over the character on screen.
5146 \begin_layout Subsection
5150 \begin_layout Standard
5151 There is a second way to add support for international characters through
5152 so-called dead-keys.
5153 A dead-key works in combination with a letter to produce an accented character.
5154 Here, we'll explain how to create a really simple dead-key to illustrate
5158 \begin_layout Standard
5159 Suppose you happen to need the circumflex character,
5160 \begin_inset Quotes eld
5164 \begin_inset Quotes erd
5172 -key [a.k.a.\InsetSpace ~
5177 ] to the LyX command
5186 Now, whenever you type the
5190 -key followed by a letter, that letter will have a circumflex accent on
5192 For example, the sequence
5193 \begin_inset Quotes eld
5201 \begin_inset Quotes erd
5204 produces the letter:
5205 \begin_inset Quotes eld
5209 \begin_inset Quotes erd
5213 If you tried to type
5214 \begin_inset Quotes eld
5222 \begin_inset Quotes erd
5225 , however, LyX will complain with a beep, since a
5226 \begin_inset Quotes eld
5234 \begin_inset Quotes erd
5237 never takes a circumflex accent.
5242 after a dead-key produces the bare-accent.
5243 Please note this last point! If you bind a key to a dead-key, you'll need
5244 to rebind the character on that key to yet another key.
5249 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5252 \begin_layout Standard
5253 One common way to bind dead-keys is to use
5265 in combination with an accent, like
5266 \begin_inset Quotes eld
5274 \begin_inset Quotes erd
5278 \begin_inset Quotes eld
5286 \begin_inset Quotes erd
5290 \begin_inset Quotes eld
5298 \begin_inset Quotes erd
5302 Another way involves using
5310 [remember them from section?] to set up the special
5319 acts in some ways just like
5323 and permits you to bind keys to accented characters.
5324 You can also turn keys into dead-keys by binding them to something like
5329 and then binding this symbolic key to the corresponding LyX command.
5333 \begin_layout Standard
5338 : This is exactly what I do in my
5356 and a bunch of these
5357 \begin_inset Quotes eld
5365 \begin_inset Quotes erd
5368 symbolic keys bound such things as
5379 This is how I produce my accented characters.
5384 You can make just about anything into the
5392 keys, a spare function key, etc.
5393 As for the LyX commands that produce accents, check the entry for
5402 You'll find the complete list there.
5405 \begin_layout Subsection
5406 Saving your Language Configuration
5409 \begin_layout Standard
5410 \begin_inset CommandInset label
5416 You can edit your preferences so that your desired language environment
5417 is automatically configured when LyX starts up, via the
5422 dit\SpecialChar \menuseparator
5432 \begin_layout Chapter
5433 Installing New Document Classes, Layouts, and Templates
5434 \begin_inset CommandInset label
5436 name "chap:textclass"
5444 \begin_layout Standard
5445 Installing New Document Classes
5453 \begin_layout Standard
5454 In this chapter, we describe the procedures for creating and installing
5455 new LyX layout and template files, as well as offer a refresher on correctly
5456 installing new LaTeX document classes.
5457 Some definitions: a document class is a LaTeX file (usually ending in
5465 ) which describes the format of a document such as an article, report, journal
5467 and all the commands needed to realize that format.
5468 A layout file is a LyX file which corresponds to a LaTeX document class
5469 and which tells LyX how to
5470 \begin_inset Quotes eld
5474 \begin_inset Quotes erd
5477 things on the screen to make the display look something like the final
5479 More precisely, a layout file describes a
5480 \begin_inset Quotes eld
5484 \begin_inset Quotes erd
5487 which is the internal construct LyX uses to render the screen display.
5489 \begin_inset Quotes eld
5493 \begin_inset Quotes erd
5497 \begin_inset Quotes eld
5501 \begin_inset Quotes erd
5504 can be used somewhat interchangeably, but it is better to refer to the
5505 file as the layout, and the thing living in LyX's memory as the text class.
5506 A template file is simply a LyX document which contains a set of predefined
5507 entries for a given document class which are generally required for that
5509 Templates are especially useful for things like journal manuscripts which
5510 are to be submitted electronically.
5513 \begin_layout Section
5514 Installing a new LaTeX package
5517 \begin_layout Standard
5518 Some installations may not include a LaTeX package that you would like to
5520 For example, you might need FoilTeX, a common (and very powerful) package
5521 for preparing slides or viewgraphs for overhead projectors.
5522 Here are the formal steps involved in getting the package up and running
5523 if you are using teTeX or some other web2c based distribution.
5527 \begin_layout Enumerate
5528 Get the package from CTAN or wherever.
5532 \begin_layout Standard
5535 Inventory of your LaTeX configuration
5537 manual for details of what CTAN is and where supported document classes
5546 \begin_layout Enumerate
5551 (this usually lives in the directory
5555 , though you can run
5560 It describes how to add a local
5564 directory; follow the instructions.
5565 You need to insert the name of your local
5578 is a logical place to install software that did not come with your distribution
5584 Usually, you will have to modify only two things:
5588 \begin_layout Enumerate
5593 to the directory you chose; e.g.
5598 TEXMFLOCAL = /usr/local/texmf
5601 \begin_layout Enumerate
5615 TEXMF = {$HOMETEXMF,!!$TEXMFLOCAL,!!$TEXMFMAIN}
5619 \begin_layout Enumerate
5630 You must follow the directory structure of your existing
5634 directory (for example, latex packages should go under
5636 /usr/local/texmf/tex/latex/
5641 \begin_layout Enumerate
5642 Install the package.
5643 For example, you would unpack the FoilTeX tarball and create
5645 /usr/local/texmf/tex/latex/foiltex
5652 directory contains various files.
5655 \begin_layout Enumerate
5663 /usr/local/texmf/ls-R
5668 \begin_layout Enumerate
5669 From within LyX, do:
5674 ools\SpecialChar \menuseparator
5685 \begin_layout Standard
5686 Now you should see your new package---for example
5695 ayout\SpecialChar \menuseparator
5710 Note that there are simpler ways of installing packages: you can add a
5711 link to the new package directory in the system LaTeX directory (
5715 , don't forget to then run
5719 ), or sometimes simply set the
5723 environment variable to include the new package.
5724 However, the formal procedure described in
5728 is guaranteed to work, so you should follow it unless circumstances absolutely
5729 prevent it: such as, when you don't have superuser access.
5732 \begin_layout Section
5733 \begin_inset CommandInset label
5742 \begin_layout Standard
5743 This section describes how to write and install your own LyX layout files
5744 (also known as text classes) and walks through the
5748 text class format as an example.
5753 files describe what paragraph styles are available for a given document
5754 class and how LyX should display them.
5755 We try to provide a thorough description of the process here; however,
5756 there are so many different types of documents supported by LaTeX classes
5757 that we can't hope to cover every different possibility or problem you
5759 (The LyX users' list is frequented by people with lots of experience with
5760 layout design who are willing to share what they've learned.)
5763 \begin_layout Standard
5764 As you prepare to write a new layout, it is extremely helpful to look at
5765 the example layouts distributed with LyX.
5766 If you use a nice LaTeX document class that might be of interest for others,
5767 too, and have a nice corresponding LyX layout, feel free to contribute
5768 the stuff to us, so we may put it into the distribution.
5769 There is also a section on the LyX wiki for this kind of material.
5772 \begin_layout Standard
5773 All the tags described in this chapter are case-insensitive; this means
5786 are really the same command.
5787 The possible values are printed in brackets after the feature's name.
5788 The default value if a feature isn't specified inside a text class-description
5796 If the argument has a datatype like
5797 \begin_inset Quotes eld
5801 \begin_inset Quotes erd
5805 \begin_inset Quotes eld
5809 \begin_inset Quotes erd
5812 , the default is shown like this:
5822 \begin_layout Subsection
5826 \begin_layout Standard
5827 Similar to layout files, and new with LyX 1.6, are layout
5832 Modules are to LaTeX packages much as layouts are to LaTeX classes, and
5833 some modules---such as the URL module---provide support for just such a
5835 In a sense, layout modules are similar to included files---files like stdsectio
5836 ns.inc---in that modules are not specific to a given document layout but
5837 may be used with many different layouts.
5838 The difference is that using a layout module does not require editing the
5840 Rather, modules are selected in the
5845 ocument\SpecialChar \menuseparator
5855 \begin_layout Standard
5856 Building modules is the easiest way to get started with layout editing,
5857 since it can be as simple as adding a single new paragraph or flex inset.
5858 But modules may, in principle, contain anything a layout file can contain.
5861 \begin_layout Standard
5862 A module must begin with a line like the following:
5865 \begin_layout LyX-Code
5868 DeclareLyXModule[url.sty]{Adds a character style for the
5873 \begin_layout Standard
5874 The argument in square brackets is optional: It declares any LaTeX packages
5875 on which the module depends.
5876 The two mandatory arguments, in curly brackets, are a short description
5877 of the module and the name of the module, as they should appear in
5879 Document\SpecialChar \menuseparator
5886 \begin_layout Standard
5887 After creating a new module, you will need to reconfigure and then restart
5888 LyX for it to appear in the menu.
5889 However, changes you make to the module will be seen immediately, if you
5892 Document\SpecialChar \menuseparator
5895 , make some change (or even just highlight something), and then hit
5896 \begin_inset Quotes eld
5900 \begin_inset Quotes erd
5904 It is strongly recommended that you save your work before doing so.
5905 It is, in fact, strongly recommended that you not attempt to create or
5906 edit modules while simultaneously working on documents.
5907 Though of course the developers strive to keep LyX stable in such situations,
5908 syntax errors and the like in your module file could cause strange behavior.
5911 \begin_layout Subsection
5912 Supporting new document classes
5915 \begin_layout Standard
5916 There are two situations you are likely to encounter when wanting to support
5917 a new LaTeX document class, involving LaTeX2e class (
5926 Supporting a style file is usually fairly easy.
5927 Supporting a new document class is a bit harder.
5930 \begin_layout Subsection
5938 \begin_layout Standard
5939 If your new document class is provided as a style file that is used in conjuncti
5940 on with an existing, supported document class---for the sake of the example,
5941 we'll assume that the style file is called
5945 and it is meant to be used with
5949 , which is a standard class---start by copying the existing class's layout
5950 file into your local directory:
5953 \begin_layout LyX-Code
5954 cp report.layout ~/.lyx/layouts/myclass.layout
5957 \begin_layout Standard
5962 and change the line:
5965 \begin_layout LyX-Code
5968 DeclareLaTeXClass{report}
5971 \begin_layout Standard
5975 \begin_layout LyX-Code
5978 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
5981 \begin_layout Standard
5985 \begin_layout LyX-Code
5995 \begin_layout Standard
5996 near the top of the file.
5999 \begin_layout Standard
6000 Start LyX and select
6005 ools\SpecialChar \menuseparator
6013 Then restart LyX and try creating a new document.
6018 " as a document class option in the
6023 ocument\SpecialChar \menuseparator
6031 It is likely that some of the sectioning commands and such in your new
6032 class will work differently from how they worked in the base class---
6036 in this example---so you can fiddle around with the settings for the different
6037 sections if you wish.
6038 See below for more discussion on this.
6041 \begin_layout Subsection
6049 \begin_layout Standard
6050 There are two possibilities here.
6051 One is that the class file is itself based upon an existing document class.
6052 For example, many thesis classes are based upon
6057 To see whether yours is, look for a line like
6060 \begin_layout LyX-Code
6066 \begin_layout Standard
6068 If so, then you may proceed largely as in the previous section, though
6069 the DeclareLaTeXClass line will be different.
6070 If your new class is thesis, and it is based upon book, then the line should
6074 \begin_layout LyX-Code
6077 DeclareLaTeXClass[myclass, book]{thesis}
6080 \begin_layout Standard
6081 If, on the other hand, the new class is not based upon an existing class,
6082 you will probably have to
6083 \begin_inset Quotes eld
6087 \begin_inset Quotes erd
6091 We strongly suggest copying an existing layout file which uses a similar
6092 LaTeX class and then modifying it, if you can do so.
6093 At least use an existing file as a starting point so you can find out what
6094 items you need to worry about.
6095 Again, the specifics are covered below.
6098 \begin_layout Section
6099 Declaring a new text class
6102 \begin_layout Standard
6103 When it's finally time to get your hands dirty and create or edit your own
6104 layout file, the following sections describe what you're up against.
6105 Our advice is to go slowly, save and test often, listen to soothing music,
6106 and enjoy one or two of your favorite adult beverages; more if you are
6107 getting particularly stuck.
6108 It's really not that hard, except that the multitude of options can become
6109 overwhelming if you try to do to much in one sitting.
6110 Go have another adult beverage, just for good measure.
6113 \begin_layout Standard
6117 \begin_layout Standard
6118 Lines in a layout file which begin with a
6123 There is one exception to this rule: all layouts should begin with lines
6127 \begin_layout LyX-Code
6130 #% Do not delete the line below; configure depends on this
6133 \begin_layout LyX-Code
6138 DeclareLaTeXClass{article}
6141 \begin_layout Standard
6142 The second line is used when you configure LyX.
6143 The layout file is read by the LaTeX script
6147 , in a special mode where
6152 The first line is just a LaTeX comment, and the second one contains the
6153 declaration of the text class.
6154 If these lines appear in a file named
6158 , then they define a text class of name
6162 (the name of the layout file) which uses the LaTeX document class
6166 (the default is to use the same name as the layout).
6168 \begin_inset Quotes eld
6172 \begin_inset Quotes erd
6175 that appears above is used as a description of the text class in the
6180 ocument\SpecialChar \menuseparator
6190 \begin_layout Standard
6191 Let's assume that you wrote your own text class that uses the
6195 documentclass, but where you changed the appearance of the section headings.
6196 If you put it in a file
6200 , the header of this file should be:
6203 \begin_layout LyX-Code
6206 #% Do not delete the line below; configure depends on this
6209 \begin_layout LyX-Code
6214 DeclareLaTeXClass[article]{article (with my own headings)}
6217 \begin_layout Standard
6218 This declares a text class
6222 , associated with the LaTeX document class
6227 \begin_inset Quotes eld
6230 article (with my own headings)
6231 \begin_inset Quotes erd
6235 If your text class depends on several packages, you can declare it as:
6238 \begin_layout LyX-Code
6241 #% Do not delete the line below; configure depends on this
6244 \begin_layout LyX-Code
6249 DeclareLaTeXClass[article,foo.sty]{article (with my own headings)}
6252 \begin_layout Standard
6253 This indicates that your text class uses the foo.sty package.
6254 Finally, it is also possible to declare classes for DocBook code.
6255 Typical declarations will look like
6258 \begin_layout LyX-Code
6261 #% Do not delete the line below; configure depends on this
6264 \begin_layout LyX-Code
6269 DeclareDocBookClass[article]{SGML (DocBook article)}
6272 \begin_layout Standard
6273 Note that these declarations can also be given an optional parameter declaring
6274 the name of the document class (but not a list).
6277 \begin_layout Standard
6278 When the text class has been modified to your taste, all you have to do
6279 is to copy it either in
6292 ools\SpecialChar \menuseparator
6300 Exit LyX and restart it; then your new text class should be available along
6304 \begin_layout Standard
6305 In versions of LyX prior to 1.6, you had to restart LyX to see any changes
6306 you made to your layout files.
6307 As a result, editing layout files could be very time consuming.
6308 Beginning with 1.6, however, you can force a reload of the layout currently
6309 in use by using the LyX function
6314 There is no default binding for this function---though, of course, you
6315 can bind it to a key yourself (see section
6316 \begin_inset CommandInset ref
6318 reference "sec:bindings"
6323 You should simply enter this command in the mini-buffer.
6328 : This is very much an `advanced feature'.
6333 recommended that you save your work before using this function.
6338 recommended that you not attempt to edit your layout while simultaneously
6339 working on a document that you care about.
6340 Use a test document.
6341 Syntax errors and the like in your layout file could cause peculiar behavior.
6342 In particular, such errors could cause LyX to regard the current layout
6343 as invalid and to attempt to switch to some other layout.
6344 The LyX team strives to keep LyX stable in such situations, but safe is
6348 \begin_layout Subsection
6352 \begin_layout Standard
6353 The first non-comment line must contain the file format number:
6356 \begin_layout Description
6367 ] This tag was introduced with LyX 1.4.0 (layout files of LyX 1.3.x and earlier
6368 don't have an explicit file format).
6369 The file format that is documented here is
6376 \begin_layout Subsection
6377 General text class parameters
6380 \begin_layout Standard
6381 These are the general parameters which describe the form of the entire document:
6384 \begin_layout Standard
6388 \begin_layout Standard
6400 \begin_layout Description
6414 ] Whether the class-default should have one or two columns.
6415 Can be changed in the
6420 ocument\SpecialChar \menuseparator
6428 This setting (same goes for
6432 , too) is important: if your text class has two columns by default but you
6433 forget to set it correctly, the
6441 be output when you select
6450 ocument\SpecialChar \menuseparator
6458 \begin_layout Description
6472 ] Whether the class-default should be printing on one or both sides of the
6474 Can be changed in the
6479 ocument\SpecialChar \menuseparator
6489 \begin_layout Description
6503 ] The class default pagestyle.
6504 Can be changed in the
6509 ocument\SpecialChar \menuseparator
6519 \begin_layout Description
6523 ClassOptions\SpecialChar \ldots{}
6527 This section describes various global options supported by the document
6529 See Section\InsetSpace ~
6531 \begin_inset CommandInset ref
6533 reference "sec:classoptions"
6540 \begin_layout Description
6558 ] Whether the class already provides the feature
6563 A feature is in general the name of a package (amsmath, makeidx, \SpecialChar \ldots{}
6565 macro (url, boldsymbol,\SpecialChar \ldots{}
6566 ); the complete list of supported features is unfortunat
6570 \begin_layout Description
6577 This is used to describe the default font of the document.
6578 See Section\InsetSpace ~
6580 \begin_inset CommandInset ref
6582 reference "sec:fonts"
6589 \begin_layout Description
6600 ] This is the style that will be assigned to new paragraphs, usually
6605 This will default to the first defined style if not given, but you are
6606 highly encouraged to use this directive.
6609 \begin_layout Description
6626 ] Indicates what kind of markup is used to define the title of a document.
6631 means that the macro with name
6635 will be inserted after the last layout which has
6636 \begin_inset Quotes eld
6644 \begin_inset Quotes erd
6652 corresponds to the case where the block of paragraphs which have
6653 \begin_inset Quotes eld
6661 \begin_inset Quotes erd
6664 should be enclosed into the
6673 \begin_layout Description
6684 ] The name of the command/environment mentionned above.
6687 \begin_layout Description
6691 Preamble\SpecialChar \ldots{}
6695 A set of macro definitions that will be output at the beginning of the
6697 Use this for global definitions.
6700 \begin_layout Description
6707 As its name implies, this command allows you to include another layout
6708 definition file within yours to avoid duplicating commands.
6709 Common examples are the standard layout files, for example,
6713 , which contains most of the basic layouts.
6716 \begin_layout Description
6720 Style\SpecialChar \ldots{}
6724 This sequence defines a new style.
6725 If the style already exists, it will redefine some of its parameters instead.
6726 See Section\InsetSpace ~
6728 \begin_inset CommandInset ref
6730 reference "sec:style"
6737 \begin_layout Description
6744 This command deletes an existing style.
6745 This is particularly useful when you want to suppress a style that has
6746 be defined in an input file.
6749 \begin_layout Description
6753 Float\SpecialChar \ldots{}
6757 This sequence defines a new float.
6758 See Section\InsetSpace ~
6760 \begin_inset CommandInset ref
6762 reference "sec:floats"
6769 \begin_layout Description
6776 This command deletes an existing float.
6777 This is particularly useful when you want to suppress a float that has
6778 be defined in an input file.
6781 \begin_layout Description
6785 InsetLayout\SpecialChar \ldots{}
6789 This section (re-)defines the layout of an inset.
6790 It can be applied to an existing inset of to a new, user-defined inset,
6791 e.g., a new character style.
6792 See Section\InsetSpace ~
6794 \begin_inset CommandInset ref
6796 reference "sec:charstyle"
6803 \begin_layout Description
6807 Counter\SpecialChar \ldots{}
6811 This sequence defines a new counter.
6812 See Section\InsetSpace ~
6814 \begin_inset CommandInset ref
6816 reference "sec:counter"
6823 \begin_layout Standard
6827 \begin_layout Standard
6839 \begin_layout Subsection
6847 \begin_layout Standard
6848 \begin_inset CommandInset label
6850 name "sec:classoptions"
6858 section can contain the following entries:
6861 \begin_layout Description
6872 ] The list of available font sizes for the document's main font, separated
6874 \begin_inset Quotes eld
6882 \begin_inset Quotes erd
6888 \begin_layout Description
6897 string="empty|plain|headings|fancy"
6899 ] The list of available page styles, separated by
6900 \begin_inset Quotes eld
6908 \begin_inset Quotes erd
6914 \begin_layout Description
6925 ] Some document class options, separated by a comma, that will be added
6926 to the optional part of the
6935 \begin_layout Subsection
6936 Specific Paragraph Layouts
6939 \begin_layout Standard
6940 \begin_inset CommandInset label
6946 A paragraph layout description looks like this
6950 \begin_layout Standard
6951 Note that this will either define a new layout or modify an existing one.
6959 \begin_layout LyX-Code
6966 \begin_layout LyX-Code
6970 \begin_layout LyX-Code
6974 \begin_layout Standard
6975 where the following commands are allowed:
6978 \begin_layout Standard
6982 \begin_layout Standard
6994 \begin_layout Description
7005 This is used to copy all the features of an existing layout into the current
7010 \begin_layout Description
7022 , Command, Environment, Item_Environment,
7028 ] How the layout should be translated into LaTeX.
7033 means nothing special.
7046 {\SpecialChar \ldots{}
7061 }\SpecialChar \ldots{}
7085 is generated for each paragraph of this environment.
7098 is passed as an argument to the environment.
7103 can be defined in the
7108 ayout\SpecialChar \menuseparator
7122 is perhaps a bit misleading, since these rules apply to SGML classes, too.
7123 Visit the SGML class files for specific examples.
7126 \begin_layout Description
7137 If 1, marks the layout as being part of a title block (see also the
7148 \begin_layout Description
7155 The name of the corresponding LaTeX stuff.
7156 Either the environment or command name.
7159 \begin_layout Description
7166 The optional parameter for the corresponding
7173 This parameter cannot be changed from within LyX.
7176 \begin_layout Description
7187 ] The number of optional arguments that can be used with this layout.
7188 This is useful for things like section headings, and only makes sense with
7192 \begin_layout Description
7204 , Manual, Dynamic, First_Dynamic, Right_Address_Box
7208 The kind of margin that the layout has on the left side.
7213 just means a fixed margin.
7218 means that the left margin depends on the string entered in the
7223 dit\SpecialChar \menuseparator
7228 aragraph\InsetSpace ~
7232 This is used to typeset nice lists without tabulators.
7237 means that the margin depends on the size of the label.
7238 This is used for automatic enumerated headlines.
7239 It is obvious that the headline
7240 \begin_inset Quotes eld
7243 5.4.3.2.1 Very long headline
7244 \begin_inset Quotes erd
7247 must have a wider left margin (as wide as
7248 \begin_inset Quotes eld
7252 \begin_inset Quotes erd
7255 plus the space) than
7256 \begin_inset Quotes eld
7259 3.2 Very long headline
7260 \begin_inset Quotes erd
7263 , even if other word processors are not able to do this.
7268 is similar, but only the very first row of the paragraph is dynamic, while
7269 the others are static; this is used, for example, for descriptions.
7274 means the margin is chosen in a way that the longest row of this paragraph
7275 fits to the right margin.
7276 This is used to typeset an address on the right edge of the page.
7279 \begin_layout Description
7296 ] Whether the following Paragraph is allowed to indent its very first row.
7301 means that it is not allowed to do so,
7305 means it could do so if it wants to.
7308 \begin_layout Description
7319 ] The indent of the very first line of a paragraph.
7320 The argument is passed as a string.
7325 means that the paragraph is indented with the width of
7334 You can get a negative width by prefixing the string with
7339 This way was chosen so that the look is the same with each used screen
7345 will be fixed for a certain layout.
7346 The exception is Standard layout, since the indentation of a Standard layout
7347 paragraph can be prohibited with
7352 Also, Standard layout paragraphs inside environments use the
7356 of the environment, not their native one.
7357 For example, Standard paragraphs inside an enumeration are not indented.
7360 \begin_layout Description
7371 ] LyX allows to choose either
7372 \begin_inset Quotes eld
7376 \begin_inset Quotes erd
7380 \begin_inset Quotes eld
7384 \begin_inset Quotes erd
7387 to typeset a document.
7389 \begin_inset Quotes eld
7393 \begin_inset Quotes erd
7396 is chosen, this value is completely ignored.
7398 \begin_inset Quotes eld
7402 \begin_inset Quotes erd
7405 is chosen, the parindent of a LaTeXtype
7406 \begin_inset Quotes eld
7410 \begin_inset Quotes erd
7413 layout is ignored and all paragraphs are additionally separated by this
7415 The vertical space is calculated with
7417 value*DefaultHeight()
7423 is the height of a row with the normal font.
7424 This way, the look stays the same with different screen fonts.
7427 \begin_layout Description
7438 ] The vertical space with which the very first of a chain of paragraphs
7439 with this layout is separated from the previous paragraph.
7440 If the previous paragraph has another layout, the separations are not simply
7441 added, but the maximum is taken.
7444 \begin_layout Description
7459 for the very last paragraph.
7462 \begin_layout Description
7473 ] The vertical space between two paragraphs of this layout.
7476 \begin_layout Description
7487 ] This is an extra space between the paragraphs of an environment layout.
7488 If you put other layouts into an environment, each is separated with the
7494 But the whole items of the environment are additionally separated with
7503 \begin_layout Description
7514 ] If you put layouts into environments, the leftmargins are not simply added,
7515 but added with a factor
7516 \begin_inset Formula $\frac{4}{depth+4}$
7520 Note that this parameter is also used when the border is defined as
7529 Then it is added to the manual or dynamic border.
7530 This string has the same meaning as for
7537 \begin_layout Description
7555 \begin_layout Description
7567 , Manual, Static, Top_Environment,
7569 Centered_Top_Environment, Sensitive,
7578 means the label is the very first word (up to the first real blank).
7583 means it is defined in the layout (see
7594 Centered_Top_Environment
7596 are special cases of
7601 The label will be printed above the paragraph, but only at the top of an
7602 environment or the top of a chain of paragraphs with this layout.
7603 Usage is for example the
7612 This is also the case for
7616 labels with latex type
7620 , in order to make layouts for theorems work correctly.
7625 is a special case for the caption-labels
7626 \begin_inset Quotes eld
7630 \begin_inset Quotes erd
7634 \begin_inset Quotes eld
7638 \begin_inset Quotes erd
7646 means the (hardcoded) label string depends on the kind of float.
7651 label type defines automatically numbered labels.
7654 \begin_layout Description
7667 The name of the counter for automatic numbering (see Section\InsetSpace ~
7669 \begin_inset CommandInset ref
7671 reference "sec:counter"
7676 This must be given if
7689 \begin_layout Description
7700 ] The horizontal space between the label and the text body.
7701 Only used for labels that are not above the text body.
7704 \begin_layout Description
7711 [float=0] The vertical space between the label and the text body.
7712 Only used for labels that are above the text body (
7718 Centered_Top_Environment
7723 \begin_layout Description
7734 ] The string used for a label with a
7743 this string is also used as a suggestion for the
7747 that can be set in the
7752 dit\SpecialChar \menuseparator
7757 aragraph\InsetSpace ~
7767 is set, this string can be contain the special formatting commands described
7768 in Section\InsetSpace ~
7770 \begin_inset CommandInset ref
7772 reference "sec:counter"
7777 For the sake of backwards compatibility, the string
7785 will be replaced by the expanded
7796 This feature is now obsolete and should be replaced by the mechanisms of
7797 Section\InsetSpace ~
7799 \begin_inset CommandInset ref
7801 reference "sec:counter"
7808 \begin_layout Description
7819 ] This is used inside the appendix instead of
7840 \begin_layout Description
7847 The level of the style in the table of contents.
7848 This is used for automatic numbering of section headings.
7851 \begin_layout Description
7863 , Box, Filled_Box, Static
7865 ] The type of label that stands at the end of the paragraph (or sequence
7888 \begin_inset Quotes eld
7892 \begin_inset Quotes erd
7904 ) is a white (resp.\InsetSpace ~
7905 black) square suitable for end of proof markers,
7909 is an explicit text string.
7912 \begin_layout Description
7923 ] The string used for a label with a
7935 \begin_layout Description
7947 , left, right, center
7949 ] Paragraph alignment.
7952 \begin_layout Description
7964 , left, right, center
7971 Some LaTeX styles prohibit certain alignments, since those wouldn't make
7973 For example a right-aligned or centered enumeration isn't possible.
7976 \begin_layout Description
7990 ] With this parameter the
7995 \begin_inset Quotes eld
7998 Vertical space above
7999 \begin_inset Quotes erd
8007 dit\SpecialChar \menuseparator
8012 aragraph\InsetSpace ~
8015 dialog can be set when initializing a paragraph with this layout
8019 \begin_layout Standard
8022 Note from Jean-Marc:
8024 I'm not sure that this setting has much use, and it should probably be
8025 removed in later versions.
8034 \begin_layout Description
8055 \begin_layout Description
8069 ] Whether fragile commands in this layout should be
8078 \begin_layout Description
8095 ] Whether newlines are translated into LaTeX newlines (
8104 The translation can be switched off to allow more comfortable LaTeX editing
8108 \begin_layout Description
8122 ] Whether the contents of this paragraph should be output in raw form, meaning
8123 without special translations that LaTeX would require.
8124 This somehow replaces the older
8131 \begin_layout Description
8145 ] Usually LyX doesn't allow you to insert more than one space between words,
8146 since a space is considered as the separation between two words, not a
8147 character or symbol of its own.
8148 This is a very fine thing but sometimes annoying, for example when typing
8149 program code or plain LaTeX code.
8155 Note that LyX will create protected blanks for the additional blanks when
8156 in another mode than LaTeX-mode.
8159 \begin_layout Description
8173 ] Usually LyX does not allow you to leave a paragraph empty, since it would
8174 lead to empty LaTeX output.
8175 There are some cases where this could be desirable however: in a letter
8176 template, the required fields can be provided as empty fields, so that
8177 people do not forget them; in some special classes, a layout can be used
8178 as some kind of break, which does not contain actual text.
8181 \begin_layout Description
8193 , onehalf, double, other
8199 ] This defines what the default spacing should be in the layout.
8212 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
8213 If you specify the argument
8217 , then you should also provide a numerical argument which will be the actual
8219 Note that, contrary to other parameters,
8223 implies the generation of specific LaTeX code, using the package
8230 \begin_layout Description
8237 The font used for both the text body
8242 See section\InsetSpace ~
8244 \begin_inset CommandInset ref
8246 reference "sec:fonts"
8251 Note that defining this font automatically defines the
8258 \begin_layout Description
8265 The font used for the text body .
8266 See section\InsetSpace ~
8268 \begin_inset CommandInset ref
8270 reference "sec:fonts"
8277 \begin_layout Description
8284 The font used for the label.
8285 See section\InsetSpace ~
8287 \begin_inset CommandInset ref
8289 reference "sec:fonts"
8296 \begin_layout Description
8300 Preamble\SpecialChar \ldots{}
8304 A set of macro definitions that will be output at the beginning of the
8305 LaTeX files when the layout is used.
8306 Use this to define the macros needed by this particular layout.
8309 \begin_layout Description
8316 the name of a style which preamble should be output
8320 the one mentionned above.
8321 This allows to ensure some ordering of the preamble snippets when macros
8322 definitions depend on one another
8326 \begin_layout Standard
8327 Note that, besides that functionality, there is no way to ensure any ordering
8329 The ordering that you see in a given version of LyX may change without
8330 warning in later versions.
8338 \begin_layout Standard
8342 \begin_layout Standard
8354 \begin_layout Subsection
8358 \begin_layout Standard
8359 \begin_inset CommandInset label
8365 Since version 1.3.0 of LyX, it is necessary to define the floats (
8373 , \SpecialChar \ldots{}
8374 ) in the text class itself.
8375 If you are looking here to learn how to upgrade an existing text class,
8376 it will probably turn out that all you have to do is to add
8379 \begin_layout LyX-Code
8383 \begin_layout Standard
8384 at a reasonable location of the text class.
8388 \begin_layout Standard
8389 Don't forget to also have a look at counters in next section.
8394 If you want to implement a text class that proposes some other float types
8395 (like the AGU class bundled with LyX), the information below will hopefully
8399 \begin_layout Description
8411 \begin_inset Quotes erd
8415 \begin_inset Quotes erd
8419 \begin_inset Quotes eld
8423 \begin_inset Quotes erd
8426 of the new class of floats, like program or algorithm.
8427 After the appropriate
8448 \begin_layout Description
8460 \begin_inset Quotes erd
8464 \begin_inset Quotes erd
8467 ] The string that will be used in the menus and also for the caption.
8470 \begin_layout Description
8491 if the float is already defined by the documentclass.
8496 , the float will be defined using the LaTeX package
8503 \begin_layout Description
8515 \begin_inset Quotes erd
8519 \begin_inset Quotes erd
8522 ] This (optional) argument determines whether floats of this class will
8523 be numbered within some sectional unit of the document.
8524 For example, if within is equal to
8528 , the floats will be numbered within chapters.
8532 \begin_layout Description
8544 \begin_inset Quotes erd
8548 \begin_inset Quotes erd
8551 ] The style used when defining the float using
8560 \begin_layout Description
8572 \begin_inset Quotes erd
8576 \begin_inset Quotes erd
8579 ] The default placement for the given class of floats.
8580 They are like in standard LaTeX:
8596 for top, bottom, page, and here, respectively.
8600 \begin_layout Standard
8601 Note that the order of these letters in the string is irrelevant, like in
8607 On top of that there is a new type,
8611 , which does not really correspond to a float, since it means: put it
8612 \begin_inset Quotes eld
8616 \begin_inset Quotes erd
8620 Note, however that the
8624 specifier is special and, because of implementation details cannot be used
8625 in non-builtin float types.
8626 If you do not understand what this means, just use
8633 \begin_layout Description
8645 \begin_inset Quotes erd
8649 \begin_inset Quotes erd
8652 ] The file name extension of an auxiliary file for the list of figures (or
8654 LaTeX writes the captions to this file.
8657 \begin_layout Description
8669 \begin_inset Quotes erd
8673 \begin_inset Quotes erd
8676 ] The heading used for the list of floats.
8679 \begin_layout Standard
8680 Note that defining a float with type
8686 automatically defines the corresponding counter with name
8695 \begin_layout Subsection
8696 Inset layouts and Flex insets
8699 \begin_layout Standard
8700 \begin_inset CommandInset label
8702 name "sec:charstyle"
8706 You can define character styles since version 1.4.0 of LyX; since version
8707 1.6.0 these are called Flex insets.
8711 \begin_layout Standard
8712 Furthermore it is possible to define the general layout of many different
8714 Currently layout parameters can be defined for footnotes, marginal notes,
8715 note insets, ERT insets, branch insets, and Flex insets.
8716 The latter are definable from the user GUI and come in three different
8717 kinds: character style (
8725 ), and XML element (
8733 \begin_layout Standard
8738 definition starting line is of the form
8741 \begin_layout LyX-Code
8742 InsetLayout <Type> <Name>
8745 \begin_layout Standard
8749 \begin_layout Standard
8756 Foot, Margin, Note, Flex
8761 \begin_layout Standard
8766 can be empty (for foot- and marginal notes, branches and ERT) or one of
8784 Here, the second part of the name can be chosen freely (for CharStyle,
8785 Custom and Element), or from a predefined list (for Note).
8788 \begin_layout Standard
8793 section can contain the following entries:
8796 \begin_layout Description
8819 (indicating a dummy definition ending definitions of charstyles etc.).
8820 This entry is only meaningful for Flex (user definable) insets, the three
8821 types of which are CharStyle, Custom and Element.
8824 \begin_layout Description
8840 Minimalistic or Conglomerate
8843 , describing the rendering style used for the inset's frame and buttons.
8846 \begin_layout Description
8853 defines what will be displayed on the button or elsewhere as the inset
8855 Some inset types (ERT and Branch) modify this label on the fly.
8858 \begin_layout Description
8865 The font used for both the text body
8870 See section\InsetSpace ~
8872 \begin_inset CommandInset ref
8874 reference "sec:fonts"
8879 Note that defining this font automatically defines the
8886 \begin_layout Description
8893 The font used for the label.
8894 See section\InsetSpace ~
8896 \begin_inset CommandInset ref
8898 reference "sec:fonts"
8903 Note that this definition can never appear before
8907 , lest it be ineffective (see above)
8910 \begin_layout Description
8917 The name of the corresponding LaTeX stuff.
8918 Either the environment or command name.
8921 \begin_layout Description
8928 The optional parameter for the corresponding
8934 stuff, including possible bracket pairs like
8939 This parameter cannot be changed from within LyX.
8942 \begin_layout Description
8949 See section\InsetSpace ~
8951 \begin_inset CommandInset ref
8953 reference "sec:style"
8960 \begin_layout Description
8964 Preamble\SpecialChar \ldots{}
8968 See section\InsetSpace ~
8970 \begin_inset CommandInset ref
8972 reference "sec:style"
8979 \begin_layout Subsection
8983 \begin_layout Standard
8984 \begin_inset CommandInset label
8990 Since version 1.3.0 of LyX, it is necessary to define the counters (
8998 , \SpecialChar \ldots{}
8999 ) in the text class itself.
9000 If you are looking here to learn how to upgrade an existing text class,
9001 it will probably turn out that all you have to do is to add
9004 \begin_layout LyX-Code
9005 Input stdcounters.inc
9008 \begin_layout Standard
9009 The following parameters can be used:
9012 \begin_layout Description
9024 \begin_inset Quotes erd
9028 \begin_inset Quotes erd
9031 ] The name of the counter.
9034 \begin_layout Description
9046 \begin_inset Quotes erd
9050 \begin_inset Quotes erd
9053 ] If this is set to the name of another counter, the present counter will
9054 be reset everytime the other one is increased.
9066 \begin_layout Description
9070 LabelString [string=""]
9073 when this is defined, this string defines how the counter is displayed.
9074 Setting this value resets
9079 The following special constructs can be used in the string:
9083 \begin_layout Itemize
9090 will be replaced by the expansion of the
9103 If these are empty, a default value is constructed as follows: if the counter
9104 has a master counter
9116 is used; otherwise the string
9125 \begin_layout Itemize
9126 counter values can be expressed using LaTeX-like macros
9150 \begin_layout Description
9161 to arabic numerals, like 1, 2, 3\SpecialChar \ldots{}
9166 \begin_layout Standard
9176 Actually, the situation is a bit more complicated than that: any
9195 other than those descibed below will produce arabic numerals.
9196 It would not be surprising to see this change in the future.
9204 \begin_layout Description
9211 for lower-case letters: a, b, c, \SpecialChar \ldots{}
9215 \begin_layout Description
9222 for upper-case letters: A, B, C, \SpecialChar \ldots{}
9226 \begin_layout Description
9233 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
9237 \begin_layout Description
9244 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
9248 \begin_layout Description
9255 for hebrew numerals.
9260 \begin_layout Description
9264 LabelStringAppendix [string=""]
9271 , for use in appendix.
9274 \begin_layout Subsection
9278 \begin_layout Standard
9279 \begin_inset CommandInset label
9285 A font description looks like that:
9288 \begin_layout LyX-Code
9298 \begin_layout LyX-Code
9302 \begin_layout LyX-Code
9306 \begin_layout Standard
9307 and the following commands are available:
9310 \begin_layout Description
9327 \begin_layout Description
9344 \begin_layout Description
9356 , Italic, SmallCaps, Slanted
9361 \begin_layout Description
9377 , large, larger, largest, huge, giant
9382 \begin_layout Description
9394 , black, white, red, green, blue, cyan, magenta, yellow
9399 \begin_layout Subsection
9400 Upgrading old layout files
9403 \begin_layout Standard
9404 The file format of layout files changes from time to time, so old layout
9405 files need to be converted.
9406 This process has been automated in LyX 1.4.0: If LyX reads an old format
9407 layout file it will call the conversion tool
9409 $LyXDir/scripts/layout2layout.py
9411 and convert it to a temporary file in current format.
9412 The original file is left untouched, so that you can still use it with
9414 If you want to convert the layout file permanently, just call the converter
9418 \begin_layout LyX-Code
9419 python $LyXDir/scripts/layout2layout.py myclass.layout myclassnew.layout
9422 \begin_layout Standard
9434 \begin_layout Standard
9435 The automatic conversion does only handle syntax changes.
9436 It cannot handle the case where the contents of included files was changed.
9437 For example, layout files based on
9450 If you get error messages about undefined counters, try to convert your
9470 \begin_layout Section
9472 \begin_inset CommandInset label
9474 name "sec:templates"
9481 \begin_layout Standard
9482 Templates are created just like usual documents.
9483 The only difference is that usual documents contain all possible settings,
9484 including the fontscheme and the papersize.
9485 Usually a user doesn't want a template to overwrite his defaults in these
9487 For that reason, the designer of a template should remove the corresponding
9500 from the template LyX file.
9501 This can be done with any simple text-editor, for example
9513 \begin_layout Standard
9514 Put the edited template files you create in
9518 , copy the ones you use from the global template directory in
9522 to the same place, and redefine the template path in the
9527 dit\SpecialChar \menuseparator
9546 \begin_layout Standard
9547 Note that there is a template which has a particular meaning:
9552 This template is loaded everytime you create a new document with
9559 \SpecialChar \menuseparator
9567 in order to provide useful defaults.
9568 To create this template from inside LyX, all you have to do is to open
9569 a document with the correct settings, and use the
9575 e as Document Defaults
9580 \begin_layout Chapter
9581 Including External Material
9584 \begin_layout Section
9588 \begin_layout Standard
9589 \begin_inset Note Note
9592 \begin_layout Standard
9593 This section is completely outdated.
9598 One often requested feature from LyX users is to be able to interface LyX
9599 with Xfig, Dia, or other similar applications that specialize in producing
9600 a certain kind of diagram, figure, schematic or whatever material might
9601 be relevant to include in your document.
9602 Previously, it was only possible to include boring, static, fixed images
9603 in LyX documents with the graphics feature, but there are several limitations
9604 attached to this approach:
9607 \begin_layout Itemize
9608 If you want to change the figure, you have to invoke an external program
9612 \begin_layout Itemize
9613 LyX does not notice that the referenced files change, so the on-screen display
9614 can fast become obsolete, and this is aggravated by the lack of a means
9615 of updating the display
9618 \begin_layout Itemize
9619 The graphics stuff does not provide any mechanisms for coping with different
9620 exported formats such as DocBook, HTML or plain text
9623 \begin_layout Standard
9624 The external material facility attempts to solve all of these problems
9628 \begin_layout Standard
9629 Even if the graphics facility can't solve all problems, it is still valuable
9630 because it does provide in-line preview of the graphics, and supports advanced
9631 geometric transformations with a comfortable user interface.
9637 It does this by offering a general method to interface LyX to external
9639 Instead of introducing a long list of different constructs tailored for
9640 each specific application, we chose to sacrifice the in-line displaying
9641 of the included material in order to provide a general construct to cover
9642 a wide range of applications.
9643 The result is the external material construct.
9644 External material presents itself in the document simply as a button, but
9645 don't let this fool you.
9646 When you click on it, a dialog will appear that allows you to chose exactly
9647 what material to include, and in the following sections you will learn
9648 that this is indeed a powerful mechanism that can solve all of the above
9652 \begin_layout Section
9656 \begin_layout Standard
9657 The external material feature is based on the concept of a
9662 A template is a specification of how LyX should interface with a certain
9664 As bundled, LyX comes with predefined templates for Xfig figures, Dia diagrams,
9665 various raster format images, gnuplot, and more.
9666 You can check the actual list by using the menu
9668 Insert\SpecialChar \menuseparator
9669 File\SpecialChar \menuseparator
9678 Furthermore, it is possible to roll your own template to support a specific
9680 Later we'll describe in more detail what is involved, and hopefully you
9681 will submit all the templates you create so we can include them in a later
9685 \begin_layout Standard
9686 Another basic idea of the external material feature is to distinguish between
9687 the original file that serves as a base for final material and the produced
9688 file that is included in your exported or printed document.
9689 For example, consider the case of a figure produced with
9694 The Xfig application itself works on an original file with the
9699 Within XFig, you create and change your figure, and when you are done,
9705 When you want to include the figure in your document, you invoke
9709 in order to create a PostScript file that can readily be included in your
9715 file is the original file, and the PostScript file is the produced file.
9718 \begin_layout Standard
9719 This distinction is important in order to allow updating of the material
9720 while you are in the process of writing the document.
9721 Furthermore, it provides us with the flexibility that is needed to support
9722 multiple export formats.
9723 For instance, in the case of a plain text file, it is not exactly an award-winn
9724 ing idea to include the figure as raw PostScript.
9725 Instead, you'd either prefer to just include a reference to the figure,
9726 or try to invoke some graphics to Ascii converter to make the final result
9727 look similar to the real graphics.
9728 The external material management allows you to do this, because it is parameter
9729 ized on the different export formats that LyX supports.
9732 \begin_layout Standard
9733 Besides supporting the production of different products according to the
9734 exported format, it supports tight integration with editing and viewing
9736 In the case of an XFig figure, you are able to invoke
9740 on the original file with a single click from within the external material
9741 dialog in LyX, and also preview the produced PostScript file with
9746 No more fiddling around with the command line and/or file browsers to locate
9747 and manipulate the original or produced files.
9748 In this way, you are finally able to take full advantage of the many different
9749 applications that are relevant to use when you write your documents, and
9750 ultimately be more productive.
9753 \begin_layout Section
9754 External material dialog
9757 \begin_layout Standard
9762 dialog is described in the
9771 \begin_layout Section
9775 \begin_layout Standard
9776 In this section, we should include some examples of use of the external
9778 Those examples could include:
9781 \begin_layout Itemize
9782 External raster images
9785 \begin_layout Itemize
9786 External XFig figures
9789 \begin_layout Itemize
9793 \begin_layout Itemize
9797 \begin_layout Itemize
9798 The use of makefiles
9801 \begin_layout Itemize
9802 Recursive external LyX templates
9805 \begin_layout Section
9806 The external template configuration file
9809 \begin_layout Standard
9810 It is relatively easy to add custom external template definitions to LyX.
9811 However, be aware this doing this in an careless manner most probably
9815 introduce an easily exploitable security hole.
9816 So before you do this, please read the discussion about security which
9820 \begin_layout Standard
9821 Having said that, we encourage you to submit any interesting templates that
9826 \begin_layout Standard
9827 The external templates are defined in the
9829 lib/external_templates
9832 You can place your own version in
9834 .lyx/external_templates
9839 \begin_layout Standard
9840 A typical template looks like this:
9843 \begin_layout LyX-Code
9847 \begin_layout LyX-Code
9848 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
9851 \begin_layout LyX-Code
9855 \begin_layout LyX-Code
9859 \begin_layout LyX-Code
9863 \begin_layout LyX-Code
9867 \begin_layout LyX-Code
9871 \begin_layout LyX-Code
9872 AutomaticProduction true
9875 \begin_layout LyX-Code
9879 \begin_layout LyX-Code
9883 \begin_layout LyX-Code
9887 \begin_layout LyX-Code
9888 TransformCommand Rotate RotationLatexCommand
9891 \begin_layout LyX-Code
9892 TransformCommand Resize ResizeLatexCommand
9895 \begin_layout LyX-Code
9896 Product "$$RotateFront$$ResizeFront
9899 \begin_layout LyX-Code
9904 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
9907 \begin_layout LyX-Code
9908 $$ResizeBack$$RotateBack"
9911 \begin_layout LyX-Code
9915 \begin_layout LyX-Code
9916 UpdateResult "$$AbsPath$$Basename.pstex_t"
9919 \begin_layout LyX-Code
9920 Requirement "graphicx"
9923 \begin_layout LyX-Code
9924 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
9927 \begin_layout LyX-Code
9928 ReferencedFile latex "$$AbsPath$$Basename.eps"
9931 \begin_layout LyX-Code
9932 ReferencedFile dvi "$$AbsPath$$Basename.eps"
9935 \begin_layout LyX-Code
9939 \begin_layout LyX-Code
9943 \begin_layout LyX-Code
9944 TransformCommand Rotate RotationLatexCommand
9947 \begin_layout LyX-Code
9948 TransformCommand Resize ResizeLatexCommand
9951 \begin_layout LyX-Code
9952 Product "$$RotateFront$$ResizeFront
9955 \begin_layout LyX-Code
9960 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
9963 \begin_layout LyX-Code
9964 $$ResizeBack$$RotateBack"
9967 \begin_layout LyX-Code
9971 \begin_layout LyX-Code
9972 UpdateResult "$$AbsPath$$Basename.pdftex_t"
9975 \begin_layout LyX-Code
9976 Requirement "graphicx"
9979 \begin_layout LyX-Code
9980 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
9983 \begin_layout LyX-Code
9984 ReferencedFile latex "$$AbsPath$$Basename.pdf"
9987 \begin_layout LyX-Code
9991 \begin_layout LyX-Code
9995 \begin_layout LyX-Code
9996 Product "$$Contents(
9998 "$$AbsPath$$Basename.asc
10003 \begin_layout LyX-Code
10004 UpdateFormat asciixfig
10007 \begin_layout LyX-Code
10008 UpdateResult "$$AbsPath$$Basename.asc"
10011 \begin_layout LyX-Code
10015 \begin_layout LyX-Code
10019 \begin_layout LyX-Code
10020 Product "<graphic fileref=
10022 "$$AbsOrRelPathMaster$$Basename.eps
10027 \begin_layout LyX-Code
10031 \begin_layout LyX-Code
10035 \begin_layout LyX-Code
10036 UpdateResult "$$AbsPath$$Basename.eps"
10039 \begin_layout LyX-Code
10040 ReferencedFile docbook "$$AbsPath$$Basename.eps"
10043 \begin_layout LyX-Code
10044 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
10047 \begin_layout LyX-Code
10051 \begin_layout LyX-Code
10052 Product "[XFig: $$FName]"
10055 \begin_layout LyX-Code
10059 \begin_layout LyX-Code
10063 \begin_layout Standard
10064 As you can see, the template is enclosed in
10068 \SpecialChar \ldots{}
10074 It contains a header specifying some general settings, and for each supported
10075 primary document file format a section
10079 \SpecialChar \ldots{}
10087 \begin_layout Subsection
10088 The template header
10091 \begin_layout Description
10095 Template\InsetSpace ~
10099 A unique name for the template.
10100 It must not contain substitution macros (see below).
10103 \begin_layout Description
10107 GuiName\InsetSpace ~
10111 The text that is displayed on the button.
10112 This command must occur exactly once.
10115 \begin_layout Description
10119 HelpText\InsetSpace ~
10120 <text>\InsetSpace ~
10124 The help text that is used in the External dialog.
10125 Provide enough information to explain to the user just what the template
10126 can provide him with.
10127 This command must occur exactly once.
10130 \begin_layout Description
10134 InputFormat\InsetSpace ~
10138 The file format of the original file.
10139 This must be the name of a format that is known to LyX (see the
10144 ools\SpecialChar \menuseparator
10149 references:Conversion
10156 if the template can handle original files of more than one format.
10157 LyX will attempt to interrogate the file itself in order to deduce its
10158 format in this case.
10159 This command must occur exactly once.
10162 \begin_layout Description
10166 FileFilter\InsetSpace ~
10170 A glob pattern that is used in the file dialog to filter out the desired
10172 If there is more than one possible file extension (e.g.\InsetSpace ~
10181 ), use something like
10186 This command must occur exactly once.
10189 \begin_layout Description
10193 AutomaticProduction\InsetSpace ~
10197 Wether the file represented by the template must be generated by LyX.
10198 This command must occur exactly once.
10201 \begin_layout Description
10205 Transform\InsetSpace ~
10206 Rotate|Resize|Clip|Extra
10209 This command specifies which transformations are supported by this template.
10210 It may occur zero or more times.
10211 This command enables the corresponding tabs in the external dialog.
10216 command must have either a corresponding
10229 Otherwise the transformation will not be supported by that format.
10232 \begin_layout Subsection
10236 \begin_layout Description
10240 Format\InsetSpace ~
10241 LaTeX|PDFLaTeX|PlainText|DocBook
10244 The primary document file format that this format definition is for.
10245 Not every template has a sensible representation in all document file formats.
10246 Please define nevertheless a
10250 section for all formats.
10251 Use a dummy text when no representation is available.
10252 Then you can at least see a reference to the external material in the exported
10256 \begin_layout Description
10260 TransformCommand\InsetSpace ~
10261 Rotate\InsetSpace ~
10262 RotationLatexCommand
10265 This command specifies that the built in LaTeX command should be used for
10267 This command may occur once or not at all.
10270 \begin_layout Description
10274 TransformCommand\InsetSpace ~
10275 Resize\InsetSpace ~
10279 This command specifies that the built in LaTeX command should be used for
10281 This command may occur once or not at all.
10284 \begin_layout Description
10288 TransformOption\InsetSpace ~
10289 Rotate\InsetSpace ~
10290 RotationLatexOption
10293 This command specifies that rotation is done via an optional argument.
10294 This command may occur once or not at all.
10297 \begin_layout Description
10301 TransformOption\InsetSpace ~
10302 Resize\InsetSpace ~
10306 This command specifies that resizing is done via an optional argument.
10307 This command may occur once or not at all.
10310 \begin_layout Description
10314 TransformOption\InsetSpace ~
10319 This command specifies that clipping is done via an optional argument.
10320 This command may occur once or not at all.
10323 \begin_layout Description
10327 TransformOption\InsetSpace ~
10332 This command specifies that an extra optional argument is used.
10333 This command may occur once or not at all.
10336 \begin_layout Description
10340 Product\InsetSpace ~
10344 The text that is inserted in the exported document.
10345 This is actually the most important command and can be quite complex.
10346 This command must occur exactly once.
10349 \begin_layout Description
10353 UpdateFormat\InsetSpace ~
10357 The file format of the converted file.
10358 This must be the name of a format that is known to LyX (see the
10363 ools\SpecialChar \menuseparator
10368 references:Conversion
10371 This command must occur exactly once.
10374 \begin_layout Description
10378 UpdateResult\InsetSpace ~
10382 The file name of the converted file.
10383 The file name must be absolute.
10384 This command must occur exactly once.
10387 \begin_layout Description
10391 ReferencedFile\InsetSpace ~
10392 <format>\InsetSpace ~
10396 This command denotes files that are created by the conversion process and
10397 are needed for a particular export format.
10398 If the filename is relative, it is interpreted relative to the master document.
10399 This command may be given zero or more times.
10402 \begin_layout Description
10406 Requirement\InsetSpace ~
10410 The name of a required LaTeX package.
10411 The package is included via
10417 in the LaTeX preamble.
10418 This command may occur zero or more times.
10421 \begin_layout Description
10425 Preamble\InsetSpace ~
10429 This command specifies a preamble snippet that will be included in the
10431 It has to be defined using
10435 \SpecialChar \ldots{}
10441 This command may occur zero or more times.
10444 \begin_layout Description
10448 Option\InsetSpace ~
10449 <name>\InsetSpace ~
10453 This command defines an additional macro
10457 for substitution in
10466 itself may contain substitution macros.
10467 The advantage over using
10475 is that the substituted value of
10479 is sanitized so that it is a valid optional argument in the document format.
10480 This command may occur zero or more times.
10483 \begin_layout Subsection
10484 Preamble definitions
10487 \begin_layout Standard
10488 The external template configuration file may contain additional preamble
10489 definitions enclosed by
10493 \SpecialChar \ldots{}
10499 They can be used by the templates in the
10506 \begin_layout Section
10507 The substitution mechanism
10510 \begin_layout Standard
10511 When the external material facility invokes an external program, it is done
10512 on the basis of a command defined in the template configuration file.
10513 These commands can contain various macros that are expanded before execution.
10514 Execution always take place in the directory of the containing document.
10517 \begin_layout Standard
10518 Also, whenever external material is to be displayed, the name will be produced
10519 by the substitution mechanism, and most other commands in the template
10520 definition support substitution as well.
10523 \begin_layout Standard
10524 The available macros are the following:
10527 \begin_layout Description
10528 $$FName The filename of the file specified in the external material dialog.
10529 This is either an absolute name, or it is relative to the LyX document.
10532 \begin_layout Description
10533 $$Basename The filename without path and without the extension.
10536 \begin_layout Description
10537 $$Extension The file extension (including the dot).
10540 \begin_layout Description
10541 $$FPath The path part of
10545 (absolute name or relative to the LyX document).
10548 \begin_layout Description
10549 $$AbsPath The absolute file path.
10552 \begin_layout Description
10553 $$RelPathMaster The file path, relative to the master LyX document.
10556 \begin_layout Description
10557 $$RelPathParent The file path, relative to the LyX document.
10560 \begin_layout Description
10561 $$AbsOrRelPathMaster The file path, absolute or relative to the master LyX
10565 \begin_layout Description
10566 $$AbsOrRelPathParent The file path, absolute or relative to the LyX document.
10569 \begin_layout Description
10570 $$Tempname A name and full path to a temporary file which will be automatically
10571 deleted whenever the containing document is closed, or the external material
10575 \begin_layout Description
10577 \begin_inset Quotes eld
10581 \begin_inset Quotes erd
10584 ) This macro will expand to the contents of the file with the name
10591 \begin_layout Description
10592 $$Sysdir This macro will expand to the absolute path of the system directory.
10593 This is typically used to point to the various helper scripts that are
10597 \begin_layout Standard
10598 All path macros contain a trailing directory separator, so you can construct
10600 the absolute filename with
10602 $$AbsPath$$Basename$$Extension
10607 \begin_layout Standard
10608 The macros above are substituted in all commands unless otherwise noted.
10613 supports additionally the following substitutions if they are enabled by
10625 \begin_layout Description
10626 $$ResizeFront The front part of the resize command.
10629 \begin_layout Description
10630 $$ResizeBack The back part of the resize command.
10633 \begin_layout Description
10634 $$RotateFront The front part of the rotation command.
10637 \begin_layout Description
10638 $$RotateBack The back part of the rotation command.
10641 \begin_layout Standard
10642 The value string of the
10646 command supports additionally the following substitutions if they are enabled
10658 \begin_layout Description
10659 $$Clip The clip option.
10662 \begin_layout Description
10663 $$Extra The extra option.
10666 \begin_layout Description
10667 $$Resize The resize option.
10670 \begin_layout Description
10671 $$Rotate The rotation option.
10674 \begin_layout Standard
10675 You may ask why there are so many path macros.
10676 There are mainly two reasons:
10679 \begin_layout Standard
10680 First, relative and absolute file names should remain relative or absolute,
10682 Users may have reasons to prefer either form.
10683 Relative names are useful for portable documents that should work on different
10684 machines, for example.
10685 Absolute names may be required by some programs.
10688 \begin_layout Standard
10689 Second, LaTeX treats relative file names differently than LyX and other
10690 programs in nested included files.
10691 For LyX, a relative file name is always relative to the document that contains
10693 For LaTeX, it is always relative to the master document.
10694 These two definitions are identical if you have only one document, but
10695 differ if you have a master document that includes part documents.
10696 That means that relative filenames must be transformed when presented to
10698 Fortunately LyX does this automatically for you if you choose the right
10702 \begin_layout Standard
10703 So which path macro should be used in new template definitions? The rule
10707 \begin_layout Itemize
10712 if an absolute path is required.
10715 \begin_layout Itemize
10718 $$AbsOrRelPathMaster
10720 if the substituted string is some kind of LaTeX input.
10723 \begin_layout Itemize
10726 $$AbsOrRelPathParent
10728 in order to preserve the user's choice.
10731 \begin_layout Standard
10732 There are special cases where this rule does not work and e.g.\InsetSpace ~
10734 are needed, but normally it will work just fine.
10735 One example for such a case is the command
10737 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
10739 in the XFig template above: We can't use the absolute name because the
10744 files needs the relative name in order to rewrite the file content.
10747 \begin_layout Section
10748 Security discussion
10751 \begin_layout Standard
10752 \begin_inset Note Note
10755 \begin_layout Standard
10756 This section is outdated
10761 The external material feature interfaces with a lot of external programs
10762 and does so automatically, so we have to consider the security implications
10764 In particular, since you have the option of including your own filenames
10765 and/or parameter strings and those are expanded into a command, it seems
10766 that it would be possible to create a malicious document which executes
10767 arbitrary commands when a user views or prints the document.
10768 This is something we definately want to avoid.
10771 \begin_layout Standard
10772 However, since the external program commands are specified in the template
10773 configuration file only, there are no security issues if LyX is properly
10774 configured with safe templates only.
10775 This is so because the external programs are invoked with the
10779 -system call rather than the
10783 system-call, so it's not possible to execute arbitrary commands from the
10784 filename or parameter section via the shell.
10787 \begin_layout Standard
10788 This also implies that you are restricted in what command strings you can
10789 use in the external material templates.
10790 In particular, pipes and redirection are not readily available.
10791 This has to be so if LyX should remain safe.
10792 If you want to use some of the shell features, you should write a safe
10793 script to do this in a controlled manner, and then invoke the script from
10794 the command string.
10799 directory of the LyX installation, you can find a safe wrapper script
10801 general_command_wrapper.py
10803 that supports redirection of input and output.
10804 That can serve as an example for how to write safe template scripts.
10805 For a more advanced example that uses
10809 and friends, take a look at the
10816 \begin_layout Standard
10817 It is possible to design a template that interacts directly with the shell,
10818 but since this would allow a malicious user to execute arbitrary commands
10819 by writing clever filenames and/or parameters, we generally recommend that
10820 you only use safe scripts that work with the
10824 system call in a controlled manner.
10825 Of course, for use in a controlled environment, it can be tempting to just
10826 fall back to use ordinary shell scripts.
10827 If you do so, be aware that you
10831 provide an easily exploitable security hole in your system.
10832 Of course it stands to reason that such unsafe templates will never be
10833 included in the standard LyX distribution, although we do encourage people
10834 to submit new templates in the open source tradition.
10835 But LyX as shipped from the official distribution channels will never have
10839 \begin_layout Standard
10840 Including external material provides a lot of power, and you have to be
10841 careful not to introduce security hazards with this power.
10842 A subtle error in a single line in an innocent looking script can open
10843 the door to huge security problems.
10844 So if you do not fully understand the issues, we recommend that you consult
10845 a knowledgable security professional or the LyX development team if you
10846 have any questions about whether a given template is safe or not.
10847 And do this before you use it in an uncontrolled environment.
10850 \begin_layout Chapter
10854 \begin_layout Section
10858 \begin_layout Standard
10859 The LyX server is a method implemented in LyX that will enable other programs
10860 to talk to LyX, invoke LyX commands, and retrieve information about the
10861 LyX internal state.
10862 This is only intended for advanced users, but they should find it useful.
10865 \begin_layout Section
10866 Starting the LyX Server
10869 \begin_layout Standard
10870 The LyX server works through the use of a pair of named pipes.
10871 These are usually located in your home directory and have the names
10872 \begin_inset Quotes eld
10880 \begin_inset Quotes erd
10884 \begin_inset Quotes eld
10892 \begin_inset Quotes erd
10896 External programs write into
10900 and read back data from
10905 The stem of the pipe names can be defined in the
10910 ools\SpecialChar \menuseparator
10917 dialog, for example
10919 "/home/myhome/.lyxpipe"
10924 \begin_layout Standard
10933 ' to create the pipes.
10934 The above setting also has the effect of activating the LyX server.
10935 If one of the pipes already exists, LyX will assume that another LyX process
10936 is already running and will not start the server.
10937 To have several LyX processes with servers at the same time, you have to
10938 change the configuration between the start of the programs.
10941 \begin_layout Standard
10942 If you are developing a client program, you might find it useful to enable
10943 debugging information from the LyX server.
10944 Do this by starting LyX as
10946 lyx -dbg lyxserver.
10949 \begin_layout Standard
10950 Warning: if LyX crashes, it may not manage to remove the pipes; in this
10951 case you must remove them manually.
10952 If LyX starts and the pipes exist already, it will not start any server.
10955 \begin_layout Standard
10956 Other than this, there are a few points to consider:
10959 \begin_layout Itemize
10960 Both server and clients must run on UNIX or OS/2 machines.
10961 Communications between LyX on UNIX and clients on OS/2 or vice versa is
10962 not possible right now.
10965 \begin_layout Itemize
10966 On OS/2, only one client can connect to LyXServer at a time.
10969 \begin_layout Itemize
10970 On OS/2, clients must open inpipe with
10977 \begin_layout Standard
10978 You can find a complete example client written in C in the source distribution
10981 development/server_monitor.c
10986 \begin_layout Section
10987 Normal communication
10990 \begin_layout Standard
10991 To issue a LyX call, the client writes a line of ASCII text into the input
10993 This line has the following format:
10996 \begin_layout Quote
11010 \begin_layout Standard
11015 is a name that the client can choose arbitrarily.
11016 Its only use is that LyX will echo it if it sends an answer - so a client
11017 can dispatch results from different requesters.
11020 \begin_layout Standard
11025 is the function you want LyX to perform.
11026 It is the same as the commands you'd use in the minibuffer.
11029 \begin_layout Standard
11034 is an optional argument which is meaningful only to some functions (for
11036 \begin_inset Quotes eld
11040 \begin_inset Quotes erd
11043 which will insert the argument as text at the cursor position.)
11046 \begin_layout Standard
11047 The answer from LyX will arrive in the output pipe and be of the form
11050 \begin_layout Quote
11064 \begin_layout Standard
11073 are just echoed from the command request, while
11077 is more or less useful information filled according to how the command
11078 execution worked out.
11079 Some commands will return information about the internal state of LyX,
11081 \begin_inset Quotes eld
11085 \begin_inset Quotes erd
11088 , while other will return an empty data-response.
11089 This means that the command execution went fine.
11092 \begin_layout Standard
11093 In case of errors, the response from LyX will have this form
11096 \begin_layout Quote
11110 \begin_layout Standard
11115 should contain an explanation of why the command failed.
11118 \begin_layout Standard
11122 \begin_layout LyX-Code
11123 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
11126 \begin_layout LyX-Code
11127 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
11129 read a <~/.lyxpipe.out
11134 \begin_layout Section
11138 \begin_layout Standard
11139 LyX can notify clients of events going on asynchronously.
11140 Currently it will only do this if the user binds a key sequence with the
11142 \begin_inset Quotes eld
11146 \begin_inset Quotes erd
11150 The format of the string LyX sends is as follows:
11153 \begin_layout Quote
11162 \begin_layout Standard
11167 is the printed representation of the key sequence that was actually typed
11171 \begin_layout Standard
11172 This mechanism can be used to extend LyX's command set and implement macros:
11173 bind some key sequence to
11174 \begin_inset Quotes eld
11178 \begin_inset Quotes erd
11181 , start a client that listens on the out pipe, dispatches the command according
11182 to the sequence and starts a function that may use LyX calls and LyX requests
11183 to issue a command or a series of commands to LyX.
11186 \begin_layout Section
11187 The simple LyX Server Protocol
11190 \begin_layout Standard
11191 LyX implements a simple protocol that can be used for session management.
11192 All messages are of the form
11195 \begin_layout Quote
11205 \begin_layout Standard
11211 \begin_inset Quotes eld
11215 \begin_inset Quotes erd
11219 \begin_inset Quotes eld
11223 \begin_inset Quotes erd
11228 \begin_inset Quotes eld
11232 \begin_inset Quotes erd
11235 is received from a client, LyX will report back to inform the client that
11236 it's listening to it's messages, while
11237 \begin_inset Quotes eld
11241 \begin_inset Quotes erd
11244 sent from LyX will inform clients that LyX is closing.
11247 \begin_layout Chapter
11252 \begin_layout Standard
11253 This appendix is a huge cross-reference to all the English language keybindings.
11254 Originally, we simply wanted to list all of the key bindings followed by
11255 the function it's bound to.
11256 That way, a user can look up a key to find out what it does.
11257 We then decided, what the hey, why not include the default toolbar and
11258 menu bindings, too.
11259 Please note this section is likely to be very out of date.
11262 \begin_layout Standard
11263 The form is really self-explanatory, but here are a few tips: all entries
11264 are arranged roughly alphabetically for a given modifier (
11273 For the general keyboard layout, simpler prefixes precede the more complex
11283 All entries were gleaned from the default user interface and binding files
11284 located in the directories
11286 \SpecialChar \ldots{}
11291 \SpecialChar \ldots{}
11294 ; they should be treated as the final word on the bindings.
11297 \begin_layout Standard
11298 As a final note, be aware that some window managers (such as FVWM) take
11299 control of some of the function keys or motion keys.
11304 is listed here as generating
11308 , but FVWM grabs it and uses it to change virtual desktops instead.
11309 Very annoying unless you instruct your window manager to stop intercepting
11313 \begin_layout Section
11317 \begin_layout LyX-Code
11321 \begin_layout LyX-Code
11325 \begin_layout LyX-Code
11329 \begin_layout LyX-Code
11330 Icon "buffer-write"
11333 \begin_layout LyX-Code
11334 Icon "buffer-print"
11337 \begin_layout LyX-Code
11341 \begin_layout LyX-Code
11345 \begin_layout LyX-Code
11349 \begin_layout LyX-Code
11353 \begin_layout LyX-Code
11357 \begin_layout LyX-Code
11361 \begin_layout LyX-Code
11365 \begin_layout LyX-Code
11369 \begin_layout LyX-Code
11373 \begin_layout LyX-Code
11377 \begin_layout LyX-Code
11381 \begin_layout LyX-Code
11385 \begin_layout LyX-Code
11386 Icon "footnote-insert"
11389 \begin_layout LyX-Code
11390 Icon "marginpar-insert"
11393 \begin_layout LyX-Code
11397 \begin_layout LyX-Code
11401 \begin_layout LyX-Code
11402 Icon "figure-insert"
11405 \begin_layout LyX-Code
11406 Icon "dialog-tabular-insert"
11409 \begin_layout LyX-Code
11413 \begin_layout Section
11417 \begin_layout Standard
11418 Note that the following bindings are for LyX with English menus.
11419 The second character of the binding depends on the menu language.
11421 \begin_inset Quotes eld
11429 \begin_inset Quotes erd
11432 is with German menus
11433 \begin_inset Quotes eld
11441 \begin_inset Quotes erd
11445 To find out the shortcuts of your language press the Meta (Alt)-key and
11446 press then the keys of the underlined characters of the menu names.
11449 \begin_layout Subsection
11454 \labelwidthstring 00.00.0000
11466 \labelwidthstring 00.00.0000
11478 \labelwidthstring 00.00.0000
11490 \labelwidthstring 00.00.0000
11504 \labelwidthstring 00.00.0000
11516 \labelwidthstring 00.00.0000
11530 \labelwidthstring 00.00.0000
11542 \labelwidthstring 00.00.0000
11554 \labelwidthstring 00.00.0000
11566 \labelwidthstring 00.00.0000
11578 \labelwidthstring 00.00.0000
11586 buffer-new-template
11590 \labelwidthstring 00.00.0000
11605 \labelwidthstring 00.00.0000
11616 \labelwidthstring 00.00.0000
11627 \labelwidthstring 00.00.0000
11638 \labelwidthstring 00.00.0000
11649 \labelwidthstring 00.00.0000
11660 \labelwidthstring 00.00.0000
11672 \labelwidthstring 00.00.0000
11683 \begin_layout Subsection
11688 \labelwidthstring 00.00.0000
11700 \labelwidthstring 00.00.0000
11712 \labelwidthstring 00.00.0000
11724 \labelwidthstring 00.00.0000
11736 \labelwidthstring 00.00.0000
11748 \labelwidthstring 00.00.0000
11760 \labelwidthstring 00.00.0000
11775 \labelwidthstring 00.00.0000
11782 tabular-feature append-row
11786 \labelwidthstring 00.00.0000
11793 tabular-feature toggle-line-bottom
11797 \labelwidthstring 00.00.0000
11804 tabular-feature align-center
11808 \labelwidthstring 00.00.0000
11815 tabular-feature delete-column
11819 \labelwidthstring 00.00.0000
11826 tabular-feature align-left
11830 \labelwidthstring 00.00.0000
11837 tabular-feature align-right
11841 \labelwidthstring 00.00.0000
11848 tabular-feature toggle-line-left
11852 \labelwidthstring 00.00.0000
11859 tabular-feature multicolumn
11863 \labelwidthstring 00.00.0000
11870 tabular-feature valign-center
11874 \labelwidthstring 00.00.0000
11881 tabular-feature valign-top
11885 \labelwidthstring 00.00.0000
11892 tabular-feature toggle-line-right
11896 \labelwidthstring 00.00.0000
11903 tabular-feature toggle-line-top
11907 \labelwidthstring 00.00.0000
11914 tabular-feature append-column
11918 \labelwidthstring 00.00.0000
11925 tabular-feature valign-bottom
11929 \labelwidthstring 00.00.0000
11936 tabular-feature delete-row
11941 \labelwidthstring 00.00.0000
11954 \labelwidthstring 00.00.0000
11961 floats-operate openfoot
11965 \labelwidthstring 00.00.0000
11972 floats-operate closefoot
11976 \labelwidthstring 00.00.0000
11983 floats-operate openfig
11987 \labelwidthstring 00.00.0000
11998 \labelwidthstring 00.00.0000
12009 \labelwidthstring 00.00.0000
12016 floats-operate closefig
12021 \labelwidthstring 00.00.0000
12033 \labelwidthstring 00.00.0000
12047 \labelwidthstring 00.00.0000
12059 \labelwidthstring 00.00.0000
12071 \labelwidthstring 00.00.0000
12085 \labelwidthstring 00.00.0000
12097 \labelwidthstring 00.00.0000
12112 \labelwidthstring 00.00.0000
12119 primary-selection-paste
12123 \labelwidthstring 00.00.0000
12130 primary-selection-paste paragraph
12134 \begin_layout Subsection
12139 \labelwidthstring 00.00.0000
12154 \labelwidthstring 00.00.0000
12161 buffer-float-insert algorithm
12165 \labelwidthstring 00.00.0000
12172 buffer-float-insert wide-tab
12176 \labelwidthstring 00.00.0000
12183 buffer-float-insert figure
12187 \labelwidthstring 00.00.0000
12194 buffer-float-insert table
12198 \labelwidthstring 00.00.0000
12205 buffer-float-insert wide-fig
12210 \labelwidthstring 00.00.0000
12218 dialog-tabular-insert
12222 \labelwidthstring 00.00.0000
12234 \labelwidthstring 00.00.0000
12246 \labelwidthstring 00.00.0000
12254 buffer-child-insert
12258 \labelwidthstring 00.00.0000
12270 \labelwidthstring 00.00.0000
12282 \labelwidthstring 00.00.0000
12294 \labelwidthstring 00.00.0000
12306 \labelwidthstring 00.00.0000
12318 \labelwidthstring 00.00.0000
12330 \labelwidthstring 00.00.0000
12342 \labelwidthstring 00.00.0000
12357 \labelwidthstring 00.00.0000
12368 \labelwidthstring 00.00.0000
12379 \labelwidthstring 00.00.0000
12390 \labelwidthstring 00.00.0000
12401 \labelwidthstring 00.00.0000
12412 \labelwidthstring 00.00.0000
12424 \labelwidthstring 00.00.0000
12436 \labelwidthstring 00.00.0000
12451 \labelwidthstring 00.00.0000
12458 protected-space-insert
12462 \labelwidthstring 00.00.0000
12469 end-of-sentence-period-insert
12473 \labelwidthstring 00.00.0000
12484 \labelwidthstring 00.00.0000
12495 \labelwidthstring 00.00.0000
12506 \labelwidthstring 00.00.0000
12513 menu-separator-insert
12517 \labelwidthstring 00.00.0000
12524 hyphenation-point-insert
12528 \labelwidthstring 00.00.0000
12539 \labelwidthstring 00.00.0000
12546 command-sequence math-insert ^;math-mode;
12550 \labelwidthstring 00.00.0000
12557 command-sequence math-insert _;math-mode;
12562 \labelwidthstring 00.00.0000
12577 \labelwidthstring 00.00.0000
12584 file-insert-plaintext lines
12588 \labelwidthstring 00.00.0000
12595 file-insert-plaintext paragraphs
12599 \labelwidthstring 00.00.0000
12611 \labelwidthstring 00.00.0000
12623 \labelwidthstring 00.00.0000
12635 \labelwidthstring 00.00.0000
12646 \begin_layout Subsection
12651 \labelwidthstring 00.00.0000
12663 \labelwidthstring 00.00.0000
12675 \labelwidthstring 00.00.0000
12687 \labelwidthstring 00.00.0000
12699 \labelwidthstring 00.00.0000
12711 \labelwidthstring 00.00.0000
12723 \labelwidthstring 00.00.0000
12735 \labelwidthstring 00.00.0000
12747 \labelwidthstring 00.00.0000
12755 layout-save-default
12759 \labelwidthstring 00.00.0000
12771 \labelwidthstring 00.00.0000
12783 \labelwidthstring 00.00.0000
12794 \begin_layout Subsubsection
12797 Layout\SpecialChar \menuseparator
12804 \labelwidthstring 00.00.0000
12816 \labelwidthstring 00.00.0000
12828 \labelwidthstring 00.00.0000
12840 \labelwidthstring 00.00.0000
12852 \labelwidthstring 00.00.0000
12864 \labelwidthstring 00.00.0000
12876 \labelwidthstring 00.00.0000
12888 \labelwidthstring 00.00.0000
12900 \labelwidthstring 00.00.0000
12912 \labelwidthstring 00.00.0000
12924 \labelwidthstring 00.00.0000
12936 \labelwidthstring 00.00.0000
12948 \labelwidthstring 00.00.0000
12960 \labelwidthstring 00.00.0000
12972 \labelwidthstring 00.00.0000
12984 \labelwidthstring 00.00.0000
12996 \labelwidthstring 00.00.0000
13008 \labelwidthstring 00.00.0000
13020 \labelwidthstring 00.00.0000
13032 \labelwidthstring 00.00.0000
13044 \labelwidthstring 00.00.0000
13056 \labelwidthstring 00.00.0000
13068 \labelwidthstring 00.00.0000
13080 \labelwidthstring 00.00.0000
13092 \labelwidthstring 00.00.0000
13104 \labelwidthstring 00.00.0000
13116 \labelwidthstring 00.00.0000
13128 \labelwidthstring 00.00.0000
13140 \labelwidthstring 00.00.0000
13152 \labelwidthstring 00.00.0000
13164 \labelwidthstring 00.00.0000
13176 \labelwidthstring 00.00.0000
13187 \begin_layout Subsection
13191 \begin_layout Subsection
13195 \begin_layout Subsection
13199 \begin_layout Subsection
13204 \labelwidthstring 00.00.0000
13216 \labelwidthstring 00.00.0000
13228 \labelwidthstring 00.00.0000
13240 \labelwidthstring 00.00.0000
13252 \labelwidthstring 00.00.0000
13264 \labelwidthstring 00.00.0000
13272 layout ShortFoilhead
13276 \labelwidthstring 00.00.0000
13288 \labelwidthstring 00.00.0000
13300 \labelwidthstring 00.00.0000
13312 \labelwidthstring 00.00.0000
13324 \labelwidthstring 00.00.0000
13332 layout ShortRotatefoilhead
13336 \labelwidthstring 00.00.0000
13348 \labelwidthstring 00.00.0000
13360 \labelwidthstring 00.00.0000
13372 \labelwidthstring 00.00.0000
13380 drop-layouts-choice
13384 \labelwidthstring 00.00.0000
13399 \labelwidthstring 00.00.0000
13414 \labelwidthstring 00.00.0000
13426 \labelwidthstring 00.00.0000
13438 \labelwidthstring 00.00.0000
13446 layout Subsubsection
13450 \labelwidthstring 00.00.0000
13462 \labelwidthstring 00.00.0000
13470 layout Subparagraph
13474 \labelwidthstring 00.00.0000
13478 asterisk\InsetSpace ~
13487 \labelwidthstring 00.00.0000
13491 asterisk\InsetSpace ~
13500 \labelwidthstring 00.00.0000
13504 asterisk\InsetSpace ~
13513 \labelwidthstring 00.00.0000
13517 asterisk\InsetSpace ~
13526 \labelwidthstring 00.00.0000
13530 asterisk\InsetSpace ~
13535 layout Subsubsection*
13539 \labelwidthstring 00.00.0000
13543 asterisk\InsetSpace ~
13552 \labelwidthstring 00.00.0000
13556 asterisk\InsetSpace ~
13561 layout Subparagraph*
13565 \labelwidthstring 00.00.0000
13577 \labelwidthstring 00.00.0000
13585 layout Bibliography
13589 \labelwidthstring 00.00.0000
13601 \labelwidthstring 00.00.0000
13613 \labelwidthstring 00.00.0000
13625 \labelwidthstring 00.00.0000
13637 \labelwidthstring 00.00.0000
13649 \labelwidthstring 00.00.0000
13657 layout Rotatefoilhead
13661 \labelwidthstring 00.00.0000
13669 layout RightAddress
13673 \labelwidthstring 00.00.0000
13685 \labelwidthstring 00.00.0000
13697 \labelwidthstring 00.00.0000
13709 \labelwidthstring 00.00.0000
13720 \begin_layout Standard
13721 These ones are kept for backwards compatibility, but only make sense on
13726 \labelwidthstring 00.00.0000
13738 \labelwidthstring 00.00.0000
13746 layout Subsubsection*
13750 \labelwidthstring 00.00.0000
13761 \begin_layout Section
13765 \begin_layout Subsection
13772 \labelwidthstring 00.00.0000
13783 \labelwidthstring 00.00.0000
13794 \labelwidthstring 00.00.0000
13805 \labelwidthstring 00.00.0000
13816 \labelwidthstring 00.00.0000
13827 \labelwidthstring 00.00.0000
13838 \labelwidthstring 00.00.0000
13845 hyphenation-point-insert
13849 \labelwidthstring 00.00.0000
13860 \labelwidthstring 00.00.0000
13867 line-delete-forward
13871 \labelwidthstring 00.00.0000
13882 \labelwidthstring 00.00.0000
13893 \labelwidthstring 00.00.0000
13904 \labelwidthstring 00.00.0000
13915 \labelwidthstring 00.00.0000
13926 \labelwidthstring 00.00.0000
13937 \labelwidthstring 00.00.0000
13948 \labelwidthstring 00.00.0000
13959 \labelwidthstring 00.00.0000
13970 \labelwidthstring 00.00.0000
13981 \labelwidthstring 00.00.0000
13992 \labelwidthstring 00.00.0000
14003 \labelwidthstring 00.00.0000
14015 \labelwidthstring 00.00.0000
14027 \labelwidthstring 00.00.0000
14039 \labelwidthstring 00.00.0000
14051 \labelwidthstring 00.00.0000
14064 \labelwidthstring 00.00.0000
14076 \labelwidthstring 00.00.0000
14088 \labelwidthstring 00.00.0000
14100 \labelwidthstring 00.00.0000
14112 \labelwidthstring 00.00.0000
14125 \labelwidthstring 00.00.0000
14137 \labelwidthstring 00.00.0000
14149 \labelwidthstring 00.00.0000
14162 \labelwidthstring 00.00.0000
14175 \labelwidthstring 00.00.0000
14188 \labelwidthstring 00.00.0000
14201 \labelwidthstring 00.00.0000
14214 \labelwidthstring 00.00.0000
14227 \labelwidthstring 00.00.0000
14239 \labelwidthstring 00.00.0000
14251 \labelwidthstring 00.00.0000
14263 \labelwidthstring 00.00.0000
14271 menu-open Documents
14275 \labelwidthstring 00.00.0000
14287 \labelwidthstring 00.00.0000
14299 \labelwidthstring 00.00.0000
14311 \labelwidthstring 00.00.0000
14323 \labelwidthstring 00.00.0000
14335 \labelwidthstring 00.00.0000
14343 buffer-toggle-read-only
14347 \labelwidthstring 00.00.0000
14359 \labelwidthstring 00.00.0000
14371 \labelwidthstring 00.00.0000
14383 \labelwidthstring 00.00.0000
14394 \labelwidthstring 00.00.0000
14405 \labelwidthstring 00.00.0000
14416 \labelwidthstring 00.00.0000
14427 \labelwidthstring 00.00.0000
14438 \labelwidthstring 00.00.0000
14449 \labelwidthstring 00.00.0000
14460 \labelwidthstring 00.00.0000
14471 \labelwidthstring 00.00.0000
14482 \labelwidthstring 00.00.0000
14493 \labelwidthstring 00.00.0000
14504 \labelwidthstring 00.00.0000
14515 \labelwidthstring 00.00.0000
14526 \labelwidthstring 00.00.0000
14537 \labelwidthstring 00.00.0000
14544 word-delete-forward
14548 \labelwidthstring 00.00.0000
14555 word-delete-backward
14559 \labelwidthstring 00.00.0000
14570 \labelwidthstring 00.00.0000
14577 end-of-sentence-period-insert
14581 \labelwidthstring 00.00.0000
14588 protected-space-insert
14592 \labelwidthstring 00.00.0000
14603 \labelwidthstring 00.00.0000
14614 \labelwidthstring 00.00.0000
14625 \labelwidthstring 00.00.0000
14636 \labelwidthstring 00.00.0000
14647 \labelwidthstring 00.00.0000
14658 \labelwidthstring 00.00.0000
14665 buffer-begin-select
14669 \labelwidthstring 00.00.0000
14680 \labelwidthstring 00.00.0000
14687 paragraph-up-select
14691 \labelwidthstring 00.00.0000
14698 paragraph-down-select
14702 \labelwidthstring 00.00.0000
14709 word-backward-select
14713 \labelwidthstring 00.00.0000
14720 word-forward-select
14724 \labelwidthstring 00.00.0000
14735 \labelwidthstring 00.00.0000
14742 word-delete-forward
14746 \labelwidthstring 00.00.0000
14757 \labelwidthstring 00.00.0000
14768 \labelwidthstring 00.00.0000
14779 \labelwidthstring 00.00.0000
14790 \labelwidthstring 00.00.0000
14797 break-paragraph-keep-layout
14801 \labelwidthstring 00.00.0000
14811 \begin_layout Subsection
14818 \labelwidthstring 00.00.0000
14829 \labelwidthstring 00.00.0000
14840 \labelwidthstring 00.00.0000
14851 \labelwidthstring 00.00.0000
14862 \labelwidthstring 00.00.0000
14873 \labelwidthstring 00.00.0000
14884 \labelwidthstring 00.00.0000
14895 \labelwidthstring 00.00.0000
14906 \labelwidthstring 00.00.0000
14917 \labelwidthstring 00.00.0000
14928 \labelwidthstring 00.00.0000
14939 \labelwidthstring 00.00.0000
14950 \labelwidthstring 00.00.0000
14961 \labelwidthstring 00.00.0000
14972 \labelwidthstring 00.00.0000
14983 \labelwidthstring 00.00.0000
14994 \labelwidthstring 00.00.0000
15005 \labelwidthstring 00.00.0000
15016 \labelwidthstring 00.00.0000
15027 \labelwidthstring 00.00.0000
15038 \labelwidthstring 00.00.0000
15049 \labelwidthstring 00.00.0000
15060 \labelwidthstring 00.00.0000
15067 protected-space-insert
15071 \labelwidthstring 00.00.0000
15082 \labelwidthstring 00.00.0000
15093 \labelwidthstring 00.00.0000
15104 \labelwidthstring 00.00.0000
15111 buffer-new-template
15115 \labelwidthstring 00.00.0000
15126 \labelwidthstring 00.00.0000
15137 \labelwidthstring 00.00.0000
15148 \labelwidthstring 00.00.0000
15159 \labelwidthstring 00.00.0000
15170 \labelwidthstring 00.00.0000
15181 \labelwidthstring 00.00.0000
15192 \labelwidthstring 00.00.0000
15199 end-of-sentence-period-insert
15203 \labelwidthstring 00.00.0000
15214 \labelwidthstring 00.00.0000
15225 \labelwidthstring 00.00.0000
15232 hyphenation-point-insert
15236 \labelwidthstring 00.00.0000
15247 \labelwidthstring 00.00.0000
15254 protected-space-insert
15258 \labelwidthstring 00.00.0000
15269 \labelwidthstring 00.00.0000
15280 \labelwidthstring 00.00.0000
15291 \labelwidthstring 00.00.0000
15302 \labelwidthstring 00.00.0000
15313 \labelwidthstring 00.00.0000
15324 \labelwidthstring 00.00.0000
15335 \labelwidthstring 00.00.0000
15346 \labelwidthstring 00.00.0000
15357 \labelwidthstring 00.00.0000
15368 \labelwidthstring 00.00.0000
15379 \labelwidthstring 00.00.0000
15390 \labelwidthstring 00.00.0000
15401 \labelwidthstring 00.00.0000
15412 \labelwidthstring 00.00.0000
15423 \labelwidthstring 00.00.0000
15430 word-delete-forward
15434 \labelwidthstring 00.00.0000
15441 word-delete-backward
15445 \labelwidthstring 00.00.0000
15456 \labelwidthstring 00.00.0000
15467 \labelwidthstring 00.00.0000
15478 \labelwidthstring 00.00.0000
15489 \labelwidthstring 00.00.0000
15496 paragraph-down-select
15500 \labelwidthstring 00.00.0000
15511 \labelwidthstring 00.00.0000
15518 buffer-begin-select
15522 \labelwidthstring 00.00.0000
15529 word-backward-select
15533 \labelwidthstring 00.00.0000
15540 word-forward-select
15544 \labelwidthstring 00.00.0000
15551 paragraph-up-select
15555 \labelwidthstring 00.00.0000
15566 \labelwidthstring 00.00.0000
15573 break-paragraph-keep-layout
15577 \labelwidthstring 00.00.0000
15588 \labelwidthstring 00.00.0000
15599 \labelwidthstring 00.00.0000
15610 \labelwidthstring 00.00.0000
15621 \labelwidthstring 00.00.0000
15632 \labelwidthstring 00.00.0000
15643 \labelwidthstring 00.00.0000
15654 \labelwidthstring 00.00.0000
15665 \labelwidthstring 00.00.0000
15676 \labelwidthstring 00.00.0000
15687 \labelwidthstring 00.00.0000
15697 \begin_layout Subsection
15703 \begin_layout Standard
15704 These are LyX keyboard definitions for mathematics, similar to those of
15708 \begin_layout Standard
15709 The bindings file and the present documentation were prepared by Serge Winitzki
15710 with assistance from Jean-Marc Lasgouttes.
15711 Version 1.3, for LyX 1.2.x and 1.3.x.
15714 \begin_layout Standard
15715 These definitions make it a lot easier to type equations without using the
15716 mouse, especially for people familiar with Scientific Word.
15717 The standard LyX bindings such as
15728 \begin_layout Standard
15729 Tip: to find the "LyX bind name" for a key, look at the status bar after
15730 typing some non-existent key combination.
15732 to find how "Ctrl-&" is referenced, press Ctrl-S and then Ctrl-&: the status
15733 bar shows "C-s S-C-ampersand." (This does not work in LyX 1.3.0!)
15737 \labelwidthstring 00.00.0000
15746 -- Copy, cut, paste is as in Sciword,
15762 \labelwidthstring 00.00.0000
15771 -- Display equation toggle: type
15775 to insert a displayed formula (
15780 \begin_inset Quotes eld
15784 \begin_inset Quotes erd
15792 in a displayed formula to convert it back to an inline formula.
15796 \labelwidthstring 00.00.0000
15811 to insert a fraction (
15816 \begin_inset Quotes eld
15820 \begin_inset Quotes erd
15824 You can also select an expression and type
15828 to convert it to the numerator of a fraction.
15837 end of the denominator will delete the numerator and convert the denominator
15842 \labelwidthstring 00.00.0000
15854 \begin_inset Formula $\int$
15862 \begin_inset Quotes eld
15866 \begin_inset Quotes erd
15873 \labelwidthstring 00.00.0000
15880 line-delete-forward
15882 -- Emacs-like binding: delete forward of cursor to end of line.
15886 \labelwidthstring 00.00.0000
15895 -- A text/math toggle (
15900 \begin_inset Quotes eld
15904 \begin_inset Quotes erd
15907 ): switches to math in text mode, and also inserts roman text in math mode.
15917 \begin_inset Quotes eld
15921 \begin_inset Quotes erd
15928 \labelwidthstring 00.00.0000
15937 -- Add/remove numbering in a single equation.
15941 \labelwidthstring 00.00.0000
15950 -- Add/remove numbering at a line in equation arrays.
15953 \begin_layout Standard
15954 The above commands are toggles that control the numbering of equations (
15959 \begin_inset Quotes eld
15963 \begin_inset Quotes erd
15967 Note: when deleting a number in a labeled eqnarray, the label is not really
15968 removed (the TeX code becomes
15969 \begin_inset Quotes eld
15981 \begin_inset Quotes erd
15984 ) and this generates a (harmless) LaTeX warning.
15988 \labelwidthstring 00.00.0000
15997 -- Open a new document.
16002 \labelwidthstring 00.00.0000
16011 -- Insert a quote character " (
16016 \begin_inset Quotes eld
16020 \begin_inset Quotes erd
16025 \begin_inset Quotes eld
16029 \begin_inset Quotes erd
16032 double quote character that you get by default.
16036 \labelwidthstring 00.00.0000
16047 -- Square root sign
16048 \begin_inset Formula $\sqrt{x}$
16056 \begin_inset Quotes eld
16060 \begin_inset Quotes erd
16067 \labelwidthstring 00.00.0000
16079 \begin_inset Formula $\sqrt[n]{x}$
16086 \labelwidthstring 00.00.0000
16095 -- Another binding for a switch between the text and the math mode (
16100 \begin_inset Quotes eld
16104 \begin_inset Quotes erd
16108 Note that the roman text inserted in math mode is special.
16112 \labelwidthstring 00.00.0000
16125 the selected text (text mode only, use things like
16141 \labelwidthstring 00.00.0000
16150 -- W*ndows heritage.
16154 \labelwidthstring 00.00.0000
16163 -- Close the current document (again, a W*ndows heritage).
16167 \labelwidthstring 00.00.0000
16178 \labelwidthstring 00.00.0000
16189 \labelwidthstring 00.00.0000
16199 \begin_inset Quotes eld
16203 \begin_inset Quotes erd
16207 \begin_inset Quotes eld
16211 \begin_inset Quotes erd
16217 \begin_layout Standard
16218 Bracket delimiters: press
16222 -<bracket key> to insert a matching pair of delimiters.
16227 inserts a pair of parentheses
16228 \begin_inset Formula $\left[\right]$
16236 does the same thing.) It will switch to math mode if needed.
16237 The supported characters are ( [ { < |.
16238 It is the same to press the right or the left bracket.
16239 The corresponding delimiters are
16240 \begin_inset Formula $\left(\right)$
16244 \begin_inset Formula $\left[\right]$
16248 \begin_inset Formula $\left\{ \right\} $
16252 \begin_inset Formula $\left\langle \right\rangle $
16256 \begin_inset Formula $\left|\right|$
16261 \begin_inset Quotes eld
16265 \begin_inset Quotes erd
16268 and resize with their contents.
16269 Use Math Panel to get other or non-matching delimiters.
16270 Press backspace on the
16274 delimiter to remove both
16275 \begin_inset Quotes eld
16279 \begin_inset Quotes erd
16282 delimiters without removing their contents.
16286 \labelwidthstring 00.00.0000
16295 -- for convenience, pressing
16309 \labelwidthstring 00.00.0000
16320 \labelwidthstring 00.00.0000
16331 \labelwidthstring 00.00.0000
16342 \labelwidthstring 00.00.0000
16353 \labelwidthstring 00.00.0000
16364 \labelwidthstring 00.00.0000
16371 math-delim langle rangle
16373 -- angular delimiters
16374 \begin_inset Formula $\left\langle \right\rangle $
16377 , not to confuse with ordinary < > signs.
16381 \labelwidthstring 00.00.0000
16388 math-delim langle rangle
16391 \begin_layout Standard
16392 The bar bracket: on some keyboards (e.g.\InsetSpace ~
16393 some British ones), the bar character
16398 -something and on some wayward Unices to "brokenbar".
16399 So we define all of these keys as well.
16403 \labelwidthstring 00.00.0000
16414 \labelwidthstring 00.00.0000
16425 \labelwidthstring 00.00.0000
16436 \labelwidthstring 00.00.0000
16447 \labelwidthstring 00.00.0000
16457 \begin_layout Standard
16458 Accents are in most cases
16462 -<accent key>, e.g.\InsetSpace ~
16476 for tilde (you also need to press
16482 \begin_inset Quotes eld
16494 \begin_inset Quotes erd
16498 Some accents work only in math mode and others only in text mode.
16502 \labelwidthstring 00.00.0000
16511 -- overdot accent, ȧ (text mode only).
16515 \labelwidthstring 00.00.0000
16527 \begin_inset Formula $\dot{a}$
16530 (math mode only -- in physics this denotes a first derivative).
16534 \labelwidthstring 00.00.0000
16545 -- Vector accent over math
16546 \begin_inset Formula $\overrightarrow{x}$
16553 \labelwidthstring 00.00.0000
16562 -- umlaut accent, ä (text mode only)
16566 \labelwidthstring 00.00.0000
16577 -- double dot accent,
16578 \begin_inset Formula $\ddot{a}$
16581 (math mode only -- in physics this denotes a second derivative).
16582 To get a triple dot in math mode, use
16590 \labelwidthstring 00.00.0000
16599 -- grave accent à (text mode only, use
16609 \labelwidthstring 00.00.0000
16618 -- tilde accent ã (text mode only, use
16628 \labelwidthstring 00.00.0000
16637 -- acute accent á (text mode only, use
16647 \labelwidthstring 00.00.0000
16656 -- circumflex (caret) accent â (text mode only, use
16665 \begin_layout Standard
16667 The new key S-F2 for creating a LaTeX file seems handy.
16671 \labelwidthstring 00.00.0000
16680 -- Save current document.
16684 \labelwidthstring 00.00.0000
16691 buffer-export latex
16693 -- Write a LaTeX file for the current document.
16697 \labelwidthstring 00.00.0000
16706 -- Find and replace dialog.
16710 \labelwidthstring 00.00.0000
16727 \labelwidthstring 00.00.0000
16740 to quit LyX is the W*ndows w*ndow manager's mnemonic.
16743 \begin_layout Standard
16752 are used to switch fonts.
16757 to switch back to the normal font.
16758 The non-default font switches
16766 all work as toggles.
16767 They also work on the whole word if you put the cursor in the middle of
16768 the word, or if you select some text.
16772 \labelwidthstring 00.00.0000
16781 -- stop using any special font
16785 \labelwidthstring 00.00.0000
16802 \labelwidthstring 00.00.0000
16819 \labelwidthstring 00.00.0000
16836 \labelwidthstring 00.00.0000
16850 (Used sometimes for people's names.)
16853 \begin_layout Standard
16859 \begin_inset Quotes eld
16863 \begin_inset Quotes erd
16870 key (useful e.g.\InsetSpace ~
16871 if the keyboard has no working
16878 \begin_layout Standard
16879 Here are some Sciword-inspired mnemonics for frequently used math symbols.
16880 Many symbols start with a
16889 cannot be itself bound to anything.
16893 \labelwidthstring 00.00.0000
16905 \begin_inset Quotes eld
16909 \begin_inset Quotes erd
16913 \begin_inset Formula $\prime$
16917 This is frequently unnecessary: in most cases the normal apostrophe works
16920 \begin_inset Formula $x'+2x=0$
16923 , but in some cases this would generate a double superscript error in LaTeX.
16925 \begin_inset Formula $x^{\prime2}$
16929 \begin_inset Formula $x$
16932 prime squared) must be entered with the prime character.
16936 \labelwidthstring 00.00.0000
16944 command-sequence math-superscript; math-insert
16948 -- Insert a prime as a superscript (see example above).
16952 \labelwidthstring 00.00.0000
16961 -- Insert an upper index.
16968 \labelwidthstring 00.00.0000
16977 -- Insert a lower index.
16984 \labelwidthstring 00.00.0000
16996 -- Partial derivative symbol
16997 \begin_inset Formula $\partial$
17004 \labelwidthstring 00.00.0000
17016 -- Summation symbol
17017 \begin_inset Formula $\sum$
17020 (not the same as the Greek letter uppercase Sigma
17021 \begin_inset Formula $\Sigma$
17024 because it can resize and allows smart upper/lower limits).
17028 \labelwidthstring 00.00.0000
17041 \begin_inset Formula $\prod$
17044 (not the same as the Greek letter uppercase Pi,
17045 \begin_inset Formula $\Pi$
17052 \labelwidthstring 00.00.0000
17065 \begin_inset Formula $\infty$
17072 \labelwidthstring 00.00.0000
17085 \begin_inset Formula $\times$
17092 \labelwidthstring 00.00.0000
17102 -- Insert a stacked array
17103 \begin_inset Formula $\begin{array}{c}
17105 \end{array}\end{array}$
17109 (Frequently useful in formulae.)
17113 \labelwidthstring 00.00.0000
17124 \begin_inset Formula $\times$
17128 \begin_inset Formula $\begin{array}{ccc}
17133 (Then you can modify its size using the
17135 Edit\SpecialChar \menuseparator
17142 \labelwidthstring 00.00.0000
17155 \begin_inset Quotes eld
17159 \begin_inset Quotes erd
17163 \begin_inset Formula $\dagger$
17170 \labelwidthstring 00.00.0000
17183 \begin_inset Quotes eld
17187 \begin_inset Quotes erd
17191 \begin_inset Formula $\equiv$
17198 \labelwidthstring 00.00.0000
17210 \begin_inset Quotes eld
17213 Approximate equality
17214 \begin_inset Quotes erd
17218 \begin_inset Formula $\approx$
17225 \labelwidthstring 00.00.0000
17237 \begin_inset Quotes eld
17241 \begin_inset Quotes erd
17245 \begin_inset Formula $\sim$
17252 \labelwidthstring 00.00.0000
17264 \begin_inset Formula $\rightarrow$
17268 \begin_inset Formula $\lim_{x\rightarrow0}$
17275 \labelwidthstring 00.00.0000
17287 \begin_inset Formula $\leq$
17294 \labelwidthstring 00.00.0000
17305 -- Greater-or-equal
17306 \begin_inset Formula $\geq$
17313 \labelwidthstring 00.00.0000
17326 \begin_inset Quotes eld
17330 \begin_inset Quotes erd
17334 \begin_inset Formula $\ll$
17337 (useful in physics)
17341 \labelwidthstring 00.00.0000
17354 \begin_inset Quotes eld
17358 \begin_inset Quotes erd
17362 \begin_inset Formula $\gg$
17368 \begin_layout Subsection
17369 Standard math bindings
17373 \labelwidthstring 00.00.0000
17387 \labelwidthstring 00.00.0000
17399 \labelwidthstring 00.00.0000
17411 \labelwidthstring 00.00.0000
17425 \labelwidthstring 00.00.0000
17437 \labelwidthstring 00.00.0000
17449 \labelwidthstring 00.00.0000
17463 \labelwidthstring 00.00.0000
17475 \labelwidthstring 00.00.0000
17487 \labelwidthstring 00.00.0000
17499 \labelwidthstring 00.00.0000
17513 \labelwidthstring 00.00.0000
17527 \labelwidthstring 00.00.0000
17541 \labelwidthstring 00.00.0000
17555 \labelwidthstring 00.00.0000
17569 \labelwidthstring 00.00.0000
17583 \labelwidthstring 00.00.0000
17595 \labelwidthstring 00.00.0000
17609 \labelwidthstring 00.00.0000
17621 \labelwidthstring 00.00.0000
17633 \labelwidthstring 00.00.0000
17645 \labelwidthstring 00.00.0000
17657 \labelwidthstring 00.00.0000
17671 \labelwidthstring 00.00.0000
17683 \labelwidthstring 00.00.0000
17695 \labelwidthstring 00.00.0000
17707 \labelwidthstring 00.00.0000
17715 math-delim langle rangle
17719 \labelwidthstring 00.00.0000
17727 math-delim rangle langle
17731 \labelwidthstring 00.00.0000
17743 \labelwidthstring 00.00.0000
17757 \labelwidthstring 00.00.0000
17770 \begin_layout Subsection
17775 \labelwidthstring 00.00.0000
17787 \labelwidthstring 00.00.0000
17799 \labelwidthstring 00.00.0000
17811 \labelwidthstring 00.00.0000
17823 \labelwidthstring 00.00.0000