aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/texpdf_format.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v0/texpdf_format.rb')
-rw-r--r--lib/sisu/v0/texpdf_format.rb29
1 files changed, 16 insertions, 13 deletions
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
<<WOK
{\\begin{footnotesize}
\\\\ For alternative output formats of this document check:
-\\\\ \\begin{scriptsize}\\href{#{@vz.url_root_http}/#{url}/#{fn}}{#{@vz.url_root_http}/#{url}/#{fn}}\\end{scriptsize}
+\\\\ #{@url_brace.tex_open}\\begin{scriptsize}\\href{#{@vz.url_root_http}/#{url}/#{fn}}{#{@vz.url_root_http}/#{url}/#{fn}}\\end{scriptsize}#{@url_brace.tex_close}
\\end{footnotesize}}&
WOK
end
@@ -221,7 +221,7 @@ WOK
\"Support Open Standards and Software Libre for the Information Technology Infrastructure\" RA\\subsubsection*{Information on this document copy #{site}}
\\addcontentsline{toc}{subsection}{Information on this document copy}
{\\begin{footnotesize}
-\\\\ Generated by \\href{http://www.jus.uio.no/sisu/}{SiSU} found at \\href{http://www.jus.uio.no/sisu/}{www.jus.uio.no/sisu} \\begin{tiny}[ #{v[:project]} #{v[:version]} #{v[:date_stamp]} ]\\end{tiny} \\href{http://www.sisudoc.org}{www.sisudoc.org}. SiSU is software for document structuring, publishing and search (using SiSU: object citation numbering, markup, meta-markup, and system) #@copymark Ralph Amissah 1997, current #{@date.year_static}, All Rights Reserved.
+\\\\ Generated by \\href{http://www.jus.uio.no/sisu/}{SiSU} found at \\href{http://www.jus.uio.no/sisu/}{www.jus.uio.no/sisu} \\begin{tiny}[ #{v[:project]} #{v[:version]} #{v[:date_stamp]} ]\\end{tiny} \\href{http://www.sisudoc.org}{www.sisudoc.org}. SiSU is software for document structuring, publishing and search (using SiSU: object citation numbering, markup, meta-markup, and system) Copyright #@copymark 1997, current #{@date.year_static} Ralph Amissah, All Rights Reserved.
\\\\ SiSU is released under \\href{http://www.fsf.org/licenses/gpl.html}{GPL 3 } or later (\\href{http://www.fsf.org/licenses/gpl.html}{www.fsf.org/licenses/gpl.html}). {\\end{footnotesize}
{\\begin{small}
\\\\ W3 since October 3 1993 \\href{http://www.jus.uio.no/sisu/}{#{sisu_ico}}SiSU 1997, current #{@date.year_static}. \\\\ #{sitename} presentations at \\begin{bfseries}#{site}\\end{bfseries} \\\\ \\\\ #{@md.title} \\textbf{pdf} versions can be found at: \\\\
@@ -253,7 +253,7 @@ Mail from: ralph@amissah.com\\\\
\\\\
\"Support Open Standards and Open Sources for the Information Technology Infrastructure\" RA
\\subsubsection*{Information on this document copy #{site}\\copyright}
-Presentations' look and feel generated by \\href{http://www.jus.uio.no/sisu/}{SiSU Scribe} \\href{http://www.jus.uio.no/sisu/}{http://www.jus.uio.no/sisu/} programmed in Ruby on Debian/Gnu/Linux by \\copyright Ralph Amissah, W3 since October 3 1993 \\href{http://www.jus.uio.no/sisu/}{\\includegraphics*[width=35pt]{#{dir.path.image_source_tex}/sisu.png}}for #{sitename}. SiSU Scribe (sisu information structuring unit) produces Electronic Documents, i.e. it generates structured output for use in a number of file formats, including the pdf file produced here.
+Presentations' look and feel generated by \\href{http://www.jus.uio.no/sisu/}{SiSU Scribe} \\href{http://www.jus.uio.no/sisu/}{http://www.jus.uio.no/sisu/} programmed in Ruby on Debian/Gnu/Linux by Copyright \\copyright Ralph Amissah, W3 since October 3 1993 \\href{http://www.jus.uio.no/sisu/}{\\includegraphics*[width=35pt]{#{dir.path.image_source_tex}/sisu.png}}for #{sitename}. SiSU Scribe (sisu information structuring unit) produces Electronic Documents, i.e. it generates structured output for use in a number of file formats, including the pdf file produced here.
WOK
end
end
@@ -499,9 +499,9 @@ WOK
@string.gsub!(/<a href=".+?">/,' ')
@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 <url> 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 <url> 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=''