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 #441

Merged
merged 2 commits into from
May 25, 2024

Conversation

satikaj
Copy link
Contributor

@satikaj satikaj commented May 4, 2024

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
Copy link
Contributor Author

satikaj commented May 4, 2024

Just moved the changes from the original PR (#432) to the development branch to build on top of Bowen's changes

@maddernd
Copy link
Contributor

maddernd commented May 4, 2024

Thanks Satika, looks good @macite can you please review this one.

@macite macite changed the base branch from development to 7.0.x May 24, 2024 21:33
@macite macite changed the base branch from 7.0.x to development May 24, 2024 21:34
@macite macite merged commit cdd9edc into doubtfire-lms:development May 25, 2024
4 checks passed
@satikaj satikaj deleted the fix/jupyter-math-display 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.

3 participants