diff options
author | Jonas Smedegaard <dr@jones.dk> | 2014-12-26 07:26:01 +0100 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2014-12-26 07:26:01 +0100 |
commit | fd328914b7239df85d23aba415932a25e28bc024 (patch) | |
tree | 039e73d75de2aa31f0f083ba1b6d7429d3980ad9 | |
parent | 1ef17724343133873010e34cd395f980d324bf8f (diff) |
Strip __TOC__ hint.
-rwxr-xr-x | pandoc-memoir | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pandoc-memoir b/pandoc-memoir index cce7c9d..174337c 100755 --- a/pandoc-memoir +++ b/pandoc-memoir @@ -47,9 +47,12 @@ sub backmatter { sub toc { my $self = shift; - return unless ( $self->name eq 'Header' and $self->level == 1 - and stringify($self) =~ /^Table/ ); return RawBlock( 'latex', '{\\hypersetup{linkcolor=black}\\setcounter{tocdepth}{3}\\clearpage\\tableofcontents}' - ); + ) + if ( $self->name eq 'Header' and $self->level == 1 + and stringify($self) =~ /^Table/ ); + return [] + if ( $self->name eq 'Para' and stringify($self) =~ /__TOC__/ ); + return; } |