Projekt

Allgemein

Profil

Foreign Languages » Historie » Version 1

Martin Kraetke, 22.12.2021 14:24

1 1 Martin Kraetke
h1. Foreign Languages and Scripts
2
3
Supported scripts:
4
* armenian
5
* chinese
6
* japanese
7
* hebrew
8
* arabic
9
10
* (nearly) all languages that are based on latin scripts (ngerman, english, french, romanian, …).
11
12
h2. Preamble
13
14
Initialization of foreign writing systems in the optional argument of @ \ documentclass @ with the @ usescript @ parameter. Include multiple font declarations comma separated and enclosed with brackets: 
15
16
<pre>\documentclass[usescript=chinese]{transpect}</pre>
17
18
or
19
20
<pre>\documentclass[usescript={chinese,japanese,hebrew,arabic}]{transpect}</pre>
21
22
Languages that use (extended) Latin characters are also written in the optional argument, separated by commas:
23
24
<pre>\documentclass[main=ngerman,english,french,usescript={chinese,japanese,hebrew,arabic}]{transpect}</pre>
25
26
The main language of the document is declared with the prefix @main=@.
27
28
h2. Language Markup
29
30
Characters from other scripts are written directly as *Unicode* and marked with the commands of the Babel package. This is important because TeX changes the typography as well as the hyphenation based on the language. 
31
32
Smaller sections, where the language differs from the main language are marked with  @\foreignlanguage{<sprache>}{<text>}@:
33
34
<pre>Fish and chips, \foreignlanguage{french}{Baguette}, Shepherd's Pie</pre>
35
36
For larger portions of text, the text is switched by 
37
38
<pre>\selectlanguage{<sprache>}</pre>
39
40
The selected language is used until the next @\selectlanguage{}@ command or @\end{document}@.
41
42
Foreign scripts are marked as follows:
43
44
<pre>\textit{Katchaku} \foreignlanguage{japanese}{活着}, the Japanese term for successful graft formation</pre>
45
46
h3. Specific Rules:
47
48
*Armenian* is marked with @\armenian{<text>}@, e.g. 
49
50
<pre>\armenian{Ճանաչել զիմաստութիւն եւ զխրատ, իմանալ զբանս հանճարոյ}</pre>
51
52
h2. Language Markup in PDF Bookmarks
53
54
Language markup in headings is the same as in the main text with one exception. PDF bookmarks must consit only of Unicode characters and any TeX markup must be omitted. Therefore, @\tpBM@ entries should contain only plain text.