aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2023-10-12 23:19:50 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2023-10-19 12:22:09 -0400
commit1b7e9c73beee89ebc82d281314c9e34d8d829ff6 (patch)
tree14d669f6ba1e119d375b49198a732f93d86fed47 /lib
parentsisu, update sisu links, (continue ...) (diff)
texpdf address issue with texlive-2023
- reported on debian in relation to live-manual - make use of latex output for sisu.spine.d - was developed more recently, a comprehensive output update with focus on utf-8 improvements available in more recent version of texlive - tested forward does not appear to be similarly affected - other issues likely to appear as no attempt is made to fully backport the output for spine.d to sisu.rb
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/se_programs.rb1
-rw-r--r--lib/sisu/texpdf.rb46
-rw-r--r--lib/sisu/texpdf_format.rb449
3 files changed, 312 insertions, 184 deletions
diff --git a/lib/sisu/se_programs.rb b/lib/sisu/se_programs.rb
index 990f6eac..4730a10e 100644
--- a/lib/sisu/se_programs.rb
+++ b/lib/sisu/se_programs.rb
@@ -304,6 +304,7 @@ module SiSU_Sys_Call
when /pdflatex/
"#{texpdf} -interaction=#{mode} #{@input} #{tell}\n"
end
+ #puts texpdf_cmd
system(texpdf_cmd)
else STDERR.puts "\t*WARN* none of the following programs are installed: #{@texpdf}"
end
diff --git a/lib/sisu/texpdf.rb b/lib/sisu/texpdf.rb
index a8bbd568..be139ff4 100644
--- a/lib/sisu/texpdf.rb
+++ b/lib/sisu/texpdf.rb
@@ -68,7 +68,7 @@ module SiSU_TeX
@@tabular="{tabular}"
@@column_instruct=@@squigle_close=@@tex_line_mode=@@tex_word_mode=@@line_mode=''
@@tex_debug_counter=@@table_pagebreak_counter=@@tex_footnote_call_counter=@@tex_table_flag=@@tex_counter=@@tex_column=@@tex_columns=@@tex_columns=@@counting=0
- @@tex_pattern_margin_number=/\\\\begin\\\{tiny\\\}\\\\hspace\\\{0mm\\\}\\\\end\\\{tiny\\\}\\\{\\\\marginpar.+?\s+/
+ @@tex_pattern_margin_number=/\\\\ocn\\\{[0-9]+\\\}/
@@n=@@tableheader=@@rights=nil
@@date ||=SiSU_Env::InfoDate.new
class Source
@@ -744,10 +744,10 @@ module SiSU_TeX
\\definecolor{listinggray}{gray}{0.9}
\\definecolor{lbcolor}{rgb}{0.9,0.9,0.9}
\\lstset{
- backgroundcolor=\\color{lbcolor},
- tabsize=4,
- rulecolor=,
- language=,
+ backgroundcolor=\\color{lbcolor},
+ tabsize=4,
+ rulecolor=,
+ language=,
basicstyle=\\scriptsize,
upquote=true,
aboveskip={1.5\\baselineskip},
@@ -816,30 +816,6 @@ module SiSU_TeX
end
@tex_file << <<-WOK
#{@tex_ml.header}#{@tex_ml.footer}
-\\tolerance=300
-\\clubpenalty=300
-\\widowpenalty=300
-\\makeatother
-\\makeatother
-\\chardef\\txtbullet="2022
-\\chardef\\tilde="7E
-%\\chardef\\asterisk="2A
-\\def\\asterisk{{\\rm \\char42} }
-\\definecolor{Light}{gray}{.92}
-\\newcommand{\\Codeblock}[1]{\\normaltext\\raggedright\\small\\ttfamily\\texbackslash#1}
-\\newcommand{\\monosp}[1]{\\normaltext\\ttfamily\\texbackslash#1}
-\\newcommand{\\parasep}{\\\\ \\begin{center}*\\hspace{2em}*\\hspace{2em}*\\end{center} \\\\}
-\\newcommand{\\hardspace}{{~}}
-%\\newcommand{\\hardspace}{\\hspace{.5em}}
-\\newcommand{\\caret}{{\\^{~}}}
-\\newcommand{\\pipe}{{\\textbar}}
-\\newcommand{\\curlyopen}{\{}
-\\newcommand{\\curlyclose}{\}}
-\\newcommand{\\lt}{{\UseTextSymbol{OML}{<}}}
-\\newcommand{\\gt}{{\UseTextSymbol{OML}{>}}}
-\\newcommand{\\slash}{{/}}
-\\newcommand{\\underscore}{\\_}
-\\newcommand{\\exclaim}{\\Verbatim{!}}
#{tex_codeblock}
% (tilde hash amp affected by http)
% \\sloppy
@@ -898,8 +874,12 @@ module SiSU_TeX
x={}
if (@make.build.toc?)
toc=<<-WOK
+\\clearpage
+\\pagenumbering{roman}
+\\setcounter{page}{1}
\\renewcommand{\\contentsname}{#{@translate.contents}}
\\tableofcontents
+\\clearpage
WOK
toc_pb={ l: @tex_ml.newpage(:landscape), p: @tex_ml.newpage(:portrait) }
else
@@ -912,6 +892,9 @@ module SiSU_TeX
\\pagestyle{fancy}
#{toc}#{toc_pb[:l]}
\\pagenumbering{arabic}
+\\clearpage
+\\setcounter{page}{2}
+\\clearpage
#{@tex_ml.paraskip_normal}
#{@tex_ml.newpage(:landscape)}
WOK
@@ -923,6 +906,9 @@ module SiSU_TeX
#{toc}#{toc_pb[:p]}
#{@tex_ml.newpage(:portrait)}
\\pagenumbering{arabic}
+\\clearpage
+\\setcounter{page}{2}
+\\clearpage
#{@tex_ml.paraskip_normal}
#{@tex_ml.newpage(:portrait)}
WOK
@@ -988,7 +974,7 @@ module SiSU_TeX
# tags=tags +"\\hspace{0mm}\\hypertarget{#{t}}{\\hspace{0mm}}"
# end
#end
- "\\begin{tiny}\\hspace{0mm}\\end{tiny}{\\marginpar{\\begin{tiny}\\hspace{0mm}\\hypertarget{#{dob.ocn}}{#{dob.ocn}}#{tags}\\end{tiny}}}" #ocn object citation numbering
+ "\\ocn{#{dob.ocn}}" #ocn object citation numbering
else ''
end
dob.tmp = paranumber_display + dob.tmp
diff --git a/lib/sisu/texpdf_format.rb b/lib/sisu/texpdf_format.rb
index f88ac164..e5a323ad 100644
--- a/lib/sisu/texpdf_format.rb
+++ b/lib/sisu/texpdf_format.rb
@@ -77,7 +77,7 @@ module SiSU_TeX_Pdf
include SiSU_Parts_TeXpdf
attr_accessor :string,:string1,:orientation,:url,:dir,:tex
@@sys=SiSU_Env::SystemCall.new
- @@tex_pattern_margin_number=/\\begin\{tiny\}\\hspace\{0mm\}\\end\{tiny\}\{\\marginpar.+?\}\}\}/
+ @@tex_pattern_margin_number=/\\ocn\{[0-9]+\}/
@@tableheader={
'a4' => { p: 0, l: 0 },
'a5' => { p: 0, l: 0 },
@@ -103,7 +103,7 @@ module SiSU_TeX_Pdf
show_ocn=(@make.build.ocn?) \
? dob.ocn
: ''
- "\\begin{tiny}\\hspace{0mm}\\end{tiny}{\\marginpar{\\begin{tiny}\\hspace{0mm}\\hypertarget{#{dob.ocn}}{#{show_ocn}}\\end{tiny}}}" #ocn object citation numbering
+ "\\ocn{#{dob.ocn}}" #ocn object citation numbering
end
def table_special_characters(r)
r=r.gsub(/#{Mx[:tc_p]}/mu,'&').
@@ -275,7 +275,7 @@ module SiSU_TeX_Pdf
dob.tmp=dob.tmp.gsub(/\\begin\{(bfseries|itshape)\}(.+?)\\end\{\1\}/m,'\2').
gsub(/#{Mx[:url_o]}|#{Mx[:url_c]}/,'')
cont_ln=dob.tmp.dup
- cont_ln=cont_ln.gsub(/\\begin\{(monosp)\}(.+?)\\end\{\1\}/m,'\2').
+ cont_ln=cont_ln.gsub(/\\ocn\{[0-9]*\}/m,'').
gsub(@@tex_pattern_margin_number,'').
gsub(/#{Tex[:backslash]*2}/,"#{Tex[:backslash]*4}"). # added w42
gsub(/\\footnote\[\d+\]\{%.+?\\end\{scriptsize\}\s*\}/m,''). #arbitrary bugfix, revisit should not be necessary, eg. wta.1994 2004w22
@@ -349,9 +349,9 @@ module SiSU_TeX_Pdf
when /9/ then '8.0em'
else '-1.0em'
end
- "\\begin{Bullet}{#{indent}}$\\txtbullet$\\hspace{\\enspace}#{@dob.tmp}\\end{Bullet}"
+ "\\begin{Bullet}{#{indent}}#{@dob.tmp}\\end{Bullet}"
else
- "\\begin{Bullet}{-5mm}$\\txtbullet$\\hspace{\\enspace}#{@dob.tmp}\\end{Bullet}"
+ "\\begin{Bullet}{-5mm}#{@dob.tmp}\\end{Bullet}"
end
blt
end
@@ -735,22 +735,16 @@ module SiSU_TeX_Pdf
|| 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{english}
\\setmainfont{#{texpdf_fontface}}
\\setmonofont[Scale=0.85]{#{texpdf_fontface_mono}}
-% \\setsansfont{#{texpdf_fontface_sans}}
-% \\setromanfont{#{texpdf_fontface_serif}}
WOK
end
when /pdf/
@@ -781,33 +775,303 @@ module SiSU_TeX_Pdf
%% SiSU https://git.sisudoc.org/
WOK
end
+ def tex_head_paper_part
+ <<-WOK
+% \\usepackage[scaled]{dejavu}
+\\renewcommand*\\familydefault{\\sfdefault}
+%\\usepackage{inconsolata}
+\\usepackage[T1]{fontenc}
+\\usepackage{newunicodechar}
+% \\usepackage[utf8]{inputenc}
+\\usepackage{alltt}
+\\usepackage[
+ unicode=true,
+ pdfusetitle,
+ pdfsubject={},
+ pdfkeywords={}, % keywords list {} {} {},
+ pdftoolbar=true,
+ pdfmenubar=true,
+ pdfwindowui=true,
+ pdffitwindow=false, % window fit to page when opened
+ pdfstartview={FitH}, % fits the width of the page to the window
+ pdfnewwindow=true, % links in new window
+ pdfborder={0 0 1},
+ plainpages=false, % was true
+ bookmarks=true,
+ bookmarksopen=false,
+ bookmarksnumbered=false,
+ backref=false,
+ breaklinks=false,
+ colorlinks=true,
+ urlcolor=black,
+ filecolor=black,
+ linkcolor=black,
+ citecolor=black, % links_mono_or_color_set
+]{hyperref}
+\\PassOptionsToPackage{hyphens}{url}\\usepackage{hyperref}
+\\usepackage[usenames]{color}
+\\definecolor{myblack}{rgb}{0,0,0}
+\\definecolor{myred}{rgb}{0.75,0,0}
+\\definecolor{mygreen}{rgb}{0,0.5,0}
+\\definecolor{myblue}{rgb}{0,0,0.5}
+\\definecolor{mywhite}{rgb}{1,1,1}
+\\usepackage{textcomp}
+\\usepackage[parfill]{parskip}
+\\usepackage[normalem]{ulem}
+\\usepackage{soul}
+\\usepackage{longtable}
+\\usepackage{graphicx}
+\\usepackage[tc]{titlepic}
+\\usepackage{amssymb}
+\\usepackage{amsmath}
+\\usepackage[cm]{sfmath}
+\\usepackage{underscore}
+\\usepackage{listings}
+\\setcounter{secnumdepth}{2}
+\\setcounter{tocdepth}{4}
+\\usepackage{bookmark}
+\\usepackage{microtype}
+\\makeatletter
+\\usepackage[multiple,ragged]{footmisc}
+\\setlength\\footnotemargin{12pt}
+\\usepackage[para]{manyfoot}
+\\DeclareNewFootnote{A}
+\\makeatother
+\\chardef\\txtbullet="2022
+\\chardef\\tilde="7E
+\\def\\asterisk{{\\rm \\char42} }
+\\definecolor{Light}{gray}{.92}
+\\definecolor{listinggray}{gray}{0.9}
+\\definecolor{lbcolor}{rgb}{0.9,0.9,0.9}
+\\lstset{
+ backgroundcolor=\\color{lbcolor},
+ tabsize=4,
+ rulecolor=,
+ language=,
+ basicstyle={\\ttfamily\\scriptsize},
+ upquote=true,
+ columns=fixed,
+ showstringspaces=false,
+ extendedchars=true,
+ breaklines=true,
+ prebreak = \\raisebox{0ex}[0ex][0ex]{\\ensuremath{\\hookleftarrow}},
+ frame=single,
+ showtabs=false,
+ showspaces=false,
+ showstringspaces=false,
+ identifierstyle=\\ttfamily,
+ keywordstyle=\\color[rgb]{0,0,1},
+ commentstyle=\\color[rgb]{0.133,0.545,0.133},
+ stringstyle=\\color[rgb]{0.627,0.126,0.941},
+}
+\\DeclareTOCStyleEntry[numwidth+=8pt]{part}{part}
+\\DeclareTOCStyleEntry[numwidth+=4pt]{section}{section}
+\\DeclareTOCStyleEntry[numwidth+=3pt]{section}{paragraph}
+\\DeclareTOCStyleEntry[numwidth+=3pt]{section}{subparagraph}
+\\DeclareTOCStyleEntry[numwidth+=3pt]{section}{subsection}
+\\DeclareTOCStyleEntries[indent+=4pt]{section}{section,subsection,subsubsection}
+\\DeclareTOCStyleEntries[numwidth+=3pt]{section}{paragraph,subparagraph}
+ WOK
+ end
+ def tex_head_paper_newenv_newcmd
+ <<-WOK
+\\newenvironment{ParagraphIndent}[1]{%
+ \\begin{list}{}{%
+ \\setlength\\topsep{0pt}%
+ \\addtolength{\\leftmargin}{#1}
+ \\setlength\\parsep{0pt plus 1pt}%
+ }
+ \\item[]
+} {\\end{list}}
+\\newenvironment{ParagraphHang}[2]{%
+ \\begin{list}{}{%
+ \\setlength\\topsep{0pt}%
+ \\addtolength{\\leftmargin}{#1}
+ \\itemindent=#2
+ \\setlength\\parsep{0pt plus 1pt}%
+ }
+ \\item[]
+} {\\end{list}}
+\\newenvironment{Bullet}[1]{%
+ \\begin{list}{}{%
+ \\setlength\\topsep{0pt}%
+ \\addtolength{\\leftmargin}{#1}
+ \\itemindent=-1em
+ \\setlength\\parsep{0pt plus 1pt}%
+ }
+ \\item[]
+ $\\txtbullet$\\hspace{\\enspace}
+} {\\end{list}}
+\\newcommand{\\monosp}[1]{\\normaltext\\ttfamily\\texbackslash#1}
+\\newcommand{\\br}{\\hfill\\break}
+\\newcommand{\\brl}[1]{%
+ \\ifx&#1&%
+ \\hfill\\break
+ \\else
+ \\vspace{#1ex}
+ \\fi
+}
+\\newcommand{\\brln}{\\hspace*{\\fill}\\linebreak}
+\\newcommand{\\objBlockOpen}{%
+ \\setlength{\\parskip}{0.5ex plus0.2ex minus0.1ex}\\raggedright
+ \\begin{footnotesize}
+}
+\\newcommand{\\objBlockClose}{%
+ \\end{footnotesize}
+ \\setlength{\\parskip}{1ex plus0.5ex minus0.2ex}
+}
+\\newcommand{\\objGroupOpen}{%
+ \\setlength{\\parskip}{0.5ex plus0.2ex minus0.1ex}
+ \\begin{footnotesize}
+}
+\\newcommand{\\objGroupClose}{%
+ \\end{footnotesize}
+}
+\\newcommand{\\objPoemVerseOpen}{%
+ \\setlength{\\parskip}{0.1ex plus0.1ex minus0.1ex}
+ \\begin{footnotesize}
+
+}
+\\newcommand{\\objPoemVerseClose}{%
+
+ \\end{footnotesize}
+ \\setlength{\\parskip}{1ex plus0.5ex minus0.2ex}
+ \\linebreak
+}
+\\newcommand{\\parasep}{%
+ \\smallskip \\begin{center}*\\hspace{2em}*\\hspace{2em}*\\end{center} \\br
+}
+\\newcommand{\\spaces}[1]{{\\hspace*{#1ex}}}
+\\newcommand{\\s}{\\hspace*{1ex}}
+\\newcommand{\\hardspace}{\\hspace*{1ex}}
+\\newcommand{\\-}{\\hspace*{1ex}}
+\\newcommand{\\caret}{{\\^{~}}}
+\\newcommand{\\pipe}{{\\textbar}}
+\\newcommand{\\curlyOpen}{{}
+\\newcommand{\\curlyClose}{}}
+\\newcommand{\\lt}{{UseTextSymbol{OML}{<}}}
+\\newcommand{\\gt}{{UseTextSymbol{OML}{>}}}
+\\newcommand{\\slash}{{/}}
+\\newcommand{\\underscore}{\\_}
+\\newcommand{\\exclaim}{\\Verbatim{!}}
+\\newcommand{\\linktext}[2]{%
+ {\\href{#1}
+ {\\;\\ulcorner\\,\\textup{{#2}}\\,\\lrcorner}}
+}
+\\newcommand{\\linkurl}[2]{%
+ \\;{\\href{#1}
+ {\\;\\scriptsize\\ttfamily\\ulcorner\\,\\textup{{#2}}\\,\\lrcorner}}
+}
+\\newcommand{\\link}[2]{%
+ {\\begin{scriptsize}\\color{black}\\urlstyle{tt}\\href{#1}
+ {\\;\\ulcorner\\,{#2}\\,\\lrcorner}\\end{scriptsize}}
+}
+\\newcommand{\\objCodeBlock}[1]{\\normaltext\\raggedright\\small\\ttfamily\\texbackslash#1}
+\\newcommand{\\objCodeOpen}{%
+ \\normaltext\\raggedright\\small\\ttfamily\\texbackslash
+ \\begin{lstlisting}
+}
+\\newcommand{\\objCodeClose}{%
+ \\end{lstlisting}
+}
+\\newcommand{\\ocn}[1]{%
+ \\setlength{\\parindent}{0em}
+ \\ifx&#1&% #1 is empty
+ \\hspace{-0.5ex}{\\marginpar{\\begin{tiny}\\end{tiny}}}
+ \\else% #1 is nonempty
+ \\hspace{-0.5ex}{\\marginpar{\\begin{tiny}\\hspace{0em}\\hypertarget{#1}{#1}\\end{tiny}}}
+ \\fi
+}
+\\newcommand{\\ocnhold}[1]{%
+ \\begin{tiny}\\hspace{0mm}\\end{tiny}{\\marginpar{\\begin{tiny}\\hspace{0mm}\\hypertarget{#1}{#1}\\end{tiny}}}
+}
+\\newcommand{\\objCodeBlockHold}[1]{\\normaltext\\raggedright\\small\\ttfamily\\texbackslash#1}
+\\newcommand{\\objTableOpen}[1]{%
+ \\setlength{\\LTleft}{0pt}
+ \\setlength{\\LTright}{\\fill}
+ \\begin{tiny}
+ \\begin{longtable}{#1}
+}
+\\newcommand{\\objTableClose}{%
+ \\end{longtable}
+ \\end{tiny}
+}
+ WOK
+ end
+ def tex_head_paper_part_specific
+ <<-WOK
+\\usepackage[english,english]{babel}
+\\usepackage[autostyle, english = american]{csquotes}
+% \\MakeOuterQuote{"} % not required, using '' as quote delimiter
+\\selectlanguage{english}
+\\hypersetup{
+ pdftitle={#{@md.title.short}},
+ pdfauthor={#{@md.creator.author}},
+ pdfsubject={},
+}
+\\usepackage{fancyhdr}
+\\lhead[ ]{ }
+\\chead[ \\fancyplain{} \\bfseries \\footnotesize \\leftmark ]{ \\fancyplain{} \\bfseries \\footnotesize \\rightmark }
+\\rhead[ ]{ }
+\\lfoot[\\textrm{\\thepage}]{\\tiny \\href{https://sisudoc.org}{SiSU}}
+ \\cfoot{\\href{https://git.sisudoc.org}{git}}
+\\rfoot[\\tiny \\href{}{}]{\\textrm{\\thepage}}
+\\begin{document}
+\\thispagestyle{empty}
+\\title{#{@md.title.full}}
+\\author{ \\textnormal{#{@md.creator.author}}}
+\\date{\\begin{tiny}2015-08-23\\end{tiny}}
+\\maketitle
+\\addcontentsline{toc}{part}{#{@md.title.full}}
+\\newpage
+\\pagestyle{fancy}
+\\pagenumbering{alph}
+\\setcounter{page}{1}
+ WOK
+ end
def tex_head_paper_portrait(d)
multicol=(@md.book_idx ? '\usepackage{multicol}' : '')
<<-WOK
#{tex_head_info}
+\\documentclass[11pt,a4paper,titlepage,makeidx]{scrartcl}
\\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]}}
-\\setlength{\\topmargin}{#{d[:topmargin]}} \\setlength{\\headheight}{#{d[:headheight]}}
-\\setlength{\\headsep}{#{d[:headsep]}}
+\\geometry{
+ a4paper,
+ portrait,
+ left=30mm,
+ right=20mm,
+ top=30mm,
+ bottom=30mm,
+}
+% \\ProvidesPackage{./sty/spineShared}
+\\usepackage{multicol}
\\setlength{\\marginparsep}{#{d[:marginparsep]}}
\\setlength{\\marginparwidth}{#{d[:marginparwidth]}}
+#{tex_head_paper_part}
+#{tex_head_paper_newenv_newcmd}
+#{tex_head_paper_part_specific}
#{multicol}
WOK
end
def tex_head_paper_landscape(d)
<<-WOK
#{tex_head_info}
+\\documentclass[11pt,a4paper,titlepage,makeidx]{scrartcl}
\\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]}}
-\\setlength{\\topmargin}{#{d[:topmargin]}} \\setlength{\\headheight}{#{d[:headheight]}}
-\\setlength{\\headsep}{#{d[:headsep]}}
-\\setlength{\\columnsep}{#{d[:columnsep]}}
+\\geometry{
+ a4paper,
+ landscape,
+ left=30mm,
+ right=20mm,
+ top=30mm,
+ bottom=30mm,
+}
+\\usepackage{multicol}
\\setlength{\\marginparsep}{#{d[:marginparsep]}}
\\setlength{\\marginparwidth}{#{d[:marginparwidth]}}
+#{tex_head_paper_part}
+#{tex_head_paper_newenv_newcmd}
+#{tex_head_paper_part_specific}
WOK
end
def tex_head_paper_portrait_dvi(d)
@@ -955,45 +1219,6 @@ module SiSU_TeX_Pdf
else ''
end
<<-WOK
-\\usepackage{alltt}
-\\usepackage{thumbpdf}
-\\usepackage[#{@tex2pdf},
- #{hyperlinks_color?.strip}
- pdftitle={#{@txt}},
- pdfauthor={#{author}},
- pdfsubject={#{@subject}},
- pdfkeywords={#{@keywords}},
- pageanchor=true,
- plainpages=true,
- pdfpagelabels=true,
- pagebackref,
- bookmarks=true,
- bookmarksopen=true,
- pdfmenubar=true,
- pdfpagemode=UseOutline,
- pdffitwindow=true,
- pdfwindowui=true,
- plainpages=false,
-% pdfusetitle=true,
-% pdfpagelayout=SinglePage,
-% pdfpagelayout=TwoColumnRight,
-% pdfpagelayout=TwoColumnLeft,
-% pdfstartpage=3,
- pdfstartview=FitH
-]
-{hyperref}
-%% trace lost characters
-% \\tracinglostchars = 1
-% \\tracingonline = 1
-\\usepackage[usenames]{color}
-\\definecolor{myblack}{rgb}{0,0,0}
-\\definecolor{myred}{rgb}{0.75,0,0}
-\\definecolor{mygreen}{rgb}{0,0.5,0}
-\\definecolor{myblue}{rgb}{0,0,0.5}
-\\definecolor{mywhite}{rgb}{1,1,1}
-\\usepackage{url}
-\\urlstyle{sf}
-%\\usepackage{breakurl}
WOK
end
def tex_head_codeblock(codeblock_box_type)
@@ -1010,22 +1235,6 @@ module SiSU_TeX_Pdf
end
codeblock_box
end
- def tex_head_misc
- <<-WOK
-\\usepackage{textcomp}
-\\usepackage[parfill]{parskip}
-\\usepackage[normalem]{ulem}
-\\usepackage{soul}
-\\usepackage{longtable}
-\\usepackage[tc]{titlepic}
-\\usepackage{graphicx}
-\\makeatletter
-\\parindent0pt
-%\\usepackage{mathptmx}
-\\usepackage{amssymb}
-% amssymb used for backslash
- WOK
- end
def document_head_with_orientation(codeblock_box_type)
endnotes=("\\usepackage{endnotes}" if @txt =~/endnotes?/) || '' #not implemented see also def endnotes
@lang.list[@md.i18n[0]][:xlp]
@@ -1033,78 +1242,7 @@ module SiSU_TeX_Pdf
#{tex_head_paper}
#{tex_head_encode}
#{tex_head_pdftex}
-#{tex_head_misc}
#{tex_head_codeblock(codeblock_box_type)}
-\\setcounter{secnumdepth}{2}
-\\setcounter{tocdepth}{4}
-\\makeatletter
-#{endnotes}
-\\usepackage[multiple,ragged]{footmisc}
-\\setlength\\footnotemargin{12pt}
-\\usepackage[para]{manyfoot}
-\\DeclareNewFootnote{A}
-%\\DeclareNewFootnote[para]{A}
-\\newenvironment{ParagraphIndent}[1]%
-{
-\\begin{list}{}{%
-\\setlength\\topsep{0pt}%
-\\addtolength{\\leftmargin}{#1}
-\\setlength\\parsep{0pt plus 1pt}%
-}
-\\item[]
-}
-{\\end{list}}
-
-\\newenvironment{ParagraphHang}[2]%
-{
-\\begin{list}{}{%
-\\setlength\\topsep{0pt}%
-\\addtolength{\\leftmargin}{#1}
-\\itemindent=#2
-\\setlength\\parsep{0pt plus 1pt}%
-}
-\\item[]
-}
-{\\end{list}}
-
-\\newenvironment{Bullet}[1]%
-{
-\\begin{list}{}{%
-\\setlength\\topsep{0pt}%
-\\addtolength{\\leftmargin}{#1}
-\\itemindent=-1em
-\\setlength\\parsep{0pt plus 1pt}%
-}
-\\item[]
-}
-{\\end{list}}
-\\usepackage{fancyhdr}
-\\lhead{}
-\\renewcommand{\\part}{\\\@startsection
- {part}{1}{-2mm}%
- {-\\baselineskip}{0.5\\baselineskip}%
- {\\bfseries\\large\\upshape\\raggedright}}
-\\renewcommand{\\section}{\\\@startsection
- {section}{2}{-2mm}%
- {-\\baselineskip}{0.5\\baselineskip}%
- {\\bfseries\\large\\upshape\\raggedright}}
-\\renewcommand{\\subsection}{\\\@startsection
- {subsection}{3}{-2mm}%
- {-\\baselineskip}{0.5\\baselineskip}%
- {\\bfseries\\large\\upshape\\raggedright}}
-\\renewcommand{\\subsubsection}{\\\@startsection
- {subsubsection}{4}{-2mm}%
- {-\\baselineskip}{0.5\\baselineskip}%
- {\\normalfont\\normalsize\\bfseries\\raggedright}}
-\\renewcommand{\\paragraph}{\\\@startsection
- {paragraph}{5}{-2mm}%
- {-\\baselineskip}{0.5\\baselineskip}%
- {\\normalfont\\normalsize\\itshape\\raggedright}}
-\\renewcommand{\\subparagraph}{\\\@startsection
- {subparagraph}%{6}%{-2mm}%
- {-\\baselineskip}{0.5\\baselineskip}%
- {\\normalfont\\normalsize\\itshape\\raggedright}}
-% \\makeatother
\\selectlanguage{#{@lang.list[@md.i18n[0]][:xlp]}}
WOK
end
@@ -1397,9 +1535,7 @@ module SiSU_TeX_Pdf
"\n"
end
def header
- "\\lhead[ ]{ }\n" +
- "\\chead[ \\fancyplain{} \\bfseries \\footnotesize \\leftmark ]{ \\fancyplain{} \\bfseries \\footnotesize \\rightmark }\n" +
- "\\rhead[ ]{ }\n"
+ ""
end
def footer
"\\lfoot[\\textrm{\\thepage}]{\\tiny \\href{#{@md.footer_links[:left][:url]}}{#{@md.footer_links[:left][:say]}}}\n" +
@@ -1493,10 +1629,10 @@ Generated by \\href{https://git.sisudoc.org/}{SiSU https://git.sisudoc.org/ } \\
end
end
__END__
-ag usepackage texpdf*
-ag usepackage texpdf* | ag '\{.+?\}'
+rg usepackage texpdf*
+rg usepackage texpdf* | rg '\{.+?\}'
# texpdf_format.rb
-ag usepackage texpdf* | ag --only-matching '\{.+?\}'
+rg usepackage texpdf* | rg --only-matching '\{.+?\}' |sort|uniq
* sort & make unique
@tex2pdf
@@ -1598,6 +1734,7 @@ xunicode.sty
texlive-base:
amssymb.sty
+
texlive-latex-base:
alltt.sty
babel.sty
@@ -1610,6 +1747,7 @@ texlive-latex-base:
multicol.sty
textcomp.sty
url.sty
+
texlive-latex-extra:
boites.sty
breakurl.sty
@@ -1619,6 +1757,7 @@ texlive-latex-extra:
soul.sty
titlepic.sty
ucs.sty
+
texlive-latex-recommended:
fontspec.sty
listings.sty
@@ -1627,8 +1766,10 @@ texlive-latex-recommended:
thumbpdf.sty
xltxtra.sty
xunicode.sty
+
texlive-plain-generic:
ulem.sty
+
texlive-xetex:
xeCJK.sty