Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST]: Numbered headings #1275

Open
DutchPete opened this issue Aug 16, 2019 · 17 comments
Open

[FEATURE REQUEST]: Numbered headings #1275

DutchPete opened this issue Aug 16, 2019 · 17 comments
Labels
🔭 area/ui 🦁 need discuss the issue or PR need to discuss 🦄 feature request New feature or request

Comments

@DutchPete
Copy link

Describe your feature request

Each header/header type to be numbered automatically. Thus the 1st H1 header should be numbered 1.0, the 2nd H1 header should be numbered 2.0, and so on.

The 1st H2 header under 1.0 should be numbered 1.1, the 1st H2 header under 2.0 should be numbered 2.1, and so on

What problem does this feature solve? [optional]

Readability of a document, esp. a long document with numerous headers and subheaders.

Additional context [optional]

@stefnotch
Copy link
Contributor

The Markdown spec sadly doesn't seem to support numbered headings.

A similar Markdown Editor chose to let users apply their own CSS to their Markdown documents to get numbered headings http://support.typora.io/Auto-Numbering/

@DutchPete
Copy link
Author

A similar Markdown Editor chose to let users apply their own CSS to their Markdown documents to get numbered headings http://support.typora.io/Auto-Numbering/

I am aware of the Typora system: I use Typora. I discovered MT yesterday and was impressed by its features. It misses a few essentials for my use case, but it has a number of things it does better.

In Typora one has to create a base.user.css file that one has to put in the themes subfolder of the .config folder. MT does not have a themes folder, so I copied Typora's base.user.css file to MT's .config folder, but that does not work.

Next I copied the contents of thebase.user.css file to MT's preferences.json file, but that does not work either.

So, please tell me how to use the base.user.css file. FYI, I have attached it here. Note: I added the .txt extension because .css files are not accepted here. To see the code properly, just Rename the file by deleting the .txt bit.
base.user.css.txt

@fxha
Copy link
Contributor

fxha commented Aug 16, 2019

Thank you for taking the time to open this issue. Numbered headings is not a markdown standard but can be easy implemented with user styles later or added as theme settings option. Depending on demand, we'll add this feature. Please 👍 this issue if you like the idea.

So, please tell me how to use the base.user.css file. FYI, I have attached it here. Note: I added the .txt extension because .css files are not accepted here. To see the code properly, just Rename the file by deleting the .txt bit.

Custom themes or user styles (CSS) are currently not supported and tracked in #174.

@DutchPete
Copy link
Author

Please +1 this issue if you like the idea.

Where can I +1 this issue?

Custom themes or user styles (CSS) are currently not supported and tracked in #174.

Issue #174 is quite old already; I am not interested in custom themes, what is on offer is more than adequate as far as I am concerned. Nevertheless, can you give an indication as to when user styles will be supported?

@fxha
Copy link
Contributor

fxha commented Aug 16, 2019

Where can I +1 this issue?

Please click "+ 😄" button in the top-right of you first post and select 👍.

Issue #174 is quite old already; I am not interested in custom themes, what is on offer is more than adequate as far as I am concerned. Nevertheless, can you give an indication as to when user styles will be supported?

I think custom themes are planned for v0.16.0 but @Jocs know more about it and is also assigned for this topic but both of us are currently a little bit busy.

@fxha fxha changed the title [FEATURE REQUEST] Auto numbering for headings Numbered headings Aug 16, 2019
@Jocs
Copy link
Member

Jocs commented Aug 17, 2019

In Typora one has to create a base.user.css file that one has to put in the themes subfolder of the .config folder. MT does not have a themes folder, so I copied Typora's base.user.css file to MT's .config folder, but that does not work.

Sorry! we didn't support custom CSS yet, I think custom theme will solve this problem, but now, we didn't support it yet. we'll already add the plan (add custom theme) in the project v0.16.0, so stay tuned.

@DutchPete
Copy link
Author

Sorry! we didn't support custom CSS yet, I think custom theme will solve this problem, but now, we didn't support it yet. we'll already add the plan (add custom theme) in the project v0.16.0, so stay tuned.

OK, thank you.

@DutchPete DutchPete changed the title Numbered headings [FEATURE REQUEST]: Numbered headings Aug 24, 2019
@retsyo
Copy link

retsyo commented Dec 17, 2019

the header/toc/outliner css can show number in typora. however

pdf docx
header has number no number
toc has number no number
outline/bookmark no number no number

so I am still voting for marktext to support it since there is limitation in typora's implementation

@DutchPete
Copy link
Author

@retsyo : pdf and docx are not markdown formats, so you cannot add numbering to them from within Mark Text. You would have to export it to a PDF (not sure about Word) and the headings will show up and are clickable. Right now MT cannot do numbered headings.

@retsyo
Copy link

retsyo commented Dec 17, 2019

a temporary solution for heading:

  1. export a markdown file in which all heading(#, ##, ###, ...) are replace by number+heading
  2. export the new markdown file

@retsyo
Copy link

retsyo commented Dec 17, 2019

@DutchPete, I mean export markdown file to PDF/DOCX

@fxha
Copy link
Contributor

fxha commented Dec 19, 2019

@retsyo @DutchPete We current only support numbered heading in exported documents. You can download the latest release candidate Github.

@retsyo
Copy link

retsyo commented Dec 20, 2019

I found the option, but I think there is bug
#1830

@j0uni
Copy link

j0uni commented Sep 11, 2020

Thank you for taking the time to open this issue. Numbered headings is not a markdown standard but can be easy implemented with user styles later or added as theme settings option. Depending on demand, we'll add this feature. Please 👍 this issue if you like the idea.

So, please tell me how to use the base.user.css file. FYI, I have attached it here. Note: I added the .txt extension because .css files are not accepted here. To see the code properly, just Rename the file by deleting the .txt bit.

Custom themes or user styles (CSS) are currently not supported and tracked in #174.

Yes, absolutely must have feature. I have used Typora and that is the first thing I modder to custom CSS and I wish Marktext has the same feature too. Either by customing or just a setting to turn on/off.

@brotherdust
Copy link

👍
Please! I pretty much have to have this for my documents.

@balaji-ch
Copy link

This is the deal breaker for me to move from typora.

@prosong
Copy link

prosong commented Aug 23, 2021

Like it. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔭 area/ui 🦁 need discuss the issue or PR need to discuss 🦄 feature request New feature or request
Projects
None yet
Development

No branches or pull requests

9 participants