1 #LyX 1.6.0svn created this file. For more info see http://www.lyx.org/
8 \IfFileExists{isolatin.def}
9 {\usepackage[isolatin]{inputenc}}
10 {\usepackage[latin1]{inputenc}}
13 \inputencoding default
16 \font_typewriter default
17 \font_default_family default
23 \paperfontsize default
31 \paperorientation portrait
34 \paragraph_separation indent
36 \quotes_language english
39 \paperpagestyle headings
40 \tracking_changes false
52 Customizing LyX: Features for the Advanced User
60 \begin_layout Standard
62 Principal maintainer of this file is
67 If you have comments or error corrections, please send them to the LyX
68 Documentation mailing list, <lyx-docs@lists.lyx.org>.
76 \begin_layout Standard
77 \begin_inset LatexCommand tableofcontents
88 \begin_layout Standard
89 This manual covers the customization features present in LyX.
90 In it, we discuss issues like keyboard shortcuts, screen previewing options,
91 printer options, sending commands to LyX via the LyX Server, internationalizati
92 on, installing new LaTeX classes and LyX layouts, etc.
93 We can't possibly hope to touch on everything you can change---our developers
94 add new features faster than we can document them---but we will explain
95 the most common customizations and hopefully point you in the right direction
96 for some of the more obscure ones.
100 LyX configuration files
103 \begin_layout Standard
104 \begin_inset LatexCommand label
109 This chapter aims to help you to find your way through the LyX configuration
111 Before continuing to read this chapter, you should find out where your
112 LyX library directory is by using
117 elp\SpecialChar \menuseparator
125 This directory is the place where LyX places its system-wide configuration
126 files, and we will simply name it
130 in the remainder of this document.
134 \begin_layout Section
142 \begin_layout Standard
147 and its sub-directories contain a number of files and that can be used
148 to customise LyX's behaviour.
149 You can change many of these files from within LyX itself through the
154 ools\SpecialChar \menuseparator
162 Most customization that you might want to do to LyX is possible through
164 However, many other inner aspects of LyX can be customized by modifying
170 They fall in different categories, described in the following subsections.
173 \begin_layout Subsection
174 Automatically generated files
177 \begin_layout Standard
178 These files are generated when you configure LyX.
179 They contain various default values that are guessed by inspection.
180 In general, it is not a good idea to modify them, since they might be overwritt
185 \labelwidthstring 00.00.0000
192 contains defaults for various commands.
196 \labelwidthstring 00.00.0000
203 contains the list of packages that have been recognized by LyX.
204 It is currently unused by the LyX program itself, but the information extracted
205 , and more, is made available with
210 elp\SpecialChar \menuseparator
222 \labelwidthstring 00.00.0000
229 is the list of text classes that have been found in your
233 directory, along with the associated LaTeX document class and their description.
237 \labelwidthstring 00.00.0000
242 is automatically generated during configuration from the file
249 \begin_layout Subsection
254 \labelwidthstring 00.00.0000
261 this directory contains files with the extension
265 that define the keybindings used in LyX (see section\InsetSpace ~
267 \begin_inset LatexCommand ref
268 reference "sec:bindings"
273 If there exists an internationalized version of the bind file named
277 , that will be used first.
278 See Chapter\InsetSpace ~
280 \begin_inset LatexCommand ref
281 reference "chap:i18n"
286 \begin_inset LatexCommand ref
287 reference "sec:bindings"
295 \labelwidthstring 00.00.0000
302 contains graphics files that can be included in documents.
307 \labelwidthstring 00.00.0000
314 contains LyX documentation files (including the one you are currently reading).
319 deserves special attention, as noted above.
320 If there exists an internationalized version of the help-document with
325 prepended to the name, that will be used first.
326 See Chapter\InsetSpace ~
328 \begin_inset LatexCommand ref
329 reference "chap:i18n"
337 \labelwidthstring 00.00.0000
344 contains example files that explain how to use some features.
345 In the file browser, press the
353 \labelwidthstring 00.00.0000
358 contains image files that are used by the
363 In addition, it also contains the individual icons used in the toolbar
364 and the banners that can be shown when LyX is launched.
368 \labelwidthstring 00.00.0000
375 contains keyboard keymapping files.
376 See Chapter\InsetSpace ~
378 \begin_inset LatexCommand ref
379 reference "sec:keymap"
387 \labelwidthstring 00.00.0000
394 contains the text class files described in Chapter\InsetSpace ~
396 \begin_inset LatexCommand ref
397 reference "chap:textclass"
405 \labelwidthstring 00.00.0000
410 contains some files that demonstrate the capabilities of the
412 External\InsetSpace ~
419 \labelwidthstring 00.00.0000
424 contains the standard LyX template files described in Chapter\InsetSpace ~
426 \begin_inset LatexCommand ref
427 reference "sec:templates"
435 \labelwidthstring 00.00.0000
440 contains some LaTeX cls files distributed with LyX.
444 \labelwidthstring 00.00.0000
449 contains files with the extension
453 that define the user interface to LyX.
454 That is, the files define which items appear in which menus and the items
455 appearing on the toolbar.
456 See Chapter\InsetSpace ~
458 \begin_inset LatexCommand ref
466 \begin_layout Subsection
467 Files you don't want to modify
470 \begin_layout Standard
471 These files are used internally by LyX and you generally do not need to
472 modify them unless you are a developer.
476 \labelwidthstring 00.00.0000
483 this file contains the list of LyX developers.
484 The contents are displayed with the menu entry
489 elp\SpecialChar \menuseparator
497 \labelwidthstring 00.00.0000
504 this is a LaTeX script used during the configuration process.
509 \labelwidthstring 00.00.0000
516 this is the script that is used to re-configure LyX.
517 It creates configuration files in the directory it was run from.
520 \begin_layout Subsection
521 Other files needing a line or two...
525 \labelwidthstring 00.00.0000
530 this contains tables describing how different character encodings can be
535 \labelwidthstring 00.00.0000
540 this file contains the templates available to the new
542 External\InsetSpace ~
549 \labelwidthstring 00.00.0000
554 this file contains a list of all the languages currently supported by LyX.
557 \begin_layout Section
558 Your local configuration directory
561 \begin_layout Standard
562 Even if you are using LyX as an unprivileged user, you might want to change
563 LyX configuration for your own use.
568 directory contains all your personal configuration files.
569 This is the directory described as
570 \begin_inset Quotes eld
574 \begin_inset Quotes erd
582 elp\SpecialChar \menuseparator
587 This directory is used as a mirror of
591 , which means that every file in
595 is a replacement for the corresponding file in
600 Any configuration file described in the above sections can be placed either
601 in the system-wide directory, in which case it will affect all users, or
602 in your local directory for your own use.
605 \begin_layout Standard
606 To make things clearer, let's provide a few examples:
609 \begin_layout Itemize
610 The preferences set in the
615 ools\SpecialChar \menuseparator
622 dialog are saved to a file
633 \begin_layout Itemize
634 When you reconfigure using
639 ools\SpecialChar \menuseparator
650 and the resulting files are written in your local configuration directory
651 (see section\InsetSpace ~
653 \begin_inset LatexCommand ref
654 reference "sec:autodetected"
658 to have a list of the
662 settings affected by this section).
663 This means that any additional text class file that you might have added
668 will be added to the list of classes in the
673 ayout\SpecialChar \menuseparator
683 \begin_layout Itemize
684 Similarly, if you have installed some LaTeX document classes in your home
685 directory, that LaTeX can find with your
689 path, they will show up in your list of text classes.
693 \begin_layout Standard
694 as long as LyX or yourself have a
698 file for it, of course.
706 \begin_layout Itemize
707 If you get some updated documentation from LyX ftp site and cannot install
708 it because you do not have sysadmin rights on your system, you can just
723 \begin_layout Section
724 Running LyX with multiple configurations
727 \begin_layout Standard
728 The configuration freedom of the local configuration directory may not suffice
729 if you want to have more than one configuration at your disposal.
730 For example, you may want to be use different key bindings or printer settings
732 You can achieve this by having several such directories.
733 You then specify which directory to use at run-time.
736 \begin_layout Standard
737 Invoking LyX with the command line switch
745 instructs the program to read the configuration from that directory, and
746 not from the default directory (you can determine the default directory
747 by running LyX without this switch as described above).
748 If this directory does not exist, LyX offers to create it for you, just
749 like it does for the default directory on the first time you run the program.
750 You can modify the configuration options in this additional
754 exactly as you would for the default directory.
755 These directories are completely independent (but read on).
756 Note that setting the environment variable
760 to some value has exactly the same effect
765 \begin_layout Standard
766 Having several configurations also requires more maintenance: if you want
767 to add a new layout to
771 which you want available from all your configurations, you must add it
772 to each directory separately.
773 You can avoid this with the following trick: after LyX creates the additional
774 directory, most of the subdirectories (see above) are empty.
775 If you want the new configuration to mirror an existing one, replace the
776 empty subdirectory with a symbolic link to the matching subdirectory in
777 the existing configuration.
784 subirectory, however, since it contains a file written by the configuration
785 script (also accessible through
790 ools\SpecialChar \menuseparator
796 \begin_inset LatexCommand ref
797 reference "sec:autodetected"
803 which is configuration-specific.
806 \begin_layout Chapter
817 \begin_layout Section
818 Using the dialog for the first time
821 \begin_layout Standard
826 file will contain only changes that you have made to the default behaviour,
827 some of which is hard-coded into LyX and some of which is contained in
830 LyXDir/lyxrc.defaults
833 Note that in both files lines beginning with a
834 \begin_inset Quotes eld
842 \begin_inset Quotes erd
845 are just comments and not interpreted.
846 However, only system administrators should edit
856 ools\SpecialChar \menuseparator
863 dialog to create and modify their own
870 \begin_layout Standard
876 ools\SpecialChar \menuseparator
883 dialog will be largely self-explanatory.
884 Almost all the commands have an associated comment, so you shouldn't have
885 too much trouble modifying it to taste.
886 Before we highlight a few of the more important commands below, however,
891 ing some of your changes (e.g., screen fonts) will have an instant effect.
893 changing the bind file) will not.
894 If nothing appears to have changed, just
898 the changes and restart LyX.
901 \begin_layout Section
905 \begin_layout Standard
906 The font used to display your documents on the LyX screen is very important,
907 since you'll be reading all your documents with this font.
908 Therefore it is important that the font is as readable and good-looking
910 The LyX team tried to provide the best possible default font for you, but
911 since practically all X11 systems are different, it's likely that the default
912 fonts will be sub-optimal on your system.
913 Fortunately, you can do something about this.
914 Before we explain how to do this, you should learn a bit more about fonts
915 so that you are better prepared for choosing your fonts, because it is
916 a trade-off that is specific to your preferences and the capabilities of
920 \begin_layout Standard
921 Notice that this section only deals with the fonts on the
925 inside the LyX window.
926 The fonts that appear on the
934 are independent from these fonts, and are determined by the document class.
939 to learn how to change the font of the printed version of your document.
942 \begin_layout Standard
943 Basically, screen fonts come in two different kinds: scalable outline fonts
944 and non-scalable bitmap fonts.
945 This distinction seems a bit arbitrary, since non-scalable fonts are actually
946 scalable in most modern font renderers.
947 The difference lies in the
951 of the scaling, and the
956 The most important decision is thus whether you should use non-scalable
957 bitmap fonts or scalable outline fonts.
960 \begin_layout Standard
961 The scalable fonts are built from
965 of the single glyphs (i.e.
966 characters) in the font.
967 This means that each glyph is defined using mathematical curves that are
968 well suited for scaling to any requested size.
969 This mathematical definition is interpreted by the font renderer and turned
970 into a small picture composed of pixels according to which size and glyph,
971 the programmer requests.
972 This means that scalable fonts will look pretty good in all sizes.
973 Well, almost all sizes.
974 Since scalable fonts are defined in an abstract way, it can be hard to
975 provide a good rendering at small sizes, where each pixel has to be very
976 carefully computed to provide a good image.
977 Technically it is possible to do this from the mathematical definition,
978 but in order to keep the rendering reasonably fast, tradeoffs have to be
979 made, and the result is that scalable fonts can be difficult to read at
983 \begin_layout Standard
984 Bitmap fonts on the other hand, are defined by bitmap graphics from the
985 start, so they will look good at all the sizes they are meant for.
986 However, they don't scale well, because in order to scale a glyph, each
987 pixel is enlarged into several pixels.
988 It is the same effect that happens if you try to enlarge a picture in
992 or any other picture manipulation program.
993 In order to relieve this effect, bitmap fonts are typically provided in
994 several fixed sizes typically from around 8 pixels high up to 34 pixels
995 or so high in steps according to what is believed to be useful.
996 The advantage of bitmap fonts is that no complicated computations are necessary
997 to display each glyph, so bitmap fonts are thus faster displayed than scalable
999 The disadvantage is that sizes that don't exists as fixed versions have
1000 to be scaled by doubling pixels, and thus look bad.
1003 \begin_layout Standard
1004 The net result of all this, is that bitmap fonts are generally best for
1005 the small sizes, where they are available, while scalable fonts are generally
1006 best for large sizes.
1007 The logical conclusion would thus be to use bitmap fonts for the small
1008 sizes, and scalable fonts for the large sizes.
1009 Unfortunately, this is not a good idea, since bitmap fonts and scalable
1010 fonts are not designed to be used together, so the overall look of such
1011 a scheme would be bad.
1012 The best you can do is thus to try both schemes and decide for yourself
1016 \begin_layout Standard
1017 By default, LyX uses non-scalable bitmap fonts (when using the XForms frontend).
1022 is used, for sans serif fonts,
1030 is used as the monospaced/typewriter font.
1033 \begin_layout Standard
1034 In the following, we will describe what to do if the text does not look
1036 We'll start with the most important parameters: DPI and font zoom.
1039 \begin_layout Subsection
1040 DPI setting and Font Zoom
1043 \begin_layout Standard
1044 LyX automatically tries to scale the fonts to look as close as the paper
1045 output size as possible, except for the so-called font zoom factor.
1048 \begin_layout Standard
1049 In order for this to work on all systems, it relies on the screen DPI (dots
1050 per inch) setting to be correct.
1051 The DPI setting for your system is autodetected by LyX using the information
1052 the X server can provide.
1053 You can check what LyX autodetects the DPI setting to, by running LyX as
1061 \begin_layout Standard
1062 On many systems, X is not set up correctly, so you should check that it
1065 \begin_inset Quotes eld
1073 \begin_inset Quotes erd
1076 and write down what the DPI is for the resolution you use (this will be
1077 close to the value LyX detects).
1078 It is the number mentioned as
1079 \begin_inset Quotes eld
1083 \begin_inset Quotes erd
1087 Also write down the number of pixels you have in the width (the first number
1089 \begin_inset Quotes eld
1093 \begin_inset Quotes erd
1099 \begin_layout Standard
1100 Then get the good old ruler out of the closet, and measure the width of
1101 the visible screen-image on your monitor.
1102 Convert this measurement to inches if you used a centimeter ruler by dividing
1104 Now you can determine the correct DPI setting for your screen by dividing
1105 the number of pixels in the width by the width of the screen-image on the
1107 If this number is more than, say, 5 DPI from the detected value, you should
1108 either fix the X setup, or at least tell LyX that the DPI is different
1109 than the detected value.
1112 \begin_layout Standard
1113 If you can't fix the X setup (which of course is best since other programs
1114 than LyX will benefit from this as well), you can tell LyX the correct
1122 \begin_layout Standard
1123 If the text is too small or too big for your taste, you should fiddle with
1124 the font zoom setting.
1125 This setting is used to scale the point size of the text.
1126 If your DPI setting is correct, and the font zoom setting is set to 100,
1127 this means that LyX will try to display the text exactly the same size
1128 as it will appear on the paper-output.
1129 If you set the zoom factor to 200, the text will try to be 2 times as big
1131 Of course, this will only happen if LyX can find a font that has the appropriat
1132 e size, which you can't count on.
1133 Since LyX is a WYSIWYM system anyways, this limitation isn't much of an
1137 \begin_layout Standard
1138 The default font zoom setting is 150, since a monitor is typically wider
1139 than a piece of paper, but you should try to fiddle with it through the
1153 dialog to find a size that you like.
1154 When you've found a setting that seems to work nicely for you (tip: use
1162 button to keep the dialog open while you experiment), you can make this
1163 setting the default by using the
1173 \begin_layout Standard
1174 While it is often possible to find a suitable size for the text on the screen,
1175 this doesn't necessarily mean that the fonts are the best ones available
1177 In order to help you get the most out of your system, you can use the font
1178 definition commands to fine-tune the look of the text in greater detail
1182 \begin_layout Subsection
1183 Font definition commands
1186 \begin_layout Standard
1187 As mentioned, LyX uses non-scalable bitmap fonts by default with the XForms
1193 is used, for sans serif fonts,
1201 is used as the monospaced/typewriter font.
1204 \begin_layout Standard
1205 You can change all of these from within the
1210 The number of fonts that are available on different systems vary, but the
1215 should be available everywhere.
1216 Use that program to find candidate fonts.
1217 When you've found a font that you like, try to insert the first two elements
1219 \begin_inset Quotes eld
1223 \begin_inset Quotes erd
1227 \begin_inset Quotes eld
1231 \begin_inset Quotes erd
1238 ) in the appropriate field in the
1250 LyX will then reformat your document using the new font, and if you like
1251 the font, you should
1259 One place to start for a new font is to see if the scalable font
1260 \begin_inset Quotes eld
1264 \begin_inset Quotes erd
1268 Tip: You can see whether a font is a bitmap font or a scalable font by
1270 \begin_inset Quotes eld
1274 \begin_inset Quotes erd
1278 \begin_inset Quotes eld
1282 \begin_inset Quotes erd
1290 If the value 0 is available, the font is scalable.
1291 If the value 0 isn't available, the font is a bitmap font.
1294 \begin_layout Standard
1295 Before you go about scrapping a bitmap font because the larger sizes look
1297 \begin_inset Quotes eld
1301 \begin_inset Quotes erd
1304 , you should toggle the
1305 \begin_inset Quotes eld
1309 \begin_inset Quotes erd
1313 This is only useful if you use bitmap fonts, because only these don't scale
1315 If you define this flag, LyX will only use the fixed font sizes that are
1316 available, and this guarantees that all bitmap fonts look well.
1317 (You can see which individual font sizes are available with the
1326 .) However, the prize is that the difference between the size of the fonts
1327 on screen and the size of fonts on paper will be larger because LyX will
1328 have to be satisfied with the closest available size, and not try to scale
1330 Also, you can risk that some logically different sizes, such as
1338 , will be mapped to the same screen font, making it hard for you to see
1339 the difference on screen.
1340 We've decided not to use scalable fonts by default because of these artifacts,
1341 but since LyX is a WYSIWYM system, many people like to use the flag anyways,
1342 well-knowing that the font size on the screen can't be trusted.
1343 But remember that this flag only makes a difference when you use bitmap
1345 Scalable fonts won't be affected for reasons you should understand by now.
1348 \begin_layout Standard
1349 One final note regarding this flag: you should know that there is nothing
1350 wrong with using bitmap and scalable fonts at the same time for different
1352 For instance, it's common to use the scalable
1353 \begin_inset Quotes eld
1357 \begin_inset Quotes erd
1360 for the serif text together with a bitmap version of
1361 \begin_inset Quotes eld
1365 \begin_inset Quotes erd
1369 And you can safely select the
1370 \begin_inset Quotes eld
1374 \begin_inset Quotes erd
1377 button without worries: It will only apply to the Helvetica font.
1380 \begin_layout Standard
1381 Sometimes the artifacts introduced by use of the flag can be relieved by
1382 using the fine-detail screen font sizes which defines which point sizes
1383 the different logical font sizes correspond to.
1388 to see exactly what concrete fonts the logical sizes map to, and try adjusting
1389 the corresponding entries in the
1393 dialog until you've managed to hit the nail and get the fonts you want.
1394 This can be hard to do, because LyX uses the DPI setting and the font zoom
1395 settings to calculate which exact screen font size to ask the X server
1396 for, thus obfuscating the mapping.
1397 If you can't make it by trial-and-error, you can make the process more
1398 transparent if you set both the DPI setting and font zoom settings to 100---eve
1399 n when this is known to be wrong.
1400 This will of course make your scalable fonts look weird, so use with care.
1403 \begin_layout Subsection
1407 \begin_layout Standard
1408 By default, LyX will use fonts meant to write Western European text, including
1409 all kinds of English.
1410 This is defined through the so-called
1419 If you want to use LyX to write for instance Eastern European text, Cyrillic
1420 or any other language not covered by the ISO-8859-1 font encoding, you
1421 can define a different one with the encoding setting.
1422 This requires you to have special fonts installed.
1427 to see whether this is the case: check the
1428 \begin_inset Quotes eld
1432 \begin_inset Quotes erd
1436 \begin_inset Quotes eld
1440 \begin_inset Quotes erd
1443 fields for ISO-8859-X values different from ISO-8859-1, and search for
1444 one that contains the national characters of your language.
1445 If you find any, enter this encoding in the dialog.
1446 If not, go searching the Web for appropriate fonts.
1447 For the Qt frontend, it's recommended you use an iso646 font set.
1450 \begin_layout Standard
1451 When you've set LyX up to use a different font encoding, you should also
1452 consider changing the font used by dialog windows in LyX.
1459 dialog will not be understandable unless you tell LyX to use a different
1461 By default the menu font is set to
1463 -*-helvetica-medium-r
1465 , but often Helvetica is not available in the font encoding you need, so
1466 the dialog allows this to be changed.
1469 \begin_layout Standard
1470 As you can see, there are quite a few options that can be used to fine tune
1471 the look of your fonts.
1472 This should not scare you from fiddling with the settings, because after
1473 all, you will hopefully be using LyX for many hours in the future.
1474 And contrary to real WYSIWYG word processors where you are tied to using
1475 fonts that have to look good both on paper and on screen, LyX gives you
1476 the possibility of using fonts that are designed to look good on the screen
1477 while using a different set of fonts to look good on paper.
1480 \begin_layout Section
1482 \begin_inset LatexCommand label
1490 \begin_layout Standard
1491 Bindings are used to, well, bind a function to a key.
1492 Several prepackaged binding files are available: a CUA set of bindings
1493 (familiar as the typical set of PC and CDE set of keyboard shortcuts),
1494 an Emacs set of bindings, for those of us who follow the One True Way and
1495 refuse to lower our standards,
1499 \begin_layout Standard
1500 I'm kidding here, of course!
1505 as well as specialty bindings (broadway and hollywood) and other languages
1506 (French, German, etc.).
1509 \begin_layout Standard
1510 If, however, you'd like to customise the keybindings to your own exacting
1511 tastes, then copy the best-fit file in
1520 Don't forget to load this new file into LyX using the
1525 (For the moment you'll have to restart LyX for these changes to take effect.)
1528 \begin_layout Standard
1529 LyX supports internationalization of the user interface (see Chapter\InsetSpace ~
1531 \begin_inset LatexCommand ref
1532 reference "chap:i18n"
1541 is set, with the environment variable
1545 , LyX will try to use bindfiles by prepending
1550 For example, you can put a translated copy of some standard bind file in
1555 directory, and LyX will use it automatically.
1558 \begin_layout Standard
1563 files is straightforward:
1566 \begin_layout Standard
1571 bind <key combination> <lyx-function>
1574 \begin_layout Standard
1575 Both key combination and lyx-function (including any arguments) must be
1576 enclosed in "double quotes".
1577 All the LyX functions are listed in the
1584 \begin_layout Section
1586 \begin_inset LatexCommand label
1594 \begin_layout Standard
1595 The appearance of both the menu and toolbar may both be changed using the
1610 For the moment, only one file exists,
1614 , but feel free to experiment.
1615 Just copy the file to the
1619 directory and play! Note that, for the moment, you'll have to restart LyX
1620 for these changes to take effect.
1623 \begin_layout Standard
1628 files is straightforward: have a look at
1641 entries must be ended with an explicit
1666 s and in the case of the
1667 \begin_inset Quotes eld
1671 \begin_inset Quotes erd
1679 One small word of warning.
1684 s may be inserted in a
1692 , but they are defined as
1703 \begin_layout Section
1704 \begin_inset LatexCommand label
1705 name "sec:converters-etc"
1709 Converters, Formats, and Copiers
1712 \begin_layout Standard
1713 LyX has a powerful mechanism to convert to and from any file format using
1718 \begin_layout Subsection
1722 \begin_layout Standard
1723 The first step is to define your file formats if they are not already defined.
1726 Tools\SpecialChar \menuseparator
1727 Preferences:Converters
1730 Enter a new format name; a new GUI name (used in e.\InsetSpace \thinspace{}
1740 menus); and a file extension.
1745 \begin_layout Standard
1750 option tells LyX that a format is suitable for document export.
1751 If this is is set and if a suitable conversion route exists, the format
1754 File\SpecialChar \menuseparator
1758 The format will also appear in the
1762 menu if it has a specified viewer.
1763 Pure image formats, e.\InsetSpace \thinspace{}
1769 , should not use this option.
1770 Formats that can both represent vector graphics and documents like e.\InsetSpace \thinspace{}
1779 \begin_layout Standard
1782 Vector graphics format
1784 tells LyX that a format can contain vector graphics.
1785 This information is used to determine the target format of included graphics
1791 Included graphics may need to be converted to either
1807 cannot handle other image formats.
1808 If an included graphic is not already in
1820 format, it is converted to
1824 if the vector format option is set, and otherwise to
1831 \begin_layout Standard
1832 A Format can have a Viewer and Editor program associated with it.
1833 For example, you might want to use
1837 to view PostScript files.
1838 You can enter the program call and its options to the corresponding fields.
1839 For the call you can use the four variable listed in the next section.
1840 The viewer is launched when you view an image in LyX or use the
1845 If the operating system has a default viewer associated to a format, this
1846 viewer is used instead of the one defined here when you enter in the Viewer
1848 \begin_inset Quotes eld
1856 \begin_inset Quotes erd
1860 The editor is for example launched when you press the
1875 \begin_layout Subsection
1879 \begin_layout Standard
1880 Each format can have a Copier associated with it.
1881 These are defined in the
1883 Tools\SpecialChar \menuseparator
1887 Since all conversions from one format to another take place in LyX's temporary
1888 directory, it is sometimes necessary to modify a file before copying it
1889 to the temporary directory in order that the conversion may be performed.
1893 \begin_layout Standard
1894 For example, the file may refer to other files---images, for example---using
1895 relative filenames, and these may become invalid when the file is copied
1896 to the temporary directory.
1901 This is done by the Copier: It copies a file to (or from) the temporary
1902 directory and may modify it in the process.
1905 \begin_layout Standard
1906 Copiers may also be used for other purposes.
1907 For example, if appropriate converters are found, LyX will automatically
1908 install copiers for the
1918 When these formats are exported, the copier sees that not just the main
1919 HTML file but various associated files (style files, images, etc.) are also
1921 All these files are written to a subdirectory of the directory in which
1922 the original LyX file was found.
1925 \begin_layout Standard
1926 Copier can of course be customized.
1928 \begin_inset Quotes eld
1932 \begin_inset Quotes erd
1935 argument takes a comma-separated list of extensions to be copied; if it
1936 is omitted, all files will be copied.
1938 \begin_inset Quotes eld
1942 \begin_inset Quotes erd
1945 argument determines the extension added to the generated directory.
1947 \begin_inset Quotes eld
1955 \begin_inset Quotes erd
1958 , so HTML generated from
1960 /path/to/filename.lyx
1964 /path/to/filename.html.LyXconv
1970 \begin_layout Standard
1971 The definitions of the copiers may use four variables:
1975 \labelwidthstring 00.00.0000
1976 $$s The LyX system directory (e.\InsetSpace \thinspace{}
1986 \labelwidthstring 00.00.0000
1991 \labelwidthstring 00.00.0000
1996 \labelwidthstring 00.00.0000
1997 $$l The `LaTeX name'
2000 \begin_layout Standard
2001 The latter is to be given in a form suitable for inclusion in a LaTeX's
2008 command and is relevant only when exporting files suitable for such inclusion.
2011 \begin_layout Subsection
2015 \begin_layout Standard
2016 To define a new converter, select an existing one, select a different format
2022 and\InsetSpace \thinspace{}
2023 /\InsetSpace \thinspace{}
2029 drop-down list, modify the
2033 field, and press the
2040 \begin_layout Standard
2041 You do not have to define converters between all the formats between which
2042 you want to convert.
2043 For example, you will note that there is no `LyX to PostScript' converter,
2044 but LyX will export PostScript.
2045 It does so by first creating a LaTeX file (no converter needs to be defined
2046 for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2047 and finally converts the resulting DVI file to PostScript.
2048 LyX finds such `chains' of converters automatically, and it will always
2049 choose the shortest possible chain.
2050 You can, though, still define multiple conversion methods between file
2052 For example, the standard LyX configuration provides three ways to convert
2053 LaTeX to PDF: Directly, using
2057 ; via (DVI and) PostScript, using
2066 To define such alternate chains, you must define multiple target `file
2067 formats', as described in the next section.
2068 For example in the standard configuration the formats named
2080 are defined, all of which share the extension
2087 \begin_layout Standard
2088 Several variables can be used in the definition of converters:
2092 \labelwidthstring 00.00.0000
2093 $$s The LyX system directory
2097 \labelwidthstring 00.00.0000
2102 \labelwidthstring 00.00.0000
2107 \labelwidthstring 00.00.0000
2108 $$b The base filename of the input file
2112 \labelwidthstring 00.00.0000
2113 $$p The path to the input file
2116 \begin_layout Standard
2122 field you can enter the following flags, separated by commas:
2126 \labelwidthstring 00.00.0000
2127 latex This converter runs some form of LaTeX.
2128 This will make LyX's LaTeX error logs available.
2132 \labelwidthstring 00.00.0000
2133 needaux Needs the LaTeX
2137 file for the conversion.
2141 \labelwidthstring 00.00.0000
2145 \begin_layout Standard
2146 The following three flags are not really flags at all because they take
2157 \labelwidthstring 00.00.0000
2158 parselog If set, the converter's standard error will be redirected to a
2163 , and the script given as argument will be run as:
2165 script <infile.out >infile.log
2168 The argument may contain $$s.
2172 \labelwidthstring 00.00.0000
2173 resultdir The name of the directory in which the
2177 will dump the generated files.
2178 LyX will not create this directory, and it does not copy anything into
2179 it, though it will copy this directory to the destination.
2180 The argument may contain $$b, which will be replaced by the basename of
2181 the input and output files, respectively, when the directory is copied.
2184 that resultdir and usetempdir make no sense together.
2185 The latter will be ignored if the former is given.
2189 \labelwidthstring 00.00.0000
2190 resultfile Determines the output filename and may, contain $$b.
2191 Sensible only with resultdir, and optional even then; if not given, it
2192 defaults to `index'.
2195 \begin_layout Standard
2196 None of these last three are presently used in any of the converters that
2197 are installed with LyX.
2199 \begin_inset LatexCommand ref
2200 reference "sub:LyX-and-Literate"
2204 of the Extended Features guide for some examples of how you might use parselog.
2207 \begin_layout Section
2208 BibTeX and makeindex
2211 \begin_layout Standard
2212 Both the bibliography generating command (default
2216 ) and the index generating command (default
2229 As an alternative for
2241 \begin_layout Standard
2242 The command to enter is
2248 makeindex.sh -m $$lang
2251 \begin_layout Standard
2252 where the placeholder
2256 will be replaced by the chosen document (babel) language.
2260 \begin_layout Standard
2261 have installed the packages
2278 at a shell prompt for a help page.
2281 \begin_layout Section
2282 Plain text export options
2285 \begin_layout Standard
2286 \begin_inset VSpace bigskip
2292 \begin_layout Standard
2294 There are a couple of commands that can be used to
2295 \begin_inset Quotes eld
2299 \begin_inset Quotes erd
2302 exported plain text files.
2303 Note that LyX automatically detects and uses the best settings for your
2304 system at installation time, but you can modify them if you disagree with
2308 \begin_layout Description
2312 Plain text\InsetSpace ~
2316 This option defines the command used to produce better plain text tables
2321 UNIX-commands (refer to their manpages for more information about them).
2322 Setting this as empty tells LyX to use the internal (inferior) formatter.
2325 \begin_layout Description
2329 Plain text\InsetSpace ~
2334 With this command you can set the default line length of the plain text
2336 Setting it to 0 means endless lines.
2339 \begin_layout Section
2343 \begin_layout Standard
2344 There are a bunch of configuration options that are used for interaction
2345 with the external print command from LyX.
2346 Normally the defaults are fine: if, however, your print command takes different
2347 option names, you can modify them here.
2350 \begin_layout Subsection
2354 \begin_layout Standard
2355 You can change the colors used by LyX on-screen using the new
2360 Alternatively, if you're feeling particularly perverse you could use the
2365 bindable function (see the
2370 Input would have the format:
2373 \begin_layout Standard
2376 set-color LyXName X11Color
2379 \begin_layout Standard
2380 Here is a (partial) list of the functions and default colors:
2383 \begin_layout Standard
2385 \begin_inset Tabular
2386 <lyxtabular version="3" rows="10" columns="3">
2388 <column alignment="left" valignment="top" leftline="true" width="0pt">
2389 <column alignment="left" valignment="top" leftline="true" width="0pt">
2390 <column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
2391 <row topline="true" bottomline="true">
2392 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2395 \begin_layout Standard
2410 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2413 \begin_layout Standard
2428 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2431 \begin_layout Standard
2447 <row topline="true">
2448 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2451 \begin_layout Standard
2466 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2469 \begin_layout Standard
2484 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2487 \begin_layout Standard
2503 <row topline="true">
2504 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2507 \begin_layout Standard
2522 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2525 \begin_layout Standard
2540 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2543 \begin_layout Standard
2559 <row topline="true">
2560 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2563 \begin_layout Standard
2578 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2581 \begin_layout Standard
2596 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2599 \begin_layout Standard
2615 <row topline="true">
2616 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2619 \begin_layout Standard
2634 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2637 \begin_layout Standard
2652 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2655 \begin_layout Standard
2671 <row topline="true">
2672 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2675 \begin_layout Standard
2690 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2693 \begin_layout Standard
2703 fraction Lines, brackets, etc.
2708 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2711 \begin_layout Standard
2727 <row topline="true">
2728 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2731 \begin_layout Standard
2746 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2749 \begin_layout Standard
2755 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2758 \begin_layout Standard
2774 <row topline="true">
2775 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2778 \begin_layout Standard
2793 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2796 \begin_layout Standard
2802 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2805 \begin_layout Standard
2821 <row topline="true">
2822 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2825 \begin_layout Standard
2840 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2843 \begin_layout Standard
2849 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2852 \begin_layout Standard
2868 <row topline="true" bottomline="true">
2869 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2872 \begin_layout Standard
2887 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2890 \begin_layout Standard
2900 selection background
2905 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2908 \begin_layout Standard
2931 \begin_layout Section
2932 The autodetected settings
2935 \begin_layout Standard
2936 \begin_inset LatexCommand label
2937 name "sec:autodetected"
2941 There are several items that are detected for you when you run
2948 \SpecialChar \menuseparator
2954 In this section, we list those which pertain to the user preferences.
2957 \begin_layout Description
2963 plaintext_roff_command
2978 , depending on what is available.
2981 \begin_layout Description
2994 plus a bunch of options.
2997 \begin_layout Description
3010 on systems (so-called System V) who have this command, and
3014 otherwise (BSD systems).
3017 \begin_layout Description
3023 print_spool_printerprefix
3034 , depending on whether
3045 \begin_layout Description
3062 fonts are found and LaTeX has support for these fonts built-in.
3063 You can set it manually if you only have the so-called
3070 \begin_layout Section
3074 \begin_layout Standard
3075 There are many other configuration options that can be used to customize
3077 We still need to document them here, but again, most should be fairly obvious.
3078 Please ask on the mailing lists if you need some more information; it may
3079 even prompt us to expand this section.
3082 \begin_layout Chapter
3083 Internationalizing LyX
3084 \begin_inset LatexCommand label
3092 \begin_layout Standard
3093 LyX supports using a translated interface.
3094 Last time we checked, LyX provided text in 14 languages together with the
3095 default English text.
3096 The language of choice is called your
3101 (For further reading on locale settings, see also the documentation for
3102 locale that comes with your operating system.
3103 For Linux, the manual page for locale(5) could be a good place to start).
3106 \begin_layout Standard
3107 Notice that these translations will work, but do contain a few flaws.
3108 In particular, all dialogs have been designed with the English text in
3109 mind, which means that some of the translated text will be too large to
3110 fit within the space allocated.
3111 This is only a display problem and will not cause any harm.
3112 Also, you will find that some of the translations do not define short-cut
3113 keys for everything.
3114 Sometimes, there are simply not enough free letters to do it.
3115 Other times, the translator just hasn't got around to doing it yet.
3116 Our localization team -- which you may wish to join -- will try to fix
3117 these shortcomings in future versions of LyX.
3120 \begin_layout Section
3121 Selecting an alternative language for the user interface
3124 \begin_layout Standard
3125 This feature is disabled by default, meaning that system default language
3127 To enable an alternative language, you have to set an appropriate environment
3135 for csh class shells
3150 with the two letter code (or four letter code, like
3154 for British English) for the language you want.
3160 Besides the user interface texts being translated, also the appropriate
3161 manuals will be presented under the Help menu -- if available.
3164 \begin_layout Standard
3165 On some systems, you may have to redefine
3177 , to override the system settings; their preference is in this order
3181 \begin_layout Standard
3182 The shell variable LANGUAGE has been disabled in LyX for technical reasons.
3188 , which corresponds to the way GNU
3193 Consult your system documentation.
3194 Normally, you'll want to put the appropriate line in a shell script run
3195 on start-up, so that the translation is on by default.
3196 Remember that this affects
3200 localized packages, not only LyX!
3203 \begin_layout Standard
3204 If LyX is configured and compiled with
3205 \begin_inset Quotes eld
3213 \begin_inset Quotes erd
3216 , this mechanism will not work.
3219 \begin_layout Section
3223 \begin_layout Subsection
3224 Translating the graphical user interface (text messages).
3227 \begin_layout Standard
3232 library to handle the internationalization of the interface.
3233 To have LyX speak your favorite language in all menus and dialogs, you
3238 -file for that language.
3239 When this is available, you'll have to generate a mo-file from it and install
3245 The process of doing all of this is explained in the documentation for
3250 , but in short, this is what you do (
3254 denotes the language code):
3257 \begin_layout Standard
3261 \begin_layout Standard
3273 \begin_layout Itemize
3276 LYX-SOURCE-DIR/po/lyx.pot
3289 doesn't exist, it can be remade with
3293 in that directory, or you can use an existing po-file for some other language
3297 \begin_layout Itemize
3304 \begin_layout Standard
3305 We recommend that you use Emacs to do this, since the
3309 distribution includes a nice mode that supports you in doing this.
3317 For some menu- and widget-labels, there are also shortcut keys that should
3319 Those keys are marked after a `|', and should be translated according to
3320 the words and phrases of the
3325 There is a tool named
3329 written in Prolog in
3331 LYX-SOURCE-DIR/development/tools/
3333 that may be useful to help determine short-cut keys.
3334 Note that XForms (version 0.86 at least) can't handle anything but 7-bit
3335 characters as shortcut keys.
3336 You should also fill also out the information at the beginning of the new
3341 -file with your email-address, etc., so people know where to reach you with
3342 suggestions and entertaining flames.
3345 \begin_layout Itemize
3354 This can be done with
3375 \begin_layout Itemize
3380 -file to your locale-tree, at the correct directory for application messages
3385 , and under the name
3394 /usr/local/share/locale/
3405 \begin_layout Standard
3409 \begin_layout Standard
3421 \begin_layout Standard
3422 Adding a new po-file to the
3426 of LyX involves altering the configure scripts and more, but the way
3430 works, you don't actually need the source-code of LyX to translate it---having
3446 \begin_layout Standard
3447 If you've written a translation file for a language that LyX does not currently
3448 support, feel free to submit it for inclusion by sending a patch.
3449 In this case, we recommend that you read the
3457 directory for more instructions.
3460 \begin_layout Subsubsection
3464 \begin_layout Standard
3465 Sometimes it turns out that one english message needs to be translated into
3466 different messages in the target language.
3467 One example is the message
3471 which has the german translation
3488 does not handle such ambigous translations.
3489 Therefore you have to add some context information to the message: Instead
3496 To[[as in 'From format x to format y']]
3500 To[[as in 'From page x to page y']].
3503 Now the two occurences of
3511 and can be translated correctly to
3526 \begin_layout Standard
3527 Of course the context information needs to be stripped off the original
3528 message when no translation is used.
3529 Therefore you have to put it in double square brackets at the end of the
3530 message (see the example above).
3531 The translation mechanism of LyX ensures that everything in double square
3532 brackets at the end of messages is removed before displaying the message.
3535 \begin_layout Subsection
3536 Translating the documentation.
3539 \begin_layout Standard
3540 The online documentation (in the
3547 -menu) can (and should!) be translated.
3548 If there are translated versions of the documentation available
3552 \begin_layout Standard
3553 As of February 2003, almost all of the docs have been translated into German
3559 has been translated into at least 12 other languages, with other translations
3561 The library of translated documents is growing rapidly.
3566 , and the locale is set accordingly, these will be used automagically by
3568 LyX looks for translated versions as
3582 denotes the language as set by the environmental variable
3587 If there are none, the default English versions will be displayed.
3588 Note that the translated versions must have the same filenames (
3592 above) as the original.
3593 If you feel up to translating the documentation (an excellent way to proof-read
3594 the original documentation BTW!), there are a few things you should do
3598 \begin_layout Itemize
3603 , the guide to writing LyX documentation.
3604 Pay special attention to the translator's section.
3607 \begin_layout Itemize
3608 Check out the documentation translation web page at
3609 \begin_inset LatexCommand url
3610 name "The LyX Developer's Web Site"
3611 target "http://www.devel.lyx.org"
3616 That way, you can find out which (if any) documents have already been translate
3617 d into your language.
3618 You can also find out who (if anyone) is organizing the effort to translate
3619 the documentation into your language.
3620 If no one is organizing the effort, please let us know that you're interested.
3623 \begin_layout Standard
3624 Once you get to actually translating, here's a few hints for you that may
3628 \begin_layout Itemize
3629 Join the documentation team! There is information on how to do that in
3638 elp\SpecialChar \menuseparator
3645 ), which by the way is the first document you should translate.
3648 \begin_layout Itemize
3649 Learn the typographic conventions for the language you are translating to.
3650 Typography is an ancient art and over the centuries, a great variety of
3651 conventions have developed throughout different parts of the world.
3652 Also study the professional terminology amongst typographers in your country.
3653 Inventing your own terminology will only confuse the users.
3656 (Warning! Typography is addictive!)
3659 \begin_layout Itemize
3660 Make a copy of the document.
3661 This will be your working copy.
3662 You can use this as your personal translated help-file by placing it in
3670 \begin_layout Itemize
3671 Sometimes the original document (from the LyX-team) will be updated.
3672 Use the ViewCVS tool available at
3673 \begin_inset LatexCommand htmlurl
3674 target "http://www.lyx.org/viewcvs.cgi/lyxdoc/"
3678 to see what has been changed
3682 \begin_layout Standard
3683 Alternatively, you can keep a copy of the latest version of the English
3684 document which you've translated.
3690 That way you can easily see which parts of the translated document need
3694 \begin_layout Itemize
3695 If you ever find an error in the original document, fix it and notify the
3696 rest of the documentation team of the changes! (You didn't forget to join
3697 the documentation team did you?)
3700 \begin_layout Section
3701 International Keyboard Support
3704 \begin_layout Standard
3707 [Editor's Note: The following section is by
3715 It needs to be fixed to conform to the new Documentation Style sheet and
3716 to make use of the new v1.0 features.
3717 The whole thing also needs to be merged with the section following it.-jw]
3720 \begin_layout Subsection
3721 Defining Own Keymaps: Keymap File Format
3724 \begin_layout Standard
3725 Let's look at a keyboard definition file a little closer.
3726 It is a plain text file defining
3729 \begin_layout Itemize
3730 key-to-key or key-to-string translations
3733 \begin_layout Itemize
3737 \begin_layout Itemize
3738 dead keys exceptions
3741 \begin_layout Standard
3742 To define key-to-key or key-to-string translation, use this command:
3745 \begin_layout Quotation
3761 \begin_layout Standard
3766 is the key to be translated and
3770 is the string to be inserted into the document.
3771 To define dead keys, use:
3774 \begin_layout Quotation
3790 \begin_layout Standard
3800 The following dead keys are supported (shortcut name is in parentheses):
3803 \begin_layout Quotation
3811 \begin_layout Quotation
3817 \begin_layout Quotation
3823 \begin_layout Quotation
3829 \begin_layout Quotation
3835 \begin_layout Quotation
3842 \begin_layout Standard
3854 \begin_layout Quotation
3860 \begin_layout Quotation
3867 \begin_layout Standard
3879 \begin_layout Quotation
3885 \begin_layout Quotation
3891 \begin_layout Quotation
3898 \begin_layout Standard
3910 \begin_layout Quotation
3917 \begin_layout Standard
3929 \begin_layout Quotation
3935 \begin_layout Quotation
3936 hungarian umlaut (hug)
3941 \begin_layout Quotation
3947 \begin_layout Quotation
3954 \begin_layout Standard
3966 \begin_layout Standard
3967 Since in many international keyboards there are exceptions to what some
3968 dead keys should do, you can define them using
3971 \begin_layout Quotation
3980 deadkey key outstring
3983 \begin_layout Standard
3984 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3988 \begin_layout Quotation
4002 \begin_layout Standard
4003 to make it work correctly.
4004 Also, you have to define as exceptions dead keys over i and j, to remove
4005 the dot from them before inserting an accent mark.
4006 I will change this when the time comes, but so far I haven't had time.
4009 \begin_layout Standard
4010 Oh, and about characters: backslash is escaped, so to enter it, you'll need
4016 have different meaning.
4021 marks comments, quotes start and end LaTeX-style commands.
4022 To enter quote, you'll need to use
4041 \begin_layout Standard
4042 If you make a keyboard description file that works for your language, please
4043 mail it to me, so I can include it in the next keymap distribution.
4046 \begin_layout Standard
4047 More keywords will be supported in keymap configuration file in future,
4051 \begin_layout Itemize
4069 \begin_layout Itemize
4084 an external keymap translation program
4087 \begin_layout Standard
4088 Also, it should look into
4092 file for defaults, too (for example, a
4098 option to include default keyboard).
4101 \begin_layout Section
4102 International Keymap Stuff
4103 \begin_inset LatexCommand label
4111 \begin_layout Standard
4112 The next two sections describe the
4124 file syntax in detail.
4125 These sections should help you design your own key map if the ones provided
4126 do not meet your needs.
4129 \begin_layout Subsection
4133 \begin_layout Standard
4142 file maps keystrokes to characters or strings.
4143 As the name suggests it sets a keyboard mapping.
4168 are described in this section.
4172 \labelwidthstring 00.00.0000
4179 Map a character to a string
4182 \begin_layout LyX-Code
4197 \begin_layout Standard
4230 the double-quote (")
4247 must be escaped with a preceding backslash (
4258 \begin_layout Standard
4265 statement to cause the symbol
4271 to be output for the keystroke
4280 \begin_layout LyX-Code
4287 \labelwidthstring 00.00.0000
4294 Specify an accent character
4297 \begin_layout LyX-Code
4306 \begin_layout Standard
4307 This will make the cha
4345 This is the dead key
4349 \begin_layout Standard
4356 refers to a key that does not produce a character by itself, but when followed
4357 with another key, produces the desired accent character.
4358 For example, a German characte
4360 r with an umlaut like
4370 can be produced in this manner.
4379 \begin_layout Standard
4392 and then another key not in
4409 followed by the other, unallowed key, as output.
4418 cancels a dead key, so if
4435 , the cursor will not go one position backwards but will instead cancel
4452 might have had on the next keystroke.
4456 \begin_layout Standard
4457 The following example specifies that the character ' is to be an acute accent,
4458 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4461 \begin_layout LyX-Code
4464 kmod ' acute aeiouAEIOU
4468 \labelwidthstring 00.00.0000
4473 Specify an exception to the accent character
4476 \begin_layout LyX-Code
4485 \begin_layout Standard
4486 This defines an exce
4527 have been assigned a keystroke with a previous
4550 must not belong in the
4602 If such a declaration does not exist in
4658 \begin_layout Standard
4659 The following command produces causes äi to be produced when you enter acute-i
4663 \begin_layout LyX-Code
4678 \labelwidthstring 00.00.0000
4683 Combine two accent characters
4686 \begin_layout LyX-Code
4692 accent1 accent2 allowed
4695 \begin_layout Standard
4696 This one is getting pretty esoteric.
4697 It allows you to combine the effect
4778 \begin_layout Standard
4779 Consider this example from the
4788 \begin_layout LyX-Code
4791 kmod ; acute aeioyvhAEIOYVH
4795 kcomb acute umlaut iyIY
4798 \begin_layout Standard
4799 This allows you to press
4805 and get the effect of
4822 in this case cancels the last dead key, so if you press
4839 \begin_layout Subsection
4843 \begin_layout Standard
4850 mapping is performed, a
4857 file maps the strings that the symbols generate to characters in the current
4859 The LyX distribution currently includes at least the
4874 \begin_layout Standard
4881 file is a sequence of declarations of the form
4884 \begin_layout LyX-Code
4897 \begin_layout Standard
4898 For example, in order to map
4906 to the corresponding character in the iso-8859-1 set (233), the following
4910 \begin_layout LyX-Code
4918 \begin_layout Standard
4941 the same character can apply to more than one string.
4952 \begin_layout LyX-Code
4978 \begin_layout Standard
4979 If LyX cannot find a mapping for the string produced by the keystroke or
4980 a deadkey sequence, it will check if it looks like an accented char and
4981 try to draw an accent over the character on screen.
4984 \begin_layout Subsection
4988 \begin_layout Standard
4989 There is a second way to add support for international characters through
4990 so-called dead-keys.
4991 A dead-key works in combination with a letter to produce an accented character.
4992 Here, we'll explain how to create a really simple dead-key to illustrate
4996 \begin_layout Standard
4997 Suppose you happen to need the circumflex character,
4998 \begin_inset Quotes eld
5002 \begin_inset Quotes erd
5010 -key [a.k.a.\InsetSpace ~
5015 ] to the LyX command
5024 Now, whenever you type the
5028 -key followed by a letter, that letter will have a circumflex accent on
5030 For example, the sequence
5031 \begin_inset Quotes eld
5039 \begin_inset Quotes erd
5042 produces the letter:
5043 \begin_inset Quotes eld
5047 \begin_inset Quotes erd
5051 If you tried to type
5052 \begin_inset Quotes eld
5060 \begin_inset Quotes erd
5063 , however, LyX will complain with a beep, since a
5064 \begin_inset Quotes eld
5072 \begin_inset Quotes erd
5075 never takes a circumflex accent.
5080 after a dead-key produces the bare-accent.
5081 Please note this last point! If you bind a key to a dead-key, you'll need
5082 to rebind the character on that key to yet another key.
5087 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5090 \begin_layout Standard
5091 One common way to bind dead-keys is to use
5103 in combination with an accent, like
5104 \begin_inset Quotes eld
5112 \begin_inset Quotes erd
5116 \begin_inset Quotes eld
5124 \begin_inset Quotes erd
5128 \begin_inset Quotes eld
5136 \begin_inset Quotes erd
5140 Another way involves using
5148 [remember them from section?] to set up the special
5157 acts in some ways just like
5161 and permits you to bind keys to accented characters.
5162 You can also turn keys into dead-keys by binding them to something like
5167 and then binding this symbolic key to the corresponding LyX command.
5171 \begin_layout Standard
5176 : This is exactly what I do in my
5194 and a bunch of these
5195 \begin_inset Quotes eld
5203 \begin_inset Quotes erd
5206 symbolic keys bound such things as
5217 This is how I produce my accented characters.
5222 You can make just about anything into the
5230 keys, a spare function key, etc.
5231 As for the LyX commands that produce accents, check the entry for
5240 You'll find the complete list there.
5243 \begin_layout Subsection
5244 Saving your Language Configuration
5247 \begin_layout Standard
5248 \begin_inset LatexCommand label
5253 You can edit your preferences so that your desired language environment
5254 is automatically configured when LyX starts up, via the
5259 dit\SpecialChar \menuseparator
5269 \begin_layout Chapter
5270 Installing New Document Classes, Layouts, and Templates
5271 \begin_inset LatexCommand label
5272 name "chap:textclass"
5280 \begin_layout Standard
5281 Installing New Document Classes
5289 \begin_layout Standard
5290 In this chapter, we describe the procedures for creating and installing
5291 new LyX layout and template files, as well as offer a refresher on correctly
5292 installing new LaTeX document classes.
5293 Some definitions: a document class is a LaTeX file (usually ending in
5301 ) which describes the format of a document such as an article, report, journal
5303 and all the commands needed to realize that format.
5304 A layout file is a LyX file which corresponds to a LaTeX document class
5305 and which tells LyX how to
5306 \begin_inset Quotes eld
5310 \begin_inset Quotes erd
5313 things on the screen to make the display look something like the final
5315 More precisely, a layout file describes a
5316 \begin_inset Quotes eld
5320 \begin_inset Quotes erd
5323 which is the internal construct LyX uses to render the screen display.
5325 \begin_inset Quotes eld
5329 \begin_inset Quotes erd
5333 \begin_inset Quotes eld
5337 \begin_inset Quotes erd
5340 can be used somewhat interchangeably, but it is better to refer to the
5341 file as the layout, and the thing living in LyX's memory as the text class.
5342 A template file is simply a LyX document which contains a set of predefined
5343 entries for a given document class which are generally required for that
5345 Templates are especially useful for things like journal manuscripts which
5346 are to be submitted electronically.
5349 \begin_layout Section
5350 Installing a new LaTeX package
5353 \begin_layout Standard
5354 Some installations may not include a LaTeX package that you would like to
5356 For example, you might need FoilTeX, a common (and very powerful) package
5357 for preparing slides or viewgraphs for overhead projectors.
5358 Here are the formal steps involved in getting the package up and running
5359 if you are using teTeX or some other web2c based distribution.
5363 \begin_layout Enumerate
5364 Get the package from CTAN or wherever.
5368 \begin_layout Standard
5371 Inventory of your LaTeX configuration
5373 manual for details of what CTAN is and where supported document classes
5382 \begin_layout Enumerate
5387 (this usually lives in the directory
5391 , though you can run
5396 It describes how to add a local
5400 directory; follow the instructions.
5401 You need to insert the name of your local
5414 is a logical place to install software that did not come with your distribution
5420 Usually, you will have to modify only two things:
5424 \begin_layout Enumerate
5429 to the directory you chose; e.g.
5434 TEXMFLOCAL = /usr/local/texmf
5437 \begin_layout Enumerate
5451 TEXMF = {$HOMETEXMF,!!$TEXMFLOCAL,!!$TEXMFMAIN}
5455 \begin_layout Enumerate
5466 You must follow the directory structure of your existing
5470 directory (for example, latex packages should go under
5472 /usr/local/texmf/tex/latex/
5477 \begin_layout Enumerate
5478 Install the package.
5479 For example, you would unpack the FoilTeX tarball and create
5481 /usr/local/texmf/tex/latex/foiltex
5488 directory contains various files.
5491 \begin_layout Enumerate
5499 /usr/local/texmf/ls-R
5504 \begin_layout Enumerate
5505 From within LyX, do:
5510 ools\SpecialChar \menuseparator
5521 \begin_layout Standard
5522 Now you should see your new package---for example
5531 ayout\SpecialChar \menuseparator
5546 Note that there are simpler ways of installing packages: you can add a
5547 link to the new package directory in the system LaTeX directory (
5551 , don't forget to then run
5555 ), or sometimes simply set the
5559 environment variable to include the new package.
5560 However, the formal procedure described in
5564 is guaranteed to work, so you should follow it unless circumstances absolutely
5565 prevent it: such as, when you don't have superuser access.
5568 \begin_layout Section
5569 \begin_inset LatexCommand label
5577 \begin_layout Standard
5578 This section describes how to write and install your own LyX layout files
5579 (also known as text classes) and walks through the
5583 text class format as an example.
5588 files describe what paragraph styles are available for a given document
5589 class and how LyX should display them.
5590 We try to provide a thorough description of the process here; however,
5591 there are so many different types of documents supported by LaTeX classes
5592 that we can't hope to cover every different possibility or problem you
5594 (The LyX users' list is frequented by people with lots of experience with
5595 layout design who are willing to share what they've learned.)
5598 \begin_layout Standard
5599 As you prepare to write a new layout, it is extremely helpful to look at
5600 the example layouts distributed with LyX.
5601 If you use a nice LaTeX document class that might be of interest for others,
5602 too, and have a nice corresponding LyX layout, feel free to contribute
5603 the stuff to us, so we may put it into the distribution.
5604 There is also a section on the LyX wiki for this kind of material.
5607 \begin_layout Standard
5608 All the tags described in this chapter are case-insensitive; this means
5621 are really the same command.
5622 The possible values are printed in brackets after the feature's name.
5623 The default value if a feature isn't specified inside a text class-description
5631 If the argument has a datatype like
5632 \begin_inset Quotes eld
5636 \begin_inset Quotes erd
5640 \begin_inset Quotes eld
5644 \begin_inset Quotes erd
5647 , the default is shown like this:
5657 \begin_layout Subsection
5661 \begin_layout Standard
5662 Similar to layout files, and new with LyX 1.6, are layout
5667 Modules are to LaTeX packages much as layouts are to LaTeX classes, and
5668 some modules---such as the URL module---provide support for just such a
5670 In a sense, layout modules are similar to included files---files like stdsectio
5671 ns.inc---in that modules are not specific to a given document layout but
5672 may be used with many different layouts.
5673 The difference is that using a layout module does not require editing the
5675 Rather, modules are selected in the
5680 ocument\SpecialChar \menuseparator
5690 \begin_layout Standard
5691 Building modules is the easiest way to get started with layout editing,
5692 since it can be as simple as adding a single new paragraph or flex inset.
5693 But modules may, in principle, contain anything a layout file can contain.
5696 \begin_layout Standard
5697 A module must begin with a line like the following:
5700 \begin_layout LyX-Code
5703 DeclareLyXModule[url.sty]{Adds a character style for the
5708 \begin_layout Standard
5709 The argument in square brackets is optional: It declares any LaTeX packages
5710 on which the module depends.
5711 The two mandatory arguments, in curly brackets, are a short description
5712 of the module and the name of the module, as they should appear in
5714 Document\SpecialChar \menuseparator
5721 \begin_layout Standard
5722 After creating a new module, you will need to reconfigure and then restart
5723 LyX for it to appear in the menu.
5724 However, changes you make to the module will be seen immediately, if you
5727 Document\SpecialChar \menuseparator
5730 , make some change (or even just highlight something), and then hit
5731 \begin_inset Quotes eld
5735 \begin_inset Quotes erd
5739 It is strongly recommended that you save your work before doing so.
5740 It is, in fact, strongly recommended that you not attempt to create or
5741 edit modules while simultaneously working on documents.
5742 Though of course the developers strive to keep LyX stable in such situations,
5743 syntax errors and the like in your module file could cause strange behavior.
5746 \begin_layout Subsection
5747 Supporting new document classes
5750 \begin_layout Standard
5751 There are two situations you are likely to encounter when wanting to support
5752 a new LaTeX document class, involving LaTeX2e class (
5761 Supporting a style file is usually fairly easy.
5762 Supporting a new document class is a bit harder.
5765 \begin_layout Subsection
5773 \begin_layout Standard
5774 If your new document class is provided as a style file that is used in conjuncti
5775 on with an existing, supported document class---for the sake of the example,
5776 we'll assume that the style file is called
5780 and it is meant to be used with
5784 , which is a standard class---start by copying the existing class's layout
5785 file into your local directory:
5788 \begin_layout LyX-Code
5789 cp report.layout ~/.lyx/layouts/myclass.layout
5792 \begin_layout Standard
5797 and change the line:
5800 \begin_layout LyX-Code
5803 DeclareLaTeXClass{report}
5806 \begin_layout Standard
5810 \begin_layout LyX-Code
5813 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
5816 \begin_layout Standard
5820 \begin_layout LyX-Code
5830 \begin_layout Standard
5831 near the top of the file.
5834 \begin_layout Standard
5835 Start LyX and select
5840 ools\SpecialChar \menuseparator
5848 Then restart LyX and try creating a new document.
5853 " as a document class option in the
5858 ocument\SpecialChar \menuseparator
5866 It is likely that some of the sectioning commands and such in your new
5867 class will work differently from how they worked in the base class---
5871 in this example---so you can fiddle around with the settings for the different
5872 sections if you wish.
5873 See below for more discussion on this.
5876 \begin_layout Subsection
5884 \begin_layout Standard
5885 There are two possibilities here.
5886 One is that the class file is itself based upon an existing document class.
5887 For example, many thesis classes are based upon
5892 To see whether yours is, look for a line like
5895 \begin_layout LyX-Code
5901 \begin_layout Standard
5903 If so, then you may proceed largely as in the previous section, though
5904 the DeclareLaTeXClass line will be different.
5905 If your new class is thesis, and it is based upon book, then the line should
5909 \begin_layout LyX-Code
5912 DeclareLaTeXClass[myclass, book]{thesis}
5915 \begin_layout Standard
5916 If, on the other hand, the new class is not based upon an existing class,
5917 you will probably have to
5918 \begin_inset Quotes eld
5922 \begin_inset Quotes erd
5926 We strongly suggest copying an existing layout file which uses a similar
5927 LaTeX class and then modifying it, if you can do so.
5928 At least use an existing file as a starting point so you can find out what
5929 items you need to worry about.
5930 Again, the specifics are covered below.
5933 \begin_layout Section
5934 Declaring a new text class
5937 \begin_layout Standard
5938 When it's finally time to get your hands dirty and create or edit your own
5939 layout file, the following sections describe what you're up against.
5940 Our advice is to go slowly, save and test often, listen to soothing music,
5941 and enjoy one or two of your favorite adult beverages; more if you are
5942 getting particularly stuck.
5943 It's really not that hard, except that the multitude of options can become
5944 overwhelming if you try to do to much in one sitting.
5945 Go have another adult beverage, just for good measure.
5948 \begin_layout Standard
5952 \begin_layout Standard
5953 Lines in a layout file which begin with a
5958 There is one exception to this rule: all layouts should begin with lines
5962 \begin_layout LyX-Code
5965 #% Do not delete the line below; configure depends on this
5968 \begin_layout LyX-Code
5973 DeclareLaTeXClass{article}
5976 \begin_layout Standard
5977 The second line is used when you configure LyX.
5978 The layout file is read by the LaTeX script
5982 , in a special mode where
5987 The first line is just a LaTeX comment, and the second one contains the
5988 declaration of the text class.
5989 If these lines appear in a file named
5993 , then they define a text class of name
5997 (the name of the layout file) which uses the LaTeX document class
6001 (the default is to use the same name as the layout).
6003 \begin_inset Quotes eld
6007 \begin_inset Quotes erd
6010 that appears above is used as a description of the text class in the
6015 ocument\SpecialChar \menuseparator
6025 \begin_layout Standard
6026 Let's assume that you wrote your own text class that uses the
6030 documentclass, but where you changed the appearance of the section headings.
6031 If you put it in a file
6035 , the header of this file should be:
6038 \begin_layout LyX-Code
6041 #% Do not delete the line below; configure depends on this
6044 \begin_layout LyX-Code
6049 DeclareLaTeXClass[article]{article (with my own headings)}
6052 \begin_layout Standard
6053 This declares a text class
6057 , associated with the LaTeX document class
6062 \begin_inset Quotes eld
6065 article (with my own headings)
6066 \begin_inset Quotes erd
6070 If your text class depends on several packages, you can declare it as:
6073 \begin_layout LyX-Code
6076 #% Do not delete the line below; configure depends on this
6079 \begin_layout LyX-Code
6084 DeclareLaTeXClass[article,foo.sty]{article (with my own headings)}
6087 \begin_layout Standard
6088 This indicates that your text class uses the foo.sty package.
6089 Finally, it is also possible to declare classes for DocBook code.
6090 Typical declarations will look like
6093 \begin_layout LyX-Code
6096 #% Do not delete the line below; configure depends on this
6099 \begin_layout LyX-Code
6104 DeclareDocBookClass[article]{SGML (DocBook article)}
6107 \begin_layout Standard
6108 Note that these declarations can also be given an optional parameter declaring
6109 the name of the document class (but not a list).
6112 \begin_layout Standard
6113 When the text class has been modified to your taste, all you have to do
6114 is to copy it either in
6127 ools\SpecialChar \menuseparator
6135 Exit LyX and restart it; then your new text class should be available along
6139 \begin_layout Standard
6140 In versions of LyX prior to 1.6, you had to restart LyX to see any changes
6141 you made to your layout files.
6142 As a result, editing layout files could be very time consuming.
6143 Beginning with 1.6, however, you can force a reload of the layout currently
6144 in use by using the LyX function
6149 There is no default binding for this function---though, of course, you
6150 can bind it to a key yourself (see section
6151 \begin_inset LatexCommand ref
6152 reference "sec:bindings"
6157 You should simply enter this command in the mini-buffer.
6162 : This is very much an `advanced feature'.
6167 recommended that you save your work before using this function.
6172 recommended that you not attempt to edit your layout while simultaneously
6173 working on a document that you care about.
6174 Use a test document.
6175 Syntax errors and the like in your layout file could cause peculiar behavior.
6176 In particular, such errors could cause LyX to regard the current layout
6177 as invalid and to attempt to switch to some other layout.
6178 The LyX team strives to keep LyX stable in such situations, but safe is
6182 \begin_layout Subsection
6186 \begin_layout Standard
6187 The first non-comment line must contain the file format number:
6190 \begin_layout Description
6201 ] This tag was introduced with LyX 1.4.0 (layout files of LyX 1.3.x and earlier
6202 don't have an explicit file format).
6203 The file format that is documented here is
6210 \begin_layout Subsection
6211 General text class parameters
6214 \begin_layout Standard
6215 These are the general parameters which describe the form of the entire document:
6218 \begin_layout Standard
6222 \begin_layout Standard
6234 \begin_layout Description
6248 ] Whether the class-default should have one or two columns.
6249 Can be changed in the
6254 ocument\SpecialChar \menuseparator
6262 This setting (same goes for
6266 , too) is important: if your text class has two columns by default but you
6267 forget to set it correctly, the
6275 be output when you select
6284 ocument\SpecialChar \menuseparator
6292 \begin_layout Description
6306 ] Whether the class-default should be printing on one or both sides of the
6308 Can be changed in the
6313 ocument\SpecialChar \menuseparator
6323 \begin_layout Description
6337 ] The class default pagestyle.
6338 Can be changed in the
6343 ocument\SpecialChar \menuseparator
6353 \begin_layout Description
6357 ClassOptions\SpecialChar \ldots{}
6361 This section describes various global options supported by the document
6363 See Section\InsetSpace ~
6365 \begin_inset LatexCommand ref
6366 reference "sec:classoptions"
6373 \begin_layout Description
6391 ] Whether the class already provides the feature
6396 A feature is in general the name of a package (amsmath, makeidx, \SpecialChar \ldots{}
6398 macro (url, boldsymbol,\SpecialChar \ldots{}
6399 ); the complete list of supported features is unfortunat
6403 \begin_layout Description
6410 This is used to describe the default font of the document.
6411 See Section\InsetSpace ~
6413 \begin_inset LatexCommand ref
6414 reference "sec:fonts"
6421 \begin_layout Description
6432 ] This is the style that will be assigned to new paragraphs, usually
6437 This will default to the first defined style if not given, but you are
6438 highly encouraged to use this directive.
6441 \begin_layout Description
6458 ] Indicates what kind of markup is used to define the title of a document.
6463 means that the macro with name
6467 will be inserted after the last layout which has
6468 \begin_inset Quotes eld
6476 \begin_inset Quotes erd
6484 corresponds to the case where the block of paragraphs which have
6485 \begin_inset Quotes eld
6493 \begin_inset Quotes erd
6496 should be enclosed into the
6505 \begin_layout Description
6516 ] The name of the command/environment mentionned above.
6519 \begin_layout Description
6523 Preamble\SpecialChar \ldots{}
6527 A set of macro definitions that will be output at the beginning of the
6529 Use this for global definitions.
6532 \begin_layout Description
6539 As its name implies, this command allows you to include another layout
6540 definition file within yours to avoid duplicating commands.
6541 Common examples are the standard layout files, for example,
6545 , which contains most of the basic layouts.
6548 \begin_layout Description
6552 Style\SpecialChar \ldots{}
6556 This sequence defines a new style.
6557 If the style already exists, it will redefine some of its parameters instead.
6558 See Section\InsetSpace ~
6560 \begin_inset LatexCommand ref
6561 reference "sec:style"
6568 \begin_layout Description
6575 This command deletes an existing style.
6576 This is particularly useful when you want to suppress a style that has
6577 be defined in an input file.
6580 \begin_layout Description
6584 Float\SpecialChar \ldots{}
6588 This sequence defines a new float.
6589 See Section\InsetSpace ~
6591 \begin_inset LatexCommand ref
6592 reference "sec:floats"
6599 \begin_layout Description
6606 This command deletes an existing float.
6607 This is particularly useful when you want to suppress a float that has
6608 be defined in an input file.
6611 \begin_layout Description
6615 InsetLayout\SpecialChar \ldots{}
6619 This section (re-)defines the layout of an inset.
6620 It can be applied to an existing inset of to a new, user-defined inset,
6621 e.g., a new character style.
6622 See Section\InsetSpace ~
6624 \begin_inset LatexCommand ref
6625 reference "sec:charstyle"
6632 \begin_layout Description
6636 Counter\SpecialChar \ldots{}
6640 This sequence defines a new counter.
6641 See Section\InsetSpace ~
6643 \begin_inset LatexCommand ref
6644 reference "sec:counter"
6651 \begin_layout Standard
6655 \begin_layout Standard
6667 \begin_layout Subsection
6675 \begin_layout Standard
6676 \begin_inset LatexCommand label
6677 name "sec:classoptions"
6685 section can contain the following entries:
6688 \begin_layout Description
6699 ] The list of available font sizes for the document's main font, separated
6701 \begin_inset Quotes eld
6709 \begin_inset Quotes erd
6715 \begin_layout Description
6724 string="empty|plain|headings|fancy"
6726 ] The list of available page styles, separated by
6727 \begin_inset Quotes eld
6735 \begin_inset Quotes erd
6741 \begin_layout Description
6752 ] Some document class options, separated by a comma, that will be added
6753 to the optional part of the
6762 \begin_layout Subsection
6763 Specific Paragraph Layouts
6766 \begin_layout Standard
6767 \begin_inset LatexCommand label
6772 A paragraph layout description looks like this
6776 \begin_layout Standard
6777 Note that this will either define a new layout or modify an existing one.
6785 \begin_layout LyX-Code
6792 \begin_layout LyX-Code
6796 \begin_layout LyX-Code
6800 \begin_layout Standard
6801 where the following commands are allowed:
6804 \begin_layout Standard
6808 \begin_layout Standard
6820 \begin_layout Description
6831 This is used to copy all the features of an existing layout into the current
6836 \begin_layout Description
6848 , Command, Environment, Item_Environment,
6854 ] How the layout should be translated into LaTeX.
6859 means nothing special.
6872 {\SpecialChar \ldots{}
6887 }\SpecialChar \ldots{}
6911 is generated for each paragraph of this environment.
6924 is passed as an argument to the environment.
6929 can be defined in the
6934 ayout\SpecialChar \menuseparator
6948 is perhaps a bit misleading, since these rules apply to SGML classes, too.
6949 Visit the SGML class files for specific examples.
6952 \begin_layout Description
6963 If 1, marks the layout as being part of a title block (see also the
6974 \begin_layout Description
6981 The name of the corresponding LaTeX stuff.
6982 Either the environment or command name.
6985 \begin_layout Description
6992 The optional parameter for the corresponding
6999 This parameter cannot be changed from within LyX.
7002 \begin_layout Description
7013 ] The number of optional arguments that can be used with this layout.
7014 This is useful for things like section headings, and only makes sense with
7018 \begin_layout Description
7030 , Manual, Dynamic, First_Dynamic, Right_Address_Box
7034 The kind of margin that the layout has on the left side.
7039 just means a fixed margin.
7044 means that the left margin depends on the string entered in the
7049 dit\SpecialChar \menuseparator
7054 aragraph\InsetSpace ~
7058 This is used to typeset nice lists without tabulators.
7063 means that the margin depends on the size of the label.
7064 This is used for automatic enumerated headlines.
7065 It is obvious that the headline
7066 \begin_inset Quotes eld
7069 5.4.3.2.1 Very long headline
7070 \begin_inset Quotes erd
7073 must have a wider left margin (as wide as
7074 \begin_inset Quotes eld
7078 \begin_inset Quotes erd
7081 plus the space) than
7082 \begin_inset Quotes eld
7085 3.2 Very long headline
7086 \begin_inset Quotes erd
7089 , even if other word processors are not able to do this.
7094 is similar, but only the very first row of the paragraph is dynamic, while
7095 the others are static; this is used, for example, for descriptions.
7100 means the margin is chosen in a way that the longest row of this paragraph
7101 fits to the right margin.
7102 This is used to typeset an address on the right edge of the page.
7105 \begin_layout Description
7122 ] Whether the following Paragraph is allowed to indent its very first row.
7127 means that it is not allowed to do so,
7131 means it could do so if it wants to.
7134 \begin_layout Description
7145 ] The indent of the very first line of a paragraph.
7146 The argument is passed as a string.
7151 means that the paragraph is indented with the width of
7160 You can get a negative width by prefixing the string with
7165 This way was chosen so that the look is the same with each used screen
7171 will be fixed for a certain layout.
7172 The exception is Standard layout, since the indentation of a Standard layout
7173 paragraph can be prohibited with
7178 Also, Standard layout paragraphs inside environments use the
7182 of the environment, not their native one.
7183 For example, Standard paragraphs inside an enumeration are not indented.
7186 \begin_layout Description
7197 ] LyX allows to choose either
7198 \begin_inset Quotes eld
7202 \begin_inset Quotes erd
7206 \begin_inset Quotes eld
7210 \begin_inset Quotes erd
7213 to typeset a document.
7215 \begin_inset Quotes eld
7219 \begin_inset Quotes erd
7222 is chosen, this value is completely ignored.
7224 \begin_inset Quotes eld
7228 \begin_inset Quotes erd
7231 is chosen, the parindent of a LaTeXtype
7232 \begin_inset Quotes eld
7236 \begin_inset Quotes erd
7239 layout is ignored and all paragraphs are additionally separated by this
7241 The vertical space is calculated with
7243 value*DefaultHeight()
7249 is the height of a row with the normal font.
7250 This way, the look stays the same with different screen fonts.
7253 \begin_layout Description
7264 ] The vertical space with which the very first of a chain of paragraphs
7265 with this layout is separated from the previous paragraph.
7266 If the previous paragraph has another layout, the separations are not simply
7267 added, but the maximum is taken.
7270 \begin_layout Description
7285 for the very last paragraph.
7288 \begin_layout Description
7299 ] The vertical space between two paragraphs of this layout.
7302 \begin_layout Description
7313 ] This is an extra space between the paragraphs of an environment layout.
7314 If you put other layouts into an environment, each is separated with the
7320 But the whole items of the environment are additionally separated with
7329 \begin_layout Description
7340 ] If you put layouts into environments, the leftmargins are not simply added,
7341 but added with a factor
7342 \begin_inset Formula $\frac{4}{depth+4}$
7346 Note that this parameter is also used when the border is defined as
7355 Then it is added to the manual or dynamic border.
7356 This string has the same meaning as for
7363 \begin_layout Description
7381 \begin_layout Description
7393 , Manual, Static, Top_Environment,
7395 Centered_Top_Environment, Sensitive,
7404 means the label is the very first word (up to the first real blank).
7409 means it is defined in the layout (see
7420 Centered_Top_Environment
7422 are special cases of
7427 The label will be printed above the paragraph, but only at the top of an
7428 environment or the top of a chain of paragraphs with this layout.
7429 Usage is for example the
7438 This is also the case for
7442 labels with latex type
7446 , in order to make layouts for theorems work correctly.
7451 is a special case for the caption-labels
7452 \begin_inset Quotes eld
7456 \begin_inset Quotes erd
7460 \begin_inset Quotes eld
7464 \begin_inset Quotes erd
7472 means the (hardcoded) label string depends on the kind of float.
7477 label type defines automatically numbered labels.
7480 \begin_layout Description
7493 The name of the counter for automatic numbering (see Section\InsetSpace ~
7495 \begin_inset LatexCommand ref
7496 reference "sec:counter"
7501 This must be given if
7514 \begin_layout Description
7525 ] The horizontal space between the label and the text body.
7526 Only used for labels that are not above the text body.
7529 \begin_layout Description
7536 [float=0] The vertical space between the label and the text body.
7537 Only used for labels that are above the text body (
7543 Centered_Top_Environment
7548 \begin_layout Description
7559 ] The string used for a label with a
7568 this string is also used as a suggestion for the
7572 that can be set in the
7577 dit\SpecialChar \menuseparator
7582 aragraph\InsetSpace ~
7592 is set, this string can be contain the special formatting commands described
7593 in Section\InsetSpace ~
7595 \begin_inset LatexCommand ref
7596 reference "sec:counter"
7601 For the sake of backwards compatibility, the string
7609 will be replaced by the expanded
7620 This feature is now obsolete and should be replaced by the mechanisms of
7621 Section\InsetSpace ~
7623 \begin_inset LatexCommand ref
7624 reference "sec:counter"
7631 \begin_layout Description
7642 ] This is used inside the appendix instead of
7663 \begin_layout Description
7670 The level of the style in the table of contents.
7671 This is used for automatic numbering of section headings.
7674 \begin_layout Description
7686 , Box, Filled_Box, Static
7688 ] The type of label that stands at the end of the paragraph (or sequence
7711 \begin_inset Quotes eld
7715 \begin_inset Quotes erd
7727 ) is a white (resp.\InsetSpace ~
7728 black) square suitable for end of proof markers,
7732 is an explicit text string.
7735 \begin_layout Description
7746 ] The string used for a label with a
7758 \begin_layout Description
7770 , left, right, center
7772 ] Paragraph alignment.
7775 \begin_layout Description
7787 , left, right, center
7794 Some LaTeX styles prohibit certain alignments, since those wouldn't make
7796 For example a right-aligned or centered enumeration isn't possible.
7799 \begin_layout Description
7813 ] With this parameter the
7818 \begin_inset Quotes eld
7821 Vertical space above
7822 \begin_inset Quotes erd
7830 dit\SpecialChar \menuseparator
7835 aragraph\InsetSpace ~
7838 dialog can be set when initializing a paragraph with this layout
7842 \begin_layout Standard
7845 Note from Jean-Marc:
7847 I'm not sure that this setting has much use, and it should probably be
7848 removed in later versions.
7857 \begin_layout Description
7878 \begin_layout Description
7892 ] Whether fragile commands in this layout should be
7901 \begin_layout Description
7918 ] Whether newlines are translated into LaTeX newlines (
7927 The translation can be switched off to allow more comfortable LaTeX editing
7931 \begin_layout Description
7945 ] Whether the contents of this paragraph should be output in raw form, meaning
7946 without special translations that LaTeX would require.
7947 This somehow replaces the older
7954 \begin_layout Description
7968 ] Usually LyX doesn't allow you to insert more than one space between words,
7969 since a space is considered as the separation between two words, not a
7970 character or symbol of its own.
7971 This is a very fine thing but sometimes annoying, for example when typing
7972 program code or plain LaTeX code.
7978 Note that LyX will create protected blanks for the additional blanks when
7979 in another mode than LaTeX-mode.
7982 \begin_layout Description
7996 ] Usually LyX does not allow you to leave a paragraph empty, since it would
7997 lead to empty LaTeX output.
7998 There are some cases where this could be desirable however: in a letter
7999 template, the required fields can be provided as empty fields, so that
8000 people do not forget them; in some special classes, a layout can be used
8001 as some kind of break, which does not contain actual text.
8004 \begin_layout Description
8016 , onehalf, double, other
8022 ] This defines what the default spacing should be in the layout.
8035 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
8036 If you specify the argument
8040 , then you should also provide a numerical argument which will be the actual
8042 Note that, contrary to other parameters,
8046 implies the generation of specific LaTeX code, using the package
8053 \begin_layout Description
8060 The font used for both the text body
8065 See section\InsetSpace ~
8067 \begin_inset LatexCommand ref
8068 reference "sec:fonts"
8073 Note that defining this font automatically defines the
8080 \begin_layout Description
8087 The font used for the text body .
8088 See section\InsetSpace ~
8090 \begin_inset LatexCommand ref
8091 reference "sec:fonts"
8098 \begin_layout Description
8105 The font used for the label.
8106 See section\InsetSpace ~
8108 \begin_inset LatexCommand ref
8109 reference "sec:fonts"
8116 \begin_layout Description
8120 Preamble\SpecialChar \ldots{}
8124 A set of macro definitions that will be output at the beginning of the
8125 LaTeX files when the layout is used.
8126 Use this to define the macros needed by this particular layout.
8129 \begin_layout Description
8136 the name of a style which preamble should be output
8140 the one mentionned above.
8141 This allows to ensure some ordering of the preamble snippets when macros
8142 definitions depend on one another
8146 \begin_layout Standard
8147 Note that, besides that functionality, there is no way to ensure any ordering
8149 The ordering that you see in a given version of LyX may change without
8150 warning in later versions.
8158 \begin_layout Standard
8162 \begin_layout Standard
8174 \begin_layout Subsection
8178 \begin_layout Standard
8179 \begin_inset LatexCommand label
8184 Since version 1.3.0 of LyX, it is necessary to define the floats (
8192 , \SpecialChar \ldots{}
8193 ) in the text class itself.
8194 If you are looking here to learn how to upgrade an existing text class,
8195 it will probably turn out that all you have to do is to add
8198 \begin_layout LyX-Code
8202 \begin_layout Standard
8203 at a reasonable location of the text class.
8207 \begin_layout Standard
8208 Don't forget to also have a look at counters in next section.
8213 If you want to implement a text class that proposes some other float types
8214 (like the AGU class bundled with LyX), the information below will hopefully
8218 \begin_layout Description
8230 \begin_inset Quotes erd
8234 \begin_inset Quotes erd
8238 \begin_inset Quotes eld
8242 \begin_inset Quotes erd
8245 of the new class of floats, like program or algorithm.
8246 After the appropriate
8267 \begin_layout Description
8279 \begin_inset Quotes erd
8283 \begin_inset Quotes erd
8286 ] The string that will be used in the menus and also for the caption.
8289 \begin_layout Description
8310 if the float is already defined by the documentclass.
8315 , the float will be defined using the LaTeX package
8322 \begin_layout Description
8334 \begin_inset Quotes erd
8338 \begin_inset Quotes erd
8341 ] This (optional) argument determines whether floats of this class will
8342 be numbered within some sectional unit of the document.
8343 For example, if within is equal to
8347 , the floats will be numbered within chapters.
8351 \begin_layout Description
8363 \begin_inset Quotes erd
8367 \begin_inset Quotes erd
8370 ] The style used when defining the float using
8379 \begin_layout Description
8391 \begin_inset Quotes erd
8395 \begin_inset Quotes erd
8398 ] The default placement for the given class of floats.
8399 They are like in standard LaTeX:
8415 for top, bottom, page, and here, respectively.
8419 \begin_layout Standard
8420 Note that the order of these letters in the string is irrelevant, like in
8426 On top of that there is a new type,
8430 , which does not really correspond to a float, since it means: put it
8431 \begin_inset Quotes eld
8435 \begin_inset Quotes erd
8439 Note, however that the
8443 specifier is special and, because of implementation details cannot be used
8444 in non-builtin float types.
8445 If you do not understand what this means, just use
8452 \begin_layout Description
8464 \begin_inset Quotes erd
8468 \begin_inset Quotes erd
8471 ] The file name extension of an auxiliary file for the list of figures (or
8473 LaTeX writes the captions to this file.
8476 \begin_layout Description
8488 \begin_inset Quotes erd
8492 \begin_inset Quotes erd
8495 ] The heading used for the list of floats.
8498 \begin_layout Standard
8499 Note that defining a float with type
8505 automatically defines the corresponding counter with name
8514 \begin_layout Subsection
8515 Inset layouts and Flex insets
8518 \begin_layout Standard
8519 \begin_inset LatexCommand label
8520 name "sec:charstyle"
8524 You can define character styles since version 1.4.0 of LyX; since version
8525 1.6.0 these are called Flex insets.
8529 \begin_layout Standard
8530 Furthermore it is possible to define the general layout of many different
8532 Currently layout parameters can be defined for footnotes, marginal notes,
8533 note insets, ERT insets, branch insets, and Flex insets.
8534 The latter are definable from the user GUI and come in three different
8535 kinds: character style (
8543 ), and XML element (
8551 \begin_layout Standard
8556 definition starting line is of the form
8559 \begin_layout LyX-Code
8560 InsetLayout <Type> <Name>
8563 \begin_layout Standard
8567 \begin_layout Standard
8574 Foot, Margin, Note, Flex
8579 \begin_layout Standard
8584 can be empty (for foot- and marginal notes, branches and ERT) or one of
8602 Here, the second part of the name can be chosen freely (for CharStyle,
8603 Custom and Element), or from a predefined list (for Note).
8606 \begin_layout Standard
8611 section can contain the following entries:
8614 \begin_layout Description
8637 (indicating a dummy definition ending definitions of charstyles etc.).
8638 This entry is only meaningful for Flex (user definable) insets, the three
8639 types of which are CharStyle, Custom and Element.
8642 \begin_layout Description
8658 Minimalistic or Conglomerate
8661 , describing the rendering style used for the inset's frame and buttons.
8664 \begin_layout Description
8671 defines what will be displayed on the button or elsewhere as the inset
8673 Some inset types (ERT and Branch) modify this label on the fly.
8676 \begin_layout Description
8683 The font used for both the text body
8688 See section\InsetSpace ~
8690 \begin_inset LatexCommand ref
8691 reference "sec:fonts"
8696 Note that defining this font automatically defines the
8703 \begin_layout Description
8710 The font used for the label.
8711 See section\InsetSpace ~
8713 \begin_inset LatexCommand ref
8714 reference "sec:fonts"
8719 Note that this definition can never appear before
8723 , lest it be ineffective (see above)
8726 \begin_layout Description
8733 The name of the corresponding LaTeX stuff.
8734 Either the environment or command name.
8737 \begin_layout Description
8744 The optional parameter for the corresponding
8750 stuff, including possible bracket pairs like
8755 This parameter cannot be changed from within LyX.
8758 \begin_layout Description
8765 See section\InsetSpace ~
8767 \begin_inset LatexCommand ref
8768 reference "sec:style"
8775 \begin_layout Description
8779 Preamble\SpecialChar \ldots{}
8783 See section\InsetSpace ~
8785 \begin_inset LatexCommand ref
8786 reference "sec:style"
8793 \begin_layout Subsection
8797 \begin_layout Standard
8798 \begin_inset LatexCommand label
8803 Since version 1.3.0 of LyX, it is necessary to define the counters (
8811 , \SpecialChar \ldots{}
8812 ) in the text class itself.
8813 If you are looking here to learn how to upgrade an existing text class,
8814 it will probably turn out that all you have to do is to add
8817 \begin_layout LyX-Code
8818 Input stdcounters.inc
8821 \begin_layout Standard
8822 The following parameters can be used:
8825 \begin_layout Description
8837 \begin_inset Quotes erd
8841 \begin_inset Quotes erd
8844 ] The name of the counter.
8847 \begin_layout Description
8859 \begin_inset Quotes erd
8863 \begin_inset Quotes erd
8866 ] If this is set to the name of another counter, the present counter will
8867 be reset everytime the other one is increased.
8879 \begin_layout Description
8883 LabelString [string=""]
8886 when this is defined, this string defines how the counter is displayed.
8887 Setting this value resets
8892 The following special constructs can be used in the string:
8896 \begin_layout Itemize
8903 will be replaced by the expansion of the
8916 If these are empty, a default value is constructed as follows: if the counter
8917 has a master counter
8929 is used; otherwise the string
8938 \begin_layout Itemize
8939 counter values can be expressed using LaTeX-like macros
8963 \begin_layout Description
8974 to arabic numerals, like 1, 2, 3\SpecialChar \ldots{}
8979 \begin_layout Standard
8989 Actually, the situation is a bit more complicated than that: any
9008 other than those descibed below will produce arabic numerals.
9009 It would not be surprising to see this change in the future.
9017 \begin_layout Description
9024 for lower-case letters: a, b, c, \SpecialChar \ldots{}
9028 \begin_layout Description
9035 for upper-case letters: A, B, C, \SpecialChar \ldots{}
9039 \begin_layout Description
9046 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
9050 \begin_layout Description
9057 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
9061 \begin_layout Description
9068 for hebrew numerals.
9073 \begin_layout Description
9077 LabelStringAppendix [string=""]
9084 , for use in appendix.
9087 \begin_layout Subsection
9091 \begin_layout Standard
9092 \begin_inset LatexCommand label
9097 A font description looks like that:
9100 \begin_layout LyX-Code
9110 \begin_layout LyX-Code
9114 \begin_layout LyX-Code
9118 \begin_layout Standard
9119 and the following commands are available:
9122 \begin_layout Description
9139 \begin_layout Description
9156 \begin_layout Description
9168 , Italic, SmallCaps, Slanted
9173 \begin_layout Description
9189 , large, larger, largest, huge, giant
9194 \begin_layout Description
9206 , black, white, red, green, blue, cyan, magenta, yellow
9211 \begin_layout Subsection
9212 Upgrading old layout files
9215 \begin_layout Standard
9216 The file format of layout files changes from time to time, so old layout
9217 files need to be converted.
9218 This process has been automated in LyX 1.4.0: If LyX reads an old format
9219 layout file it will call the conversion tool
9221 $LyXDir/scripts/layout2layout.py
9223 and convert it to a temporary file in current format.
9224 The original file is left untouched, so that you can still use it with
9226 If you want to convert the layout file permanently, just call the converter
9230 \begin_layout LyX-Code
9231 python $LyXDir/scripts/layout2layout.py myclass.layout myclassnew.layout
9234 \begin_layout Standard
9246 \begin_layout Standard
9247 The automatic conversion does only handle syntax changes.
9248 It cannot handle the case where the contents of included files was changed.
9249 For example, layout files based on
9262 If you get error messages about undefined counters, try to convert your
9282 \begin_layout Section
9284 \begin_inset LatexCommand label
9285 name "sec:templates"
9292 \begin_layout Standard
9293 Templates are created just like usual documents.
9294 The only difference is that usual documents contain all possible settings,
9295 including the fontscheme and the papersize.
9296 Usually a user doesn't want a template to overwrite his defaults in these
9298 For that reason, the designer of a template should remove the corresponding
9311 from the template LyX file.
9312 This can be done with any simple text-editor, for example
9324 \begin_layout Standard
9325 Put the edited template files you create in
9329 , copy the ones you use from the global template directory in
9333 to the same place, and redefine the template path in the
9338 dit\SpecialChar \menuseparator
9357 \begin_layout Standard
9358 Note that there is a template which has a particular meaning:
9363 This template is loaded everytime you create a new document with
9370 \SpecialChar \menuseparator
9378 in order to provide useful defaults.
9379 To create this template from inside LyX, all you have to do is to open
9380 a document with the correct settings, and use the
9386 e as Document Defaults
9391 \begin_layout Chapter
9392 Including External Material
9395 \begin_layout Section
9399 \begin_layout Standard
9400 \begin_inset Note Note
9403 \begin_layout Standard
9404 This section is completely outdated.
9409 One often requested feature from LyX users is to be able to interface LyX
9410 with Xfig, Dia, or other similar applications that specialize in producing
9411 a certain kind of diagram, figure, schematic or whatever material might
9412 be relevant to include in your document.
9413 Previously, it was only possible to include boring, static, fixed images
9414 in LyX documents with the graphics feature, but there are several limitations
9415 attached to this approach:
9418 \begin_layout Itemize
9419 If you want to change the figure, you have to invoke an external program
9423 \begin_layout Itemize
9424 LyX does not notice that the referenced files change, so the on-screen display
9425 can fast become obsolete, and this is aggravated by the lack of a means
9426 of updating the display
9429 \begin_layout Itemize
9430 The graphics stuff does not provide any mechanisms for coping with different
9431 exported formats such as DocBook, HTML or plain text
9434 \begin_layout Standard
9435 The external material facility attempts to solve all of these problems
9439 \begin_layout Standard
9440 Even if the graphics facility can't solve all problems, it is still valuable
9441 because it does provide in-line preview of the graphics, and supports advanced
9442 geometric transformations with a comfortable user interface.
9448 It does this by offering a general method to interface LyX to external
9450 Instead of introducing a long list of different constructs tailored for
9451 each specific application, we chose to sacrifice the in-line displaying
9452 of the included material in order to provide a general construct to cover
9453 a wide range of applications.
9454 The result is the external material construct.
9455 External material presents itself in the document simply as a button, but
9456 don't let this fool you.
9457 When you click on it, a dialog will appear that allows you to chose exactly
9458 what material to include, and in the following sections you will learn
9459 that this is indeed a powerful mechanism that can solve all of the above
9463 \begin_layout Section
9467 \begin_layout Standard
9468 The external material feature is based on the concept of a
9473 A template is a specification of how LyX should interface with a certain
9475 As bundled, LyX comes with predefined templates for Xfig figures, Dia diagrams,
9476 various raster format images, gnuplot, and more.
9477 You can check the actual list by using the menu
9479 Insert\SpecialChar \menuseparator
9480 File\SpecialChar \menuseparator
9489 Furthermore, it is possible to roll your own template to support a specific
9491 Later we'll describe in more detail what is involved, and hopefully you
9492 will submit all the templates you create so we can include them in a later
9496 \begin_layout Standard
9497 Another basic idea of the external material feature is to distinguish between
9498 the original file that serves as a base for final material and the produced
9499 file that is included in your exported or printed document.
9500 For example, consider the case of a figure produced with
9505 The Xfig application itself works on an original file with the
9510 Within XFig, you create and change your figure, and when you are done,
9516 When you want to include the figure in your document, you invoke
9520 in order to create a PostScript file that can readily be included in your
9526 file is the original file, and the PostScript file is the produced file.
9529 \begin_layout Standard
9530 This distinction is important in order to allow updating of the material
9531 while you are in the process of writing the document.
9532 Furthermore, it provides us with the flexibility that is needed to support
9533 multiple export formats.
9534 For instance, in the case of a plain text file, it is not exactly an award-winn
9535 ing idea to include the figure as raw PostScript.
9536 Instead, you'd either prefer to just include a reference to the figure,
9537 or try to invoke some graphics to Ascii converter to make the final result
9538 look similar to the real graphics.
9539 The external material management allows you to do this, because it is parameter
9540 ized on the different export formats that LyX supports.
9543 \begin_layout Standard
9544 Besides supporting the production of different products according to the
9545 exported format, it supports tight integration with editing and viewing
9547 In the case of an XFig figure, you are able to invoke
9551 on the original file with a single click from within the external material
9552 dialog in LyX, and also preview the produced PostScript file with
9557 No more fiddling around with the command line and/or file browsers to locate
9558 and manipulate the original or produced files.
9559 In this way, you are finally able to take full advantage of the many different
9560 applications that are relevant to use when you write your documents, and
9561 ultimately be more productive.
9564 \begin_layout Section
9565 External material dialog
9568 \begin_layout Standard
9573 dialog is described in the
9582 \begin_layout Section
9586 \begin_layout Standard
9587 In this section, we should include some examples of use of the external
9589 Those examples could include:
9592 \begin_layout Itemize
9593 External raster images
9596 \begin_layout Itemize
9597 External XFig figures
9600 \begin_layout Itemize
9604 \begin_layout Itemize
9608 \begin_layout Itemize
9609 The use of makefiles
9612 \begin_layout Itemize
9613 Recursive external LyX templates
9616 \begin_layout Section
9617 The external template configuration file
9620 \begin_layout Standard
9621 It is relatively easy to add custom external template definitions to LyX.
9622 However, be aware this doing this in an careless manner most probably
9626 introduce an easily exploitable security hole.
9627 So before you do this, please read the discussion about security which
9631 \begin_layout Standard
9632 Having said that, we encourage you to submit any interesting templates that
9637 \begin_layout Standard
9638 The external templates are defined in the
9640 lib/external_templates
9643 You can place your own version in
9645 .lyx/external_templates
9650 \begin_layout Standard
9651 A typical template looks like this:
9654 \begin_layout LyX-Code
9658 \begin_layout LyX-Code
9659 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
9662 \begin_layout LyX-Code
9666 \begin_layout LyX-Code
9670 \begin_layout LyX-Code
9674 \begin_layout LyX-Code
9678 \begin_layout LyX-Code
9682 \begin_layout LyX-Code
9683 AutomaticProduction true
9686 \begin_layout LyX-Code
9690 \begin_layout LyX-Code
9694 \begin_layout LyX-Code
9698 \begin_layout LyX-Code
9699 TransformCommand Rotate RotationLatexCommand
9702 \begin_layout LyX-Code
9703 TransformCommand Resize ResizeLatexCommand
9706 \begin_layout LyX-Code
9707 Product "$$RotateFront$$ResizeFront
9710 \begin_layout LyX-Code
9715 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
9718 \begin_layout LyX-Code
9719 $$ResizeBack$$RotateBack"
9722 \begin_layout LyX-Code
9726 \begin_layout LyX-Code
9727 UpdateResult "$$AbsPath$$Basename.pstex_t"
9730 \begin_layout LyX-Code
9731 Requirement "graphicx"
9734 \begin_layout LyX-Code
9735 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
9738 \begin_layout LyX-Code
9739 ReferencedFile latex "$$AbsPath$$Basename.eps"
9742 \begin_layout LyX-Code
9743 ReferencedFile dvi "$$AbsPath$$Basename.eps"
9746 \begin_layout LyX-Code
9750 \begin_layout LyX-Code
9754 \begin_layout LyX-Code
9755 TransformCommand Rotate RotationLatexCommand
9758 \begin_layout LyX-Code
9759 TransformCommand Resize ResizeLatexCommand
9762 \begin_layout LyX-Code
9763 Product "$$RotateFront$$ResizeFront
9766 \begin_layout LyX-Code
9771 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
9774 \begin_layout LyX-Code
9775 $$ResizeBack$$RotateBack"
9778 \begin_layout LyX-Code
9782 \begin_layout LyX-Code
9783 UpdateResult "$$AbsPath$$Basename.pdftex_t"
9786 \begin_layout LyX-Code
9787 Requirement "graphicx"
9790 \begin_layout LyX-Code
9791 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
9794 \begin_layout LyX-Code
9795 ReferencedFile latex "$$AbsPath$$Basename.pdf"
9798 \begin_layout LyX-Code
9802 \begin_layout LyX-Code
9806 \begin_layout LyX-Code
9807 Product "$$Contents(
9809 "$$AbsPath$$Basename.asc
9814 \begin_layout LyX-Code
9815 UpdateFormat asciixfig
9818 \begin_layout LyX-Code
9819 UpdateResult "$$AbsPath$$Basename.asc"
9822 \begin_layout LyX-Code
9826 \begin_layout LyX-Code
9830 \begin_layout LyX-Code
9831 Product "<graphic fileref=
9833 "$$AbsOrRelPathMaster$$Basename.eps
9838 \begin_layout LyX-Code
9842 \begin_layout LyX-Code
9846 \begin_layout LyX-Code
9847 UpdateResult "$$AbsPath$$Basename.eps"
9850 \begin_layout LyX-Code
9851 ReferencedFile docbook "$$AbsPath$$Basename.eps"
9854 \begin_layout LyX-Code
9855 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
9858 \begin_layout LyX-Code
9862 \begin_layout LyX-Code
9863 Product "[XFig: $$FName]"
9866 \begin_layout LyX-Code
9870 \begin_layout LyX-Code
9874 \begin_layout Standard
9875 As you can see, the template is enclosed in
9879 \SpecialChar \ldots{}
9885 It contains a header specifying some general settings, and for each supported
9886 primary document file format a section
9890 \SpecialChar \ldots{}
9898 \begin_layout Subsection
9902 \begin_layout Description
9906 Template\InsetSpace ~
9910 A unique name for the template.
9911 It must not contain substitution macros (see below).
9914 \begin_layout Description
9918 GuiName\InsetSpace ~
9922 The text that is displayed on the button.
9923 This command must occur exactly once.
9926 \begin_layout Description
9930 HelpText\InsetSpace ~
9935 The help text that is used in the External dialog.
9936 Provide enough information to explain to the user just what the template
9937 can provide him with.
9938 This command must occur exactly once.
9941 \begin_layout Description
9945 InputFormat\InsetSpace ~
9949 The file format of the original file.
9950 This must be the name of a format that is known to LyX (see the
9955 ools\SpecialChar \menuseparator
9960 references:Conversion
9967 if the template can handle original files of more than one format.
9968 LyX will attempt to interrogate the file itself in order to deduce its
9969 format in this case.
9970 This command must occur exactly once.
9973 \begin_layout Description
9977 FileFilter\InsetSpace ~
9981 A glob pattern that is used in the file dialog to filter out the desired
9983 If there is more than one possible file extension (e.g.\InsetSpace ~
9992 ), use something like
9997 This command must occur exactly once.
10000 \begin_layout Description
10004 AutomaticProduction\InsetSpace ~
10008 Wether the file represented by the template must be generated by LyX.
10009 This command must occur exactly once.
10012 \begin_layout Description
10016 Transform\InsetSpace ~
10017 Rotate|Resize|Clip|Extra
10020 This command specifies which transformations are supported by this template.
10021 It may occur zero or more times.
10022 This command enables the corresponding tabs in the external dialog.
10027 command must have either a corresponding
10040 Otherwise the transformation will not be supported by that format.
10043 \begin_layout Subsection
10047 \begin_layout Description
10051 Format\InsetSpace ~
10052 LaTeX|PDFLaTeX|PlainText|DocBook
10055 The primary document file format that this format definition is for.
10056 Not every template has a sensible representation in all document file formats.
10057 Please define nevertheless a
10061 section for all formats.
10062 Use a dummy text when no representation is available.
10063 Then you can at least see a reference to the external material in the exported
10067 \begin_layout Description
10071 TransformCommand\InsetSpace ~
10072 Rotate\InsetSpace ~
10073 RotationLatexCommand
10076 This command specifies that the built in LaTeX command should be used for
10078 This command may occur once or not at all.
10081 \begin_layout Description
10085 TransformCommand\InsetSpace ~
10086 Resize\InsetSpace ~
10090 This command specifies that the built in LaTeX command should be used for
10092 This command may occur once or not at all.
10095 \begin_layout Description
10099 TransformOption\InsetSpace ~
10100 Rotate\InsetSpace ~
10101 RotationLatexOption
10104 This command specifies that rotation is done via an optional argument.
10105 This command may occur once or not at all.
10108 \begin_layout Description
10112 TransformOption\InsetSpace ~
10113 Resize\InsetSpace ~
10117 This command specifies that resizing is done via an optional argument.
10118 This command may occur once or not at all.
10121 \begin_layout Description
10125 TransformOption\InsetSpace ~
10130 This command specifies that clipping is done via an optional argument.
10131 This command may occur once or not at all.
10134 \begin_layout Description
10138 TransformOption\InsetSpace ~
10143 This command specifies that an extra optional argument is used.
10144 This command may occur once or not at all.
10147 \begin_layout Description
10151 Product\InsetSpace ~
10155 The text that is inserted in the exported document.
10156 This is actually the most important command and can be quite complex.
10157 This command must occur exactly once.
10160 \begin_layout Description
10164 UpdateFormat\InsetSpace ~
10168 The file format of the converted file.
10169 This must be the name of a format that is known to LyX (see the
10174 ools\SpecialChar \menuseparator
10179 references:Conversion
10182 This command must occur exactly once.
10185 \begin_layout Description
10189 UpdateResult\InsetSpace ~
10193 The file name of the converted file.
10194 The file name must be absolute.
10195 This command must occur exactly once.
10198 \begin_layout Description
10202 ReferencedFile\InsetSpace ~
10203 <format>\InsetSpace ~
10207 This command denotes files that are created by the conversion process and
10208 are needed for a particular export format.
10209 If the filename is relative, it is interpreted relative to the master document.
10210 This command may be given zero or more times.
10213 \begin_layout Description
10217 Requirement\InsetSpace ~
10221 The name of a required LaTeX package.
10222 The package is included via
10228 in the LaTeX preamble.
10229 This command may occur zero or more times.
10232 \begin_layout Description
10236 Preamble\InsetSpace ~
10240 This command specifies a preamble snippet that will be included in the
10242 It has to be defined using
10246 \SpecialChar \ldots{}
10252 This command may occur zero or more times.
10255 \begin_layout Description
10259 Option\InsetSpace ~
10260 <name>\InsetSpace ~
10264 This command defines an additional macro
10268 for substitution in
10277 itself may contain substitution macros.
10278 The advantage over using
10286 is that the substituted value of
10290 is sanitized so that it is a valid optional argument in the document format.
10291 This command may occur zero or more times.
10294 \begin_layout Subsection
10295 Preamble definitions
10298 \begin_layout Standard
10299 The external template configuration file may contain additional preamble
10300 definitions enclosed by
10304 \SpecialChar \ldots{}
10310 They can be used by the templates in the
10317 \begin_layout Section
10318 The substitution mechanism
10321 \begin_layout Standard
10322 When the external material facility invokes an external program, it is done
10323 on the basis of a command defined in the template configuration file.
10324 These commands can contain various macros that are expanded before execution.
10325 Execution always take place in the directory of the containing document.
10328 \begin_layout Standard
10329 Also, whenever external material is to be displayed, the name will be produced
10330 by the substitution mechanism, and most other commands in the template
10331 definition support substitution as well.
10334 \begin_layout Standard
10335 The available macros are the following:
10338 \begin_layout Description
10339 $$FName The filename of the file specified in the external material dialog.
10340 This is either an absolute name, or it is relative to the LyX document.
10343 \begin_layout Description
10344 $$Basename The filename without path and without the extension.
10347 \begin_layout Description
10348 $$Extension The file extension (including the dot).
10351 \begin_layout Description
10352 $$FPath The path part of
10356 (absolute name or relative to the LyX document).
10359 \begin_layout Description
10360 $$AbsPath The absolute file path.
10363 \begin_layout Description
10364 $$RelPathMaster The file path, relative to the master LyX document.
10367 \begin_layout Description
10368 $$RelPathParent The file path, relative to the LyX document.
10371 \begin_layout Description
10372 $$AbsOrRelPathMaster The file path, absolute or relative to the master LyX
10376 \begin_layout Description
10377 $$AbsOrRelPathParent The file path, absolute or relative to the LyX document.
10380 \begin_layout Description
10381 $$Tempname A name and full path to a temporary file which will be automatically
10382 deleted whenever the containing document is closed, or the external material
10386 \begin_layout Description
10388 \begin_inset Quotes eld
10392 \begin_inset Quotes erd
10395 ) This macro will expand to the contents of the file with the name
10402 \begin_layout Description
10403 $$Sysdir This macro will expand to the absolute path of the system directory.
10404 This is typically used to point to the various helper scripts that are
10408 \begin_layout Standard
10409 All path macros contain a trailing directory separator, so you can construct
10411 the absolute filename with
10413 $$AbsPath$$Basename$$Extension
10418 \begin_layout Standard
10419 The macros above are substituted in all commands unless otherwise noted.
10424 supports additionally the following substitutions if they are enabled by
10436 \begin_layout Description
10437 $$ResizeFront The front part of the resize command.
10440 \begin_layout Description
10441 $$ResizeBack The back part of the resize command.
10444 \begin_layout Description
10445 $$RotateFront The front part of the rotation command.
10448 \begin_layout Description
10449 $$RotateBack The back part of the rotation command.
10452 \begin_layout Standard
10453 The value string of the
10457 command supports additionally the following substitutions if they are enabled
10469 \begin_layout Description
10470 $$Clip The clip option.
10473 \begin_layout Description
10474 $$Extra The extra option.
10477 \begin_layout Description
10478 $$Resize The resize option.
10481 \begin_layout Description
10482 $$Rotate The rotation option.
10485 \begin_layout Standard
10486 You may ask why there are so many path macros.
10487 There are mainly two reasons:
10490 \begin_layout Standard
10491 First, relative and absolute file names should remain relative or absolute,
10493 Users may have reasons to prefer either form.
10494 Relative names are useful for portable documents that should work on different
10495 machines, for example.
10496 Absolute names may be required by some programs.
10499 \begin_layout Standard
10500 Second, LaTeX treats relative file names differently than LyX and other
10501 programs in nested included files.
10502 For LyX, a relative file name is always relative to the document that contains
10504 For LaTeX, it is always relative to the master document.
10505 These two definitions are identical if you have only one document, but
10506 differ if you have a master document that includes part documents.
10507 That means that relative filenames must be transformed when presented to
10509 Fortunately LyX does this automatically for you if you choose the right
10513 \begin_layout Standard
10514 So which path macro should be used in new template definitions? The rule
10518 \begin_layout Itemize
10523 if an absolute path is required.
10526 \begin_layout Itemize
10529 $$AbsOrRelPathMaster
10531 if the substituted string is some kind of LaTeX input.
10534 \begin_layout Itemize
10537 $$AbsOrRelPathParent
10539 in order to preserve the user's choice.
10542 \begin_layout Standard
10543 There are special cases where this rule does not work and e.g.\InsetSpace ~
10545 are needed, but normally it will work just fine.
10546 One example for such a case is the command
10548 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
10550 in the XFig template above: We can't use the absolute name because the
10555 files needs the relative name in order to rewrite the file content.
10558 \begin_layout Section
10559 Security discussion
10562 \begin_layout Standard
10563 \begin_inset Note Note
10566 \begin_layout Standard
10567 This section is outdated
10572 The external material feature interfaces with a lot of external programs
10573 and does so automatically, so we have to consider the security implications
10575 In particular, since you have the option of including your own filenames
10576 and/or parameter strings and those are expanded into a command, it seems
10577 that it would be possible to create a malicious document which executes
10578 arbitrary commands when a user views or prints the document.
10579 This is something we definately want to avoid.
10582 \begin_layout Standard
10583 However, since the external program commands are specified in the template
10584 configuration file only, there are no security issues if LyX is properly
10585 configured with safe templates only.
10586 This is so because the external programs are invoked with the
10590 -system call rather than the
10594 system-call, so it's not possible to execute arbitrary commands from the
10595 filename or parameter section via the shell.
10598 \begin_layout Standard
10599 This also implies that you are restricted in what command strings you can
10600 use in the external material templates.
10601 In particular, pipes and redirection are not readily available.
10602 This has to be so if LyX should remain safe.
10603 If you want to use some of the shell features, you should write a safe
10604 script to do this in a controlled manner, and then invoke the script from
10605 the command string.
10610 directory of the LyX installation, you can find a safe wrapper script
10612 general_command_wrapper.py
10614 that supports redirection of input and output.
10615 That can serve as an example for how to write safe template scripts.
10616 For a more advanced example that uses
10620 and friends, take a look at the
10627 \begin_layout Standard
10628 It is possible to design a template that interacts directly with the shell,
10629 but since this would allow a malicious user to execute arbitrary commands
10630 by writing clever filenames and/or parameters, we generally recommend that
10631 you only use safe scripts that work with the
10635 system call in a controlled manner.
10636 Of course, for use in a controlled environment, it can be tempting to just
10637 fall back to use ordinary shell scripts.
10638 If you do so, be aware that you
10642 provide an easily exploitable security hole in your system.
10643 Of course it stands to reason that such unsafe templates will never be
10644 included in the standard LyX distribution, although we do encourage people
10645 to submit new templates in the open source tradition.
10646 But LyX as shipped from the official distribution channels will never have
10650 \begin_layout Standard
10651 Including external material provides a lot of power, and you have to be
10652 careful not to introduce security hazards with this power.
10653 A subtle error in a single line in an innocent looking script can open
10654 the door to huge security problems.
10655 So if you do not fully understand the issues, we recommend that you consult
10656 a knowledgable security professional or the LyX development team if you
10657 have any questions about whether a given template is safe or not.
10658 And do this before you use it in an uncontrolled environment.
10661 \begin_layout Chapter
10665 \begin_layout Section
10669 \begin_layout Standard
10670 The LyX server is a method implemented in LyX that will enable other programs
10671 to talk to LyX, invoke LyX commands, and retrieve information about the
10672 LyX internal state.
10673 This is only intended for advanced users, but they should find it useful.
10676 \begin_layout Section
10677 Starting the LyX Server
10680 \begin_layout Standard
10681 The LyX server works through the use of a pair of named pipes.
10682 These are usually located in your home directory and have the names
10683 \begin_inset Quotes eld
10691 \begin_inset Quotes erd
10695 \begin_inset Quotes eld
10703 \begin_inset Quotes erd
10707 External programs write into
10711 and read back data from
10716 The stem of the pipe names can be defined in the
10721 ools\SpecialChar \menuseparator
10728 dialog, for example
10730 "/home/myhome/.lyxpipe"
10735 \begin_layout Standard
10744 ' to create the pipes.
10745 The above setting also has the effect of activating the LyX server.
10746 If one of the pipes already exists, LyX will assume that another LyX process
10747 is already running and will not start the server.
10748 To have several LyX processes with servers at the same time, you have to
10749 change the configuration between the start of the programs.
10752 \begin_layout Standard
10753 If you are developing a client program, you might find it useful to enable
10754 debugging information from the LyX server.
10755 Do this by starting LyX as
10757 lyx -dbg lyxserver.
10760 \begin_layout Standard
10761 Warning: if LyX crashes, it may not manage to remove the pipes; in this
10762 case you must remove them manually.
10763 If LyX starts and the pipes exist already, it will not start any server.
10766 \begin_layout Standard
10767 Other than this, there are a few points to consider:
10770 \begin_layout Itemize
10771 Both server and clients must run on UNIX or OS/2 machines.
10772 Communications between LyX on UNIX and clients on OS/2 or vice versa is
10773 not possible right now.
10776 \begin_layout Itemize
10777 On OS/2, only one client can connect to LyXServer at a time.
10780 \begin_layout Itemize
10781 On OS/2, clients must open inpipe with
10788 \begin_layout Standard
10789 You can find a complete example client written in C in the source distribution
10792 development/server_monitor.c
10797 \begin_layout Section
10798 Normal communication
10801 \begin_layout Standard
10802 To issue a LyX call, the client writes a line of ASCII text into the input
10804 This line has the following format:
10807 \begin_layout Quote
10821 \begin_layout Standard
10826 is a name that the client can choose arbitrarily.
10827 Its only use is that LyX will echo it if it sends an answer - so a client
10828 can dispatch results from different requesters.
10831 \begin_layout Standard
10836 is the function you want LyX to perform.
10837 It is the same as the commands you'd use in the minibuffer.
10840 \begin_layout Standard
10845 is an optional argument which is meaningful only to some functions (for
10847 \begin_inset Quotes eld
10851 \begin_inset Quotes erd
10854 which will insert the argument as text at the cursor position.)
10857 \begin_layout Standard
10858 The answer from LyX will arrive in the output pipe and be of the form
10861 \begin_layout Quote
10875 \begin_layout Standard
10884 are just echoed from the command request, while
10888 is more or less useful information filled according to how the command
10889 execution worked out.
10890 Some commands will return information about the internal state of LyX,
10892 \begin_inset Quotes eld
10896 \begin_inset Quotes erd
10899 , while other will return an empty data-response.
10900 This means that the command execution went fine.
10903 \begin_layout Standard
10904 In case of errors, the response from LyX will have this form
10907 \begin_layout Quote
10921 \begin_layout Standard
10926 should contain an explanation of why the command failed.
10929 \begin_layout Standard
10933 \begin_layout LyX-Code
10934 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
10937 \begin_layout LyX-Code
10938 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
10940 read a <~/.lyxpipe.out
10945 \begin_layout Section
10949 \begin_layout Standard
10950 LyX can notify clients of events going on asynchronously.
10951 Currently it will only do this if the user binds a key sequence with the
10953 \begin_inset Quotes eld
10957 \begin_inset Quotes erd
10961 The format of the string LyX sends is as follows:
10964 \begin_layout Quote
10973 \begin_layout Standard
10978 is the printed representation of the key sequence that was actually typed
10982 \begin_layout Standard
10983 This mechanism can be used to extend LyX's command set and implement macros:
10984 bind some key sequence to
10985 \begin_inset Quotes eld
10989 \begin_inset Quotes erd
10992 , start a client that listens on the out pipe, dispatches the command according
10993 to the sequence and starts a function that may use LyX calls and LyX requests
10994 to issue a command or a series of commands to LyX.
10997 \begin_layout Section
10998 The simple LyX Server Protocol
11001 \begin_layout Standard
11002 LyX implements a simple protocol that can be used for session management.
11003 All messages are of the form
11006 \begin_layout Quote
11016 \begin_layout Standard
11022 \begin_inset Quotes eld
11026 \begin_inset Quotes erd
11030 \begin_inset Quotes eld
11034 \begin_inset Quotes erd
11039 \begin_inset Quotes eld
11043 \begin_inset Quotes erd
11046 is received from a client, LyX will report back to inform the client that
11047 it's listening to it's messages, while
11048 \begin_inset Quotes eld
11052 \begin_inset Quotes erd
11055 sent from LyX will inform clients that LyX is closing.
11058 \begin_layout Chapter
11063 \begin_layout Standard
11064 This appendix is a huge cross-reference to all the English language keybindings.
11065 Originally, we simply wanted to list all of the key bindings followed by
11066 the function it's bound to.
11067 That way, a user can look up a key to find out what it does.
11068 We then decided, what the hey, why not include the default toolbar and
11069 menu bindings, too.
11070 Please note this section is likely to be very out of date.
11073 \begin_layout Standard
11074 The form is really self-explanatory, but here are a few tips: all entries
11075 are arranged roughly alphabetically for a given modifier (
11084 For the general keyboard layout, simpler prefixes precede the more complex
11094 All entries were gleaned from the default user interface and binding files
11095 located in the directories
11097 \SpecialChar \ldots{}
11102 \SpecialChar \ldots{}
11105 ; they should be treated as the final word on the bindings.
11108 \begin_layout Standard
11109 As a final note, be aware that some window managers (such as FVWM) take
11110 control of some of the function keys or motion keys.
11115 is listed here as generating
11119 , but FVWM grabs it and uses it to change virtual desktops instead.
11120 Very annoying unless you instruct your window manager to stop intercepting
11124 \begin_layout Section
11128 \begin_layout LyX-Code
11132 \begin_layout LyX-Code
11136 \begin_layout LyX-Code
11140 \begin_layout LyX-Code
11141 Icon "buffer-write"
11144 \begin_layout LyX-Code
11145 Icon "buffer-print"
11148 \begin_layout LyX-Code
11152 \begin_layout LyX-Code
11156 \begin_layout LyX-Code
11160 \begin_layout LyX-Code
11164 \begin_layout LyX-Code
11168 \begin_layout LyX-Code
11172 \begin_layout LyX-Code
11176 \begin_layout LyX-Code
11180 \begin_layout LyX-Code
11184 \begin_layout LyX-Code
11188 \begin_layout LyX-Code
11192 \begin_layout LyX-Code
11196 \begin_layout LyX-Code
11197 Icon "footnote-insert"
11200 \begin_layout LyX-Code
11201 Icon "marginpar-insert"
11204 \begin_layout LyX-Code
11208 \begin_layout LyX-Code
11212 \begin_layout LyX-Code
11213 Icon "figure-insert"
11216 \begin_layout LyX-Code
11217 Icon "dialog-tabular-insert"
11220 \begin_layout LyX-Code
11224 \begin_layout Section
11228 \begin_layout Standard
11229 Note that the following bindings are for LyX with English menus.
11230 The second character of the binding depends on the menu language.
11232 \begin_inset Quotes eld
11240 \begin_inset Quotes erd
11243 is with German menus
11244 \begin_inset Quotes eld
11252 \begin_inset Quotes erd
11256 To find out the shortcuts of your language press the Meta (Alt)-key and
11257 press then the keys of the underlined characters of the menu names.
11260 \begin_layout Subsection
11265 \labelwidthstring 00.00.0000
11277 \labelwidthstring 00.00.0000
11289 \labelwidthstring 00.00.0000
11301 \labelwidthstring 00.00.0000
11315 \labelwidthstring 00.00.0000
11327 \labelwidthstring 00.00.0000
11341 \labelwidthstring 00.00.0000
11353 \labelwidthstring 00.00.0000
11365 \labelwidthstring 00.00.0000
11377 \labelwidthstring 00.00.0000
11389 \labelwidthstring 00.00.0000
11397 buffer-new-template
11401 \labelwidthstring 00.00.0000
11416 \labelwidthstring 00.00.0000
11427 \labelwidthstring 00.00.0000
11438 \labelwidthstring 00.00.0000
11449 \labelwidthstring 00.00.0000
11460 \labelwidthstring 00.00.0000
11471 \labelwidthstring 00.00.0000
11483 \labelwidthstring 00.00.0000
11494 \begin_layout Subsection
11499 \labelwidthstring 00.00.0000
11511 \labelwidthstring 00.00.0000
11523 \labelwidthstring 00.00.0000
11535 \labelwidthstring 00.00.0000
11547 \labelwidthstring 00.00.0000
11559 \labelwidthstring 00.00.0000
11571 \labelwidthstring 00.00.0000
11586 \labelwidthstring 00.00.0000
11593 tabular-feature append-row
11597 \labelwidthstring 00.00.0000
11604 tabular-feature toggle-line-bottom
11608 \labelwidthstring 00.00.0000
11615 tabular-feature align-center
11619 \labelwidthstring 00.00.0000
11626 tabular-feature delete-column
11630 \labelwidthstring 00.00.0000
11637 tabular-feature align-left
11641 \labelwidthstring 00.00.0000
11648 tabular-feature align-right
11652 \labelwidthstring 00.00.0000
11659 tabular-feature toggle-line-left
11663 \labelwidthstring 00.00.0000
11670 tabular-feature multicolumn
11674 \labelwidthstring 00.00.0000
11681 tabular-feature valign-center
11685 \labelwidthstring 00.00.0000
11692 tabular-feature valign-top
11696 \labelwidthstring 00.00.0000
11703 tabular-feature toggle-line-right
11707 \labelwidthstring 00.00.0000
11714 tabular-feature toggle-line-top
11718 \labelwidthstring 00.00.0000
11725 tabular-feature append-column
11729 \labelwidthstring 00.00.0000
11736 tabular-feature valign-bottom
11740 \labelwidthstring 00.00.0000
11747 tabular-feature delete-row
11752 \labelwidthstring 00.00.0000
11765 \labelwidthstring 00.00.0000
11772 floats-operate openfoot
11776 \labelwidthstring 00.00.0000
11783 floats-operate closefoot
11787 \labelwidthstring 00.00.0000
11794 floats-operate openfig
11798 \labelwidthstring 00.00.0000
11809 \labelwidthstring 00.00.0000
11820 \labelwidthstring 00.00.0000
11827 floats-operate closefig
11832 \labelwidthstring 00.00.0000
11844 \labelwidthstring 00.00.0000
11858 \labelwidthstring 00.00.0000
11870 \labelwidthstring 00.00.0000
11882 \labelwidthstring 00.00.0000
11896 \labelwidthstring 00.00.0000
11908 \labelwidthstring 00.00.0000
11923 \labelwidthstring 00.00.0000
11930 primary-selection-paste
11934 \labelwidthstring 00.00.0000
11941 primary-selection-paste paragraph
11945 \begin_layout Subsection
11950 \labelwidthstring 00.00.0000
11965 \labelwidthstring 00.00.0000
11972 buffer-float-insert algorithm
11976 \labelwidthstring 00.00.0000
11983 buffer-float-insert wide-tab
11987 \labelwidthstring 00.00.0000
11994 buffer-float-insert figure
11998 \labelwidthstring 00.00.0000
12005 buffer-float-insert table
12009 \labelwidthstring 00.00.0000
12016 buffer-float-insert wide-fig
12021 \labelwidthstring 00.00.0000
12029 dialog-tabular-insert
12033 \labelwidthstring 00.00.0000
12045 \labelwidthstring 00.00.0000
12057 \labelwidthstring 00.00.0000
12065 buffer-child-insert
12069 \labelwidthstring 00.00.0000
12081 \labelwidthstring 00.00.0000
12093 \labelwidthstring 00.00.0000
12105 \labelwidthstring 00.00.0000
12117 \labelwidthstring 00.00.0000
12129 \labelwidthstring 00.00.0000
12141 \labelwidthstring 00.00.0000
12153 \labelwidthstring 00.00.0000
12168 \labelwidthstring 00.00.0000
12179 \labelwidthstring 00.00.0000
12190 \labelwidthstring 00.00.0000
12201 \labelwidthstring 00.00.0000
12212 \labelwidthstring 00.00.0000
12223 \labelwidthstring 00.00.0000
12235 \labelwidthstring 00.00.0000
12247 \labelwidthstring 00.00.0000
12262 \labelwidthstring 00.00.0000
12269 protected-space-insert
12273 \labelwidthstring 00.00.0000
12280 end-of-sentence-period-insert
12284 \labelwidthstring 00.00.0000
12295 \labelwidthstring 00.00.0000
12306 \labelwidthstring 00.00.0000
12317 \labelwidthstring 00.00.0000
12324 menu-separator-insert
12328 \labelwidthstring 00.00.0000
12335 hyphenation-point-insert
12339 \labelwidthstring 00.00.0000
12350 \labelwidthstring 00.00.0000
12357 command-sequence math-insert ^;math-mode;
12361 \labelwidthstring 00.00.0000
12368 command-sequence math-insert _;math-mode;
12373 \labelwidthstring 00.00.0000
12388 \labelwidthstring 00.00.0000
12395 file-insert-plaintext lines
12399 \labelwidthstring 00.00.0000
12406 file-insert-plaintext paragraphs
12410 \labelwidthstring 00.00.0000
12422 \labelwidthstring 00.00.0000
12434 \labelwidthstring 00.00.0000
12446 \labelwidthstring 00.00.0000
12457 \begin_layout Subsection
12462 \labelwidthstring 00.00.0000
12474 \labelwidthstring 00.00.0000
12486 \labelwidthstring 00.00.0000
12498 \labelwidthstring 00.00.0000
12510 \labelwidthstring 00.00.0000
12522 \labelwidthstring 00.00.0000
12534 \labelwidthstring 00.00.0000
12546 \labelwidthstring 00.00.0000
12558 \labelwidthstring 00.00.0000
12566 layout-save-default
12570 \labelwidthstring 00.00.0000
12582 \labelwidthstring 00.00.0000
12594 \labelwidthstring 00.00.0000
12605 \begin_layout Subsubsection
12608 Layout\SpecialChar \menuseparator
12615 \labelwidthstring 00.00.0000
12627 \labelwidthstring 00.00.0000
12639 \labelwidthstring 00.00.0000
12651 \labelwidthstring 00.00.0000
12663 \labelwidthstring 00.00.0000
12675 \labelwidthstring 00.00.0000
12687 \labelwidthstring 00.00.0000
12699 \labelwidthstring 00.00.0000
12711 \labelwidthstring 00.00.0000
12723 \labelwidthstring 00.00.0000
12735 \labelwidthstring 00.00.0000
12747 \labelwidthstring 00.00.0000
12759 \labelwidthstring 00.00.0000
12771 \labelwidthstring 00.00.0000
12783 \labelwidthstring 00.00.0000
12795 \labelwidthstring 00.00.0000
12807 \labelwidthstring 00.00.0000
12819 \labelwidthstring 00.00.0000
12831 \labelwidthstring 00.00.0000
12843 \labelwidthstring 00.00.0000
12855 \labelwidthstring 00.00.0000
12867 \labelwidthstring 00.00.0000
12879 \labelwidthstring 00.00.0000
12891 \labelwidthstring 00.00.0000
12903 \labelwidthstring 00.00.0000
12915 \labelwidthstring 00.00.0000
12927 \labelwidthstring 00.00.0000
12939 \labelwidthstring 00.00.0000
12951 \labelwidthstring 00.00.0000
12963 \labelwidthstring 00.00.0000
12975 \labelwidthstring 00.00.0000
12987 \labelwidthstring 00.00.0000
12998 \begin_layout Subsection
13002 \begin_layout Subsection
13006 \begin_layout Subsection
13010 \begin_layout Subsection
13015 \labelwidthstring 00.00.0000
13027 \labelwidthstring 00.00.0000
13039 \labelwidthstring 00.00.0000
13051 \labelwidthstring 00.00.0000
13063 \labelwidthstring 00.00.0000
13075 \labelwidthstring 00.00.0000
13083 layout ShortFoilhead
13087 \labelwidthstring 00.00.0000
13099 \labelwidthstring 00.00.0000
13111 \labelwidthstring 00.00.0000
13123 \labelwidthstring 00.00.0000
13135 \labelwidthstring 00.00.0000
13143 layout ShortRotatefoilhead
13147 \labelwidthstring 00.00.0000
13159 \labelwidthstring 00.00.0000
13171 \labelwidthstring 00.00.0000
13183 \labelwidthstring 00.00.0000
13191 drop-layouts-choice
13195 \labelwidthstring 00.00.0000
13210 \labelwidthstring 00.00.0000
13225 \labelwidthstring 00.00.0000
13237 \labelwidthstring 00.00.0000
13249 \labelwidthstring 00.00.0000
13257 layout Subsubsection
13261 \labelwidthstring 00.00.0000
13273 \labelwidthstring 00.00.0000
13281 layout Subparagraph
13285 \labelwidthstring 00.00.0000
13289 asterisk\InsetSpace ~
13298 \labelwidthstring 00.00.0000
13302 asterisk\InsetSpace ~
13311 \labelwidthstring 00.00.0000
13315 asterisk\InsetSpace ~
13324 \labelwidthstring 00.00.0000
13328 asterisk\InsetSpace ~
13337 \labelwidthstring 00.00.0000
13341 asterisk\InsetSpace ~
13346 layout Subsubsection*
13350 \labelwidthstring 00.00.0000
13354 asterisk\InsetSpace ~
13363 \labelwidthstring 00.00.0000
13367 asterisk\InsetSpace ~
13372 layout Subparagraph*
13376 \labelwidthstring 00.00.0000
13388 \labelwidthstring 00.00.0000
13396 layout Bibliography
13400 \labelwidthstring 00.00.0000
13412 \labelwidthstring 00.00.0000
13424 \labelwidthstring 00.00.0000
13436 \labelwidthstring 00.00.0000
13448 \labelwidthstring 00.00.0000
13460 \labelwidthstring 00.00.0000
13468 layout Rotatefoilhead
13472 \labelwidthstring 00.00.0000
13480 layout RightAddress
13484 \labelwidthstring 00.00.0000
13496 \labelwidthstring 00.00.0000
13508 \labelwidthstring 00.00.0000
13520 \labelwidthstring 00.00.0000
13531 \begin_layout Standard
13532 These ones are kept for backwards compatibility, but only make sense on
13537 \labelwidthstring 00.00.0000
13549 \labelwidthstring 00.00.0000
13557 layout Subsubsection*
13561 \labelwidthstring 00.00.0000
13572 \begin_layout Section
13576 \begin_layout Subsection
13583 \labelwidthstring 00.00.0000
13594 \labelwidthstring 00.00.0000
13605 \labelwidthstring 00.00.0000
13616 \labelwidthstring 00.00.0000
13627 \labelwidthstring 00.00.0000
13638 \labelwidthstring 00.00.0000
13649 \labelwidthstring 00.00.0000
13656 hyphenation-point-insert
13660 \labelwidthstring 00.00.0000
13671 \labelwidthstring 00.00.0000
13678 line-delete-forward
13682 \labelwidthstring 00.00.0000
13693 \labelwidthstring 00.00.0000
13704 \labelwidthstring 00.00.0000
13715 \labelwidthstring 00.00.0000
13726 \labelwidthstring 00.00.0000
13737 \labelwidthstring 00.00.0000
13748 \labelwidthstring 00.00.0000
13759 \labelwidthstring 00.00.0000
13770 \labelwidthstring 00.00.0000
13781 \labelwidthstring 00.00.0000
13792 \labelwidthstring 00.00.0000
13803 \labelwidthstring 00.00.0000
13814 \labelwidthstring 00.00.0000
13826 \labelwidthstring 00.00.0000
13838 \labelwidthstring 00.00.0000
13850 \labelwidthstring 00.00.0000
13862 \labelwidthstring 00.00.0000
13875 \labelwidthstring 00.00.0000
13887 \labelwidthstring 00.00.0000
13899 \labelwidthstring 00.00.0000
13911 \labelwidthstring 00.00.0000
13923 \labelwidthstring 00.00.0000
13936 \labelwidthstring 00.00.0000
13948 \labelwidthstring 00.00.0000
13960 \labelwidthstring 00.00.0000
13973 \labelwidthstring 00.00.0000
13986 \labelwidthstring 00.00.0000
13999 \labelwidthstring 00.00.0000
14012 \labelwidthstring 00.00.0000
14025 \labelwidthstring 00.00.0000
14038 \labelwidthstring 00.00.0000
14050 \labelwidthstring 00.00.0000
14062 \labelwidthstring 00.00.0000
14074 \labelwidthstring 00.00.0000
14082 menu-open Documents
14086 \labelwidthstring 00.00.0000
14098 \labelwidthstring 00.00.0000
14110 \labelwidthstring 00.00.0000
14122 \labelwidthstring 00.00.0000
14134 \labelwidthstring 00.00.0000
14146 \labelwidthstring 00.00.0000
14154 buffer-toggle-read-only
14158 \labelwidthstring 00.00.0000
14170 \labelwidthstring 00.00.0000
14182 \labelwidthstring 00.00.0000
14194 \labelwidthstring 00.00.0000
14205 \labelwidthstring 00.00.0000
14216 \labelwidthstring 00.00.0000
14227 \labelwidthstring 00.00.0000
14238 \labelwidthstring 00.00.0000
14249 \labelwidthstring 00.00.0000
14260 \labelwidthstring 00.00.0000
14271 \labelwidthstring 00.00.0000
14282 \labelwidthstring 00.00.0000
14293 \labelwidthstring 00.00.0000
14304 \labelwidthstring 00.00.0000
14315 \labelwidthstring 00.00.0000
14326 \labelwidthstring 00.00.0000
14337 \labelwidthstring 00.00.0000
14348 \labelwidthstring 00.00.0000
14355 word-delete-forward
14359 \labelwidthstring 00.00.0000
14366 word-delete-backward
14370 \labelwidthstring 00.00.0000
14381 \labelwidthstring 00.00.0000
14388 end-of-sentence-period-insert
14392 \labelwidthstring 00.00.0000
14399 protected-space-insert
14403 \labelwidthstring 00.00.0000
14414 \labelwidthstring 00.00.0000
14425 \labelwidthstring 00.00.0000
14436 \labelwidthstring 00.00.0000
14447 \labelwidthstring 00.00.0000
14458 \labelwidthstring 00.00.0000
14469 \labelwidthstring 00.00.0000
14476 buffer-begin-select
14480 \labelwidthstring 00.00.0000
14491 \labelwidthstring 00.00.0000
14498 paragraph-up-select
14502 \labelwidthstring 00.00.0000
14509 paragraph-down-select
14513 \labelwidthstring 00.00.0000
14520 word-backward-select
14524 \labelwidthstring 00.00.0000
14531 word-forward-select
14535 \labelwidthstring 00.00.0000
14546 \labelwidthstring 00.00.0000
14553 word-delete-forward
14557 \labelwidthstring 00.00.0000
14568 \labelwidthstring 00.00.0000
14579 \labelwidthstring 00.00.0000
14590 \labelwidthstring 00.00.0000
14601 \labelwidthstring 00.00.0000
14608 break-paragraph-keep-layout
14612 \labelwidthstring 00.00.0000
14622 \begin_layout Subsection
14629 \labelwidthstring 00.00.0000
14640 \labelwidthstring 00.00.0000
14651 \labelwidthstring 00.00.0000
14662 \labelwidthstring 00.00.0000
14673 \labelwidthstring 00.00.0000
14684 \labelwidthstring 00.00.0000
14695 \labelwidthstring 00.00.0000
14706 \labelwidthstring 00.00.0000
14717 \labelwidthstring 00.00.0000
14728 \labelwidthstring 00.00.0000
14739 \labelwidthstring 00.00.0000
14750 \labelwidthstring 00.00.0000
14761 \labelwidthstring 00.00.0000
14772 \labelwidthstring 00.00.0000
14783 \labelwidthstring 00.00.0000
14794 \labelwidthstring 00.00.0000
14805 \labelwidthstring 00.00.0000
14816 \labelwidthstring 00.00.0000
14827 \labelwidthstring 00.00.0000
14838 \labelwidthstring 00.00.0000
14849 \labelwidthstring 00.00.0000
14860 \labelwidthstring 00.00.0000
14871 \labelwidthstring 00.00.0000
14878 protected-space-insert
14882 \labelwidthstring 00.00.0000
14893 \labelwidthstring 00.00.0000
14904 \labelwidthstring 00.00.0000
14915 \labelwidthstring 00.00.0000
14922 buffer-new-template
14926 \labelwidthstring 00.00.0000
14937 \labelwidthstring 00.00.0000
14948 \labelwidthstring 00.00.0000
14959 \labelwidthstring 00.00.0000
14970 \labelwidthstring 00.00.0000
14981 \labelwidthstring 00.00.0000
14992 \labelwidthstring 00.00.0000
15003 \labelwidthstring 00.00.0000
15010 end-of-sentence-period-insert
15014 \labelwidthstring 00.00.0000
15025 \labelwidthstring 00.00.0000
15036 \labelwidthstring 00.00.0000
15043 hyphenation-point-insert
15047 \labelwidthstring 00.00.0000
15058 \labelwidthstring 00.00.0000
15065 protected-space-insert
15069 \labelwidthstring 00.00.0000
15080 \labelwidthstring 00.00.0000
15091 \labelwidthstring 00.00.0000
15102 \labelwidthstring 00.00.0000
15113 \labelwidthstring 00.00.0000
15124 \labelwidthstring 00.00.0000
15135 \labelwidthstring 00.00.0000
15146 \labelwidthstring 00.00.0000
15157 \labelwidthstring 00.00.0000
15168 \labelwidthstring 00.00.0000
15179 \labelwidthstring 00.00.0000
15190 \labelwidthstring 00.00.0000
15201 \labelwidthstring 00.00.0000
15212 \labelwidthstring 00.00.0000
15223 \labelwidthstring 00.00.0000
15234 \labelwidthstring 00.00.0000
15241 word-delete-forward
15245 \labelwidthstring 00.00.0000
15252 word-delete-backward
15256 \labelwidthstring 00.00.0000
15267 \labelwidthstring 00.00.0000
15278 \labelwidthstring 00.00.0000
15289 \labelwidthstring 00.00.0000
15300 \labelwidthstring 00.00.0000
15307 paragraph-down-select
15311 \labelwidthstring 00.00.0000
15322 \labelwidthstring 00.00.0000
15329 buffer-begin-select
15333 \labelwidthstring 00.00.0000
15340 word-backward-select
15344 \labelwidthstring 00.00.0000
15351 word-forward-select
15355 \labelwidthstring 00.00.0000
15362 paragraph-up-select
15366 \labelwidthstring 00.00.0000
15377 \labelwidthstring 00.00.0000
15384 break-paragraph-keep-layout
15388 \labelwidthstring 00.00.0000
15399 \labelwidthstring 00.00.0000
15410 \labelwidthstring 00.00.0000
15421 \labelwidthstring 00.00.0000
15432 \labelwidthstring 00.00.0000
15443 \labelwidthstring 00.00.0000
15454 \labelwidthstring 00.00.0000
15465 \labelwidthstring 00.00.0000
15476 \labelwidthstring 00.00.0000
15487 \labelwidthstring 00.00.0000
15498 \labelwidthstring 00.00.0000
15508 \begin_layout Subsection
15514 \begin_layout Standard
15515 These are LyX keyboard definitions for mathematics, similar to those of
15519 \begin_layout Standard
15520 The bindings file and the present documentation were prepared by Serge Winitzki
15521 with assistance from Jean-Marc Lasgouttes.
15522 Version 1.3, for LyX 1.2.x and 1.3.x.
15525 \begin_layout Standard
15526 These definitions make it a lot easier to type equations without using the
15527 mouse, especially for people familiar with Scientific Word.
15528 The standard LyX bindings such as
15539 \begin_layout Standard
15540 Tip: to find the "LyX bind name" for a key, look at the status bar after
15541 typing some non-existent key combination.
15543 to find how "Ctrl-&" is referenced, press Ctrl-S and then Ctrl-&: the status
15544 bar shows "C-s S-C-ampersand." (This does not work in LyX 1.3.0!)
15548 \labelwidthstring 00.00.0000
15557 -- Copy, cut, paste is as in Sciword,
15573 \labelwidthstring 00.00.0000
15582 -- Display equation toggle: type
15586 to insert a displayed formula (
15591 \begin_inset Quotes eld
15595 \begin_inset Quotes erd
15603 in a displayed formula to convert it back to an inline formula.
15607 \labelwidthstring 00.00.0000
15622 to insert a fraction (
15627 \begin_inset Quotes eld
15631 \begin_inset Quotes erd
15635 You can also select an expression and type
15639 to convert it to the numerator of a fraction.
15648 end of the denominator will delete the numerator and convert the denominator
15653 \labelwidthstring 00.00.0000
15665 \begin_inset Formula $\int$
15673 \begin_inset Quotes eld
15677 \begin_inset Quotes erd
15684 \labelwidthstring 00.00.0000
15691 line-delete-forward
15693 -- Emacs-like binding: delete forward of cursor to end of line.
15697 \labelwidthstring 00.00.0000
15706 -- A text/math toggle (
15711 \begin_inset Quotes eld
15715 \begin_inset Quotes erd
15718 ): switches to math in text mode, and also inserts roman text in math mode.
15728 \begin_inset Quotes eld
15732 \begin_inset Quotes erd
15739 \labelwidthstring 00.00.0000
15748 -- Add/remove numbering in a single equation.
15752 \labelwidthstring 00.00.0000
15761 -- Add/remove numbering at a line in equation arrays.
15764 \begin_layout Standard
15765 The above commands are toggles that control the numbering of equations (
15770 \begin_inset Quotes eld
15774 \begin_inset Quotes erd
15778 Note: when deleting a number in a labeled eqnarray, the label is not really
15779 removed (the TeX code becomes
15780 \begin_inset Quotes eld
15792 \begin_inset Quotes erd
15795 ) and this generates a (harmless) LaTeX warning.
15799 \labelwidthstring 00.00.0000
15808 -- Open a new document.
15813 \labelwidthstring 00.00.0000
15822 -- Insert a quote character " (
15827 \begin_inset Quotes eld
15831 \begin_inset Quotes erd
15836 \begin_inset Quotes eld
15840 \begin_inset Quotes erd
15843 double quote character that you get by default.
15847 \labelwidthstring 00.00.0000
15858 -- Square root sign
15859 \begin_inset Formula $\sqrt{x}$
15867 \begin_inset Quotes eld
15871 \begin_inset Quotes erd
15878 \labelwidthstring 00.00.0000
15890 \begin_inset Formula $\sqrt[n]{x}$
15897 \labelwidthstring 00.00.0000
15906 -- Another binding for a switch between the text and the math mode (
15911 \begin_inset Quotes eld
15915 \begin_inset Quotes erd
15919 Note that the roman text inserted in math mode is special.
15923 \labelwidthstring 00.00.0000
15936 the selected text (text mode only, use things like
15952 \labelwidthstring 00.00.0000
15961 -- W*ndows heritage.
15965 \labelwidthstring 00.00.0000
15974 -- Close the current document (again, a W*ndows heritage).
15978 \labelwidthstring 00.00.0000
15989 \labelwidthstring 00.00.0000
16000 \labelwidthstring 00.00.0000
16010 \begin_inset Quotes eld
16014 \begin_inset Quotes erd
16018 \begin_inset Quotes eld
16022 \begin_inset Quotes erd
16028 \begin_layout Standard
16029 Bracket delimiters: press
16033 -<bracket key> to insert a matching pair of delimiters.
16038 inserts a pair of parentheses
16039 \begin_inset Formula $\left[\right]$
16047 does the same thing.) It will switch to math mode if needed.
16048 The supported characters are ( [ { < |.
16049 It is the same to press the right or the left bracket.
16050 The corresponding delimiters are
16051 \begin_inset Formula $\left(\right)$
16055 \begin_inset Formula $\left[\right]$
16059 \begin_inset Formula $\left\{ \right\} $
16063 \begin_inset Formula $\left\langle \right\rangle $
16067 \begin_inset Formula $\left|\right|$
16072 \begin_inset Quotes eld
16076 \begin_inset Quotes erd
16079 and resize with their contents.
16080 Use Math Panel to get other or non-matching delimiters.
16081 Press backspace on the
16085 delimiter to remove both
16086 \begin_inset Quotes eld
16090 \begin_inset Quotes erd
16093 delimiters without removing their contents.
16097 \labelwidthstring 00.00.0000
16106 -- for convenience, pressing
16120 \labelwidthstring 00.00.0000
16131 \labelwidthstring 00.00.0000
16142 \labelwidthstring 00.00.0000
16153 \labelwidthstring 00.00.0000
16164 \labelwidthstring 00.00.0000
16175 \labelwidthstring 00.00.0000
16182 math-delim langle rangle
16184 -- angular delimiters
16185 \begin_inset Formula $\left\langle \right\rangle $
16188 , not to confuse with ordinary < > signs.
16192 \labelwidthstring 00.00.0000
16199 math-delim langle rangle
16202 \begin_layout Standard
16203 The bar bracket: on some keyboards (e.g.\InsetSpace ~
16204 some British ones), the bar character
16209 -something and on some wayward Unices to "brokenbar".
16210 So we define all of these keys as well.
16214 \labelwidthstring 00.00.0000
16225 \labelwidthstring 00.00.0000
16236 \labelwidthstring 00.00.0000
16247 \labelwidthstring 00.00.0000
16258 \labelwidthstring 00.00.0000
16268 \begin_layout Standard
16269 Accents are in most cases
16273 -<accent key>, e.g.\InsetSpace ~
16287 for tilde (you also need to press
16293 \begin_inset Quotes eld
16305 \begin_inset Quotes erd
16309 Some accents work only in math mode and others only in text mode.
16313 \labelwidthstring 00.00.0000
16322 -- overdot accent, ȧ (text mode only).
16326 \labelwidthstring 00.00.0000
16338 \begin_inset Formula $\dot{a}$
16341 (math mode only -- in physics this denotes a first derivative).
16345 \labelwidthstring 00.00.0000
16356 -- Vector accent over math
16357 \begin_inset Formula $\overrightarrow{x}$
16364 \labelwidthstring 00.00.0000
16373 -- umlaut accent, ä (text mode only)
16377 \labelwidthstring 00.00.0000
16388 -- double dot accent,
16389 \begin_inset Formula $\ddot{a}$
16392 (math mode only -- in physics this denotes a second derivative).
16393 To get a triple dot in math mode, use
16401 \labelwidthstring 00.00.0000
16410 -- grave accent à (text mode only, use
16420 \labelwidthstring 00.00.0000
16429 -- tilde accent ã (text mode only, use
16439 \labelwidthstring 00.00.0000
16448 -- acute accent á (text mode only, use
16458 \labelwidthstring 00.00.0000
16467 -- circumflex (caret) accent â (text mode only, use
16476 \begin_layout Standard
16478 The new key S-F2 for creating a LaTeX file seems handy.
16482 \labelwidthstring 00.00.0000
16491 -- Save current document.
16495 \labelwidthstring 00.00.0000
16502 buffer-export latex
16504 -- Write a LaTeX file for the current document.
16508 \labelwidthstring 00.00.0000
16517 -- Find and replace dialog.
16521 \labelwidthstring 00.00.0000
16538 \labelwidthstring 00.00.0000
16551 to quit LyX is the W*ndows w*ndow manager's mnemonic.
16554 \begin_layout Standard
16563 are used to switch fonts.
16568 to switch back to the normal font.
16569 The non-default font switches
16577 all work as toggles.
16578 They also work on the whole word if you put the cursor in the middle of
16579 the word, or if you select some text.
16583 \labelwidthstring 00.00.0000
16592 -- stop using any special font
16596 \labelwidthstring 00.00.0000
16613 \labelwidthstring 00.00.0000
16630 \labelwidthstring 00.00.0000
16647 \labelwidthstring 00.00.0000
16661 (Used sometimes for people's names.)
16664 \begin_layout Standard
16670 \begin_inset Quotes eld
16674 \begin_inset Quotes erd
16681 key (useful e.g.\InsetSpace ~
16682 if the keyboard has no working
16689 \begin_layout Standard
16690 Here are some Sciword-inspired mnemonics for frequently used math symbols.
16691 Many symbols start with a
16700 cannot be itself bound to anything.
16704 \labelwidthstring 00.00.0000
16716 \begin_inset Quotes eld
16720 \begin_inset Quotes erd
16724 \begin_inset Formula $\prime$
16728 This is frequently unnecessary: in most cases the normal apostrophe works
16731 \begin_inset Formula $x'+2x=0$
16734 , but in some cases this would generate a double superscript error in LaTeX.
16736 \begin_inset Formula $x^{\prime2}$
16740 \begin_inset Formula $x$
16743 prime squared) must be entered with the prime character.
16747 \labelwidthstring 00.00.0000
16755 command-sequence math-superscript; math-insert
16759 -- Insert a prime as a superscript (see example above).
16763 \labelwidthstring 00.00.0000
16772 -- Insert an upper index.
16779 \labelwidthstring 00.00.0000
16788 -- Insert a lower index.
16795 \labelwidthstring 00.00.0000
16807 -- Partial derivative symbol
16808 \begin_inset Formula $\partial$
16815 \labelwidthstring 00.00.0000
16827 -- Summation symbol
16828 \begin_inset Formula $\sum$
16831 (not the same as the Greek letter uppercase Sigma
16832 \begin_inset Formula $\Sigma$
16835 because it can resize and allows smart upper/lower limits).
16839 \labelwidthstring 00.00.0000
16852 \begin_inset Formula $\prod$
16855 (not the same as the Greek letter uppercase Pi,
16856 \begin_inset Formula $\Pi$
16863 \labelwidthstring 00.00.0000
16876 \begin_inset Formula $\infty$
16883 \labelwidthstring 00.00.0000
16896 \begin_inset Formula $\times$
16903 \labelwidthstring 00.00.0000
16913 -- Insert a stacked array
16914 \begin_inset Formula $\begin{array}{c}
16916 \end{array}\end{array}$
16920 (Frequently useful in formulae.)
16924 \labelwidthstring 00.00.0000
16935 \begin_inset Formula $\times$
16939 \begin_inset Formula $\begin{array}{ccc}
16944 (Then you can modify its size using the
16946 Edit\SpecialChar \menuseparator
16953 \labelwidthstring 00.00.0000
16966 \begin_inset Quotes eld
16970 \begin_inset Quotes erd
16974 \begin_inset Formula $\dagger$
16981 \labelwidthstring 00.00.0000
16994 \begin_inset Quotes eld
16998 \begin_inset Quotes erd
17002 \begin_inset Formula $\equiv$
17009 \labelwidthstring 00.00.0000
17021 \begin_inset Quotes eld
17024 Approximate equality
17025 \begin_inset Quotes erd
17029 \begin_inset Formula $\approx$
17036 \labelwidthstring 00.00.0000
17048 \begin_inset Quotes eld
17052 \begin_inset Quotes erd
17056 \begin_inset Formula $\sim$
17063 \labelwidthstring 00.00.0000
17075 \begin_inset Formula $\rightarrow$
17079 \begin_inset Formula $\lim_{x\rightarrow0}$
17086 \labelwidthstring 00.00.0000
17098 \begin_inset Formula $\leq$
17105 \labelwidthstring 00.00.0000
17116 -- Greater-or-equal
17117 \begin_inset Formula $\geq$
17124 \labelwidthstring 00.00.0000
17137 \begin_inset Quotes eld
17141 \begin_inset Quotes erd
17145 \begin_inset Formula $\ll$
17148 (useful in physics)
17152 \labelwidthstring 00.00.0000
17165 \begin_inset Quotes eld
17169 \begin_inset Quotes erd
17173 \begin_inset Formula $\gg$
17179 \begin_layout Subsection
17180 Standard math bindings
17184 \labelwidthstring 00.00.0000
17198 \labelwidthstring 00.00.0000
17210 \labelwidthstring 00.00.0000
17222 \labelwidthstring 00.00.0000
17236 \labelwidthstring 00.00.0000
17248 \labelwidthstring 00.00.0000
17260 \labelwidthstring 00.00.0000
17274 \labelwidthstring 00.00.0000
17286 \labelwidthstring 00.00.0000
17298 \labelwidthstring 00.00.0000
17310 \labelwidthstring 00.00.0000
17324 \labelwidthstring 00.00.0000
17338 \labelwidthstring 00.00.0000
17352 \labelwidthstring 00.00.0000
17366 \labelwidthstring 00.00.0000
17380 \labelwidthstring 00.00.0000
17394 \labelwidthstring 00.00.0000
17406 \labelwidthstring 00.00.0000
17420 \labelwidthstring 00.00.0000
17432 \labelwidthstring 00.00.0000
17444 \labelwidthstring 00.00.0000
17456 \labelwidthstring 00.00.0000
17468 \labelwidthstring 00.00.0000
17482 \labelwidthstring 00.00.0000
17494 \labelwidthstring 00.00.0000
17506 \labelwidthstring 00.00.0000
17518 \labelwidthstring 00.00.0000
17526 math-delim langle rangle
17530 \labelwidthstring 00.00.0000
17538 math-delim rangle langle
17542 \labelwidthstring 00.00.0000
17554 \labelwidthstring 00.00.0000
17568 \labelwidthstring 00.00.0000
17581 \begin_layout Subsection
17586 \labelwidthstring 00.00.0000
17598 \labelwidthstring 00.00.0000
17610 \labelwidthstring 00.00.0000
17622 \labelwidthstring 00.00.0000
17634 \labelwidthstring 00.00.0000