typora / typora-issues

Bugs, suggestions or free discussions about the minimal markdown editor — Typora
https://typora.io
1.53k stars 58 forks source link

Auto numbered footnotes #2478

Open AlienKevin opened 5 years ago

AlienKevin commented 5 years ago

Problem

Footnotes need to be manually named and are not versatile for position changes and new insertions.

Solution

I think that most people use footnotes with plain numbers without naming them explicitly with meanings so I suggest that Typora develop a new syntax for auto indexed footnotes that looks like this [^#].

Implementation

Typora can automatically assign footnote indexes based on appearance orders while retaining the ability to add custom footnote names.

Floresiensis commented 5 years ago

This is a problem for me, too. To illustrate: I just completed a first paragraph in an academic paper where the manually named endnotes now come in the order 2, 4, 1, 8, 7, 3. Cleaning the numbering up and re-ordering the endnote list manually is a major undertaking that gets more difficult and time-consuming as a paper grows. It is necessary, however, if I want to see, while writing, the structure that I get upon printing/exporting.

Short of a new syntax for a new class of (auto-indexed) endnotes, I would welcome an optional auto-indexing function. For example, when I think I'm done tinkering with my paragraph, I could hit the auto-index key. It would apply the same algorithm that is used when I print the manuscript, renumbering the endnotes in the order of their appearance in the text and re-ordering the entries in the endnote list accordingly.

(I admit this presupposes that endnotes are assembled into one list, which I already do manually, at the end of the manuscript. But then, I presume this is the format that most people who would use this option want and need.)

DutchPete commented 4 years ago

I fully support this enhancement request. Unfortunately @abnerlee has not reacted to this issue, even though it has been open since May - it would be nice to get an indication of his thinking on this.

I am using Typora on Linux.

jcarpenter commented 4 years ago

Ulysses provides a useful prior art example for this feature request.

It allows users to create footnotes on the fly, without index numbers or id strings. For each footnote, it automatically generates an anchor link at the end of the document, and auto-sorts whenever a footnote is added or deleted from the doc.

You can see this in action if you have Ulysses edit a Markdown file in Markdown format, from an External Folder (details here). If you open the same Markdown file in an text editor as you edit it in Ulysses, you can see Ulysses auto-generating and sorting the footnotes.

tholonia commented 3 years ago

I used this piece of python code to fix this. It renumbers all references and notes in order. It's not the most elegant, but it worked for me and saved me days of manual tweaking. It was specifically written for Typora.

https://mega.nz/file/N6BQ3QDa#3WwePlD7JcgLvA3wPG0ZVeoDtZiaUUpfDzNyOzRb_R4

AhmedThahir66 commented 3 years ago

I used this piece of python code to fix this. It renumbers all references and notes in order. It's not the most elegant, but it worked for me and saved me days of manual tweaking. It was specifically written for Typora.

https://mega.nz/file/N6BQ3QDa#3WwePlD7JcgLvA3wPG0ZVeoDtZiaUUpfDzNyOzRb_R4

Hi, how do I use this?

leowill01 commented 2 years ago

This would be a great feature to have for when references are needed in documents that don't quite require a pandoc level of citation management.

sirrahn commented 1 year ago

This is the biggest difficulty I experience writing with Typora. I'm writing material with footnotes and the current design is very manual and time consuming. As I edit I may add and remove footnotes all the time, which is a normal part of writing. But it means that the footnotes are no longer properly linked to the correct link. This is a bit catastrophic for article writing. More general work could be done to tidy up referencing options with foot notes, end notes, references etc but auto-numbers would be an amazing first step.

keelancook commented 1 year ago

Just started using Typora and really like it. I'm an academic and want to use this for writing articles for publication, but the footnote management for that use case is critical. An option for it to auto number and renumber notes when new ones are added seems necessary for academic writing.

Inline notes, which I believe were mentioned elsewhere, are likely the easiest solution from an end user perspective. Not having to fuss with the numbering scheme and merely type the content of the note inline and move on would be a huge help. And, when it's exported to LaTeX for styling, it should render properly as footnotes that way as well.

BertV1 commented 11 months ago

I used this piece of python code to fix this. It renumbers all references and notes in order. It's not the most elegant, but it worked for me and saved me days of manual tweaking. It was specifically written for Typora.

https://mega.nz/file/N6BQ3QDa#3WwePlD7JcgLvA3wPG0ZVeoDtZiaUUpfDzNyOzRb_R4

File isn't available anymore. Would love to see a solution to this.

garyrob commented 4 months ago

I, too, would love to see a solution to this.

Rhinoto commented 4 months ago

Workaround (Solved!!!)

Hey everyone! (@garyrob , @keelancook , @AlienKevin , @Floresiensis ...) I got a bit clunky but easy, functional and once set up fast workaround for this problem: You can just use Obsidian (its free) and open your folder with the .md file as a new vault. Then you have to install and enable the plugin tidy footnotes via settings, community plugins, browse . Then you open your typora file and press ctrl + p to open the command line and run the command tidy footnotes (just type in "tidy" in the search bar and press enter). This will reorder your footnotes properly, save it to your .md file automatically in a few seconds and you can go on writing in Typora. If you have any questions on how to exactly do this feel free to ask. I nonetheless agree that a feature from Typora to do this would be great.