Create table of contents if toc metadata key is set
This commit is contained in:
parent
9d5cb7f790
commit
38cad81050
@ -90,6 +90,10 @@ class PandocReader(BaseReader):
|
|||||||
'--metadata=reference-section-title="{}"'.format(
|
'--metadata=reference-section-title="{}"'.format(
|
||||||
bib_header)]
|
bib_header)]
|
||||||
|
|
||||||
|
if "toc" in metadata.keys():
|
||||||
|
if metadata['toc'] == True:
|
||||||
|
pandoc_cmd.extend(['--toc'])
|
||||||
|
|
||||||
proc = subprocess.Popen(
|
proc = subprocess.Popen(
|
||||||
pandoc_cmd,
|
pandoc_cmd,
|
||||||
stdin=subprocess.PIPE,
|
stdin=subprocess.PIPE,
|
||||||
|
Loading…
Reference in New Issue
Block a user