From 95628d2cb75fe0749c8c02dfdc2de7911a2d2e6e Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 19 Oct 2023 11:03:20 -0400 Subject: sisu, update sisu links, (continue ...) --- lib/sisu/texpdf.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sisu/texpdf.rb') diff --git a/lib/sisu/texpdf.rb b/lib/sisu/texpdf.rb index b8d58523..a8bbd568 100644 --- a/lib/sisu/texpdf.rb +++ b/lib/sisu/texpdf.rb @@ -48,8 +48,8 @@ # # - Git # -# -# +# +# module SiSU_TeX begin require 'pstore' -- cgit v1.2.3 From 1b7e9c73beee89ebc82d281314c9e34d8d829ff6 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 12 Oct 2023 23:19:50 -0400 Subject: 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 --- lib/sisu/texpdf.rb | 46 ++++++++++++++++------------------------------ 1 file changed, 16 insertions(+), 30 deletions(-) (limited to 'lib/sisu/texpdf.rb') 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 -- cgit v1.2.3 From 3a0bb67b63884e39075b2655dab7169ee93c1e54 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 26 Oct 2023 18:26:06 -0400 Subject: texpdf, cjk issues not resolved - font rendition bugs where tested --- lib/sisu/texpdf.rb | 60 ------------------------------------------------------ 1 file changed, 60 deletions(-) (limited to 'lib/sisu/texpdf.rb') diff --git a/lib/sisu/texpdf.rb b/lib/sisu/texpdf.rb index be139ff4..9850aeef 100644 --- a/lib/sisu/texpdf.rb +++ b/lib/sisu/texpdf.rb @@ -739,65 +739,6 @@ module SiSU_TeX end dob end - def tex_box_listings - <<-WOK -\\definecolor{listinggray}{gray}{0.9} -\\definecolor{lbcolor}{rgb}{0.9,0.9,0.9} -\\lstset{ - backgroundcolor=\\color{lbcolor}, - tabsize=4, - rulecolor=, - language=, - basicstyle=\\scriptsize, - upquote=true, - aboveskip={1.5\\baselineskip}, - 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}, -} - WOK - end - def tex_box_boites - <<-WOK -\\def\\codeblockboitebox{% - \\def\\bkvz@before@breakbox{\\ifhmode\\par\\fi\\vskip\\breakboxskip\\relax}% - \\def\\bkvz@set@linewidth{\\advance\\linewidth -2\\fboxrule - \\advance\\linewidth -2\\fboxsep} % - \\def\\bk@line{\\hbox to \\linewidth{% - \\ifbkcount\\smash{\\llap{\\the\\bk@lcnt\\ }}\\fi - \\psframebox*[framesep=0pt,linewidth=0pt]{% - \\vrule\\@width\\fboxrule \\hskip\\fboxsep - \\box\\bk@bxa - \\hskip\\fboxsep \\vrule\\@width\\fboxrule - }% - }}% - %\\def\\bkvz@top{\\hrule\\@height\\fboxrule} - \\def\\bkvz@top{\\hrule height .6pt}% - \\def\\bkvz@bottom{\\hrule\\@height\\fboxrule}% - \\breakbox} -\\def\\endcodeblockboitebox{\\endbreakbox} - WOK - end - def tex_codeblock - codeblock_box=if @codeblock_box=='listings' - tex_box_listings - elsif @codeblock_box=='boites' - tex_box_boites - else - tex_box_boites - end - codeblock_box - end def markup(data) @tex_file=[] home=the_text.txt_home.gsub(/#{Mx[:br_line]}|#{Mx[:br_nl]}|#{Mx[:br_paragraph]}|\\\\/,' - ') #no line splitting in heading neither html nor latex @@ -816,7 +757,6 @@ module SiSU_TeX end @tex_file << <<-WOK #{@tex_ml.header}#{@tex_ml.footer} -#{tex_codeblock} % (tilde hash amp affected by http) % \\sloppy \\begin{document} -- cgit v1.2.3