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

Table of contents not linked when generating html from org file #2354

Closed
jg opened this issue Aug 8, 2015 · 7 comments
Closed

Table of contents not linked when generating html from org file #2354

jg opened this issue Aug 8, 2015 · 7 comments

Comments

@jg
Copy link
Contributor

jg commented Aug 8, 2015

I'm generating an html file from my org file. I'd like to include a table of contents.

pandoc -s -S --toc file.org -o file.html

The org file has three simple first level headings.

* item 1
* item 2
* item 3

Unfortunately the output table of contents is not linked. The links are missing their href attributes.

<div id="TOC">
<ul>
  <li><a>item 1</a></li>
  <li><a>item 2</a></li>
  <li><a>item 3</a></li>
</ul>
@jgm jgm closed this as completed in 2eec8cf Aug 8, 2015
@jgm jgm reopened this Aug 8, 2015
@jgm
Copy link
Owner

jgm commented Aug 8, 2015

@tarleb, what do you think? The trick is to use registerHeader, which does all the work behind the scenes, but you need to define certain instances for OrgParserState for this to work.

@tarleb
Copy link
Collaborator

tarleb commented Aug 11, 2015

Apologies for the late reply. I didn't find the time yet for this, but I keep it in mind and will take a look when things calm down a little. It's on my todo list.

jg added a commit to jg/pandoc that referenced this issue Aug 15, 2015
Refs jgm#2354

This should also fix the table of contents (--toc) when generating a html file
from org input
@jg
Copy link
Contributor Author

jg commented Aug 15, 2015

I see pandoc master failing for GHC 7.10.1. Do we care about 7.10.1 compatibility? CONTRIBUTING.md could use a pragraph about that

@jgm
Copy link
Owner

jgm commented Aug 15, 2015

I added a note about ghc versions and travis.

Btw, travis builds currently fail for ghc 7.10 due to a
cabal version mismatch in running tests, which makes 'cabal
test' fail. I think this is a cabal bug; do you know how to
make it go away?

+++ jg [Aug 15 15 00:46 ]:

Do we care about ghc 7.10.1 compatibility? CONTRIBUTING.md could use a
pragraph about that


Reply to this email directly or [1]view it on GitHub.

References

  1. Table of contents not linked when generating html from org file #2354 (comment)

@jgm
Copy link
Owner

jgm commented Aug 15, 2015

Oh, and the answer is yes - we want ghc 7.10.x
compatibility! Only, for now, it doesn't need to be
-Wall clean -- it's hard to know how to avoid all the
warnings relating to moving Monoid and Applicative stuff
into the Prelude.

+++ jg [Aug 15 15 00:46 ]:

Do we care about ghc 7.10.1 compatibility? CONTRIBUTING.md could use a
pragraph about that


Reply to this email directly or [1]view it on GitHub.

References

  1. Table of contents not linked when generating html from org file #2354 (comment)

@jgm
Copy link
Owner

jgm commented Aug 15, 2015

Closed by #2360

@jgm jgm closed this as completed Aug 15, 2015
@jgm
Copy link
Owner

jgm commented Aug 15, 2015

Btw, travis builds currently fail for ghc 7.10 due to a
cabal version mismatch in running tests, which makes 'cabal
test' fail. I think this is a cabal bug; do you know how to
make it go away?

Fixed this by using cabal-install-head in the travis build for ghc 7.10.1.

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

3 participants