diff options
author | Ralph Amissah <ralph@amissah.com> | 2010-05-05 18:35:26 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2010-05-05 18:35:26 -0400 |
commit | f88eafe0b12e08087b006ae6645349e70c1e358c (patch) | |
tree | c8fd098d8a2e16a6eb64c38fccab296f9a9ec1db /lib | |
parent | debian/changelog (2.3.2-1) (diff) | |
parent | update: changelog, version (2.3.3) (diff) |
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v2/defaults.rb | 8 | ||||
-rw-r--r-- | lib/sisu/v2/param.rb | 2 | ||||
-rw-r--r-- | lib/sisu/v2/shared_metadata.rb | 16 | ||||
-rw-r--r-- | lib/sisu/v2/sysenv.rb | 12 | ||||
-rw-r--r-- | lib/sisu/v2/texpdf.rb | 3 | ||||
-rw-r--r-- | lib/sisu/v2/texpdf_format.rb | 25 | ||||
-rw-r--r-- | lib/sisu/v2/urls.rb | 2 |
7 files changed, 46 insertions, 22 deletions
diff --git a/lib/sisu/v2/defaults.rb b/lib/sisu/v2/defaults.rb index aa1c8e49..1f649b0a 100644 --- a/lib/sisu/v2/defaults.rb +++ b/lib/sisu/v2/defaults.rb @@ -2158,7 +2158,7 @@ WOK 160 end def img_px - 348 + 300 end self end @@ -2185,7 +2185,7 @@ WOK 166 end def img_px - 310 + 290 end self end @@ -2239,7 +2239,7 @@ WOK 130 end def img_px - 280 + 260 end self end @@ -2266,7 +2266,7 @@ WOK 100 end def img_px - 230 + 190 end self end diff --git a/lib/sisu/v2/param.rb b/lib/sisu/v2/param.rb index 3db97340..285859d7 100644 --- a/lib/sisu/v2/param.rb +++ b/lib/sisu/v2/param.rb @@ -857,7 +857,7 @@ module SiSU_Param end @txt_path=@txt_path ||= @env.path.output @stmp=%{#{@fns}}[/^(.+?)\..*/m,1] - @fnstex=@fns.gsub(/_/,'\_') + @fnstex=@fns.gsub(/_/,'\_\-').gsub(/\./,'.\-') @flag_endnotes,@flag_auto_endnotes,@flag_separate_endnotes=false,false,false @flag_separate_endnotes_make=true regx_date=/^\d{4}(?:-(?:[0][0-9]|1[0-2])(-(?:[0-2][0-9]|3[01]))?)?$/ diff --git a/lib/sisu/v2/shared_metadata.rb b/lib/sisu/v2/shared_metadata.rb index bd1fe73a..cd46bd1d 100644 --- a/lib/sisu/v2/shared_metadata.rb +++ b/lib/sisu/v2/shared_metadata.rb @@ -533,6 +533,12 @@ WOK def spec_char(inf) SiSU_TeX_Pdf::Special_characters.new(@md,inf).special_characters end + def word_break_points(inf) + SiSU_TeX_Pdf::Special_characters.new(@md,inf).special_word_break_points + end + def number_break_points(inf) + SiSU_TeX_Pdf::Special_characters.new(@md,inf).special_number_break_points + end def metadata_tex meta=[] dir=SiSU_Env::Info_env.new(@md.fns) @@ -636,6 +642,7 @@ WOK if defined? @md.classify.topic_register \ and @md.classify.topic_register=~/\S+/ tag,inf=tr.topic_register,@md.classify.topic_register + inf=word_break_points(inf) meta << meta_para(tag,inf) end if defined? @md.classify.loc \ @@ -722,6 +729,7 @@ WOK if defined? @md.fns \ and @md.fns=~/\S+/ fn=spec_char(@md.fns) + fn=word_break_points(fn) fn="\\begin\{footnotesize\}#{fn}\\end\{footnotesize\}" tag,inf=tr.sourcefile,fn meta << meta_para(tag,inf,false) @@ -734,13 +742,17 @@ WOK if defined? @md.dgst \ and @md.dgst.class==Array hash_of=spec_char(@md.dgst[0]) - tag,inf='Source Digest',"\\begin\{footnotesize\}#{hash_of}\\end\{footnotesize\} #{@br}#{@md.dgst[1]}" + hash_of=word_break_points(hash_of) + dgst=number_break_points(@md.dgst[1]) + tag,inf='Source Digest',"\\begin\{footnotesize\}#{hash_of}\\end\{footnotesize\}\\-\\begin\{scriptsize\}#{dgst}\\end\{scriptsize\}" meta << meta_para(tag,inf,false) end if defined? @md.dgst_skin \ and @md.dgst_skin.class==Array hash_of=spec_char(@md.dgst_skin[0]) - tag,inf='Skin Digest',"\\begin\{footnotesize\}#{hash_of}\\end\{footnotesize\} #{@br}#{@md.dgst_skin[1]}" + hash_of=word_break_points(hash_of) + dgst=number_break_points(@md.dgst_skin[1]) + tag,inf='Skin Digest',"\\begin\{footnotesize\}#{hash_of}\\end\{footnotesize\}\\-\\begin\{scriptsize\}#{dgst}\\end\{scriptsize\}" meta << meta_para(tag,inf,false) end meta << %{#{@br}\\begin\{bfseries\}Generated \\end\{bfseries\}} diff --git a/lib/sisu/v2/sysenv.rb b/lib/sisu/v2/sysenv.rb index f440fd3f..cc21a6c9 100644 --- a/lib/sisu/v2/sysenv.rb +++ b/lib/sisu/v2/sysenv.rb @@ -2113,7 +2113,7 @@ WOK and not (@rc['flag']['default'].nil? \ or @rc['flag']['default'].empty?) @rc['flag']['default'] - else '-NhwepaobxXyYv' + else '-NhwepoabxXyYv' end end def cf_1 #processing flag shortcuts @@ -2121,7 +2121,7 @@ WOK and not (@rc['flag']['i'].nil? \ or @rc['flag']['i'].empty?) @rc['flag']['i'] - else '-hwepoy' + else '-hwepoay' end end def cf_2 #processing flag shortcuts @@ -2129,7 +2129,7 @@ WOK and not (@rc['flag']['ii'].nil? \ or @rc['flag']['ii'].empty?) @rc['flag']['ii'] - else '-NhwepaobxXy' + else '-NhwepoabxXy' end end def cf_3 #processing flag shortcuts @@ -2137,7 +2137,7 @@ WOK and not (@rc['flag']['iii'].nil? \ or @rc['flag']['iii'].empty?) @rc['flag']['iii'] - else '-NhwepaobxXyY' + else '-NhwepoabxXyY' end end def cf_4 #processing flag shortcuts @@ -2145,7 +2145,7 @@ WOK and not (@rc['flag']['iv'].nil? \ or @rc['flag']['iv'].empty?) @rc['flag']['iv'] - else '-NhwepaobxXDyY --import' + else '-NhwepoabxXDyY --update' end end def cf_5 #processing flag shortcuts @@ -2153,7 +2153,7 @@ WOK and not (@rc['flag']['v'].nil? \ or @rc['flag']['v'].empty?) @rc['flag']['v'] - else '-NhwepaobxXDyY --update' + else '-NhwepoabxXDyYv --update' end end end diff --git a/lib/sisu/v2/texpdf.rb b/lib/sisu/v2/texpdf.rb index a9b1df51..84347cba 100644 --- a/lib/sisu/v2/texpdf.rb +++ b/lib/sisu/v2/texpdf.rb @@ -277,6 +277,7 @@ module SiSU_TeX @tex_ml=SiSU_TeX_Pdf::Use_TeX.new(@md) @vz=SiSU_Env::Get_init.instance.skin @dp=@@dp ||=SiSU_Env::Info_env.new.digest.pattern + @brace_url=SiSU_Viz::Skin.new.url_decoration vz=SiSU_Env::Get_init.instance.skin @skin_no_ocn=if defined? vz.ocn_display_off \ and vz.ocn_display_off==true @@ -672,7 +673,7 @@ WOK s_lnk.gsub!(/\s*(#{Mx[:br_line]}|#{Mx[:br_nl]}|#{Mx[:br_paragraph]})\s*/,' \newline ') s_lnk.gsub!(/(?:\\)*([$&~%_#}{^])/,"\\\\\\1") #latex special chars if url !~/^\.(\.)?\// - s_lnk_url=%<\\begin{scriptsize}\\url{#{url}}\\end{scriptsize}> # note this bit of dereferencing magic + s_lnk_url=%<#{@brace_url.tex_open}\\begin{scriptsize}\\url{#{url}}\\end{scriptsize}#{@brace_url.tex_close}> # note this bit of dereferencing magic else url.gsub!(/\.\.\//,'') s_lnk_url="(#{@tex_ml.site}) \\\\\n" + ' ' + diff --git a/lib/sisu/v2/texpdf_format.rb b/lib/sisu/v2/texpdf_format.rb index 2d81f40c..1d2e891f 100644 --- a/lib/sisu/v2/texpdf_format.rb +++ b/lib/sisu/v2/texpdf_format.rb @@ -1098,6 +1098,17 @@ WOK str=xetex_special_characters_3(str) unless str.nil? @txt=str end + def special_word_break_points + str=@txt + str.gsub!(/([_,.;:\/|=])/,'\1\-') + str.gsub!(/(--)(\S{4,)/,'\1\-\2') + @txt=str + end + def special_number_break_points + str=@txt + str=str.gsub(/([0-9a-f]{8})/i,'\1\-') + @txt=str + end def special_characters_safe #special characters - some substitutions are sequence sensitive, rearrange with care. str,is=@txt,@is str=xetex_special_characters_1(str,is) unless str.nil? @@ -1271,20 +1282,20 @@ WOK \\\\ 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.full} \\textbf{pdf} versions can be found at: \\\\ +\\\\ W3 since October 3 1993 \\href{http://www.jus.uio.no/sisu/}{#{sisu_ico}}SiSU 1997, current #{@date.year_static}. \\\\ #{sitename} presentations at \\begin{scriptsize}#{site}\\end{scriptsize} \\\\ \\\\ #{@md.title.full} \\textbf{pdf} versions can be found at: \\\\ {\\end{small} -\\begin{scriptsize}\\href{#{@vz.url_root_http}/#{url}/#{@md.fn[:pdf_p]}}{#{@vz.url_root_http}/#{url}/#{@md.fn[:pdf_p]}}\\end{scriptsize} \\\\ -\\begin{scriptsize}\\href{#{@vz.url_root_http}/#{url}/#{@md.fn[:pdf_l]}}{#{@vz.url_root_http}/#{url}/#{@md.fn[:pdf_l]}}\\end{scriptsize} \\\\ +\\\\ #{@brace_url.tex_open}\\begin{scriptsize}\\url{#{@vz.url_root_http}/#{url}/#{@md.fn[:pdf_p]}}\\end{scriptsize}#{@brace_url.tex_close} \\\\ +#{@brace_url.tex_open}\\begin{scriptsize}\\url{#{@vz.url_root_http}/#{url}/#{@md.fn[:pdf_l]}}\\end{scriptsize}#{@brace_url.tex_close} \\\\ \\\\\n#{@md.title.full} \\textbf{html} versions may be found at: \\\\ -\\begin{scriptsize}\\href{#{@vz.url_root_http}/#{url}/#{@md.fn[:toc]}}{#{@vz.url_root_http}/#{url}/#{@md.fn[:toc]}}\\end{scriptsize} or \\\\ -\\begin{scriptsize}\\href{#{@vz.url_root_http}/#{url}/#{@md.fn[:doc]}}{#{@vz.url_root_http}/#{url}/#{@md.fn[:doc]}}\\end{scriptsize} +#{@brace_url.tex_open}\\begin{scriptsize}\\url{#{@vz.url_root_http}/#{url}/#{@md.fn[:toc]}}\\end{scriptsize}#{@brace_url.tex_close} or \\\\ +#{@brace_url.tex_open}\\begin{scriptsize}\\url{#{@vz.url_root_http}/#{url}/#{@md.fn[:doc]}}\\end{scriptsize}#{@brace_url.tex_close} \\\\ \\\\ \\href{#{@vz.url_root_http}/#{url}/#{@md.fn[:manifest]}}{SiSU Manifest} of document output and metadata may be found at: \\\\ -\\begin{scriptsize}\\href{#{@vz.url_root_http}/#{url}/#{@md.fn[:manifest]}}{#{@vz.url_root_http}/#{url}/#{@md.fnl[:pre]}sisu\\_manifest#{@md.fnl[:mid]}.html#{@md.fnl[:post]}}\\end{scriptsize} +#{@brace_url.tex_open}\\begin{scriptsize}\\url{#{@vz.url_root_http}/#{url}/#{@md.fn[:manifest]}}\\end{scriptsize}#{@brace_url.tex_close} \\\\ \\\\ - #{sitename} found at: \\begin{bfseries}#{site}\\end{bfseries}\\subsubsection*{Links that may be of interest at #{@vz.txt_home} and elsewhere:} + #{sitename} found at: \\begin{scriptsize}#{site}\\end{scriptsize}\\subsubsection*{Links that may be of interest at #{@vz.txt_home} and elsewhere:} \\addcontentsline{toc}{subsection}{Links that may be of interest} WOK end diff --git a/lib/sisu/v2/urls.rb b/lib/sisu/v2/urls.rb index 917b6fec..fd88f1ac 100644 --- a/lib/sisu/v2/urls.rb +++ b/lib/sisu/v2/urls.rb @@ -183,7 +183,7 @@ module SiSU_urls i="(output manifest) #{@env.url.output_tell}/#{@fnb}/sisu_manifest.html" @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'URLs').grey_title_hi \ - : SiSU_Screen::Ansi.new(@opt.cmd,'URL',i).green_title_hi + : SiSU_Screen::Ansi.new(@opt.cmd,'URL',i).green_hi_blue SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output}/#{@fnb}").flow if @opt.cmd =~/[MVv]/ end m=/.+\/(?:src\/)?(\S+)/im # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m |