From 211ea9a9bb17304e935e3d7a4180769868e375e8 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 5 May 2010 12:18:28 -0400 Subject: ansi, urls screen info, minor --- lib/sisu/v2/urls.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.3 From f9dc0ff67b0404f4727e005c5897a4effd08933a Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 5 May 2010 12:20:42 -0400 Subject: sysenv, sisurc.yml, default shortform command flags * mostly taking out verbose as default, add -v when needed, e.g.: sisu -3v filename.sst --- lib/sisu/v2/sysenv.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3 From 221cc9595963f8fe1ec92fdc6d7d3e0d429bb7c6 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 5 May 2010 12:22:46 -0400 Subject: texpdf, special word and number optional break points --- lib/sisu/v2/param.rb | 2 +- lib/sisu/v2/shared_metadata.rb | 16 ++++++++++++++-- lib/sisu/v2/texpdf_format.rb | 25 ++++++++++++++++++------- 3 files changed, 33 insertions(+), 10 deletions(-) (limited to 'lib') 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..dac6f914 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\}\\-#{dgst}" 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\}\\-#{dgst}" meta << meta_para(tag,inf,false) end meta << %{#{@br}\\begin\{bfseries\}Generated \\end\{bfseries\}} diff --git a/lib/sisu/v2/texpdf_format.rb b/lib/sisu/v2/texpdf_format.rb index 2d81f40c..2beb49b0 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!(/([_,.;:|=])/,'\1\-') + @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 -- cgit v1.2.3 From 70fdec5b328b1e1863b2f80eeeed954d58a61caa Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 5 May 2010 13:17:56 -0400 Subject: texpdf, url braces, (add, fix) --- lib/sisu/v2/texpdf.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') 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" + ' ' + -- cgit v1.2.3 From bc1140347a6465ddcf2bdd9878ab28310589f9be Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 5 May 2010 13:19:08 -0400 Subject: shared_metadata, texpdf, reduce text display size of digests --- lib/sisu/v2/shared_metadata.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v2/shared_metadata.rb b/lib/sisu/v2/shared_metadata.rb index dac6f914..cd46bd1d 100644 --- a/lib/sisu/v2/shared_metadata.rb +++ b/lib/sisu/v2/shared_metadata.rb @@ -744,7 +744,7 @@ WOK hash_of=spec_char(@md.dgst[0]) hash_of=word_break_points(hash_of) dgst=number_break_points(@md.dgst[1]) - tag,inf='Source Digest',"\\begin\{footnotesize\}#{hash_of}\\end\{footnotesize\}\\-#{dgst}" + 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 \ @@ -752,7 +752,7 @@ WOK hash_of=spec_char(@md.dgst_skin[0]) 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\}\\-#{dgst}" + 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\}} -- cgit v1.2.3 From 4c3fbdc614b5405cec47cd529405e9decba32adb Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 5 May 2010 13:20:27 -0400 Subject: defaults, reduce image sizes to fit landscape pdfs, (however, also used in equivalent portrait) --- lib/sisu/v2/defaults.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3 From 2e5503ebe5297f5a0add32ee17b03c7e365d0b0c Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 5 May 2010 18:29:42 -0400 Subject: texpdf, special word optional break point detail --- lib/sisu/v2/texpdf_format.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/sisu/v2/texpdf_format.rb b/lib/sisu/v2/texpdf_format.rb index 2beb49b0..1d2e891f 100644 --- a/lib/sisu/v2/texpdf_format.rb +++ b/lib/sisu/v2/texpdf_format.rb @@ -1101,7 +1101,7 @@ WOK def special_word_break_points str=@txt str.gsub!(/([_,.;:\/|=])/,'\1\-') - #str.gsub!(/([_,.;:|=])/,'\1\-') + str.gsub!(/(--)(\S{4,)/,'\1\-\2') @txt=str end def special_number_break_points -- cgit v1.2.3