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

docs: Cosmetic & functional fixes to comply with PDF generation req. #1446

Merged
merged 3 commits into from
Sep 23, 2024

Conversation

cristianmihaipopa
Copy link
Collaborator

@cristianmihaipopa cristianmihaipopa commented Sep 4, 2024

The purpose of this PR is to fix typos & mistakes that mess up the PDF generation of the doc. More changes will be added as soon as they are caught. PDF generation method is still in progress & is tested on a certain batch of pages that have different functionalities (collapsible content, math formulas etc.).

Doctools PDF output method PR was merged into main (analogdevicesinc/doctools#18).

PR Type

  • Bug fix (change that fixes an issue)
  • New feature (change that adds new functionality)
  • Breaking change (has dependencies in other repos or will cause CI to fail)

PR Checklist

  • I have followed the code style guidelines
  • I have performed a self-review of changes
  • I have compiled all hdl projects and libraries affected by this PR
  • I have tested in hardware affected projects, at least on relevant boards
  • I have commented my code, at least hard-to-understand parts
  • I have signed off all commits from this PR
  • I have updated the documentation (wiki pages, ReadMe files, Copyright etc)
  • I have not introduced new Warnings/Critical Warnings on compilation
  • I have added new hdl testbenches or updated existing ones

@IuliaCMoldovan IuliaCMoldovan changed the title Doc general fixes docs: Cosmetic fixes to comply with PDF generation req. Sep 4, 2024
@IuliaCMoldovan IuliaCMoldovan marked this pull request as draft September 4, 2024 08:15
@IuliaCMoldovan
Copy link
Contributor

Converted it as a draft PR since it is still WIP

@gastmaier
Copy link
Contributor

I see you replaced my no-breaking hyphens with breaking hyphens (unicode inspect).
The purpose is to not allow a line break like this

32-
bit

The pdf tool does not support unicode or this unicode character?

@cristianmihaipopa
Copy link
Collaborator Author

cristianmihaipopa commented Sep 5, 2024

The pdf tool does not support unicode or this unicode character?

Indeed, they don't support no-breaking hyphens. So far, I think only this unicode character is not supported. If no-breaking hyphens is messing up the page rendering (which in my case when I rendered the page it didn't, everything was fine), I will treat this case in code. Also, there're a few math formulas that don't render well too. This PR is only a draft and has the purpose to fix .rst mistakes so that no extra code for doctools is needed. For example, math formulas needed correction only in .rst. No need to implement correction mechanism in doctools.

@cristianmihaipopa
Copy link
Collaborator Author

cristianmihaipopa commented Sep 6, 2024

I found out that separating .. math:: blocks which contain multiple math formulas, the PDF generation will be okay. For example, in this section (docs/library/spi_engine/instruction-fromat.rst line 81) we have this formulas:

.. math::

   delay_{before} = 2+ t * \frac{(div + 1)*2}{f_{clk}}

   delay_{after}  = t * \frac{(div + 1)*2}{f_{clk}}

If separated like this (also added '\' before '_{before}' ):

.. math::

   delay\_{before} = 2 + t * \frac{(div + 1)*2}{f_{clk}}

.. math::

   delay\_{after}  = t * \frac{(div + 1)*2}{f_{clk}}

The PDF generation will be okay. Even the HTML page will look fine.

@cristianmihaipopa
Copy link
Collaborator Author

docs/library/axi_ad485x: Tag <#hdl-regmap-DELAY_CNTRL> needs to be fixed

Will be changed to <#hdl-regmap-IO_DELAY_CNTRL> (the redirect to the below content will work then). Apparently tags likes this which are not working mess up the whole PDF generation (document is not readable by any program).

@cristianmihaipopa cristianmihaipopa changed the title docs: Cosmetic fixes to comply with PDF generation req. docs: Cosmetic & functional fixes to comply with PDF generation req. Sep 10, 2024
- Fixed '-' chars that would mess up the PDF generation
- Fixed a few math formulas that don't render well in PDF
format
- Fixed a tag in library/axi_ad485x that would mess up the whole
PDF generation

Signed-off-by: Cristian Mihai Popa <cristianmihai.popa@analog.com>
- Added the configuration so that the user
can ouput the whole document in PDF

Signed-off-by: Cristian Mihai Popa <cristianmihai.popa@analog.com>
@cristianmihaipopa cristianmihaipopa marked this pull request as ready for review September 17, 2024 15:31
Copy link
Contributor

@gastmaier gastmaier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add rst2pdf.pdfbuilder to requirements.txt also

Signed-off-by: Cristian Mihai Popa <cristianmihai.popa@analog.com>
@cristianmihaipopa cristianmihaipopa merged commit ce0a4c5 into main Sep 23, 2024
1 check was pending
@cristianmihaipopa cristianmihaipopa deleted the doc_general_fixes branch September 23, 2024 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants