aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/texpdf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v0/texpdf.rb')
-rw-r--r--lib/sisu/v0/texpdf.rb15
1 files changed, 9 insertions, 6 deletions
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 <<<<WOK
#{@tex.header}#{@tex.footer}
-\\tolerance=500
+\\tolerance=300
+\\clubpenalty=300
+\\widowpenalty=300
\\makeatother
\\makeatother
-\\sloppy
+% \\sloppy
\\begin{document}
WOK
sisu_rc_footnote=if @md.sc_info; @tex.doc_sc_info_footnote_full
@@ -650,12 +653,12 @@ WOK
s_lnk.gsub!(/\s*(#{Mx[:br_line]}|#{Mx[:br_nl]}|#{Mx[:br_paragraph]})\s*/,' \\\\\\\\ ')
s_lnk.gsub!(/(?:\\)*([$&~%_#}{^])/,"\\\\\\1") #latex special chars
if url !~/^\.(\.)?\//
- s_lnk_url=%<\\begin{scriptsize}\\href{#{url}}{#{url}}\\end{scriptsize}> # 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/