aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/texpdf_format.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v0/texpdf_format.rb')
-rw-r--r--lib/sisu/v0/texpdf_format.rb22
1 files changed, 9 insertions, 13 deletions
diff --git a/lib/sisu/v0/texpdf_format.rb b/lib/sisu/v0/texpdf_format.rb
index ea418dd2..b981ca15 100644
--- a/lib/sisu/v0/texpdf_format.rb
+++ b/lib/sisu/v0/texpdf_format.rb
@@ -250,6 +250,7 @@ WOK
end
class Format_text_object
require 'iconv'
+ require "#{SiSU_lib}/defaults"
attr_accessor :string,:string1,:string,:orientation,:url,:dir,:tex
@@sys=SiSU_Env::System_call.new
@@tex_backslash="\\\\"
@@ -268,6 +269,7 @@ WOK
@start_table=''
@dp=@@dp ||=SiSU_Env::Info_env.new.digest.pattern
@tx=SiSU_Env::Get_init.instance.tex
+ @url_brace=SiSU_Viz::Skin.new.url_decoration
end
def longtable_landscape
@end_table='\end{longtable}'
@@ -493,7 +495,7 @@ WOK
@string.gsub!(/[^\}>]((?:https?|ftp):\/\/\S+?)(<\/\S>)/,' \begin{scriptsize}\href{\1}{ \1 } \end{scriptsize}\2')
else # regular urls !! http:// href
if @string=~/(?:https?|ftp):\/\/\S+?[,.]? /
- @string.gsub!(/(?:^|[^\}>])((?:https?|ftp):\/\/\S+?)([,.])? /,' \begin{scriptsize}\href{\1}{ \1}\end{scriptsize}\2 ')
+ @string.gsub!(/(?:^|[^\}>])((?:https?|ftp):\/\/\S+?)([,.])? /," #{@url_brace.tex_open}\\begin{scriptsize}\\href{\\1}{ \\1}\\end{scriptsize}#{@url_brace.tex_close}\\2 ") #tamper
else @string.gsub!(/(?:^|[^\}>])((?:https?|ftp):\/\/\S+)/,' \begin{scriptsize}\href{ \1 }{\1} \end{scriptsize}') #should not be necessary, not checked
end
end
@@ -526,7 +528,7 @@ WOK
@string.gsub!(/\s+'/,' `') # open '
@string.gsub!(/^([1-6-]#{@@tilde}\S*|<.+?>)?\s*'/,'\1`') # open '
end
- @string.gsub!(/^(<:i[12]>)?\s*\\_\*\s*/,'\\1 \begin{math} \bullet \end{math}~~') #bullets - added 2004w17 watch \\_
+ @string.gsub!(/^(<:i[1-9]>)?\s*\\_\*\s*/,'\1 \begin{math} \bullet \end{math}~~') #bullets - added 2004w17 watch \\_
@string.gsub!(/(<font.*?>|<\/font>)/,'')
@string.gsub!(/\s*<sup>(\S+?)<\/sup>/,'^\1')
@string.gsub!(/(<sup>|<\/sup>)/,'')
@@ -692,17 +694,11 @@ WOK
@string.gsub!(/#{@md.lv6}\s*(.marginpar)/m,'\1')
#end BUGWATCH
end
- def indent1
- @string.gsub!(/<:i1>(.*)/m,
- '\begin{ParagraphIndent}{0.01\columnwidth} \1
-\end{ParagraphIndent}
-')
- end
- def indent2
- @string.gsub!(/<:i2>(.*)/m,
- '\begin{ParagraphIndent}{0.02\columnwidth} \1
-\end{ParagraphIndent}
-')
+ def indent(lev)
+ @string.gsub!(/<:i#{lev}>(.*)/m,
+ "\\begin{ParagraphIndent}{0.0#{lev}\\columnwidth} \\1
+\\end{ParagraphIndent}
+")
end
def symbol_graphic
dir=SiSU_Env::Info_env.new(@md.fns)