diff options
author | Ralph Amissah <ralph@amissah.com> | 2020-02-27 10:35:19 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2020-02-27 12:30:59 -0500 |
commit | 1de01618246a25effb3c19c6d2597246a749479e (patch) | |
tree | 49d154eedf8c0b1ebc3f63184d7b85e2867d4e86 | |
parent | version & changelog, open commit window (diff) |
texpdf setotherlanguage & add package geometry
- otherlanguage not always present
- landscape title page needs geometry package
-rw-r--r-- | lib/sisu/se_programs.rb | 2 | ||||
-rw-r--r-- | lib/sisu/texpdf_format.rb | 16 |
2 files changed, 16 insertions, 2 deletions
diff --git a/lib/sisu/se_programs.rb b/lib/sisu/se_programs.rb index bcb8228a..efe89946 100644 --- a/lib/sisu/se_programs.rb +++ b/lib/sisu/se_programs.rb @@ -298,7 +298,7 @@ module SiSU_Sys_Call if @pdfetex_flag texpdf_cmd=case texpdf when /xetex/ - %{#{texpdf} -interaction=#{mode} -fmt=xelatex -papersize="#{papersize}" #{@input} #{tell}\n} + %{#{texpdf} -interaction=#{mode} -fmt=xelatex #{@input} #{tell}\n} when /xelatex/ %{#{texpdf} -interaction=#{mode} -papersize="#{papersize}" #{@input} #{tell}\n} when /pdftex/ 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]}} |