-
Notifications
You must be signed in to change notification settings - Fork 3
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
PDF build for documentation #18
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add relevant docs for ADOC_MEDIA_PRINT on docs_guidelinesr.rst .
Can be after the Versioning section.
@@ -6,15 +6,20 @@ | |||
project = 'Doctools' | |||
copyright = '2024, Analog Devices, Inc.' | |||
author = 'Analog Devices, Inc.' | |||
version = '0.3' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary? I don't want to manually increment this every time.
I prefer injecting it in CI with the ADOC_DOC_VERSION environment variable based on the git release tag, that may or may not be a python version variable.
The option from ..adi_doctools/__init__ import __version__ as version
is fine for python projects like this one and pyadi-iio, but not for others like scopy, iio-osc, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This field is necessary as it specifies on the first page of the PDF the mentioned version of the document. If we don't want to specify the version, I will remove this field or will change it so that it automatically updates.
- This method converts directly to PDF using the .rst files (rst2pdf method) - Build by running 'sphinx-build -b pdf' in the docs folder and choose the output folder - New parameter called ADOC_MEDIA_PRINT; This parameters is used to signal the PDF export mode and can be either 1 or 0 - Tables export as they should now (wihtout empty columns) - Collapsibles are converted into tables - Dropdowns which contain tables like the ones found in 'Generic AXI ADC' && 'Generic AXI DAC' wouldn't render properly, but now they are fixed - Fixed larger tables, usually appear under 'Configuration Parameters' section, which contain a larger number of columns - Added a new section called 'Exporting to PDF' where the PDF export mode is explained - Added in requirments.txt the three libraries needed to build the PDF documentation - Fixed conflicts Signed-off-by: Cristian Mihai Popa <cristianmihai.popa@analog.com>
b20ed85
to
b2f8caf
Compare
Signed-off-by: Cristian Mihai Popa <cristianmihai.popa@analog.com>
Using RTF2PDF, there is now the option for outputting the whole HDL documentation in PDF format. The following changes were made:
sphinx-build -b pdf . _build/pdfbuild
in docs folder after setting the ADOC_MEDIA_PRINT variable; these libraries are needed to be installedconf.py
file from each repo needs to be changed to includerst2pdf.pdfbuilder
extensionThere are a few more issues that need to be tackled, but these problems are more styling related:
This is a prototype, a bit more styling is needed, but functionally, all the info that is contained in HDL documentation can be found in the new outputted PDF document (no missing tables, like in the case of collapsible content which contained other pieces of information).
The new PDF output method was tested on a select batch of pages from HDL (taken from docs/projects & docs/library) & on the whole HDL documentation.