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