chiphuyen / chiphuyen/ml-interviews-book

Enable Export to PDF / EPUB / MOBI

Open
#7 12 comments 2 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
4.8k
Forks
691
PR merge metrics
No merged PRs in 30d

Description

When attempting to export to PDF, I got an error. It looks like MathJAX-Node dependency is using a deprecated API. This will probably get resolved upstream, but just in case anyone else wants to export, there is a workaround:

Modify `node_modules/mathjax-node/lib/mj-single.js` on line 540 from

`result.speakText = speech.processExpression(result.mml);`

to

`result.speakText = speech.toSpeech(result.mml);`

Source for workaround: https://github.com/kgryte/tex-equation-to-svg/issues/2#issuecomment-411023604

Command for exporting:

`npx honkit pdf ./ ./ml-interviews-book.pdf` or `npx honkit epub ./ ./ml-interview-book.epub`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with node_modules/mathjax-node/lib/mj-single.js at line 540 and review the linked upstream workaround. Run the documented npx honkit pdf and npx honkit epub commands to reproduce the export failure and verify that the affected exports complete without the deprecated API error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.