From a19b7494c87f05c895bb3cc76969ad9af0bf6c08 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 19 Aug 2007 02:41:50 +0100 Subject: sisu-0.56.3 minor update, small fixes * manifest make file-type descriptions simpler to understand * copyright restricted to rights tag, unless none, in which case rights tag gets creator information * copyright mark picked up in rights if 'Copyright (C)' is used * tex/pdf url matching semi-colon following url * endnote heading, apply tag to exclude numbering and segment heading where there is no segment * html scroll endnote text minor fix * initialize site structure, make copy site images default (sisu -CC) --- lib/sisu/v0/texpdf_format.rb | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'lib/sisu/v0/texpdf_format.rb') diff --git a/lib/sisu/v0/texpdf_format.rb b/lib/sisu/v0/texpdf_format.rb index 92333d28..0880a9c7 100644 --- a/lib/sisu/v0/texpdf_format.rb +++ b/lib/sisu/v0/texpdf_format.rb @@ -66,7 +66,7 @@ module SiSU_TeX_Pdf @vz=SiSU_Env::Get_init.instance.skin @date=SiSU_Env::Info_date.new # #{@date.year} @copymark='{\\begin{footnotesize}\\raisebox{1ex}{\\copyright}\\end{footnotesize}}' - #@url_brace=SiSU_Viz::Skin.new.url_decoration + @url_brace=SiSU_Viz::Skin.new.url_decoration end def skip "\n\\vspace*{\\smallskipamount} \n" @@ -144,9 +144,9 @@ WOK \\\\ ~ {\\begin{footnotesize}#{base_prog_txt} \\\\ Generated by \\href{http://www.jus.uio.no/sisu}{SiSU} \\begin{tiny}[ #{v[:project]} #{v[:version]} of #{v[:date_stamp]} ]\\end{tiny} \\href{http://www.jus.uio.no/sisu}{www.jus.uio.no/sisu} -\\\\ #@copymark Ralph Amissah 1997, current #{@date.year_static}, All Rights Reserved. +\\\\ Copyright #@copymark 1997, current #{@date.year_static} Ralph Amissah, All Rights Reserved. \\\\ SiSU is software for document structuring, publishing and search (with object citation numbering), \\href{http://www.sisudoc.org}{www.sisudoc.org} -\\\\ SiSU is released under \\href{http://www.fsf.org/licenses/gpl.html}{GPL 3 } or later, \\href{http://www.fsf.org/licenses/gpl.html}{http://www.fsf.org/licenses/gpl.html}. +\\\\ SiSU is released under \\href{http://www.fsf.org/licenses/gpl.html}{GPL 3 } or later, #{@url_brace.tex_open}\\href{http://www.fsf.org/licenses/gpl.html}{http://www.fsf.org/licenses/gpl.html}#{@url_brace.tex_close}. {\\end{footnotesize} \\\\ WOK @@ -190,7 +190,7 @@ WOK </,' ') @string.gsub!(/<\/a>/,' ') @string.gsub!(/[^\}>_]((?:https?|ftp):\/\/\S+?)(<\/\S>)/,' \begin{scriptsize}\href{\1}{\1} \end{scriptsize}\2') #special case - @string.gsub!(/((?:^|\s)[}])((?:https?|ftp):\/\/\S+?\.[^'"><\s]+?)([.,]?(?:\s|$))/,'\1\begin{scriptsize}\\href{\2}{\2}\end{scriptsize}\3') #special case \{ e.g. \}http://url - @string.gsub!(/\B(?:\\_|\\)((?:https?|ftp):\/\/\S+?\.[^'"><\s]+?)([.,]?(?:\s|$))/,'\begin{scriptsize}\\href{\1}{\1}\end{scriptsize}\2') #specially escaped url no decoration - @string.gsub!(/(^|\s)((?:https?|ftp):\/\/\S+?\.[^'"><\s]+?)([.,]?(?=\s|$))/,"\\1#{@url_brace.tex_open}\\begin{scriptsize}\\href{\\2}{\\2}\\end{scriptsize}#{@url_brace.tex_close}\\3") #url matching with decoration positive lookahead, sequence issue with { linked }http://url cannot use \b at start + @string.gsub!(/((?:^|\s)[}])((?:https?|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?:\s|$))/,'\1\begin{scriptsize}\\href{\2}{\2}\end{scriptsize}\3') #special case \{ e.g. \}http://url + @string.gsub!(/\B(?:\\_|\\)((?:https?|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?:\s|$))/,'\begin{scriptsize}\\href{\1}{\1}\end{scriptsize}\2') #specially escaped url no decoration + @string.gsub!(/(^|\s)((?:https?|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?=\s|$))/,"\\1#{@url_brace.tex_open}\\begin{scriptsize}\\href{\\2}{\\2}\\end{scriptsize}#{@url_brace.tex_close}\\3") #url matching with decoration positive lookahead, sequence issue with { linked }http://url cannot use \b at start @string.gsub!(/<:ee>/,'') @string.gsub!(//,' ') #proposed change, insert, but may be redundant @@ -789,10 +789,13 @@ WOK dir=SiSU_Env::Info_env.new(@md.fns) @words=[] @string.each do |word| - @words << if word=~/\{.+?\}(?:https?|ftp):\S+/ - if word =~/\\\{(.+?)\\\}((?:https?|ftp)\S+?)([;.,](?:\s|$))/ - r=%r/\\\{(.+?)\\?\}((?:https?|ftp):\S+?)(?:[;.,](?:\s|$)|(?:\s|$))/ - d=/\\\{.+?\\?\}(?:https?|ftp):\S+([;.,](?:\s|$))/.match(word).captures.to_s + @words << if word=~/\\\{.+?\\\}(?:https?|ftp):\S+/ + if word =~/\\\{(.+?)\\\}((?:https?|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?:\s|$))/ + r=%r/\\\{(.+?)\\?\}((?:https?|ftp):\/\/\S+?\.[^'"><\s]+?)(?:[;.,]?(?:\s|$)|(?:\s|$))/ + d=/\\\{.+?\\?\}(?:https?|ftp):\/\/\S+?\.[^'"><\s]+?([;.,]?(?:\s|$))/.match(word).captures.to_s +# if word =~/\\\{(.+?)\\\}((?:https?|ftp)\S+?)([;.,]?(?:\s|$))/ +# r=%r/\\\{(.+?)\\?\}((?:https?|ftp):\S+?)(?:[;.,]?(?:\s|$)|(?:\s|$))/ +# d=/\\\{.+?\\?\}(?:https?|ftp):\S+?([;.,]?(?:\s|$))/.match(word).captures.to_s else r=%r/\\\{(.+?)\\?\}((?:https?|ftp):\S+)/ d='' -- cgit v1.2.3