From a64f0c80e52bd9434ce708d68aa0db95556bb848 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 11 Nov 2010 19:49:05 -0500 Subject: texpdf, use of monospace in headings causes table of contents breakage, fix (requested fix, Ben Armstrong) --- CHANGELOG_v2 | 11 +++++++++++ data/doc/sisu/v2/CHANGELOG | 11 +++++++++++ lib/sisu/v2/texpdf_format.rb | 12 ++++++++---- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/CHANGELOG_v2 b/CHANGELOG_v2 index 30c1b5b7..f18f250c 100644 --- a/CHANGELOG_v2 +++ b/CHANGELOG_v2 @@ -12,6 +12,17 @@ Reverse Chronological: %% Development branch UNSTABLE +%% 2.7.9.orig.tar.gz (2010-11-11:45/4) +http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.9.orig.tar.gz + sisu_2.7.9.orig.tar.gz + sisu_2.7.9-1.dsc + sisu_2.7.9-1.diff.gz + + [debian freeze, fix] + + * texpdf, use of monospace in headings causes table of contents breakage, fix + (requested fix, Ben Armstrong) + %% 2.7.8.orig.tar.gz (2010-10-25:43/1) http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.8.orig.tar.gz af9dac02064ea03c61d6eecd0882a9f1be6f83d37fdddcf8e45832b9def52140 2750397 sisu_2.7.8.orig.tar.gz diff --git a/data/doc/sisu/v2/CHANGELOG b/data/doc/sisu/v2/CHANGELOG index 1f3b2e98..07deff41 100644 --- a/data/doc/sisu/v2/CHANGELOG +++ b/data/doc/sisu/v2/CHANGELOG @@ -12,6 +12,17 @@ Reverse Chronological: %% Development branch UNSTABLE +%% 2.7.9.orig.tar.gz (2010-11-11:45/4) +http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.9.orig.tar.gz + sisu_2.7.9.orig.tar.gz + sisu_2.7.9-1.dsc + sisu_2.7.9-1.diff.gz + + [debian freeze, fix] + + * texpdf, use of monospace in headings causes table of contents breakage, fix + (requested fix, Ben Armstrong) + %% 2.7.8.orig.tar.gz (2010-10-25:43/1) http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.8.orig.tar.gz af9dac02064ea03c61d6eecd0882a9f1be6f83d37fdddcf8e45832b9def52140 2750397 sisu_2.7.8.orig.tar.gz diff --git a/lib/sisu/v2/texpdf_format.rb b/lib/sisu/v2/texpdf_format.rb index 465d4d90..aae545cb 100644 --- a/lib/sisu/v2/texpdf_format.rb +++ b/lib/sisu/v2/texpdf_format.rb @@ -210,8 +210,9 @@ module SiSU_TeX_Pdf dob=@dob title=@md.title.full dob.tmp.strip! if dob.tmp - dob.tmp.gsub!(/(?:\\begin\{bfseries\}|\\begin\{itshape\})(.+?)(?:\\end\{bfseries\}|\\end\{itshape\})/m,'\1') + dob.tmp.gsub!(/\\begin\{(bfseries|itshape)\}(.+?)\\end\{\1\}/m,'\2') cont_ln=dob.tmp.dup + cont_ln.gsub!(/\\begin\{(monosp)\}(.+?)\\end\{\1\}/m,'\2') cont_ln.gsub!(@@tex_pattern_margin_number,'') clearp=(dob.lv =~/B/ && dob.obj =='Metadata') ? "\\clearpage\n" : '' if dob.tmp =~/\\[Ff]ootnote/ #and dob =~/^[1-6]#{Tex[:tilde]}/ # removing footnotes from headings! @@ -227,8 +228,9 @@ module SiSU_TeX_Pdf def level4 dob=@dob dob.tmp.strip! if dob.tmp - dob.tmp.gsub!(/(?:\\begin\{bfseries\}|\\begin\{itshape\})(.+?)(?:\\end\{bfseries\}|\\end\{itshape\})/m,'\1') + dob.tmp.gsub!(/\\begin\{(bfseries|itshape)\}(.+?)\\end\{\1\}/m,'\2') cont_ln=dob.tmp.dup + cont_ln.gsub!(/\\begin\{(monosp)\}(.+?)\\end\{\1\}/m,'\2') cont_ln.gsub!(@@tex_pattern_margin_number,'') cont_ln.gsub!(/#{Tex[:backslash]*2}/,"#{Tex[:backslash]*4}") # added w42 cont_ln.gsub!(/\\footnote\[\d+\]\{%.+?\\end\{scriptsize\}\s*\}/m,'') #arbitrary bugfix, revisit should not be necessary, eg. wta.1994 2004w22 @@ -250,8 +252,9 @@ module SiSU_TeX_Pdf dob=@dob # there is a problem here with creation of headers does not do what you would want it to header starts with a * and is not in bold work on \\@txt*, same for next section 2002w46 dob.tmp.strip! if dob.tmp - dob.tmp.gsub!(/(?:\\begin\{bfseries\}|\\begin\{itshape\})(.+?)(?:\\end\{bfseries\}|\\end\{itshape\})/m,'\1') + dob.tmp.gsub!(/\\begin\{(bfseries|itshape)\}(.+?)\\end\{\1\}/m,'\2') cont_ln=dob.tmp.dup + cont_ln.gsub!(/\\begin\{(monosp)\}(.+?)\\end\{\1\}/m,'\2') cont_ln.gsub!(@@tex_pattern_margin_number,'') cont_ln.gsub!(/\\footnote\[\d+\]\{%.+?\\end\{scriptsize\}\s*\}/m,'') #arbitrary bugfix, revisit should not be necessary, eg. wta.1994 2004w22 cont_ln.gsub!(/\\Footnote[A]\{[*+]+\d*\}\{%.+?\\end\{scriptsize\}\s*\}/m,'') #arbitrary bugfix, revisit should not be necessary, eg. wta.1994 2004w22 @@ -270,8 +273,9 @@ module SiSU_TeX_Pdf dob=@dob # there is a problem here with creation of headers does not do what you would want it to header starts with a * and is not in bold work on \\sub@txt*, same for previous section 2002w46 dob.tmp.strip! if dob.tmp - dob.tmp.gsub!(/(?:\\begin\{bfseries\}|\\begin\{itshape\})(.+?)(?:\\end\{bfseries\}|\\end\{itshape\})/m,'\1') + dob.tmp.gsub!(/\\begin\{(bfseries|itshape)\}(.+?)\\end\{\1\}/m,'\2') cont_ln=dob.tmp.dup + cont_ln.gsub!(/\\begin\{(monosp)\}(.+?)\\end\{\1\}/m,'\2') cont_ln.gsub!(@@tex_pattern_margin_number,'') cont_ln.gsub!(/\\footnote\[\d+\]\{%.+?\\end\{scriptsize\}\s*\}/m,'') #arbitrary bugfix, revisit should not be necessary, eg. wta.1994 2004w22 cont_ln.gsub!(/\\Footnote[A]\{[*+]+\d*\}\{%.+?\\end\{scriptsize\}\s*\}/m,'') #arbitrary bugfix, revisit should not be necessary, eg. wta.1994 2004w22 -- cgit v1.2.3