Professional Documents
Culture Documents
Multilingual Captions With Lyx
Multilingual Captions With Lyx
Uwe Sthr
List of Figures
1
2
2
2
1 Introduction
The module Multilingual captions allows to typeset captions in two languages. It requires
the LATEX package bicaption which is part of the LATEX package caption. So if caption
is installed, bicaption should be installed too.
The first language is the document language, the second one has to be specified using the
style Caption setup. This style has an optional argument to define to which language the
setup should apply. To change the setup of all captions in the first language, use bi-first
as optional argument, for the second language use bi-second, for both languages use
bi-both.
Note: If no optional argument is used for Caption setup, the setup will affect all captions
in the document, not only the multilingual ones.
This document is in English. To set German as the second language one uses the
command
lang=ngerman
in a Caption setup style. For other languages, replace ngerman by the babel name
of the language. The list of babel names is given in Table 1. The caption labels are
automatically translated.
To add a multilingual caption to a float, press the right mouse button on the caption that
is automatically added when inserting a new float and select Caption (Bicaption) from
the context menu. If no caption is inserted, you can insert the multilingual caption via
Insert . Caption . Bicaption. The caption text in the document language must be inserted
in the inset which is inserted in the caption via Insert . Main Language Text. The caption
text in the second language is inserted as normal text in the caption.
Short Titles for both languages (for the List of Tables/Figures) can be inserted via
Insert . Main Language Short Title and Insert . Second Language Short Title.
Figure 1 is an example of a figure float with a multilingual caption.
A figure.
Figure 1: English Title
Abbildung 1: German Title
Note: Multilingual captions cannot be used for longtables.
2 Caption Customization
The layout of the captions can also be changed using the Caption setup style. For example
to typeset the caption text sans-serif italic, use the command
textfont={sf,it}
to make the label bold use
labelfont=bf
To set the font for the text and the label use the command font=. For more information
about possible customizations, see the documentation of the LATEX package caption,
[2], because the customization options of the package bicaption are the same as for
caption.
Figure 2 is an example of a figure float with a customized multilingual caption.
A figure.
Figure 2
Customized caption format
Abbildung 2
Angepasstes Beschriftungsformat
\usepackage{newfloat}
\DeclareFloatingEnvironment[fileext=lof2]{figureGer}
[Abbildung][Abbildungsverzeichnis]
\DeclareFloatingEnvironment[fileext=lot2]{tableGer}
[Tabelle][Tabellenverzeichnis]
\PassOptionsToPackage{listtype+=Ger}{bicaption}
This defines two new float type named figureGer and tableGer. A list for figureGer can
be inserted by using the command
\listoffigureGeres
as TEX code. Here is the German list of figures:
Abbildungsverzeichnis
1
2
2
2
Note: If you are using this feature, the Caption setup style option bi-both does no
longer have any effect. You then need to define everything explicitly for each language
using the options bi-first and bi-second.
For more information what can be done with the LATEX package bicaption, have a look
at its documentation, [1].
babel name(s)
Afrikaans
afrikaans
Basque
basque
Breton
breton
Bulgarian
bulgarian
Catalan
catalan
Croatian
croatian
Czech
czech
Danish
danish
Dutch
dutch
English
Esperanto
esperanto
Estonian
estonian
Finnish
finnish
French
Galician
galician
Georgian
georgian
German
ngerman, naustrian
Greek
greek, polutonikogreek
Hebrew
hebrew
Hungarian
magyar, hungarian
Icelandic
icelandic
Indonesian
bahasa
Interlingua
interlingua
Irish Gaelic
irish
Italian
italian
Latin
latin
Lower Sorbian
lowersorbian
continued on next page
language
babel name(s)
Malay
bahasam
North Sami
samin
Norwegian
norsk, nynorsk
Polish
polish
Portuguese
portuguese, brazilian
Romanian
romanian
Russian
russian
Scottish Gaelic
scottish
Serbian
serbian
Slovakian
slovak
Slovenian
slovene
Spanish
spanish
Swedish
swedish
Turkish
turkish
Ukrainian
ukrainian
Upper Sorbian
uppersorbian
Welsh
welsh
References
[1] Documentation of the LATEX package bicaption
[2] Documentation of the LATEX package caption