aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/texpdf_format.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-10-01 09:39:09 -0400
committerRalph Amissah <ralph@amissah.com>2010-10-01 09:39:09 -0400
commit76ba23f868c87b32f632d3d3380698ff301dcbe5 (patch)
tree5a01eadf98441b8075591241b30bab46e85d1e4d /lib/sisu/v2/texpdf_format.rb
parentdebian/changelog 2.7.0-1 (diff)
parentversion & changelog 2.7.1 (squeeze freeze, bugfix) (diff)
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib/sisu/v2/texpdf_format.rb')
-rw-r--r--lib/sisu/v2/texpdf_format.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/sisu/v2/texpdf_format.rb b/lib/sisu/v2/texpdf_format.rb
index 41802557..ea34a390 100644
--- a/lib/sisu/v2/texpdf_format.rb
+++ b/lib/sisu/v2/texpdf_format.rb
@@ -751,7 +751,7 @@ WOK
when /a5/i
d[:papertype],d[:fontsize]='a5paper','11pt'
d[:oddsidemargin],d[:evensidemargin],d[:topmargin]='-4mm','-4mm','-36pt'
- d[:headheight],d[:headsep],d[:columnsep]='8pt','12pt',''
+ d[:headheight],d[:headsep],d[:columnsep]='11pt','12pt',''
d[:marginparsep],d[:marginparwidth]='4mm','6mm'
d[:textheight],d[:textwidth]=@tx.a5.portrait.h,@tx.a5.portrait.w
else #default currently A4
@@ -963,6 +963,16 @@ WOK
para_array=[]
str=if word
word.each do |w| # _ - / # | : ! ^ ~
+ if w !~/http:/ \
+ and w=~/\/\S+?\// \
+ and w.length > 6
+ w.gsub!(/([_.\/])/,'\1\-')
+ #elsif w !~/http:/ \
+ #and w=~/([_,.;:\/|=])/ \
+ #and w.length > 10
+ # w.gsub!(/([_,.;:\/|=])/,'\1\-')
+ # w.gsub!(/(--)(\S{4,})/,'\1\-\2')
+ end
w.gsub!(/#{Mx[:gl_o]}#lt#{Mx[:gl_c]}/,'<'); w.gsub!(/#{Mx[:gl_o]}#gt#{Mx[:gl_c]}/,'>')
w.gsub!(/[\\]?~/,'<=tilde>')
w.gsub!(/[#{Mx[:br_line]}#{Mx[:br_paragraph]}]/,' \newline ') #watch