Comments (3)
Alright, that was easy. Attached fix finally closes this problem.
Instead of manually reordering and renaming the footnotes, now I simply prepend them with the file's hash (which is unique), rendering the footnotes unique and preventing errors:
cnt = cnt.replace(/\[\^([\w]+?)\]/gm, (match, p1, offset, string) => ยด[^${String(this.hash)}${p1}]ยด)
How Footnotes look in the temporary files:
References:
How footnotes look inside the files prior to export:
What the exported result looks like:
from zettlr.
I realize this is more of a pandoc issue
Nope, unfortunately this is completely at the fault of Zettlr =D
This is what I mentioned in issue #42. To reiterate:
The only thing that needed to change in the code (and this is something I have to do pretty quick) is to correctly number the footnotes on export (otherwise you'd have a footnote number 1 for each file, which would confuse Pandoc). This is not done currently, because I've had massive problems reordering the footnotes in the past.
In short: I need to do something about footnote renumbering on export, as in:
Internally, Zettlr "glues" the markdown files together and then exports them using pandoc. That means: While each individual file is loaded, I need to replace all footnotes based upon a general counter. Which is what I'll be doing in the next days for the next release, depending upon my speed!
from zettlr.
@nathanlesage Many thanks!!
from zettlr.
Related Issues (20)
- Command palette-style tab switching
- Overview of invalid links HOT 1
- button to create a new file when a link does not exist yet
- Data disappear from table when saving HOT 3
- Ordered sublists/nested lists switching to a. b. c. and i. ii. iii. HOT 7
- Nested ordered lists continue from the previous numbering
- Current Import Workflow is Intransparent
- Canceled HOT 1
- [Enhancement] (Option to) hide markup annotations for headers / titles HOT 2
- Light mode has too little contrast between text and background in the panes. HOT 3
- Changing the file filtering logic for match-query to AND instead of OR
- [develop] Replace the current YAML frontmatter parser with `parseMixed`
- Youtube embed HOT 6
- Impossible to export files on Flatpak builds HOT 1
- Strikethrough formatting does not work in a tables
- Name auto-complete (add display name option) does not work when linking with ID HOT 3
- Links to internal pages not recognized as internal when in markdown style
- Some files do not show * when edited and do not save or autosave, no warning when renaming that buffer data will be lost HOT 21
- Display modified/not-saved status (asterisk in usual editor) in Distraction-Free Mode
- Pandoc export fail when use wikilinks_title_after_pipe or wikilinks_title_before_pipe HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zettlr.