From 4c11eebf5ea1ce4abaeb8dc555ec1bf2cb27947e Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 14 Jun 2007 10:16:51 +0100 Subject: sisu-0.54.0 (minor additions to syntax, indent range extended) * indent levels (1-9) added [previously two levels] done for plaintext, html, xml, odf, latex/pdf [minor syntax addition (_3 - _9), version number change] * bullet indent levels (1-9) added [previously two levels] done for plaintext, html, odf, latex/pdf [minor syntax addition (_3* - _9*), version number change] * url decoration, open close, default angle brackets * fixes, some line-breaking for plaintext (and text groups for) odf and xml * css, modifications for extended indents in html and xml [sisu -CC (for update)] * vim syntax highlighter updated to take account of extended indent range * rant installer minor changes for future ruby * conversion script in data/sisu/conf/convert/sisu_convert --- lib/sisu/v0/texpdf_format.rb | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'lib/sisu/v0/texpdf_format.rb') 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>)/,'') @string.gsub!(/\s*(\S+?)<\/sup>/,'^\1') @string.gsub!(/(|<\/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) -- cgit v1.2.3