diff options
Diffstat (limited to 'lib/sisu/v2/texpdf.rb')
-rw-r--r-- | lib/sisu/v2/texpdf.rb | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lib/sisu/v2/texpdf.rb b/lib/sisu/v2/texpdf.rb index 0d77d65b..91cd84b6 100644 --- a/lib/sisu/v2/texpdf.rb +++ b/lib/sisu/v2/texpdf.rb @@ -295,10 +295,10 @@ module SiSU_TeX and not @md.rights.all.empty? rght=@md.rights #.author.dup #dup is necessary, else contents of :rights changed sp_char=SiSU_TeX_Pdf::Special_characters.new(@md,rght.copyright.all) - copymark=if @md.author_copymark; '{\\begin{small}\\raisebox{1ex}{\\copyright}\\end{small}} ' - else '' - end - copymark='Copyright {\\begin{small}\\raisebox{1ex}{\\copyright}\\end{small}} ' + copymark=@md.author_copymark \ + ? '{\begin{small}\copyright\end{small}} ' \ + : '' + copymark='Copyright {\begin{small}\copyright\end{small}} ' copyright=sp_char.special_characters_safe.gsub(/^\s*Copyright \(C\)/, copymark) @@rights||="\n #{Tex[:backslash]*2}[3]\\ \\linebreak #{copyright}" end @@ -437,16 +437,15 @@ module SiSU_TeX sp_char=SiSU_TeX_Pdf::Special_characters.new(@md,dob.tmp,dob.is) dob.tmp=sp_char.special_characters_safe dob.tmp.gsub!(/#{Mx[:nbsp]}/,'{~}') - dob.tmp.gsub!(/(?:#{Mx[:br_nl]}\s*)+/,"\n\n") #watch + #dob.tmp.gsub!(/#{Mx[:nbsp]}\s*/,'{~}') + dob.tmp.gsub!(/(?:#{Mx[:br_nl]}\s*)+/,' \\\\\\ ') #watch dob.tmp.gsub!(/\n\n\n/m," \\newline\n\n") #watch ocn=SiSU_TeX_Pdf::Format_text_object.new(@md).ocn_display(dob) dob.tmp = ocn \ + @tex_ml.paraskip_small \ - + "\n" \ - + ' \\begin{Codeblock}' \ - + "\n" \ + + '\begin{Codeblock}' \ + dob.tmp \ - + ' \\end{Codeblock}' \ + + ' \end{Codeblock}' \ + "\n" \ + @tex_ml.paraskip_normal dob @@ -566,8 +565,10 @@ module SiSU_TeX \\makeatother \\chardef\\txtbullet="2022 \\chardef\\tilde="7E +%\\chardef\\asterisk="2A +\\def\\asterisk{{\\rm \\char42} } \\definecolor{Light}{gray}{.92} -\\newcommand{\\Codeblock}[1]{\\normaltext\\raggedright\\tiny\\ttfamily\\texbackslash#1} +\\newcommand{\\Codeblock}[1]{\\normaltext\\raggedright\\small\\ttfamily\\texbackslash#1} \\newcommand{\\monosp}[1]{\\normaltext\\ttfamily\\texbackslash#1} % \\sloppy \\begin{document} @@ -594,8 +595,8 @@ WOK else "\n\\author{#{@copymark} \\textnormal{#{author}}}" end end - @tex_file << unless @md.fnb =~/^mail\s*$/; "\n\\date{\\begin{footnotesize} copy @ #{@tex_ml.site} \\end{footnotesize}}" - else "\\date" + @tex_file << unless @md.fnb =~/^mail\s*$/; @tex_ml.site + else '\date' end @tex_file <<<<WOK \\pagenumbering{roman}\\maketitle |