From 41d62d53264b7af387361e27bc5d1ff874e9d3fa Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 12 May 2014 22:52:04 -0400 Subject: v6: texpdf, '&' in heading breaks toc (now removed from toc (not heading)), bug * revisit, bug --- data/doc/sisu/CHANGELOG_v6 | 3 +++ lib/sisu/v6/texpdf_format.rb | 3 +++ 2 files changed, 6 insertions(+) diff --git a/data/doc/sisu/CHANGELOG_v6 b/data/doc/sisu/CHANGELOG_v6 index f97b9a30..b6522a34 100644 --- a/data/doc/sisu/CHANGELOG_v6 +++ b/data/doc/sisu/CHANGELOG_v6 @@ -75,6 +75,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_6.0.5.orig.tar.xz instead of typewriter, latex default (Closes: #744353) +* texpdf, & in heading breaks toc, now & is removed from toc not heading, + broken + * added sisu.org emacs:evil:org mode notes related to sisu development %% 6.0.4.orig.tar.xz (2014-02-14:06/5) diff --git a/lib/sisu/v6/texpdf_format.rb b/lib/sisu/v6/texpdf_format.rb index a16b39b9..eab84823 100644 --- a/lib/sisu/v6/texpdf_format.rb +++ b/lib/sisu/v6/texpdf_format.rb @@ -235,6 +235,7 @@ module SiSU_TeX_Pdf cont_ln=cont_ln.gsub(/\\begin\{(monosp)\}(.+?)\\end\{\1\}/m,'\2'). gsub(@@tex_pattern_margin_number,'') cont_ln=remove_footnotes(cont_ln) + cont_ln=cont_ln.gsub(/\{[\\]+(&)\}/,'\\1') titleset='' dob.tmp=dob.tmp.gsub(/^(.*)\n?$/m, "#{titleset}\\part*{\\1} @@ -249,6 +250,7 @@ module SiSU_TeX_Pdf cont_ln=cont_ln.gsub(/\\begin\{(monosp)\}(.+?)\\end\{\1\}/m,'\2'). gsub(@@tex_pattern_margin_number,'') cont_ln=remove_footnotes(cont_ln) + cont_ln=cont_ln.gsub(/\{[\\]+(&)\}/,'\\1') dob.tmp=dob.tmp.gsub(/^(.*)\n?$/m, "\\clearpage \\part*{\\1} @@ -289,6 +291,7 @@ module SiSU_TeX_Pdf dob.tmp=dob.tmp.gsub(/.+/m,'') end cont_ln=remove_footnotes(cont_ln) + cont_ln=cont_ln.gsub(/\{[\\]+(&)\}/,'\\1') dob.tmp=dob.tmp.gsub(/^(.*)?\n?$/m, "\\#{sect}*{\\1} #{tocadd}{#{pre}#{cont_ln}#{post}}#{headadd}") -- cgit v1.2.3