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}}{}
22 % link all cross references and URLs in pdf output
23 \usepackage[colorlinks=true, bookmarks, bookmarksnumbered,
24 linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,
25 pdfpagelayout=OneColumn, pdfnewwindow=true,
26 pdfstartview=XYZ, plainpages=false, pdfpagelabels,
27 pdfauthor={LyX Team}, pdftex,
28 pdftitle={Customizing LyX: Features for the Advanced User},pdfsubject={LyX-documentation Customization},
29 pdfkeywords={LyX, documentation}
32 \else % if dvi or ps is produced
34 % link all cross references and URLs in dvi output
35 \usepackage[ps2pdf]{hyperref}
37 \fi % end if pdflatex is used
39 % the pages of the TOC are numbered roman
40 % and a pdf-bookmark for the TOC is added
42 \let\myTOC\tableofcontents
43 \renewcommand\tableofcontents{%
44 \pdfbookmark[1]{Contents}{}
47 \pagenumbering{arabic} }
49 % redefine the \LyX macro for PDF bookmarks
50 \def\LyX{\texorpdfstring{%
51 L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
54 % used for multi-column text
61 \inputencoding default
64 \font_typewriter default
65 \font_default_family default
71 \paperfontsize default
80 \paperorientation portrait
83 \paragraph_separation indent
85 \quotes_language english
88 \paperpagestyle headings
89 \tracking_changes false
98 Customizing LyX: Features for the Advanced User
106 \begin_layout Standard
108 Principal maintainer of this file is
113 If you have comments or error corrections, please send them to the LyX
114 Documentation mailing list, <lyx-docs@lists.lyx.org>.
122 \begin_layout Standard
123 \begin_inset CommandInset toc
124 LatexCommand tableofcontents
131 \begin_layout Chapter
135 \begin_layout Standard
136 This manual covers the customization features present in LyX.
137 In it, we discuss issues like keyboard shortcuts, screen previewing options,
138 printer options, sending commands to LyX via the LyX Server, internationalizati
139 on, installing new LaTeX classes and LyX layouts, etc.
140 We can't possibly hope to touch on everything you can change---our developers
141 add new features faster than we can document them---but we will explain
142 the most common customizations and hopefully point you in the right direction
143 for some of the more obscure ones.
146 \begin_layout Chapter
147 LyX configuration files
150 \begin_layout Standard
151 \begin_inset CommandInset 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 CommandInset ref
317 reference "sec:bindings"
322 If there exists an internationalized version of the bind file named
326 , that will be used first.
327 See Chapter\InsetSpace ~
329 \begin_inset CommandInset ref
331 reference "chap:i18n"
336 \begin_inset CommandInset ref
338 reference "sec:bindings"
346 \labelwidthstring 00.00.0000
353 contains graphics files that can be included in documents.
358 \labelwidthstring 00.00.0000
365 contains LyX documentation files (including the one you are currently reading).
370 deserves special attention, as noted above.
371 If there exists an internationalized version of the help-document with
376 prepended to the name, that will be used first.
377 See Chapter\InsetSpace ~
379 \begin_inset CommandInset ref
381 reference "chap:i18n"
389 \labelwidthstring 00.00.0000
396 contains example files that explain how to use some features.
397 In the file browser, press the
405 \labelwidthstring 00.00.0000
410 contains image files that are used by the
415 In addition, it also contains the individual icons used in the toolbar
416 and the banners that can be shown when LyX is launched.
420 \labelwidthstring 00.00.0000
427 contains keyboard keymapping files.
428 See Chapter\InsetSpace ~
430 \begin_inset CommandInset ref
432 reference "sec:keymap"
440 \labelwidthstring 00.00.0000
447 contains the text class files described in Chapter\InsetSpace ~
449 \begin_inset CommandInset ref
451 reference "chap:textclass"
459 \labelwidthstring 00.00.0000
464 contains some files that demonstrate the capabilities of the
466 External\InsetSpace ~
473 \labelwidthstring 00.00.0000
478 contains the standard LyX template files described in Chapter\InsetSpace ~
480 \begin_inset CommandInset ref
482 reference "sec:templates"
490 \labelwidthstring 00.00.0000
495 contains some LaTeX cls files distributed with LyX.
499 \labelwidthstring 00.00.0000
504 contains files with the extension
508 that define the user interface to LyX.
509 That is, the files define which items appear in which menus and the items
510 appearing on the toolbar.
511 See Chapter\InsetSpace ~
513 \begin_inset CommandInset ref
522 \begin_layout Subsection
523 Files you don't want to modify
526 \begin_layout Standard
527 These files are used internally by LyX and you generally do not need to
528 modify them unless you are a developer.
532 \labelwidthstring 00.00.0000
539 this file contains the list of LyX developers.
540 The contents are displayed with the menu entry
545 elp\SpecialChar \menuseparator
553 \labelwidthstring 00.00.0000
560 this is a LaTeX script used during the configuration process.
565 \labelwidthstring 00.00.0000
572 this is the script that is used to re-configure LyX.
573 It creates configuration files in the directory it was run from.
576 \begin_layout Subsection
577 Other files needing a line or two...
581 \labelwidthstring 00.00.0000
586 this contains tables describing how different character encodings can be
591 \labelwidthstring 00.00.0000
596 this file contains the templates available to the new
598 External\InsetSpace ~
605 \labelwidthstring 00.00.0000
610 this file contains a list of all the languages currently supported by LyX.
613 \begin_layout Section
614 Your local configuration directory
617 \begin_layout Standard
618 Even if you are using LyX as an unprivileged user, you might want to change
619 LyX configuration for your own use.
624 directory contains all your personal configuration files.
625 This is the directory described as
626 \begin_inset Quotes eld
630 \begin_inset Quotes erd
638 elp\SpecialChar \menuseparator
643 This directory is used as a mirror of
647 , which means that every file in
651 is a replacement for the corresponding file in
656 Any configuration file described in the above sections can be placed either
657 in the system-wide directory, in which case it will affect all users, or
658 in your local directory for your own use.
661 \begin_layout Standard
662 To make things clearer, let's provide a few examples:
665 \begin_layout Itemize
666 The preferences set in the
671 ools\SpecialChar \menuseparator
678 dialog are saved to a file
689 \begin_layout Itemize
690 When you reconfigure using
695 ools\SpecialChar \menuseparator
706 and the resulting files are written in your local configuration directory
707 (see section\InsetSpace ~
709 \begin_inset CommandInset ref
711 reference "sec:autodetected"
715 to have a list of the
719 settings affected by this section).
720 This means that any additional text class file that you might have added
725 will be added to the list of classes in the
730 ayout\SpecialChar \menuseparator
740 \begin_layout Itemize
741 Similarly, if you have installed some LaTeX document classes in your home
742 directory, that LaTeX can find with your
746 path, they will show up in your list of text classes.
750 \begin_layout Standard
751 as long as LyX or yourself have a
755 file for it, of course.
763 \begin_layout Itemize
764 If you get some updated documentation from LyX ftp site and cannot install
765 it because you do not have sysadmin rights on your system, you can just
780 \begin_layout Section
781 Running LyX with multiple configurations
784 \begin_layout Standard
785 The configuration freedom of the local configuration directory may not suffice
786 if you want to have more than one configuration at your disposal.
787 For example, you may want to be use different key bindings or printer settings
789 You can achieve this by having several such directories.
790 You then specify which directory to use at run-time.
793 \begin_layout Standard
794 Invoking LyX with the command line switch
802 instructs the program to read the configuration from that directory, and
803 not from the default directory (you can determine the default directory
804 by running LyX without this switch as described above).
805 If this directory does not exist, LyX offers to create it for you, just
806 like it does for the default directory on the first time you run the program.
807 You can modify the configuration options in this additional
811 exactly as you would for the default directory.
812 These directories are completely independent (but read on).
813 Note that setting the environment variable
817 to some value has exactly the same effect
822 \begin_layout Standard
823 Having several configurations also requires more maintenance: if you want
824 to add a new layout to
828 which you want available from all your configurations, you must add it
829 to each directory separately.
830 You can avoid this with the following trick: after LyX creates the additional
831 directory, most of the subdirectories (see above) are empty.
832 If you want the new configuration to mirror an existing one, replace the
833 empty subdirectory with a symbolic link to the matching subdirectory in
834 the existing configuration.
841 subirectory, however, since it contains a file written by the configuration
842 script (also accessible through
847 ools\SpecialChar \menuseparator
853 \begin_inset CommandInset ref
855 reference "sec:autodetected"
861 which is configuration-specific.
864 \begin_layout Chapter
872 \begin_layout Section
873 Using the dialog for the first time
876 \begin_layout Standard
881 file will contain only changes that you have made to the default behaviour,
882 some of which is hard-coded into LyX and some of which is contained in
885 LyXDir/lyxrc.defaults
888 Note that in both files lines beginning with a
889 \begin_inset Quotes eld
897 \begin_inset Quotes erd
900 are just comments and not interpreted.
901 However, only system administrators should edit
911 ools\SpecialChar \menuseparator
918 dialog to create and modify their own
925 \begin_layout Standard
931 ools\SpecialChar \menuseparator
938 dialog will be largely self-explanatory.
939 Almost all the commands have an associated comment, so you shouldn't have
940 too much trouble modifying it to taste.
941 Before we highlight a few of the more important commands below, however,
946 ing some of your changes (e.g., screen fonts) will have an instant effect.
948 changing the bind file) will not.
949 If nothing appears to have changed, just
953 the changes and restart LyX.
956 \begin_layout Section
960 \begin_layout Standard
961 The font used to display your documents on the LyX screen is very important,
962 since you'll be reading all your documents with this font.
963 Therefore it is important that the font is as readable and good-looking
965 The LyX team tried to provide the best possible default font for you, but
966 since practically all X11 systems are different, it's likely that the default
967 fonts will be sub-optimal on your system.
968 Fortunately, you can do something about this.
969 Before we explain how to do this, you should learn a bit more about fonts
970 so that you are better prepared for choosing your fonts, because it is
971 a trade-off that is specific to your preferences and the capabilities of
975 \begin_layout Standard
976 Notice that this section only deals with the fonts on the
980 inside the LyX window.
981 The fonts that appear on the
989 are independent from these fonts, and are determined by the document class.
994 to learn how to change the font of the printed version of your document.
997 \begin_layout Standard
998 Basically, screen fonts come in two different kinds: scalable outline fonts
999 and non-scalable bitmap fonts.
1000 This distinction seems a bit arbitrary, since non-scalable fonts are actually
1001 scalable in most modern font renderers.
1002 The difference lies in the
1006 of the scaling, and the
1011 The most important decision is thus whether you should use non-scalable
1012 bitmap fonts or scalable outline fonts.
1015 \begin_layout Standard
1016 The scalable fonts are built from
1020 of the single glyphs (i.e.
1021 characters) in the font.
1022 This means that each glyph is defined using mathematical curves that are
1023 well suited for scaling to any requested size.
1024 This mathematical definition is interpreted by the font renderer and turned
1025 into a small picture composed of pixels according to which size and glyph,
1026 the programmer requests.
1027 This means that scalable fonts will look pretty good in all sizes.
1028 Well, almost all sizes.
1029 Since scalable fonts are defined in an abstract way, it can be hard to
1030 provide a good rendering at small sizes, where each pixel has to be very
1031 carefully computed to provide a good image.
1032 Technically it is possible to do this from the mathematical definition,
1033 but in order to keep the rendering reasonably fast, tradeoffs have to be
1034 made, and the result is that scalable fonts can be difficult to read at
1038 \begin_layout Standard
1039 Bitmap fonts on the other hand, are defined by bitmap graphics from the
1040 start, so they will look good at all the sizes they are meant for.
1041 However, they don't scale well, because in order to scale a glyph, each
1042 pixel is enlarged into several pixels.
1043 It is the same effect that happens if you try to enlarge a picture in
1047 or any other picture manipulation program.
1048 In order to relieve this effect, bitmap fonts are typically provided in
1049 several fixed sizes typically from around 8 pixels high up to 34 pixels
1050 or so high in steps according to what is believed to be useful.
1051 The advantage of bitmap fonts is that no complicated computations are necessary
1052 to display each glyph, so bitmap fonts are thus faster displayed than scalable
1054 The disadvantage is that sizes that don't exists as fixed versions have
1055 to be scaled by doubling pixels, and thus look bad.
1058 \begin_layout Standard
1059 The net result of all this, is that bitmap fonts are generally best for
1060 the small sizes, where they are available, while scalable fonts are generally
1061 best for large sizes.
1062 The logical conclusion would thus be to use bitmap fonts for the small
1063 sizes, and scalable fonts for the large sizes.
1064 Unfortunately, this is not a good idea, since bitmap fonts and scalable
1065 fonts are not designed to be used together, so the overall look of such
1066 a scheme would be bad.
1067 The best you can do is thus to try both schemes and decide for yourself
1071 \begin_layout Standard
1072 By default, LyX uses non-scalable bitmap fonts (when using the XForms frontend).
1077 is used, for sans serif fonts,
1085 is used as the monospaced/typewriter font.
1088 \begin_layout Standard
1089 In the following, we will describe what to do if the text does not look
1091 We'll start with the most important parameters: DPI and font zoom.
1094 \begin_layout Subsection
1095 DPI setting and Font Zoom
1098 \begin_layout Standard
1099 LyX automatically tries to scale the fonts to look as close as the paper
1100 output size as possible, except for the so-called font zoom factor.
1103 \begin_layout Standard
1104 In order for this to work on all systems, it relies on the screen DPI (dots
1105 per inch) setting to be correct.
1106 The DPI setting for your system is autodetected by LyX using the information
1107 the X server can provide.
1108 You can check what LyX autodetects the DPI setting to, by running LyX as
1116 \begin_layout Standard
1117 On many systems, X is not set up correctly, so you should check that it
1120 \begin_inset Quotes eld
1128 \begin_inset Quotes erd
1131 and write down what the DPI is for the resolution you use (this will be
1132 close to the value LyX detects).
1133 It is the number mentioned as
1134 \begin_inset Quotes eld
1138 \begin_inset Quotes erd
1142 Also write down the number of pixels you have in the width (the first number
1144 \begin_inset Quotes eld
1148 \begin_inset Quotes erd
1154 \begin_layout Standard
1155 Then get the good old ruler out of the closet, and measure the width of
1156 the visible screen-image on your monitor.
1157 Convert this measurement to inches if you used a centimeter ruler by dividing
1159 Now you can determine the correct DPI setting for your screen by dividing
1160 the number of pixels in the width by the width of the screen-image on the
1162 If this number is more than, say, 5 DPI from the detected value, you should
1163 either fix the X setup, or at least tell LyX that the DPI is different
1164 than the detected value.
1167 \begin_layout Standard
1168 If you can't fix the X setup (which of course is best since other programs
1169 than LyX will benefit from this as well), you can tell LyX the correct
1177 \begin_layout Standard
1178 If the text is too small or too big for your taste, you should fiddle with
1179 the font zoom setting.
1180 This setting is used to scale the point size of the text.
1181 If your DPI setting is correct, and the font zoom setting is set to 100,
1182 this means that LyX will try to display the text exactly the same size
1183 as it will appear on the paper-output.
1184 If you set the zoom factor to 200, the text will try to be 2 times as big
1186 Of course, this will only happen if LyX can find a font that has the appropriat
1187 e size, which you can't count on.
1188 Since LyX is a WYSIWYM system anyways, this limitation isn't much of an
1192 \begin_layout Standard
1193 The default font zoom setting is 150, since a monitor is typically wider
1194 than a piece of paper, but you should try to fiddle with it through the
1208 dialog to find a size that you like.
1209 When you've found a setting that seems to work nicely for you (tip: use
1217 button to keep the dialog open while you experiment), you can make this
1218 setting the default by using the
1228 \begin_layout Standard
1229 While it is often possible to find a suitable size for the text on the screen,
1230 this doesn't necessarily mean that the fonts are the best ones available
1232 In order to help you get the most out of your system, you can use the font
1233 definition commands to fine-tune the look of the text in greater detail
1237 \begin_layout Subsection
1238 Font definition commands
1241 \begin_layout Standard
1242 As mentioned, LyX uses non-scalable bitmap fonts by default with the XForms
1248 is used, for sans serif fonts,
1256 is used as the monospaced/typewriter font.
1259 \begin_layout Standard
1260 You can change all of these from within the
1265 The number of fonts that are available on different systems vary, but the
1270 should be available everywhere.
1271 Use that program to find candidate fonts.
1272 When you've found a font that you like, try to insert the first two elements
1274 \begin_inset Quotes eld
1278 \begin_inset Quotes erd
1282 \begin_inset Quotes eld
1286 \begin_inset Quotes erd
1293 ) in the appropriate field in the
1305 LyX will then reformat your document using the new font, and if you like
1306 the font, you should
1314 One place to start for a new font is to see if the scalable font
1315 \begin_inset Quotes eld
1319 \begin_inset Quotes erd
1323 Tip: You can see whether a font is a bitmap font or a scalable font by
1325 \begin_inset Quotes eld
1329 \begin_inset Quotes erd
1333 \begin_inset Quotes eld
1337 \begin_inset Quotes erd
1345 If the value 0 is available, the font is scalable.
1346 If the value 0 isn't available, the font is a bitmap font.
1349 \begin_layout Standard
1350 Before you go about scrapping a bitmap font because the larger sizes look
1352 \begin_inset Quotes eld
1356 \begin_inset Quotes erd
1359 , you should toggle the
1360 \begin_inset Quotes eld
1364 \begin_inset Quotes erd
1368 This is only useful if you use bitmap fonts, because only these don't scale
1370 If you define this flag, LyX will only use the fixed font sizes that are
1371 available, and this guarantees that all bitmap fonts look well.
1372 (You can see which individual font sizes are available with the
1381 .) However, the prize is that the difference between the size of the fonts
1382 on screen and the size of fonts on paper will be larger because LyX will
1383 have to be satisfied with the closest available size, and not try to scale
1385 Also, you can risk that some logically different sizes, such as
1393 , will be mapped to the same screen font, making it hard for you to see
1394 the difference on screen.
1395 We've decided not to use scalable fonts by default because of these artifacts,
1396 but since LyX is a WYSIWYM system, many people like to use the flag anyways,
1397 well-knowing that the font size on the screen can't be trusted.
1398 But remember that this flag only makes a difference when you use bitmap
1400 Scalable fonts won't be affected for reasons you should understand by now.
1403 \begin_layout Standard
1404 One final note regarding this flag: you should know that there is nothing
1405 wrong with using bitmap and scalable fonts at the same time for different
1407 For instance, it's common to use the scalable
1408 \begin_inset Quotes eld
1412 \begin_inset Quotes erd
1415 for the serif text together with a bitmap version of
1416 \begin_inset Quotes eld
1420 \begin_inset Quotes erd
1424 And you can safely select the
1425 \begin_inset Quotes eld
1429 \begin_inset Quotes erd
1432 button without worries: It will only apply to the Helvetica font.
1435 \begin_layout Standard
1436 Sometimes the artifacts introduced by use of the flag can be relieved by
1437 using the fine-detail screen font sizes which defines which point sizes
1438 the different logical font sizes correspond to.
1443 to see exactly what concrete fonts the logical sizes map to, and try adjusting
1444 the corresponding entries in the
1448 dialog until you've managed to hit the nail and get the fonts you want.
1449 This can be hard to do, because LyX uses the DPI setting and the font zoom
1450 settings to calculate which exact screen font size to ask the X server
1451 for, thus obfuscating the mapping.
1452 If you can't make it by trial-and-error, you can make the process more
1453 transparent if you set both the DPI setting and font zoom settings to 100---eve
1454 n when this is known to be wrong.
1455 This will of course make your scalable fonts look weird, so use with care.
1458 \begin_layout Subsection
1462 \begin_layout Standard
1463 By default, LyX will use fonts meant to write Western European text, including
1464 all kinds of English.
1465 This is defined through the so-called
1474 If you want to use LyX to write for instance Eastern European text, Cyrillic
1475 or any other language not covered by the ISO-8859-1 font encoding, you
1476 can define a different one with the encoding setting.
1477 This requires you to have special fonts installed.
1482 to see whether this is the case: check the
1483 \begin_inset Quotes eld
1487 \begin_inset Quotes erd
1491 \begin_inset Quotes eld
1495 \begin_inset Quotes erd
1498 fields for ISO-8859-X values different from ISO-8859-1, and search for
1499 one that contains the national characters of your language.
1500 If you find any, enter this encoding in the dialog.
1501 If not, go searching the Web for appropriate fonts.
1502 For the Qt frontend, it's recommended you use an iso646 font set.
1505 \begin_layout Standard
1506 When you've set LyX up to use a different font encoding, you should also
1507 consider changing the font used by dialog windows in LyX.
1514 dialog will not be understandable unless you tell LyX to use a different
1516 By default the menu font is set to
1518 -*-helvetica-medium-r
1520 , but often Helvetica is not available in the font encoding you need, so
1521 the dialog allows this to be changed.
1524 \begin_layout Standard
1525 As you can see, there are quite a few options that can be used to fine tune
1526 the look of your fonts.
1527 This should not scare you from fiddling with the settings, because after
1528 all, you will hopefully be using LyX for many hours in the future.
1529 And contrary to real WYSIWYG word processors where you are tied to using
1530 fonts that have to look good both on paper and on screen, LyX gives you
1531 the possibility of using fonts that are designed to look good on the screen
1532 while using a different set of fonts to look good on paper.
1535 \begin_layout Section
1537 \begin_inset CommandInset label
1546 \begin_layout Standard
1547 Bindings are used to, well, bind a function to a key.
1548 Several prepackaged binding files are available: a CUA set of bindings
1549 (familiar as the typical set of PC and CDE set of keyboard shortcuts),
1550 an Emacs set of bindings, for those of us who follow the One True Way and
1551 refuse to lower our standards,
1555 \begin_layout Standard
1556 I'm kidding here, of course!
1561 as well as specialty bindings (broadway and hollywood) and other languages
1562 (French, German, etc.).
1565 \begin_layout Standard
1566 If, however, you'd like to customise the keybindings to your own exacting
1567 tastes, then copy the best-fit file in
1576 Don't forget to load this new file into LyX using the
1581 (For the moment you'll have to restart LyX for these changes to take effect.)
1584 \begin_layout Standard
1585 LyX supports internationalization of the user interface (see Chapter\InsetSpace ~
1587 \begin_inset CommandInset ref
1589 reference "chap:i18n"
1598 is set, with the environment variable
1602 , LyX will try to use bindfiles by prepending
1607 For example, you can put a translated copy of some standard bind file in
1612 directory, and LyX will use it automatically.
1615 \begin_layout Standard
1620 files is straightforward:
1623 \begin_layout Standard
1628 bind <key combination> <lyx-function>
1631 \begin_layout Standard
1632 Both key combination and lyx-function (including any arguments) must be
1633 enclosed in "double quotes".
1634 All the LyX functions are listed in the
1641 \begin_layout Section
1643 \begin_inset CommandInset label
1652 \begin_layout Standard
1653 The appearance of both the menu and toolbar may both be changed using the
1668 For the moment, only one file exists,
1672 , but feel free to experiment.
1673 Just copy the file to the
1677 directory and play! Note that, for the moment, you'll have to restart LyX
1678 for these changes to take effect.
1681 \begin_layout Standard
1686 files is straightforward: have a look at
1699 entries must be ended with an explicit
1724 s and in the case of the
1725 \begin_inset Quotes eld
1729 \begin_inset Quotes erd
1737 One small word of warning.
1742 s may be inserted in a
1750 , but they are defined as
1761 \begin_layout Section
1762 \begin_inset CommandInset label
1764 name "sec:converters-etc"
1768 Converters, Formats, and Copiers
1771 \begin_layout Standard
1772 LyX has a powerful mechanism to convert to and from any file format using
1777 \begin_layout Subsection
1781 \begin_layout Standard
1782 The first step is to define your file formats if they are not already defined.
1785 Tools\SpecialChar \menuseparator
1786 Preferences:Converters
1789 Enter a new format name; a new GUI name (used in e.\InsetSpace \thinspace{}
1799 menus); and a file extension.
1804 \begin_layout Standard
1809 option tells LyX that a format is suitable for document export.
1810 If this is is set and if a suitable conversion route exists, the format
1813 File\SpecialChar \menuseparator
1817 The format will also appear in the
1821 menu if it has a specified viewer.
1822 Pure image formats, e.\InsetSpace \thinspace{}
1828 , should not use this option.
1829 Formats that can both represent vector graphics and documents like e.\InsetSpace \thinspace{}
1838 \begin_layout Standard
1841 Vector graphics format
1843 tells LyX that a format can contain vector graphics.
1844 This information is used to determine the target format of included graphics
1850 Included graphics may need to be converted to either
1866 cannot handle other image formats.
1867 If an included graphic is not already in
1879 format, it is converted to
1883 if the vector format option is set, and otherwise to
1890 \begin_layout Standard
1891 A Format can have a Viewer and Editor program associated with it.
1892 For example, you might want to use
1896 to view PostScript files.
1897 You can enter the program call and its options to the corresponding fields.
1898 For the call you can use the four variable listed in the next section.
1899 The viewer is launched when you view an image in LyX or use the
1904 If the operating system has a default viewer associated to a format, this
1905 viewer is used instead of the one defined here when you enter in the Viewer
1907 \begin_inset Quotes eld
1915 \begin_inset Quotes erd
1919 The editor is for example launched when you press the
1934 \begin_layout Subsection
1938 \begin_layout Standard
1939 Each format can have a Copier associated with it.
1940 These are defined in the
1942 Tools\SpecialChar \menuseparator
1946 Since all conversions from one format to another take place in LyX's temporary
1947 directory, it is sometimes necessary to modify a file before copying it
1948 to the temporary directory in order that the conversion may be performed.
1952 \begin_layout Standard
1953 For example, the file may refer to other files---images, for example---using
1954 relative filenames, and these may become invalid when the file is copied
1955 to the temporary directory.
1960 This is done by the Copier: It copies a file to (or from) the temporary
1961 directory and may modify it in the process.
1964 \begin_layout Standard
1965 Copiers may also be used for other purposes.
1966 For example, if appropriate converters are found, LyX will automatically
1967 install copiers for the
1977 When these formats are exported, the copier sees that not just the main
1978 HTML file but various associated files (style files, images, etc.) are also
1980 All these files are written to a subdirectory of the directory in which
1981 the original LyX file was found.
1985 \begin_layout Standard
1986 This copier can be customized.
1988 \begin_inset Quotes eld
1992 \begin_inset Quotes erd
1995 argument takes a comma-separated list of extensions to be copied; if it
1996 is omitted, all files will be copied.
1998 \begin_inset Quotes eld
2002 \begin_inset Quotes erd
2005 argument determines the extension added to the generated directory.
2007 \begin_inset Quotes eld
2015 \begin_inset Quotes erd
2018 , so HTML generated from
2020 /path/to/filename.lyx
2024 /path/to/filename.html.LyXconv
2035 \begin_layout Standard
2036 The definitions of the copiers may use four variables:
2040 \labelwidthstring 00.00.0000
2041 $$s The LyX system directory (e.\InsetSpace \thinspace{}
2051 \labelwidthstring 00.00.0000
2056 \labelwidthstring 00.00.0000
2061 \labelwidthstring 00.00.0000
2062 $$l The `LaTeX name'
2065 \begin_layout Standard
2066 The latter is to be given in a form suitable for inclusion in a LaTeX's
2073 command and is relevant only when exporting files suitable for such inclusion.
2076 \begin_layout Standard
2077 Copiers can be used to do almost anything with output files.
2078 For example, suppose you want generated pdf files to be copied to a special
2080 \begin_inset Flex CharStyle:Code
2083 \begin_layout Standard
2090 Then you could write a shell script such as this one:
2093 \begin_layout Standard
2094 \begin_inset listings
2098 \begin_layout Standard
2102 \begin_layout Standard
2106 \begin_layout Standard
2107 TOFILE=`basename $2`
2110 \begin_layout Standard
2111 cp $FROMFILE /home/you/pdf/$TOFILE
2116 Save that in your local LyX directory---say,
2117 \begin_inset Flex CharStyle:Code
2120 \begin_layout Standard
2121 /home/you/.lyx/scripts/pdfcopier.sh
2126 ---and make it executable, if you need to do so on your platform.
2129 Tools\SpecialChar \menuseparator
2136 format---or one of the other pdf formats---and enter
2137 \begin_inset Flex CharStyle:Code
2140 \begin_layout Standard
2141 pdfcopier.sh $$i $$o
2154 \begin_layout Subsection
2158 \begin_layout Standard
2159 To define a new converter, select an existing one, select a different format
2165 and\InsetSpace \thinspace{}
2166 /\InsetSpace \thinspace{}
2172 drop-down list, modify the
2176 field, and press the
2183 \begin_layout Standard
2184 You do not have to define converters between all the formats between which
2185 you want to convert.
2186 For example, you will note that there is no `LyX to PostScript' converter,
2187 but LyX will export PostScript.
2188 It does so by first creating a LaTeX file (no converter needs to be defined
2189 for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2190 and finally converts the resulting DVI file to PostScript.
2191 LyX finds such `chains' of converters automatically, and it will always
2192 choose the shortest possible chain.
2193 You can, though, still define multiple conversion methods between file
2195 For example, the standard LyX configuration provides three ways to convert
2196 LaTeX to PDF: Directly, using
2200 ; via (DVI and) PostScript, using
2209 To define such alternate chains, you must define multiple target `file
2210 formats', as described in the next section.
2211 For example in the standard configuration the formats named
2223 are defined, all of which share the extension
2230 \begin_layout Standard
2231 Several variables can be used in the definition of converters:
2235 \labelwidthstring 00.00.0000
2236 $$s The LyX system directory
2240 \labelwidthstring 00.00.0000
2245 \labelwidthstring 00.00.0000
2250 \labelwidthstring 00.00.0000
2251 $$b The base filename of the input file
2255 \labelwidthstring 00.00.0000
2256 $$p The path to the input file
2259 \begin_layout Standard
2265 field you can enter the following flags, separated by commas:
2269 \labelwidthstring 00.00.0000
2270 latex This converter runs some form of LaTeX.
2271 This will make LyX's LaTeX error logs available.
2275 \labelwidthstring 00.00.0000
2276 needaux Needs the LaTeX
2280 file for the conversion.
2284 \labelwidthstring 00.00.0000
2288 \begin_layout Standard
2289 The following three flags are not really flags at all because they take
2300 \labelwidthstring 00.00.0000
2301 parselog If set, the converter's standard error will be redirected to a
2306 , and the script given as argument will be run as:
2308 script <infile.out >infile.log
2311 The argument may contain $$s.
2315 \labelwidthstring 00.00.0000
2316 resultdir The name of the directory in which the
2320 will dump the generated files.
2321 LyX will not create this directory, and it does not copy anything into
2322 it, though it will copy this directory to the destination.
2323 The argument may contain $$b, which will be replaced by the basename of
2324 the input and output files, respectively, when the directory is copied.
2327 that resultdir and usetempdir make no sense together.
2328 The latter will be ignored if the former is given.
2332 \labelwidthstring 00.00.0000
2333 resultfile Determines the output filename and may, contain $$b.
2334 Sensible only with resultdir, and optional even then; if not given, it
2335 defaults to `index'.
2338 \begin_layout Standard
2339 None of these last three are presently used in any of the converters that
2340 are installed with LyX.
2342 \begin_inset CommandInset ref
2344 reference "sub:LyX-and-Literate"
2348 of the Extended Features guide for some examples of how you might use parselog.
2351 \begin_layout Section
2352 BibTeX and makeindex
2355 \begin_layout Standard
2356 Both the bibliography generating command (default
2360 ) and the index generating command (default
2373 As an alternative for
2385 \begin_layout Standard
2386 The command to enter is
2392 makeindex.sh -m $$lang
2395 \begin_layout Standard
2396 where the placeholder
2400 will be replaced by the chosen document (babel) language.
2404 \begin_layout Standard
2405 have installed the packages
2422 at a shell prompt for a help page.
2425 \begin_layout Section
2426 Plain text export options
2429 \begin_layout Standard
2430 \begin_inset VSpace bigskip
2436 \begin_layout Standard
2438 There are a couple of commands that can be used to
2439 \begin_inset Quotes eld
2443 \begin_inset Quotes erd
2446 exported plain text files.
2447 Note that LyX automatically detects and uses the best settings for your
2448 system at installation time, but you can modify them if you disagree with
2452 \begin_layout Description
2456 Plain text\InsetSpace ~
2460 This option defines the command used to produce better plain text tables
2465 UNIX-commands (refer to their manpages for more information about them).
2466 Setting this as empty tells LyX to use the internal (inferior) formatter.
2469 \begin_layout Description
2473 Plain text\InsetSpace ~
2478 With this command you can set the default line length of the plain text
2480 Setting it to 0 means endless lines.
2483 \begin_layout Section
2487 \begin_layout Standard
2488 There are a bunch of configuration options that are used for interaction
2489 with the external print command from LyX.
2490 Normally the defaults are fine: if, however, your print command takes different
2491 option names, you can modify them here.
2494 \begin_layout Subsection
2498 \begin_layout Standard
2499 You can change the colors used by LyX on-screen using the new
2504 Alternatively, if you're feeling particularly perverse you could use the
2509 bindable function (see the
2514 Input would have the format:
2517 \begin_layout Standard
2520 set-color LyXName X11Color
2523 \begin_layout Standard
2524 Here is a (partial) list of the functions and default colors:
2527 \begin_layout Standard
2529 \begin_inset Tabular
2530 <lyxtabular version="3" rows="10" columns="3">
2532 <column alignment="left" valignment="top" leftline="true" width="0pt">
2533 <column alignment="left" valignment="top" leftline="true" width="0pt">
2534 <column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
2535 <row topline="true" bottomline="true">
2536 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2539 \begin_layout Standard
2554 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2557 \begin_layout Standard
2572 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2575 \begin_layout Standard
2591 <row topline="true">
2592 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2595 \begin_layout Standard
2610 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2613 \begin_layout Standard
2628 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2631 \begin_layout Standard
2647 <row topline="true">
2648 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2651 \begin_layout Standard
2666 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2669 \begin_layout Standard
2684 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2687 \begin_layout Standard
2703 <row topline="true">
2704 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2707 \begin_layout Standard
2722 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2725 \begin_layout Standard
2740 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2743 \begin_layout Standard
2759 <row topline="true">
2760 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2763 \begin_layout Standard
2778 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2781 \begin_layout Standard
2796 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2799 \begin_layout Standard
2815 <row topline="true">
2816 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2819 \begin_layout Standard
2834 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2837 \begin_layout Standard
2847 fraction Lines, brackets, etc.
2852 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2855 \begin_layout Standard
2871 <row topline="true">
2872 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2875 \begin_layout Standard
2890 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2893 \begin_layout Standard
2899 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2902 \begin_layout Standard
2918 <row topline="true">
2919 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2922 \begin_layout Standard
2937 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2940 \begin_layout Standard
2946 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2949 \begin_layout Standard
2965 <row topline="true">
2966 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2969 \begin_layout Standard
2984 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2987 \begin_layout Standard
2993 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2996 \begin_layout Standard
3012 <row topline="true" bottomline="true">
3013 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
3016 \begin_layout Standard
3031 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
3034 \begin_layout Standard
3044 selection background
3049 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3052 \begin_layout Standard
3075 \begin_layout Section
3076 The autodetected settings
3079 \begin_layout Standard
3080 \begin_inset CommandInset label
3082 name "sec:autodetected"
3086 There are several items that are detected for you when you run
3093 \SpecialChar \menuseparator
3099 In this section, we list those which pertain to the user preferences.
3102 \begin_layout Description
3108 plaintext_roff_command
3123 , depending on what is available.
3126 \begin_layout Description
3139 plus a bunch of options.
3142 \begin_layout Description
3155 on systems (so-called System V) who have this command, and
3159 otherwise (BSD systems).
3162 \begin_layout Description
3168 print_spool_printerprefix
3179 , depending on whether
3190 \begin_layout Description
3207 fonts are found and LaTeX has support for these fonts built-in.
3208 You can set it manually if you only have the so-called
3215 \begin_layout Section
3219 \begin_layout Standard
3220 There are many other configuration options that can be used to customize
3222 We still need to document them here, but again, most should be fairly obvious.
3223 Please ask on the mailing lists if you need some more information; it may
3224 even prompt us to expand this section.
3227 \begin_layout Chapter
3228 Internationalizing LyX
3229 \begin_inset CommandInset label
3238 \begin_layout Standard
3239 LyX supports using a translated interface.
3240 Last time we checked, LyX provided text in 14 languages together with the
3241 default English text.
3242 The language of choice is called your
3247 (For further reading on locale settings, see also the documentation for
3248 locale that comes with your operating system.
3249 For Linux, the manual page for locale(5) could be a good place to start).
3252 \begin_layout Standard
3253 Notice that these translations will work, but do contain a few flaws.
3254 In particular, all dialogs have been designed with the English text in
3255 mind, which means that some of the translated text will be too large to
3256 fit within the space allocated.
3257 This is only a display problem and will not cause any harm.
3258 Also, you will find that some of the translations do not define short-cut
3259 keys for everything.
3260 Sometimes, there are simply not enough free letters to do it.
3261 Other times, the translator just hasn't got around to doing it yet.
3262 Our localization team -- which you may wish to join -- will try to fix
3263 these shortcomings in future versions of LyX.
3266 \begin_layout Section
3267 Selecting an alternative language for the user interface
3270 \begin_layout Standard
3271 This feature is disabled by default, meaning that system default language
3273 To enable an alternative language, you have to set an appropriate environment
3281 for csh class shells
3296 with the two letter code (or four letter code, like
3300 for British English) for the language you want.
3306 Besides the user interface texts being translated, also the appropriate
3307 manuals will be presented under the Help menu -- if available.
3310 \begin_layout Standard
3311 On some systems, you may have to redefine
3323 , to override the system settings; their preference is in this order
3327 \begin_layout Standard
3328 The shell variable LANGUAGE has been disabled in LyX for technical reasons.
3334 , which corresponds to the way GNU
3339 Consult your system documentation.
3340 Normally, you'll want to put the appropriate line in a shell script run
3341 on start-up, so that the translation is on by default.
3342 Remember that this affects
3346 localized packages, not only LyX!
3349 \begin_layout Standard
3350 If LyX is configured and compiled with
3351 \begin_inset Quotes eld
3359 \begin_inset Quotes erd
3362 , this mechanism will not work.
3365 \begin_layout Section
3369 \begin_layout Subsection
3370 Translating the graphical user interface (text messages).
3373 \begin_layout Standard
3378 library to handle the internationalization of the interface.
3379 To have LyX speak your favorite language in all menus and dialogs, you
3384 -file for that language.
3385 When this is available, you'll have to generate a mo-file from it and install
3391 The process of doing all of this is explained in the documentation for
3397 You should also read the
3399 LYX-SOURCE-DIR/README.localisation
3401 file, but in short, this is what you do (
3405 denotes the language code):
3408 \begin_layout Standard
3412 \begin_layout Standard
3424 \begin_layout Itemize
3427 LYX-SOURCE-DIR/po/lyx.pot
3440 doesn't exist, it can be remade with
3444 in that directory, or you can use an existing po-file for some other language
3448 \begin_layout Itemize
3455 \begin_layout Standard
3456 We recommend that you use Emacs to do this, since the
3460 distribution includes a nice mode that supports you in doing this.
3468 For some menu- and widget-labels, there are also shortcut keys that should
3470 Those keys are marked after a `|', and should be translated according to
3471 the words and phrases of the
3476 You should also fill also out the information at the beginning of the new
3481 -file with your email-address, etc., so people know where to reach you with
3482 suggestions and entertaining flames.
3485 \begin_layout Itemize
3494 This can be done with
3515 \begin_layout Itemize
3520 -file to your locale-tree, at the correct directory for application messages
3525 , and under the name
3534 /usr/local/share/locale/
3545 \begin_layout Standard
3549 \begin_layout Standard
3561 \begin_layout Standard
3562 Adding a new po-file to the
3566 of LyX involves altering the configure scripts and more, but the way
3570 works, you don't actually need the source-code of LyX to translate it---having
3586 \begin_layout Standard
3587 If you've written a translation file for a language that LyX does not currently
3588 support, feel free to submit it for inclusion by sending a patch.
3592 \begin_layout Subsubsection
3596 \begin_layout Standard
3597 Sometimes it turns out that one english message needs to be translated into
3598 different messages in the target language.
3599 One example is the message
3603 which has the german translation
3620 does not handle such ambigous translations.
3621 Therefore you have to add some context information to the message: Instead
3628 To[[as in 'From format x to format y']]
3632 To[[as in 'From page x to page y']].
3635 Now the two occurences of
3643 and can be translated correctly to
3658 \begin_layout Standard
3659 Of course the context information needs to be stripped off the original
3660 message when no translation is used.
3661 Therefore you have to put it in double square brackets at the end of the
3662 message (see the example above).
3663 The translation mechanism of LyX ensures that everything in double square
3664 brackets at the end of messages is removed before displaying the message.
3667 \begin_layout Subsection
3668 Translating the documentation.
3671 \begin_layout Standard
3672 The online documentation (in the
3679 -menu) can (and should!) be translated.
3680 If there are translated versions of the documentation available
3684 \begin_layout Standard
3685 As of February 2003, almost all of the docs have been translated into German
3691 has been translated into at least 12 other languages, with other translations
3693 The library of translated documents is growing rapidly.
3698 , and the locale is set accordingly, these will be used automagically by
3700 LyX looks for translated versions as
3714 denotes the language as set by the environmental variable
3719 If there are none, the default English versions will be displayed.
3720 Note that the translated versions must have the same filenames (
3724 above) as the original.
3725 If you feel up to translating the documentation (an excellent way to proof-read
3726 the original documentation BTW!), there are a few things you should do
3730 \begin_layout Itemize
3735 , the guide to writing LyX documentation.
3736 Pay special attention to the translator's section.
3739 \begin_layout Itemize
3740 Check out the documentation translation web page at
3741 \begin_inset Flex URL
3744 \begin_layout Standard
3746 http://www.devel.lyx.org
3752 That way, you can find out which (if any) documents have already been translate
3753 d into your language.
3754 You can also find out who (if anyone) is organizing the effort to translate
3755 the documentation into your language.
3756 If no one is organizing the effort, please let us know that you're interested.
3759 \begin_layout Standard
3760 Once you get to actually translating, here's a few hints for you that may
3764 \begin_layout Itemize
3765 Join the documentation team! There is information on how to do that in
3774 elp\SpecialChar \menuseparator
3781 ), which by the way is the first document you should translate.
3784 \begin_layout Itemize
3785 Learn the typographic conventions for the language you are translating to.
3786 Typography is an ancient art and over the centuries, a great variety of
3787 conventions have developed throughout different parts of the world.
3788 Also study the professional terminology amongst typographers in your country.
3789 Inventing your own terminology will only confuse the users.
3792 (Warning! Typography is addictive!)
3795 \begin_layout Itemize
3796 Make a copy of the document.
3797 This will be your working copy.
3798 You can use this as your personal translated help-file by placing it in
3806 \begin_layout Itemize
3807 Sometimes the original document (from the LyX-team) will be updated.
3808 Use the ViewCVS tool available at
3809 \begin_inset Flex URL
3812 \begin_layout Standard
3814 http://www.lyx.org/viewcvs.cgi/lyxdoc/
3819 to see what has been changed
3823 \begin_layout Standard
3824 Alternatively, you can keep a copy of the latest version of the English
3825 document which you've translated.
3831 That way you can easily see which parts of the translated document need
3835 \begin_layout Itemize
3836 If you ever find an error in the original document, fix it and notify the
3837 rest of the documentation team of the changes! (You didn't forget to join
3838 the documentation team did you?)
3841 \begin_layout Section
3842 International Keyboard Support
3845 \begin_layout Standard
3848 [Editor's Note: The following section is by
3856 It needs to be fixed to conform to the new Documentation Style sheet and
3857 to make use of the new v1.0 features.
3858 The whole thing also needs to be merged with the section following it.-jw]
3861 \begin_layout Subsection
3862 Defining Own Keymaps: Keymap File Format
3865 \begin_layout Standard
3866 Let's look at a keyboard definition file a little closer.
3867 It is a plain text file defining
3870 \begin_layout Itemize
3871 key-to-key or key-to-string translations
3874 \begin_layout Itemize
3878 \begin_layout Itemize
3879 dead keys exceptions
3882 \begin_layout Standard
3883 To define key-to-key or key-to-string translation, use this command:
3886 \begin_layout Quotation
3902 \begin_layout Standard
3907 is the key to be translated and
3911 is the string to be inserted into the document.
3912 To define dead keys, use:
3915 \begin_layout Quotation
3931 \begin_layout Standard
3941 The following dead keys are supported (shortcut name is in parentheses):
3944 \begin_layout Quotation
3952 \begin_layout Quotation
3958 \begin_layout Quotation
3964 \begin_layout Quotation
3970 \begin_layout Quotation
3976 \begin_layout Quotation
3983 \begin_layout Standard
3995 \begin_layout Quotation
4001 \begin_layout Quotation
4008 \begin_layout Standard
4020 \begin_layout Quotation
4026 \begin_layout Quotation
4032 \begin_layout Quotation
4039 \begin_layout Standard
4051 \begin_layout Quotation
4058 \begin_layout Standard
4070 \begin_layout Quotation
4076 \begin_layout Quotation
4077 hungarian umlaut (hug)
4082 \begin_layout Quotation
4088 \begin_layout Quotation
4095 \begin_layout Standard
4107 \begin_layout Standard
4108 Since in many international keyboards there are exceptions to what some
4109 dead keys should do, you can define them using
4112 \begin_layout Quotation
4121 deadkey key outstring
4124 \begin_layout Standard
4125 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
4129 \begin_layout Quotation
4143 \begin_layout Standard
4144 to make it work correctly.
4145 Also, you have to define as exceptions dead keys over i and j, to remove
4146 the dot from them before inserting an accent mark.
4147 I will change this when the time comes, but so far I haven't had time.
4150 \begin_layout Standard
4151 Oh, and about characters: backslash is escaped, so to enter it, you'll need
4157 have different meaning.
4162 marks comments, quotes start and end LaTeX-style commands.
4163 To enter quote, you'll need to use
4182 \begin_layout Standard
4183 If you make a keyboard description file that works for your language, please
4184 mail it to me, so I can include it in the next keymap distribution.
4187 \begin_layout Standard
4188 More keywords will be supported in keymap configuration file in future,
4192 \begin_layout Itemize
4210 \begin_layout Itemize
4225 an external keymap translation program
4228 \begin_layout Standard
4229 Also, it should look into
4233 file for defaults, too (for example, a
4239 option to include default keyboard).
4242 \begin_layout Section
4243 International Keymap Stuff
4244 \begin_inset CommandInset label
4253 \begin_layout Standard
4254 The next two sections describe the
4266 file syntax in detail.
4267 These sections should help you design your own key map if the ones provided
4268 do not meet your needs.
4271 \begin_layout Subsection
4275 \begin_layout Standard
4284 file maps keystrokes to characters or strings.
4285 As the name suggests it sets a keyboard mapping.
4310 are described in this section.
4314 \labelwidthstring 00.00.0000
4321 Map a character to a string
4324 \begin_layout LyX-Code
4339 \begin_layout Standard
4372 the double-quote (")
4389 must be escaped with a preceding backslash (
4400 \begin_layout Standard
4407 statement to cause the symbol
4413 to be output for the keystroke
4422 \begin_layout LyX-Code
4429 \labelwidthstring 00.00.0000
4436 Specify an accent character
4439 \begin_layout LyX-Code
4448 \begin_layout Standard
4449 This will make the cha
4487 This is the dead key
4491 \begin_layout Standard
4498 refers to a key that does not produce a character by itself, but when followed
4499 with another key, produces the desired accent character.
4500 For example, a German characte
4502 r with an umlaut like
4512 can be produced in this manner.
4521 \begin_layout Standard
4534 and then another key not in
4551 followed by the other, unallowed key, as output.
4560 cancels a dead key, so if
4577 , the cursor will not go one position backwards but will instead cancel
4594 might have had on the next keystroke.
4598 \begin_layout Standard
4599 The following example specifies that the character ' is to be an acute accent,
4600 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4603 \begin_layout LyX-Code
4606 kmod ' acute aeiouAEIOU
4610 \labelwidthstring 00.00.0000
4615 Specify an exception to the accent character
4618 \begin_layout LyX-Code
4627 \begin_layout Standard
4628 This defines an exce
4669 have been assigned a keystroke with a previous
4692 must not belong in the
4744 If such a declaration does not exist in
4800 \begin_layout Standard
4801 The following command produces causes äi to be produced when you enter acute-i
4805 \begin_layout LyX-Code
4820 \labelwidthstring 00.00.0000
4825 Combine two accent characters
4828 \begin_layout LyX-Code
4834 accent1 accent2 allowed
4837 \begin_layout Standard
4838 This one is getting pretty esoteric.
4839 It allows you to combine the effect
4920 \begin_layout Standard
4921 Consider this example from the
4930 \begin_layout LyX-Code
4933 kmod ; acute aeioyvhAEIOYVH
4937 kcomb acute umlaut iyIY
4940 \begin_layout Standard
4941 This allows you to press
4947 and get the effect of
4964 in this case cancels the last dead key, so if you press
4981 \begin_layout Subsection
4985 \begin_layout Standard
4992 mapping is performed, a
4999 file maps the strings that the symbols generate to characters in the current
5001 The LyX distribution currently includes at least the
5016 \begin_layout Standard
5023 file is a sequence of declarations of the form
5026 \begin_layout LyX-Code
5039 \begin_layout Standard
5040 For example, in order to map
5048 to the corresponding character in the iso-8859-1 set (233), the following
5052 \begin_layout LyX-Code
5060 \begin_layout Standard
5083 the same character can apply to more than one string.
5094 \begin_layout LyX-Code
5120 \begin_layout Standard
5121 If LyX cannot find a mapping for the string produced by the keystroke or
5122 a deadkey sequence, it will check if it looks like an accented char and
5123 try to draw an accent over the character on screen.
5126 \begin_layout Subsection
5130 \begin_layout Standard
5131 There is a second way to add support for international characters through
5132 so-called dead-keys.
5133 A dead-key works in combination with a letter to produce an accented character.
5134 Here, we'll explain how to create a really simple dead-key to illustrate
5138 \begin_layout Standard
5139 Suppose you happen to need the circumflex character,
5140 \begin_inset Quotes eld
5144 \begin_inset Quotes erd
5152 -key [a.k.a.\InsetSpace ~
5157 ] to the LyX command
5166 Now, whenever you type the
5170 -key followed by a letter, that letter will have a circumflex accent on
5172 For example, the sequence
5173 \begin_inset Quotes eld
5181 \begin_inset Quotes erd
5184 produces the letter:
5185 \begin_inset Quotes eld
5189 \begin_inset Quotes erd
5193 If you tried to type
5194 \begin_inset Quotes eld
5202 \begin_inset Quotes erd
5205 , however, LyX will complain with a beep, since a
5206 \begin_inset Quotes eld
5214 \begin_inset Quotes erd
5217 never takes a circumflex accent.
5222 after a dead-key produces the bare-accent.
5223 Please note this last point! If you bind a key to a dead-key, you'll need
5224 to rebind the character on that key to yet another key.
5229 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5232 \begin_layout Standard
5233 One common way to bind dead-keys is to use
5245 in combination with an accent, like
5246 \begin_inset Quotes eld
5254 \begin_inset Quotes erd
5258 \begin_inset Quotes eld
5266 \begin_inset Quotes erd
5270 \begin_inset Quotes eld
5278 \begin_inset Quotes erd
5282 Another way involves using
5290 [remember them from section?] to set up the special
5299 acts in some ways just like
5303 and permits you to bind keys to accented characters.
5304 You can also turn keys into dead-keys by binding them to something like
5309 and then binding this symbolic key to the corresponding LyX command.
5313 \begin_layout Standard
5318 : This is exactly what I do in my
5336 and a bunch of these
5337 \begin_inset Quotes eld
5345 \begin_inset Quotes erd
5348 symbolic keys bound such things as
5359 This is how I produce my accented characters.
5364 You can make just about anything into the
5372 keys, a spare function key, etc.
5373 As for the LyX commands that produce accents, check the entry for
5382 You'll find the complete list there.
5385 \begin_layout Subsection
5386 Saving your Language Configuration
5389 \begin_layout Standard
5390 \begin_inset CommandInset label
5396 You can edit your preferences so that your desired language environment
5397 is automatically configured when LyX starts up, via the
5402 dit\SpecialChar \menuseparator
5412 \begin_layout Chapter
5413 Installing New Document Classes, Layouts, and Templates
5414 \begin_inset CommandInset label
5416 name "chap:textclass"
5424 \begin_layout Standard
5425 Installing New Document Classes
5433 \begin_layout Standard
5434 In this chapter, we describe the procedures for creating and installing
5435 new LyX layout and template files, as well as offer a refresher on correctly
5436 installing new LaTeX document classes.
5437 Some definitions: a document class is a LaTeX file (usually ending in
5445 ) which describes the format of a document such as an article, report, journal
5447 and all the commands needed to realize that format.
5448 A layout file is a LyX file which corresponds to a LaTeX document class
5449 and which tells LyX how to
5450 \begin_inset Quotes eld
5454 \begin_inset Quotes erd
5457 things on the screen to make the display look something like the final
5459 More precisely, a layout file describes a
5460 \begin_inset Quotes eld
5464 \begin_inset Quotes erd
5467 which is the internal construct LyX uses to render the screen display.
5469 \begin_inset Quotes eld
5473 \begin_inset Quotes erd
5477 \begin_inset Quotes eld
5481 \begin_inset Quotes erd
5484 can be used somewhat interchangeably, but it is better to refer to the
5485 file as the layout, and the thing living in LyX's memory as the text class.
5486 A template file is simply a LyX document which contains a set of predefined
5487 entries for a given document class which are generally required for that
5489 Templates are especially useful for things like journal manuscripts which
5490 are to be submitted electronically.
5493 \begin_layout Section
5494 Installing a new LaTeX package
5497 \begin_layout Standard
5498 Some installations may not include a LaTeX package that you would like to
5500 For example, you might need FoilTeX, a common (and very powerful) package
5501 for preparing slides or viewgraphs for overhead projectors.
5502 Here are the formal steps involved in getting the package up and running
5503 if you are using teTeX or some other web2c based distribution.
5507 \begin_layout Enumerate
5508 Get the package from CTAN or wherever.
5512 \begin_layout Standard
5515 Inventory of your LaTeX configuration
5517 manual for details of what CTAN is and where supported document classes
5526 \begin_layout Enumerate
5531 (this usually lives in the directory
5535 , though you can run
5540 It describes how to add a local
5544 directory; follow the instructions.
5545 You need to insert the name of your local
5558 is a logical place to install software that did not come with your distribution
5564 Usually, you will have to modify only two things:
5568 \begin_layout Enumerate
5573 to the directory you chose; e.g.
5578 TEXMFLOCAL = /usr/local/texmf
5581 \begin_layout Enumerate
5595 TEXMF = {$HOMETEXMF,!!$TEXMFLOCAL,!!$TEXMFMAIN}
5599 \begin_layout Enumerate
5610 You must follow the directory structure of your existing
5614 directory (for example, latex packages should go under
5616 /usr/local/texmf/tex/latex/
5621 \begin_layout Enumerate
5622 Install the package.
5623 For example, you would unpack the FoilTeX tarball and create
5625 /usr/local/texmf/tex/latex/foiltex
5632 directory contains various files.
5635 \begin_layout Enumerate
5643 /usr/local/texmf/ls-R
5648 \begin_layout Enumerate
5649 From within LyX, do:
5654 ools\SpecialChar \menuseparator
5665 \begin_layout Standard
5666 Now you should see your new package---for example
5675 ayout\SpecialChar \menuseparator
5690 Note that there are simpler ways of installing packages: you can add a
5691 link to the new package directory in the system LaTeX directory (
5695 , don't forget to then run
5699 ), or sometimes simply set the
5703 environment variable to include the new package.
5704 However, the formal procedure described in
5708 is guaranteed to work, so you should follow it unless circumstances absolutely
5709 prevent it: such as, when you don't have superuser access.
5712 \begin_layout Section
5713 \begin_inset CommandInset label
5722 \begin_layout Standard
5723 This section describes how to write and install your own LyX layout files
5724 (also known as text classes) and walks through the
5728 text class format as an example.
5733 files describe what paragraph styles are available for a given document
5734 class and how LyX should display them.
5735 We try to provide a thorough description of the process here; however,
5736 there are so many different types of documents supported by LaTeX classes
5737 that we can't hope to cover every different possibility or problem you
5739 (The LyX users' list is frequented by people with lots of experience with
5740 layout design who are willing to share what they've learned.)
5743 \begin_layout Standard
5744 As you prepare to write a new layout, it is extremely helpful to look at
5745 the example layouts distributed with LyX.
5746 If you use a nice LaTeX document class that might be of interest for others,
5747 too, and have a nice corresponding LyX layout, feel free to contribute
5748 the stuff to us, so we may put it into the distribution.
5749 There is also a section on the LyX wiki for this kind of material.
5752 \begin_layout Standard
5753 All the tags described in this chapter are case-insensitive; this means
5766 are really the same command.
5767 The possible values are printed in brackets after the feature's name.
5768 The default value if a feature isn't specified inside a text class-description
5776 If the argument has a datatype like
5777 \begin_inset Quotes eld
5781 \begin_inset Quotes erd
5785 \begin_inset Quotes eld
5789 \begin_inset Quotes erd
5792 , the default is shown like this:
5802 \begin_layout Subsection
5803 \begin_inset CommandInset label
5805 name "sub:Layout-modules"
5812 \begin_layout Standard
5813 Similar to layout files, and new with LyX 1.6, are layout
5818 Modules are to LaTeX packages much as layouts are to LaTeX classes, and
5819 some modules---such as the Endnotes module---provide support for just such
5821 In a sense, layout modules are similar to included files---files like stdsectio
5822 ns.inc---in that modules are not specific to a given document layout but
5823 may be used with many different layouts.
5824 The difference is that using a layout module does not require editing the
5826 Rather, modules are selected in the
5831 ocument\SpecialChar \menuseparator
5841 \begin_layout Standard
5842 Building modules is the easiest way to get started with layout editing,
5843 since it can be as simple as adding a single new paragraph or flex inset.
5844 But modules may, in principle, contain anything a layout file can contain.
5847 \begin_layout Standard
5848 A module must begin with a line like the following:
5851 \begin_layout LyX-Code
5854 DeclareLyXModule[endnotes.sty]{Endnotes}
5857 \begin_layout Standard
5858 The argument in square brackets is optional: It declares any LaTeX packages
5859 on which the module depends.
5860 The mandatory argument, in curly brackets, is the name of the module, as
5863 Document\SpecialChar \menuseparator
5867 LyX uses the name to identify the module, so it should be unique.
5870 \begin_layout Standard
5871 The module declaration should then be followed by lines like the following:
5874 \begin_layout LyX-Code
5878 \begin_layout LyX-Code
5879 #Adds an endnote command, in addition to footnotes.
5883 \begin_layout LyX-Code
5884 #You will need to add
5886 theendnotes in ERT where you
5889 \begin_layout LyX-Code
5890 #want the endnotes to appear.
5894 \begin_layout LyX-Code
5898 \begin_layout LyX-Code
5899 #Requires: somemodule | othermodule
5902 \begin_layout LyX-Code
5903 #Excludes: badmodule
5906 \begin_layout Standard
5907 The description is used in
5909 Document\SpecialChar \menuseparator
5912 to provide the user with information about what the module does.
5913 The Requires is used to identify other modules with which this one must
5914 be used; the Excludes line is used to identify modules with which this
5915 one may not be used.
5916 Both are optional, and, as shown, multiple modules should be separated
5917 with the pipe symbol: |.
5918 Note that the required modules are treated disjunctively:
5922 of the required modules must be used.
5927 excluded module may be used.
5928 Note that modules are identified here by their
5932 without the .module extension.
5934 \begin_inset Flex CharStyle:Code
5937 \begin_layout Standard
5944 \begin_inset Flex CharStyle:Code
5947 \begin_layout Standard
5956 \begin_layout Standard
5957 After creating a new module, you will need to reconfigure and then restart
5958 LyX for it to appear in the menu.
5959 However, changes you make to the module will be seen immediately, if you
5962 Document\SpecialChar \menuseparator
5965 , highlight something, and then hit
5966 \begin_inset Quotes eld
5970 \begin_inset Quotes erd
5976 It is strongly recommended that you save your work before doing so
5979 In fact, it is strongly recommended that you not attempt to edit modules
5980 while simultaneously working on documents.
5981 Though of course the developers strive to keep LyX stable in such situations,
5982 syntax errors and the like in your module file could cause strange behavior.
5985 \begin_layout Subsection
5986 Supporting new document classes
5989 \begin_layout Standard
5990 There are two situations you are likely to encounter when wanting to support
5991 a new LaTeX document class, involving LaTeX2e class (
6000 Supporting a style file is usually fairly easy.
6001 Supporting a new document class is a bit harder.
6004 \begin_layout Subsection
6012 \begin_layout Standard
6013 If your new document class is provided as a style file that is used in conjuncti
6014 on with an existing, supported document class---for the sake of the example,
6015 we'll assume that the style file is called
6019 and it is meant to be used with
6023 , which is a standard class---start by copying the existing class's layout
6024 file into your local directory:
6027 \begin_layout LyX-Code
6028 cp report.layout ~/.lyx/layouts/myclass.layout
6031 \begin_layout Standard
6036 and change the line:
6039 \begin_layout LyX-Code
6042 DeclareLaTeXClass{report}
6045 \begin_layout Standard
6049 \begin_layout LyX-Code
6052 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
6055 \begin_layout Standard
6059 \begin_layout LyX-Code
6069 \begin_layout Standard
6070 near the top of the file.
6073 \begin_layout Standard
6074 Start LyX and select
6079 ools\SpecialChar \menuseparator
6087 Then restart LyX and try creating a new document.
6092 " as a document class option in the
6097 ocument\SpecialChar \menuseparator
6105 It is likely that some of the sectioning commands and such in your new
6106 class will work differently from how they worked in the base class---
6110 in this example---so you can fiddle around with the settings for the different
6111 sections if you wish.
6112 See below for more discussion on this.
6115 \begin_layout Subsection
6123 \begin_layout Standard
6124 There are two possibilities here.
6125 One is that the class file is itself based upon an existing document class.
6126 For example, many thesis classes are based upon
6131 To see whether yours is, look for a line like
6134 \begin_layout LyX-Code
6140 \begin_layout Standard
6142 If so, then you may proceed largely as in the previous section, though
6143 the DeclareLaTeXClass line will be different.
6144 If your new class is thesis, and it is based upon book, then the line should
6148 \begin_layout LyX-Code
6151 DeclareLaTeXClass[myclass, book]{thesis}
6154 \begin_layout Standard
6155 If, on the other hand, the new class is not based upon an existing class,
6156 you will probably have to
6157 \begin_inset Quotes eld
6161 \begin_inset Quotes erd
6165 We strongly suggest copying an existing layout file which uses a similar
6166 LaTeX class and then modifying it, if you can do so.
6167 At least use an existing file as a starting point so you can find out what
6168 items you need to worry about.
6169 Again, the specifics are covered below.
6172 \begin_layout Section
6173 Declaring a new text class
6176 \begin_layout Standard
6177 When it's finally time to get your hands dirty and create or edit your own
6178 layout file, the following sections describe what you're up against.
6179 Our advice is to go slowly, save and test often, listen to soothing music,
6180 and enjoy one or two of your favorite adult beverages; more if you are
6181 getting particularly stuck.
6182 It's really not that hard, except that the multitude of options can become
6183 overwhelming if you try to do to much in one sitting.
6184 Go have another adult beverage, just for good measure.
6187 \begin_layout Standard
6191 \begin_layout Standard
6192 Lines in a layout file which begin with a
6197 There is one exception to this rule: all layouts should begin with lines
6201 \begin_layout LyX-Code
6204 #% Do not delete the line below; configure depends on this
6207 \begin_layout LyX-Code
6212 DeclareLaTeXClass{article}
6215 \begin_layout Standard
6216 The second line is used when you configure LyX.
6217 The layout file is read by the LaTeX script
6221 , in a special mode where
6226 The first line is just a LaTeX comment, and the second one contains the
6227 declaration of the text class.
6228 If these lines appear in a file named
6232 , then they define a text class of name
6236 (the name of the layout file) which uses the LaTeX document class
6240 (the default is to use the same name as the layout).
6242 \begin_inset Quotes eld
6246 \begin_inset Quotes erd
6249 that appears above is used as a description of the text class in the
6254 ocument\SpecialChar \menuseparator
6264 \begin_layout Standard
6265 Let's assume that you wrote your own text class that uses the
6269 documentclass, but where you changed the appearance of the section headings.
6270 If you put it in a file
6274 , the header of this file should be:
6277 \begin_layout LyX-Code
6280 #% Do not delete the line below; configure depends on this
6283 \begin_layout LyX-Code
6288 DeclareLaTeXClass[article]{article (with my own headings)}
6291 \begin_layout Standard
6292 This declares a text class
6296 , associated with the LaTeX document class
6301 \begin_inset Quotes eld
6304 article (with my own headings)
6305 \begin_inset Quotes erd
6309 If your text class depends on several packages, you can declare it as:
6312 \begin_layout LyX-Code
6315 #% Do not delete the line below; configure depends on this
6318 \begin_layout LyX-Code
6323 DeclareLaTeXClass[article,foo.sty]{article (with my own headings)}
6326 \begin_layout Standard
6327 This indicates that your text class uses the foo.sty package.
6328 Finally, it is also possible to declare classes for DocBook code.
6329 Typical declarations will look like
6332 \begin_layout LyX-Code
6335 #% Do not delete the line below; configure depends on this
6338 \begin_layout LyX-Code
6343 DeclareDocBookClass[article]{SGML (DocBook article)}
6346 \begin_layout Standard
6347 Note that these declarations can also be given an optional parameter declaring
6348 the name of the document class (but not a list).
6351 \begin_layout Standard
6352 When the text class has been modified to your taste, all you have to do
6353 is to copy it either in
6366 ools\SpecialChar \menuseparator
6374 Exit LyX and restart it; then your new text class should be available along
6378 \begin_layout Standard
6379 In versions of LyX prior to 1.6, you had to restart LyX to see any changes
6380 you made to your layout files.
6381 As a result, editing layout files could be very time consuming.
6382 Beginning with 1.6, however, you can force a reload of the layout currently
6383 in use by using the LyX function
6388 There is no default binding for this function---though, of course, you
6389 can bind it to a key yourself (see section
6390 \begin_inset CommandInset ref
6392 reference "sec:bindings"
6397 You should simply enter this command in the mini-buffer.
6402 : This is very much an `advanced feature'.
6407 recommended that you save your work before using this function.
6412 recommended that you not attempt to edit your layout while simultaneously
6413 working on a document that you care about.
6414 Use a test document.
6415 Syntax errors and the like in your layout file could cause peculiar behavior.
6416 In particular, such errors could cause LyX to regard the current layout
6417 as invalid and to attempt to switch to some other layout.
6418 The LyX team strives to keep LyX stable in such situations, but safe is
6422 \begin_layout Subsection
6426 \begin_layout Standard
6427 The first non-comment line must contain the file format number:
6430 \begin_layout Description
6441 ] This tag was introduced with LyX 1.4.0 (layout files of LyX 1.3.x and earlier
6442 don't have an explicit file format).
6443 The file format that is documented here is
6450 \begin_layout Subsection
6451 General text class parameters
6454 \begin_layout Standard
6455 These are the general parameters which describe the form of the entire document:
6458 \begin_layout Standard
6462 \begin_layout Standard
6474 \begin_layout Description
6488 ] Whether the class-default should have one or two columns.
6489 Can be changed in the
6494 ocument\SpecialChar \menuseparator
6502 This setting (same goes for
6506 , too) is important: if your text class has two columns by default but you
6507 forget to set it correctly, the
6515 be output when you select
6524 ocument\SpecialChar \menuseparator
6532 \begin_layout Description
6546 ] Whether the class-default should be printing on one or both sides of the
6548 Can be changed in the
6553 ocument\SpecialChar \menuseparator
6563 \begin_layout Description
6577 ] The class default pagestyle.
6578 Can be changed in the
6583 ocument\SpecialChar \menuseparator
6593 \begin_layout Description
6597 ClassOptions\SpecialChar \ldots{}
6601 This section describes various global options supported by the document
6603 See Section\InsetSpace ~
6605 \begin_inset CommandInset ref
6607 reference "sec:classoptions"
6614 \begin_layout Description
6632 ] Whether the class already provides the feature
6637 A feature is in general the name of a package (amsmath, makeidx, \SpecialChar \ldots{}
6639 macro (url, boldsymbol,\SpecialChar \ldots{}
6640 ); the complete list of supported features is unfortunat
6644 \begin_layout Description
6655 ] Whether the class requires the feature
6660 A feature is in general the name of a package (amsmath, makeidx, \SpecialChar \ldots{}
6662 macro (url, boldsymbol,\SpecialChar \ldots{}
6664 Multiple features must be separated by commas.
6665 Note that you can only request supported features; unfortunately, the complete
6666 list of supported features is not documented (however,
6671 elp\SpecialChar \menuseparator
6678 gives an overview of the supported packages).
6681 \begin_layout Description
6688 This is used to describe the default font of the document.
6689 See Section\InsetSpace ~
6691 \begin_inset CommandInset ref
6693 reference "sec:fonts"
6700 \begin_layout Description
6711 ] This is the style that will be assigned to new paragraphs, usually
6716 This will default to the first defined style if not given, but you are
6717 highly encouraged to use this directive.
6720 \begin_layout Description
6737 ] Indicates what kind of markup is used to define the title of a document.
6742 means that the macro with name
6746 will be inserted after the last layout which has
6747 \begin_inset Quotes eld
6755 \begin_inset Quotes erd
6763 corresponds to the case where the block of paragraphs which have
6764 \begin_inset Quotes eld
6772 \begin_inset Quotes erd
6775 should be enclosed into the
6784 \begin_layout Description
6795 ] The name of the command/environment mentionned above.
6798 \begin_layout Description
6802 Preamble\SpecialChar \ldots{}
6806 A set of macro definitions that will be output at the beginning of the
6808 Use this for global definitions.
6811 \begin_layout Description
6818 As its name implies, this command allows you to include another layout
6819 definition file within yours to avoid duplicating commands.
6820 Common examples are the standard layout files, for example,
6824 , which contains most of the basic layouts.
6827 \begin_layout Description
6831 Style\SpecialChar \ldots{}
6835 This sequence defines a new style.
6836 If the style already exists, it will redefine some of its parameters instead.
6837 See Section\InsetSpace ~
6839 \begin_inset CommandInset ref
6841 reference "sec:style"
6848 \begin_layout Description
6855 This command deletes an existing style.
6856 This is particularly useful when you want to suppress a style that has
6857 be defined in an input file.
6860 \begin_layout Description
6864 Float\SpecialChar \ldots{}
6868 This sequence defines a new float.
6869 See Section\InsetSpace ~
6871 \begin_inset CommandInset ref
6873 reference "sec:floats"
6880 \begin_layout Description
6887 This command deletes an existing float.
6888 This is particularly useful when you want to suppress a float that has
6889 be defined in an input file.
6892 \begin_layout Description
6896 InsetLayout\SpecialChar \ldots{}
6900 This section (re-)defines the layout of an inset.
6901 It can be applied to an existing inset of to a new, user-defined inset,
6902 e.g., a new character style.
6903 See Section\InsetSpace ~
6905 \begin_inset CommandInset ref
6907 reference "sec:charstyle"
6914 \begin_layout Description
6918 Counter\SpecialChar \ldots{}
6922 This sequence defines a new counter.
6923 See Section\InsetSpace ~
6925 \begin_inset CommandInset ref
6927 reference "sec:counter"
6934 \begin_layout Standard
6938 \begin_layout Standard
6950 \begin_layout Subsection
6958 \begin_layout Standard
6959 \begin_inset CommandInset label
6961 name "sec:classoptions"
6969 section can contain the following entries:
6972 \begin_layout Description
6983 ] The list of available font sizes for the document's main font, separated
6985 \begin_inset Quotes eld
6993 \begin_inset Quotes erd
6999 \begin_layout Description
7008 string="empty|plain|headings|fancy"
7010 ] The list of available page styles, separated by
7011 \begin_inset Quotes eld
7019 \begin_inset Quotes erd
7025 \begin_layout Description
7036 ] Some document class options, separated by a comma, that will be added
7037 to the optional part of the
7046 \begin_layout Subsection
7047 Specific Paragraph Layouts
7050 \begin_layout Standard
7051 \begin_inset CommandInset label
7057 A paragraph layout description looks like this
7061 \begin_layout Standard
7062 Note that this will either define a new layout or modify an existing one.
7070 \begin_layout LyX-Code
7077 \begin_layout LyX-Code
7081 \begin_layout LyX-Code
7085 \begin_layout Standard
7086 where the following commands are allowed:
7089 \begin_layout Standard
7093 \begin_layout Standard
7105 \begin_layout Description
7116 This is used to copy all the features of an existing layout into the current
7121 \begin_layout Description
7133 , Command, Environment, Item_Environment,
7139 ] How the layout should be translated into LaTeX.
7144 means nothing special.
7157 {\SpecialChar \ldots{}
7172 }\SpecialChar \ldots{}
7196 is generated for each paragraph of this environment.
7209 is passed as an argument to the environment.
7214 can be defined in the
7219 ayout\SpecialChar \menuseparator
7233 is perhaps a bit misleading, since these rules apply to SGML classes, too.
7234 Visit the SGML class files for specific examples.
7237 \begin_layout Description
7248 If 1, marks the layout as being part of a title block (see also the
7259 \begin_layout Description
7266 The name of the corresponding LaTeX stuff.
7267 Either the environment or command name.
7270 \begin_layout Description
7277 The optional parameter for the corresponding
7284 This parameter cannot be changed from within LyX.
7287 \begin_layout Description
7298 ] The number of optional arguments that can be used with this layout.
7299 This is useful for things like section headings, and only makes sense with
7303 \begin_layout Description
7315 , Manual, Dynamic, First_Dynamic, Right_Address_Box
7319 The kind of margin that the layout has on the left side.
7324 just means a fixed margin.
7329 means that the left margin depends on the string entered in the
7334 dit\SpecialChar \menuseparator
7339 aragraph\InsetSpace ~
7343 This is used to typeset nice lists without tabulators.
7348 means that the margin depends on the size of the label.
7349 This is used for automatic enumerated headlines.
7350 It is obvious that the headline
7351 \begin_inset Quotes eld
7354 5.4.3.2.1 Very long headline
7355 \begin_inset Quotes erd
7358 must have a wider left margin (as wide as
7359 \begin_inset Quotes eld
7363 \begin_inset Quotes erd
7366 plus the space) than
7367 \begin_inset Quotes eld
7370 3.2 Very long headline
7371 \begin_inset Quotes erd
7374 , even if other word processors are not able to do this.
7379 is similar, but only the very first row of the paragraph is dynamic, while
7380 the others are static; this is used, for example, for descriptions.
7385 means the margin is chosen in a way that the longest row of this paragraph
7386 fits to the right margin.
7387 This is used to typeset an address on the right edge of the page.
7390 \begin_layout Description
7407 ] Whether the following Paragraph is allowed to indent its very first row.
7412 means that it is not allowed to do so,
7416 means it could do so if it wants to.
7419 \begin_layout Description
7430 ] The indent of the very first line of a paragraph.
7431 The argument is passed as a string.
7436 means that the paragraph is indented with the width of
7445 You can get a negative width by prefixing the string with
7450 This way was chosen so that the look is the same with each used screen
7456 will be fixed for a certain layout.
7457 The exception is Standard layout, since the indentation of a Standard layout
7458 paragraph can be prohibited with
7463 Also, Standard layout paragraphs inside environments use the
7467 of the environment, not their native one.
7468 For example, Standard paragraphs inside an enumeration are not indented.
7471 \begin_layout Description
7482 ] LyX allows to choose either
7483 \begin_inset Quotes eld
7487 \begin_inset Quotes erd
7491 \begin_inset Quotes eld
7495 \begin_inset Quotes erd
7498 to typeset a document.
7500 \begin_inset Quotes eld
7504 \begin_inset Quotes erd
7507 is chosen, this value is completely ignored.
7509 \begin_inset Quotes eld
7513 \begin_inset Quotes erd
7516 is chosen, the parindent of a LaTeXtype
7517 \begin_inset Quotes eld
7521 \begin_inset Quotes erd
7524 layout is ignored and all paragraphs are additionally separated by this
7526 The vertical space is calculated with
7528 value*DefaultHeight()
7534 is the height of a row with the normal font.
7535 This way, the look stays the same with different screen fonts.
7538 \begin_layout Description
7549 ] The vertical space with which the very first of a chain of paragraphs
7550 with this layout is separated from the previous paragraph.
7551 If the previous paragraph has another layout, the separations are not simply
7552 added, but the maximum is taken.
7555 \begin_layout Description
7570 for the very last paragraph.
7573 \begin_layout Description
7584 ] The vertical space between two paragraphs of this layout.
7587 \begin_layout Description
7598 ] This is an extra space between the paragraphs of an environment layout.
7599 If you put other layouts into an environment, each is separated with the
7605 But the whole items of the environment are additionally separated with
7614 \begin_layout Description
7625 ] If you put layouts into environments, the leftmargins are not simply added,
7626 but added with a factor
7627 \begin_inset Formula $\frac{4}{depth+4}$
7631 Note that this parameter is also used when the border is defined as
7640 Then it is added to the manual or dynamic border.
7641 This string has the same meaning as for
7648 \begin_layout Description
7666 \begin_layout Description
7678 , Manual, Static, Top_Environment,
7680 Centered_Top_Environment, Sensitive,
7689 means the label is the very first word (up to the first real blank).
7694 means it is defined in the layout (see
7705 Centered_Top_Environment
7707 are special cases of
7712 The label will be printed above the paragraph, but only at the top of an
7713 environment or the top of a chain of paragraphs with this layout.
7714 Usage is for example the
7723 This is also the case for
7727 labels with latex type
7731 , in order to make layouts for theorems work correctly.
7736 is a special case for the caption-labels
7737 \begin_inset Quotes eld
7741 \begin_inset Quotes erd
7745 \begin_inset Quotes eld
7749 \begin_inset Quotes erd
7757 means the (hardcoded) label string depends on the kind of float.
7762 label type defines automatically numbered labels.
7765 \begin_layout Description
7778 The name of the counter for automatic numbering (see Section\InsetSpace ~
7780 \begin_inset CommandInset ref
7782 reference "sec:counter"
7787 This must be given if
7800 \begin_layout Description
7811 ] The horizontal space between the label and the text body.
7812 Only used for labels that are not above the text body.
7815 \begin_layout Description
7822 [float=0] The vertical space between the label and the text body.
7823 Only used for labels that are above the text body (
7829 Centered_Top_Environment
7834 \begin_layout Description
7845 ] The string used for a label with a
7854 this string is also used as a suggestion for the
7858 that can be set in the
7863 dit\SpecialChar \menuseparator
7868 aragraph\InsetSpace ~
7878 is set, this string can be contain the special formatting commands described
7879 in Section\InsetSpace ~
7881 \begin_inset CommandInset ref
7883 reference "sec:counter"
7888 For the sake of backwards compatibility, the string
7896 will be replaced by the expanded
7907 This feature is now obsolete and should be replaced by the mechanisms of
7908 Section\InsetSpace ~
7910 \begin_inset CommandInset ref
7912 reference "sec:counter"
7919 \begin_layout Description
7930 ] This is used inside the appendix instead of
7951 \begin_layout Description
7958 The level of the style in the table of contents.
7959 This is used for automatic numbering of section headings.
7962 \begin_layout Description
7974 , Box, Filled_Box, Static
7976 ] The type of label that stands at the end of the paragraph (or sequence
7999 \begin_inset Quotes eld
8003 \begin_inset Quotes erd
8015 ) is a white (resp.\InsetSpace ~
8016 black) square suitable for end of proof markers,
8020 is an explicit text string.
8023 \begin_layout Description
8034 ] The string used for a label with a
8046 \begin_layout Description
8058 , left, right, center
8060 ] Paragraph alignment.
8063 \begin_layout Description
8075 , left, right, center
8082 Some LaTeX styles prohibit certain alignments, since those wouldn't make
8084 For example a right-aligned or centered enumeration isn't possible.
8087 \begin_layout Description
8101 ] With this parameter the
8106 \begin_inset Quotes eld
8109 Vertical space above
8110 \begin_inset Quotes erd
8118 dit\SpecialChar \menuseparator
8123 aragraph\InsetSpace ~
8126 dialog can be set when initializing a paragraph with this layout
8130 \begin_layout Standard
8133 Note from Jean-Marc:
8135 I'm not sure that this setting has much use, and it should probably be
8136 removed in later versions.
8145 \begin_layout Description
8166 \begin_layout Description
8180 ] Whether fragile commands in this layout should be
8189 \begin_layout Description
8206 ] Whether newlines are translated into LaTeX newlines (
8215 The translation can be switched off to allow more comfortable LaTeX editing
8219 \begin_layout Description
8233 ] Whether the contents of this paragraph should be output in raw form, meaning
8234 without special translations that LaTeX would require.
8235 This somehow replaces the older
8242 \begin_layout Description
8256 ] Usually LyX doesn't allow you to insert more than one space between words,
8257 since a space is considered as the separation between two words, not a
8258 character or symbol of its own.
8259 This is a very fine thing but sometimes annoying, for example when typing
8260 program code or plain LaTeX code.
8266 Note that LyX will create protected blanks for the additional blanks when
8267 in another mode than LaTeX-mode.
8270 \begin_layout Description
8284 ] Usually LyX does not allow you to leave a paragraph empty, since it would
8285 lead to empty LaTeX output.
8286 There are some cases where this could be desirable however: in a letter
8287 template, the required fields can be provided as empty fields, so that
8288 people do not forget them; in some special classes, a layout can be used
8289 as some kind of break, which does not contain actual text.
8292 \begin_layout Description
8304 , onehalf, double, other
8310 ] This defines what the default spacing should be in the layout.
8323 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
8324 If you specify the argument
8328 , then you should also provide a numerical argument which will be the actual
8330 Note that, contrary to other parameters,
8334 implies the generation of specific LaTeX code, using the package
8341 \begin_layout Description
8348 The font used for both the text body
8353 See section\InsetSpace ~
8355 \begin_inset CommandInset ref
8357 reference "sec:fonts"
8362 Note that defining this font automatically defines the
8369 \begin_layout Description
8376 The font used for the text body .
8377 See section\InsetSpace ~
8379 \begin_inset CommandInset ref
8381 reference "sec:fonts"
8388 \begin_layout Description
8395 The font used for the label.
8396 See section\InsetSpace ~
8398 \begin_inset CommandInset ref
8400 reference "sec:fonts"
8407 \begin_layout Description
8411 Preamble\SpecialChar \ldots{}
8415 A set of macro definitions that will be output at the beginning of the
8416 LaTeX files when the layout is used.
8417 Use this to define the macros needed by this particular layout.
8420 \begin_layout Description
8431 ] Whether the layout requires the feature
8436 A feature is in general the name of a package (amsmath, makeidx, \SpecialChar \ldots{}
8438 macro (url, boldsymbol,\SpecialChar \ldots{}
8440 Multiple features must be separated by commas.
8441 Note that you can only request supported features; unfortunately, the complete
8442 list of supported features is not documented (however,
8447 elp\SpecialChar \menuseparator
8454 gives an overview of the supported packages).
8457 \begin_layout Description
8464 the name of a style which preamble should be output
8468 the one mentionned above.
8469 This allows to ensure some ordering of the preamble snippets when macros
8470 definitions depend on one another
8474 \begin_layout Standard
8475 Note that, besides that functionality, there is no way to ensure any ordering
8477 The ordering that you see in a given version of LyX may change without
8478 warning in later versions.
8486 \begin_layout Standard
8490 \begin_layout Standard
8502 \begin_layout Subsection
8506 \begin_layout Standard
8507 \begin_inset CommandInset label
8513 Since version 1.3.0 of LyX, it is necessary to define the floats (
8521 , \SpecialChar \ldots{}
8522 ) in the text class itself.
8523 If you are looking here to learn how to upgrade an existing text class,
8524 it will probably turn out that all you have to do is to add
8527 \begin_layout LyX-Code
8531 \begin_layout Standard
8532 at a reasonable location of the text class.
8536 \begin_layout Standard
8537 Don't forget to also have a look at counters in next section.
8542 If you want to implement a text class that proposes some other float types
8543 (like the AGU class bundled with LyX), the information below will hopefully
8547 \begin_layout Description
8559 \begin_inset Quotes erd
8563 \begin_inset Quotes erd
8567 \begin_inset Quotes eld
8571 \begin_inset Quotes erd
8574 of the new class of floats, like program or algorithm.
8575 After the appropriate
8596 \begin_layout Description
8608 \begin_inset Quotes erd
8612 \begin_inset Quotes erd
8615 ] The string that will be used in the menus and also for the caption.
8618 \begin_layout Description
8639 if the float is already defined by the documentclass.
8644 , the float will be defined using the LaTeX package
8651 \begin_layout Description
8663 \begin_inset Quotes erd
8667 \begin_inset Quotes erd
8670 ] This (optional) argument determines whether floats of this class will
8671 be numbered within some sectional unit of the document.
8672 For example, if within is equal to
8676 , the floats will be numbered within chapters.
8680 \begin_layout Description
8692 \begin_inset Quotes erd
8696 \begin_inset Quotes erd
8699 ] The style used when defining the float using
8708 \begin_layout Description
8720 \begin_inset Quotes erd
8724 \begin_inset Quotes erd
8727 ] The default placement for the given class of floats.
8728 They are like in standard LaTeX:
8744 for top, bottom, page, and here, respectively.
8748 \begin_layout Standard
8749 Note that the order of these letters in the string is irrelevant, like in
8755 On top of that there is a new type,
8759 , which does not really correspond to a float, since it means: put it
8760 \begin_inset Quotes eld
8764 \begin_inset Quotes erd
8768 Note, however that the
8772 specifier is special and, because of implementation details cannot be used
8773 in non-builtin float types.
8774 If you do not understand what this means, just use
8781 \begin_layout Description
8793 \begin_inset Quotes erd
8797 \begin_inset Quotes erd
8800 ] The file name extension of an auxiliary file for the list of figures (or
8802 LaTeX writes the captions to this file.
8805 \begin_layout Description
8817 \begin_inset Quotes erd
8821 \begin_inset Quotes erd
8824 ] The heading used for the list of floats.
8827 \begin_layout Standard
8828 Note that defining a float with type
8834 automatically defines the corresponding counter with name
8843 \begin_layout Subsection
8844 Inset layouts and Flex insets
8847 \begin_layout Standard
8848 \begin_inset CommandInset label
8850 name "sec:charstyle"
8854 You can define character styles since version 1.4.0 of LyX; since version
8855 1.6.0 these are called Flex insets.
8859 \begin_layout Standard
8860 Furthermore it is possible to define the general layout of many different
8862 Currently layout parameters can be defined for footnotes, marginal notes,
8863 note insets, ERT insets, branch insets, and Flex insets.
8864 The latter are definable from the user GUI and come in three different
8865 kinds: character style (
8873 ), and XML element (
8881 \begin_layout Standard
8886 definition starting line is of the form
8889 \begin_layout LyX-Code
8890 InsetLayout <Type> <Name>
8893 \begin_layout Standard
8897 \begin_layout Standard
8904 Foot, Margin, Note, Flex
8909 \begin_layout Standard
8914 can be empty (for foot- and marginal notes, branches and ERT) or one of
8932 Here, the second part of the name can be chosen freely (for CharStyle,
8933 Custom and Element), or from a predefined list (for Note).
8936 \begin_layout Standard
8941 section can contain the following entries:
8944 \begin_layout Description
8967 (indicating a dummy definition ending definitions of charstyles etc.).
8968 This entry is only meaningful for Flex (user definable) insets, the three
8969 types of which are CharStyle, Custom and Element.
8972 \begin_layout Description
8988 Minimalistic or Conglomerate
8991 , describing the rendering style used for the inset's frame and buttons.
8994 \begin_layout Description
9001 defines what will be displayed on the button or elsewhere as the inset
9003 Some inset types (ERT and Branch) modify this label on the fly.
9006 \begin_layout Description
9013 The font used for both the text body
9018 See section\InsetSpace ~
9020 \begin_inset CommandInset ref
9022 reference "sec:fonts"
9027 Note that defining this font automatically defines the
9034 \begin_layout Description
9041 The font used for the label.
9042 See section\InsetSpace ~
9044 \begin_inset CommandInset ref
9046 reference "sec:fonts"
9051 Note that this definition can never appear before
9055 , lest it be ineffective (see above)
9058 \begin_layout Description
9065 The name of the corresponding LaTeX stuff.
9066 Either the environment or command name.
9069 \begin_layout Description
9076 The optional parameter for the corresponding
9082 stuff, including possible bracket pairs like
9087 This parameter cannot be changed from within LyX.
9090 \begin_layout Description
9097 See section\InsetSpace ~
9099 \begin_inset CommandInset ref
9101 reference "sec:style"
9108 \begin_layout Description
9112 Preamble\SpecialChar \ldots{}
9116 See section\InsetSpace ~
9118 \begin_inset CommandInset ref
9120 reference "sec:style"
9127 \begin_layout Description
9138 ] See section\InsetSpace ~
9140 \begin_inset CommandInset ref
9142 reference "sec:style"
9149 \begin_layout Subsection
9153 \begin_layout Standard
9154 \begin_inset CommandInset label
9160 Since version 1.3.0 of LyX, it is necessary to define the counters (
9168 , \SpecialChar \ldots{}
9169 ) in the text class itself.
9170 If you are looking here to learn how to upgrade an existing text class,
9171 it will probably turn out that all you have to do is to add
9174 \begin_layout LyX-Code
9175 Input stdcounters.inc
9178 \begin_layout Standard
9179 The following parameters can be used:
9182 \begin_layout Description
9194 \begin_inset Quotes erd
9198 \begin_inset Quotes erd
9201 ] The name of the counter.
9204 \begin_layout Description
9216 \begin_inset Quotes erd
9220 \begin_inset Quotes erd
9223 ] If this is set to the name of another counter, the present counter will
9224 be reset everytime the other one is increased.
9236 \begin_layout Description
9240 LabelString [string=""]
9243 when this is defined, this string defines how the counter is displayed.
9244 Setting this value resets
9249 The following special constructs can be used in the string:
9253 \begin_layout Itemize
9260 will be replaced by the expansion of the
9273 If these are empty, a default value is constructed as follows: if the counter
9274 has a master counter
9286 is used; otherwise the string
9295 \begin_layout Itemize
9296 counter values can be expressed using LaTeX-like macros
9320 \begin_layout Description
9331 to arabic numerals, like 1, 2, 3\SpecialChar \ldots{}
9336 \begin_layout Standard
9346 Actually, the situation is a bit more complicated than that: any
9365 other than those descibed below will produce arabic numerals.
9366 It would not be surprising to see this change in the future.
9374 \begin_layout Description
9381 for lower-case letters: a, b, c, \SpecialChar \ldots{}
9385 \begin_layout Description
9392 for upper-case letters: A, B, C, \SpecialChar \ldots{}
9396 \begin_layout Description
9403 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
9407 \begin_layout Description
9414 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
9418 \begin_layout Description
9425 for hebrew numerals.
9430 \begin_layout Description
9434 LabelStringAppendix [string=""]
9441 , for use in appendix.
9444 \begin_layout Subsection
9448 \begin_layout Standard
9449 \begin_inset CommandInset label
9455 A font description looks like that:
9458 \begin_layout LyX-Code
9468 \begin_layout LyX-Code
9472 \begin_layout LyX-Code
9476 \begin_layout Standard
9477 and the following commands are available:
9480 \begin_layout Description
9497 \begin_layout Description
9514 \begin_layout Description
9526 , Italic, SmallCaps, Slanted
9531 \begin_layout Description
9547 , large, larger, largest, huge, giant
9552 \begin_layout Description
9564 , black, white, red, green, blue, cyan, magenta, yellow
9569 \begin_layout Subsection
9570 Upgrading old layout files
9573 \begin_layout Standard
9574 The file format of layout files changes from time to time, so old layout
9575 files need to be converted.
9576 This process has been automated in LyX 1.4.0: If LyX reads an old format
9577 layout file it will call the conversion tool
9579 $LyXDir/scripts/layout2layout.py
9581 and convert it to a temporary file in current format.
9582 The original file is left untouched, so that you can still use it with
9584 If you want to convert the layout file permanently, just call the converter
9588 \begin_layout LyX-Code
9589 python $LyXDir/scripts/layout2layout.py myclass.layout myclassnew.layout
9592 \begin_layout Standard
9604 \begin_layout Standard
9605 The automatic conversion does only handle syntax changes.
9606 It cannot handle the case where the contents of included files was changed.
9607 For example, layout files based on
9620 If you get error messages about undefined counters, try to convert your
9640 \begin_layout Section
9642 \begin_inset CommandInset label
9644 name "sec:templates"
9651 \begin_layout Standard
9652 Templates are created just like usual documents.
9653 The only difference is that usual documents contain all possible settings,
9654 including the fontscheme and the papersize.
9655 Usually a user doesn't want a template to overwrite his defaults in these
9657 For that reason, the designer of a template should remove the corresponding
9670 from the template LyX file.
9671 This can be done with any simple text-editor, for example
9683 \begin_layout Standard
9684 Put the edited template files you create in
9688 , copy the ones you use from the global template directory in
9692 to the same place, and redefine the template path in the
9697 dit\SpecialChar \menuseparator
9716 \begin_layout Standard
9717 Note that there is a template which has a particular meaning:
9722 This template is loaded everytime you create a new document with
9729 \SpecialChar \menuseparator
9737 in order to provide useful defaults.
9738 To create this template from inside LyX, all you have to do is to open
9739 a document with the correct settings, and use the
9745 e as Document Defaults
9750 \begin_layout Chapter
9751 Including External Material
9754 \begin_layout Section
9758 \begin_layout Standard
9759 \begin_inset Note Note
9762 \begin_layout Standard
9763 This section is completely outdated.
9768 One often requested feature from LyX users is to be able to interface LyX
9769 with Xfig, Dia, or other similar applications that specialize in producing
9770 a certain kind of diagram, figure, schematic or whatever material might
9771 be relevant to include in your document.
9772 Previously, it was only possible to include boring, static, fixed images
9773 in LyX documents with the graphics feature, but there are several limitations
9774 attached to this approach:
9777 \begin_layout Itemize
9778 If you want to change the figure, you have to invoke an external program
9782 \begin_layout Itemize
9783 LyX does not notice that the referenced files change, so the on-screen display
9784 can fast become obsolete, and this is aggravated by the lack of a means
9785 of updating the display
9788 \begin_layout Itemize
9789 The graphics stuff does not provide any mechanisms for coping with different
9790 exported formats such as DocBook, HTML or plain text
9793 \begin_layout Standard
9794 The external material facility attempts to solve all of these problems
9798 \begin_layout Standard
9799 Even if the graphics facility can't solve all problems, it is still valuable
9800 because it does provide in-line preview of the graphics, and supports advanced
9801 geometric transformations with a comfortable user interface.
9807 It does this by offering a general method to interface LyX to external
9809 Instead of introducing a long list of different constructs tailored for
9810 each specific application, we chose to sacrifice the in-line displaying
9811 of the included material in order to provide a general construct to cover
9812 a wide range of applications.
9813 The result is the external material construct.
9814 External material presents itself in the document simply as a button, but
9815 don't let this fool you.
9816 When you click on it, a dialog will appear that allows you to chose exactly
9817 what material to include, and in the following sections you will learn
9818 that this is indeed a powerful mechanism that can solve all of the above
9822 \begin_layout Section
9826 \begin_layout Standard
9827 The external material feature is based on the concept of a
9832 A template is a specification of how LyX should interface with a certain
9834 As bundled, LyX comes with predefined templates for Xfig figures, Dia diagrams,
9835 various raster format images, gnuplot, and more.
9836 You can check the actual list by using the menu
9838 Insert\SpecialChar \menuseparator
9839 File\SpecialChar \menuseparator
9848 Furthermore, it is possible to roll your own template to support a specific
9850 Later we'll describe in more detail what is involved, and hopefully you
9851 will submit all the templates you create so we can include them in a later
9855 \begin_layout Standard
9856 Another basic idea of the external material feature is to distinguish between
9857 the original file that serves as a base for final material and the produced
9858 file that is included in your exported or printed document.
9859 For example, consider the case of a figure produced with
9864 The Xfig application itself works on an original file with the
9869 Within XFig, you create and change your figure, and when you are done,
9875 When you want to include the figure in your document, you invoke
9879 in order to create a PostScript file that can readily be included in your
9885 file is the original file, and the PostScript file is the produced file.
9888 \begin_layout Standard
9889 This distinction is important in order to allow updating of the material
9890 while you are in the process of writing the document.
9891 Furthermore, it provides us with the flexibility that is needed to support
9892 multiple export formats.
9893 For instance, in the case of a plain text file, it is not exactly an award-winn
9894 ing idea to include the figure as raw PostScript.
9895 Instead, you'd either prefer to just include a reference to the figure,
9896 or try to invoke some graphics to Ascii converter to make the final result
9897 look similar to the real graphics.
9898 The external material management allows you to do this, because it is parameter
9899 ized on the different export formats that LyX supports.
9902 \begin_layout Standard
9903 Besides supporting the production of different products according to the
9904 exported format, it supports tight integration with editing and viewing
9906 In the case of an XFig figure, you are able to invoke
9910 on the original file with a single click from within the external material
9911 dialog in LyX, and also preview the produced PostScript file with
9916 No more fiddling around with the command line and/or file browsers to locate
9917 and manipulate the original or produced files.
9918 In this way, you are finally able to take full advantage of the many different
9919 applications that are relevant to use when you write your documents, and
9920 ultimately be more productive.
9923 \begin_layout Section
9924 External material dialog
9927 \begin_layout Standard
9932 dialog is described in the
9941 \begin_layout Section
9945 \begin_layout Standard
9946 In this section, we should include some examples of use of the external
9948 Those examples could include:
9951 \begin_layout Itemize
9952 External raster images
9955 \begin_layout Itemize
9956 External XFig figures
9959 \begin_layout Itemize
9963 \begin_layout Itemize
9967 \begin_layout Itemize
9968 The use of makefiles
9971 \begin_layout Itemize
9972 Recursive external LyX templates
9975 \begin_layout Section
9976 The external template configuration file
9979 \begin_layout Standard
9980 It is relatively easy to add custom external template definitions to LyX.
9981 However, be aware this doing this in an careless manner most probably
9985 introduce an easily exploitable security hole.
9986 So before you do this, please read the discussion about security which
9990 \begin_layout Standard
9991 Having said that, we encourage you to submit any interesting templates that
9996 \begin_layout Standard
9997 The external templates are defined in the
9999 lib/external_templates
10002 You can place your own version in
10004 .lyx/external_templates
10009 \begin_layout Standard
10010 A typical template looks like this:
10013 \begin_layout LyX-Code
10017 \begin_layout LyX-Code
10018 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
10021 \begin_layout LyX-Code
10025 \begin_layout LyX-Code
10029 \begin_layout LyX-Code
10033 \begin_layout LyX-Code
10037 \begin_layout LyX-Code
10041 \begin_layout LyX-Code
10042 AutomaticProduction true
10045 \begin_layout LyX-Code
10049 \begin_layout LyX-Code
10053 \begin_layout LyX-Code
10057 \begin_layout LyX-Code
10058 TransformCommand Rotate RotationLatexCommand
10061 \begin_layout LyX-Code
10062 TransformCommand Resize ResizeLatexCommand
10065 \begin_layout LyX-Code
10066 Product "$$RotateFront$$ResizeFront
10069 \begin_layout LyX-Code
10074 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
10077 \begin_layout LyX-Code
10078 $$ResizeBack$$RotateBack"
10081 \begin_layout LyX-Code
10085 \begin_layout LyX-Code
10086 UpdateResult "$$AbsPath$$Basename.pstex_t"
10089 \begin_layout LyX-Code
10090 Requirement "graphicx"
10093 \begin_layout LyX-Code
10094 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
10097 \begin_layout LyX-Code
10098 ReferencedFile latex "$$AbsPath$$Basename.eps"
10101 \begin_layout LyX-Code
10102 ReferencedFile dvi "$$AbsPath$$Basename.eps"
10105 \begin_layout LyX-Code
10109 \begin_layout LyX-Code
10113 \begin_layout LyX-Code
10114 TransformCommand Rotate RotationLatexCommand
10117 \begin_layout LyX-Code
10118 TransformCommand Resize ResizeLatexCommand
10121 \begin_layout LyX-Code
10122 Product "$$RotateFront$$ResizeFront
10125 \begin_layout LyX-Code
10130 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
10133 \begin_layout LyX-Code
10134 $$ResizeBack$$RotateBack"
10137 \begin_layout LyX-Code
10138 UpdateFormat pdftex
10141 \begin_layout LyX-Code
10142 UpdateResult "$$AbsPath$$Basename.pdftex_t"
10145 \begin_layout LyX-Code
10146 Requirement "graphicx"
10149 \begin_layout LyX-Code
10150 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
10153 \begin_layout LyX-Code
10154 ReferencedFile latex "$$AbsPath$$Basename.pdf"
10157 \begin_layout LyX-Code
10161 \begin_layout LyX-Code
10165 \begin_layout LyX-Code
10166 Product "$$Contents(
10168 "$$AbsPath$$Basename.asc
10173 \begin_layout LyX-Code
10174 UpdateFormat asciixfig
10177 \begin_layout LyX-Code
10178 UpdateResult "$$AbsPath$$Basename.asc"
10181 \begin_layout LyX-Code
10185 \begin_layout LyX-Code
10189 \begin_layout LyX-Code
10190 Product "<graphic fileref=
10192 "$$AbsOrRelPathMaster$$Basename.eps
10197 \begin_layout LyX-Code
10201 \begin_layout LyX-Code
10205 \begin_layout LyX-Code
10206 UpdateResult "$$AbsPath$$Basename.eps"
10209 \begin_layout LyX-Code
10210 ReferencedFile docbook "$$AbsPath$$Basename.eps"
10213 \begin_layout LyX-Code
10214 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
10217 \begin_layout LyX-Code
10221 \begin_layout LyX-Code
10222 Product "[XFig: $$FName]"
10225 \begin_layout LyX-Code
10229 \begin_layout LyX-Code
10233 \begin_layout Standard
10234 As you can see, the template is enclosed in
10238 \SpecialChar \ldots{}
10244 It contains a header specifying some general settings, and for each supported
10245 primary document file format a section
10249 \SpecialChar \ldots{}
10257 \begin_layout Subsection
10258 The template header
10261 \begin_layout Description
10265 Template\InsetSpace ~
10269 A unique name for the template.
10270 It must not contain substitution macros (see below).
10273 \begin_layout Description
10277 GuiName\InsetSpace ~
10281 The text that is displayed on the button.
10282 This command must occur exactly once.
10285 \begin_layout Description
10289 HelpText\InsetSpace ~
10290 <text>\InsetSpace ~
10294 The help text that is used in the External dialog.
10295 Provide enough information to explain to the user just what the template
10296 can provide him with.
10297 This command must occur exactly once.
10300 \begin_layout Description
10304 InputFormat\InsetSpace ~
10308 The file format of the original file.
10309 This must be the name of a format that is known to LyX (see the
10314 ools\SpecialChar \menuseparator
10319 references:Conversion
10326 if the template can handle original files of more than one format.
10327 LyX will attempt to interrogate the file itself in order to deduce its
10328 format in this case.
10329 This command must occur exactly once.
10332 \begin_layout Description
10336 FileFilter\InsetSpace ~
10340 A glob pattern that is used in the file dialog to filter out the desired
10342 If there is more than one possible file extension (e.g.\InsetSpace ~
10351 ), use something like
10356 This command must occur exactly once.
10359 \begin_layout Description
10363 AutomaticProduction\InsetSpace ~
10367 Wether the file represented by the template must be generated by LyX.
10368 This command must occur exactly once.
10371 \begin_layout Description
10375 Transform\InsetSpace ~
10376 Rotate|Resize|Clip|Extra
10379 This command specifies which transformations are supported by this template.
10380 It may occur zero or more times.
10381 This command enables the corresponding tabs in the external dialog.
10386 command must have either a corresponding
10399 Otherwise the transformation will not be supported by that format.
10402 \begin_layout Subsection
10406 \begin_layout Description
10410 Format\InsetSpace ~
10411 LaTeX|PDFLaTeX|PlainText|DocBook
10414 The primary document file format that this format definition is for.
10415 Not every template has a sensible representation in all document file formats.
10416 Please define nevertheless a
10420 section for all formats.
10421 Use a dummy text when no representation is available.
10422 Then you can at least see a reference to the external material in the exported
10426 \begin_layout Description
10430 TransformCommand\InsetSpace ~
10431 Rotate\InsetSpace ~
10432 RotationLatexCommand
10435 This command specifies that the built in LaTeX command should be used for
10437 This command may occur once or not at all.
10440 \begin_layout Description
10444 TransformCommand\InsetSpace ~
10445 Resize\InsetSpace ~
10449 This command specifies that the built in LaTeX command should be used for
10451 This command may occur once or not at all.
10454 \begin_layout Description
10458 TransformOption\InsetSpace ~
10459 Rotate\InsetSpace ~
10460 RotationLatexOption
10463 This command specifies that rotation is done via an optional argument.
10464 This command may occur once or not at all.
10467 \begin_layout Description
10471 TransformOption\InsetSpace ~
10472 Resize\InsetSpace ~
10476 This command specifies that resizing is done via an optional argument.
10477 This command may occur once or not at all.
10480 \begin_layout Description
10484 TransformOption\InsetSpace ~
10489 This command specifies that clipping is done via an optional argument.
10490 This command may occur once or not at all.
10493 \begin_layout Description
10497 TransformOption\InsetSpace ~
10502 This command specifies that an extra optional argument is used.
10503 This command may occur once or not at all.
10506 \begin_layout Description
10510 Product\InsetSpace ~
10514 The text that is inserted in the exported document.
10515 This is actually the most important command and can be quite complex.
10516 This command must occur exactly once.
10519 \begin_layout Description
10523 UpdateFormat\InsetSpace ~
10527 The file format of the converted file.
10528 This must be the name of a format that is known to LyX (see the
10533 ools\SpecialChar \menuseparator
10538 references:Conversion
10541 This command must occur exactly once.
10544 \begin_layout Description
10548 UpdateResult\InsetSpace ~
10552 The file name of the converted file.
10553 The file name must be absolute.
10554 This command must occur exactly once.
10557 \begin_layout Description
10561 ReferencedFile\InsetSpace ~
10562 <format>\InsetSpace ~
10566 This command denotes files that are created by the conversion process and
10567 are needed for a particular export format.
10568 If the filename is relative, it is interpreted relative to the master document.
10569 This command may be given zero or more times.
10572 \begin_layout Description
10576 Requirement\InsetSpace ~
10580 The name of a required LaTeX package.
10581 The package is included via
10587 in the LaTeX preamble.
10588 This command may occur zero or more times.
10591 \begin_layout Description
10595 Preamble\InsetSpace ~
10599 This command specifies a preamble snippet that will be included in the
10601 It has to be defined using
10605 \SpecialChar \ldots{}
10611 This command may occur zero or more times.
10614 \begin_layout Description
10618 Option\InsetSpace ~
10619 <name>\InsetSpace ~
10623 This command defines an additional macro
10627 for substitution in
10636 itself may contain substitution macros.
10637 The advantage over using
10645 is that the substituted value of
10649 is sanitized so that it is a valid optional argument in the document format.
10650 This command may occur zero or more times.
10653 \begin_layout Subsection
10654 Preamble definitions
10657 \begin_layout Standard
10658 The external template configuration file may contain additional preamble
10659 definitions enclosed by
10663 \SpecialChar \ldots{}
10669 They can be used by the templates in the
10676 \begin_layout Section
10677 The substitution mechanism
10680 \begin_layout Standard
10681 When the external material facility invokes an external program, it is done
10682 on the basis of a command defined in the template configuration file.
10683 These commands can contain various macros that are expanded before execution.
10684 Execution always take place in the directory of the containing document.
10687 \begin_layout Standard
10688 Also, whenever external material is to be displayed, the name will be produced
10689 by the substitution mechanism, and most other commands in the template
10690 definition support substitution as well.
10693 \begin_layout Standard
10694 The available macros are the following:
10697 \begin_layout Description
10698 $$FName The filename of the file specified in the external material dialog.
10699 This is either an absolute name, or it is relative to the LyX document.
10702 \begin_layout Description
10703 $$Basename The filename without path and without the extension.
10706 \begin_layout Description
10707 $$Extension The file extension (including the dot).
10710 \begin_layout Description
10711 $$FPath The path part of
10715 (absolute name or relative to the LyX document).
10718 \begin_layout Description
10719 $$AbsPath The absolute file path.
10722 \begin_layout Description
10723 $$RelPathMaster The file path, relative to the master LyX document.
10726 \begin_layout Description
10727 $$RelPathParent The file path, relative to the LyX document.
10730 \begin_layout Description
10731 $$AbsOrRelPathMaster The file path, absolute or relative to the master LyX
10735 \begin_layout Description
10736 $$AbsOrRelPathParent The file path, absolute or relative to the LyX document.
10739 \begin_layout Description
10740 $$Tempname A name and full path to a temporary file which will be automatically
10741 deleted whenever the containing document is closed, or the external material
10745 \begin_layout Description
10747 \begin_inset Quotes eld
10751 \begin_inset Quotes erd
10754 ) This macro will expand to the contents of the file with the name
10761 \begin_layout Description
10762 $$Sysdir This macro will expand to the absolute path of the system directory.
10763 This is typically used to point to the various helper scripts that are
10767 \begin_layout Standard
10768 All path macros contain a trailing directory separator, so you can construct
10770 the absolute filename with
10772 $$AbsPath$$Basename$$Extension
10777 \begin_layout Standard
10778 The macros above are substituted in all commands unless otherwise noted.
10783 supports additionally the following substitutions if they are enabled by
10795 \begin_layout Description
10796 $$ResizeFront The front part of the resize command.
10799 \begin_layout Description
10800 $$ResizeBack The back part of the resize command.
10803 \begin_layout Description
10804 $$RotateFront The front part of the rotation command.
10807 \begin_layout Description
10808 $$RotateBack The back part of the rotation command.
10811 \begin_layout Standard
10812 The value string of the
10816 command supports additionally the following substitutions if they are enabled
10828 \begin_layout Description
10829 $$Clip The clip option.
10832 \begin_layout Description
10833 $$Extra The extra option.
10836 \begin_layout Description
10837 $$Resize The resize option.
10840 \begin_layout Description
10841 $$Rotate The rotation option.
10844 \begin_layout Standard
10845 You may ask why there are so many path macros.
10846 There are mainly two reasons:
10849 \begin_layout Standard
10850 First, relative and absolute file names should remain relative or absolute,
10852 Users may have reasons to prefer either form.
10853 Relative names are useful for portable documents that should work on different
10854 machines, for example.
10855 Absolute names may be required by some programs.
10858 \begin_layout Standard
10859 Second, LaTeX treats relative file names differently than LyX and other
10860 programs in nested included files.
10861 For LyX, a relative file name is always relative to the document that contains
10863 For LaTeX, it is always relative to the master document.
10864 These two definitions are identical if you have only one document, but
10865 differ if you have a master document that includes part documents.
10866 That means that relative filenames must be transformed when presented to
10868 Fortunately LyX does this automatically for you if you choose the right
10872 \begin_layout Standard
10873 So which path macro should be used in new template definitions? The rule
10877 \begin_layout Itemize
10882 if an absolute path is required.
10885 \begin_layout Itemize
10888 $$AbsOrRelPathMaster
10890 if the substituted string is some kind of LaTeX input.
10893 \begin_layout Itemize
10896 $$AbsOrRelPathParent
10898 in order to preserve the user's choice.
10901 \begin_layout Standard
10902 There are special cases where this rule does not work and e.g.\InsetSpace ~
10904 are needed, but normally it will work just fine.
10905 One example for such a case is the command
10907 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
10909 in the XFig template above: We can't use the absolute name because the
10914 files needs the relative name in order to rewrite the file content.
10917 \begin_layout Section
10918 Security discussion
10921 \begin_layout Standard
10922 \begin_inset Note Note
10925 \begin_layout Standard
10926 This section is outdated
10931 The external material feature interfaces with a lot of external programs
10932 and does so automatically, so we have to consider the security implications
10934 In particular, since you have the option of including your own filenames
10935 and/or parameter strings and those are expanded into a command, it seems
10936 that it would be possible to create a malicious document which executes
10937 arbitrary commands when a user views or prints the document.
10938 This is something we definately want to avoid.
10941 \begin_layout Standard
10942 However, since the external program commands are specified in the template
10943 configuration file only, there are no security issues if LyX is properly
10944 configured with safe templates only.
10945 This is so because the external programs are invoked with the
10949 -system call rather than the
10953 system-call, so it's not possible to execute arbitrary commands from the
10954 filename or parameter section via the shell.
10957 \begin_layout Standard
10958 This also implies that you are restricted in what command strings you can
10959 use in the external material templates.
10960 In particular, pipes and redirection are not readily available.
10961 This has to be so if LyX should remain safe.
10962 If you want to use some of the shell features, you should write a safe
10963 script to do this in a controlled manner, and then invoke the script from
10964 the command string.
10969 directory of the LyX installation, you can find a safe wrapper script
10971 general_command_wrapper.py
10973 that supports redirection of input and output.
10974 That can serve as an example for how to write safe template scripts.
10975 For a more advanced example that uses
10979 and friends, take a look at the
10986 \begin_layout Standard
10987 It is possible to design a template that interacts directly with the shell,
10988 but since this would allow a malicious user to execute arbitrary commands
10989 by writing clever filenames and/or parameters, we generally recommend that
10990 you only use safe scripts that work with the
10994 system call in a controlled manner.
10995 Of course, for use in a controlled environment, it can be tempting to just
10996 fall back to use ordinary shell scripts.
10997 If you do so, be aware that you
11001 provide an easily exploitable security hole in your system.
11002 Of course it stands to reason that such unsafe templates will never be
11003 included in the standard LyX distribution, although we do encourage people
11004 to submit new templates in the open source tradition.
11005 But LyX as shipped from the official distribution channels will never have
11009 \begin_layout Standard
11010 Including external material provides a lot of power, and you have to be
11011 careful not to introduce security hazards with this power.
11012 A subtle error in a single line in an innocent looking script can open
11013 the door to huge security problems.
11014 So if you do not fully understand the issues, we recommend that you consult
11015 a knowledgable security professional or the LyX development team if you
11016 have any questions about whether a given template is safe or not.
11017 And do this before you use it in an uncontrolled environment.
11020 \begin_layout Chapter
11024 \begin_layout Section
11028 \begin_layout Standard
11029 The LyX server is a method implemented in LyX that will enable other programs
11030 to talk to LyX, invoke LyX commands, and retrieve information about the
11031 LyX internal state.
11032 This is only intended for advanced users, but they should find it useful.
11035 \begin_layout Section
11036 Starting the LyX Server
11039 \begin_layout Standard
11040 The LyX server works through the use of a pair of named pipes.
11041 These are usually located in your home directory and have the names
11042 \begin_inset Quotes eld
11050 \begin_inset Quotes erd
11054 \begin_inset Quotes eld
11062 \begin_inset Quotes erd
11066 External programs write into
11070 and read back data from
11075 The stem of the pipe names can be defined in the
11080 ools\SpecialChar \menuseparator
11087 dialog, for example
11089 "/home/myhome/.lyxpipe"
11094 \begin_layout Standard
11103 ' to create the pipes.
11104 The above setting also has the effect of activating the LyX server.
11105 If one of the pipes already exists, LyX will assume that another LyX process
11106 is already running and will not start the server.
11107 To have several LyX processes with servers at the same time, you have to
11108 change the configuration between the start of the programs.
11111 \begin_layout Standard
11112 If you are developing a client program, you might find it useful to enable
11113 debugging information from the LyX server.
11114 Do this by starting LyX as
11116 lyx -dbg lyxserver.
11119 \begin_layout Standard
11120 Warning: if LyX crashes, it may not manage to remove the pipes; in this
11121 case you must remove them manually.
11122 If LyX starts and the pipes exist already, it will not start any server.
11125 \begin_layout Standard
11126 Other than this, there are a few points to consider:
11129 \begin_layout Itemize
11130 Both server and clients must run on UNIX or OS/2 machines.
11131 Communications between LyX on UNIX and clients on OS/2 or vice versa is
11132 not possible right now.
11135 \begin_layout Itemize
11136 On OS/2, only one client can connect to LyXServer at a time.
11139 \begin_layout Itemize
11140 On OS/2, clients must open inpipe with
11147 \begin_layout Standard
11148 You can find a complete example client written in C in the source distribution
11151 development/server_monitor.c
11156 \begin_layout Section
11157 Normal communication
11160 \begin_layout Standard
11161 To issue a LyX call, the client writes a line of ASCII text into the input
11163 This line has the following format:
11166 \begin_layout Quote
11180 \begin_layout Standard
11185 is a name that the client can choose arbitrarily.
11186 Its only use is that LyX will echo it if it sends an answer - so a client
11187 can dispatch results from different requesters.
11190 \begin_layout Standard
11195 is the function you want LyX to perform.
11196 It is the same as the commands you'd use in the minibuffer.
11199 \begin_layout Standard
11204 is an optional argument which is meaningful only to some functions (for
11206 \begin_inset Quotes eld
11210 \begin_inset Quotes erd
11213 which will insert the argument as text at the cursor position.)
11216 \begin_layout Standard
11217 The answer from LyX will arrive in the output pipe and be of the form
11220 \begin_layout Quote
11234 \begin_layout Standard
11243 are just echoed from the command request, while
11247 is more or less useful information filled according to how the command
11248 execution worked out.
11249 Some commands will return information about the internal state of LyX,
11251 \begin_inset Quotes eld
11255 \begin_inset Quotes erd
11258 , while other will return an empty data-response.
11259 This means that the command execution went fine.
11262 \begin_layout Standard
11263 In case of errors, the response from LyX will have this form
11266 \begin_layout Quote
11280 \begin_layout Standard
11285 should contain an explanation of why the command failed.
11288 \begin_layout Standard
11292 \begin_layout LyX-Code
11293 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
11296 \begin_layout LyX-Code
11297 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
11299 read a <~/.lyxpipe.out
11304 \begin_layout Section
11308 \begin_layout Standard
11309 LyX can notify clients of events going on asynchronously.
11310 Currently it will only do this if the user binds a key sequence with the
11312 \begin_inset Quotes eld
11316 \begin_inset Quotes erd
11320 The format of the string LyX sends is as follows:
11323 \begin_layout Quote
11332 \begin_layout Standard
11337 is the printed representation of the key sequence that was actually typed
11341 \begin_layout Standard
11342 This mechanism can be used to extend LyX's command set and implement macros:
11343 bind some key sequence to
11344 \begin_inset Quotes eld
11348 \begin_inset Quotes erd
11351 , start a client that listens on the out pipe, dispatches the command according
11352 to the sequence and starts a function that may use LyX calls and LyX requests
11353 to issue a command or a series of commands to LyX.
11356 \begin_layout Section
11357 The simple LyX Server Protocol
11360 \begin_layout Standard
11361 LyX implements a simple protocol that can be used for session management.
11362 All messages are of the form
11365 \begin_layout Quote
11375 \begin_layout Standard
11381 \begin_inset Quotes eld
11385 \begin_inset Quotes erd
11389 \begin_inset Quotes eld
11393 \begin_inset Quotes erd
11398 \begin_inset Quotes eld
11402 \begin_inset Quotes erd
11405 is received from a client, LyX will report back to inform the client that
11406 it's listening to it's messages, while
11407 \begin_inset Quotes eld
11411 \begin_inset Quotes erd
11414 sent from LyX will inform clients that LyX is closing.
11417 \begin_layout Chapter
11422 \begin_layout Standard
11423 This appendix is a huge cross-reference to all the English language keybindings.
11424 Originally, we simply wanted to list all of the key bindings followed by
11425 the function it's bound to.
11426 That way, a user can look up a key to find out what it does.
11427 We then decided, what the hey, why not include the default toolbar and
11428 menu bindings, too.
11429 Please note this section is likely to be very out of date.
11432 \begin_layout Standard
11433 The form is really self-explanatory, but here are a few tips: all entries
11434 are arranged roughly alphabetically for a given modifier (
11443 For the general keyboard layout, simpler prefixes precede the more complex
11453 All entries were gleaned from the default user interface and binding files
11454 located in the directories
11456 \SpecialChar \ldots{}
11461 \SpecialChar \ldots{}
11464 ; they should be treated as the final word on the bindings.
11467 \begin_layout Standard
11468 As a final note, be aware that some window managers (such as FVWM) take
11469 control of some of the function keys or motion keys.
11474 is listed here as generating
11478 , but FVWM grabs it and uses it to change virtual desktops instead.
11479 Very annoying unless you instruct your window manager to stop intercepting
11483 \begin_layout Section
11487 \begin_layout LyX-Code
11491 \begin_layout LyX-Code
11495 \begin_layout LyX-Code
11499 \begin_layout LyX-Code
11500 Icon "buffer-write"
11503 \begin_layout LyX-Code
11504 Icon "buffer-print"
11507 \begin_layout LyX-Code
11511 \begin_layout LyX-Code
11515 \begin_layout LyX-Code
11519 \begin_layout LyX-Code
11523 \begin_layout LyX-Code
11527 \begin_layout LyX-Code
11531 \begin_layout LyX-Code
11535 \begin_layout LyX-Code
11539 \begin_layout LyX-Code
11543 \begin_layout LyX-Code
11547 \begin_layout LyX-Code
11551 \begin_layout LyX-Code
11555 \begin_layout LyX-Code
11556 Icon "footnote-insert"
11559 \begin_layout LyX-Code
11560 Icon "marginpar-insert"
11563 \begin_layout LyX-Code
11567 \begin_layout LyX-Code
11571 \begin_layout LyX-Code
11572 Icon "figure-insert"
11575 \begin_layout LyX-Code
11576 Icon "dialog-tabular-insert"
11579 \begin_layout LyX-Code
11583 \begin_layout Section
11587 \begin_layout Standard
11588 Note that the following bindings are for LyX with English menus.
11589 The second character of the binding depends on the menu language.
11591 \begin_inset Quotes eld
11599 \begin_inset Quotes erd
11602 is with German menus
11603 \begin_inset Quotes eld
11611 \begin_inset Quotes erd
11615 To find out the shortcuts of your language press the Meta (Alt)-key and
11616 press then the keys of the underlined characters of the menu names.
11619 \begin_layout Subsection
11624 \labelwidthstring 00.00.0000
11636 \labelwidthstring 00.00.0000
11648 \labelwidthstring 00.00.0000
11660 \labelwidthstring 00.00.0000
11674 \labelwidthstring 00.00.0000
11686 \labelwidthstring 00.00.0000
11700 \labelwidthstring 00.00.0000
11712 \labelwidthstring 00.00.0000
11724 \labelwidthstring 00.00.0000
11736 \labelwidthstring 00.00.0000
11748 \labelwidthstring 00.00.0000
11756 buffer-new-template
11760 \labelwidthstring 00.00.0000
11775 \labelwidthstring 00.00.0000
11786 \labelwidthstring 00.00.0000
11797 \labelwidthstring 00.00.0000
11808 \labelwidthstring 00.00.0000
11819 \labelwidthstring 00.00.0000
11830 \labelwidthstring 00.00.0000
11842 \labelwidthstring 00.00.0000
11853 \begin_layout Subsection
11858 \labelwidthstring 00.00.0000
11870 \labelwidthstring 00.00.0000
11882 \labelwidthstring 00.00.0000
11894 \labelwidthstring 00.00.0000
11906 \labelwidthstring 00.00.0000
11918 \labelwidthstring 00.00.0000
11930 \labelwidthstring 00.00.0000
11945 \labelwidthstring 00.00.0000
11952 tabular-feature append-row
11956 \labelwidthstring 00.00.0000
11963 tabular-feature toggle-line-bottom
11967 \labelwidthstring 00.00.0000
11974 tabular-feature align-center
11978 \labelwidthstring 00.00.0000
11985 tabular-feature delete-column
11989 \labelwidthstring 00.00.0000
11996 tabular-feature align-left
12000 \labelwidthstring 00.00.0000
12007 tabular-feature align-right
12011 \labelwidthstring 00.00.0000
12018 tabular-feature toggle-line-left
12022 \labelwidthstring 00.00.0000
12029 tabular-feature multicolumn
12033 \labelwidthstring 00.00.0000
12040 tabular-feature valign-center
12044 \labelwidthstring 00.00.0000
12051 tabular-feature valign-top
12055 \labelwidthstring 00.00.0000
12062 tabular-feature toggle-line-right
12066 \labelwidthstring 00.00.0000
12073 tabular-feature toggle-line-top
12077 \labelwidthstring 00.00.0000
12084 tabular-feature append-column
12088 \labelwidthstring 00.00.0000
12095 tabular-feature valign-bottom
12099 \labelwidthstring 00.00.0000
12106 tabular-feature delete-row
12111 \labelwidthstring 00.00.0000
12124 \labelwidthstring 00.00.0000
12131 floats-operate openfoot
12135 \labelwidthstring 00.00.0000
12142 floats-operate closefoot
12146 \labelwidthstring 00.00.0000
12153 floats-operate openfig
12157 \labelwidthstring 00.00.0000
12168 \labelwidthstring 00.00.0000
12179 \labelwidthstring 00.00.0000
12186 floats-operate closefig
12191 \labelwidthstring 00.00.0000
12203 \labelwidthstring 00.00.0000
12217 \labelwidthstring 00.00.0000
12229 \labelwidthstring 00.00.0000
12241 \labelwidthstring 00.00.0000
12255 \labelwidthstring 00.00.0000
12267 \labelwidthstring 00.00.0000
12282 \labelwidthstring 00.00.0000
12289 primary-selection-paste
12293 \labelwidthstring 00.00.0000
12300 primary-selection-paste paragraph
12304 \begin_layout Subsection
12309 \labelwidthstring 00.00.0000
12324 \labelwidthstring 00.00.0000
12331 buffer-float-insert algorithm
12335 \labelwidthstring 00.00.0000
12342 buffer-float-insert wide-tab
12346 \labelwidthstring 00.00.0000
12353 buffer-float-insert figure
12357 \labelwidthstring 00.00.0000
12364 buffer-float-insert table
12368 \labelwidthstring 00.00.0000
12375 buffer-float-insert wide-fig
12380 \labelwidthstring 00.00.0000
12388 dialog-tabular-insert
12392 \labelwidthstring 00.00.0000
12404 \labelwidthstring 00.00.0000
12416 \labelwidthstring 00.00.0000
12424 buffer-child-insert
12428 \labelwidthstring 00.00.0000
12440 \labelwidthstring 00.00.0000
12452 \labelwidthstring 00.00.0000
12464 \labelwidthstring 00.00.0000
12476 \labelwidthstring 00.00.0000
12488 \labelwidthstring 00.00.0000
12500 \labelwidthstring 00.00.0000
12512 \labelwidthstring 00.00.0000
12527 \labelwidthstring 00.00.0000
12538 \labelwidthstring 00.00.0000
12549 \labelwidthstring 00.00.0000
12560 \labelwidthstring 00.00.0000
12571 \labelwidthstring 00.00.0000
12582 \labelwidthstring 00.00.0000
12594 \labelwidthstring 00.00.0000
12606 \labelwidthstring 00.00.0000
12621 \labelwidthstring 00.00.0000
12628 protected-space-insert
12632 \labelwidthstring 00.00.0000
12639 end-of-sentence-period-insert
12643 \labelwidthstring 00.00.0000
12654 \labelwidthstring 00.00.0000
12665 \labelwidthstring 00.00.0000
12676 \labelwidthstring 00.00.0000
12683 menu-separator-insert
12687 \labelwidthstring 00.00.0000
12694 hyphenation-point-insert
12698 \labelwidthstring 00.00.0000
12709 \labelwidthstring 00.00.0000
12716 command-sequence math-insert ^;math-mode;
12720 \labelwidthstring 00.00.0000
12727 command-sequence math-insert _;math-mode;
12732 \labelwidthstring 00.00.0000
12747 \labelwidthstring 00.00.0000
12754 file-insert-plaintext lines
12758 \labelwidthstring 00.00.0000
12765 file-insert-plaintext paragraphs
12769 \labelwidthstring 00.00.0000
12781 \labelwidthstring 00.00.0000
12793 \labelwidthstring 00.00.0000
12805 \labelwidthstring 00.00.0000
12816 \begin_layout Subsection
12821 \labelwidthstring 00.00.0000
12833 \labelwidthstring 00.00.0000
12845 \labelwidthstring 00.00.0000
12857 \labelwidthstring 00.00.0000
12869 \labelwidthstring 00.00.0000
12881 \labelwidthstring 00.00.0000
12893 \labelwidthstring 00.00.0000
12905 \labelwidthstring 00.00.0000
12917 \labelwidthstring 00.00.0000
12925 layout-save-default
12929 \labelwidthstring 00.00.0000
12941 \labelwidthstring 00.00.0000
12953 \labelwidthstring 00.00.0000
12964 \begin_layout Subsubsection
12967 Layout\SpecialChar \menuseparator
12974 \labelwidthstring 00.00.0000
12986 \labelwidthstring 00.00.0000
12998 \labelwidthstring 00.00.0000
13010 \labelwidthstring 00.00.0000
13022 \labelwidthstring 00.00.0000
13034 \labelwidthstring 00.00.0000
13046 \labelwidthstring 00.00.0000
13058 \labelwidthstring 00.00.0000
13070 \labelwidthstring 00.00.0000
13082 \labelwidthstring 00.00.0000
13094 \labelwidthstring 00.00.0000
13106 \labelwidthstring 00.00.0000
13118 \labelwidthstring 00.00.0000
13130 \labelwidthstring 00.00.0000
13142 \labelwidthstring 00.00.0000
13154 \labelwidthstring 00.00.0000
13166 \labelwidthstring 00.00.0000
13178 \labelwidthstring 00.00.0000
13190 \labelwidthstring 00.00.0000
13202 \labelwidthstring 00.00.0000
13214 \labelwidthstring 00.00.0000
13226 \labelwidthstring 00.00.0000
13238 \labelwidthstring 00.00.0000
13250 \labelwidthstring 00.00.0000
13262 \labelwidthstring 00.00.0000
13274 \labelwidthstring 00.00.0000
13286 \labelwidthstring 00.00.0000
13298 \labelwidthstring 00.00.0000
13310 \labelwidthstring 00.00.0000
13322 \labelwidthstring 00.00.0000
13334 \labelwidthstring 00.00.0000
13346 \labelwidthstring 00.00.0000
13357 \begin_layout Subsection
13361 \begin_layout Subsection
13365 \begin_layout Subsection
13369 \begin_layout Subsection
13374 \labelwidthstring 00.00.0000
13386 \labelwidthstring 00.00.0000
13398 \labelwidthstring 00.00.0000
13410 \labelwidthstring 00.00.0000
13422 \labelwidthstring 00.00.0000
13434 \labelwidthstring 00.00.0000
13442 layout ShortFoilhead
13446 \labelwidthstring 00.00.0000
13458 \labelwidthstring 00.00.0000
13470 \labelwidthstring 00.00.0000
13482 \labelwidthstring 00.00.0000
13494 \labelwidthstring 00.00.0000
13502 layout ShortRotatefoilhead
13506 \labelwidthstring 00.00.0000
13518 \labelwidthstring 00.00.0000
13530 \labelwidthstring 00.00.0000
13542 \labelwidthstring 00.00.0000
13550 drop-layouts-choice
13554 \labelwidthstring 00.00.0000
13569 \labelwidthstring 00.00.0000
13584 \labelwidthstring 00.00.0000
13596 \labelwidthstring 00.00.0000
13608 \labelwidthstring 00.00.0000
13616 layout Subsubsection
13620 \labelwidthstring 00.00.0000
13632 \labelwidthstring 00.00.0000
13640 layout Subparagraph
13644 \labelwidthstring 00.00.0000
13648 asterisk\InsetSpace ~
13657 \labelwidthstring 00.00.0000
13661 asterisk\InsetSpace ~
13670 \labelwidthstring 00.00.0000
13674 asterisk\InsetSpace ~
13683 \labelwidthstring 00.00.0000
13687 asterisk\InsetSpace ~
13696 \labelwidthstring 00.00.0000
13700 asterisk\InsetSpace ~
13705 layout Subsubsection*
13709 \labelwidthstring 00.00.0000
13713 asterisk\InsetSpace ~
13722 \labelwidthstring 00.00.0000
13726 asterisk\InsetSpace ~
13731 layout Subparagraph*
13735 \labelwidthstring 00.00.0000
13747 \labelwidthstring 00.00.0000
13755 layout Bibliography
13759 \labelwidthstring 00.00.0000
13771 \labelwidthstring 00.00.0000
13783 \labelwidthstring 00.00.0000
13795 \labelwidthstring 00.00.0000
13807 \labelwidthstring 00.00.0000
13819 \labelwidthstring 00.00.0000
13827 layout Rotatefoilhead
13831 \labelwidthstring 00.00.0000
13839 layout RightAddress
13843 \labelwidthstring 00.00.0000
13855 \labelwidthstring 00.00.0000
13867 \labelwidthstring 00.00.0000
13879 \labelwidthstring 00.00.0000
13890 \begin_layout Standard
13891 These ones are kept for backwards compatibility, but only make sense on
13896 \labelwidthstring 00.00.0000
13908 \labelwidthstring 00.00.0000
13916 layout Subsubsection*
13920 \labelwidthstring 00.00.0000
13931 \begin_layout Section
13935 \begin_layout Subsection
13942 \labelwidthstring 00.00.0000
13953 \labelwidthstring 00.00.0000
13964 \labelwidthstring 00.00.0000
13975 \labelwidthstring 00.00.0000
13986 \labelwidthstring 00.00.0000
13997 \labelwidthstring 00.00.0000
14008 \labelwidthstring 00.00.0000
14015 hyphenation-point-insert
14019 \labelwidthstring 00.00.0000
14030 \labelwidthstring 00.00.0000
14037 line-delete-forward
14041 \labelwidthstring 00.00.0000
14052 \labelwidthstring 00.00.0000
14063 \labelwidthstring 00.00.0000
14074 \labelwidthstring 00.00.0000
14085 \labelwidthstring 00.00.0000
14096 \labelwidthstring 00.00.0000
14107 \labelwidthstring 00.00.0000
14118 \labelwidthstring 00.00.0000
14129 \labelwidthstring 00.00.0000
14140 \labelwidthstring 00.00.0000
14151 \labelwidthstring 00.00.0000
14162 \labelwidthstring 00.00.0000
14173 \labelwidthstring 00.00.0000
14185 \labelwidthstring 00.00.0000
14197 \labelwidthstring 00.00.0000
14209 \labelwidthstring 00.00.0000
14221 \labelwidthstring 00.00.0000
14234 \labelwidthstring 00.00.0000
14246 \labelwidthstring 00.00.0000
14258 \labelwidthstring 00.00.0000
14270 \labelwidthstring 00.00.0000
14282 \labelwidthstring 00.00.0000
14295 \labelwidthstring 00.00.0000
14307 \labelwidthstring 00.00.0000
14319 \labelwidthstring 00.00.0000
14332 \labelwidthstring 00.00.0000
14345 \labelwidthstring 00.00.0000
14358 \labelwidthstring 00.00.0000
14371 \labelwidthstring 00.00.0000
14384 \labelwidthstring 00.00.0000
14397 \labelwidthstring 00.00.0000
14409 \labelwidthstring 00.00.0000
14421 \labelwidthstring 00.00.0000
14433 \labelwidthstring 00.00.0000
14441 menu-open Documents
14445 \labelwidthstring 00.00.0000
14457 \labelwidthstring 00.00.0000
14469 \labelwidthstring 00.00.0000
14481 \labelwidthstring 00.00.0000
14493 \labelwidthstring 00.00.0000
14505 \labelwidthstring 00.00.0000
14513 buffer-toggle-read-only
14517 \labelwidthstring 00.00.0000
14529 \labelwidthstring 00.00.0000
14541 \labelwidthstring 00.00.0000
14553 \labelwidthstring 00.00.0000
14564 \labelwidthstring 00.00.0000
14575 \labelwidthstring 00.00.0000
14586 \labelwidthstring 00.00.0000
14597 \labelwidthstring 00.00.0000
14608 \labelwidthstring 00.00.0000
14619 \labelwidthstring 00.00.0000
14630 \labelwidthstring 00.00.0000
14641 \labelwidthstring 00.00.0000
14652 \labelwidthstring 00.00.0000
14663 \labelwidthstring 00.00.0000
14674 \labelwidthstring 00.00.0000
14685 \labelwidthstring 00.00.0000
14696 \labelwidthstring 00.00.0000
14707 \labelwidthstring 00.00.0000
14714 word-delete-forward
14718 \labelwidthstring 00.00.0000
14725 word-delete-backward
14729 \labelwidthstring 00.00.0000
14740 \labelwidthstring 00.00.0000
14747 end-of-sentence-period-insert
14751 \labelwidthstring 00.00.0000
14758 protected-space-insert
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
14835 buffer-begin-select
14839 \labelwidthstring 00.00.0000
14850 \labelwidthstring 00.00.0000
14857 paragraph-up-select
14861 \labelwidthstring 00.00.0000
14868 paragraph-down-select
14872 \labelwidthstring 00.00.0000
14879 word-backward-select
14883 \labelwidthstring 00.00.0000
14890 word-forward-select
14894 \labelwidthstring 00.00.0000
14905 \labelwidthstring 00.00.0000
14912 word-delete-forward
14916 \labelwidthstring 00.00.0000
14927 \labelwidthstring 00.00.0000
14938 \labelwidthstring 00.00.0000
14949 \labelwidthstring 00.00.0000
14960 \labelwidthstring 00.00.0000
14967 break-paragraph-keep-layout
14971 \labelwidthstring 00.00.0000
14981 \begin_layout Subsection
14988 \labelwidthstring 00.00.0000
14999 \labelwidthstring 00.00.0000
15010 \labelwidthstring 00.00.0000
15021 \labelwidthstring 00.00.0000
15032 \labelwidthstring 00.00.0000
15043 \labelwidthstring 00.00.0000
15054 \labelwidthstring 00.00.0000
15065 \labelwidthstring 00.00.0000
15076 \labelwidthstring 00.00.0000
15087 \labelwidthstring 00.00.0000
15098 \labelwidthstring 00.00.0000
15109 \labelwidthstring 00.00.0000
15120 \labelwidthstring 00.00.0000
15131 \labelwidthstring 00.00.0000
15142 \labelwidthstring 00.00.0000
15153 \labelwidthstring 00.00.0000
15164 \labelwidthstring 00.00.0000
15175 \labelwidthstring 00.00.0000
15186 \labelwidthstring 00.00.0000
15197 \labelwidthstring 00.00.0000
15208 \labelwidthstring 00.00.0000
15219 \labelwidthstring 00.00.0000
15230 \labelwidthstring 00.00.0000
15237 protected-space-insert
15241 \labelwidthstring 00.00.0000
15252 \labelwidthstring 00.00.0000
15263 \labelwidthstring 00.00.0000
15274 \labelwidthstring 00.00.0000
15281 buffer-new-template
15285 \labelwidthstring 00.00.0000
15296 \labelwidthstring 00.00.0000
15307 \labelwidthstring 00.00.0000
15318 \labelwidthstring 00.00.0000
15329 \labelwidthstring 00.00.0000
15340 \labelwidthstring 00.00.0000
15351 \labelwidthstring 00.00.0000
15362 \labelwidthstring 00.00.0000
15369 end-of-sentence-period-insert
15373 \labelwidthstring 00.00.0000
15384 \labelwidthstring 00.00.0000
15395 \labelwidthstring 00.00.0000
15402 hyphenation-point-insert
15406 \labelwidthstring 00.00.0000
15417 \labelwidthstring 00.00.0000
15424 protected-space-insert
15428 \labelwidthstring 00.00.0000
15439 \labelwidthstring 00.00.0000
15450 \labelwidthstring 00.00.0000
15461 \labelwidthstring 00.00.0000
15472 \labelwidthstring 00.00.0000
15483 \labelwidthstring 00.00.0000
15494 \labelwidthstring 00.00.0000
15505 \labelwidthstring 00.00.0000
15516 \labelwidthstring 00.00.0000
15527 \labelwidthstring 00.00.0000
15538 \labelwidthstring 00.00.0000
15549 \labelwidthstring 00.00.0000
15560 \labelwidthstring 00.00.0000
15571 \labelwidthstring 00.00.0000
15582 \labelwidthstring 00.00.0000
15593 \labelwidthstring 00.00.0000
15600 word-delete-forward
15604 \labelwidthstring 00.00.0000
15611 word-delete-backward
15615 \labelwidthstring 00.00.0000
15626 \labelwidthstring 00.00.0000
15637 \labelwidthstring 00.00.0000
15648 \labelwidthstring 00.00.0000
15659 \labelwidthstring 00.00.0000
15666 paragraph-down-select
15670 \labelwidthstring 00.00.0000
15681 \labelwidthstring 00.00.0000
15688 buffer-begin-select
15692 \labelwidthstring 00.00.0000
15699 word-backward-select
15703 \labelwidthstring 00.00.0000
15710 word-forward-select
15714 \labelwidthstring 00.00.0000
15721 paragraph-up-select
15725 \labelwidthstring 00.00.0000
15736 \labelwidthstring 00.00.0000
15743 break-paragraph-keep-layout
15747 \labelwidthstring 00.00.0000
15758 \labelwidthstring 00.00.0000
15769 \labelwidthstring 00.00.0000
15780 \labelwidthstring 00.00.0000
15791 \labelwidthstring 00.00.0000
15802 \labelwidthstring 00.00.0000
15813 \labelwidthstring 00.00.0000
15824 \labelwidthstring 00.00.0000
15835 \labelwidthstring 00.00.0000
15846 \labelwidthstring 00.00.0000
15857 \labelwidthstring 00.00.0000
15867 \begin_layout Subsection
15873 \begin_layout Standard
15874 These are LyX keyboard definitions for mathematics, similar to those of
15878 \begin_layout Standard
15879 The bindings file and the present documentation were prepared by Serge Winitzki
15880 with assistance from Jean-Marc Lasgouttes.
15881 Version 1.3, for LyX 1.2.x and 1.3.x.
15884 \begin_layout Standard
15885 These definitions make it a lot easier to type equations without using the
15886 mouse, especially for people familiar with Scientific Word.
15887 The standard LyX bindings such as
15898 \begin_layout Standard
15899 Tip: to find the "LyX bind name" for a key, look at the status bar after
15900 typing some non-existent key combination.
15902 to find how "Ctrl-&" is referenced, press Ctrl-S and then Ctrl-&: the status
15903 bar shows "C-s S-C-ampersand." (This does not work in LyX 1.3.0!)
15907 \labelwidthstring 00.00.0000
15916 -- Copy, cut, paste is as in Sciword,
15932 \labelwidthstring 00.00.0000
15941 -- Display equation toggle: type
15945 to insert a displayed formula (
15950 \begin_inset Quotes eld
15954 \begin_inset Quotes erd
15962 in a displayed formula to convert it back to an inline formula.
15966 \labelwidthstring 00.00.0000
15981 to insert a fraction (
15986 \begin_inset Quotes eld
15990 \begin_inset Quotes erd
15994 You can also select an expression and type
15998 to convert it to the numerator of a fraction.
16007 end of the denominator will delete the numerator and convert the denominator
16012 \labelwidthstring 00.00.0000
16024 \begin_inset Formula $\int$
16032 \begin_inset Quotes eld
16036 \begin_inset Quotes erd
16043 \labelwidthstring 00.00.0000
16050 line-delete-forward
16052 -- Emacs-like binding: delete forward of cursor to end of line.
16056 \labelwidthstring 00.00.0000
16065 -- A text/math toggle (
16070 \begin_inset Quotes eld
16074 \begin_inset Quotes erd
16077 ): switches to math in text mode, and also inserts roman text in math mode.
16087 \begin_inset Quotes eld
16091 \begin_inset Quotes erd
16098 \labelwidthstring 00.00.0000
16107 -- Add/remove numbering in a single equation.
16111 \labelwidthstring 00.00.0000
16120 -- Add/remove numbering at a line in equation arrays.
16123 \begin_layout Standard
16124 The above commands are toggles that control the numbering of equations (
16129 \begin_inset Quotes eld
16133 \begin_inset Quotes erd
16137 Note: when deleting a number in a labeled eqnarray, the label is not really
16138 removed (the TeX code becomes
16139 \begin_inset Quotes eld
16151 \begin_inset Quotes erd
16154 ) and this generates a (harmless) LaTeX warning.
16158 \labelwidthstring 00.00.0000
16167 -- Open a new document.
16172 \labelwidthstring 00.00.0000
16181 -- Insert a quote character " (
16186 \begin_inset Quotes eld
16190 \begin_inset Quotes erd
16195 \begin_inset Quotes eld
16199 \begin_inset Quotes erd
16202 double quote character that you get by default.
16206 \labelwidthstring 00.00.0000
16217 -- Square root sign
16218 \begin_inset Formula $\sqrt{x}$
16226 \begin_inset Quotes eld
16230 \begin_inset Quotes erd
16237 \labelwidthstring 00.00.0000
16249 \begin_inset Formula $\sqrt[n]{x}$
16256 \labelwidthstring 00.00.0000
16265 -- Another binding for a switch between the text and the math mode (
16270 \begin_inset Quotes eld
16274 \begin_inset Quotes erd
16278 Note that the roman text inserted in math mode is special.
16282 \labelwidthstring 00.00.0000
16295 the selected text (text mode only, use things like
16311 \labelwidthstring 00.00.0000
16320 -- W*ndows heritage.
16324 \labelwidthstring 00.00.0000
16333 -- Close the current document (again, a W*ndows heritage).
16337 \labelwidthstring 00.00.0000
16348 \labelwidthstring 00.00.0000
16359 \labelwidthstring 00.00.0000
16369 \begin_inset Quotes eld
16373 \begin_inset Quotes erd
16377 \begin_inset Quotes eld
16381 \begin_inset Quotes erd
16387 \begin_layout Standard
16388 Bracket delimiters: press
16392 -<bracket key> to insert a matching pair of delimiters.
16397 inserts a pair of parentheses
16398 \begin_inset Formula $\left[\right]$
16406 does the same thing.) It will switch to math mode if needed.
16407 The supported characters are ( [ { < |.
16408 It is the same to press the right or the left bracket.
16409 The corresponding delimiters are
16410 \begin_inset Formula $\left(\right)$
16414 \begin_inset Formula $\left[\right]$
16418 \begin_inset Formula $\left\{ \right\} $
16422 \begin_inset Formula $\left\langle \right\rangle $
16426 \begin_inset Formula $\left|\right|$
16431 \begin_inset Quotes eld
16435 \begin_inset Quotes erd
16438 and resize with their contents.
16439 Use Math Panel to get other or non-matching delimiters.
16440 Press backspace on the
16444 delimiter to remove both
16445 \begin_inset Quotes eld
16449 \begin_inset Quotes erd
16452 delimiters without removing their contents.
16456 \labelwidthstring 00.00.0000
16465 -- for convenience, pressing
16479 \labelwidthstring 00.00.0000
16490 \labelwidthstring 00.00.0000
16501 \labelwidthstring 00.00.0000
16512 \labelwidthstring 00.00.0000
16523 \labelwidthstring 00.00.0000
16534 \labelwidthstring 00.00.0000
16541 math-delim langle rangle
16543 -- angular delimiters
16544 \begin_inset Formula $\left\langle \right\rangle $
16547 , not to confuse with ordinary < > signs.
16551 \labelwidthstring 00.00.0000
16558 math-delim langle rangle
16561 \begin_layout Standard
16562 The bar bracket: on some keyboards (e.g.\InsetSpace ~
16563 some British ones), the bar character
16568 -something and on some wayward Unices to "brokenbar".
16569 So we define all of these keys as well.
16573 \labelwidthstring 00.00.0000
16584 \labelwidthstring 00.00.0000
16595 \labelwidthstring 00.00.0000
16606 \labelwidthstring 00.00.0000
16617 \labelwidthstring 00.00.0000
16627 \begin_layout Standard
16628 Accents are in most cases
16632 -<accent key>, e.g.\InsetSpace ~
16646 for tilde (you also need to press
16652 \begin_inset Quotes eld
16664 \begin_inset Quotes erd
16668 Some accents work only in math mode and others only in text mode.
16672 \labelwidthstring 00.00.0000
16681 -- overdot accent, ȧ (text mode only).
16685 \labelwidthstring 00.00.0000
16697 \begin_inset Formula $\dot{a}$
16700 (math mode only -- in physics this denotes a first derivative).
16704 \labelwidthstring 00.00.0000
16715 -- Vector accent over math
16716 \begin_inset Formula $\overrightarrow{x}$
16723 \labelwidthstring 00.00.0000
16732 -- umlaut accent, ä (text mode only)
16736 \labelwidthstring 00.00.0000
16747 -- double dot accent,
16748 \begin_inset Formula $\ddot{a}$
16751 (math mode only -- in physics this denotes a second derivative).
16752 To get a triple dot in math mode, use
16760 \labelwidthstring 00.00.0000
16769 -- grave accent à (text mode only, use
16779 \labelwidthstring 00.00.0000
16788 -- tilde accent ã (text mode only, use
16798 \labelwidthstring 00.00.0000
16807 -- acute accent á (text mode only, use
16817 \labelwidthstring 00.00.0000
16826 -- circumflex (caret) accent â (text mode only, use
16835 \begin_layout Standard
16837 The new key S-F2 for creating a LaTeX file seems handy.
16841 \labelwidthstring 00.00.0000
16850 -- Save current document.
16854 \labelwidthstring 00.00.0000
16861 buffer-export latex
16863 -- Write a LaTeX file for the current document.
16867 \labelwidthstring 00.00.0000
16876 -- Find and replace dialog.
16880 \labelwidthstring 00.00.0000
16897 \labelwidthstring 00.00.0000
16910 to quit LyX is the W*ndows w*ndow manager's mnemonic.
16913 \begin_layout Standard
16922 are used to switch fonts.
16927 to switch back to the normal font.
16928 The non-default font switches
16936 all work as toggles.
16937 They also work on the whole word if you put the cursor in the middle of
16938 the word, or if you select some text.
16942 \labelwidthstring 00.00.0000
16951 -- stop using any special font
16955 \labelwidthstring 00.00.0000
16972 \labelwidthstring 00.00.0000
16989 \labelwidthstring 00.00.0000
17006 \labelwidthstring 00.00.0000
17020 (Used sometimes for people's names.)
17023 \begin_layout Standard
17029 \begin_inset Quotes eld
17033 \begin_inset Quotes erd
17040 key (useful e.g.\InsetSpace ~
17041 if the keyboard has no working
17048 \begin_layout Standard
17049 Here are some Sciword-inspired mnemonics for frequently used math symbols.
17050 Many symbols start with a
17059 cannot be itself bound to anything.
17063 \labelwidthstring 00.00.0000
17075 \begin_inset Quotes eld
17079 \begin_inset Quotes erd
17083 \begin_inset Formula $\prime$
17087 This is frequently unnecessary: in most cases the normal apostrophe works
17090 \begin_inset Formula $x'+2x=0$
17093 , but in some cases this would generate a double superscript error in LaTeX.
17095 \begin_inset Formula $x^{\prime2}$
17099 \begin_inset Formula $x$
17102 prime squared) must be entered with the prime character.
17106 \labelwidthstring 00.00.0000
17114 command-sequence math-superscript; math-insert
17118 -- Insert a prime as a superscript (see example above).
17122 \labelwidthstring 00.00.0000
17131 -- Insert an upper index.
17138 \labelwidthstring 00.00.0000
17147 -- Insert a lower index.
17154 \labelwidthstring 00.00.0000
17166 -- Partial derivative symbol
17167 \begin_inset Formula $\partial$
17174 \labelwidthstring 00.00.0000
17186 -- Summation symbol
17187 \begin_inset Formula $\sum$
17190 (not the same as the Greek letter uppercase Sigma
17191 \begin_inset Formula $\Sigma$
17194 because it can resize and allows smart upper/lower limits).
17198 \labelwidthstring 00.00.0000
17211 \begin_inset Formula $\prod$
17214 (not the same as the Greek letter uppercase Pi,
17215 \begin_inset Formula $\Pi$
17222 \labelwidthstring 00.00.0000
17235 \begin_inset Formula $\infty$
17242 \labelwidthstring 00.00.0000
17255 \begin_inset Formula $\times$
17262 \labelwidthstring 00.00.0000
17272 -- Insert a stacked array
17273 \begin_inset Formula $\begin{array}{c}
17275 \end{array}\end{array}$
17279 (Frequently useful in formulae.)
17283 \labelwidthstring 00.00.0000
17294 \begin_inset Formula $\times$
17298 \begin_inset Formula $\begin{array}{ccc}
17303 (Then you can modify its size using the
17305 Edit\SpecialChar \menuseparator
17312 \labelwidthstring 00.00.0000
17325 \begin_inset Quotes eld
17329 \begin_inset Quotes erd
17333 \begin_inset Formula $\dagger$
17340 \labelwidthstring 00.00.0000
17353 \begin_inset Quotes eld
17357 \begin_inset Quotes erd
17361 \begin_inset Formula $\equiv$
17368 \labelwidthstring 00.00.0000
17380 \begin_inset Quotes eld
17383 Approximate equality
17384 \begin_inset Quotes erd
17388 \begin_inset Formula $\approx$
17395 \labelwidthstring 00.00.0000
17407 \begin_inset Quotes eld
17411 \begin_inset Quotes erd
17415 \begin_inset Formula $\sim$
17422 \labelwidthstring 00.00.0000
17434 \begin_inset Formula $\rightarrow$
17438 \begin_inset Formula $\lim_{x\rightarrow0}$
17445 \labelwidthstring 00.00.0000
17457 \begin_inset Formula $\leq$
17464 \labelwidthstring 00.00.0000
17475 -- Greater-or-equal
17476 \begin_inset Formula $\geq$
17483 \labelwidthstring 00.00.0000
17496 \begin_inset Quotes eld
17500 \begin_inset Quotes erd
17504 \begin_inset Formula $\ll$
17507 (useful in physics)
17511 \labelwidthstring 00.00.0000
17524 \begin_inset Quotes eld
17528 \begin_inset Quotes erd
17532 \begin_inset Formula $\gg$
17538 \begin_layout Subsection
17539 Standard math bindings
17543 \labelwidthstring 00.00.0000
17557 \labelwidthstring 00.00.0000
17569 \labelwidthstring 00.00.0000
17581 \labelwidthstring 00.00.0000
17595 \labelwidthstring 00.00.0000
17607 \labelwidthstring 00.00.0000
17619 \labelwidthstring 00.00.0000
17633 \labelwidthstring 00.00.0000
17645 \labelwidthstring 00.00.0000
17657 \labelwidthstring 00.00.0000
17669 \labelwidthstring 00.00.0000
17683 \labelwidthstring 00.00.0000
17697 \labelwidthstring 00.00.0000
17711 \labelwidthstring 00.00.0000
17725 \labelwidthstring 00.00.0000
17739 \labelwidthstring 00.00.0000
17753 \labelwidthstring 00.00.0000
17765 \labelwidthstring 00.00.0000
17779 \labelwidthstring 00.00.0000
17791 \labelwidthstring 00.00.0000
17803 \labelwidthstring 00.00.0000
17815 \labelwidthstring 00.00.0000
17827 \labelwidthstring 00.00.0000
17841 \labelwidthstring 00.00.0000
17853 \labelwidthstring 00.00.0000
17865 \labelwidthstring 00.00.0000
17877 \labelwidthstring 00.00.0000
17885 math-delim langle rangle
17889 \labelwidthstring 00.00.0000
17897 math-delim rangle langle
17901 \labelwidthstring 00.00.0000
17913 \labelwidthstring 00.00.0000
17927 \labelwidthstring 00.00.0000
17940 \begin_layout Subsection
17945 \labelwidthstring 00.00.0000
17957 \labelwidthstring 00.00.0000
17969 \labelwidthstring 00.00.0000
17981 \labelwidthstring 00.00.0000
17993 \labelwidthstring 00.00.0000