Vous êtes sur la page 1sur 5

Typesetting Multilingual Captions

Uwe Sthr

List of Figures
1
2

English short title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


Customized caption format . . . . . . . . . . . . . . . . . . . . . . . . . .

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

3 Float List Customization


By default the list of figures/tables contain both languages. You can turn off the second
language by adding this line to the document preamble:
\PassOptionsToPackage{list=off}{bicaption}
It is also possible to have two different lists, one for the document language, one for the
second language. This is the case in this file. To split the list one needs to add these
lines to the LATEX preamble:

\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

German short title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


Angepasstes Beschriftungsformat . . . . . . . . . . . . . . . . . . . . . .

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].

Table 1: List of babel names


language

babel name(s)

Afrikaans

afrikaans

Basque

basque

Breton

breton

Bulgarian

bulgarian

Catalan

catalan

Croatian

croatian

Czech

czech

Danish

danish

Dutch

dutch

English

english, american, australian,


british, canadian, newzealand

Esperanto

esperanto

Estonian

estonian

Finnish

finnish

French

french, canadien, acadian

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

Vous aimerez peut-être aussi