Git Product home page Git Product logo

Comments (3)

nathanlesage avatar nathanlesage commented on May 10, 2024 2

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:

screenshot 2018-10-21 at 12 07 56

References:

screenshot 2018-10-21 at 12 08 03

How footnotes look inside the files prior to export:

screenshot 2018-10-21 at 12 08 11

What the exported result looks like:

screenshot 2018-10-21 at 12 08 25

from zettlr.

nathanlesage avatar nathanlesage commented on May 10, 2024

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.

Jaifroid avatar Jaifroid commented on May 10, 2024

@nathanlesage Many thanks!!

from zettlr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.