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

fix: inline latex math display in pdfs generated from ipynb #432

Conversation

satikaj
Copy link
Contributor

@satikaj satikaj commented Dec 12, 2023

Description

Fixed the issue where inline latex math was not rendering as correct math notation in PDFs converted from Jupyter Notebook (.ipynb) files.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Extended the test_ipynb_to_pdf test to check if the sample inline math is displayed correctly after generating the PDF. Run the following inside the test environment to run the test:

bundle exec rails test test/models/task_test.rb:320

Before

before

The image below shows what the PDF content looks like in plain text when the inline math is not rendered correctly. It also shows how the test fails because of this.

before-terminal

After

after

The image below shows the test running successfully due to the inline math being rendered correctly.

after-terminal

Note:

This is how the PDF content in plain text looks like when the sample inline math is rendered correctly:

note

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation if appropriate
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have created or extended unit tests to address my new additions
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@satikaj satikaj changed the title Fix the inline latex math display in pdfs generated from ipynb Fix: inline latex math display in pdfs generated from ipynb Dec 12, 2023
@satikaj satikaj changed the title Fix: inline latex math display in pdfs generated from ipynb fix: inline latex math display in pdfs generated from ipynb Dec 12, 2023
Copy link
Contributor

@maddernd maddernd left a comment

Choose a reason for hiding this comment

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

s

@satikaj
Copy link
Contributor Author

satikaj commented Apr 28, 2024

Updated this already @maddernd

@maddernd
Copy link
Contributor

@macite this looks good to me, tested myself and seems to work fine.

@satikaj satikaj closed this May 4, 2024
@satikaj satikaj deleted the enhance/add-inline-latex-math-support branch June 2, 2024 12:28
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.

2 participants