Changed default language to American English. Added examples for German and Japanese.

This commit is contained in:
Wandmalfarbe 2017-05-31 17:24:05 +02:00
parent 414886239c
commit 9c907b3efb
20 changed files with 117 additions and 6 deletions

View File

@ -4,7 +4,7 @@ language: r
pandoc_version: 1.19.2.1
install:
- sudo apt-get install poppler-utils
- tlmgr install babel-german ly1 mweights sourcecodepro sourcesanspro
- tlmgr install pagecolor babel-german ly1 mweights sourcecodepro sourcesanspro
before_script:
- cd examples
script:

View File

@ -92,16 +92,16 @@ pandoc example.md -o example.tex --template eisvogel
### Changing the Document Language
The default language of this template is German. The `lang` variable identifies the main language of the document, using a code according to [BCP 47](https://tools.ietf.org/html/bcp47) (e.g. `en` or `en-GB`). For an incomplete list of the supported language code see [the documentation for the hyph-utf8 package (Section 2)](http://tug.ctan.org/language/hyph-utf8/doc/generic/hyph-utf8/hyphenation.pdf). The following example changes the language to British English:
The default language of this template is American English. The `lang` variable identifies the main language of the document, using a code according to [BCP 47](https://tools.ietf.org/html/bcp47) (e.g. `en` or `en-GB`). For an incomplete list of the supported language code see [the documentation for the hyph-utf8 package (Section 2)](http://tug.ctan.org/language/hyph-utf8/doc/generic/hyph-utf8/hyphenation.pdf). The following example changes the language to British English:
```bash
pandoc example.md -o example.pdf --template eisvogel -V lang=en-GB
```
The following example changes the language to American English:
The following example changes the language to German:
```bash
pandoc example.md -o example.pdf --template eisvogel -V lang=en-US
pandoc example.md -o example.pdf --template eisvogel -V lang=de
```
## License

View File

@ -283,10 +283,22 @@ $endif$
%%
%
% language
% No language specified? take American English.
%
$if(lang)$$else$
\usepackage[ngerman]{babel}
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=english]{babel}
$if(babel-newcommands)$
$babel-newcommands$
$endif$
\else
% load polyglossia as late as possible as it *could* call bidi if RTL lang (e.g. Hebrew or Arabic)
\usepackage{polyglossia}
\setmainlanguage[]{english}
$for(polyglossia-otherlangs)$
\setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$}
$endfor$
\fi
$endif$
%

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 KiB

After

Width:  |  Height:  |  Size: 226 KiB

View File

@ -9,6 +9,16 @@ pdftoppm -r 150 -png "custom-titlepage/custom-titlepage.pdf" > "custom-titlepage
pandoc "default-titlepage/default-titlepage.md" -o "default-titlepage/default-titlepage.pdf" --from markdown --template "../eisvogel.latex" --listings
pdftoppm -r 150 -png "default-titlepage/default-titlepage.pdf" > "default-titlepage/default-titlepage.png"
# No lang option (-V lang=de) here because the language
# is set in the markdown file via the YAML metadata block.
pandoc "german/german.md" -o "german/german.pdf" --from markdown --template "../eisvogel.latex" --highlight-style kate
pdftoppm -r 150 -png "german/german.pdf" > "german/german.png"
# No lang option (-V lang=jp) here because it's
# unspported in XeLaTex (in polyglossia).
pandoc "japanese/japanese.md" -o "japanese/japanese.pdf" --from markdown --template "../eisvogel.latex" --listings --latex-engine=xelatex -V lang=en-us -V CJKmainfont="HiraginoSans-W4"
pdftoppm -r 150 -png "japanese/japanese.pdf" > "japanese/japanese.png"
pandoc "listings/listings.md" -o "listings/listings.pdf" --from markdown --template "../eisvogel.latex" --listings
pdftoppm -r 150 -png "listings/listings.pdf" > "listings/listings.png"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 KiB

After

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 KiB

After

Width:  |  Height:  |  Size: 267 KiB

57
examples/german/german.md Normal file
View File

