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

Expose TOC placeholder in XML output #625

Merged
merged 2 commits into from
Dec 24, 2017

Conversation

mosra
Copy link
Contributor

@mosra mosra commented Nov 25, 2017

(Depends on changes in #624, even though the two features are independent, the changes are in very close areas -- I didn't want to open two PRs where one would conflict with the other and make you headaches with merging. Hope that's okay.)

Currently the XML output for a page was generated the same independently of whether the \tableofcontents command was present in the page source or not. Because of that, the users of the XML output had no chance of knowing whether given page should have a TOC or not.

There's now a new <tableofcontents> element that gets added in case the TOC was requested. As it is trivial to populate the TOC on user side by simply enumerating the <sectN> elements, the element is empty and acts just as a boolean.

Thanks again for looking into this :)

Until now the brief description of pages was prepended to the
<detaileddescription> element and the <briefdescription> element was
not present at all, which meant there was no easy way to extract the
brief description for purposes of creating a page index, for example.

With this patch, the brief description is included in both
<briefdescription> and <detaileddescription>, thus duplicated, to
avoid backwards compatibility issues.
Currently the XML output for a page was generated the same
independently of whether the \tableofcontents command was present in
the page source or not. Because of that, the users of the XML output
had no chance of knowing whether given page should have a TOC or not.

There's now a new <tableofcontents> element that gets added in case
the TOC was requested. As it is trivial to populate the TOC on user
side by simply enumerating the <sectN> elements, the element is empty
and acts just as a boolean.
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.

None yet

2 participants