aboutsummaryrefslogtreecommitdiffhomepage
path: root/org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2023-10-18 20:59:14 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2023-10-19 14:43:44 -0400
commit089b9b28b9d828bb9bf35741703967831cd1b792 (patch)
tree012fc3ef5e6a08cdb70f0fd165ef6bde2138a179 /org
parentupdates nix flake & ruby 3.3, nix direnv 2.4.0 (diff)
texpdf ...
Diffstat (limited to 'org')
-rw-r--r--org/texpdf.org35
1 files changed, 16 insertions, 19 deletions
diff --git a/org/texpdf.org b/org/texpdf.org
index ab4fd7d1..798c7dd4 100644
--- a/org/texpdf.org
+++ b/org/texpdf.org
@@ -1976,18 +1976,7 @@ module SiSU_TeX_Pdf
# fc-list :lang=ja
case @tex2pdf
when /xe/
- if @md.opt.lng =~/(?:zh|ja|ko)/
- <<-WOK
-\\usepackage{ucs, fontspec, xltxtra, xunicode, xeCJK}
-\\setmainCJKlanguage{#{tex_head_lang[:mainlang]}}
-\\setCJKmainfont{#{texpdf_fontface_cjk}}
-\\XeTeXlinebreaklocale "#{tex_head_lang[:mainlang]}"
-\\XeTeXlinebreakskip = 0pt plus 1pt
-\\setotherlanguage{#{tex_head_lang[:otherlang]}}
-\\setmainfont{#{texpdf_fontface}}
-\\setmonofont[Scale=0.85]{#{texpdf_fontface_mono}}
- WOK
- elsif (tex_head_lang[:mainlang] == "english" \
+ if (tex_head_lang[:mainlang] == "english" \
&& (tex_head_lang[:otherlang] == "english" \
|| tex_head_lang[:otherlang] == "" \
|| tex_head_lang[:otherlang].length == 0))
@@ -2255,16 +2244,24 @@ module SiSU_TeX_Pdf
}
WOK
end
- def tex_head_paper_part_specific
+ def tex_head_paper_part_specific(orientation)
+ colorlinks = <<-WOK
+ colorlinks=true, % myblack
+ urlcolor=myblue, % \\href{...}{...} external url
+ filecolor=mygreen, % \\href{...} local file
+ linkcolor=myred, % \\href{...} and \\pageref{...}
+ WOK
+ colorlinks = (orientation == "landscape") ? colorlinks : ""
<<-WOK
-\\usepackage[english,english]{babel}
+\\usepackage[#{tex_head_lang[:mainlang]},#{tex_head_lang[:otherlang]}]{babel}
\\usepackage[autostyle, english = american]{csquotes}
% \\MakeOuterQuote{"} % not required, using '' as quote delimiter
-\\selectlanguage{english}
+\\selectlanguage{#{tex_head_lang[:mainlang]}}
\\hypersetup{
pdftitle={#{@md.title.short}},
pdfauthor={#{@md.creator.author}},
pdfsubject={},
+#{colorlinks}
}
\\usepackage{fancyhdr}
\\lhead[ ]{ }
@@ -2306,14 +2303,14 @@ module SiSU_TeX_Pdf
\\setlength{\\marginparwidth}{#{d[:marginparwidth]}}
#{tex_head_paper_part}
#{tex_head_paper_newenv_newcmd}
-#{tex_head_paper_part_specific}
+#{tex_head_paper_part_specific("portrait")}
#{multicol}
WOK
end
def tex_head_paper_landscape(d)
<<-WOK
#{tex_head_info}
-\\documentclass[11pt,a4paper,titlepage,makeidx]{scrartcl}
+\\documentclass[11pt,a4paper,landscape,titlepage,twocolumn,makeidx]{scrartcl}
\\usepackage{geometry}
\\geometry{
a4paper,
@@ -2328,7 +2325,7 @@ module SiSU_TeX_Pdf
\\setlength{\\marginparwidth}{#{d[:marginparwidth]}}
#{tex_head_paper_part}
#{tex_head_paper_newenv_newcmd}
-#{tex_head_paper_part_specific}
+#{tex_head_paper_part_specific("landscape")}
WOK
end
def tex_head_paper_portrait_dvi(d)
@@ -2500,7 +2497,7 @@ module SiSU_TeX_Pdf
#{tex_head_encode}
#{tex_head_pdftex}
#{tex_head_codeblock(codeblock_box_type)}
-\\selectlanguage{#{@lang.list[@md.i18n[0]][:xlp]}}
+\\selectlanguage{#{tex_head_lang[:mainlang]}}
WOK
end
def a4generic