@ -0,0 +1,57 @@
---
title: "Vinaque sanguine metuenti cuiquam Alcyone fixus"
author: [Author Name]
date: 2017-02-20
subject: "Markdown"
tags: [Markdown, Example]
lang: de
...
# Vinaque sanguine metuenti cuiquam Alcyone fixus
## Aesculeae domus vincemur et Veneris adsuetus lapsum
Lorem markdownum Letoia, et alios: figurae flectentem annis aliquid Peneosque ab
esse, obstat gravitate. Obscura atque coniuge, per de coniunx, sibi **medias
commentaque virgine** anima tamen comitemque petis, sed. In Amphion vestros
hamos ire arceor mandere spicula, in licet aliquando.
```java
public class Example implements LoremIpsum {
public static void main(String[] args) {
if(args.length < 2) {
System.out.println("Lorem ipsum dolor sit amet");
}
} // Obscura atque coniuge, per de coniunx
}
```
Porrigitur et Pallas nuper longusque cratere habuisse sepulcro pectore fertur.
Laudat ille auditi; vertitur iura tum nepotis causa; motus. Diva virtus! Acrota
destruitis vos iubet quo et classis excessere Scyrumve spiro subitusque mente
Pirithoi abstulit, lapides.
## Lydia caelo recenti haerebat lacerum ratae at
Te concepit pollice fugit vias alumno **oras** quam potest
[rursus](http://example.com#rursus) optat. Non evadere orbem equorum, spatiis,
vel pede inter si.
1. De neque iura aquis
2. Frangitur gaudia mihi eo umor terrae quos
3. Recens diffudit ille tantum
\begin{equation}\label{eq:neighbor-propability}
p_{ij}(t) = \frac{\ell_j(t) - \ell_i(t)}{\sum_{k \in N_i(t)}^{} \ell_k(t) - \ell_i(t)}
\end{equation}
Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae
adessent arbor. Florente perque at condeturque saxa et ferarum promittis tendebat. Armos nisi obortas refugit me.
Et nepotes poterat, se qui. Euntem ego pater desuetaque aethera Maeandri, et
[Dardanio geminaque](http://example.com#Dardanio_geminaque) cernit. Lassaque poenas
nec, manifesta $\pi r^2$ mirantia captivarum prohibebant scelerato gradus unusque
dura.
- Permulcens flebile simul
- Iura tum nepotis causa motus diva virtus Acrota. Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae adessent arbor. Florente perque at ire arcum.

BIN
examples/german/german.pdf Normal file

Binary file not shown.

BIN
examples/german/german.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 KiB

View File

@ -0,0 +1,32 @@
---
title: "よ派にへたひ素ヘムナフュてるあてっはれねね区露。巣擢"
author: [むて絵ヤイヤ手津絵]
date: 2017-02-20
subject: "Markdown"
tags: [Markdown, Example]
...
# よ派にへたひ素ヘムナフュてるあてっはれねね区露。巣擢
もに氏留列阿ゃけんリヌョソュろまけやほこまネクフコテユうめね瀬雲舳目ょ舳鵜みやいみま。野ね等野けへ屋模のね日課っぬ、知列阿絵かょ譜雲屋せのゆそめ個派瀬雲派課ーイヨスケ瀬留巣尾日ね保るめゅねっうむ無津氏離ほさないほ擢りむえ夜手個魔模素。
よ派にへたひ素ヘムナフュてるあてっはれねね区露。巣擢。むて絵ヤイヤ手津絵舳ふち屋区根っクキオ氏露すムフヘゅ二遊むねれみらなまそ瀬ぬゆたヘクアウはてとしまる知。
むゆくら雲津手都あもは日遊れりゅへらっ日保留鵜絵す。の露日無ゆ遊二日りスツ毛留御遊擢御無模無ょやゆ樹毛阿留等、樹ルキテひょとて区列屋。うかるゃええま二擢きかしあんつ擢、っさく遊手名区列手ウヌマ区根以擢模擢素けせのれひんほおはよこふきなろ樹舳野尾尾ゃほふ列擢瀬舳名個区等こに名津、根夜、お。ろやほ保素根列らゆやしえろむっンサハラオ。
## とほ知他え目絵樹せ津素舳雲巣魔氏派夜列魔
まの課譜都手、やいゆぬてほめてよかおそふおょこ尾夜く阿差課根ぬナヒメケ舳二しけやろこち譜は巣津やれま、ネョセカあきあメシみ根根るあ、ろへ離都課ろうらくぬさにせぬ尾模等せ樹魔いそょ毛もし御名氏知。
課瀬毛御都列ヒャマナカフモ絵区区遊譜ほ、ほすゃもキウぬノサクサめろそなる他他津ふまお、譜阿手派夜っ他個かたか舳鵜日魔日雲派二離、にひ巣氏めすおひふめへな区っ鵜名瀬むう。ヨツミメ区素他都めすそか課区なうよ以遊へ。いり他譜けっへつ。保阿模野列魔てえ。以区素。
離擢留舳区クツコこつろと魔、ょもさよ尾うとほ知他え目絵樹せ津素舳雲巣魔氏派夜列魔氏絵夜課阿ふ知知区擢魔野さうにりよりうゅ個課列野ゃす毛二絵手ぬえ派尾樹屋夜。夜絵毛毛すりおいし遊手夜毛無とゆ瀬野毛名個ふふえゃ無都名無他氏等ふこたも。
以たろきお都ゆし阿列鵜擢おんか、ッロマオゅ露他野列せ譜模ョー鵜尾野手毛素、ひす素野ろ氏御氏屋ほはもらりむふ離個とろいそつむ差手こつけっとへせっ。りぬ目無舳めむや離離ょほんく阿せえのんやや離雲雲魔はゃれひ。りそさ無阿樹さかん屋絵氏、つ区差。しレヨオキホテゆもお尾巣けのすもめきむやひけ。尾御津区列列課都雲り樹めぬやむては、舳名夜ッラチユ列都、保露、魔鵜。
1. りぬ目無舳めむや離離ょほんく阿せえのんやや離雲雲魔はゃれひ。りそさ無阿樹さかん屋絵氏、つ区差。しレヨオキホテゆもお
2. へ舳列っに「屋素留御以根」露派差離鵜けきうっ雲目以ナシ。日氏すゅともむ樹留素ふりう氏日夜れと
3. 他根かかぬ、くきれみけおへえほん保派絵くけよ譜モヌッアアウカ留譜絵目課離根以名阿さ樹他クッカクラ無課課瀬めつ列氏課そ目知屋舳手らへ舳列っに「屋素留御以根」露派差離鵜けきうっ雲目以ナシ。日氏すゅともむ樹留素ふりう氏日夜れとせさ鵜知めっゃ瀬露めゅむに遊雲舳野ひひよやめほくさめう舳名都とにてめは無めもはすにちひ遊モシルもねたらやょや。知以ほ以名さきにまむろせちょったか毛御差巣夜氏、きまむこ列模模阿。
阿瀬鵜屋さねや、う他列舳ヤマりれえんか、尾瀬カコノヒ名課巣鵜津せやおひく知二保手、そ派毛遊へろへよ。みす派毛はうよ樹二御派派等メノコせ区さ巣屋名のせ野毛。

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 KiB

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 KiB

After

Width:  |  Height:  |  Size: 198 KiB