texpdf setotherlanguage & add package geometry
authorRalph Amissah <ralph@amissah.com>
Thu, 27 Feb 2020 15:35:19 +0000 (10:35 -0500)
committerRalph Amissah <ralph@amissah.com>
Thu, 27 Feb 2020 17:30:59 +0000 (12:30 -0500)
- otherlanguage not always present
- landscape title page needs geometry package

lib/sisu/se_programs.rb
lib/sisu/texpdf_format.rb

index bcb8228a2a94ae2a485e3e797b528b502c0f98c2..efe89946e81d47e2c5fe1fca745b35ecc067d802 100644 (file)
@@ -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/
index 5c9d2c9d3f65d3962da838f929d0866c2c0cc597..634bb591ea2e619295e1bc4081a879d1a28ebd57 100644 (file)
@@ -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]}}