diff options
Diffstat (limited to 'pandoc-memoir')
-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; } |