Quellcode-Bibliothek
© Kompilation durch diese Firma
[Weder Korrektheit noch Funktionsfähigkeit der Software werden zugesichert.]
Datei:
Example.thy
Sprache: SML
Spracherkennung für: .lyx vermutete Sprache: Delphi {Delphi[75] CS[105] Abap[133]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen] #This file was created by <mike> Thu Jan 28 23:57:44 1999
#LyX 1.0 (C) 1995-1998 Matthias Ettrich and the LyX Team
\lyxformat 2.15
\textclass book
\begin_preamble
\usepackage{multicol}
\IfFileExists{isolatin.def}
{\usepackage[isolatin]{inputenc}}
{\usepackage[latin1]{inputenc}}
\end_preamble
\language default
\inputencoding default
\fontscheme default
\graphics none
\paperfontsize default
\spacing single
\papersize letterpaper
\paperpackage a4
\use_geometry 0
\use_amsmath 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 2
\paperpagestyle headings
\layout Title
Customizing LyX: Features for the Advanced User
\layout Author
by the LyX Team
\layout Standard
\begin_inset LatexCommand \tableofcontents
\end_inset
\layout Chapter
Introduction
\layout Standard
This manual covers the customization features present in LyX.
While it is not yet 100% complete, most of the basics and a few advanced
features are covered.
\layout Chapter
LyX configuration files
\layout Standard
\begin_inset LatexCommand \label{chap:config}
\end_inset
This chapter aims at helping you to find your way through LyX configuration
files.
Before continuing to read this chapter, you should find out where your
LyX library directory is by using
\family sans
\bar under
H
\bar default
elp->
\bar under
V
\bar default
ersion
\family default
.
This directory is the place where LyX places its system-wide configuration
files, and we will simply name it
\family typewriter
LyXDir
\family default
in the remainder of this document.
\layout Section
What's in
\family typewriter
LyXDir
\family default
?
\layout Standard
Among the files and directories that you will find in a typical LyX installation
, the most interesting one is
\family typewriter
\series medium
lyxrc
\family default
\series default
, which is the main configuration file, as described in Chapter
\protected_separator
\begin_inset LatexCommand \ref{chap:lyxrc}
\end_inset
.
\layout Standard
Most customization that you might want to do to LyX are available through
this file.
However, many other inner aspects of LyX can be customized by modifying
the other files in
\family typewriter
LyXDir
\family default
.
They fall in different categories, described in the following subsections.
\layout Subsection
Automatically generated files
\layout Standard
These files are generated when you configure LyX.
They contain various default values that are guessed by inspection.
In general, it is not a good idea to modify them, since they might be overwritt
en at any time.
\layout List
\labelwidthstring 00.00.0000
\family typewriter
\series medium
lyxrc.defaults
\family default
\series default
is read just before
\family typewriter
lyxrc
\family default
.
It contains defaults for various commands.
If you don't like some values given there, you can override them in
\family typewriter
lyxrc
\family default
.
\layout List
\labelwidthstring 00.00.0000
\family typewriter
\series medium
packages.lst
\family default
\series default
contains the list of packages that have been recognized by LyX.
It is currently unused by the LyX program itself, but the information extracted
, and more, is made available with
\family sans
\bar under
H
\bar default
elp->L
\bar under
a
\bar default
TeX
\protected_separator
Configuration
\family default
.
\layout List
\labelwidthstring 00.00.0000
\family typewriter
\series medium
textclass.lst
\family default
\series default
is the list of textclasses that have been found in your
\family typewriter
layout/
\family default
directory, along with the associated LaTeX document class and their description.
\layout List
\labelwidthstring 00.00.0000
\family typewriter
doc/LaTeXConfig.lyx
\family default
is automatically generated during configuration from the file
\family typewriter
LaTeXConfig.lyx.in
\family default
.
Each string of the form
\begin_inset Quotes eld
\end_inset
@chk_foo@
\begin_inset Quotes erd
\end_inset
will be replaced by
\begin_inset Quotes eld
\end_inset
yes
\begin_inset Quotes erd
\end_inset
or
\begin_inset Quotes eld
\end_inset
no
\begin_inset Quotes erd
\end_inset
depending on whether the package
\family typewriter
foo
\family default
has been found.
\layout Subsection
Directories
\layout List
\labelwidthstring 00.00.0000
\family typewriter
\series medium
bind/
\family default
\series default
this directory contains files with the extension .bind that define the keybindin
gs used in LyX (see section
\protected_separator
\begin_inset LatexCommand \ref{sec:bindings}
\end_inset
).
If there exists an internationalized version of the bindfile named
\family typewriter
$LANG_xxx.bind
\family default
, that will be used first.
See Chapter
\protected_separator
\begin_inset LatexCommand \ref{chap:i18n}
\end_inset
, and section
\begin_inset LatexCommand \ref{sec:bindings}
\end_inset
for details.
\layout List
\labelwidthstring 00.00.0000
\family typewriter
\series medium
clipart/
\family default
\series default
contains Postscript� pictures that can be included in documents.
\layout List
\labelwidthstring 00.00.0000
\family typewriter
\series medium
doc/
\family default
\series default
contains LyX documentation files (including the one you are currently reading).
The file
\family typewriter
LaTeXConfig.lyx
\family default
deserves special attention, as noted above.
If there exists an internationalized version of the help-document with
\family typewriter
$LANG_
\family default
prepended to the name, that will be used first.
See Chapter
\protected_separator
\begin_inset LatexCommand \ref{chap:i18n}
\end_inset
for details.
\layout List
\labelwidthstring 00.00.0000
\family typewriter
\series medium
examples/
\family default
\series default
contains example files that explain how to use some features.
In the file browser, press the
\family sans
Examples
\family default
button to get there.
\layout List
\labelwidthstring 00.00.0000
\family typewriter
images/
\family default
contains image files that are used by the
\family sans
Itemize
\protected_separator
Bullet
\protected_separator
Selection
\family default
popup.
It is planned that this directory will be used in future releases to support
custom icons and banners.
\layout List
\labelwidthstring 00.00.0000
\family typewriter
\series medium
kbd/
\family default
\series default
contains keyboard keymapping files.
See Chapter
\protected_separator
\begin_inset LatexCommand \ref{sec:keymap}
\end_inset
for details.
\layout List
\labelwidthstring 00.00.0000
\family typewriter
\series medium
layouts/
\family default
\series default
contains the textclass files described in Chapter
\protected_separator
\begin_inset LatexCommand \ref{chap:textclass}
\end_inset
.
\layout Subsection
Files you don't want to modify
\layout Standard
These files are used internally by LyX and you generally do not need to
modify them unless you are a developer.
\layout List
\labelwidthstring 00.00.0000
\family typewriter
\series medium
CREDITS
\family default
\series default
this file contains the list of LyX developers.
The contents are displayed with the menu entry
\family sans
\bar under
H
\bar default
elp->Cr
\bar under
e
\bar default
dits
\family default
.
\layout List
\labelwidthstring 00.00.0000
\family typewriter
\series medium
chkconfig.ltx
\family default
\series default
this is a LaTeX script used during the configuration process.
Do not run directly.
\layout List
\labelwidthstring 00.00.0000
\family typewriter
\series medium
configure
\family default
\series default
this is the script that is used to re-configure LyX.
It creates configuration files in the directory it was run from.
\layout Section
Your local configuration directory
\layout Standard
Even if you are using LyX as an unprivileged user, you might want to change
LyX configuration for your own use.
One new feature of LyX 0.12 was the introduction of a
\family typewriter
UserDir
\family default
directory that contains all your personal configuration files.
This is the directory described as
\begin_inset Quotes eld
\end_inset
user directory
\begin_inset Quotes erd
\end_inset
in
\family sans
\bar under
H
\bar default
elp->
\bar under
V
\bar default
ersion
\family default
.
This directory is used as a mirror of
\family typewriter
LyXDir
\family default
, which means that every file in
\family typewriter
UserDir
\family default
is a replacement for the corresponding file in
\family typewriter
LyXDir
\family default
.
Any configuration file described in the above sections can be placed either
in the system-wide directory, in which case it will affect all users, or
in your local directory for your own use.
\layout Standard
To make things clearer, let's provide a few examples:
\layout Itemize
when you reconfigure using
\family sans
\bar under
O
\bar default
ptions->
\bar under
R
\bar default
econfigure
\family default
, LyX runs
\family typewriter
configure
\family default
and the resulting files are written in your local configuration directory
(see section
\protected_separator
\begin_inset LatexCommand \ref{sec:autodetected}
\end_inset
to have a list of the
\family typewriter
lyxrc
\family default
settings affected by this section).
This means that any additional textclass file that you might have added
in
\family typewriter
UserDir/layouts
\family default
will be added to the list of classes in the
\family sans
\bar under
L
\bar default
ayout->
\bar under
D
\bar default
ocument
\family default
popup.
\layout Itemize
Similarly, if you have installed some LaTeX document classes in your home
directory, that LaTeX can find with your
\family typewriter
TEXINPUTS
\family default
path, they will show up in your list of text classes.
\begin_float footnote
\layout Standard
as long as LyX or yourself have a
\family typewriter
.layout
\family default
file for it, of course.
\end_float
\layout Itemize
If you get some updated documentation from LyX ftp site and cannot install
it because you do not have sysadmin rights on your system, you can just
copy the files in
\family typewriter
UserDir/doc/
\family default
and the items in the
\family sans
\bar under
H
\bar default
elp
\family default
menu will open them!
\layout Chapter
The
\family typewriter
lyxrc
\family default
File
\begin_inset LatexCommand \label{chap:lyxrc}
\end_inset
\layout Section
Customization with the
\family typewriter
lyxrc
\family default
-file
\layout Standard
LyX will read the file
\family typewriter
lyxrc
\family default
, when it is invoked.
This file include various settings that are described below.
Note that lines beginning with a
\begin_inset Quotes eld
\end_inset
\family typewriter
#
\family default
\begin_inset Quotes erd
\end_inset
are just comments and not interpreted.
\layout Standard
According to the file loading scheme described on page
\protected_separator
\begin_inset LatexCommand \pageref{chap:config}
\end_inset
, if
\family typewriter
UserDir/lyxrc
\family default
doesn't exist, LyX loads the system default file
\family typewriter
LyXDir/lyxrc
\family default
instead.
Only system administrators should edit the global
\family typewriter
lyxrc
\family default
file.
To design your own, copy
\family typewriter
lyxrc
\family default
to
\family typewriter
UserDir/
\family default
and use it as a template.
\layout Section
Bindings
\begin_inset LatexCommand \label{sec:bindings}
\end_inset
\layout Standard
command:
\family typewriter
\backslash
bind
\family default
\newline
format:
\family typewriter
\backslash
bind <key combination> <lyx-function>
\layout Standard
\family typewriter
\backslash
bind
\family default
is used to, well, bind a function to a key.
Both key combination and lyx-function (including any arguments) must be
enclosed in "double quotes".
Look in the bind files in
\family typewriter
(LyXDir/bind/)
\family default
for examples on how to use this command.
All the LyX functions are listed in the
\emph on
Reference Guide
\emph default
.
\layout Standard
LyX supports internationalization of the user interface (se Chapter
\protected_separator
\begin_inset LatexCommand \ref{chap:i18n}
\end_inset
).
If your
\emph on
locale
\emph default
is set, with the environment variable
\family typewriter
$LANG
\family default
, LyX will try to use bindfiles by prepending
\family typewriter
$LANG_
\family default
to their name.
For example, you can put in your personal
\family typewriter
bind/
\family default
directory a translated copy of some bind file.
\layout Section
Toolbar
\layout Standard
The toolbar is also configurable from
\family typewriter
lyxrc
\family default
.
This is done inside a
\emph on
toolbar section
\emph default
surrounded by
\family typewriter
\backslash
begin_toolbar
\family default
and
\family typewriter
\backslash
end_toolbar
\family default
commands.
The only legal commands inside this section are
\family typewriter
\backslash
add
\family default
,
\family typewriter
\backslash
layouts
\family default
, and
\family typewriter
\backslash
separator
\family default
.
\layout Standard
\family typewriter
\backslash
add
\family default
has this format:
\family typewriter
\backslash
add <lyx-function> [<parameters>]
\family default
(the parameters are optional) and adds a button for the specified function.
LyX has icons for a small subset of the functions, but you can bind any
function.
If you draw some nice icons, you can submit them to the LyX team, and we'll
provide support for them in a future release.
\layout Standard
The
\family typewriter
\backslash
layouts
\family default
command adds the paragraph environment drop-down list.
The
\family typewriter
\backslash
separator
\family default
command is used to add a little space between entries, and should be used
to organize the toolbar in a logical way.
Have a look in your
\family typewriter
lyxrc
\family default
file to see how the standard toolbar could be declared.
\layout Section
On-screen Previewing
\layout Standard
In addition to viewing documents within LyX, you can also preview your document
in the form in which it will appear on the paper output.
By default, LyX uses
\family typewriter
xdvi
\family default
for on-screen previewing of .
\family typewriter
dvi
\family default
files (the output from LaTeX).
\layout Standard
LyX can also use
\family typewriter
dvips
\family default
to convert
\family typewriter
.dvi
\family default
files to .
\family typewriter
ps
\family default
files and
\family typewriter
ghostview
\family default
for previewing.
A number of options in the
\family typewriter
lyxrc
\family default
file can be used to customize these settings.
\layout Description
\family typewriter
\series medium
\backslash
view_dvi_command
\family default
\series default
Allows you to replace
\family typewriter
xdvi
\family default
by some other
\family typewriter
.dvi
\family default
previewer, or to supply arguments to
\family typewriter
xdvi
\family default
.
\layout Description
\family typewriter
\series medium
\backslash
view_ps_command
\family default
\series default
Allows you to replace
\family typewriter
ghostview
\family default
with your preferred Post
\latex latex
\backslash
-
\latex default
Script previewer, or to provide arguments to
\family typewriter
ghostview
\family default
.
\layout Description
\family typewriter
\series medium
\backslash
view_pspic_command
\family default
\series default
Defines the program used to do full-screen previews of PostScript figures.
You can not use this setting to include any options.
\layout Description
\family typewriter
\series medium
\backslash
ps_command
\family default
\series default
Defines the program to use to embed PostScript figures within a LyX document.
You can not include any options.
If you define this to the empty string (""), LyX will not render any figures.
This can be useful if you have a slow machine and work with lots of figures.
\layout Description
\family typewriter
\series medium
\backslash
default_papersize
\family default
\series default
Sets the paper size used by LyX when previewing documents.
The default value is USletter paper.
If LaTeX is configured to use a different default size at your site, you
may wish to change this setting.
\layout Section
Printer
\layout Standard
There are a bunch of commands that help you setup the printer command from
LyX.
Normally, you only need to use a few of them, but all are provided for
completeness.
\layout Description
\family typewriter
\series medium
\backslash
printer
\family default
\series default
This setting defines the default name of your printer.
\layout Description
\family typewriter
\series medium
\backslash
print_command
\family default
\series default
This setting defines which command, LyX should use to print your document.
\layout Description
\family typewriter
\series medium
\backslash
print_evenpage_flag
\family default
\series default
This setting defines which flag to your printer command will trigger printing
of only the even pages.
\layout Description
\family typewriter
\series medium
\backslash
print_oddpage_flag
\family default
\series default
This setting defines which flag to give your printer command to print only
the odd pages.
\layout Description
\family typewriter
\series medium
\backslash
print_reverse_flag
\family default
\series default
With this command, you can define what flag that will cause your printing
command to print the pages in reverse order.
\layout Description
\family typewriter
\series medium
\backslash
print_landscape_flag
\family default
\series default
This command defines what flag is set when you've requested printing of
your document in landscape.
No option is passed, if the document is printed in portrait.
\layout Description
\family typewriter
\series medium
\backslash
print_to_printer
\family default
\series default
If you specify an explicit name of a printer, you'll typically have to
prepend this name with a flag on the printing command line.
This command defines what flag should appear before the printer name.
\layout Description
\family typewriter
\series medium
\backslash
print_to_file
\family default
\series default
If you want to print to a file, you have to provide a flag before the filename.
This command allows you to define how this flag looks.
\layout Description
\family typewriter
\series medium
\backslash
print_file_extension
\family default
\series default
When you print to a file, you can define what extension the printed file
will have with this command.
\layout Description
\family typewriter
\series medium
\backslash
print_extra_options
\family default
\series default
With this command, you can define a series of flags that will be put on
the printing command after the other flags.
\layout Description
\family typewriter
\series medium
\backslash
print_spool_cmd
\family default
\series default
If you specify something in this command, LyX will print in two steps:
First, the program specified with the
\family typewriter
\backslash
print_command
\family default
setting will be executed with the directive to print to a file.
Then, the command specified with
\family typewriter
\backslash
print_spool_cmd
\family default
will be executed with the output file from the previous command on the
command line, and if specified, the directive (
\family typewriter
\backslash
print_to_printer
\family default
) to send the output to a named printer before the filename.
\layout Standard
All in all, we hope that this will allow you to be able to print your documents
without fuss.
\layout Section
Screen & Fonts
\layout Standard
The font used to display your documents on the LyX screen is very important,
since you'll be reading all your documents with this font.
Therefor it is important that the font is as readable and good-looking
as possible.
The LyX team tried to provide the best possible default font for you, but
since practically all X11 systems are different, it's very likely that
the default fonts will be sub-optimal on your system.
Fortunately, you can do something about this.
Before we explain how to do this, you should learn a bit more about fonts
so that you are better prepared for choosing your fonts, because it is
a trade-off that is individual to your preferences and the capabilities
of your system.
\layout Standard
Notice that this section only deals with the fonts on the
\emph on
screen
\emph default
inside the LyX window.
The fonts that appear on the
\emph on
paper
\emph default
\emph on
output
\emph default
are independent from these fonts, and are determined by the document class.
Read the
\emph on
User's Guide
\emph default
to learn how to change the font of the printed version of your document.
\layout Standard
Basically, screen fonts come in two different kinds: Scalable outline fonts
and non-scalable bitmap fonts.
This distinction seems a bit arbitrary, since non-scalable fonts are actually
scalable in most modern font renderers.
The difference lies the
\emph on
quality
\emph default
of the scaling, and the
\emph on
speed
\emph default
of display.
The most important decision is thus whether you should use non-scalable
bitmap fonts or scalable outline fonts.
\layout Standard
The scalable fonts are build from
\emph on
outlines
\emph default
of the single glyphs (i.e.
characters) in the font.
This means that each glyph is defined using mathematical curves that are
well suited for scaling to any requested size.
This mathematical definition is interpreted by the font renderer and turned
into a small picture composed of pixels according to which size and glyph,
the programmer requests.
This means that scalable fonts will look pretty good in all sizes.
Well, almost all sizes.
Since scalable fonts are defined in an abstract way, it can be hard to
provide a good rendering at small sizes, where each pixel has to be very
carefully put to provide a good image.
Technically it is possible to do this from the mathematical definition,
but in order to keep the rendering reasonably fast, round-offs have to
be made, and the result is that scalable fonts can be difficult to read
at small sizes.
\layout Standard
Bitmap fonts on the other hand, are defined by bitmap graphics from the
start, so they will look good at all the sizes they are meant for.
However, they don't scale well, because in order to scale a glyph, each
pixel is enlarged into several pixels.
It is the same effect that happens if you try to enlarge a picture in xv
or any other picture manipulation program.
In order to relieve this effect, bitmap fonts are typically provided in
several fixed sizes typically from around 8 pixels high up to 34 pixels
or so high in steps according to what is believed to be useful.
The advantage of bitmap fonts is that no complicated computations are necessary
to display each glyph, so bitmap fonts are thus faster displayed than scalable
fonts.
The disadvantage is that sizes that don't exists as fixed versions have
to be scaled by doubling pixels, and thus look bad.
\layout Standard
The net result of all this, is that bitmap fonts are generally best for
the small sizes, where they are available, while scalable fonts are generally
best for large sizes.
The logical conclusion would thus be to use bitmap fonts for the small
sizes, and scalable fonts for the large sizes.
Unfortunately, this is not a good idea, since bitmap fonts and scalable
fonts are not designed to be used together, so the overall look of such
a scheme would be bad.
The best you can do is thus to try both schemes and decide for yourself
what suits you.
\layout Standard
By default, LyX uses non-scalable bitmap fonts.
For serif fonts,
\emph on
times
\emph default
is used, for sans serif fonts,
\emph on
helvetica
\emph default
is used, while
\emph on
courier
\emph default
is used as the monospaced/typewriter font.
\layout Standard
In the following, we will describe what to do if the text does not look
good in LyX.
We'll start with the most important parameters: DPI and font zoom.
\layout Subsection
DPI setting and Font Zoom
\layout Standard
LyX automatically tries to scale the fonts to look as close as the paper
output size as possible, except for the so-called font zoom factor.
\layout Standard
In order for this to work on all systems, it relies on the screen DPI (dots
per inch) setting to be correct.
The DPI setting for your system is autodetected by LyX using the information
the X server can provide.
You can check what LyX autodetects the DPI setting to, by running LyX as
\family typewriter
lyx -dbg 1
\family default
.
\layout Standard
On many systems, X is not set up correctly, so you should check that it
is correct by hand.
Run
\begin_inset Quotes eld
\end_inset
\family typewriter
xdpyinfo | less
\family default
\begin_inset Quotes erd
\end_inset
and write down what the DPI is for the resolution, you use (this will be
close to the value LyX detects).
It is the number mentioned as
\begin_inset Quotes eld
\end_inset
resolution
\begin_inset Quotes erd
\end_inset
.
Also write down the number of pixels you have in the width (the first number
under
\begin_inset Quotes eld
\end_inset
dimensions
\begin_inset Quotes erd
\end_inset
).
\layout Standard
Then get the good old ruler out of the closet, and measure the width of
the visible screen-image on your monitor.
Convert this measurement to inches if you used a centimeter ruler by multiplyin
g with 2.54.
Now you can determine the correct DPI setting for your screen by dividing
the number of pixels in the width by the width of the screen-image on the
monitor.
If this number is more than, say, 5 DPI from the detected value, you should
either fix the X setup, or at least tell LyX that the DPI is different
than the detected value.
\layout Standard
If you can't fix the X setup (which of course is best since other programs
than LyX will benefit from this as well), you can tell LyX the correct
DPI setting with the
\family typewriter
\backslash
screen_dpi
\family default
command by providing an integer argument, like this:
\layout Standard
\family typewriter
\backslash
screen_dpi 90
\layout Standard
When you've got the correct DPI setting, restart LyX and see if the text
looks good.
(Notice that the DPI value mentioned when you run LyX as
\family typewriter
lyx -dbg 1
\family default
is the autodetected value, so don't be worried when the figure does not
change even though you use the
\family typewriter
\backslash
screen_dpi
\family default
command.
LyX will use it even if it is silent about it.)
\layout Standard
If the text is too small or too big for your taste, you should fiddle with
the font zoom setting.
This setting is used to scale the point size of the text.
If your DPI setting is correct, and the font zoom setting is set to 100,
this means that LyX will try to display the text exactly the same size
as it will appear on the paper-output.
If you set the zoom factor to 200, the text will try to be 2 times as big
as on paper.
Of course, this will only happen if LyX can find a font that has the appropriat
e size, which you can't count on.
But since LyX is a WYSIWYM system anyways, this limitation isn't much of
an issue.
\layout Standard
The default font zoom setting is 150 since a monitor is typically wider
than a piece of paper, but you should try to fiddle with it through the
\family sans
Font
\protected_separator
\bar under
Z
\bar default
oom
\family default
setting in the
\family sans
Options->Screen
\protected_separator
Options
\family default
pop-up to find a size that you like.
When you've found a setting that seems to work nicely for you (tip: use
the
\family sans
\bar under
A
\bar default
pply
\family default
button to keep the pop-up open while you experiment), you can make this
setting the default by using the
\family typewriter
\backslash
screen_zoom
\family default
command in your
\family typewriter
lyxrc
\family default
file.
\layout Standard
While it is often possible to find a suitable size for the text on the screen,
this doesn't necessarily mean that the fonts are the best ones available
on your system.
In order to help you get the most out of your system, you can use the font
definition commands to fine-tune the look of the text in greater detail
than merely size.
\layout Subsection
Font definition commands
\layout Standard
As mentioned, LyX uses non-scalable bitmap fonts by default.
For serif fonts,
\emph on
times
\emph default
is used, for sans serif fonts,
\emph on
helvetica
\emph default
is used, while
\emph on
courier
\emph default
is used as the monospaced/typewriter font.
\layout Standard
You can change this with the following
\family typewriter
lyxrc
\family default
commands:
\layout Description
\family typewriter
\series medium
\backslash
screen_font_roman
\family default
\series default
defines the font to use for serif text, like this.
\layout Description
\family typewriter
\series medium
\backslash
screen_font_sans
\family default
\series default
defines the font to use for sans serif text,
\family sans
like this
\family default
.
\layout Description
\family typewriter
\series medium
\backslash
screen_font_typewriter
\family default
\series default
defines the font to use for typewriter/monospaced text,
\family typewriter
like this
\family default
.
\layout Standard
The number of fonts that are available on different systems vary, but the
program
\family typewriter
xfontsel
\family default
should be available everywhere.
Use that program to find candidate fonts.
When you've found a font that you like, try to insert the first two elements
of the name (called
\begin_inset Quotes eld
\end_inset
fndry
\begin_inset Quotes erd
\end_inset
and
\begin_inset Quotes eld
\end_inset
fmly
\begin_inset Quotes erd
\end_inset
in
\family typewriter
xfontsel
\family default
) in the appropriate field in the
\family sans
Options->Screen
\protected_separator
Options
\family default
pop-up and press
\family sans
\bar under
A
\bar default
pply
\family default
.
LyX will then reformat your document using the new font, and if you like
the font, you should put it in your
\family typewriter
lyxrc
\family default
file.
One place to start for a new font is to see if the scalable font
\begin_inset Quotes eld
\end_inset
utopia
\begin_inset Quotes erd
\end_inset
is available.
Tip: You can see whether a font is a bitmap font or a scalable font by
checking the
\begin_inset Quotes eld
\end_inset
resx
\begin_inset Quotes erd
\end_inset
or
\begin_inset Quotes eld
\end_inset
resy
\begin_inset Quotes erd
\end_inset
fields in
\family typewriter
xfontsel
\family default
.
If the value 0 is available, the font is scalable.
If the value 0 isn't available, the font is a bitmap font.
\layout Standard
Before you go about scrapping a bitmap font because the larger sizes look
\begin_inset Quotes eld
\end_inset
blocky
\begin_inset Quotes erd
\end_inset
, you should try to use the following command to make it better:
\layout Description
\family typewriter
\series medium
\backslash
screen_font_scalable
\family default
\series default
is a boolean that defines whether LyX should scale bitmap fonts or not.
\layout Standard
This is only useful if you use bitmap fonts, because only these don't scale
well.
If you define this flag, LyX will only use the fixed font sizes that are
available, and this guarantees that all bitmap fonts look well.
(You can see which individual font sizes are available with the
\family typewriter
xlsfonts
\family default
command.
Try
\family typewriter
man xlsfonts
\family default
.) However, the prize is that the difference between the size of the fonts
on screen and the size of fonts on paper will be larger because LyX will
have to be satisfied with the closest available size, and not try to scale
a size to fit.
Also, you can risk that some logically different sizes, such as
\family sans
Large
\family default
and
\family sans
Larger
\family default
, will be mapped to the same screen font, making it hard for you to see
the difference on screen.
We've decided to let this flag be
\family typewriter
false
\family default
by default because of these artifacts, but since LyX is a WYSIWYM system,
many people like to use the flag anyways, well-knowing that the font size
on the screen can't be trusted.
But remember that this flag only makes a difference when you use bitmap
fonts.
Scalable fonts won't be affected for reasons you should understand by now.
\layout Standard
One final note regarding this flag: you should know that there is nothing
wrong with using bitmap and scalable fonts at the same time for different
purposes.
For instance, it's common to use the scalable
\begin_inset Quotes eld
\end_inset
Utopia
\begin_inset Quotes erd
\end_inset
for the serif text together with a bitmap version of
\begin_inset Quotes eld
\end_inset
Helvetica
\begin_inset Quotes erd
\end_inset
.
And you can safely set the
\family typewriter
\series medium
\backslash
screen_font_scalable
\family default
\series default
setting to
\family typewriter
true
\family default
without worries: It will only apply to the Helvetica font.
\layout Standard
Sometimes the artifacts introduced by use the flag can be relieved by using
the fine-detail
\family typewriter
lyxrc
\family default
command
\family typewriter
\backslash
screen_font_sizes
\family default
which defines which point sizes the different logical font sizes correspond
to.
Run LyX as
\family typewriter
lyx -dbg 513
\family default
to see exactly what concrete fonts the logical sizes map to, and try adjusting
the corresponding entry in
\family typewriter
\backslash
screen_font_sizes
\family default
in your
\family typewriter
lyxrc
\family default
file until you've managed to hit the nail and get the fonts you want.
This can be hard to do, because LyX uses the DPI setting and the font zoom
settings to calculate which exact screen font size to ask the X server
for, thus obfuscating the mapping.
If you can't make it by trial-and-error, you can make the process more
transparent if you set both the DPI setting and font zoom settings to 100---eve
n when this is known to be wrong.
This will of course make your scalable fonts look weird, so use with care.
\layout Subsection
Font encoding
\layout Standard
By default, LyX will use fonts meant to write Western European text, including
all kinds of English.
This is defined through the so-called
\emph on
font
\emph default
\emph on
encoding
\emph default
.
If you want to use LyX to write for instance Eastern European text, Cyrillic
or any other language not covered by the ISO-8859-1 font encoding, you
can define a different one with the
\family typewriter
\backslash
screen_font_encoding
\family default
setting.
This requires you to have special fonts installed.
You can use
\family typewriter
xfontsel
\family default
to see whether this is the case: check the
\begin_inset Quotes eld
\end_inset
rgstry
\begin_inset Quotes erd
\end_inset
and
\begin_inset Quotes eld
\end_inset
encdng
\begin_inset Quotes erd
\end_inset
fields for ISO-8859-X values different from ISO-8859-1, and search for
one that contains the national characters of your language.
If you find any, define this value in your
\family typewriter
lyxrc
\family default
file.
If not, go searching the Web for appropriate fonts.
\layout Standard
When you've set LyX up to use a different font encoding, you should also
consider to change the font used by pop-up windows in LyX.
For instance, the
\family sans
Table
\protected_separator
of
\protected_separator
Contents
\family default
pop-up will not be understandable unless you tell LyX to use a different
font for this.
By default the menu font is set to
\family typewriter
-*-helvetica-medium-r
\family default
, but often Helvetica is not available in the font encoding you need.
Therefor you can change this font with the
\family typewriter
\backslash
screen_font_menu
\family default
command.
\layout Standard
As you can see, there are quite a few options that can be used to fine tune
the look of your fonts.
This should not scare you from fiddling with the settings, because after
all, you will hopefully be using LyX for many hours in the future.
And contrary to real WYSIWYG word processors where you are tied to use
fonts that have to look good both on paper and on screen, LyX gives you
the possibility to use fonts that are designed to look on the screen.
If you are lucky enough to have that.
\layout Standard
In LyX version 1.1, we will try to support the
\family typewriter
T1Lib
\family default
font renderer, which provides
\emph on
anti-aliased
\emph default
text.
This means that each glyph is built from several color shades rather than
just two colors, in effect giving what appears to be higher resolution.
This will not only make the text more readable on screen, but will also
allow LyX to get really close to the font sizes as they appear on paper,
since it will be possible for LyX to ask for, say, a point 14.4 font instance,
contrary to now, where this has to be rounded to point 14.
\layout Section
TeX
\layout Standard
Some sites
\begin_float footnote
\layout Standard
\emph on
like my office machine --Dave Johnson
\end_float
still have the default LaTeX version as 2.09.
Though I can't imagine why this should be the default any longer, it will
be necessary to deal with LyX in such an environment.
Don't even
\emph on
think
\emph default
about
\begin_inset Quotes eld
\end_inset
fixing
\begin_inset Quotes erd
\end_inset
LyX to run under LaTeX 2.09.
Upgrading your LaTeX will be easier, and is the right way to go, anyway.
Most large systems should, even if they default to 2.09, have a version
of LaTeX2e available, but perhaps using a different executable name.
You can change the name of the appropriate LaTeX command, say to the name
\begin_inset Quotes eld
\end_inset
\family typewriter
latex2e
\family default
\begin_inset Quotes erd
\end_inset
\begin_float footnote
\layout Standard
\emph on
as it is at my office --Dave Johnson
\end_float
by placing the line
\layout LyX-Code
\backslash
latex_command latex2e
\layout Standard
in your
\family typewriter
lyxrc
\family default
file.
At installation time, LyX will try to autodetect whether this setting is
needed, so normally, you don't need to worry about it.
\layout Section
The autodetected settings
\layout Standard
\begin_inset LatexCommand \label{sec:autodetected}
\end_inset
There are several items that are detected for you when you run
\latex latex
\family sans
\bar under
\latex default
O
\bar default
ption->
\bar under
R
\bar default
econfigure
\family default
.
In this section, we list those which pertain to
\family typewriter
lyxrc
\family default
.
In what follows, all the
\family typewriter
*_command
\family default
entries are set to none if no suitable command is found.
In this case, the corresponding functions are not available.
\layout Description
\family typewriter
\series medium
\backslash
latex_command
\family default
\series default
is set to a valid LaTeX2e processor (programs tested are
\family typewriter
latex
\family default
and
\family typewriter
latex2e
\family default
);
\layout Description
\family typewriter
\series medium
\backslash
ps_command
\family default
\series default
is set to
\family typewriter
gs
\family default
if you have Ghostscript installed;
\layout Description
\family typewriter
\series medium
\backslash
view_ps_command
\family default
\series default
is set to
\family typewriter
gv
\family default
or
\family typewriter
ghostview
\family default
if they are found (
\family typewriter
\backslash
view_pspic_command
\family default
is set to use the same program).
\layout Description
\family typewriter
\series medium
\backslash
ascii_roff_command
\family default
\series default
uses either
\family typewriter
groff
\family default
or
\family typewriter
nroff
\family default
+
\family typewriter
tbl
\family default
, depending on what is available.
\layout Description
\family typewriter
\series medium
\backslash
chktex_command
\family default
\series default
is set to
\family typewriter
chktex
\family default
plus a bunch of options;
\layout Description
\family typewriter
\series medium
\backslash
fax_command
\family default
\series default
is set to
\family typewriter
fax
\protected_separator
send
\family default
of
\family typewriter
sendfax
\family default
, depending on what fax package is found.
The needed command line options are also added;
\layout Description
\family typewriter
\series medium
\backslash
print_spool_command
\family default
\series default
is set to
\family typewriter
lp
\family default
on systems (so-called System V) who have this command, and
\family typewriter
lpr
\family default
otherwise (BSD systems);
\layout Description
\family typewriter
\series medium
\backslash
print_spool_printerprefix
\family default
\series default
is set to
\family typewriter
-d
\family default
or
\family typewriter
-P
\family default
, depending on whether
\family typewriter
lp
\family default
or
\family typewriter
lpr
\family default
was found;
\layout Description
\family typewriter
\series medium
\backslash
font_encoding
\family default
\series default
is set to
\family typewriter
T1
\family default
if the
\family typewriter
ec
\family default
fonts are found and LaTeX has support for these fonts built-in.
You can set it manually if you only have the so-called
\family typewriter
dc
\family default
fonts.
\layout Section
The rest
\layout Standard
There are a bunch of other
\family typewriter
lyxrc
\family default
commands that can be used to customize LyX behavior.
We still need to document that here, but for now, the
\family typewriter
lyxrc
\family default
file is richly commented so walk through that to get an idea of what you
can customize.
You can also try your luck in the
\emph on
Reference guide,
\emph default
but no guarantees.
\layout Chapter
The LyX Server
\layout Section
Introduction
\layout Standard
The LyX server is a method implemented into LyX that will enable other programs
to talk to LyX, invoke LyX commands and retrieve information about the
LyX internal state.
This is only intended for advanced users, but those will find it useful.
\layout Section
Starting the LyX Server
\layout Standard
The LyX server works through the use of a pair of named pipes.
These are usually located in your home directory and have the names
\begin_inset Quotes eld
\end_inset
\family typewriter
.lyxpipe.in
\family default
\begin_inset Quotes erd
\end_inset
and
\begin_inset Quotes eld
\end_inset
\family typewriter
.lyxpipe.out
\family default
\begin_inset Quotes erd
\end_inset
.
External programs write into
\family typewriter
.lyxpipe.in
\family default
and read back data from
\family typewriter
.lyxpipe.out
\family default
.
The stem of the pipe names can be defined in the
\family typewriter
lyxrc
\family default
file by adding a line like:
\layout LyX-Code
\backslash
serverpipe "/home/myhome/.lyxpipe"
\layout Standard
LyX will add the '
\family typewriter
.in
\family default
' and '
\family typewriter
.out
\family default
' to create the pipes.
The above line also has the effect of activating the LyX server.
If one of the pipes already exists, LyX will assume that another LyX process
is already running and will not start the server.
To have several LyX processes with servers at the same time, you have to
change the
\family typewriter
lyxrc
\family default
between the start of the programs.
\layout Standard
If you are developing a client program, you might find it useful to enable
debugging information from the LyX server.
Do this by starting LyX as
\family typewriter
lyx -dbg 8192.
\layout Standard
\emph on
Note: if LyX crashes, it may not manage to remove the pipes; in this case
you should remove them manually.
If LyX starts and the pipes exist already, it will not start any server.
\layout Standard
Other than this, there are a few points to consider:
\layout Itemize
Both server and clients must run on UNIX or OS/2 machines.
Communications between LyX on UNIX and clients on OS/2 or vice versa is
not possible right now.
\layout Itemize
On OS/2, only one client can connect to LyXServer at a time.
\layout Itemize
On OS/2, clients must open inpipe with
\family typewriter
O_WRONLY
\family default
mode.
\layout Standard
You can find a complete example client written in C in the source distribution
as
\family typewriter
development/server_monitor.c
\family default
.
\layout Section
Normal communication
\layout Standard
To issue a LyX call, the client writes a line of ASCII text into the input
pipe.
This line has the following format:
\layout Quote
LYXCMD:
\emph on
clientname
\emph default
:
\emph on
function
\emph default
:
\emph on
argument
\layout Standard
Here
\emph on
clientname
\emph default
is a name that the client can choose arbitrarily.
Its only use is that LyX will echo it if it sends an answer - so a client
can dispatch results from different requesters.
\layout Standard
\emph on
function
\emph default
is the function you want LyX to perform.
It is the same as the commands you'd use in the minibuffer.
\layout Standard
\emph on
argument
\emph default
is an optional argument which is meaningful only to some functions (for
instance
\begin_inset Quotes eld
\end_inset
self-insert
\begin_inset Quotes erd
\end_inset
which will insert the argument as text at the cursor position.)
\layout Standard
The answer from LyX will arrive in the output pipe and be of the form
\layout Quote
INFO:
\emph on
clientname
\emph default
:
\emph on
function
\emph default
:
\emph on
data
\layout Standard
where
\emph on
clientname
\emph default
and
\emph on
function
\emph default
are just echoed from the command request, while
\emph on
data
\emph default
is more or less useful information filled according to how the command
execution worked out.
Some commands will return information about the internal state of LyX,
such as
\begin_inset Quotes eld
\end_inset
font-state
\begin_inset Quotes erd
\end_inset
, while other will return an empty data-response.
This means that the command execution went fine.
\layout Standard
In case of errors, the response from LyX will have this form
\layout Quote
ERROR:
\emph on
clientname
\emph default
:
\emph on
function
\emph default
:
\emph on
error message
\layout Standard
where the
\emph on
error message
\emph default
should contain an explanation of why the command failed.
\layout Standard
Examples:
\layout LyX-Code
echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
\layout LyX-Code
echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
\newline
read a <~/.lyxpipe.out
\newline
echo $a
\layout Section
Notification
\layout Standard
LyX can notify clients of events going on asynchronously.
Currently it will only do this if the user binds a key sequence with the
function
\begin_inset Quotes eld
\end_inset
notify
\begin_inset Quotes erd
\end_inset
.
The format of the string LyX sends is as follows:
\layout Quote
\family typewriter
NOTIFY:
\family default
\emph on
key-sequence
\layout Standard
where
\emph on
key-sequence
\emph default
is the printed representation of the key sequence that was actually typed
by the user.
\layout Standard
This mechanism can be used to extend LyX's command set and implement macros:
bind some key sequence to
\begin_inset Quotes eld
\end_inset
notify
\begin_inset Quotes erd
\end_inset
, start a client that listens on the out pipe, dispatches the command according
to the sequence and starts a function that may use LyX calls and LyX requests
to issue a command or a series of commands to LyX.
\layout Section
The simple LyX Server Protocol
\layout Standard
LyX implements a simple protocol that can be used for session management.
All messages are of the form
\layout Quote
LYXSRV:
\emph on
clientname
\emph default
:
\emph on
protocol message
\layout Standard
where
\emph on
protocol message
\emph default
can be
\begin_inset Quotes eld
\end_inset
hello
\begin_inset Quotes erd
\end_inset
or
\begin_inset Quotes eld
\end_inset
bye
\begin_inset Quotes erd
\end_inset
.
If
\begin_inset Quotes eld
\end_inset
hello
\begin_inset Quotes erd
\end_inset
is received from a client, LyX will report back to inform the client that
it's listening to it's messages, while
\begin_inset Quotes eld
\end_inset
bye
\begin_inset Quotes erd
\end_inset
sent from LyX will inform clients that LyX is closing.
\layout Chapter
Internationalizing LyX
\begin_inset LatexCommand \label{chap:i18n}
\end_inset
\layout Standard
LyX supports using a translated interface.
Last time we checked, Norwegian, Danish, Finish, German, Dutch and Swedish
texts were provided together with the default English text.
The language of choice is called your
\emph on
locale
\emph default
.
(For further reading on locale settings, see also the documentation for
locale that comes with your operating system.
For Linux, the manual page for locale(5) could be a good place to start).
\layout Standard
Notice that these translations do work not without a few flaws.
In particular, all pop-ups have been designed with the English text in
mind, which means that some of the translated text will be too large to
fit within the space allocated.
This is only a display problem and will not cause any harm.
Also, you will find that some of the translations do not define short-cut
keys for everything.
Sometimes, there are simply not enough free letters to do it.
Other times, the translator just hasn't got around to doing it yet.
\layout Standard
We'll try to fix these shortcomings in LyX version 1.1.
\layout Section
Selecting an alternative language for the user interface
\layout Standard
This feature is disabled by default, meaning that the text will be English.
To enable an alternative language, you have to set an appropriate environment
variable.
Use
\family typewriter
"setenv LANG xx"
\family default
\family roman
for csh class shells
\family default
or
\family typewriter
"export LANG=xx"
\family default
\family roman
for sh class shells
\family default
.
Substitute the
\family typewriter
xx
\family default
with the two letter code for the language you want.
For instance,
\family typewriter
no
\family default
is Norwegian.
\layout Standard
Normally, you'll want to put the appropriate line in
\family typewriter
~/.Xsession
\family default
or
\family typewriter
~/.xinitrc
\family default
such that the translation is on per default.
Remember that if LyX is configured and compiled with
\begin_inset Quotes eld
\end_inset
\family typewriter
--disable-nls
\family default
\begin_inset Quotes erd
\end_inset
, this will not work.
\layout Section
Adapting shortcuts for alternative languages
\layout Standard
\latex latex
\backslash
begin{sloppypar}
\layout Standard
One main cause for inconsistencies in the translated versions of LyX is
the fact that all the keyboard shortcuts for the menu functions are based
on the English version of the text.
This is, regardless of the entry in the menu,
\family sans
M-f t
\family default
will open the new-file-from-template popup.
It is, however, easy to change this, as all the shortcuts for menu operations
are defined in one file,
\family typewriter
LyXDir/bind/menus.bind
\family default
.
Every user can have his own copy of that file in his private directory,
\family typewriter
~/.lyx/bind
\family default
, which will then take precedence over the systemwide file.
In this private copy, one can easily change the definitions, e.g.
for the German version change
\family sans
M-f t
\family default
to
\family sans
M-d v
\family default
(for
\family sans
Datei->Vorlage
\family default
).
For some languages, examples for adapted
\family typewriter
menus.bind
\family default
files can be found in
\family typewriter
LyXDir/bind/
\series bold
xx
\series default
_menus.bind
\family default
(
\series bold
xx
\series default
denotes the language code).
These will be used automatically by LyX if they exist (and if your locale
is set with
\family typewriter
$LANG=
\series bold
xx
\family default
\series default
).
\layout Standard
\latex latex
\backslash
end{sloppypar}
\layout Standard
You will have to take care that the new definitions for shortcuts do not
collide with other, previous definitions.
For example the abovementioned binding
\family sans
M-d v
\family default
would generate an error for those who use
\family typewriter
(x)emacs.bind
\family default
, where
\family sans
M-d
\family default
is bound to
\family typewriter
word-delete-forward
\family default
.
\layout Standard
As of LyX version 1.0, the translated names for the top level menus (translated
in the po-files) are used by the keybinding mechanism, therefore the
\emph on
translated
\emph default
menu name must be used in the translated
\family typewriter
menus.bind
\family default
.
\layout Section
Translating LyX
\layout Subsection
Translating the graphical user interface (text messages).
\layout Standard
LyX uses the GNU gettext-library to handle the internationalization of the
interface.
To have LyX speak your favorite language in all menus and dialog boxes,
you need a po-file for that language.
When this is available, you'll have to generate a mo-file from it and install
the mo-file.
The process of doing all of this is explained in the documentation for
GNU gettext, but in short, this is what you do (
\series bold
xx
\series default
denotes the language code):
\layout Standard
\latex latex
\backslash
begin{sloppypar}
\layout Itemize
Copy
\family typewriter
LYX-SOURCE-DIR/po/lyx.pot
\family default
to
\series bold
xx
\family typewriter
\series default
.po
\family default
(if
\family typewriter
lyx.pot
\family default
doesn't exist, it can be remade with
\family typewriter
make lyx.pot
\family default
in that directory, or you can use an existing po-file for some other language
as a template).
\layout Itemize
Edit
\family typewriter
xx.po
\begin_float footnote
\layout Standard
We recommend that you use Emacs to do this, since the gettext distribution
includes a nice mode that supports you in doing this.
\end_float
.
For some menu- and widget-labels, there are also shortcut keys that should
be translated.
Those keys are marked after a `
\family typewriter
|
\family default
', and should be translated according to the words and phrases of the
\series bold
xx
\series default
-language.
There is a tool named
\family typewriter
scgen.pl
\family default
written in Prolog in
\family typewriter
LYX-SOURCE-DIR/development/tools/
\family default
that may be useful to help determine short-cut keys.
Note that XForms (version 0.86 at least) can't handle anything but 7-bit
characters as shortcut keys.
You should also fill also out the information at the beginning of the new
po-file with your email-address, etc., so people know where to reach you
with suggestions and entertaining flames.
\layout Itemize
Generate
\series bold
xx
\family typewriter
\series default
.mo
\family default
.
This can be done with
\newline
\family typewriter
msgfmt -o
\family default
\series bold
xx
\family typewriter
\series default
.mo <
\family default
\series bold
xx
\family typewriter
\series default
.po
\layout Itemize
Copy the mo-file to your locale-tree, at the correct directory for application
messages for the language
\series bold
xx
\series default
, and under the name
\family typewriter
lyx.mo
\family default
\newline
(e.g.
\family typewriter
/usr/local/share/locale/
\family default
\series bold
xx
\family typewriter
\series default
/LC_MESSAGES/lyx.mo
\family default
)
\layout Standard
\latex latex
\backslash
end{sloppypar}
\layout Standard
Adding a new po-file to the
\emph on
distribution
\emph default
of LyX involves altering the configure scripts and more, but the way gettext
works, you don't actually need the source-code of LyX to translate it---having
\family typewriter
lyx.pot
\family default
(or an existing po-file) and the gettext tools suffices.
\layout Standard
If you've written a translation file for a language that LyX does not currently
support, feel free to submit it for inclusion by sending a patch.
In this case, we recommend that you read the README provided in the
\family typewriter
LYX-SOURCE-DIR/po/
\family default
directory for more instructions.
\layout Subsection
Translating the documentation.
\layout Standard
The online documentation (in the
\family sans
Help
\family default
-menu) can be translated.
If there are translated versions of the documentation available (as of
this writing, there are hardly none), and the locale is set accordingly,
these will be used automagically by LyX.
The translated versions are sought as
\family typewriter
LyXDir/doc/
\series bold
xx
\series default
_DocName.lyx
\family default
, where
\family typewriter
\series bold
xx
\family default
\series default
denotes the language as set by the environmental variable
\family typewriter
$LANG
\family default
.
If there are none, the default English versions will be displayed.
Note that even the translated versions must have the same filenames as
the original.
If you feel up to translating the documentation (an excellent way to proof-read
the original documentation btw!), here's a few hints for you that may save
you trouble:
\layout Itemize
Join the documentation team! There is information on how to do that in
\family typewriter
Intro.lyx
\family default
(
\family sans
Help->Introduction
\family default
), which by the way is the first document you should translate.
\layout Itemize
Make a copy of the original document to a safe place.
You'll need this later (months later perhaps).
\layout Itemize
Learn the typographic conventions for the language you are translating to.
Typography is an ancient art and during the centuries, a great variety
of conventions has developed throughout different parts of the world.
Also study the professional terminology amongst typographers in your country.
Inventing your own terminology will only confuse the users.
\emph on
(Warning! Typography is addicting!)
\layout Itemize
Make another copy of the same file.
This will be your working copy.
You can use this as your personal translated help-file by placing it in
your
\family typewriter
~/.lyx/doc/
\family default
-directory.
\layout Itemize
Sometimes the original document (from the LyX-team) will be updated, compare
the new version with your first untouched copy with the
\noun on
Unix
\noun default
-command
\family typewriter
diff
\family default
for instance.
That way you can easily see which parts of the translated document that
needs to be updated.
Replace the untouched original copy with the new (also untouched) copy.
\layout Itemize
If you ever find an error in the original document, fix it and notify the
rest of the documentation team of the changes! (You didn't forget to join
the documentation team did you?)
\emph on
As of this writing, not even the original documentation is complete!
\layout Section
International Keyboard Support
\layout Standard
\emph on
Editor's Note: The following section is by Ivan Schreter.
It needs to be fixed to conform to the new Documentation Style sheet and
to make use of the new v1.0 features.
The whole thing also needs to be merged with the section following it.-jw
\layout Subsection
Defining Own Keymaps: Keymap File Format
\layout Standard
Let's look at a keyboard definition file a little closer.
It is a plain ASCII file defining
\layout Itemize
key-to-key or key-to-string translations
\layout Itemize
dead keys
\layout Itemize
dead keys exceptions
\layout Standard
To define key-to-key or key-to-string translation, use this command:
\layout Quotation
\family typewriter
\backslash
kmap
\family default
\emph on
key
\emph default
\emph on
outstring
\layout Standard
where
\emph on
key
\emph default
is the key to be translated and
\emph on
outstring
\emph default
is the string to be inserted into the document.
To define dead keys, use:
\layout Quotation
\family typewriter
\backslash
kmod
\family default
\family typewriter
key
\family default
\family typewriter
deadkey
\layout Standard
where
\emph on
key
\emph default
is keyboard key and
\emph on
deadkey
\emph default
is dead key name.
The following dead keys are supported (shortcut name is in parentheses):
\layout Quotation
\emph on
Name
\hfill
Example
\layout Quotation
acute (acu)
\hfill
�����
\layout Quotation
grave (gra)
\hfill
�����
\layout Quotation
macron (mac)
\hfill
\i \={o}
\layout Quotation
tilde (til)
\hfill
��
\layout Quotation
underbar (underb)
\hfill
\latex latex
\backslash
b o
\layout Quotation
cedilla (ced)
\hfill
��
\layout Quotation
underdot (underd)
\hfill
\latex latex
\backslash
d o
\layout Quotation
circumflex (circu)
\hfill
�����
\layout Quotation
circle (circl)
\hfill
�\i \r{u}
\i \r{U}
\layout Quotation
tie (tie)
\hfill
\latex latex
\backslash
t oo
\layout Quotation
breve (bre)
\hfill
\i \u{a}
\latex latex
\backslash
u o
\layout Quotation
caron (car)
\hfill
\i \v{c}
\i \v{s}
\i \v{z}
\layout Quotation
hungarian umlaut (hug)
\hfill
\i \H{o}
\i \H{u}
\layout Quotation
umlaut (uml)
\hfill
���
\layout Quotation
dot (dot)
\hfill
\i \.{z}
\latex latex
\backslash
.s
\layout Standard
Since in many international keyboards there are exceptions to what some
dead keys should do, you can define them using
\layout Quotation
\family typewriter
\backslash
kxmod
\family default
\emph on
deadkey key outstring
\layout Standard
For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
, so you put in
\layout Quotation
\family typewriter
\backslash
kxmod
\family default
\family typewriter
caron o "
\backslash
^o"
\layout Standard
to make it work correctly.
Also, you have to define as exceptions dead keys over i and j, to remove
the dot from them before inserting an accent mark.
I will change this when the time comes, but so far I didn't have time.
\layout Standard
Oh, and about keys: Backslash is escaped, so to enter it, you'll need double
backslash.
Also, quotes and
\family typewriter
#
\family default
have different meaning.
\family typewriter
#
\family default
marks comment, quotes start and end LaTeX-style commands.
To enter quote, you'll need to use
\family typewriter
\backslash
"
\family default
, to enter
\family typewriter
#
\family default
, use
\family typewriter
\backslash
#
\family default
.
\layout Standard
If you make a keyboard description file that works fort your language, please
mail it to me, so I can include it in the next keymaps distribution.
\layout Standard
More keywords will be supported in keymap configuration file in future,
like
\layout Itemize
\family typewriter
\backslash
kinclude
\family default
\emph on
filename
\hfill
include
\emph default
another file
\layout Itemize
\family typewriter
\backslash
kprog
\family default
\emph on
program
\hfill
define
\emph default
an external keymap translation program
\layout Standard
Also, it should look into
\family typewriter
lyxrc
\family default
file for defaults, too (for example, a
\family typewriter
\backslash
kinclude
\family default
option to include default keyboard).
\layout Section
International Keymap Stuff
\begin_inset LatexCommand \label{sec:keymap}
\end_inset
\layout Standard
The next two sections describe the
\family typewriter
\shape up
.kmap
\family default
\shape default
and
\family typewriter
\shape up
.cdef
\family default
--> --------------------
--> maximum size reached
--> --------------------
[ Verzeichnis aufwärts0.445unsichere Verbindung
]
|
|