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

Numbered sections in the table of contents. #54

Open
mgoldenbe opened this issue Feb 7, 2018 · 4 comments
Open

Numbered sections in the table of contents. #54

mgoldenbe opened this issue Feb 7, 2018 · 4 comments

Comments

@mgoldenbe
Copy link

I use #+OPTIONS: num:t to have my sections numbered in GitHub. How do I make the section numbers appear in the table of contents?

@snosov1
Copy link
Owner

snosov1 commented Feb 7, 2018

Thanks for this find.

Actually, there's 2 issues here. First, as you mention, the section numbers don't appear in the table of contents. And, second (which is, actually, somewhat worse), if you have the num option set to non-nil the hrefs to the headings change and the current links don't work.

I'll think about how to fix this.

@mgoldenbe
Copy link
Author

Oops, I did not notice the second issue. However, that issue is not one of yours, since it affects all the internal links in README.org, not only the ones in the table of contents. So, I think that you need to only care about the first issue on your side.

@mgoldenbe
Copy link
Author

As for the second issue, see this solution. Since this is the only workable solution right now, you might want to use such custom ids when they are available.

@mgoldenbe
Copy link
Author

mgoldenbe commented Feb 7, 2018

Note, however, that to insure jumping to the correct place, the solution needs to look like this:

@@html:<a name="intro">@@
* Introduction

That is, the ID should be placed before the heading. OK, I am done with my suggestion now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants