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
61 \inputencoding default
64 \font_typewriter default
65 \font_default_family default
71 \paperfontsize default
79 \paperorientation portrait
82 \paragraph_separation indent
84 \quotes_language english
87 \paperpagestyle headings
88 \tracking_changes false
100 Customizing LyX: Features for the Advanced User
108 \begin_layout Standard
110 Principal maintainer of this file is
115 If you have comments or error corrections, please send them to the LyX
116 Documentation mailing list, <lyx-docs@lists.lyx.org>.
124 \begin_layout Standard
125 \begin_inset LatexCommand tableofcontents
132 \begin_layout Chapter
136 \begin_layout Standard
137 This manual covers the customization features present in LyX.
138 In it, we discuss issues like keyboard shortcuts, screen previewing options,
139 printer options, sending commands to LyX via the LyX Server, internationalizati
140 on, installing new LaTeX classes and LyX layouts, etc.
141 We can't possibly hope to touch on everything you can change---our developers
142 add new features faster than we can document them---but we will explain
143 the most common customizations and hopefully point you in the right direction
144 for some of the more obscure ones.
147 \begin_layout Chapter
148 LyX configuration files
151 \begin_layout Standard
152 \begin_inset LatexCommand label
157 This chapter aims to help you to find your way through the LyX configuration
159 Before continuing to read this chapter, you should find out where your
160 LyX library directory is by using
165 elp\SpecialChar \menuseparator
173 This directory is the place where LyX places its system-wide configuration
174 files, and we will simply name it
178 in the remainder of this document.
182 \begin_layout Section
190 \begin_layout Standard
195 and its sub-directories contain a number of files and that can be used
196 to customise LyX's behaviour.
197 You can change many of these files from within LyX itself through the
202 ools\SpecialChar \menuseparator
210 Most customization that you might want to do to LyX is possible through
212 However, many other inner aspects of LyX can be customized by modifying
218 They fall in different categories, described in the following subsections.
221 \begin_layout Subsection
222 Automatically generated files
225 \begin_layout Standard
226 These files are generated when you configure LyX.
227 They contain various default values that are guessed by inspection.
228 In general, it is not a good idea to modify them, since they might be overwritt
233 \labelwidthstring 00.00.0000
240 contains defaults for various commands.
244 \labelwidthstring 00.00.0000
251 contains the list of packages that have been recognized by LyX.
252 It is currently unused by the LyX program itself, but the information extracted
253 , and more, is made available with
258 elp\SpecialChar \menuseparator
270 \labelwidthstring 00.00.0000
277 is the list of text classes that have been found in your
281 directory, along with the associated LaTeX document class and their description.
285 \labelwidthstring 00.00.0000
290 is automatically generated during configuration from the file
297 \begin_layout Subsection
302 \labelwidthstring 00.00.0000
309 this directory contains files with the extension
313 that define the keybindings used in LyX (see section\InsetSpace ~
315 \begin_inset LatexCommand ref
316 reference "sec:bindings"
321 If there exists an internationalized version of the bind file named
325 , that will be used first.
326 See Chapter\InsetSpace ~
328 \begin_inset LatexCommand ref
329 reference "chap:i18n"
334 \begin_inset LatexCommand ref
335 reference "sec:bindings"
343 \labelwidthstring 00.00.0000
350 contains graphics files that can be included in documents.
355 \labelwidthstring 00.00.0000
362 contains LyX documentation files (including the one you are currently reading).
367 deserves special attention, as noted above.
368 If there exists an internationalized version of the help-document with
373 prepended to the name, that will be used first.
374 See Chapter\InsetSpace ~
376 \begin_inset LatexCommand ref
377 reference "chap:i18n"
385 \labelwidthstring 00.00.0000
392 contains example files that explain how to use some features.
393 In the file browser, press the
401 \labelwidthstring 00.00.0000
406 contains image files that are used by the
411 In addition, it also contains the individual icons used in the toolbar
412 and the banners that can be shown when LyX is launched.
416 \labelwidthstring 00.00.0000
423 contains keyboard keymapping files.
424 See Chapter\InsetSpace ~
426 \begin_inset LatexCommand ref
427 reference "sec:keymap"
435 \labelwidthstring 00.00.0000
442 contains the text class files described in Chapter\InsetSpace ~
444 \begin_inset LatexCommand ref
445 reference "chap:textclass"
453 \labelwidthstring 00.00.0000
458 contains some files that demonstrate the capabilities of the
460 External\InsetSpace ~
467 \labelwidthstring 00.00.0000
472 contains the standard LyX template files described in Chapter\InsetSpace ~
474 \begin_inset LatexCommand ref
475 reference "sec:templates"
483 \labelwidthstring 00.00.0000
488 contains some LaTeX cls files distributed with LyX.
492 \labelwidthstring 00.00.0000
497 contains files with the extension
501 that define the user interface to LyX.
502 That is, the files define which items appear in which menus and the items
503 appearing on the toolbar.
504 See Chapter\InsetSpace ~
506 \begin_inset LatexCommand ref
514 \begin_layout Subsection
515 Files you don't want to modify
518 \begin_layout Standard
519 These files are used internally by LyX and you generally do not need to
520 modify them unless you are a developer.
524 \labelwidthstring 00.00.0000
531 this file contains the list of LyX developers.
532 The contents are displayed with the menu entry
537 elp\SpecialChar \menuseparator
545 \labelwidthstring 00.00.0000
552 this is a LaTeX script used during the configuration process.
557 \labelwidthstring 00.00.0000
564 this is the script that is used to re-configure LyX.
565 It creates configuration files in the directory it was run from.
568 \begin_layout Subsection
569 Other files needing a line or two...
573 \labelwidthstring 00.00.0000
578 this contains tables describing how different character encodings can be
583 \labelwidthstring 00.00.0000
588 this file contains the templates available to the new
590 External\InsetSpace ~
597 \labelwidthstring 00.00.0000
602 this file contains a list of all the languages currently supported by LyX.
605 \begin_layout Section
606 Your local configuration directory
609 \begin_layout Standard
610 Even if you are using LyX as an unprivileged user, you might want to change
611 LyX configuration for your own use.
616 directory contains all your personal configuration files.
617 This is the directory described as
618 \begin_inset Quotes eld
622 \begin_inset Quotes erd
630 elp\SpecialChar \menuseparator
635 This directory is used as a mirror of
639 , which means that every file in
643 is a replacement for the corresponding file in
648 Any configuration file described in the above sections can be placed either
649 in the system-wide directory, in which case it will affect all users, or
650 in your local directory for your own use.
653 \begin_layout Standard
654 To make things clearer, let's provide a few examples:
657 \begin_layout Itemize
658 The preferences set in the
663 ools\SpecialChar \menuseparator
670 dialog are saved to a file
681 \begin_layout Itemize
682 When you reconfigure using
687 ools\SpecialChar \menuseparator
698 and the resulting files are written in your local configuration directory
699 (see section\InsetSpace ~
701 \begin_inset LatexCommand ref
702 reference "sec:autodetected"
706 to have a list of the
710 settings affected by this section).
711 This means that any additional text class file that you might have added
716 will be added to the list of classes in the
721 ayout\SpecialChar \menuseparator
731 \begin_layout Itemize
732 Similarly, if you have installed some LaTeX document classes in your home
733 directory, that LaTeX can find with your
737 path, they will show up in your list of text classes.
741 \begin_layout Standard
742 as long as LyX or yourself have a
746 file for it, of course.
754 \begin_layout Itemize
755 If you get some updated documentation from LyX ftp site and cannot install
756 it because you do not have sysadmin rights on your system, you can just
771 \begin_layout Section
772 Running LyX with multiple configurations
775 \begin_layout Standard
776 The configuration freedom of the local configuration directory may not suffice
777 if you want to have more than one configuration at your disposal.
778 For example, you may want to be use different key bindings or printer settings
780 You can achieve this by having several such directories.
781 You then specify which directory to use at run-time.
784 \begin_layout Standard
785 Invoking LyX with the command line switch
793 instructs the program to read the configuration from that directory, and
794 not from the default directory (you can determine the default directory
795 by running LyX without this switch as described above).
796 If this directory does not exist, LyX offers to create it for you, just
797 like it does for the default directory on the first time you run the program.
798 You can modify the configuration options in this additional
802 exactly as you would for the default directory.
803 These directories are completely independent (but read on).
804 Note that setting the environment variable
808 to some value has exactly the same effect
813 \begin_layout Standard
814 Having several configurations also requires more maintenance: if you want
815 to add a new layout to
819 which you want available from all your configurations, you must add it
820 to each directory separately.
821 You can avoid this with the following trick: after LyX creates the additional
822 directory, most of the subdirectories (see above) are empty.
823 If you want the new configuration to mirror an existing one, replace the
824 empty subdirectory with a symbolic link to the matching subdirectory in
825 the existing configuration.
832 subirectory, however, since it contains a file written by the configuration
833 script (also accessible through
838 ools\SpecialChar \menuseparator
844 \begin_inset LatexCommand ref
845 reference "sec:autodetected"
851 which is configuration-specific.
854 \begin_layout Chapter
862 \begin_layout Section
863 Using the dialog for the first time
866 \begin_layout Standard
871 file will contain only changes that you have made to the default behaviour,
872 some of which is hard-coded into LyX and some of which is contained in
875 LyXDir/lyxrc.defaults
878 Note that in both files lines beginning with a
879 \begin_inset Quotes eld
887 \begin_inset Quotes erd
890 are just comments and not interpreted.
891 However, only system administrators should edit
901 ools\SpecialChar \menuseparator
908 dialog to create and modify their own
915 \begin_layout Standard
921 ools\SpecialChar \menuseparator
928 dialog will be largely self-explanatory.
929 Almost all the commands have an associated comment, so you shouldn't have
930 too much trouble modifying it to taste.
931 Before we highlight a few of the more important commands below, however,
936 ing some of your changes (e.g., screen fonts) will have an instant effect.
938 changing the bind file) will not.
939 If nothing appears to have changed, just
943 the changes and restart LyX.
946 \begin_layout Section
950 \begin_layout Standard
951 The font used to display your documents on the LyX screen is very important,
952 since you'll be reading all your documents with this font.
953 Therefore it is important that the font is as readable and good-looking
955 The LyX team tried to provide the best possible default font for you, but
956 since practically all X11 systems are different, it's likely that the default
957 fonts will be sub-optimal on your system.
958 Fortunately, you can do something about this.
959 Before we explain how to do this, you should learn a bit more about fonts
960 so that you are better prepared for choosing your fonts, because it is
961 a trade-off that is specific to your preferences and the capabilities of
965 \begin_layout Standard
966 Notice that this section only deals with the fonts on the
970 inside the LyX window.
971 The fonts that appear on the
979 are independent from these fonts, and are determined by the document class.
984 to learn how to change the font of the printed version of your document.
987 \begin_layout Standard
988 Basically, screen fonts come in two different kinds: scalable outline fonts
989 and non-scalable bitmap fonts.
990 This distinction seems a bit arbitrary, since non-scalable fonts are actually
991 scalable in most modern font renderers.
992 The difference lies in the
996 of the scaling, and the
1001 The most important decision is thus whether you should use non-scalable
1002 bitmap fonts or scalable outline fonts.
1005 \begin_layout Standard
1006 The scalable fonts are built from
1010 of the single glyphs (i.e.
1011 characters) in the font.
1012 This means that each glyph is defined using mathematical curves that are
1013 well suited for scaling to any requested size.
1014 This mathematical definition is interpreted by the font renderer and turned
1015 into a small picture composed of pixels according to which size and glyph,
1016 the programmer requests.
1017 This means that scalable fonts will look pretty good in all sizes.
1018 Well, almost all sizes.
1019 Since scalable fonts are defined in an abstract way, it can be hard to
1020 provide a good rendering at small sizes, where each pixel has to be very
1021 carefully computed to provide a good image.
1022 Technically it is possible to do this from the mathematical definition,
1023 but in order to keep the rendering reasonably fast, tradeoffs have to be
1024 made, and the result is that scalable fonts can be difficult to read at
1028 \begin_layout Standard
1029 Bitmap fonts on the other hand, are defined by bitmap graphics from the
1030 start, so they will look good at all the sizes they are meant for.
1031 However, they don't scale well, because in order to scale a glyph, each
1032 pixel is enlarged into several pixels.
1033 It is the same effect that happens if you try to enlarge a picture in
1037 or any other picture manipulation program.
1038 In order to relieve this effect, bitmap fonts are typically provided in
1039 several fixed sizes typically from around 8 pixels high up to 34 pixels
1040 or so high in steps according to what is believed to be useful.
1041 The advantage of bitmap fonts is that no complicated computations are necessary
1042 to display each glyph, so bitmap fonts are thus faster displayed than scalable
1044 The disadvantage is that sizes that don't exists as fixed versions have
1045 to be scaled by doubling pixels, and thus look bad.
1048 \begin_layout Standard
1049 The net result of all this, is that bitmap fonts are generally best for
1050 the small sizes, where they are available, while scalable fonts are generally
1051 best for large sizes.
1052 The logical conclusion would thus be to use bitmap fonts for the small
1053 sizes, and scalable fonts for the large sizes.
1054 Unfortunately, this is not a good idea, since bitmap fonts and scalable
1055 fonts are not designed to be used together, so the overall look of such
1056 a scheme would be bad.
1057 The best you can do is thus to try both schemes and decide for yourself
1061 \begin_layout Standard
1062 By default, LyX uses non-scalable bitmap fonts (when using the XForms frontend).
1067 is used, for sans serif fonts,
1075 is used as the monospaced/typewriter font.
1078 \begin_layout Standard
1079 In the following, we will describe what to do if the text does not look
1081 We'll start with the most important parameters: DPI and font zoom.
1084 \begin_layout Subsection
1085 DPI setting and Font Zoom
1088 \begin_layout Standard
1089 LyX automatically tries to scale the fonts to look as close as the paper
1090 output size as possible, except for the so-called font zoom factor.
1093 \begin_layout Standard
1094 In order for this to work on all systems, it relies on the screen DPI (dots
1095 per inch) setting to be correct.
1096 The DPI setting for your system is autodetected by LyX using the information
1097 the X server can provide.
1098 You can check what LyX autodetects the DPI setting to, by running LyX as
1106 \begin_layout Standard
1107 On many systems, X is not set up correctly, so you should check that it
1110 \begin_inset Quotes eld
1118 \begin_inset Quotes erd
1121 and write down what the DPI is for the resolution you use (this will be
1122 close to the value LyX detects).
1123 It is the number mentioned as
1124 \begin_inset Quotes eld
1128 \begin_inset Quotes erd
1132 Also write down the number of pixels you have in the width (the first number
1134 \begin_inset Quotes eld
1138 \begin_inset Quotes erd
1144 \begin_layout Standard
1145 Then get the good old ruler out of the closet, and measure the width of
1146 the visible screen-image on your monitor.
1147 Convert this measurement to inches if you used a centimeter ruler by dividing
1149 Now you can determine the correct DPI setting for your screen by dividing
1150 the number of pixels in the width by the width of the screen-image on the
1152 If this number is more than, say, 5 DPI from the detected value, you should
1153 either fix the X setup, or at least tell LyX that the DPI is different
1154 than the detected value.
1157 \begin_layout Standard
1158 If you can't fix the X setup (which of course is best since other programs
1159 than LyX will benefit from this as well), you can tell LyX the correct
1167 \begin_layout Standard
1168 If the text is too small or too big for your taste, you should fiddle with
1169 the font zoom setting.
1170 This setting is used to scale the point size of the text.
1171 If your DPI setting is correct, and the font zoom setting is set to 100,
1172 this means that LyX will try to display the text exactly the same size
1173 as it will appear on the paper-output.
1174 If you set the zoom factor to 200, the text will try to be 2 times as big
1176 Of course, this will only happen if LyX can find a font that has the appropriat
1177 e size, which you can't count on.
1178 Since LyX is a WYSIWYM system anyways, this limitation isn't much of an
1182 \begin_layout Standard
1183 The default font zoom setting is 150, since a monitor is typically wider
1184 than a piece of paper, but you should try to fiddle with it through the
1198 dialog to find a size that you like.
1199 When you've found a setting that seems to work nicely for you (tip: use
1207 button to keep the dialog open while you experiment), you can make this
1208 setting the default by using the
1218 \begin_layout Standard
1219 While it is often possible to find a suitable size for the text on the screen,
1220 this doesn't necessarily mean that the fonts are the best ones available
1222 In order to help you get the most out of your system, you can use the font
1223 definition commands to fine-tune the look of the text in greater detail
1227 \begin_layout Subsection
1228 Font definition commands
1231 \begin_layout Standard
1232 As mentioned, LyX uses non-scalable bitmap fonts by default with the XForms
1238 is used, for sans serif fonts,
1246 is used as the monospaced/typewriter font.
1249 \begin_layout Standard
1250 You can change all of these from within the
1255 The number of fonts that are available on different systems vary, but the
1260 should be available everywhere.
1261 Use that program to find candidate fonts.
1262 When you've found a font that you like, try to insert the first two elements
1264 \begin_inset Quotes eld
1268 \begin_inset Quotes erd
1272 \begin_inset Quotes eld
1276 \begin_inset Quotes erd
1283 ) in the appropriate field in the
1295 LyX will then reformat your document using the new font, and if you like
1296 the font, you should
1304 One place to start for a new font is to see if the scalable font
1305 \begin_inset Quotes eld
1309 \begin_inset Quotes erd
1313 Tip: You can see whether a font is a bitmap font or a scalable font by
1315 \begin_inset Quotes eld
1319 \begin_inset Quotes erd
1323 \begin_inset Quotes eld
1327 \begin_inset Quotes erd
1335 If the value 0 is available, the font is scalable.
1336 If the value 0 isn't available, the font is a bitmap font.
1339 \begin_layout Standard
1340 Before you go about scrapping a bitmap font because the larger sizes look
1342 \begin_inset Quotes eld
1346 \begin_inset Quotes erd
1349 , you should toggle the
1350 \begin_inset Quotes eld
1354 \begin_inset Quotes erd
1358 This is only useful if you use bitmap fonts, because only these don't scale
1360 If you define this flag, LyX will only use the fixed font sizes that are
1361 available, and this guarantees that all bitmap fonts look well.
1362 (You can see which individual font sizes are available with the
1371 .) However, the prize is that the difference between the size of the fonts
1372 on screen and the size of fonts on paper will be larger because LyX will
1373 have to be satisfied with the closest available size, and not try to scale
1375 Also, you can risk that some logically different sizes, such as
1383 , will be mapped to the same screen font, making it hard for you to see
1384 the difference on screen.
1385 We've decided not to use scalable fonts by default because of these artifacts,
1386 but since LyX is a WYSIWYM system, many people like to use the flag anyways,
1387 well-knowing that the font size on the screen can't be trusted.
1388 But remember that this flag only makes a difference when you use bitmap
1390 Scalable fonts won't be affected for reasons you should understand by now.
1393 \begin_layout Standard
1394 One final note regarding this flag: you should know that there is nothing
1395 wrong with using bitmap and scalable fonts at the same time for different
1397 For instance, it's common to use the scalable
1398 \begin_inset Quotes eld
1402 \begin_inset Quotes erd
1405 for the serif text together with a bitmap version of
1406 \begin_inset Quotes eld
1410 \begin_inset Quotes erd
1414 And you can safely select the
1415 \begin_inset Quotes eld
1419 \begin_inset Quotes erd
1422 button without worries: It will only apply to the Helvetica font.
1425 \begin_layout Standard
1426 Sometimes the artifacts introduced by use of the flag can be relieved by
1427 using the fine-detail screen font sizes which defines which point sizes
1428 the different logical font sizes correspond to.
1433 to see exactly what concrete fonts the logical sizes map to, and try adjusting
1434 the corresponding entries in the
1438 dialog until you've managed to hit the nail and get the fonts you want.
1439 This can be hard to do, because LyX uses the DPI setting and the font zoom
1440 settings to calculate which exact screen font size to ask the X server
1441 for, thus obfuscating the mapping.
1442 If you can't make it by trial-and-error, you can make the process more
1443 transparent if you set both the DPI setting and font zoom settings to 100---eve
1444 n when this is known to be wrong.
1445 This will of course make your scalable fonts look weird, so use with care.
1448 \begin_layout Subsection
1452 \begin_layout Standard
1453 By default, LyX will use fonts meant to write Western European text, including
1454 all kinds of English.
1455 This is defined through the so-called
1464 If you want to use LyX to write for instance Eastern European text, Cyrillic
1465 or any other language not covered by the ISO-8859-1 font encoding, you
1466 can define a different one with the encoding setting.
1467 This requires you to have special fonts installed.
1472 to see whether this is the case: check the
1473 \begin_inset Quotes eld
1477 \begin_inset Quotes erd
1481 \begin_inset Quotes eld
1485 \begin_inset Quotes erd
1488 fields for ISO-8859-X values different from ISO-8859-1, and search for
1489 one that contains the national characters of your language.
1490 If you find any, enter this encoding in the dialog.
1491 If not, go searching the Web for appropriate fonts.
1492 For the Qt frontend, it's recommended you use an iso646 font set.
1495 \begin_layout Standard
1496 When you've set LyX up to use a different font encoding, you should also
1497 consider changing the font used by dialog windows in LyX.
1504 dialog will not be understandable unless you tell LyX to use a different
1506 By default the menu font is set to
1508 -*-helvetica-medium-r
1510 , but often Helvetica is not available in the font encoding you need, so
1511 the dialog allows this to be changed.
1514 \begin_layout Standard
1515 As you can see, there are quite a few options that can be used to fine tune
1516 the look of your fonts.
1517 This should not scare you from fiddling with the settings, because after
1518 all, you will hopefully be using LyX for many hours in the future.
1519 And contrary to real WYSIWYG word processors where you are tied to using
1520 fonts that have to look good both on paper and on screen, LyX gives you
1521 the possibility of using fonts that are designed to look good on the screen
1522 while using a different set of fonts to look good on paper.
1525 \begin_layout Section
1527 \begin_inset LatexCommand label
1535 \begin_layout Standard
1536 Bindings are used to, well, bind a function to a key.
1537 Several prepackaged binding files are available: a CUA set of bindings
1538 (familiar as the typical set of PC and CDE set of keyboard shortcuts),
1539 an Emacs set of bindings, for those of us who follow the One True Way and
1540 refuse to lower our standards,
1544 \begin_layout Standard
1545 I'm kidding here, of course!
1550 as well as specialty bindings (broadway and hollywood) and other languages
1551 (French, German, etc.).
1554 \begin_layout Standard
1555 If, however, you'd like to customise the keybindings to your own exacting
1556 tastes, then copy the best-fit file in
1565 Don't forget to load this new file into LyX using the
1570 (For the moment you'll have to restart LyX for these changes to take effect.)
1573 \begin_layout Standard
1574 LyX supports internationalization of the user interface (see Chapter\InsetSpace ~
1576 \begin_inset LatexCommand ref
1577 reference "chap:i18n"
1586 is set, with the environment variable
1590 , LyX will try to use bindfiles by prepending
1595 For example, you can put a translated copy of some standard bind file in
1600 directory, and LyX will use it automatically.
1603 \begin_layout Standard
1608 files is straightforward:
1611 \begin_layout Standard
1616 bind <key combination> <lyx-function>
1619 \begin_layout Standard
1620 Both key combination and lyx-function (including any arguments) must be
1621 enclosed in "double quotes".
1622 All the LyX functions are listed in the
1629 \begin_layout Section
1631 \begin_inset LatexCommand label
1639 \begin_layout Standard
1640 The appearance of both the menu and toolbar may both be changed using the
1655 For the moment, only one file exists,
1659 , but feel free to experiment.
1660 Just copy the file to the
1664 directory and play! Note that, for the moment, you'll have to restart LyX
1665 for these changes to take effect.
1668 \begin_layout Standard
1673 files is straightforward: have a look at
1686 entries must be ended with an explicit
1711 s and in the case of the
1712 \begin_inset Quotes eld
1716 \begin_inset Quotes erd
1724 One small word of warning.
1729 s may be inserted in a
1737 , but they are defined as
1748 \begin_layout Section
1749 \begin_inset LatexCommand label
1750 name "sec:converters-etc"
1754 Converters, Formats, and Copiers
1757 \begin_layout Standard
1758 LyX has a powerful mechanism to convert to and from any file format using
1763 \begin_layout Subsection
1767 \begin_layout Standard
1768 The first step is to define your file formats if they are not already defined.
1771 Tools\SpecialChar \menuseparator
1772 Preferences:Converters
1775 Enter a new format name; a new GUI name (used in e.\InsetSpace \thinspace{}
1785 menus); and a file extension.
1790 \begin_layout Standard
1795 option tells LyX that a format is suitable for document export.
1796 If this is is set and if a suitable conversion route exists, the format
1799 File\SpecialChar \menuseparator
1803 The format will also appear in the
1807 menu if it has a specified viewer.
1808 Pure image formats, e.\InsetSpace \thinspace{}
1814 , should not use this option.
1815 Formats that can both represent vector graphics and documents like e.\InsetSpace \thinspace{}
1824 \begin_layout Standard
1827 Vector graphics format
1829 tells LyX that a format can contain vector graphics.
1830 This information is used to determine the target format of included graphics
1836 Included graphics may need to be converted to either
1852 cannot handle other image formats.
1853 If an included graphic is not already in
1865 format, it is converted to
1869 if the vector format option is set, and otherwise to
1876 \begin_layout Standard
1877 A Format can have a Viewer and Editor program associated with it.
1878 For example, you might want to use
1882 to view PostScript files.
1883 You can enter the program call and its options to the corresponding fields.
1884 For the call you can use the four variable listed in the next section.
1885 The viewer is launched when you view an image in LyX or use the
1890 If the operating system has a default viewer associated to a format, this
1891 viewer is used instead of the one defined here when you enter in the Viewer
1893 \begin_inset Quotes eld
1901 \begin_inset Quotes erd
1905 The editor is for example launched when you press the
1920 \begin_layout Subsection
1924 \begin_layout Standard
1925 Each format can have a Copier associated with it.
1926 These are defined in the
1928 Tools\SpecialChar \menuseparator
1932 Since all conversions from one format to another take place in LyX's temporary
1933 directory, it is sometimes necessary to modify a file before copying it
1934 to the temporary directory in order that the conversion may be performed.
1938 \begin_layout Standard
1939 For example, the file may refer to other files---images, for example---using
1940 relative filenames, and these may become invalid when the file is copied
1941 to the temporary directory.
1946 This is done by the Copier: It copies a file to (or from) the temporary
1947 directory and may modify it in the process.
1950 \begin_layout Standard
1951 Copiers may also be used for other purposes.
1952 For example, if appropriate converters are found, LyX will automatically
1953 install copiers for the
1963 When these formats are exported, the copier sees that not just the main
1964 HTML file but various associated files (style files, images, etc.) are also
1966 All these files are written to a subdirectory of the directory in which
1967 the original LyX file was found.
1970 \begin_layout Standard
1971 Copier can of course be customized.
1973 \begin_inset Quotes eld
1977 \begin_inset Quotes erd
1980 argument takes a comma-separated list of extensions to be copied; if it
1981 is omitted, all files will be copied.
1983 \begin_inset Quotes eld
1987 \begin_inset Quotes erd
1990 argument determines the extension added to the generated directory.
1992 \begin_inset Quotes eld
2000 \begin_inset Quotes erd
2003 , so HTML generated from
2005 /path/to/filename.lyx
2009 /path/to/filename.html.LyXconv
2015 \begin_layout Standard
2016 The definitions of the copiers may use four variables:
2020 \labelwidthstring 00.00.0000
2021 $$s The LyX system directory (e.\InsetSpace \thinspace{}
2031 \labelwidthstring 00.00.0000
2036 \labelwidthstring 00.00.0000
2041 \labelwidthstring 00.00.0000
2042 $$l The `LaTeX name'
2045 \begin_layout Standard
2046 The latter is to be given in a form suitable for inclusion in a LaTeX's
2053 command and is relevant only when exporting files suitable for such inclusion.
2056 \begin_layout Subsection
2060 \begin_layout Standard
2061 To define a new converter, select an existing one, select a different format
2067 and\InsetSpace \thinspace{}
2068 /\InsetSpace \thinspace{}
2074 drop-down list, modify the
2078 field, and press the
2085 \begin_layout Standard
2086 You do not have to define converters between all the formats between which
2087 you want to convert.
2088 For example, you will note that there is no `LyX to PostScript' converter,
2089 but LyX will export PostScript.
2090 It does so by first creating a LaTeX file (no converter needs to be defined
2091 for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2092 and finally converts the resulting DVI file to PostScript.
2093 LyX finds such `chains' of converters automatically, and it will always
2094 choose the shortest possible chain.
2095 You can, though, still define multiple conversion methods between file
2097 For example, the standard LyX configuration provides three ways to convert
2098 LaTeX to PDF: Directly, using
2102 ; via (DVI and) PostScript, using
2111 To define such alternate chains, you must define multiple target `file
2112 formats', as described in the next section.
2113 For example in the standard configuration the formats named
2125 are defined, all of which share the extension
2132 \begin_layout Standard
2133 Several variables can be used in the definition of converters:
2137 \labelwidthstring 00.00.0000
2138 $$s The LyX system directory
2142 \labelwidthstring 00.00.0000
2147 \labelwidthstring 00.00.0000
2152 \labelwidthstring 00.00.0000
2153 $$b The base filename of the input file
2157 \labelwidthstring 00.00.0000
2158 $$p The path to the input file
2161 \begin_layout Standard
2167 field you can enter the following flags, separated by commas:
2171 \labelwidthstring 00.00.0000
2172 latex This converter runs some form of LaTeX.
2173 This will make LyX's LaTeX error logs available.
2177 \labelwidthstring 00.00.0000
2178 needaux Needs the LaTeX
2182 file for the conversion.
2186 \labelwidthstring 00.00.0000
2190 \begin_layout Standard
2191 The following three flags are not really flags at all because they take
2202 \labelwidthstring 00.00.0000
2203 parselog If set, the converter's standard error will be redirected to a
2208 , and the script given as argument will be run as:
2210 script <infile.out >infile.log
2213 The argument may contain $$s.
2217 \labelwidthstring 00.00.0000
2218 resultdir The name of the directory in which the
2222 will dump the generated files.
2223 LyX will not create this directory, and it does not copy anything into
2224 it, though it will copy this directory to the destination.
2225 The argument may contain $$b, which will be replaced by the basename of
2226 the input and output files, respectively, when the directory is copied.
2229 that resultdir and usetempdir make no sense together.
2230 The latter will be ignored if the former is given.
2234 \labelwidthstring 00.00.0000
2235 resultfile Determines the output filename and may, contain $$b.
2236 Sensible only with resultdir, and optional even then; if not given, it
2237 defaults to `index'.
2240 \begin_layout Standard
2241 None of these last three are presently used in any of the converters that
2242 are installed with LyX.
2244 \begin_inset LatexCommand ref
2245 reference "sub:LyX-and-Literate"
2249 of the Extended Features guide for some examples of how you might use parselog.
2252 \begin_layout Section
2253 BibTeX and makeindex
2256 \begin_layout Standard
2257 Both the bibliography generating command (default
2261 ) and the index generating command (default
2274 As an alternative for
2286 \begin_layout Standard
2287 The command to enter is
2293 makeindex.sh -m $$lang
2296 \begin_layout Standard
2297 where the placeholder
2301 will be replaced by the chosen document (babel) language.
2305 \begin_layout Standard
2306 have installed the packages
2323 at a shell prompt for a help page.
2326 \begin_layout Section
2327 Plain text export options
2330 \begin_layout Standard
2331 \begin_inset VSpace bigskip
2337 \begin_layout Standard
2339 There are a couple of commands that can be used to
2340 \begin_inset Quotes eld
2344 \begin_inset Quotes erd
2347 exported plain text files.
2348 Note that LyX automatically detects and uses the best settings for your
2349 system at installation time, but you can modify them if you disagree with
2353 \begin_layout Description
2357 Plain text\InsetSpace ~
2361 This option defines the command used to produce better plain text tables
2366 UNIX-commands (refer to their manpages for more information about them).
2367 Setting this as empty tells LyX to use the internal (inferior) formatter.
2370 \begin_layout Description
2374 Plain text\InsetSpace ~
2379 With this command you can set the default line length of the plain text
2381 Setting it to 0 means endless lines.
2384 \begin_layout Section
2388 \begin_layout Standard
2389 There are a bunch of configuration options that are used for interaction
2390 with the external print command from LyX.
2391 Normally the defaults are fine: if, however, your print command takes different
2392 option names, you can modify them here.
2395 \begin_layout Subsection
2399 \begin_layout Standard
2400 You can change the colors used by LyX on-screen using the new
2405 Alternatively, if you're feeling particularly perverse you could use the
2410 bindable function (see the
2415 Input would have the format:
2418 \begin_layout Standard
2421 set-color LyXName X11Color
2424 \begin_layout Standard
2425 Here is a (partial) list of the functions and default colors:
2428 \begin_layout Standard
2430 \begin_inset Tabular
2431 <lyxtabular version="3" rows="10" columns="3">
2433 <column alignment="left" valignment="top" leftline="true" width="0pt">
2434 <column alignment="left" valignment="top" leftline="true" width="0pt">
2435 <column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
2436 <row topline="true" bottomline="true">
2437 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2440 \begin_layout Standard
2455 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2458 \begin_layout Standard
2473 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2476 \begin_layout Standard
2492 <row topline="true">
2493 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2496 \begin_layout Standard
2511 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2514 \begin_layout Standard
2529 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2532 \begin_layout Standard
2548 <row topline="true">
2549 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2552 \begin_layout Standard
2567 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2570 \begin_layout Standard
2585 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2588 \begin_layout Standard
2604 <row topline="true">
2605 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2608 \begin_layout Standard
2623 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2626 \begin_layout Standard
2641 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2644 \begin_layout Standard
2660 <row topline="true">
2661 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2664 \begin_layout Standard
2679 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2682 \begin_layout Standard
2697 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2700 \begin_layout Standard
2716 <row topline="true">
2717 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2720 \begin_layout Standard
2735 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2738 \begin_layout Standard
2748 fraction Lines, brackets, etc.
2753 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2756 \begin_layout Standard
2772 <row topline="true">
2773 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2776 \begin_layout Standard
2791 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2794 \begin_layout Standard
2800 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2803 \begin_layout Standard
2819 <row topline="true">
2820 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2823 \begin_layout Standard
2838 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2841 \begin_layout Standard
2847 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2850 \begin_layout Standard
2866 <row topline="true">
2867 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2870 \begin_layout Standard
2885 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2888 \begin_layout Standard
2894 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2897 \begin_layout Standard
2913 <row topline="true" bottomline="true">
2914 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2917 \begin_layout Standard
2932 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2935 \begin_layout Standard
2945 selection background
2950 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2953 \begin_layout Standard
2976 \begin_layout Section
2977 The autodetected settings
2980 \begin_layout Standard
2981 \begin_inset LatexCommand label
2982 name "sec:autodetected"
2986 There are several items that are detected for you when you run
2993 \SpecialChar \menuseparator
2999 In this section, we list those which pertain to the user preferences.
3002 \begin_layout Description
3008 plaintext_roff_command
3023 , depending on what is available.
3026 \begin_layout Description
3039 plus a bunch of options.
3042 \begin_layout Description
3055 on systems (so-called System V) who have this command, and
3059 otherwise (BSD systems).
3062 \begin_layout Description
3068 print_spool_printerprefix
3079 , depending on whether
3090 \begin_layout Description
3107 fonts are found and LaTeX has support for these fonts built-in.
3108 You can set it manually if you only have the so-called
3115 \begin_layout Section
3119 \begin_layout Standard
3120 There are many other configuration options that can be used to customize
3122 We still need to document them here, but again, most should be fairly obvious.
3123 Please ask on the mailing lists if you need some more information; it may
3124 even prompt us to expand this section.
3127 \begin_layout Chapter
3128 Internationalizing LyX
3129 \begin_inset LatexCommand label
3137 \begin_layout Standard
3138 LyX supports using a translated interface.
3139 Last time we checked, LyX provided text in 14 languages together with the
3140 default English text.
3141 The language of choice is called your
3146 (For further reading on locale settings, see also the documentation for
3147 locale that comes with your operating system.
3148 For Linux, the manual page for locale(5) could be a good place to start).
3151 \begin_layout Standard
3152 Notice that these translations will work, but do contain a few flaws.
3153 In particular, all dialogs have been designed with the English text in
3154 mind, which means that some of the translated text will be too large to
3155 fit within the space allocated.
3156 This is only a display problem and will not cause any harm.
3157 Also, you will find that some of the translations do not define short-cut
3158 keys for everything.
3159 Sometimes, there are simply not enough free letters to do it.
3160 Other times, the translator just hasn't got around to doing it yet.
3161 Our localization team -- which you may wish to join -- will try to fix
3162 these shortcomings in future versions of LyX.
3165 \begin_layout Section
3166 Selecting an alternative language for the user interface
3169 \begin_layout Standard
3170 This feature is disabled by default, meaning that system default language
3172 To enable an alternative language, you have to set an appropriate environment
3180 for csh class shells
3195 with the two letter code (or four letter code, like
3199 for British English) for the language you want.
3205 Besides the user interface texts being translated, also the appropriate
3206 manuals will be presented under the Help menu -- if available.
3209 \begin_layout Standard
3210 On some systems, you may have to redefine
3222 , to override the system settings; their preference is in this order
3226 \begin_layout Standard
3227 The shell variable LANGUAGE has been disabled in LyX for technical reasons.
3233 , which corresponds to the way GNU
3238 Consult your system documentation.
3239 Normally, you'll want to put the appropriate line in a shell script run
3240 on start-up, so that the translation is on by default.
3241 Remember that this affects
3245 localized packages, not only LyX!
3248 \begin_layout Standard
3249 If LyX is configured and compiled with
3250 \begin_inset Quotes eld
3258 \begin_inset Quotes erd
3261 , this mechanism will not work.
3264 \begin_layout Section
3268 \begin_layout Subsection
3269 Translating the graphical user interface (text messages).
3272 \begin_layout Standard
3277 library to handle the internationalization of the interface.
3278 To have LyX speak your favorite language in all menus and dialogs, you
3283 -file for that language.
3284 When this is available, you'll have to generate a mo-file from it and install
3290 The process of doing all of this is explained in the documentation for
3295 , but in short, this is what you do (
3299 denotes the language code):
3302 \begin_layout Standard
3306 \begin_layout Standard
3318 \begin_layout Itemize
3321 LYX-SOURCE-DIR/po/lyx.pot
3334 doesn't exist, it can be remade with
3338 in that directory, or you can use an existing po-file for some other language
3342 \begin_layout Itemize
3349 \begin_layout Standard
3350 We recommend that you use Emacs to do this, since the
3354 distribution includes a nice mode that supports you in doing this.
3362 For some menu- and widget-labels, there are also shortcut keys that should
3364 Those keys are marked after a `|', and should be translated according to
3365 the words and phrases of the
3370 There is a tool named
3374 written in Prolog in
3376 LYX-SOURCE-DIR/development/tools/
3378 that may be useful to help determine short-cut keys.
3379 Note that XForms (version 0.86 at least) can't handle anything but 7-bit
3380 characters as shortcut keys.
3381 You should also fill also out the information at the beginning of the new
3386 -file with your email-address, etc., so people know where to reach you with
3387 suggestions and entertaining flames.
3390 \begin_layout Itemize
3399 This can be done with
3420 \begin_layout Itemize
3425 -file to your locale-tree, at the correct directory for application messages
3430 , and under the name
3439 /usr/local/share/locale/
3450 \begin_layout Standard
3454 \begin_layout Standard
3466 \begin_layout Standard
3467 Adding a new po-file to the
3471 of LyX involves altering the configure scripts and more, but the way
3475 works, you don't actually need the source-code of LyX to translate it---having
3491 \begin_layout Standard
3492 If you've written a translation file for a language that LyX does not currently
3493 support, feel free to submit it for inclusion by sending a patch.
3494 In this case, we recommend that you read the
3502 directory for more instructions.
3505 \begin_layout Subsubsection
3509 \begin_layout Standard
3510 Sometimes it turns out that one english message needs to be translated into
3511 different messages in the target language.
3512 One example is the message
3516 which has the german translation
3533 does not handle such ambigous translations.
3534 Therefore you have to add some context information to the message: Instead
3541 To[[as in 'From format x to format y']]
3545 To[[as in 'From page x to page y']].
3548 Now the two occurences of
3556 and can be translated correctly to
3571 \begin_layout Standard
3572 Of course the context information needs to be stripped off the original
3573 message when no translation is used.
3574 Therefore you have to put it in double square brackets at the end of the
3575 message (see the example above).
3576 The translation mechanism of LyX ensures that everything in double square
3577 brackets at the end of messages is removed before displaying the message.
3580 \begin_layout Subsection
3581 Translating the documentation.
3584 \begin_layout Standard
3585 The online documentation (in the
3592 -menu) can (and should!) be translated.
3593 If there are translated versions of the documentation available
3597 \begin_layout Standard
3598 As of February 2003, almost all of the docs have been translated into German
3604 has been translated into at least 12 other languages, with other translations
3606 The library of translated documents is growing rapidly.
3611 , and the locale is set accordingly, these will be used automagically by
3613 LyX looks for translated versions as
3627 denotes the language as set by the environmental variable
3632 If there are none, the default English versions will be displayed.
3633 Note that the translated versions must have the same filenames (
3637 above) as the original.
3638 If you feel up to translating the documentation (an excellent way to proof-read
3639 the original documentation BTW!), there are a few things you should do
3643 \begin_layout Itemize
3648 , the guide to writing LyX documentation.
3649 Pay special attention to the translator's section.
3652 \begin_layout Itemize
3653 Check out the documentation translation web page at
3654 \begin_inset LatexCommand url
3655 name "The LyX Developer's Web Site"
3656 target "http://www.devel.lyx.org"
3661 That way, you can find out which (if any) documents have already been translate
3662 d into your language.
3663 You can also find out who (if anyone) is organizing the effort to translate
3664 the documentation into your language.
3665 If no one is organizing the effort, please let us know that you're interested.
3668 \begin_layout Standard
3669 Once you get to actually translating, here's a few hints for you that may
3673 \begin_layout Itemize
3674 Join the documentation team! There is information on how to do that in
3683 elp\SpecialChar \menuseparator
3690 ), which by the way is the first document you should translate.
3693 \begin_layout Itemize
3694 Learn the typographic conventions for the language you are translating to.
3695 Typography is an ancient art and over the centuries, a great variety of
3696 conventions have developed throughout different parts of the world.
3697 Also study the professional terminology amongst typographers in your country.
3698 Inventing your own terminology will only confuse the users.
3701 (Warning! Typography is addictive!)
3704 \begin_layout Itemize
3705 Make a copy of the document.
3706 This will be your working copy.
3707 You can use this as your personal translated help-file by placing it in
3715 \begin_layout Itemize
3716 Sometimes the original document (from the LyX-team) will be updated.
3717 Use the ViewCVS tool available at
3718 \begin_inset LatexCommand htmlurl
3719 target "http://www.lyx.org/viewcvs.cgi/lyxdoc/"
3723 to see what has been changed
3727 \begin_layout Standard
3728 Alternatively, you can keep a copy of the latest version of the English
3729 document which you've translated.
3735 That way you can easily see which parts of the translated document need
3739 \begin_layout Itemize
3740 If you ever find an error in the original document, fix it and notify the
3741 rest of the documentation team of the changes! (You didn't forget to join
3742 the documentation team did you?)
3745 \begin_layout Section
3746 International Keyboard Support
3749 \begin_layout Standard
3752 [Editor's Note: The following section is by
3760 It needs to be fixed to conform to the new Documentation Style sheet and
3761 to make use of the new v1.0 features.
3762 The whole thing also needs to be merged with the section following it.-jw]
3765 \begin_layout Subsection
3766 Defining Own Keymaps: Keymap File Format
3769 \begin_layout Standard
3770 Let's look at a keyboard definition file a little closer.
3771 It is a plain text file defining
3774 \begin_layout Itemize
3775 key-to-key or key-to-string translations
3778 \begin_layout Itemize
3782 \begin_layout Itemize
3783 dead keys exceptions
3786 \begin_layout Standard
3787 To define key-to-key or key-to-string translation, use this command:
3790 \begin_layout Quotation
3806 \begin_layout Standard
3811 is the key to be translated and
3815 is the string to be inserted into the document.
3816 To define dead keys, use:
3819 \begin_layout Quotation
3835 \begin_layout Standard
3845 The following dead keys are supported (shortcut name is in parentheses):
3848 \begin_layout Quotation
3856 \begin_layout Quotation
3862 \begin_layout Quotation
3868 \begin_layout Quotation
3874 \begin_layout Quotation
3880 \begin_layout Quotation
3887 \begin_layout Standard
3899 \begin_layout Quotation
3905 \begin_layout Quotation
3912 \begin_layout Standard
3924 \begin_layout Quotation
3930 \begin_layout Quotation
3936 \begin_layout Quotation
3943 \begin_layout Standard
3955 \begin_layout Quotation
3962 \begin_layout Standard
3974 \begin_layout Quotation
3980 \begin_layout Quotation
3981 hungarian umlaut (hug)
3986 \begin_layout Quotation
3992 \begin_layout Quotation
3999 \begin_layout Standard
4011 \begin_layout Standard
4012 Since in many international keyboards there are exceptions to what some
4013 dead keys should do, you can define them using
4016 \begin_layout Quotation
4025 deadkey key outstring
4028 \begin_layout Standard
4029 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
4033 \begin_layout Quotation
4047 \begin_layout Standard
4048 to make it work correctly.
4049 Also, you have to define as exceptions dead keys over i and j, to remove
4050 the dot from them before inserting an accent mark.
4051 I will change this when the time comes, but so far I haven't had time.
4054 \begin_layout Standard
4055 Oh, and about characters: backslash is escaped, so to enter it, you'll need
4061 have different meaning.
4066 marks comments, quotes start and end LaTeX-style commands.
4067 To enter quote, you'll need to use
4086 \begin_layout Standard
4087 If you make a keyboard description file that works for your language, please
4088 mail it to me, so I can include it in the next keymap distribution.
4091 \begin_layout Standard
4092 More keywords will be supported in keymap configuration file in future,
4096 \begin_layout Itemize
4114 \begin_layout Itemize
4129 an external keymap translation program
4132 \begin_layout Standard
4133 Also, it should look into
4137 file for defaults, too (for example, a
4143 option to include default keyboard).
4146 \begin_layout Section
4147 International Keymap Stuff
4148 \begin_inset LatexCommand label
4156 \begin_layout Standard
4157 The next two sections describe the
4169 file syntax in detail.
4170 These sections should help you design your own key map if the ones provided
4171 do not meet your needs.
4174 \begin_layout Subsection
4178 \begin_layout Standard
4187 file maps keystrokes to characters or strings.
4188 As the name suggests it sets a keyboard mapping.
4213 are described in this section.
4217 \labelwidthstring 00.00.0000
4224 Map a character to a string
4227 \begin_layout LyX-Code
4242 \begin_layout Standard
4275 the double-quote (")
4292 must be escaped with a preceding backslash (
4303 \begin_layout Standard
4310 statement to cause the symbol
4316 to be output for the keystroke
4325 \begin_layout LyX-Code
4332 \labelwidthstring 00.00.0000
4339 Specify an accent character
4342 \begin_layout LyX-Code
4351 \begin_layout Standard
4352 This will make the cha
4390 This is the dead key
4394 \begin_layout Standard
4401 refers to a key that does not produce a character by itself, but when followed
4402 with another key, produces the desired accent character.
4403 For example, a German characte
4405 r with an umlaut like
4415 can be produced in this manner.
4424 \begin_layout Standard
4437 and then another key not in
4454 followed by the other, unallowed key, as output.
4463 cancels a dead key, so if
4480 , the cursor will not go one position backwards but will instead cancel
4497 might have had on the next keystroke.
4501 \begin_layout Standard
4502 The following example specifies that the character ' is to be an acute accent,
4503 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4506 \begin_layout LyX-Code
4509 kmod ' acute aeiouAEIOU
4513 \labelwidthstring 00.00.0000
4518 Specify an exception to the accent character
4521 \begin_layout LyX-Code
4530 \begin_layout Standard
4531 This defines an exce
4572 have been assigned a keystroke with a previous
4595 must not belong in the
4647 If such a declaration does not exist in
4703 \begin_layout Standard
4704 The following command produces causes äi to be produced when you enter acute-i
4708 \begin_layout LyX-Code
4723 \labelwidthstring 00.00.0000
4728 Combine two accent characters
4731 \begin_layout LyX-Code
4737 accent1 accent2 allowed
4740 \begin_layout Standard
4741 This one is getting pretty esoteric.
4742 It allows you to combine the effect
4823 \begin_layout Standard
4824 Consider this example from the
4833 \begin_layout LyX-Code
4836 kmod ; acute aeioyvhAEIOYVH
4840 kcomb acute umlaut iyIY
4843 \begin_layout Standard
4844 This allows you to press
4850 and get the effect of
4867 in this case cancels the last dead key, so if you press
4884 \begin_layout Subsection
4888 \begin_layout Standard
4895 mapping is performed, a
4902 file maps the strings that the symbols generate to characters in the current
4904 The LyX distribution currently includes at least the
4919 \begin_layout Standard
4926 file is a sequence of declarations of the form
4929 \begin_layout LyX-Code
4942 \begin_layout Standard
4943 For example, in order to map
4951 to the corresponding character in the iso-8859-1 set (233), the following
4955 \begin_layout LyX-Code
4963 \begin_layout Standard
4986 the same character can apply to more than one string.
4997 \begin_layout LyX-Code
5023 \begin_layout Standard
5024 If LyX cannot find a mapping for the string produced by the keystroke or
5025 a deadkey sequence, it will check if it looks like an accented char and
5026 try to draw an accent over the character on screen.
5029 \begin_layout Subsection
5033 \begin_layout Standard
5034 There is a second way to add support for international characters through
5035 so-called dead-keys.
5036 A dead-key works in combination with a letter to produce an accented character.
5037 Here, we'll explain how to create a really simple dead-key to illustrate
5041 \begin_layout Standard
5042 Suppose you happen to need the circumflex character,
5043 \begin_inset Quotes eld
5047 \begin_inset Quotes erd
5055 -key [a.k.a.\InsetSpace ~
5060 ] to the LyX command
5069 Now, whenever you type the
5073 -key followed by a letter, that letter will have a circumflex accent on
5075 For example, the sequence
5076 \begin_inset Quotes eld
5084 \begin_inset Quotes erd
5087 produces the letter:
5088 \begin_inset Quotes eld
5092 \begin_inset Quotes erd
5096 If you tried to type
5097 \begin_inset Quotes eld
5105 \begin_inset Quotes erd
5108 , however, LyX will complain with a beep, since a
5109 \begin_inset Quotes eld
5117 \begin_inset Quotes erd
5120 never takes a circumflex accent.
5125 after a dead-key produces the bare-accent.
5126 Please note this last point! If you bind a key to a dead-key, you'll need
5127 to rebind the character on that key to yet another key.
5132 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5135 \begin_layout Standard
5136 One common way to bind dead-keys is to use
5148 in combination with an accent, like
5149 \begin_inset Quotes eld
5157 \begin_inset Quotes erd
5161 \begin_inset Quotes eld
5169 \begin_inset Quotes erd
5173 \begin_inset Quotes eld
5181 \begin_inset Quotes erd
5185 Another way involves using
5193 [remember them from section?] to set up the special
5202 acts in some ways just like
5206 and permits you to bind keys to accented characters.
5207 You can also turn keys into dead-keys by binding them to something like
5212 and then binding this symbolic key to the corresponding LyX command.
5216 \begin_layout Standard
5221 : This is exactly what I do in my
5239 and a bunch of these
5240 \begin_inset Quotes eld
5248 \begin_inset Quotes erd
5251 symbolic keys bound such things as
5262 This is how I produce my accented characters.
5267 You can make just about anything into the
5275 keys, a spare function key, etc.
5276 As for the LyX commands that produce accents, check the entry for
5285 You'll find the complete list there.
5288 \begin_layout Subsection
5289 Saving your Language Configuration
5292 \begin_layout Standard
5293 \begin_inset LatexCommand label
5298 You can edit your preferences so that your desired language environment
5299 is automatically configured when LyX starts up, via the
5304 dit\SpecialChar \menuseparator
5314 \begin_layout Chapter
5315 Installing New Document Classes, Layouts, and Templates
5316 \begin_inset LatexCommand label
5317 name "chap:textclass"
5325 \begin_layout Standard
5326 Installing New Document Classes
5334 \begin_layout Standard
5335 In this chapter, we describe the procedures for creating and installing
5336 new LyX layout and template files, as well as offer a refresher on correctly
5337 installing new LaTeX document classes.
5338 Some definitions: a document class is a LaTeX file (usually ending in
5346 ) which describes the format of a document such as an article, report, journal
5348 and all the commands needed to realize that format.
5349 A layout file is a LyX file which corresponds to a LaTeX document class
5350 and which tells LyX how to
5351 \begin_inset Quotes eld
5355 \begin_inset Quotes erd
5358 things on the screen to make the display look something like the final
5360 More precisely, a layout file describes a
5361 \begin_inset Quotes eld
5365 \begin_inset Quotes erd
5368 which is the internal construct LyX uses to render the screen display.
5370 \begin_inset Quotes eld
5374 \begin_inset Quotes erd
5378 \begin_inset Quotes eld
5382 \begin_inset Quotes erd
5385 can be used somewhat interchangeably, but it is better to refer to the
5386 file as the layout, and the thing living in LyX's memory as the text class.
5387 A template file is simply a LyX document which contains a set of predefined
5388 entries for a given document class which are generally required for that
5390 Templates are especially useful for things like journal manuscripts which
5391 are to be submitted electronically.
5394 \begin_layout Section
5395 Installing a new LaTeX package
5398 \begin_layout Standard
5399 Some installations may not include a LaTeX package that you would like to
5401 For example, you might need FoilTeX, a common (and very powerful) package
5402 for preparing slides or viewgraphs for overhead projectors.
5403 Here are the formal steps involved in getting the package up and running
5404 if you are using teTeX or some other web2c based distribution.
5408 \begin_layout Enumerate
5409 Get the package from CTAN or wherever.
5413 \begin_layout Standard
5416 Inventory of your LaTeX configuration
5418 manual for details of what CTAN is and where supported document classes
5427 \begin_layout Enumerate
5432 (this usually lives in the directory
5436 , though you can run
5441 It describes how to add a local
5445 directory; follow the instructions.
5446 You need to insert the name of your local
5459 is a logical place to install software that did not come with your distribution
5465 Usually, you will have to modify only two things:
5469 \begin_layout Enumerate
5474 to the directory you chose; e.g.
5479 TEXMFLOCAL = /usr/local/texmf
5482 \begin_layout Enumerate
5496 TEXMF = {$HOMETEXMF,!!$TEXMFLOCAL,!!$TEXMFMAIN}
5500 \begin_layout Enumerate
5511 You must follow the directory structure of your existing
5515 directory (for example, latex packages should go under
5517 /usr/local/texmf/tex/latex/
5522 \begin_layout Enumerate
5523 Install the package.
5524 For example, you would unpack the FoilTeX tarball and create
5526 /usr/local/texmf/tex/latex/foiltex
5533 directory contains various files.
5536 \begin_layout Enumerate
5544 /usr/local/texmf/ls-R
5549 \begin_layout Enumerate
5550 From within LyX, do:
5555 ools\SpecialChar \menuseparator
5566 \begin_layout Standard
5567 Now you should see your new package---for example
5576 ayout\SpecialChar \menuseparator
5591 Note that there are simpler ways of installing packages: you can add a
5592 link to the new package directory in the system LaTeX directory (
5596 , don't forget to then run
5600 ), or sometimes simply set the
5604 environment variable to include the new package.
5605 However, the formal procedure described in
5609 is guaranteed to work, so you should follow it unless circumstances absolutely
5610 prevent it: such as, when you don't have superuser access.
5613 \begin_layout Section
5614 \begin_inset LatexCommand label
5622 \begin_layout Standard
5623 This section describes how to write and install your own LyX layout files
5624 (also known as text classes) and walks through the
5628 text class format as an example.
5633 files describe what paragraph styles are available for a given document
5634 class and how LyX should display them.
5635 We try to provide a thorough description of the process here; however,
5636 there are so many different types of documents supported by LaTeX classes
5637 that we can't hope to cover every different possibility or problem you
5639 (The LyX users' list is frequented by people with lots of experience with
5640 layout design who are willing to share what they've learned.)
5643 \begin_layout Standard
5644 As you prepare to write a new layout, it is extremely helpful to look at
5645 the example layouts distributed with LyX.
5646 If you use a nice LaTeX document class that might be of interest for others,
5647 too, and have a nice corresponding LyX layout, feel free to contribute
5648 the stuff to us, so we may put it into the distribution.
5649 There is also a section on the LyX wiki for this kind of material.
5652 \begin_layout Standard
5653 All the tags described in this chapter are case-insensitive; this means
5666 are really the same command.
5667 The possible values are printed in brackets after the feature's name.
5668 The default value if a feature isn't specified inside a text class-description
5676 If the argument has a datatype like
5677 \begin_inset Quotes eld
5681 \begin_inset Quotes erd
5685 \begin_inset Quotes eld
5689 \begin_inset Quotes erd
5692 , the default is shown like this:
5702 \begin_layout Subsection
5706 \begin_layout Standard
5707 Similar to layout files, and new with LyX 1.6, are layout
5712 Modules are to LaTeX packages much as layouts are to LaTeX classes, and
5713 some modules---such as the URL module---provide support for just such a
5715 In a sense, layout modules are similar to included files---files like stdsectio
5716 ns.inc---in that modules are not specific to a given document layout but
5717 may be used with many different layouts.
5718 The difference is that using a layout module does not require editing the
5720 Rather, modules are selected in the
5725 ocument\SpecialChar \menuseparator
5735 \begin_layout Standard
5736 Building modules is the easiest way to get started with layout editing,
5737 since it can be as simple as adding a single new paragraph or flex inset.
5738 But modules may, in principle, contain anything a layout file can contain.
5741 \begin_layout Standard
5742 A module must begin with a line like the following:
5745 \begin_layout LyX-Code
5748 DeclareLyXModule[url.sty]{Adds a character style for the
5753 \begin_layout Standard
5754 The argument in square brackets is optional: It declares any LaTeX packages
5755 on which the module depends.
5756 The two mandatory arguments, in curly brackets, are a short description
5757 of the module and the name of the module, as they should appear in
5759 Document\SpecialChar \menuseparator
5766 \begin_layout Standard
5767 After creating a new module, you will need to reconfigure and then restart
5768 LyX for it to appear in the menu.
5769 However, changes you make to the module will be seen immediately, if you
5772 Document\SpecialChar \menuseparator
5775 , make some change (or even just highlight something), and then hit
5776 \begin_inset Quotes eld
5780 \begin_inset Quotes erd
5784 It is strongly recommended that you save your work before doing so.
5785 It is, in fact, strongly recommended that you not attempt to create or
5786 edit modules while simultaneously working on documents.
5787 Though of course the developers strive to keep LyX stable in such situations,
5788 syntax errors and the like in your module file could cause strange behavior.
5791 \begin_layout Subsection
5792 Supporting new document classes
5795 \begin_layout Standard
5796 There are two situations you are likely to encounter when wanting to support
5797 a new LaTeX document class, involving LaTeX2e class (
5806 Supporting a style file is usually fairly easy.
5807 Supporting a new document class is a bit harder.
5810 \begin_layout Subsection
5818 \begin_layout Standard
5819 If your new document class is provided as a style file that is used in conjuncti
5820 on with an existing, supported document class---for the sake of the example,
5821 we'll assume that the style file is called
5825 and it is meant to be used with
5829 , which is a standard class---start by copying the existing class's layout
5830 file into your local directory:
5833 \begin_layout LyX-Code
5834 cp report.layout ~/.lyx/layouts/myclass.layout
5837 \begin_layout Standard
5842 and change the line:
5845 \begin_layout LyX-Code
5848 DeclareLaTeXClass{report}
5851 \begin_layout Standard
5855 \begin_layout LyX-Code
5858 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
5861 \begin_layout Standard
5865 \begin_layout LyX-Code
5875 \begin_layout Standard
5876 near the top of the file.
5879 \begin_layout Standard
5880 Start LyX and select
5885 ools\SpecialChar \menuseparator
5893 Then restart LyX and try creating a new document.
5898 " as a document class option in the
5903 ocument\SpecialChar \menuseparator
5911 It is likely that some of the sectioning commands and such in your new
5912 class will work differently from how they worked in the base class---
5916 in this example---so you can fiddle around with the settings for the different
5917 sections if you wish.
5918 See below for more discussion on this.
5921 \begin_layout Subsection
5929 \begin_layout Standard
5930 There are two possibilities here.
5931 One is that the class file is itself based upon an existing document class.
5932 For example, many thesis classes are based upon
5937 To see whether yours is, look for a line like
5940 \begin_layout LyX-Code
5946 \begin_layout Standard
5948 If so, then you may proceed largely as in the previous section, though
5949 the DeclareLaTeXClass line will be different.
5950 If your new class is thesis, and it is based upon book, then the line should
5954 \begin_layout LyX-Code
5957 DeclareLaTeXClass[myclass, book]{thesis}
5960 \begin_layout Standard
5961 If, on the other hand, the new class is not based upon an existing class,
5962 you will probably have to
5963 \begin_inset Quotes eld
5967 \begin_inset Quotes erd
5971 We strongly suggest copying an existing layout file which uses a similar
5972 LaTeX class and then modifying it, if you can do so.
5973 At least use an existing file as a starting point so you can find out what
5974 items you need to worry about.
5975 Again, the specifics are covered below.
5978 \begin_layout Section
5979 Declaring a new text class
5982 \begin_layout Standard
5983 When it's finally time to get your hands dirty and create or edit your own
5984 layout file, the following sections describe what you're up against.
5985 Our advice is to go slowly, save and test often, listen to soothing music,
5986 and enjoy one or two of your favorite adult beverages; more if you are
5987 getting particularly stuck.
5988 It's really not that hard, except that the multitude of options can become
5989 overwhelming if you try to do to much in one sitting.
5990 Go have another adult beverage, just for good measure.
5993 \begin_layout Standard
5997 \begin_layout Standard
5998 Lines in a layout file which begin with a
6003 There is one exception to this rule: all layouts should begin with lines
6007 \begin_layout LyX-Code
6010 #% Do not delete the line below; configure depends on this
6013 \begin_layout LyX-Code
6018 DeclareLaTeXClass{article}
6021 \begin_layout Standard
6022 The second line is used when you configure LyX.
6023 The layout file is read by the LaTeX script
6027 , in a special mode where
6032 The first line is just a LaTeX comment, and the second one contains the
6033 declaration of the text class.
6034 If these lines appear in a file named
6038 , then they define a text class of name
6042 (the name of the layout file) which uses the LaTeX document class
6046 (the default is to use the same name as the layout).
6048 \begin_inset Quotes eld
6052 \begin_inset Quotes erd
6055 that appears above is used as a description of the text class in the
6060 ocument\SpecialChar \menuseparator
6070 \begin_layout Standard
6071 Let's assume that you wrote your own text class that uses the
6075 documentclass, but where you changed the appearance of the section headings.
6076 If you put it in a file
6080 , the header of this file should be:
6083 \begin_layout LyX-Code
6086 #% Do not delete the line below; configure depends on this
6089 \begin_layout LyX-Code
6094 DeclareLaTeXClass[article]{article (with my own headings)}
6097 \begin_layout Standard
6098 This declares a text class
6102 , associated with the LaTeX document class
6107 \begin_inset Quotes eld
6110 article (with my own headings)
6111 \begin_inset Quotes erd
6115 If your text class depends on several packages, you can declare it as:
6118 \begin_layout LyX-Code
6121 #% Do not delete the line below; configure depends on this
6124 \begin_layout LyX-Code
6129 DeclareLaTeXClass[article,foo.sty]{article (with my own headings)}
6132 \begin_layout Standard
6133 This indicates that your text class uses the foo.sty package.
6134 Finally, it is also possible to declare classes for DocBook code.
6135 Typical declarations will look like
6138 \begin_layout LyX-Code
6141 #% Do not delete the line below; configure depends on this
6144 \begin_layout LyX-Code
6149 DeclareDocBookClass[article]{SGML (DocBook article)}
6152 \begin_layout Standard
6153 Note that these declarations can also be given an optional parameter declaring
6154 the name of the document class (but not a list).
6157 \begin_layout Standard
6158 When the text class has been modified to your taste, all you have to do
6159 is to copy it either in
6172 ools\SpecialChar \menuseparator
6180 Exit LyX and restart it; then your new text class should be available along
6184 \begin_layout Standard
6185 In versions of LyX prior to 1.6, you had to restart LyX to see any changes
6186 you made to your layout files.
6187 As a result, editing layout files could be very time consuming.
6188 Beginning with 1.6, however, you can force a reload of the layout currently
6189 in use by using the LyX function
6194 There is no default binding for this function---though, of course, you
6195 can bind it to a key yourself (see section
6196 \begin_inset LatexCommand ref
6197 reference "sec:bindings"
6202 You should simply enter this command in the mini-buffer.
6207 : This is very much an `advanced feature'.
6212 recommended that you save your work before using this function.
6217 recommended that you not attempt to edit your layout while simultaneously
6218 working on a document that you care about.
6219 Use a test document.
6220 Syntax errors and the like in your layout file could cause peculiar behavior.
6221 In particular, such errors could cause LyX to regard the current layout
6222 as invalid and to attempt to switch to some other layout.
6223 The LyX team strives to keep LyX stable in such situations, but safe is
6227 \begin_layout Subsection
6231 \begin_layout Standard
6232 The first non-comment line must contain the file format number:
6235 \begin_layout Description
6246 ] This tag was introduced with LyX 1.4.0 (layout files of LyX 1.3.x and earlier
6247 don't have an explicit file format).
6248 The file format that is documented here is
6255 \begin_layout Subsection
6256 General text class parameters
6259 \begin_layout Standard
6260 These are the general parameters which describe the form of the entire document:
6263 \begin_layout Standard
6267 \begin_layout Standard
6279 \begin_layout Description
6293 ] Whether the class-default should have one or two columns.
6294 Can be changed in the
6299 ocument\SpecialChar \menuseparator
6307 This setting (same goes for
6311 , too) is important: if your text class has two columns by default but you
6312 forget to set it correctly, the
6320 be output when you select
6329 ocument\SpecialChar \menuseparator
6337 \begin_layout Description
6351 ] Whether the class-default should be printing on one or both sides of the
6353 Can be changed in the
6358 ocument\SpecialChar \menuseparator
6368 \begin_layout Description
6382 ] The class default pagestyle.
6383 Can be changed in the
6388 ocument\SpecialChar \menuseparator
6398 \begin_layout Description
6402 ClassOptions\SpecialChar \ldots{}
6406 This section describes various global options supported by the document
6408 See Section\InsetSpace ~
6410 \begin_inset LatexCommand ref
6411 reference "sec:classoptions"
6418 \begin_layout Description
6436 ] Whether the class already provides the feature
6441 A feature is in general the name of a package (amsmath, makeidx, \SpecialChar \ldots{}
6443 macro (url, boldsymbol,\SpecialChar \ldots{}
6444 ); the complete list of supported features is unfortunat
6448 \begin_layout Description
6455 This is used to describe the default font of the document.
6456 See Section\InsetSpace ~
6458 \begin_inset LatexCommand ref
6459 reference "sec:fonts"
6466 \begin_layout Description
6477 ] This is the style that will be assigned to new paragraphs, usually
6482 This will default to the first defined style if not given, but you are
6483 highly encouraged to use this directive.
6486 \begin_layout Description
6503 ] Indicates what kind of markup is used to define the title of a document.
6508 means that the macro with name
6512 will be inserted after the last layout which has
6513 \begin_inset Quotes eld
6521 \begin_inset Quotes erd
6529 corresponds to the case where the block of paragraphs which have
6530 \begin_inset Quotes eld
6538 \begin_inset Quotes erd
6541 should be enclosed into the
6550 \begin_layout Description
6561 ] The name of the command/environment mentionned above.
6564 \begin_layout Description
6568 Preamble\SpecialChar \ldots{}
6572 A set of macro definitions that will be output at the beginning of the
6574 Use this for global definitions.
6577 \begin_layout Description
6584 As its name implies, this command allows you to include another layout
6585 definition file within yours to avoid duplicating commands.
6586 Common examples are the standard layout files, for example,
6590 , which contains most of the basic layouts.
6593 \begin_layout Description
6597 Style\SpecialChar \ldots{}
6601 This sequence defines a new style.
6602 If the style already exists, it will redefine some of its parameters instead.
6603 See Section\InsetSpace ~
6605 \begin_inset LatexCommand ref
6606 reference "sec:style"
6613 \begin_layout Description
6620 This command deletes an existing style.
6621 This is particularly useful when you want to suppress a style that has
6622 be defined in an input file.
6625 \begin_layout Description
6629 Float\SpecialChar \ldots{}
6633 This sequence defines a new float.
6634 See Section\InsetSpace ~
6636 \begin_inset LatexCommand ref
6637 reference "sec:floats"
6644 \begin_layout Description
6651 This command deletes an existing float.
6652 This is particularly useful when you want to suppress a float that has
6653 be defined in an input file.
6656 \begin_layout Description
6660 InsetLayout\SpecialChar \ldots{}
6664 This section (re-)defines the layout of an inset.
6665 It can be applied to an existing inset of to a new, user-defined inset,
6666 e.g., a new character style.
6667 See Section\InsetSpace ~
6669 \begin_inset LatexCommand ref
6670 reference "sec:charstyle"
6677 \begin_layout Description
6681 Counter\SpecialChar \ldots{}
6685 This sequence defines a new counter.
6686 See Section\InsetSpace ~
6688 \begin_inset LatexCommand ref
6689 reference "sec:counter"
6696 \begin_layout Standard
6700 \begin_layout Standard
6712 \begin_layout Subsection
6720 \begin_layout Standard
6721 \begin_inset LatexCommand label
6722 name "sec:classoptions"
6730 section can contain the following entries:
6733 \begin_layout Description
6744 ] The list of available font sizes for the document's main font, separated
6746 \begin_inset Quotes eld
6754 \begin_inset Quotes erd
6760 \begin_layout Description
6769 string="empty|plain|headings|fancy"
6771 ] The list of available page styles, separated by
6772 \begin_inset Quotes eld
6780 \begin_inset Quotes erd
6786 \begin_layout Description
6797 ] Some document class options, separated by a comma, that will be added
6798 to the optional part of the
6807 \begin_layout Subsection
6808 Specific Paragraph Layouts
6811 \begin_layout Standard
6812 \begin_inset LatexCommand label
6817 A paragraph layout description looks like this
6821 \begin_layout Standard
6822 Note that this will either define a new layout or modify an existing one.
6830 \begin_layout LyX-Code
6837 \begin_layout LyX-Code
6841 \begin_layout LyX-Code
6845 \begin_layout Standard
6846 where the following commands are allowed:
6849 \begin_layout Standard
6853 \begin_layout Standard
6865 \begin_layout Description
6876 This is used to copy all the features of an existing layout into the current
6881 \begin_layout Description
6893 , Command, Environment, Item_Environment,
6899 ] How the layout should be translated into LaTeX.
6904 means nothing special.
6917 {\SpecialChar \ldots{}
6932 }\SpecialChar \ldots{}
6956 is generated for each paragraph of this environment.
6969 is passed as an argument to the environment.
6974 can be defined in the
6979 ayout\SpecialChar \menuseparator
6993 is perhaps a bit misleading, since these rules apply to SGML classes, too.
6994 Visit the SGML class files for specific examples.
6997 \begin_layout Description
7008 If 1, marks the layout as being part of a title block (see also the
7019 \begin_layout Description
7026 The name of the corresponding LaTeX stuff.
7027 Either the environment or command name.
7030 \begin_layout Description
7037 The optional parameter for the corresponding
7044 This parameter cannot be changed from within LyX.
7047 \begin_layout Description
7058 ] The number of optional arguments that can be used with this layout.
7059 This is useful for things like section headings, and only makes sense with
7063 \begin_layout Description
7075 , Manual, Dynamic, First_Dynamic, Right_Address_Box
7079 The kind of margin that the layout has on the left side.
7084 just means a fixed margin.
7089 means that the left margin depends on the string entered in the
7094 dit\SpecialChar \menuseparator
7099 aragraph\InsetSpace ~
7103 This is used to typeset nice lists without tabulators.
7108 means that the margin depends on the size of the label.
7109 This is used for automatic enumerated headlines.
7110 It is obvious that the headline
7111 \begin_inset Quotes eld
7114 5.4.3.2.1 Very long headline
7115 \begin_inset Quotes erd
7118 must have a wider left margin (as wide as
7119 \begin_inset Quotes eld
7123 \begin_inset Quotes erd
7126 plus the space) than
7127 \begin_inset Quotes eld
7130 3.2 Very long headline
7131 \begin_inset Quotes erd
7134 , even if other word processors are not able to do this.
7139 is similar, but only the very first row of the paragraph is dynamic, while
7140 the others are static; this is used, for example, for descriptions.
7145 means the margin is chosen in a way that the longest row of this paragraph
7146 fits to the right margin.
7147 This is used to typeset an address on the right edge of the page.
7150 \begin_layout Description
7167 ] Whether the following Paragraph is allowed to indent its very first row.
7172 means that it is not allowed to do so,
7176 means it could do so if it wants to.
7179 \begin_layout Description
7190 ] The indent of the very first line of a paragraph.
7191 The argument is passed as a string.
7196 means that the paragraph is indented with the width of
7205 You can get a negative width by prefixing the string with
7210 This way was chosen so that the look is the same with each used screen
7216 will be fixed for a certain layout.
7217 The exception is Standard layout, since the indentation of a Standard layout
7218 paragraph can be prohibited with
7223 Also, Standard layout paragraphs inside environments use the
7227 of the environment, not their native one.
7228 For example, Standard paragraphs inside an enumeration are not indented.
7231 \begin_layout Description
7242 ] LyX allows to choose either
7243 \begin_inset Quotes eld
7247 \begin_inset Quotes erd
7251 \begin_inset Quotes eld
7255 \begin_inset Quotes erd
7258 to typeset a document.
7260 \begin_inset Quotes eld
7264 \begin_inset Quotes erd
7267 is chosen, this value is completely ignored.
7269 \begin_inset Quotes eld
7273 \begin_inset Quotes erd
7276 is chosen, the parindent of a LaTeXtype
7277 \begin_inset Quotes eld
7281 \begin_inset Quotes erd
7284 layout is ignored and all paragraphs are additionally separated by this
7286 The vertical space is calculated with
7288 value*DefaultHeight()
7294 is the height of a row with the normal font.
7295 This way, the look stays the same with different screen fonts.
7298 \begin_layout Description
7309 ] The vertical space with which the very first of a chain of paragraphs
7310 with this layout is separated from the previous paragraph.
7311 If the previous paragraph has another layout, the separations are not simply
7312 added, but the maximum is taken.
7315 \begin_layout Description
7330 for the very last paragraph.
7333 \begin_layout Description
7344 ] The vertical space between two paragraphs of this layout.
7347 \begin_layout Description
7358 ] This is an extra space between the paragraphs of an environment layout.
7359 If you put other layouts into an environment, each is separated with the
7365 But the whole items of the environment are additionally separated with
7374 \begin_layout Description
7385 ] If you put layouts into environments, the leftmargins are not simply added,
7386 but added with a factor
7387 \begin_inset Formula $\frac{4}{depth+4}$
7391 Note that this parameter is also used when the border is defined as
7400 Then it is added to the manual or dynamic border.
7401 This string has the same meaning as for
7408 \begin_layout Description
7426 \begin_layout Description
7438 , Manual, Static, Top_Environment,
7440 Centered_Top_Environment, Sensitive,
7449 means the label is the very first word (up to the first real blank).
7454 means it is defined in the layout (see
7465 Centered_Top_Environment
7467 are special cases of
7472 The label will be printed above the paragraph, but only at the top of an
7473 environment or the top of a chain of paragraphs with this layout.
7474 Usage is for example the
7483 This is also the case for
7487 labels with latex type
7491 , in order to make layouts for theorems work correctly.
7496 is a special case for the caption-labels
7497 \begin_inset Quotes eld
7501 \begin_inset Quotes erd
7505 \begin_inset Quotes eld
7509 \begin_inset Quotes erd
7517 means the (hardcoded) label string depends on the kind of float.
7522 label type defines automatically numbered labels.
7525 \begin_layout Description
7538 The name of the counter for automatic numbering (see Section\InsetSpace ~
7540 \begin_inset LatexCommand ref
7541 reference "sec:counter"
7546 This must be given if
7559 \begin_layout Description
7570 ] The horizontal space between the label and the text body.
7571 Only used for labels that are not above the text body.
7574 \begin_layout Description
7581 [float=0] The vertical space between the label and the text body.
7582 Only used for labels that are above the text body (
7588 Centered_Top_Environment
7593 \begin_layout Description
7604 ] The string used for a label with a
7613 this string is also used as a suggestion for the
7617 that can be set in the
7622 dit\SpecialChar \menuseparator
7627 aragraph\InsetSpace ~
7637 is set, this string can be contain the special formatting commands described
7638 in Section\InsetSpace ~
7640 \begin_inset LatexCommand ref
7641 reference "sec:counter"
7646 For the sake of backwards compatibility, the string
7654 will be replaced by the expanded
7665 This feature is now obsolete and should be replaced by the mechanisms of
7666 Section\InsetSpace ~
7668 \begin_inset LatexCommand ref
7669 reference "sec:counter"
7676 \begin_layout Description
7687 ] This is used inside the appendix instead of
7708 \begin_layout Description
7715 The level of the style in the table of contents.
7716 This is used for automatic numbering of section headings.
7719 \begin_layout Description
7731 , Box, Filled_Box, Static
7733 ] The type of label that stands at the end of the paragraph (or sequence
7756 \begin_inset Quotes eld
7760 \begin_inset Quotes erd
7772 ) is a white (resp.\InsetSpace ~
7773 black) square suitable for end of proof markers,
7777 is an explicit text string.
7780 \begin_layout Description
7791 ] The string used for a label with a
7803 \begin_layout Description
7815 , left, right, center
7817 ] Paragraph alignment.
7820 \begin_layout Description
7832 , left, right, center
7839 Some LaTeX styles prohibit certain alignments, since those wouldn't make
7841 For example a right-aligned or centered enumeration isn't possible.
7844 \begin_layout Description
7858 ] With this parameter the
7863 \begin_inset Quotes eld
7866 Vertical space above
7867 \begin_inset Quotes erd
7875 dit\SpecialChar \menuseparator
7880 aragraph\InsetSpace ~
7883 dialog can be set when initializing a paragraph with this layout
7887 \begin_layout Standard
7890 Note from Jean-Marc:
7892 I'm not sure that this setting has much use, and it should probably be
7893 removed in later versions.
7902 \begin_layout Description
7923 \begin_layout Description
7937 ] Whether fragile commands in this layout should be
7946 \begin_layout Description
7963 ] Whether newlines are translated into LaTeX newlines (
7972 The translation can be switched off to allow more comfortable LaTeX editing
7976 \begin_layout Description
7990 ] Whether the contents of this paragraph should be output in raw form, meaning
7991 without special translations that LaTeX would require.
7992 This somehow replaces the older
7999 \begin_layout Description
8013 ] Usually LyX doesn't allow you to insert more than one space between words,
8014 since a space is considered as the separation between two words, not a
8015 character or symbol of its own.
8016 This is a very fine thing but sometimes annoying, for example when typing
8017 program code or plain LaTeX code.
8023 Note that LyX will create protected blanks for the additional blanks when
8024 in another mode than LaTeX-mode.
8027 \begin_layout Description
8041 ] Usually LyX does not allow you to leave a paragraph empty, since it would
8042 lead to empty LaTeX output.
8043 There are some cases where this could be desirable however: in a letter
8044 template, the required fields can be provided as empty fields, so that
8045 people do not forget them; in some special classes, a layout can be used
8046 as some kind of break, which does not contain actual text.
8049 \begin_layout Description
8061 , onehalf, double, other
8067 ] This defines what the default spacing should be in the layout.
8080 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
8081 If you specify the argument
8085 , then you should also provide a numerical argument which will be the actual
8087 Note that, contrary to other parameters,
8091 implies the generation of specific LaTeX code, using the package
8098 \begin_layout Description
8105 The font used for both the text body
8110 See section\InsetSpace ~
8112 \begin_inset LatexCommand ref
8113 reference "sec:fonts"
8118 Note that defining this font automatically defines the
8125 \begin_layout Description
8132 The font used for the text body .
8133 See section\InsetSpace ~
8135 \begin_inset LatexCommand ref
8136 reference "sec:fonts"
8143 \begin_layout Description
8150 The font used for the label.
8151 See section\InsetSpace ~
8153 \begin_inset LatexCommand ref
8154 reference "sec:fonts"
8161 \begin_layout Description
8165 Preamble\SpecialChar \ldots{}
8169 A set of macro definitions that will be output at the beginning of the
8170 LaTeX files when the layout is used.
8171 Use this to define the macros needed by this particular layout.
8174 \begin_layout Description
8181 the name of a style which preamble should be output
8185 the one mentionned above.
8186 This allows to ensure some ordering of the preamble snippets when macros
8187 definitions depend on one another
8191 \begin_layout Standard
8192 Note that, besides that functionality, there is no way to ensure any ordering
8194 The ordering that you see in a given version of LyX may change without
8195 warning in later versions.
8203 \begin_layout Standard
8207 \begin_layout Standard
8219 \begin_layout Subsection
8223 \begin_layout Standard
8224 \begin_inset LatexCommand label
8229 Since version 1.3.0 of LyX, it is necessary to define the floats (
8237 , \SpecialChar \ldots{}
8238 ) in the text class itself.
8239 If you are looking here to learn how to upgrade an existing text class,
8240 it will probably turn out that all you have to do is to add
8243 \begin_layout LyX-Code
8247 \begin_layout Standard
8248 at a reasonable location of the text class.
8252 \begin_layout Standard
8253 Don't forget to also have a look at counters in next section.
8258 If you want to implement a text class that proposes some other float types
8259 (like the AGU class bundled with LyX), the information below will hopefully
8263 \begin_layout Description
8275 \begin_inset Quotes erd
8279 \begin_inset Quotes erd
8283 \begin_inset Quotes eld
8287 \begin_inset Quotes erd
8290 of the new class of floats, like program or algorithm.
8291 After the appropriate
8312 \begin_layout Description
8324 \begin_inset Quotes erd
8328 \begin_inset Quotes erd
8331 ] The string that will be used in the menus and also for the caption.
8334 \begin_layout Description
8355 if the float is already defined by the documentclass.
8360 , the float will be defined using the LaTeX package
8367 \begin_layout Description
8379 \begin_inset Quotes erd
8383 \begin_inset Quotes erd
8386 ] This (optional) argument determines whether floats of this class will
8387 be numbered within some sectional unit of the document.
8388 For example, if within is equal to
8392 , the floats will be numbered within chapters.
8396 \begin_layout Description
8408 \begin_inset Quotes erd
8412 \begin_inset Quotes erd
8415 ] The style used when defining the float using
8424 \begin_layout Description
8436 \begin_inset Quotes erd
8440 \begin_inset Quotes erd
8443 ] The default placement for the given class of floats.
8444 They are like in standard LaTeX:
8460 for top, bottom, page, and here, respectively.
8464 \begin_layout Standard
8465 Note that the order of these letters in the string is irrelevant, like in
8471 On top of that there is a new type,
8475 , which does not really correspond to a float, since it means: put it
8476 \begin_inset Quotes eld
8480 \begin_inset Quotes erd
8484 Note, however that the
8488 specifier is special and, because of implementation details cannot be used
8489 in non-builtin float types.
8490 If you do not understand what this means, just use
8497 \begin_layout Description
8509 \begin_inset Quotes erd
8513 \begin_inset Quotes erd
8516 ] The file name extension of an auxiliary file for the list of figures (or
8518 LaTeX writes the captions to this file.
8521 \begin_layout Description
8533 \begin_inset Quotes erd
8537 \begin_inset Quotes erd
8540 ] The heading used for the list of floats.
8543 \begin_layout Standard
8544 Note that defining a float with type
8550 automatically defines the corresponding counter with name
8559 \begin_layout Subsection
8560 Inset layouts and Flex insets
8563 \begin_layout Standard
8564 \begin_inset LatexCommand label
8565 name "sec:charstyle"
8569 You can define character styles since version 1.4.0 of LyX; since version
8570 1.6.0 these are called Flex insets.
8574 \begin_layout Standard
8575 Furthermore it is possible to define the general layout of many different
8577 Currently layout parameters can be defined for footnotes, marginal notes,
8578 note insets, ERT insets, branch insets, and Flex insets.
8579 The latter are definable from the user GUI and come in three different
8580 kinds: character style (
8588 ), and XML element (
8596 \begin_layout Standard
8601 definition starting line is of the form
8604 \begin_layout LyX-Code
8605 InsetLayout <Type> <Name>
8608 \begin_layout Standard
8612 \begin_layout Standard
8619 Foot, Margin, Note, Flex
8624 \begin_layout Standard
8629 can be empty (for foot- and marginal notes, branches and ERT) or one of
8647 Here, the second part of the name can be chosen freely (for CharStyle,
8648 Custom and Element), or from a predefined list (for Note).
8651 \begin_layout Standard
8656 section can contain the following entries:
8659 \begin_layout Description
8682 (indicating a dummy definition ending definitions of charstyles etc.).
8683 This entry is only meaningful for Flex (user definable) insets, the three
8684 types of which are CharStyle, Custom and Element.
8687 \begin_layout Description
8703 Minimalistic or Conglomerate
8706 , describing the rendering style used for the inset's frame and buttons.
8709 \begin_layout Description
8716 defines what will be displayed on the button or elsewhere as the inset
8718 Some inset types (ERT and Branch) modify this label on the fly.
8721 \begin_layout Description
8728 The font used for both the text body
8733 See section\InsetSpace ~
8735 \begin_inset LatexCommand ref
8736 reference "sec:fonts"
8741 Note that defining this font automatically defines the
8748 \begin_layout Description
8755 The font used for the label.
8756 See section\InsetSpace ~
8758 \begin_inset LatexCommand ref
8759 reference "sec:fonts"
8764 Note that this definition can never appear before
8768 , lest it be ineffective (see above)
8771 \begin_layout Description
8778 The name of the corresponding LaTeX stuff.
8779 Either the environment or command name.
8782 \begin_layout Description
8789 The optional parameter for the corresponding
8795 stuff, including possible bracket pairs like
8800 This parameter cannot be changed from within LyX.
8803 \begin_layout Description
8810 See section\InsetSpace ~
8812 \begin_inset LatexCommand ref
8813 reference "sec:style"
8820 \begin_layout Description
8824 Preamble\SpecialChar \ldots{}
8828 See section\InsetSpace ~
8830 \begin_inset LatexCommand ref
8831 reference "sec:style"
8838 \begin_layout Subsection
8842 \begin_layout Standard
8843 \begin_inset LatexCommand label
8848 Since version 1.3.0 of LyX, it is necessary to define the counters (
8856 , \SpecialChar \ldots{}
8857 ) in the text class itself.
8858 If you are looking here to learn how to upgrade an existing text class,
8859 it will probably turn out that all you have to do is to add
8862 \begin_layout LyX-Code
8863 Input stdcounters.inc
8866 \begin_layout Standard
8867 The following parameters can be used:
8870 \begin_layout Description
8882 \begin_inset Quotes erd
8886 \begin_inset Quotes erd
8889 ] The name of the counter.
8892 \begin_layout Description
8904 \begin_inset Quotes erd
8908 \begin_inset Quotes erd
8911 ] If this is set to the name of another counter, the present counter will
8912 be reset everytime the other one is increased.
8924 \begin_layout Description
8928 LabelString [string=""]
8931 when this is defined, this string defines how the counter is displayed.
8932 Setting this value resets
8937 The following special constructs can be used in the string:
8941 \begin_layout Itemize
8948 will be replaced by the expansion of the
8961 If these are empty, a default value is constructed as follows: if the counter
8962 has a master counter
8974 is used; otherwise the string
8983 \begin_layout Itemize
8984 counter values can be expressed using LaTeX-like macros
9008 \begin_layout Description
9019 to arabic numerals, like 1, 2, 3\SpecialChar \ldots{}
9024 \begin_layout Standard
9034 Actually, the situation is a bit more complicated than that: any
9053 other than those descibed below will produce arabic numerals.
9054 It would not be surprising to see this change in the future.
9062 \begin_layout Description
9069 for lower-case letters: a, b, c, \SpecialChar \ldots{}
9073 \begin_layout Description
9080 for upper-case letters: A, B, C, \SpecialChar \ldots{}
9084 \begin_layout Description
9091 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
9095 \begin_layout Description
9102 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
9106 \begin_layout Description
9113 for hebrew numerals.
9118 \begin_layout Description
9122 LabelStringAppendix [string=""]
9129 , for use in appendix.
9132 \begin_layout Subsection
9136 \begin_layout Standard
9137 \begin_inset LatexCommand label
9142 A font description looks like that:
9145 \begin_layout LyX-Code
9155 \begin_layout LyX-Code
9159 \begin_layout LyX-Code
9163 \begin_layout Standard
9164 and the following commands are available:
9167 \begin_layout Description
9184 \begin_layout Description
9201 \begin_layout Description
9213 , Italic, SmallCaps, Slanted
9218 \begin_layout Description
9234 , large, larger, largest, huge, giant
9239 \begin_layout Description
9251 , black, white, red, green, blue, cyan, magenta, yellow
9256 \begin_layout Subsection
9257 Upgrading old layout files
9260 \begin_layout Standard
9261 The file format of layout files changes from time to time, so old layout
9262 files need to be converted.
9263 This process has been automated in LyX 1.4.0: If LyX reads an old format
9264 layout file it will call the conversion tool
9266 $LyXDir/scripts/layout2layout.py
9268 and convert it to a temporary file in current format.
9269 The original file is left untouched, so that you can still use it with
9271 If you want to convert the layout file permanently, just call the converter
9275 \begin_layout LyX-Code
9276 python $LyXDir/scripts/layout2layout.py myclass.layout myclassnew.layout
9279 \begin_layout Standard
9291 \begin_layout Standard
9292 The automatic conversion does only handle syntax changes.
9293 It cannot handle the case where the contents of included files was changed.
9294 For example, layout files based on
9307 If you get error messages about undefined counters, try to convert your
9327 \begin_layout Section
9329 \begin_inset LatexCommand label
9330 name "sec:templates"
9337 \begin_layout Standard
9338 Templates are created just like usual documents.
9339 The only difference is that usual documents contain all possible settings,
9340 including the fontscheme and the papersize.
9341 Usually a user doesn't want a template to overwrite his defaults in these
9343 For that reason, the designer of a template should remove the corresponding
9356 from the template LyX file.
9357 This can be done with any simple text-editor, for example
9369 \begin_layout Standard
9370 Put the edited template files you create in
9374 , copy the ones you use from the global template directory in
9378 to the same place, and redefine the template path in the
9383 dit\SpecialChar \menuseparator
9402 \begin_layout Standard
9403 Note that there is a template which has a particular meaning:
9408 This template is loaded everytime you create a new document with
9415 \SpecialChar \menuseparator
9423 in order to provide useful defaults.
9424 To create this template from inside LyX, all you have to do is to open
9425 a document with the correct settings, and use the
9431 e as Document Defaults
9436 \begin_layout Chapter
9437 Including External Material
9440 \begin_layout Section
9444 \begin_layout Standard
9445 \begin_inset Note Note
9448 \begin_layout Standard
9449 This section is completely outdated.
9454 One often requested feature from LyX users is to be able to interface LyX
9455 with Xfig, Dia, or other similar applications that specialize in producing
9456 a certain kind of diagram, figure, schematic or whatever material might
9457 be relevant to include in your document.
9458 Previously, it was only possible to include boring, static, fixed images
9459 in LyX documents with the graphics feature, but there are several limitations
9460 attached to this approach:
9463 \begin_layout Itemize
9464 If you want to change the figure, you have to invoke an external program
9468 \begin_layout Itemize
9469 LyX does not notice that the referenced files change, so the on-screen display
9470 can fast become obsolete, and this is aggravated by the lack of a means
9471 of updating the display
9474 \begin_layout Itemize
9475 The graphics stuff does not provide any mechanisms for coping with different
9476 exported formats such as DocBook, HTML or plain text
9479 \begin_layout Standard
9480 The external material facility attempts to solve all of these problems
9484 \begin_layout Standard
9485 Even if the graphics facility can't solve all problems, it is still valuable
9486 because it does provide in-line preview of the graphics, and supports advanced
9487 geometric transformations with a comfortable user interface.
9493 It does this by offering a general method to interface LyX to external
9495 Instead of introducing a long list of different constructs tailored for
9496 each specific application, we chose to sacrifice the in-line displaying
9497 of the included material in order to provide a general construct to cover
9498 a wide range of applications.
9499 The result is the external material construct.
9500 External material presents itself in the document simply as a button, but
9501 don't let this fool you.
9502 When you click on it, a dialog will appear that allows you to chose exactly
9503 what material to include, and in the following sections you will learn
9504 that this is indeed a powerful mechanism that can solve all of the above
9508 \begin_layout Section
9512 \begin_layout Standard
9513 The external material feature is based on the concept of a
9518 A template is a specification of how LyX should interface with a certain
9520 As bundled, LyX comes with predefined templates for Xfig figures, Dia diagrams,
9521 various raster format images, gnuplot, and more.
9522 You can check the actual list by using the menu
9524 Insert\SpecialChar \menuseparator
9525 File\SpecialChar \menuseparator
9534 Furthermore, it is possible to roll your own template to support a specific
9536 Later we'll describe in more detail what is involved, and hopefully you
9537 will submit all the templates you create so we can include them in a later
9541 \begin_layout Standard
9542 Another basic idea of the external material feature is to distinguish between
9543 the original file that serves as a base for final material and the produced
9544 file that is included in your exported or printed document.
9545 For example, consider the case of a figure produced with
9550 The Xfig application itself works on an original file with the
9555 Within XFig, you create and change your figure, and when you are done,
9561 When you want to include the figure in your document, you invoke
9565 in order to create a PostScript file that can readily be included in your
9571 file is the original file, and the PostScript file is the produced file.
9574 \begin_layout Standard
9575 This distinction is important in order to allow updating of the material
9576 while you are in the process of writing the document.
9577 Furthermore, it provides us with the flexibility that is needed to support
9578 multiple export formats.
9579 For instance, in the case of a plain text file, it is not exactly an award-winn
9580 ing idea to include the figure as raw PostScript.
9581 Instead, you'd either prefer to just include a reference to the figure,
9582 or try to invoke some graphics to Ascii converter to make the final result
9583 look similar to the real graphics.
9584 The external material management allows you to do this, because it is parameter
9585 ized on the different export formats that LyX supports.
9588 \begin_layout Standard
9589 Besides supporting the production of different products according to the
9590 exported format, it supports tight integration with editing and viewing
9592 In the case of an XFig figure, you are able to invoke
9596 on the original file with a single click from within the external material
9597 dialog in LyX, and also preview the produced PostScript file with
9602 No more fiddling around with the command line and/or file browsers to locate
9603 and manipulate the original or produced files.
9604 In this way, you are finally able to take full advantage of the many different
9605 applications that are relevant to use when you write your documents, and
9606 ultimately be more productive.
9609 \begin_layout Section
9610 External material dialog
9613 \begin_layout Standard
9618 dialog is described in the
9627 \begin_layout Section
9631 \begin_layout Standard
9632 In this section, we should include some examples of use of the external
9634 Those examples could include:
9637 \begin_layout Itemize
9638 External raster images
9641 \begin_layout Itemize
9642 External XFig figures
9645 \begin_layout Itemize
9649 \begin_layout Itemize
9653 \begin_layout Itemize
9654 The use of makefiles
9657 \begin_layout Itemize
9658 Recursive external LyX templates
9661 \begin_layout Section
9662 The external template configuration file
9665 \begin_layout Standard
9666 It is relatively easy to add custom external template definitions to LyX.
9667 However, be aware this doing this in an careless manner most probably
9671 introduce an easily exploitable security hole.
9672 So before you do this, please read the discussion about security which
9676 \begin_layout Standard
9677 Having said that, we encourage you to submit any interesting templates that
9682 \begin_layout Standard
9683 The external templates are defined in the
9685 lib/external_templates
9688 You can place your own version in
9690 .lyx/external_templates
9695 \begin_layout Standard
9696 A typical template looks like this:
9699 \begin_layout LyX-Code
9703 \begin_layout LyX-Code
9704 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
9707 \begin_layout LyX-Code
9711 \begin_layout LyX-Code
9715 \begin_layout LyX-Code
9719 \begin_layout LyX-Code
9723 \begin_layout LyX-Code
9727 \begin_layout LyX-Code
9728 AutomaticProduction true
9731 \begin_layout LyX-Code
9735 \begin_layout LyX-Code
9739 \begin_layout LyX-Code
9743 \begin_layout LyX-Code
9744 TransformCommand Rotate RotationLatexCommand
9747 \begin_layout LyX-Code
9748 TransformCommand Resize ResizeLatexCommand
9751 \begin_layout LyX-Code
9752 Product "$$RotateFront$$ResizeFront
9755 \begin_layout LyX-Code
9760 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
9763 \begin_layout LyX-Code
9764 $$ResizeBack$$RotateBack"
9767 \begin_layout LyX-Code
9771 \begin_layout LyX-Code
9772 UpdateResult "$$AbsPath$$Basename.pstex_t"
9775 \begin_layout LyX-Code
9776 Requirement "graphicx"
9779 \begin_layout LyX-Code
9780 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
9783 \begin_layout LyX-Code
9784 ReferencedFile latex "$$AbsPath$$Basename.eps"
9787 \begin_layout LyX-Code
9788 ReferencedFile dvi "$$AbsPath$$Basename.eps"
9791 \begin_layout LyX-Code
9795 \begin_layout LyX-Code
9799 \begin_layout LyX-Code
9800 TransformCommand Rotate RotationLatexCommand
9803 \begin_layout LyX-Code
9804 TransformCommand Resize ResizeLatexCommand
9807 \begin_layout LyX-Code
9808 Product "$$RotateFront$$ResizeFront
9811 \begin_layout LyX-Code
9816 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
9819 \begin_layout LyX-Code
9820 $$ResizeBack$$RotateBack"
9823 \begin_layout LyX-Code
9827 \begin_layout LyX-Code
9828 UpdateResult "$$AbsPath$$Basename.pdftex_t"
9831 \begin_layout LyX-Code
9832 Requirement "graphicx"
9835 \begin_layout LyX-Code
9836 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
9839 \begin_layout LyX-Code
9840 ReferencedFile latex "$$AbsPath$$Basename.pdf"
9843 \begin_layout LyX-Code
9847 \begin_layout LyX-Code
9851 \begin_layout LyX-Code
9852 Product "$$Contents(
9854 "$$AbsPath$$Basename.asc
9859 \begin_layout LyX-Code
9860 UpdateFormat asciixfig
9863 \begin_layout LyX-Code
9864 UpdateResult "$$AbsPath$$Basename.asc"
9867 \begin_layout LyX-Code
9871 \begin_layout LyX-Code
9875 \begin_layout LyX-Code
9876 Product "<graphic fileref=
9878 "$$AbsOrRelPathMaster$$Basename.eps
9883 \begin_layout LyX-Code
9887 \begin_layout LyX-Code
9891 \begin_layout LyX-Code
9892 UpdateResult "$$AbsPath$$Basename.eps"
9895 \begin_layout LyX-Code
9896 ReferencedFile docbook "$$AbsPath$$Basename.eps"
9899 \begin_layout LyX-Code
9900 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
9903 \begin_layout LyX-Code
9907 \begin_layout LyX-Code
9908 Product "[XFig: $$FName]"
9911 \begin_layout LyX-Code
9915 \begin_layout LyX-Code
9919 \begin_layout Standard
9920 As you can see, the template is enclosed in
9924 \SpecialChar \ldots{}
9930 It contains a header specifying some general settings, and for each supported
9931 primary document file format a section
9935 \SpecialChar \ldots{}
9943 \begin_layout Subsection
9947 \begin_layout Description
9951 Template\InsetSpace ~
9955 A unique name for the template.
9956 It must not contain substitution macros (see below).
9959 \begin_layout Description
9963 GuiName\InsetSpace ~
9967 The text that is displayed on the button.
9968 This command must occur exactly once.
9971 \begin_layout Description
9975 HelpText\InsetSpace ~
9980 The help text that is used in the External dialog.
9981 Provide enough information to explain to the user just what the template
9982 can provide him with.
9983 This command must occur exactly once.
9986 \begin_layout Description
9990 InputFormat\InsetSpace ~
9994 The file format of the original file.
9995 This must be the name of a format that is known to LyX (see the
10000 ools\SpecialChar \menuseparator
10005 references:Conversion
10012 if the template can handle original files of more than one format.
10013 LyX will attempt to interrogate the file itself in order to deduce its
10014 format in this case.
10015 This command must occur exactly once.
10018 \begin_layout Description
10022 FileFilter\InsetSpace ~
10026 A glob pattern that is used in the file dialog to filter out the desired
10028 If there is more than one possible file extension (e.g.\InsetSpace ~
10037 ), use something like
10042 This command must occur exactly once.
10045 \begin_layout Description
10049 AutomaticProduction\InsetSpace ~
10053 Wether the file represented by the template must be generated by LyX.
10054 This command must occur exactly once.
10057 \begin_layout Description
10061 Transform\InsetSpace ~
10062 Rotate|Resize|Clip|Extra
10065 This command specifies which transformations are supported by this template.
10066 It may occur zero or more times.
10067 This command enables the corresponding tabs in the external dialog.
10072 command must have either a corresponding
10085 Otherwise the transformation will not be supported by that format.
10088 \begin_layout Subsection
10092 \begin_layout Description
10096 Format\InsetSpace ~
10097 LaTeX|PDFLaTeX|PlainText|DocBook
10100 The primary document file format that this format definition is for.
10101 Not every template has a sensible representation in all document file formats.
10102 Please define nevertheless a
10106 section for all formats.
10107 Use a dummy text when no representation is available.
10108 Then you can at least see a reference to the external material in the exported
10112 \begin_layout Description
10116 TransformCommand\InsetSpace ~
10117 Rotate\InsetSpace ~
10118 RotationLatexCommand
10121 This command specifies that the built in LaTeX command should be used for
10123 This command may occur once or not at all.
10126 \begin_layout Description
10130 TransformCommand\InsetSpace ~
10131 Resize\InsetSpace ~
10135 This command specifies that the built in LaTeX command should be used for
10137 This command may occur once or not at all.
10140 \begin_layout Description
10144 TransformOption\InsetSpace ~
10145 Rotate\InsetSpace ~
10146 RotationLatexOption
10149 This command specifies that rotation is done via an optional argument.
10150 This command may occur once or not at all.
10153 \begin_layout Description
10157 TransformOption\InsetSpace ~
10158 Resize\InsetSpace ~
10162 This command specifies that resizing is done via an optional argument.
10163 This command may occur once or not at all.
10166 \begin_layout Description
10170 TransformOption\InsetSpace ~
10175 This command specifies that clipping is done via an optional argument.
10176 This command may occur once or not at all.
10179 \begin_layout Description
10183 TransformOption\InsetSpace ~
10188 This command specifies that an extra optional argument is used.
10189 This command may occur once or not at all.
10192 \begin_layout Description
10196 Product\InsetSpace ~
10200 The text that is inserted in the exported document.
10201 This is actually the most important command and can be quite complex.
10202 This command must occur exactly once.
10205 \begin_layout Description
10209 UpdateFormat\InsetSpace ~
10213 The file format of the converted file.
10214 This must be the name of a format that is known to LyX (see the
10219 ools\SpecialChar \menuseparator
10224 references:Conversion
10227 This command must occur exactly once.
10230 \begin_layout Description
10234 UpdateResult\InsetSpace ~
10238 The file name of the converted file.
10239 The file name must be absolute.
10240 This command must occur exactly once.
10243 \begin_layout Description
10247 ReferencedFile\InsetSpace ~
10248 <format>\InsetSpace ~
10252 This command denotes files that are created by the conversion process and
10253 are needed for a particular export format.
10254 If the filename is relative, it is interpreted relative to the master document.
10255 This command may be given zero or more times.
10258 \begin_layout Description
10262 Requirement\InsetSpace ~
10266 The name of a required LaTeX package.
10267 The package is included via
10273 in the LaTeX preamble.
10274 This command may occur zero or more times.
10277 \begin_layout Description
10281 Preamble\InsetSpace ~
10285 This command specifies a preamble snippet that will be included in the
10287 It has to be defined using
10291 \SpecialChar \ldots{}
10297 This command may occur zero or more times.
10300 \begin_layout Description
10304 Option\InsetSpace ~
10305 <name>\InsetSpace ~
10309 This command defines an additional macro
10313 for substitution in
10322 itself may contain substitution macros.
10323 The advantage over using
10331 is that the substituted value of
10335 is sanitized so that it is a valid optional argument in the document format.
10336 This command may occur zero or more times.
10339 \begin_layout Subsection
10340 Preamble definitions
10343 \begin_layout Standard
10344 The external template configuration file may contain additional preamble
10345 definitions enclosed by
10349 \SpecialChar \ldots{}
10355 They can be used by the templates in the
10362 \begin_layout Section
10363 The substitution mechanism
10366 \begin_layout Standard
10367 When the external material facility invokes an external program, it is done
10368 on the basis of a command defined in the template configuration file.
10369 These commands can contain various macros that are expanded before execution.
10370 Execution always take place in the directory of the containing document.
10373 \begin_layout Standard
10374 Also, whenever external material is to be displayed, the name will be produced
10375 by the substitution mechanism, and most other commands in the template
10376 definition support substitution as well.
10379 \begin_layout Standard
10380 The available macros are the following:
10383 \begin_layout Description
10384 $$FName The filename of the file specified in the external material dialog.
10385 This is either an absolute name, or it is relative to the LyX document.
10388 \begin_layout Description
10389 $$Basename The filename without path and without the extension.
10392 \begin_layout Description
10393 $$Extension The file extension (including the dot).
10396 \begin_layout Description
10397 $$FPath The path part of
10401 (absolute name or relative to the LyX document).
10404 \begin_layout Description
10405 $$AbsPath The absolute file path.
10408 \begin_layout Description
10409 $$RelPathMaster The file path, relative to the master LyX document.
10412 \begin_layout Description
10413 $$RelPathParent The file path, relative to the LyX document.
10416 \begin_layout Description
10417 $$AbsOrRelPathMaster The file path, absolute or relative to the master LyX
10421 \begin_layout Description
10422 $$AbsOrRelPathParent The file path, absolute or relative to the LyX document.
10425 \begin_layout Description
10426 $$Tempname A name and full path to a temporary file which will be automatically
10427 deleted whenever the containing document is closed, or the external material
10431 \begin_layout Description
10433 \begin_inset Quotes eld
10437 \begin_inset Quotes erd
10440 ) This macro will expand to the contents of the file with the name
10447 \begin_layout Description
10448 $$Sysdir This macro will expand to the absolute path of the system directory.
10449 This is typically used to point to the various helper scripts that are
10453 \begin_layout Standard
10454 All path macros contain a trailing directory separator, so you can construct
10456 the absolute filename with
10458 $$AbsPath$$Basename$$Extension
10463 \begin_layout Standard
10464 The macros above are substituted in all commands unless otherwise noted.
10469 supports additionally the following substitutions if they are enabled by
10481 \begin_layout Description
10482 $$ResizeFront The front part of the resize command.
10485 \begin_layout Description
10486 $$ResizeBack The back part of the resize command.
10489 \begin_layout Description
10490 $$RotateFront The front part of the rotation command.
10493 \begin_layout Description
10494 $$RotateBack The back part of the rotation command.
10497 \begin_layout Standard
10498 The value string of the
10502 command supports additionally the following substitutions if they are enabled
10514 \begin_layout Description
10515 $$Clip The clip option.
10518 \begin_layout Description
10519 $$Extra The extra option.
10522 \begin_layout Description
10523 $$Resize The resize option.
10526 \begin_layout Description
10527 $$Rotate The rotation option.
10530 \begin_layout Standard
10531 You may ask why there are so many path macros.
10532 There are mainly two reasons:
10535 \begin_layout Standard
10536 First, relative and absolute file names should remain relative or absolute,
10538 Users may have reasons to prefer either form.
10539 Relative names are useful for portable documents that should work on different
10540 machines, for example.
10541 Absolute names may be required by some programs.
10544 \begin_layout Standard
10545 Second, LaTeX treats relative file names differently than LyX and other
10546 programs in nested included files.
10547 For LyX, a relative file name is always relative to the document that contains
10549 For LaTeX, it is always relative to the master document.
10550 These two definitions are identical if you have only one document, but
10551 differ if you have a master document that includes part documents.
10552 That means that relative filenames must be transformed when presented to
10554 Fortunately LyX does this automatically for you if you choose the right
10558 \begin_layout Standard
10559 So which path macro should be used in new template definitions? The rule
10563 \begin_layout Itemize
10568 if an absolute path is required.
10571 \begin_layout Itemize
10574 $$AbsOrRelPathMaster
10576 if the substituted string is some kind of LaTeX input.
10579 \begin_layout Itemize
10582 $$AbsOrRelPathParent
10584 in order to preserve the user's choice.
10587 \begin_layout Standard
10588 There are special cases where this rule does not work and e.g.\InsetSpace ~
10590 are needed, but normally it will work just fine.
10591 One example for such a case is the command
10593 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
10595 in the XFig template above: We can't use the absolute name because the
10600 files needs the relative name in order to rewrite the file content.
10603 \begin_layout Section
10604 Security discussion
10607 \begin_layout Standard
10608 \begin_inset Note Note
10611 \begin_layout Standard
10612 This section is outdated
10617 The external material feature interfaces with a lot of external programs
10618 and does so automatically, so we have to consider the security implications
10620 In particular, since you have the option of including your own filenames
10621 and/or parameter strings and those are expanded into a command, it seems
10622 that it would be possible to create a malicious document which executes
10623 arbitrary commands when a user views or prints the document.
10624 This is something we definately want to avoid.
10627 \begin_layout Standard
10628 However, since the external program commands are specified in the template
10629 configuration file only, there are no security issues if LyX is properly
10630 configured with safe templates only.
10631 This is so because the external programs are invoked with the
10635 -system call rather than the
10639 system-call, so it's not possible to execute arbitrary commands from the
10640 filename or parameter section via the shell.
10643 \begin_layout Standard
10644 This also implies that you are restricted in what command strings you can
10645 use in the external material templates.
10646 In particular, pipes and redirection are not readily available.
10647 This has to be so if LyX should remain safe.
10648 If you want to use some of the shell features, you should write a safe
10649 script to do this in a controlled manner, and then invoke the script from
10650 the command string.
10655 directory of the LyX installation, you can find a safe wrapper script
10657 general_command_wrapper.py
10659 that supports redirection of input and output.
10660 That can serve as an example for how to write safe template scripts.
10661 For a more advanced example that uses
10665 and friends, take a look at the
10672 \begin_layout Standard
10673 It is possible to design a template that interacts directly with the shell,
10674 but since this would allow a malicious user to execute arbitrary commands
10675 by writing clever filenames and/or parameters, we generally recommend that
10676 you only use safe scripts that work with the
10680 system call in a controlled manner.
10681 Of course, for use in a controlled environment, it can be tempting to just
10682 fall back to use ordinary shell scripts.
10683 If you do so, be aware that you
10687 provide an easily exploitable security hole in your system.
10688 Of course it stands to reason that such unsafe templates will never be
10689 included in the standard LyX distribution, although we do encourage people
10690 to submit new templates in the open source tradition.
10691 But LyX as shipped from the official distribution channels will never have
10695 \begin_layout Standard
10696 Including external material provides a lot of power, and you have to be
10697 careful not to introduce security hazards with this power.
10698 A subtle error in a single line in an innocent looking script can open
10699 the door to huge security problems.
10700 So if you do not fully understand the issues, we recommend that you consult
10701 a knowledgable security professional or the LyX development team if you
10702 have any questions about whether a given template is safe or not.
10703 And do this before you use it in an uncontrolled environment.
10706 \begin_layout Chapter
10710 \begin_layout Section
10714 \begin_layout Standard
10715 The LyX server is a method implemented in LyX that will enable other programs
10716 to talk to LyX, invoke LyX commands, and retrieve information about the
10717 LyX internal state.
10718 This is only intended for advanced users, but they should find it useful.
10721 \begin_layout Section
10722 Starting the LyX Server
10725 \begin_layout Standard
10726 The LyX server works through the use of a pair of named pipes.
10727 These are usually located in your home directory and have the names
10728 \begin_inset Quotes eld
10736 \begin_inset Quotes erd
10740 \begin_inset Quotes eld
10748 \begin_inset Quotes erd
10752 External programs write into
10756 and read back data from
10761 The stem of the pipe names can be defined in the
10766 ools\SpecialChar \menuseparator
10773 dialog, for example
10775 "/home/myhome/.lyxpipe"
10780 \begin_layout Standard
10789 ' to create the pipes.
10790 The above setting also has the effect of activating the LyX server.
10791 If one of the pipes already exists, LyX will assume that another LyX process
10792 is already running and will not start the server.
10793 To have several LyX processes with servers at the same time, you have to
10794 change the configuration between the start of the programs.
10797 \begin_layout Standard
10798 If you are developing a client program, you might find it useful to enable
10799 debugging information from the LyX server.
10800 Do this by starting LyX as
10802 lyx -dbg lyxserver.
10805 \begin_layout Standard
10806 Warning: if LyX crashes, it may not manage to remove the pipes; in this
10807 case you must remove them manually.
10808 If LyX starts and the pipes exist already, it will not start any server.
10811 \begin_layout Standard
10812 Other than this, there are a few points to consider:
10815 \begin_layout Itemize
10816 Both server and clients must run on UNIX or OS/2 machines.
10817 Communications between LyX on UNIX and clients on OS/2 or vice versa is
10818 not possible right now.
10821 \begin_layout Itemize
10822 On OS/2, only one client can connect to LyXServer at a time.
10825 \begin_layout Itemize
10826 On OS/2, clients must open inpipe with
10833 \begin_layout Standard
10834 You can find a complete example client written in C in the source distribution
10837 development/server_monitor.c
10842 \begin_layout Section
10843 Normal communication
10846 \begin_layout Standard
10847 To issue a LyX call, the client writes a line of ASCII text into the input
10849 This line has the following format:
10852 \begin_layout Quote
10866 \begin_layout Standard
10871 is a name that the client can choose arbitrarily.
10872 Its only use is that LyX will echo it if it sends an answer - so a client
10873 can dispatch results from different requesters.
10876 \begin_layout Standard
10881 is the function you want LyX to perform.
10882 It is the same as the commands you'd use in the minibuffer.
10885 \begin_layout Standard
10890 is an optional argument which is meaningful only to some functions (for
10892 \begin_inset Quotes eld
10896 \begin_inset Quotes erd
10899 which will insert the argument as text at the cursor position.)
10902 \begin_layout Standard
10903 The answer from LyX will arrive in the output pipe and be of the form
10906 \begin_layout Quote
10920 \begin_layout Standard
10929 are just echoed from the command request, while
10933 is more or less useful information filled according to how the command
10934 execution worked out.
10935 Some commands will return information about the internal state of LyX,
10937 \begin_inset Quotes eld
10941 \begin_inset Quotes erd
10944 , while other will return an empty data-response.
10945 This means that the command execution went fine.
10948 \begin_layout Standard
10949 In case of errors, the response from LyX will have this form
10952 \begin_layout Quote
10966 \begin_layout Standard
10971 should contain an explanation of why the command failed.
10974 \begin_layout Standard
10978 \begin_layout LyX-Code
10979 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
10982 \begin_layout LyX-Code
10983 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
10985 read a <~/.lyxpipe.out
10990 \begin_layout Section
10994 \begin_layout Standard
10995 LyX can notify clients of events going on asynchronously.
10996 Currently it will only do this if the user binds a key sequence with the
10998 \begin_inset Quotes eld
11002 \begin_inset Quotes erd
11006 The format of the string LyX sends is as follows:
11009 \begin_layout Quote
11018 \begin_layout Standard
11023 is the printed representation of the key sequence that was actually typed
11027 \begin_layout Standard
11028 This mechanism can be used to extend LyX's command set and implement macros:
11029 bind some key sequence to
11030 \begin_inset Quotes eld
11034 \begin_inset Quotes erd
11037 , start a client that listens on the out pipe, dispatches the command according
11038 to the sequence and starts a function that may use LyX calls and LyX requests
11039 to issue a command or a series of commands to LyX.
11042 \begin_layout Section
11043 The simple LyX Server Protocol
11046 \begin_layout Standard
11047 LyX implements a simple protocol that can be used for session management.
11048 All messages are of the form
11051 \begin_layout Quote
11061 \begin_layout Standard
11067 \begin_inset Quotes eld
11071 \begin_inset Quotes erd
11075 \begin_inset Quotes eld
11079 \begin_inset Quotes erd
11084 \begin_inset Quotes eld
11088 \begin_inset Quotes erd
11091 is received from a client, LyX will report back to inform the client that
11092 it's listening to it's messages, while
11093 \begin_inset Quotes eld
11097 \begin_inset Quotes erd
11100 sent from LyX will inform clients that LyX is closing.
11103 \begin_layout Chapter
11108 \begin_layout Standard
11109 This appendix is a huge cross-reference to all the English language keybindings.
11110 Originally, we simply wanted to list all of the key bindings followed by
11111 the function it's bound to.
11112 That way, a user can look up a key to find out what it does.
11113 We then decided, what the hey, why not include the default toolbar and
11114 menu bindings, too.
11115 Please note this section is likely to be very out of date.
11118 \begin_layout Standard
11119 The form is really self-explanatory, but here are a few tips: all entries
11120 are arranged roughly alphabetically for a given modifier (
11129 For the general keyboard layout, simpler prefixes precede the more complex
11139 All entries were gleaned from the default user interface and binding files
11140 located in the directories
11142 \SpecialChar \ldots{}
11147 \SpecialChar \ldots{}
11150 ; they should be treated as the final word on the bindings.
11153 \begin_layout Standard
11154 As a final note, be aware that some window managers (such as FVWM) take
11155 control of some of the function keys or motion keys.
11160 is listed here as generating
11164 , but FVWM grabs it and uses it to change virtual desktops instead.
11165 Very annoying unless you instruct your window manager to stop intercepting
11169 \begin_layout Section
11173 \begin_layout LyX-Code
11177 \begin_layout LyX-Code
11181 \begin_layout LyX-Code
11185 \begin_layout LyX-Code
11186 Icon "buffer-write"
11189 \begin_layout LyX-Code
11190 Icon "buffer-print"
11193 \begin_layout LyX-Code
11197 \begin_layout LyX-Code
11201 \begin_layout LyX-Code
11205 \begin_layout LyX-Code
11209 \begin_layout LyX-Code
11213 \begin_layout LyX-Code
11217 \begin_layout LyX-Code
11221 \begin_layout LyX-Code
11225 \begin_layout LyX-Code
11229 \begin_layout LyX-Code
11233 \begin_layout LyX-Code
11237 \begin_layout LyX-Code
11241 \begin_layout LyX-Code
11242 Icon "footnote-insert"
11245 \begin_layout LyX-Code
11246 Icon "marginpar-insert"
11249 \begin_layout LyX-Code
11253 \begin_layout LyX-Code
11257 \begin_layout LyX-Code
11258 Icon "figure-insert"
11261 \begin_layout LyX-Code
11262 Icon "dialog-tabular-insert"
11265 \begin_layout LyX-Code
11269 \begin_layout Section
11273 \begin_layout Standard
11274 Note that the following bindings are for LyX with English menus.
11275 The second character of the binding depends on the menu language.
11277 \begin_inset Quotes eld
11285 \begin_inset Quotes erd
11288 is with German menus
11289 \begin_inset Quotes eld
11297 \begin_inset Quotes erd
11301 To find out the shortcuts of your language press the Meta (Alt)-key and
11302 press then the keys of the underlined characters of the menu names.
11305 \begin_layout Subsection
11310 \labelwidthstring 00.00.0000
11322 \labelwidthstring 00.00.0000
11334 \labelwidthstring 00.00.0000
11346 \labelwidthstring 00.00.0000
11360 \labelwidthstring 00.00.0000
11372 \labelwidthstring 00.00.0000
11386 \labelwidthstring 00.00.0000
11398 \labelwidthstring 00.00.0000
11410 \labelwidthstring 00.00.0000
11422 \labelwidthstring 00.00.0000
11434 \labelwidthstring 00.00.0000
11442 buffer-new-template
11446 \labelwidthstring 00.00.0000
11461 \labelwidthstring 00.00.0000
11472 \labelwidthstring 00.00.0000
11483 \labelwidthstring 00.00.0000
11494 \labelwidthstring 00.00.0000
11505 \labelwidthstring 00.00.0000
11516 \labelwidthstring 00.00.0000
11528 \labelwidthstring 00.00.0000
11539 \begin_layout Subsection
11544 \labelwidthstring 00.00.0000
11556 \labelwidthstring 00.00.0000
11568 \labelwidthstring 00.00.0000
11580 \labelwidthstring 00.00.0000
11592 \labelwidthstring 00.00.0000
11604 \labelwidthstring 00.00.0000
11616 \labelwidthstring 00.00.0000
11631 \labelwidthstring 00.00.0000
11638 tabular-feature append-row
11642 \labelwidthstring 00.00.0000
11649 tabular-feature toggle-line-bottom
11653 \labelwidthstring 00.00.0000
11660 tabular-feature align-center
11664 \labelwidthstring 00.00.0000
11671 tabular-feature delete-column
11675 \labelwidthstring 00.00.0000
11682 tabular-feature align-left
11686 \labelwidthstring 00.00.0000
11693 tabular-feature align-right
11697 \labelwidthstring 00.00.0000
11704 tabular-feature toggle-line-left
11708 \labelwidthstring 00.00.0000
11715 tabular-feature multicolumn
11719 \labelwidthstring 00.00.0000
11726 tabular-feature valign-center
11730 \labelwidthstring 00.00.0000
11737 tabular-feature valign-top
11741 \labelwidthstring 00.00.0000
11748 tabular-feature toggle-line-right
11752 \labelwidthstring 00.00.0000
11759 tabular-feature toggle-line-top
11763 \labelwidthstring 00.00.0000
11770 tabular-feature append-column
11774 \labelwidthstring 00.00.0000
11781 tabular-feature valign-bottom
11785 \labelwidthstring 00.00.0000
11792 tabular-feature delete-row
11797 \labelwidthstring 00.00.0000
11810 \labelwidthstring 00.00.0000
11817 floats-operate openfoot
11821 \labelwidthstring 00.00.0000
11828 floats-operate closefoot
11832 \labelwidthstring 00.00.0000
11839 floats-operate openfig
11843 \labelwidthstring 00.00.0000
11854 \labelwidthstring 00.00.0000
11865 \labelwidthstring 00.00.0000
11872 floats-operate closefig
11877 \labelwidthstring 00.00.0000
11889 \labelwidthstring 00.00.0000
11903 \labelwidthstring 00.00.0000
11915 \labelwidthstring 00.00.0000
11927 \labelwidthstring 00.00.0000
11941 \labelwidthstring 00.00.0000
11953 \labelwidthstring 00.00.0000
11968 \labelwidthstring 00.00.0000
11975 primary-selection-paste
11979 \labelwidthstring 00.00.0000
11986 primary-selection-paste paragraph
11990 \begin_layout Subsection
11995 \labelwidthstring 00.00.0000
12010 \labelwidthstring 00.00.0000
12017 buffer-float-insert algorithm
12021 \labelwidthstring 00.00.0000
12028 buffer-float-insert wide-tab
12032 \labelwidthstring 00.00.0000
12039 buffer-float-insert figure
12043 \labelwidthstring 00.00.0000
12050 buffer-float-insert table
12054 \labelwidthstring 00.00.0000
12061 buffer-float-insert wide-fig
12066 \labelwidthstring 00.00.0000
12074 dialog-tabular-insert
12078 \labelwidthstring 00.00.0000
12090 \labelwidthstring 00.00.0000
12102 \labelwidthstring 00.00.0000
12110 buffer-child-insert
12114 \labelwidthstring 00.00.0000
12126 \labelwidthstring 00.00.0000
12138 \labelwidthstring 00.00.0000
12150 \labelwidthstring 00.00.0000
12162 \labelwidthstring 00.00.0000
12174 \labelwidthstring 00.00.0000
12186 \labelwidthstring 00.00.0000
12198 \labelwidthstring 00.00.0000
12213 \labelwidthstring 00.00.0000
12224 \labelwidthstring 00.00.0000
12235 \labelwidthstring 00.00.0000
12246 \labelwidthstring 00.00.0000
12257 \labelwidthstring 00.00.0000
12268 \labelwidthstring 00.00.0000
12280 \labelwidthstring 00.00.0000
12292 \labelwidthstring 00.00.0000
12307 \labelwidthstring 00.00.0000
12314 protected-space-insert
12318 \labelwidthstring 00.00.0000
12325 end-of-sentence-period-insert
12329 \labelwidthstring 00.00.0000
12340 \labelwidthstring 00.00.0000
12351 \labelwidthstring 00.00.0000
12362 \labelwidthstring 00.00.0000
12369 menu-separator-insert
12373 \labelwidthstring 00.00.0000
12380 hyphenation-point-insert
12384 \labelwidthstring 00.00.0000
12395 \labelwidthstring 00.00.0000
12402 command-sequence math-insert ^;math-mode;
12406 \labelwidthstring 00.00.0000
12413 command-sequence math-insert _;math-mode;
12418 \labelwidthstring 00.00.0000
12433 \labelwidthstring 00.00.0000
12440 file-insert-plaintext lines
12444 \labelwidthstring 00.00.0000
12451 file-insert-plaintext paragraphs
12455 \labelwidthstring 00.00.0000
12467 \labelwidthstring 00.00.0000
12479 \labelwidthstring 00.00.0000
12491 \labelwidthstring 00.00.0000
12502 \begin_layout Subsection
12507 \labelwidthstring 00.00.0000
12519 \labelwidthstring 00.00.0000
12531 \labelwidthstring 00.00.0000
12543 \labelwidthstring 00.00.0000
12555 \labelwidthstring 00.00.0000
12567 \labelwidthstring 00.00.0000
12579 \labelwidthstring 00.00.0000
12591 \labelwidthstring 00.00.0000
12603 \labelwidthstring 00.00.0000
12611 layout-save-default
12615 \labelwidthstring 00.00.0000
12627 \labelwidthstring 00.00.0000
12639 \labelwidthstring 00.00.0000
12650 \begin_layout Subsubsection
12653 Layout\SpecialChar \menuseparator
12660 \labelwidthstring 00.00.0000
12672 \labelwidthstring 00.00.0000
12684 \labelwidthstring 00.00.0000
12696 \labelwidthstring 00.00.0000
12708 \labelwidthstring 00.00.0000
12720 \labelwidthstring 00.00.0000
12732 \labelwidthstring 00.00.0000
12744 \labelwidthstring 00.00.0000
12756 \labelwidthstring 00.00.0000
12768 \labelwidthstring 00.00.0000
12780 \labelwidthstring 00.00.0000
12792 \labelwidthstring 00.00.0000
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
13043 \begin_layout Subsection
13047 \begin_layout Subsection
13051 \begin_layout Subsection
13055 \begin_layout Subsection
13060 \labelwidthstring 00.00.0000
13072 \labelwidthstring 00.00.0000
13084 \labelwidthstring 00.00.0000
13096 \labelwidthstring 00.00.0000
13108 \labelwidthstring 00.00.0000
13120 \labelwidthstring 00.00.0000
13128 layout ShortFoilhead
13132 \labelwidthstring 00.00.0000
13144 \labelwidthstring 00.00.0000
13156 \labelwidthstring 00.00.0000
13168 \labelwidthstring 00.00.0000
13180 \labelwidthstring 00.00.0000
13188 layout ShortRotatefoilhead
13192 \labelwidthstring 00.00.0000
13204 \labelwidthstring 00.00.0000
13216 \labelwidthstring 00.00.0000
13228 \labelwidthstring 00.00.0000
13236 drop-layouts-choice
13240 \labelwidthstring 00.00.0000
13255 \labelwidthstring 00.00.0000
13270 \labelwidthstring 00.00.0000
13282 \labelwidthstring 00.00.0000
13294 \labelwidthstring 00.00.0000
13302 layout Subsubsection
13306 \labelwidthstring 00.00.0000
13318 \labelwidthstring 00.00.0000
13326 layout Subparagraph
13330 \labelwidthstring 00.00.0000
13334 asterisk\InsetSpace ~
13343 \labelwidthstring 00.00.0000
13347 asterisk\InsetSpace ~
13356 \labelwidthstring 00.00.0000
13360 asterisk\InsetSpace ~
13369 \labelwidthstring 00.00.0000
13373 asterisk\InsetSpace ~
13382 \labelwidthstring 00.00.0000
13386 asterisk\InsetSpace ~
13391 layout Subsubsection*
13395 \labelwidthstring 00.00.0000
13399 asterisk\InsetSpace ~
13408 \labelwidthstring 00.00.0000
13412 asterisk\InsetSpace ~
13417 layout Subparagraph*
13421 \labelwidthstring 00.00.0000
13433 \labelwidthstring 00.00.0000
13441 layout Bibliography
13445 \labelwidthstring 00.00.0000
13457 \labelwidthstring 00.00.0000
13469 \labelwidthstring 00.00.0000
13481 \labelwidthstring 00.00.0000
13493 \labelwidthstring 00.00.0000
13505 \labelwidthstring 00.00.0000
13513 layout Rotatefoilhead
13517 \labelwidthstring 00.00.0000
13525 layout RightAddress
13529 \labelwidthstring 00.00.0000
13541 \labelwidthstring 00.00.0000
13553 \labelwidthstring 00.00.0000
13565 \labelwidthstring 00.00.0000
13576 \begin_layout Standard
13577 These ones are kept for backwards compatibility, but only make sense on
13582 \labelwidthstring 00.00.0000
13594 \labelwidthstring 00.00.0000
13602 layout Subsubsection*
13606 \labelwidthstring 00.00.0000
13617 \begin_layout Section
13621 \begin_layout Subsection
13628 \labelwidthstring 00.00.0000
13639 \labelwidthstring 00.00.0000
13650 \labelwidthstring 00.00.0000
13661 \labelwidthstring 00.00.0000
13672 \labelwidthstring 00.00.0000
13683 \labelwidthstring 00.00.0000
13694 \labelwidthstring 00.00.0000
13701 hyphenation-point-insert
13705 \labelwidthstring 00.00.0000
13716 \labelwidthstring 00.00.0000
13723 line-delete-forward
13727 \labelwidthstring 00.00.0000
13738 \labelwidthstring 00.00.0000
13749 \labelwidthstring 00.00.0000
13760 \labelwidthstring 00.00.0000
13771 \labelwidthstring 00.00.0000
13782 \labelwidthstring 00.00.0000
13793 \labelwidthstring 00.00.0000
13804 \labelwidthstring 00.00.0000
13815 \labelwidthstring 00.00.0000
13826 \labelwidthstring 00.00.0000
13837 \labelwidthstring 00.00.0000
13848 \labelwidthstring 00.00.0000
13859 \labelwidthstring 00.00.0000
13871 \labelwidthstring 00.00.0000
13883 \labelwidthstring 00.00.0000
13895 \labelwidthstring 00.00.0000
13907 \labelwidthstring 00.00.0000
13920 \labelwidthstring 00.00.0000
13932 \labelwidthstring 00.00.0000
13944 \labelwidthstring 00.00.0000
13956 \labelwidthstring 00.00.0000
13968 \labelwidthstring 00.00.0000
13981 \labelwidthstring 00.00.0000
13993 \labelwidthstring 00.00.0000
14005 \labelwidthstring 00.00.0000
14018 \labelwidthstring 00.00.0000
14031 \labelwidthstring 00.00.0000
14044 \labelwidthstring 00.00.0000
14057 \labelwidthstring 00.00.0000
14070 \labelwidthstring 00.00.0000
14083 \labelwidthstring 00.00.0000
14095 \labelwidthstring 00.00.0000
14107 \labelwidthstring 00.00.0000
14119 \labelwidthstring 00.00.0000
14127 menu-open Documents
14131 \labelwidthstring 00.00.0000
14143 \labelwidthstring 00.00.0000
14155 \labelwidthstring 00.00.0000
14167 \labelwidthstring 00.00.0000
14179 \labelwidthstring 00.00.0000
14191 \labelwidthstring 00.00.0000
14199 buffer-toggle-read-only
14203 \labelwidthstring 00.00.0000
14215 \labelwidthstring 00.00.0000
14227 \labelwidthstring 00.00.0000
14239 \labelwidthstring 00.00.0000
14250 \labelwidthstring 00.00.0000
14261 \labelwidthstring 00.00.0000
14272 \labelwidthstring 00.00.0000
14283 \labelwidthstring 00.00.0000
14294 \labelwidthstring 00.00.0000
14305 \labelwidthstring 00.00.0000
14316 \labelwidthstring 00.00.0000
14327 \labelwidthstring 00.00.0000
14338 \labelwidthstring 00.00.0000
14349 \labelwidthstring 00.00.0000
14360 \labelwidthstring 00.00.0000
14371 \labelwidthstring 00.00.0000
14382 \labelwidthstring 00.00.0000
14393 \labelwidthstring 00.00.0000
14400 word-delete-forward
14404 \labelwidthstring 00.00.0000
14411 word-delete-backward
14415 \labelwidthstring 00.00.0000
14426 \labelwidthstring 00.00.0000
14433 end-of-sentence-period-insert
14437 \labelwidthstring 00.00.0000
14444 protected-space-insert
14448 \labelwidthstring 00.00.0000
14459 \labelwidthstring 00.00.0000
14470 \labelwidthstring 00.00.0000
14481 \labelwidthstring 00.00.0000
14492 \labelwidthstring 00.00.0000
14503 \labelwidthstring 00.00.0000
14514 \labelwidthstring 00.00.0000
14521 buffer-begin-select
14525 \labelwidthstring 00.00.0000
14536 \labelwidthstring 00.00.0000
14543 paragraph-up-select
14547 \labelwidthstring 00.00.0000
14554 paragraph-down-select
14558 \labelwidthstring 00.00.0000
14565 word-backward-select
14569 \labelwidthstring 00.00.0000
14576 word-forward-select
14580 \labelwidthstring 00.00.0000
14591 \labelwidthstring 00.00.0000
14598 word-delete-forward
14602 \labelwidthstring 00.00.0000
14613 \labelwidthstring 00.00.0000
14624 \labelwidthstring 00.00.0000
14635 \labelwidthstring 00.00.0000
14646 \labelwidthstring 00.00.0000
14653 break-paragraph-keep-layout
14657 \labelwidthstring 00.00.0000
14667 \begin_layout Subsection
14674 \labelwidthstring 00.00.0000
14685 \labelwidthstring 00.00.0000
14696 \labelwidthstring 00.00.0000
14707 \labelwidthstring 00.00.0000
14718 \labelwidthstring 00.00.0000
14729 \labelwidthstring 00.00.0000
14740 \labelwidthstring 00.00.0000
14751 \labelwidthstring 00.00.0000
14762 \labelwidthstring 00.00.0000
14773 \labelwidthstring 00.00.0000
14784 \labelwidthstring 00.00.0000
14795 \labelwidthstring 00.00.0000
14806 \labelwidthstring 00.00.0000
14817 \labelwidthstring 00.00.0000
14828 \labelwidthstring 00.00.0000
14839 \labelwidthstring 00.00.0000
14850 \labelwidthstring 00.00.0000
14861 \labelwidthstring 00.00.0000
14872 \labelwidthstring 00.00.0000
14883 \labelwidthstring 00.00.0000
14894 \labelwidthstring 00.00.0000
14905 \labelwidthstring 00.00.0000
14916 \labelwidthstring 00.00.0000
14923 protected-space-insert
14927 \labelwidthstring 00.00.0000
14938 \labelwidthstring 00.00.0000
14949 \labelwidthstring 00.00.0000
14960 \labelwidthstring 00.00.0000
14967 buffer-new-template
14971 \labelwidthstring 00.00.0000
14982 \labelwidthstring 00.00.0000
14993 \labelwidthstring 00.00.0000
15004 \labelwidthstring 00.00.0000
15015 \labelwidthstring 00.00.0000
15026 \labelwidthstring 00.00.0000
15037 \labelwidthstring 00.00.0000
15048 \labelwidthstring 00.00.0000
15055 end-of-sentence-period-insert
15059 \labelwidthstring 00.00.0000
15070 \labelwidthstring 00.00.0000
15081 \labelwidthstring 00.00.0000
15088 hyphenation-point-insert
15092 \labelwidthstring 00.00.0000
15103 \labelwidthstring 00.00.0000
15110 protected-space-insert
15114 \labelwidthstring 00.00.0000
15125 \labelwidthstring 00.00.0000
15136 \labelwidthstring 00.00.0000
15147 \labelwidthstring 00.00.0000
15158 \labelwidthstring 00.00.0000
15169 \labelwidthstring 00.00.0000
15180 \labelwidthstring 00.00.0000
15191 \labelwidthstring 00.00.0000
15202 \labelwidthstring 00.00.0000
15213 \labelwidthstring 00.00.0000
15224 \labelwidthstring 00.00.0000
15235 \labelwidthstring 00.00.0000
15246 \labelwidthstring 00.00.0000
15257 \labelwidthstring 00.00.0000
15268 \labelwidthstring 00.00.0000
15279 \labelwidthstring 00.00.0000
15286 word-delete-forward
15290 \labelwidthstring 00.00.0000
15297 word-delete-backward
15301 \labelwidthstring 00.00.0000
15312 \labelwidthstring 00.00.0000
15323 \labelwidthstring 00.00.0000
15334 \labelwidthstring 00.00.0000
15345 \labelwidthstring 00.00.0000
15352 paragraph-down-select
15356 \labelwidthstring 00.00.0000
15367 \labelwidthstring 00.00.0000
15374 buffer-begin-select
15378 \labelwidthstring 00.00.0000
15385 word-backward-select
15389 \labelwidthstring 00.00.0000
15396 word-forward-select
15400 \labelwidthstring 00.00.0000
15407 paragraph-up-select
15411 \labelwidthstring 00.00.0000
15422 \labelwidthstring 00.00.0000
15429 break-paragraph-keep-layout
15433 \labelwidthstring 00.00.0000
15444 \labelwidthstring 00.00.0000
15455 \labelwidthstring 00.00.0000
15466 \labelwidthstring 00.00.0000
15477 \labelwidthstring 00.00.0000
15488 \labelwidthstring 00.00.0000
15499 \labelwidthstring 00.00.0000
15510 \labelwidthstring 00.00.0000
15521 \labelwidthstring 00.00.0000
15532 \labelwidthstring 00.00.0000
15543 \labelwidthstring 00.00.0000
15553 \begin_layout Subsection
15559 \begin_layout Standard
15560 These are LyX keyboard definitions for mathematics, similar to those of
15564 \begin_layout Standard
15565 The bindings file and the present documentation were prepared by Serge Winitzki
15566 with assistance from Jean-Marc Lasgouttes.
15567 Version 1.3, for LyX 1.2.x and 1.3.x.
15570 \begin_layout Standard
15571 These definitions make it a lot easier to type equations without using the
15572 mouse, especially for people familiar with Scientific Word.
15573 The standard LyX bindings such as
15584 \begin_layout Standard
15585 Tip: to find the "LyX bind name" for a key, look at the status bar after
15586 typing some non-existent key combination.
15588 to find how "Ctrl-&" is referenced, press Ctrl-S and then Ctrl-&: the status
15589 bar shows "C-s S-C-ampersand." (This does not work in LyX 1.3.0!)
15593 \labelwidthstring 00.00.0000
15602 -- Copy, cut, paste is as in Sciword,
15618 \labelwidthstring 00.00.0000
15627 -- Display equation toggle: type
15631 to insert a displayed formula (
15636 \begin_inset Quotes eld
15640 \begin_inset Quotes erd
15648 in a displayed formula to convert it back to an inline formula.
15652 \labelwidthstring 00.00.0000
15667 to insert a fraction (
15672 \begin_inset Quotes eld
15676 \begin_inset Quotes erd
15680 You can also select an expression and type
15684 to convert it to the numerator of a fraction.
15693 end of the denominator will delete the numerator and convert the denominator
15698 \labelwidthstring 00.00.0000
15710 \begin_inset Formula $\int$
15718 \begin_inset Quotes eld
15722 \begin_inset Quotes erd
15729 \labelwidthstring 00.00.0000
15736 line-delete-forward
15738 -- Emacs-like binding: delete forward of cursor to end of line.
15742 \labelwidthstring 00.00.0000
15751 -- A text/math toggle (
15756 \begin_inset Quotes eld
15760 \begin_inset Quotes erd
15763 ): switches to math in text mode, and also inserts roman text in math mode.
15773 \begin_inset Quotes eld
15777 \begin_inset Quotes erd
15784 \labelwidthstring 00.00.0000
15793 -- Add/remove numbering in a single equation.
15797 \labelwidthstring 00.00.0000
15806 -- Add/remove numbering at a line in equation arrays.
15809 \begin_layout Standard
15810 The above commands are toggles that control the numbering of equations (
15815 \begin_inset Quotes eld
15819 \begin_inset Quotes erd
15823 Note: when deleting a number in a labeled eqnarray, the label is not really
15824 removed (the TeX code becomes
15825 \begin_inset Quotes eld
15837 \begin_inset Quotes erd
15840 ) and this generates a (harmless) LaTeX warning.
15844 \labelwidthstring 00.00.0000
15853 -- Open a new document.
15858 \labelwidthstring 00.00.0000
15867 -- Insert a quote character " (
15872 \begin_inset Quotes eld
15876 \begin_inset Quotes erd
15881 \begin_inset Quotes eld
15885 \begin_inset Quotes erd
15888 double quote character that you get by default.
15892 \labelwidthstring 00.00.0000
15903 -- Square root sign
15904 \begin_inset Formula $\sqrt{x}$
15912 \begin_inset Quotes eld
15916 \begin_inset Quotes erd
15923 \labelwidthstring 00.00.0000
15935 \begin_inset Formula $\sqrt[n]{x}$
15942 \labelwidthstring 00.00.0000
15951 -- Another binding for a switch between the text and the math mode (
15956 \begin_inset Quotes eld
15960 \begin_inset Quotes erd
15964 Note that the roman text inserted in math mode is special.
15968 \labelwidthstring 00.00.0000
15981 the selected text (text mode only, use things like
15997 \labelwidthstring 00.00.0000
16006 -- W*ndows heritage.
16010 \labelwidthstring 00.00.0000
16019 -- Close the current document (again, a W*ndows heritage).
16023 \labelwidthstring 00.00.0000
16034 \labelwidthstring 00.00.0000
16045 \labelwidthstring 00.00.0000
16055 \begin_inset Quotes eld
16059 \begin_inset Quotes erd
16063 \begin_inset Quotes eld
16067 \begin_inset Quotes erd
16073 \begin_layout Standard
16074 Bracket delimiters: press
16078 -<bracket key> to insert a matching pair of delimiters.
16083 inserts a pair of parentheses
16084 \begin_inset Formula $\left[\right]$
16092 does the same thing.) It will switch to math mode if needed.
16093 The supported characters are ( [ { < |.
16094 It is the same to press the right or the left bracket.
16095 The corresponding delimiters are
16096 \begin_inset Formula $\left(\right)$
16100 \begin_inset Formula $\left[\right]$
16104 \begin_inset Formula $\left\{ \right\} $
16108 \begin_inset Formula $\left\langle \right\rangle $
16112 \begin_inset Formula $\left|\right|$
16117 \begin_inset Quotes eld
16121 \begin_inset Quotes erd
16124 and resize with their contents.
16125 Use Math Panel to get other or non-matching delimiters.
16126 Press backspace on the
16130 delimiter to remove both
16131 \begin_inset Quotes eld
16135 \begin_inset Quotes erd
16138 delimiters without removing their contents.
16142 \labelwidthstring 00.00.0000
16151 -- for convenience, pressing
16165 \labelwidthstring 00.00.0000
16176 \labelwidthstring 00.00.0000
16187 \labelwidthstring 00.00.0000
16198 \labelwidthstring 00.00.0000
16209 \labelwidthstring 00.00.0000
16220 \labelwidthstring 00.00.0000
16227 math-delim langle rangle
16229 -- angular delimiters
16230 \begin_inset Formula $\left\langle \right\rangle $
16233 , not to confuse with ordinary < > signs.
16237 \labelwidthstring 00.00.0000
16244 math-delim langle rangle
16247 \begin_layout Standard
16248 The bar bracket: on some keyboards (e.g.\InsetSpace ~
16249 some British ones), the bar character
16254 -something and on some wayward Unices to "brokenbar".
16255 So we define all of these keys as well.
16259 \labelwidthstring 00.00.0000
16270 \labelwidthstring 00.00.0000
16281 \labelwidthstring 00.00.0000
16292 \labelwidthstring 00.00.0000
16303 \labelwidthstring 00.00.0000
16313 \begin_layout Standard
16314 Accents are in most cases
16318 -<accent key>, e.g.\InsetSpace ~
16332 for tilde (you also need to press
16338 \begin_inset Quotes eld
16350 \begin_inset Quotes erd
16354 Some accents work only in math mode and others only in text mode.
16358 \labelwidthstring 00.00.0000
16367 -- overdot accent, ȧ (text mode only).
16371 \labelwidthstring 00.00.0000
16383 \begin_inset Formula $\dot{a}$
16386 (math mode only -- in physics this denotes a first derivative).
16390 \labelwidthstring 00.00.0000
16401 -- Vector accent over math
16402 \begin_inset Formula $\overrightarrow{x}$
16409 \labelwidthstring 00.00.0000
16418 -- umlaut accent, ä (text mode only)
16422 \labelwidthstring 00.00.0000
16433 -- double dot accent,
16434 \begin_inset Formula $\ddot{a}$
16437 (math mode only -- in physics this denotes a second derivative).
16438 To get a triple dot in math mode, use
16446 \labelwidthstring 00.00.0000
16455 -- grave accent à (text mode only, use
16465 \labelwidthstring 00.00.0000
16474 -- tilde accent ã (text mode only, use
16484 \labelwidthstring 00.00.0000
16493 -- acute accent á (text mode only, use
16503 \labelwidthstring 00.00.0000
16512 -- circumflex (caret) accent â (text mode only, use
16521 \begin_layout Standard
16523 The new key S-F2 for creating a LaTeX file seems handy.
16527 \labelwidthstring 00.00.0000
16536 -- Save current document.
16540 \labelwidthstring 00.00.0000
16547 buffer-export latex
16549 -- Write a LaTeX file for the current document.
16553 \labelwidthstring 00.00.0000
16562 -- Find and replace dialog.
16566 \labelwidthstring 00.00.0000
16583 \labelwidthstring 00.00.0000
16596 to quit LyX is the W*ndows w*ndow manager's mnemonic.
16599 \begin_layout Standard
16608 are used to switch fonts.
16613 to switch back to the normal font.
16614 The non-default font switches
16622 all work as toggles.
16623 They also work on the whole word if you put the cursor in the middle of
16624 the word, or if you select some text.
16628 \labelwidthstring 00.00.0000
16637 -- stop using any special font
16641 \labelwidthstring 00.00.0000
16658 \labelwidthstring 00.00.0000
16675 \labelwidthstring 00.00.0000
16692 \labelwidthstring 00.00.0000
16706 (Used sometimes for people's names.)
16709 \begin_layout Standard
16715 \begin_inset Quotes eld
16719 \begin_inset Quotes erd
16726 key (useful e.g.\InsetSpace ~
16727 if the keyboard has no working
16734 \begin_layout Standard
16735 Here are some Sciword-inspired mnemonics for frequently used math symbols.
16736 Many symbols start with a
16745 cannot be itself bound to anything.
16749 \labelwidthstring 00.00.0000
16761 \begin_inset Quotes eld
16765 \begin_inset Quotes erd
16769 \begin_inset Formula $\prime$
16773 This is frequently unnecessary: in most cases the normal apostrophe works
16776 \begin_inset Formula $x'+2x=0$
16779 , but in some cases this would generate a double superscript error in LaTeX.
16781 \begin_inset Formula $x^{\prime2}$
16785 \begin_inset Formula $x$
16788 prime squared) must be entered with the prime character.
16792 \labelwidthstring 00.00.0000
16800 command-sequence math-superscript; math-insert
16804 -- Insert a prime as a superscript (see example above).
16808 \labelwidthstring 00.00.0000
16817 -- Insert an upper index.
16824 \labelwidthstring 00.00.0000
16833 -- Insert a lower index.
16840 \labelwidthstring 00.00.0000
16852 -- Partial derivative symbol
16853 \begin_inset Formula $\partial$
16860 \labelwidthstring 00.00.0000
16872 -- Summation symbol
16873 \begin_inset Formula $\sum$
16876 (not the same as the Greek letter uppercase Sigma
16877 \begin_inset Formula $\Sigma$
16880 because it can resize and allows smart upper/lower limits).
16884 \labelwidthstring 00.00.0000
16897 \begin_inset Formula $\prod$
16900 (not the same as the Greek letter uppercase Pi,
16901 \begin_inset Formula $\Pi$
16908 \labelwidthstring 00.00.0000
16921 \begin_inset Formula $\infty$
16928 \labelwidthstring 00.00.0000
16941 \begin_inset Formula $\times$
16948 \labelwidthstring 00.00.0000
16958 -- Insert a stacked array
16959 \begin_inset Formula $\begin{array}{c}
16961 \end{array}\end{array}$
16965 (Frequently useful in formulae.)
16969 \labelwidthstring 00.00.0000
16980 \begin_inset Formula $\times$
16984 \begin_inset Formula $\begin{array}{ccc}
16989 (Then you can modify its size using the
16991 Edit\SpecialChar \menuseparator
16998 \labelwidthstring 00.00.0000
17011 \begin_inset Quotes eld
17015 \begin_inset Quotes erd
17019 \begin_inset Formula $\dagger$
17026 \labelwidthstring 00.00.0000
17039 \begin_inset Quotes eld
17043 \begin_inset Quotes erd
17047 \begin_inset Formula $\equiv$
17054 \labelwidthstring 00.00.0000
17066 \begin_inset Quotes eld
17069 Approximate equality
17070 \begin_inset Quotes erd
17074 \begin_inset Formula $\approx$
17081 \labelwidthstring 00.00.0000
17093 \begin_inset Quotes eld
17097 \begin_inset Quotes erd
17101 \begin_inset Formula $\sim$
17108 \labelwidthstring 00.00.0000
17120 \begin_inset Formula $\rightarrow$
17124 \begin_inset Formula $\lim_{x\rightarrow0}$
17131 \labelwidthstring 00.00.0000
17143 \begin_inset Formula $\leq$
17150 \labelwidthstring 00.00.0000
17161 -- Greater-or-equal
17162 \begin_inset Formula $\geq$
17169 \labelwidthstring 00.00.0000
17182 \begin_inset Quotes eld
17186 \begin_inset Quotes erd
17190 \begin_inset Formula $\ll$
17193 (useful in physics)
17197 \labelwidthstring 00.00.0000
17210 \begin_inset Quotes eld
17214 \begin_inset Quotes erd
17218 \begin_inset Formula $\gg$
17224 \begin_layout Subsection
17225 Standard math bindings
17229 \labelwidthstring 00.00.0000
17243 \labelwidthstring 00.00.0000
17255 \labelwidthstring 00.00.0000
17267 \labelwidthstring 00.00.0000
17281 \labelwidthstring 00.00.0000
17293 \labelwidthstring 00.00.0000
17305 \labelwidthstring 00.00.0000
17319 \labelwidthstring 00.00.0000
17331 \labelwidthstring 00.00.0000
17343 \labelwidthstring 00.00.0000
17355 \labelwidthstring 00.00.0000
17369 \labelwidthstring 00.00.0000
17383 \labelwidthstring 00.00.0000
17397 \labelwidthstring 00.00.0000
17411 \labelwidthstring 00.00.0000
17425 \labelwidthstring 00.00.0000
17439 \labelwidthstring 00.00.0000
17451 \labelwidthstring 00.00.0000
17465 \labelwidthstring 00.00.0000
17477 \labelwidthstring 00.00.0000
17489 \labelwidthstring 00.00.0000
17501 \labelwidthstring 00.00.0000
17513 \labelwidthstring 00.00.0000
17527 \labelwidthstring 00.00.0000
17539 \labelwidthstring 00.00.0000
17551 \labelwidthstring 00.00.0000
17563 \labelwidthstring 00.00.0000
17571 math-delim langle rangle
17575 \labelwidthstring 00.00.0000
17583 math-delim rangle langle
17587 \labelwidthstring 00.00.0000
17599 \labelwidthstring 00.00.0000
17613 \labelwidthstring 00.00.0000
17626 \begin_layout Subsection
17631 \labelwidthstring 00.00.0000
17643 \labelwidthstring 00.00.0000
17655 \labelwidthstring 00.00.0000
17667 \labelwidthstring 00.00.0000
17679 \labelwidthstring 00.00.0000