aboutsummaryrefslogtreecommitdiffhomepage
path: root/org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2023-10-30 13:31:43 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2023-10-30 22:16:55 -0400
commitc93c52d5574c2b0f48bb005e5c972e66a5d5dba4 (patch)
tree18eb727e8239018b4060ed9a441400e0d90baff4 /org
parenttexpdf, cjk issues not resolved (diff)
texpdf, cjk issues not resolved
- ctex preferable to xeCJK? (if/when it works) - note: the current round of texpdf changes relate to a bug report on the old live-manual for debian-live to wit: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1052693 - apparently sisu-pdf does not produce latex suitable for the latest texlive (texlive-2023) - some of the latex output changes here are from sisu:spine, the dlang version of sisu
Diffstat (limited to 'org')
-rw-r--r--org/config_nix.org1
-rw-r--r--org/texpdf.org70
2 files changed, 41 insertions, 30 deletions
diff --git a/org/config_nix.org b/org/config_nix.org
index c9e54794..b7f3248e 100644
--- a/org/config_nix.org
+++ b/org/config_nix.org
@@ -283,6 +283,7 @@ export RUBYLIB+=`pwd`/lib
texlive.combined.scheme-full
noto-fonts
noto-fonts-cjk-sans
+ takao
jq
#git
];
diff --git a/org/texpdf.org b/org/texpdf.org
index ee91e112..58f9130a 100644
--- a/org/texpdf.org
+++ b/org/texpdf.org
@@ -1919,7 +1919,6 @@ module SiSU_TeX_Pdf
if @md.opt.lng =~/(?:zh|ja|ko)/
if @md.opt.lng =~/zh/
<<-WOK
-\\usepackage{xeCJK}
\\setCJKmainfont{Noto}
\\setCJKmainfont{Noto Sans CJK TC}
\\setCJKsansfont{Noto Sans CJK TC}
@@ -1933,11 +1932,12 @@ module SiSU_TeX_Pdf
WOK
elsif @md.opt.lng =~/ja/
<<-WOK
-\\usepackage{xeCJK}
-\\setCJKmainfont{Noto}
-\\setCJKmainfont{Noto Sans CJK JP}
-\\setCJKsansfont{Noto Sans CJK JP}
-\\setCJKmonofont{Noto Sans Mono CJK JP}
+\\setCJKmainfont{TakaoMincho}
+\\setCJKsansfont{TakaoMincho Sans}
+\\setCJKmonofont{TakaoMincho Sans Mono CJK JP}
+%\\setCJKmainfont{Noto Serif CJK JP}
+%\\setCJKsansfont{Noto Sans CJK JP}
+%\\setCJKmonofont{Noto Sans Mono CJK JP}
\\setmainlanguage{#{tex_head_lang[:mainlang]}}
\\setotherlanguage{english}
% \\setmainfont{#{texpdf_fontface_cjk}}
@@ -1947,7 +1947,6 @@ module SiSU_TeX_Pdf
WOK
elsif @md.opt.lng =~/ko/
<<-WOK
-\\usepackage{xeCJK}
\\setCJKmainfont{Noto}
\\setCJKmainfont{Noto Sans CJK KR}
\\setCJKsansfont{Noto Sans CJK KR}
@@ -1979,18 +1978,11 @@ module SiSU_TeX_Pdf
WOK
end
when /pdf/
- if @md.file_encoding =~ /iso-?8859/i #% iso8859
- <<-WOK
-% \\usepackage[latin1]{inputenc}
-\\usepackage{fontspec}
- WOK
- else #% utf-8 assumed
<<-WOK
-\\usepackage{babel}
+\\usepackage[#{tex_head_lang[:mainlang]},#{tex_head_lang[:otherlang]}]{babel}
\\usepackage{ucs}
-\\usepackage[utf8x]{inputenc}
- WOK
- end
+\\usepackage[utf8x]{inputenc} %
+ WOK
end
end
def tex_head_info
@@ -2006,16 +1998,31 @@ module SiSU_TeX_Pdf
%% SiSU https://git.sisudoc.org/
WOK
end
- def tex_head_paper_part
- <<-WOK
+ def tex_head_paper_characters
+ if @md.opt.lng =~/(?:zh|ja|ko)/
+ <<-WOK
+\\renewcommand*\\familydefault{\\sfdefault}
+\\usepackage[UTF8, fontset=TakaoMincho]{ctex}
+%\\usepackage[UTF8, fontset=Takao明朝]{ctex}
+%\\usepackage[UTF8, fontset=none]{ctex}
+\\usepackage{ctexhook}
+\\usepackage[T1]{fontenc}
+\\usepackage{newunicodechar}
+\\usepackage[utf8]{inputenc}
+ WOK
+ else
+ <<-WOK
% \\usepackage[scaled]{dejavu}
\\renewcommand*\\familydefault{\\sfdefault}
%\\usepackage{inconsolata}
\\usepackage[T1]{fontenc}
\\usepackage{newunicodechar}
\\usepackage[utf8]{inputenc}
-\\usepackage{xeCJK}
-\\usepackage{noto}
+ WOK
+ end
+ end
+ def tex_head_paper_shared
+ <<-WOK
\\usepackage{alltt}
\\usepackage[
unicode=true,
@@ -2076,7 +2083,7 @@ module SiSU_TeX_Pdf
\\definecolor{Light}{gray}{.92}
\\definecolor{listinggray}{gray}{0.9}
\\definecolor{lbcolor}{rgb}{0.9,0.9,0.9}
-\\lstset{
+\\lstset{%
backgroundcolor=\\color{lbcolor},
tabsize=4,
rulecolor=,
@@ -2104,6 +2111,7 @@ module SiSU_TeX_Pdf
\\DeclareTOCStyleEntry[numwidth+=3pt]{section}{subsection}
\\DeclareTOCStyleEntries[indent+=4pt]{section}{section,subsection,subsubsection}
\\DeclareTOCStyleEntries[numwidth+=3pt]{section}{paragraph,subparagraph}
+\\usepackage{ltxcmds}
WOK
end
def tex_head_paper_newenv_newcmd
@@ -2231,7 +2239,7 @@ module SiSU_TeX_Pdf
}
WOK
end
- def tex_head_paper_part_specific(orientation)
+ def tex_head_paper_orient(orientation)
colorlinks = <<-WOK
colorlinks=true, % myblack
urlcolor=myblue, % \\href{...}{...} external url
@@ -2276,9 +2284,9 @@ module SiSU_TeX_Pdf
#{tex_head_info}
\\documentclass[11pt,a4paper,titlepage,makeidx]{scrartcl}
\\usepackage{fontspec}
-\\usepackage{lmodern}
+% \\usepackage{lmodern} %%issue remove for now (consider later)
\\usepackage{geometry}
-\\geometry{
+\\geometry{%
#{d[:papertype]},
portrait,
left=#{d[:left]},
@@ -2290,9 +2298,10 @@ module SiSU_TeX_Pdf
\\usepackage{multicol}
\\setlength{\\marginparsep}{#{d[:marginparsep]}}
\\setlength{\\marginparwidth}{#{d[:marginparwidth]}}
-#{tex_head_paper_part}
+#{tex_head_paper_characters}
+#{tex_head_paper_shared}
#{tex_head_paper_newenv_newcmd}
-#{tex_head_paper_part_specific("portrait")}
+#{tex_head_paper_orient("portrait")}
#{multicol}
WOK
end
@@ -2301,7 +2310,7 @@ module SiSU_TeX_Pdf
#{tex_head_info}
\\documentclass[11pt,a4paper,landscape,titlepage,twocolumn,makeidx]{scrartcl}
\\usepackage{geometry}
-\\geometry{
+\\geometry{%
#{d[:papertype]},
landscape,
left=#{d[:left]},
@@ -2312,9 +2321,10 @@ module SiSU_TeX_Pdf
\\usepackage{multicol}
\\setlength{\\marginparsep}{#{d[:marginparsep]}}
\\setlength{\\marginparwidth}{#{d[:marginparwidth]}}
-#{tex_head_paper_part}
+#{tex_head_paper_characters}
+#{tex_head_paper_shared}
#{tex_head_paper_newenv_newcmd}
-#{tex_head_paper_part_specific("landscape")}
+#{tex_head_paper_orient("landscape")}
WOK
end
def tex_head_paper_portrait_dvi(d)