aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/texpdf_format.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/texpdf_format.rb')
-rw-r--r--lib/sisu/texpdf_format.rb16
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/sisu/texpdf_format.rb b/lib/sisu/texpdf_format.rb
index 5c9d2c9d..634bb591 100644
--- a/lib/sisu/texpdf_format.rb
+++ b/lib/sisu/texpdf_format.rb
@@ -732,11 +732,23 @@ module SiSU_TeX_Pdf
\\setmainfont{#{texpdf_fontface}}
\\setmonofont[Scale=0.85]{#{texpdf_fontface_mono}}
WOK
+ elsif (tex_head_lang[:mainlang] == "english" \
+ && (tex_head_lang[:otherlang] == "english" \
+ || tex_head_lang[:otherlang] == "" \
+ || tex_head_lang[:otherlang].length == 0))
+ <<-WOK
+\\usepackage{polyglossia, ucs, fontspec, xltxtra, xunicode}
+\\setmainlanguage{#{tex_head_lang[:mainlang]}}
+\\setmainfont{#{texpdf_fontface}}
+\\setmonofont[Scale=0.85]{#{texpdf_fontface_mono}}
+% \\setsansfont{#{texpdf_fontface_sans}}
+% \\setromanfont{#{texpdf_fontface_serif}}
+ WOK
else
<<-WOK
\\usepackage{polyglossia, ucs, fontspec, xltxtra, xunicode}
\\setmainlanguage{#{tex_head_lang[:mainlang]}}
-\\setotherlanguage{#{tex_head_lang[:otherlang]}}
+\\setotherlanguage{english}
\\setmainfont{#{texpdf_fontface}}
\\setmonofont[Scale=0.85]{#{texpdf_fontface_mono}}
% \\setsansfont{#{texpdf_fontface_sans}}
@@ -775,6 +787,7 @@ module SiSU_TeX_Pdf
multicol=(@md.book_idx ? '\usepackage{multicol}' : '')
<<-WOK
#{tex_head_info}
+\\usepackage{geometry}
\\documentclass[#{d[:fontsize]},#{d[:papertype]},titlepage]{scrartcl} %with titlepage
\\setlength{\\textheight}{#{d[:textheight]}mm} \\setlength{\\textwidth}{#{d[:textwidth]}mm}
\\setlength{\\oddsidemargin}{#{d[:oddsidemargin]}} \\setlength{\\evensidemargin}{#{d[:evensidemargin]}}
@@ -788,6 +801,7 @@ module SiSU_TeX_Pdf
def tex_head_paper_landscape(d)
<<-WOK
#{tex_head_info}
+\\usepackage{geometry}
\\documentclass[#{d[:fontsize]},#{d[:papertype]},landscape,titlepage,twocolumn]{scrartcl} %with titlepage
\\setlength{\\textheight}{#{d[:textheight]}mm} \\setlength{\\textwidth}{#{d[:textwidth]}mm}
\\setlength{\\oddsidemargin}{#{d[:oddsidemargin]}} \\setlength{\\evensidemargin}{#{d[:evensidemargin]}}