SQLite Forum

3.31.1: docs as PDF?
Login
> Care to let me have a look at the input you sent to Pandoc

It's the built HTML documentation from <https://sqlite.org/docsrc>.

> or its output?

`pandoc -o sqlite.pdf --latex-engine=xelatex docs/*html` fails with an error mentioned above and cleans up temporary files.

` cd doc && pandoc -s -o sqlite.tex docs.html *html ` produces a [6-megabyte *.tex](https://0x0.st/iMmB.gz) file which *can* actually be built, albeit not without a lot of warnings (image loading problems and a lot of occurrences of "Extra }, or forgotten endgroup"). Use of XeLaTeX seems to be unavoidable because the resulting document contains symbols like `▼` and `►`. Inter-documentation links don't seem to be working, either (they lead to original *.html, instead).

I think that there needs to be a preprocessing step: a script should follow all links in `docs.html`, cut out the `<div>` with the relevant content, replace all local links with anchor-links, insert a relevant `<span id='...'></span>` in the beginning of each file (to make the anchor-links work) and concatenate all that into a single large *.html. That file could be fed to `pandoc` to produce a more logically sound PDF.