1

When HTML pages are extended I find it quite useful to have a TOC (table of Content) available all along with your scrolling.

A good example of an implementation of such a functionality is the Worg webpages (here is an example), which are generated from org files.

So my question is, how is this done? Is it done through a CSS file? If it is, what would the CSS code be?

1

It's done with a Javascript library called org-info.js, written by Sebastian Rose. See the Javascript support section of the Org mode manual. There is also some additional documentation in Worg.

3
  • Hi NickD, are you sure org-info.js handles dynamic TOC? My goal is not to have an Info-like, nor a folding view – crocefisso Jan 6 at 2:35
  • Ok, it actually was done through a CSS: orgmode.org/worg/style/worg.css – crocefisso Jan 6 at 3:02
  • Oh, I probably conflated the two. Sorry about that. – NickD Jan 6 at 13:30
0

Following line has to be put on top of your org file:

#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="https://orgmode.org/worg/style/worg.css"/>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.