From f153bba37dafeae0de7f5bca633e8e8c1085434d Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 4 Sep 2007 19:00:10 +0100 Subject: grouped text, pdf indents and size --- CHANGELOG | 7 ++++--- lib/sisu/v0/plaintext.rb | 3 +++ lib/sisu/v0/texpdf.rb | 11 ++++++++++- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 686e9f24..57a09be9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -12,9 +12,10 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.58.1.orig.tar.gz * code-block exceptions * dal, code block, url matching, should no longer be tagged with decoration escape mark - * texpdf, code-blocks latex markup change to scriptsize from tiny, consider - going back to footnotesize - * angle bracket exceptions [still issues] + * texpdf, code-blocks latex markup change to scriptsize from tiny + (consider going back to footnotesize), other grouped-text including poem + now set to footnotesize + * angle bracket exceptions %% sisu_0.58.0.orig.tar.gz (2007-09-03:36/1) http://www.jus.uio.no/sisu/pkg/src/sisu_0.58.0.orig.tar.gz diff --git a/lib/sisu/v0/plaintext.rb b/lib/sisu/v0/plaintext.rb index d88d6194..ddcf3a42 100644 --- a/lib/sisu/v0/plaintext.rb +++ b/lib/sisu/v0/plaintext.rb @@ -322,6 +322,9 @@ WOK para.gsub!(/(.+?)<\/b>/,'*\1*') para.gsub!(/(.+?)<\/u>/,'_\1_') if para =~/<:(?:group|verse|alt|code)(?:-end)?>(?:\s+<~(\d+);(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>)?/ + if para =~/<:code>/ + para.gsub!(/_/m,'>') #code-block: angle brackets special characters + end para.gsub!(//,"\n") # watch para.gsub!(/<:(?:group|verse|alt|code)(?:-end)?>(?:\s+<~(\d+);(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>)?/,'') end diff --git a/lib/sisu/v0/texpdf.rb b/lib/sisu/v0/texpdf.rb index 4faab502..cd4c2ec1 100644 --- a/lib/sisu/v0/texpdf.rb +++ b/lib/sisu/v0/texpdf.rb @@ -459,7 +459,16 @@ WOK else '' end para.gsub!(regx,'') - @group_collect.each{ |x| x.gsub!(/(<:\S+>||)/,' ') } + #@group_collect.each{ |x| x.gsub!(/(<:\S+>||)/,' ') } + group_collect=[] + group_collect << '\begin{footnotesize} ' unless @@flag_code + @group_collect.each do |x| + x.gsub!(/(<:\S+>||)/,' ') + x=x.split(/ \\\\ /) + group_collect << x + end + group_collect << ' \end{footnotesize} ' unless @@flag_code + @group_collect=group_collect.flatten @lineone.gsub!(/(<:\S+>||)/,' ') #@group_collect.each{ |x| x.gsub!(/(.#{@@tilde}\S*\s*|<:\S+>||)/,' ') } #@lineone.gsub!(/(.#{@@tilde}\S*\s*|<:\S+>||)/,' ') -- cgit v1.2.3 From ea4deaaec708a22ed062fb072012b0c8d03dfcc6 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 4 Sep 2007 20:50:11 +0100 Subject: comment --- CHANGELOG | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 57a09be9..587c8c69 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -12,9 +12,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.58.1.orig.tar.gz * code-block exceptions * dal, code block, url matching, should no longer be tagged with decoration escape mark - * texpdf, code-blocks latex markup change to scriptsize from tiny - (consider going back to footnotesize), other grouped-text including poem - now set to footnotesize + * texpdf, code-blocks latex markup change to scriptsize from tiny (consider + going back to footnotesize); other grouped-text including poem, indents + fixed and set to footnotesize * angle bracket exceptions %% sisu_0.58.0.orig.tar.gz (2007-09-03:36/1) -- cgit v1.2.3