Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jschlatow committed Feb 17, 2020
1 parent 8879d0a commit 9e68b16
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pandoc_fignos.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@

# Processing state variables
cursec = None # Current section
Ntargets = 0 # Number of targets in current section (or document)
Ntargets = 1 # Number of targets in current section (or document)
targets = {} # Global targets tracker

# Processing flags
Expand Down Expand Up @@ -172,7 +172,8 @@ def _process_figure(key, value, fmt):
# Update the current section number
if attrs['secno'] != cursec: # The section number changed
cursec = attrs['secno'] # Update the global section tracker
Ntargets = 1 # Resets the global target counter
if numbersections:
Ntargets = 1 # Resets the global target counter

# Pandoc's --number-sections supports section numbering latex/pdf, html,
# epub, and docx
Expand Down

0 comments on commit 9e68b16

Please sign in to comment.