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

toc2 -- Full url in links | #skip tag to skip headers from being inserted #1030

Merged
merged 3 commits into from
Jul 28, 2017

Conversation

jfbercher
Copy link
Member

## This is a title #skip

and this will be rendered as

This is a title

without numbering and will not be inserted in toc.

@jcb91
Copy link
Member

jcb91 commented Jul 22, 2017

ah, I hadn't understood your #skip suggestion, then! I think I prefer the other implementation though, so as not to add weird tags for people opening the notebook without toc2 enabled...

@jfbercher
Copy link
Member Author

think I prefer the other implementation though, so as not to add weird tags for people opening the notebook without toc2 enabled...

Yes, you are right with that. Let's go with the other solution.

--

@jfbercher
Copy link
Member Author

I pushed a variant where any html tag with class "tocSkip" will prevent the corresponding header to be numbered and inserted in toc.

  • This tag will not be displayed if the toc2 extension is not present,
  • this can be employed at any heading level, as many times as necessary ,
  • this will not affect conversion to eg LateX (html tags are removed).

An example is as follows

## A title <a class='tocSkip'>

which will be displayed as

A title

@jcb91
Copy link
Member

jcb91 commented Jul 22, 2017

I pushed a variant where any html tag with class "tocSkip" will prevent the corresponding header to be numbered and inserted in toc

Looks like a good plan to me. This can also work in parallel with the automatic solution I've implemented in #1029, I think?

@jcb91
Copy link
Member

jcb91 commented Jul 22, 2017

Although, line 537 should be amended to not include the skipped headers in calculating the numbering levels

@jcb91
Copy link
Member

jcb91 commented Jul 28, 2017

ok, I'm going to merge this as is, then address line 537 in #1027, since both approaches should work in parallel

@parthi2929
Copy link

Hi

Adding <a class='tocSkip'> kind of looks hacky and not many could be aware. Instead, some short hand like #* could be used?

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

Successfully merging this pull request may close these issues.

3 participants