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

AGREE doc build does not generate ToC #88

Open
kfhoech opened this issue Mar 7, 2022 · 1 comment
Open

AGREE doc build does not generate ToC #88

kfhoech opened this issue Mar 7, 2022 · 1 comment
Assignees
Labels
AGREE bug Something isn't working documentation Improvements or additions to documentation
Milestone

Comments

@kfhoech
Copy link
Contributor

kfhoech commented Mar 7, 2022

A table of contents XML file for the AGREE documentation is not generated. Instead the present contents of the old user_guide_toc.xml is copied to the generated outputs directory. Fix this such that the ToC is generated from the markdown sources

@kfhoech kfhoech added bug Something isn't working documentation Improvements or additions to documentation AGREE labels Mar 7, 2022
@kfhoech kfhoech added this to the v2.9.0 milestone Mar 7, 2022
@kfhoech kfhoech self-assigned this Mar 7, 2022
@kfhoech
Copy link
Contributor Author

kfhoech commented Mar 14, 2022

This is somewhat thorny. For AGREE, the user guide is divided into separate html documents each containing a separate section or subsection. When the LUA script that generates the ToC XML is run it receives from Pandoc a combined document containing all the sections/subsections and the name of a combined html guide is passed in as an environment variable. Thus, the LUA script cannot differentiate which of the individual section html files to link in for each ToC entry.

There are a (at least) two approaches to resolve the problem:

  1. Separately invoke Pandoc and the LUA script to generate separate ToC files for each of the sections and passing the name of the html filename environment variable. Then combine the various ToC files for each section into a master ToC XML file. The advantages of the approach are that iterative invocation is easy and a further Python script can be written to combine the section ToC files as a separate step. The disadvantage is that the sections/subsections are at differing levels of hierarchy and a means of handling the hierarchy would need to be invented.

  2. Continue to use the single invocation of Pandoc and the LUA script but rather than passing in the name of a single combined document, pass in a table mapping section/subsection numbers to section/subsection filenames and modify the LUA script to look up the appropriate html link for each section/subsection heading in the ToC. The development of the mapping from section/subsection number to html file would be done as a precursor step.

Either way, there needs to be a mechanism to derive a mapping from section/subsection numbers to file names. In the input source the convention is that the filename is prefixed with the top level section number and the second level section number. Also need to handle letters as this is done for appendices.

@kfhoech kfhoech modified the milestones: v2.9.0, v2.10.0 Mar 28, 2022
@kfhoech kfhoech modified the milestones: v2.10.0, v2.11.0 Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AGREE bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant