From d43865fb6a093625a77e8605d6fb00158546e1e4 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 12 Aug 2008 23:37:42 -0400 Subject: html increased use of css; dal, middle layer, url representation, interim commit --- lib/sisu/v0/texpdf.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/sisu/v0/texpdf.rb') diff --git a/lib/sisu/v0/texpdf.rb b/lib/sisu/v0/texpdf.rb index 8d951dfb..e4bd9c00 100644 --- a/lib/sisu/v0/texpdf.rb +++ b/lib/sisu/v0/texpdf.rb @@ -435,7 +435,7 @@ module SiSU_TeX end elsif x =~/code/; @@flag_alt,@@flag_code=true,true elsif @@flag_alt - if para =~ /\}(?:https?|file|ftp)/m + if para =~ /#{Mx[:lnk_c]}(?:https?|file|ftp)/m para=SiSU_TeX_Pdf::Format_text_object.new(@md,para,'a4').http end @group_collect << para #<< "\n\n" @@ -485,7 +485,7 @@ module SiSU_TeX when /^#{Mx[:pa_o]}:i([1-9])#{Mx[:pa_c]}/; mono.indent($1) when /<:=/; mono.symbol_graphic #watch when /^\s*<:image\s+/; mono.image - when /\}image/; mono.png + when /#{Mx[:lnk_c]}image/; mono.png else para.strip! para=enclose(para) unless para =~/^$/ @@ -499,7 +499,7 @@ module SiSU_TeX end para end - if para =~ /\}(?:https?|file|ftp)/ + if para =~ /#{Mx[:lnk_c]}(?:https?|file|ftp)/ para=if para !~/\.(?:png|jpg|gif)/ SiSU_TeX_Pdf::Format_text_object.new(@md,para,'a4').http else -- cgit v1.2.3 From 08c69d074001507d64cd5960c8679ec91a5a8353 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 23 Aug 2008 12:01:59 -0400 Subject: pass Hash to Format classes; some match tuning in dal --- lib/sisu/v0/texpdf.rb | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) (limited to 'lib/sisu/v0/texpdf.rb') diff --git a/lib/sisu/v0/texpdf.rb b/lib/sisu/v0/texpdf.rb index e4bd9c00..c5ee2092 100644 --- a/lib/sisu/v0/texpdf.rb +++ b/lib/sisu/v0/texpdf.rb @@ -382,8 +382,10 @@ module SiSU_TeX @md.papersize_array.each do |ps| @@tableheader={ ps => { :p => 0, :l => 0 }} para,para_p=@para.dup,@para.dup #visit - format_l=SiSU_TeX_Pdf::Format_text_object.new(md,para,ps) - format_p=SiSU_TeX_Pdf::Format_text_object.new(md,para_p,ps) + txt_obj={:txt =>para,:paper_size =>ps} + format_l=SiSU_TeX_Pdf::Format_text_object.new(md,txt_obj) + txt_obj={:txt =>para_p,:paper_size =>ps} + format_p=SiSU_TeX_Pdf::Format_text_object.new(md,txt_obj) @block[ps]={ :l => format_l.longtable_landscape, :p => format_p.longtable_portrait @@ -411,7 +413,8 @@ module SiSU_TeX end def markup_common(para) tex_f=nil - mono=SiSU_TeX_Pdf::Format_text_object.new(@md,para) + txt_obj={:txt =>para} + mono=SiSU_TeX_Pdf::Format_text_object.new(@md,txt_obj) if para =~/#{Mx[:gr_o]}(?:code|alt|verse|group)#{Mx[:gr_c]}/ \ or @@flag_alt if para =~/#{Mx[:gr_o]}(?:code|alt|verse|group)#{Mx[:gr_c]}/ @@ -436,7 +439,8 @@ module SiSU_TeX elsif x =~/code/; @@flag_alt,@@flag_code=true,true elsif @@flag_alt if para =~ /#{Mx[:lnk_c]}(?:https?|file|ftp)/m - para=SiSU_TeX_Pdf::Format_text_object.new(@md,para,'a4').http + txt_obj={:txt =>para,:paper_size =>'a4'} + para=SiSU_TeX_Pdf::Format_text_object.new(@md,txt_obj).http end @group_collect << para #<< "\n\n" end @@ -501,11 +505,13 @@ module SiSU_TeX end if para =~ /#{Mx[:lnk_c]}(?:https?|file|ftp)/ para=if para !~/\.(?:png|jpg|gif)/ - SiSU_TeX_Pdf::Format_text_object.new(@md,para,'a4').http + txt_obj={:txt =>para,:paper_size =>'a4'} + SiSU_TeX_Pdf::Format_text_object.new(@md,txt_obj).http else @block={} @md.papersize_array.each do |ps| - image=SiSU_TeX_Pdf::Format_text_object.new(@md,para,ps).http + txt_obj={:txt =>para,:paper_size =>ps} + image=SiSU_TeX_Pdf::Format_text_object.new(@md,txt_obj).http @block[ps]={ :l => image, :p => image @@ -524,8 +530,10 @@ module SiSU_TeX title=@md.title.gsub(/#{Mx[:br_line]}|#{Mx[:br_nl]}|#{Mx[:br_paragraph]}|\\\\/,' - ') #no line splitting in heading neither html nor latex subtitle=@md.subtitle.gsub(/#{Mx[:br_line]}|#{Mx[:br_nl]}|#{Mx[:br_paragraph]}|\\\\/,' - ') if @md.subtitle #no line splitting in heading neither html nor latex @md.papersize_array.each do |ps| - orient_portrait=SiSU_TeX_Pdf::Format_head.new(@md,ps,'portrait',"#{home}: - #{title} #{subtitle}") - orient_landscape=SiSU_TeX_Pdf::Format_head.new(@md,ps,'landscape',"#{home}: - #{title} #{subtitle}") + txt_obj={:txt =>"#{home}: - #{title} #{subtitle}",:paper_size =>ps,:orientation =>'portrait'} + orient_portrait=SiSU_TeX_Pdf::Format_head.new(@md,txt_obj) + txt_obj={:txt =>"#{home}: - #{title} #{subtitle}",:paper_size =>ps,:orientation =>'landscape'} + orient_landscape=SiSU_TeX_Pdf::Format_head.new(@md,txt_obj) @@tex_head[ps][:p]=orient_portrait.document_head_with_orientation @@tex_head[ps][:l]=orient_landscape.document_head_with_orientation end @@ -544,8 +552,9 @@ WOK #end @copymark='' #check and remove as now is superflous x={} - x[:l]=SiSU_TeX_Pdf::Format_text_object.new(@md,@md.title,@md.subtitle).title_landscape - x[:p]=SiSU_TeX_Pdf::Format_text_object.new(@md,@md.title,@md.subtitle).title_portrait + txt_obj={:title =>@md.title,:subtitle =>@md.subtitle} + x[:l]=SiSU_TeX_Pdf::Format_text_object.new(@md,txt_obj).title_landscape + x[:p]=SiSU_TeX_Pdf::Format_text_object.new(@md,txt_obj).title_portrait @tex_file << x x=nil if @md.dc_creator @@ -680,7 +689,8 @@ WOK paranum=if ocn; para[m,2] else '' end - do_duo=SiSU_TeX_Pdf::Format_text_object.new(@md,parablock,paranum) + txt_obj={:txt =>parablock,:ocn =>paranum} + do_duo=SiSU_TeX_Pdf::Format_text_object.new(@md,txt_obj) para=do_duo.para_num if parablock elsif para =~/^#{Mx[:id_o]}~\d+;(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ #2005 this is added for tables, rationalise m=/#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/m -- cgit v1.2.3 From c6d41d9367afc974fe60ca27cb890568609b5f12 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 27 Aug 2008 00:43:43 -0400 Subject: texpdf: paper use dimensions url and urlbreaks removal of a maths package gives back typeface changes like bold better representation of tilde changelog update --- lib/sisu/v0/texpdf.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/sisu/v0/texpdf.rb') diff --git a/lib/sisu/v0/texpdf.rb b/lib/sisu/v0/texpdf.rb index c5ee2092..19e0a119 100644 --- a/lib/sisu/v0/texpdf.rb +++ b/lib/sisu/v0/texpdf.rb @@ -542,6 +542,7 @@ module SiSU_TeX \\tolerance=500 \\makeatother \\makeatother +\\sloppy \\begin{document} WOK sisu_rc_footnote=if @md.sc_info; @tex.doc_sc_info_footnote_full -- cgit v1.2.3 From a0012a41b4aa49cdf05d9f5f55a67673bf4c8bb2 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 28 Aug 2008 23:19:32 -0400 Subject: texpdf: removed space at beginning of paragraph; grouped text url fix --- lib/sisu/v0/texpdf.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sisu/v0/texpdf.rb') diff --git a/lib/sisu/v0/texpdf.rb b/lib/sisu/v0/texpdf.rb index 19e0a119..f86d8729 100644 --- a/lib/sisu/v0/texpdf.rb +++ b/lib/sisu/v0/texpdf.rb @@ -72,7 +72,7 @@ module SiSU_TeX @@tabular="{tabular}" @@column_instruct=@@squigle_close=@@tex_line_mode=@@tex_word_mode=@@line_mode='' @@tex_debug_counter=@@table_pagebreak_counter=@@tex_footnote_call_counter=@@tex_table_flag=@@tex_counter=@@tex_column=@@tex_columns=@@tex_columns=@@counting=0 - @@tex_pattern_margin_number=/\\\\begin\\\{tiny\\\}~\\\\end\\\{tiny\\\}\\\{\\\\marginpar.+?\s+/ + @@tex_pattern_margin_number=/\\\\begin\\\{tiny\\\}\\\\hspace\\\{0mm\\\}\\\\end\\\{tiny\\\}\\\{\\\\marginpar.+?\s+/ #@@tex_pattern_margin_number="\\\\marginpar.+?\s+" @@n=@@tableheader=@@rights=nil @@date ||=SiSU_Env::Info_date.new -- cgit v1.2.3 From 749e0d8443028eaff7af93d17c8dae8d44be42bc Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 29 Aug 2008 21:40:02 -0400 Subject: texpdf: paper use dimensions, tolerance, url matching; removal of dummy headings when not used; manifest presentation * texpdf: paper use dimensions, tolerance, url matching; * removal of dummy headings when not used (html scroll, latex/pdf, odf) * manifest presentation --- lib/sisu/v0/texpdf.rb | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'lib/sisu/v0/texpdf.rb') diff --git a/lib/sisu/v0/texpdf.rb b/lib/sisu/v0/texpdf.rb index f86d8729..3cf560c4 100644 --- a/lib/sisu/v0/texpdf.rb +++ b/lib/sisu/v0/texpdf.rb @@ -344,6 +344,7 @@ module SiSU_TeX # DEBUG 2003w16 this is a kludge, because i could not get parameters # from param, Sort out ... revert to more elegant solution # even more of a kludge as had to insert newlines where code is used not satisfactory, think about + para='' if para =~/#{Mx[:lv_o]}\d+:.*?#{Mx[:lv_c]}.+?#{Mx[:pa_non_object_dummy_heading]}/ para=if para =~/#{Mx[:br_nl]}|\n/; para.split(/#{Mx[:br_nl]}|\n/) else para end @@ -438,7 +439,7 @@ module SiSU_TeX end elsif x =~/code/; @@flag_alt,@@flag_code=true,true elsif @@flag_alt - if para =~ /#{Mx[:lnk_c]}(?:https?|file|ftp)/m + if para =~ /(?:https?|file|ftp)/m txt_obj={:txt =>para,:paper_size =>'a4'} para=SiSU_TeX_Pdf::Format_text_object.new(@md,txt_obj).http end @@ -503,7 +504,7 @@ module SiSU_TeX end para end - if para =~ /#{Mx[:lnk_c]}(?:https?|file|ftp)/ + if para =~ /(?:https?|file|ftp)/ para=if para !~/\.(?:png|jpg|gif)/ txt_obj={:txt =>para,:paper_size =>'a4'} SiSU_TeX_Pdf::Format_text_object.new(@md,txt_obj).http @@ -539,10 +540,12 @@ module SiSU_TeX end @tex_file <<< # note this bit of dereferencing magic + s_lnk_url=%<\\begin{scriptsize}\\url{#{url}}\\end{scriptsize}> # note this bit of dereferencing magic else url.gsub!(/\.\.\//,'') s_lnk_url="(#{@tex.site}) \\\\\n" + ' ' + "\\begin{scriptsize}" + - %<\\href\{#{@vz.url_root_http}/#{url}\}\{#{@vz.url_root_http}/#{url}\}> + # note this bit of dereferencing magic + %<\\url\{#{@vz.url_root_http}/#{url}\}> + # note this bit of dereferencing magic "\\end{scriptsize}" end @tex_file << " #{s_lnk} \\\\\n #{s_lnk_url} \n" unless @md.doc_skin =~/skin_mail/ -- cgit v1.2.3 From 291080c0495f59f031bf5c0de2482f1bc7df59f2 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 10 Sep 2008 21:24:31 -0400 Subject: primarily on book index where (markup) provided * book index, html, tex/pdf, xml * texpdf no ocn if ocn is 0 * odf, plaintext, if book index? remove ... do other outputs for which not relevant * concordance, better matches * constants, dal special character for hardspace changed as (ruby) regx bug in replacing it in xml, odd but move on Note: to fix html seg headers for endnotes and for index --- lib/sisu/v0/texpdf.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/sisu/v0/texpdf.rb') diff --git a/lib/sisu/v0/texpdf.rb b/lib/sisu/v0/texpdf.rb index 3cf560c4..885643cf 100644 --- a/lib/sisu/v0/texpdf.rb +++ b/lib/sisu/v0/texpdf.rb @@ -693,6 +693,7 @@ WOK paranum=if ocn; para[m,2] else '' end + paranum = '' if paranum.to_i == 0 txt_obj={:txt =>parablock,:ocn =>paranum} do_duo=SiSU_TeX_Pdf::Format_text_object.new(@md,txt_obj) para=do_duo.para_num if parablock -- cgit v1.2.3