Closed deb0ch closed 7 years ago
Hey, @deb0ch !
Thx for the report.
First, please, let me put your mind into the right place with respect to :noexport:
tag. Probably, the thing is - after you add :noexport:
the toc is being generated by the org-html
export. So, it's not a bug and it's not related to this package =) Simple way to test it is to add #+OPTIONS: toc:nil
to the top of your file.
Next, to the bug with Unable to resolve link
. I can also reproduce this, but it doesn't seem like a bug to me. Obviously, you use the "github-style" href format for links but then export to html (that uses a different href format) which causes issues.
There are several options to handle this:
:noexport:
tag and #+OPTIONS: toc:nil
org
export engine (use :noexport:
tag, but no #+OPTIONS: toc:nil
)toc-org
to generate it, then use #+OPTIONS: toc:nil
and provide a different "hrefify" function to toc-org
(instead of github-style one). In the simplest cases, the org
hrefify function should work. To enable it, simply use :TOC_2_org:
instead of :TOC:
Does it make any sense?
Closing as "Not a bug".
To enable it, simply use :TOC_2_org:
I tried this, most things worked out nicely. However the generated table of contents has the :TOC_2_org: in it, which doesn't look very good.
@MatthewZMD True. Unfortunately, I'm not sure what's the cleanest way to get around it.
You can kinda make it better by adding smth like #+HTML_HEAD_EXTRA: <style> .TOC_2_org { display: none; } </style>
. Though it still leaves the tag
span and adds clutter to the source file.
I've been experiencing a bug lately when having a table of contents declared as
:TOC:
and then trying to export to html. The error isUnable to resolve link: <name-of-your-first-heading>
.Here is a minimal example:
then when trying export to html (
M-x org-export-dispatch RET h o
for instance), you get the erroruser-error: Unable to resolve link: "foo"
in*Messages*
and justUnable to resolve link: "foo"
in the echo area.A simple workaround is to declare the toc as
:TOC:noexport:
. This way you don't get the error and the toc is still exported, it just doesn't make sense given what:noexport:
is supposed to do :confused: