From 14ddc81aa7323d9b8c6a131e2148d88c56533912 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 24 Oct 2023 11:37:45 -0400 Subject: texpdf papersize & papermargins --- org/texpdf.org | 44 ++++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) (limited to 'org/texpdf.org') diff --git a/org/texpdf.org b/org/texpdf.org index 798c7dd4..cf8067ba 100644 --- a/org/texpdf.org +++ b/org/texpdf.org @@ -1976,7 +1976,15 @@ module SiSU_TeX_Pdf # fc-list :lang=ja case @tex2pdf when /xe/ - if (tex_head_lang[:mainlang] == "english" \ + if @md.opt.lng =~/(?:zh|ja|ko)/ + <<-WOK +\\setmainlanguage{#{tex_head_lang[:mainlang]}} +\\setotherlanguage{english} +\\setmainfont{#{texpdf_fontface_cjk}} +\\setotherfont{#{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)) @@ -2032,7 +2040,7 @@ module SiSU_TeX_Pdf \\usepackage{alltt} \\usepackage[ unicode=true, - pdfusetitle, + pdfusetitle, pdfsubject={}, pdfkeywords={}, % keywords list {} {} {}, pdftoolbar=true, @@ -2290,12 +2298,12 @@ module SiSU_TeX_Pdf \\documentclass[11pt,a4paper,titlepage,makeidx]{scrartcl} \\usepackage{geometry} \\geometry{ - a4paper, + #{d[:papertype]}, portrait, - left=30mm, - right=20mm, - top=30mm, - bottom=30mm, + left=#{d[:left]}, + right=#{d[:right]}, + top=#{d[:top]}, + bottom=#{d[:bottom]}, } % \\ProvidesPackage{./sty/spineShared} \\usepackage{multicol} @@ -2313,12 +2321,12 @@ module SiSU_TeX_Pdf \\documentclass[11pt,a4paper,landscape,titlepage,twocolumn,makeidx]{scrartcl} \\usepackage{geometry} \\geometry{ - a4paper, + #{d[:papertype]}, landscape, - left=30mm, - right=20mm, - top=30mm, - bottom=30mm, + left=#{d[:left]}, + right=#{d[:right]}, + top=#{d[:top]}, + bottom=#{d[:bottom]}, } \\usepackage{multicol} \\setlength{\\marginparsep}{#{d[:marginparsep]}} @@ -2351,6 +2359,8 @@ module SiSU_TeX_Pdf when :portrait fontsize=(fontsize_set==:na) ? '11pt' : (fontsize_set + 'pt') d[:papertype],d[:fontsize]='a4paper',fontsize + d[:left],d[:right]='30mm','20mm' + d[:top],d[:bottom]='30mm','30mm' d[:oddsidemargin],d[:evensidemargin],d[:topmargin]='0mm','0mm','-12pt' d[:headheight],d[:headsep],d[:columnsep]='12pt','35pt','' d[:marginparsep],d[:marginparwidth]='4mm','8mm' @@ -2370,12 +2380,16 @@ module SiSU_TeX_Pdf when /book|b5/i #book default - larger fontsize=(fontsize_set==:na) ? '11pt' : (fontsize_set + 'pt') d[:papertype],d[:fontsize]='b5paper',fontsize + d[:left],d[:right]='20mm','20mm' + d[:top],d[:bottom]='20mm','20mm' d[:oddsidemargin],d[:evensidemargin],d[:topmargin]='-4mm','-4mm','-36pt' d[:headheight],d[:headsep],d[:columnsep]='12pt','20pt','' d[:textheight],d[:textwidth]=@tx.b5.portrait.h,@tx.b5.portrait.w when /a5/i fontsize=(fontsize_set==:na) ? '11pt' : (fontsize_set + 'pt') d[:papertype],d[:fontsize]='a5paper',fontsize + d[:left],d[:right]='20mm','20mm' + d[:top],d[:bottom]='20mm','20mm' d[:oddsidemargin],d[:evensidemargin],d[:topmargin]='-4mm','-4mm','-36pt' d[:headheight],d[:headsep],d[:columnsep]='11pt','12pt','' d[:marginparsep],d[:marginparwidth]='4mm','6mm' @@ -2388,6 +2402,8 @@ module SiSU_TeX_Pdf when :landscape fontsize=(fontsize_set==:na) ? '11pt' : (fontsize_set + 'pt') d[:papertype],d[:fontsize]='a4paper',fontsize + d[:left],d[:right]='30mm','20mm' + d[:top],d[:bottom]='30mm','30mm' d[:oddsidemargin],d[:evensidemargin],d[:topmargin]='6mm','6mm','-12mm' d[:headheight],d[:headsep],d[:columnsep]='12pt','20pt','40pt' d[:marginparsep],d[:marginparwidth]='4mm','8mm' @@ -2407,10 +2423,14 @@ module SiSU_TeX_Pdf when /book|b5/i #book default - larger fontsize=(fontsize_set==:na) ? '11pt' : (fontsize_set + 'pt') d[:papertype],d[:fontsize],d[:columnsep]='b5paper',fontsize,'35pt' + d[:left],d[:right]='25mm','25mm' + d[:top],d[:bottom]='20mm','20mm' d[:textheight],d[:textwidth]=@tx.b5.landscape.h,@tx.b5.landscape.w when /a5/i fontsize=(fontsize_set==:na) ? '10pt' : (fontsize_set + 'pt') d[:papertype],d[:fontsize],d[:columnsep]='a5paper',fontsize,'32pt' + d[:left],d[:right]='25mm','25mm' + d[:top],d[:bottom]='20mm','20mm' d[:textheight],d[:textwidth]=@tx.a5.landscape.h,@tx.a5.landscape.w else #default currently A4 fontsize=(fontsize_set==:na) ? '12pt' : (fontsize_set + 'pt') -- cgit v1.2.3