-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
ENH: Enable PDF book style build via LaTeX #193
base: main
Are you sure you want to change the base?
Conversation
Thanks @AakashGfude 👍 -- this is because |
TeX: | ||
extensions: ["autobold.js"] | ||
Macros: | ||
"argmax" : "arg\\,max" |
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.
@AakashGfude I presume these aren't required for datascience
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.
they are already added in quantecon-book-theme
for mathjax v3. https://github.com/QuantEcon/quantecon-book-theme/blob/master/quantecon_book_theme/layout.html#L10 .
Since, there is no variable in sphinx to add configuration for mathjax3 in config file. I think it should be introduced in sphinxv4 though.
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.
the new variable in sphinx version 4+ is mathjax3_config
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.
@AakashGfude I have opened a issue to track that inclusion
@@ -132,14 +132,14 @@ that best fit the data. | |||
|
|||
$\epsilon$ is the error term. It would be unusual for the observed | |||
$\log(\text{price})$ to be an exact linear function of | |||
$\text{sqft_living}$. The error term captures the deviation of | |||
$\log(\text{price})$ from a linear function of $\text{sqft_living}$. | |||
$\text{sqft\_living}$. The error term captures the deviation of |
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.
@AakashGfude just for clarity for when I update the style guide
we need to escape the _
right?
This change QuantEcon/quantecon-book-theme@ec8d8c8 will then enable the correct Tex
to be processed by mathjax.
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.
Yes, if we want to write a literal underscore, then we will have to escape it like that. http://docs.mathjax.org/en/latest/input/tex/extensions/textmacros.html#quoted-special-characters . I was about to comment about mentioning textmacros in the style guide as well http://docs.mathjax.org/en/latest/input/tex/extensions/textmacros.html
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.
that would be great -- can you remind me or open an issue on: QuantEcon.manual
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.
@mmcky what is QuantEcon.manual ?
Actually this is taken care of for automatic minor version updates:
|
quantecon-book-theme 0.2.8 is now released. |
@AakashGfude is there a package I need to add to support the image conversion? |
@AakashGfude do the image file references need support for
or is this directory a flat collection if images? |
@AakashGfude I just ran this branch locally -- it seems to build the Actually my local lectures/_build/jupyter_execute adjust-toc ✔ 2m
▶ ls
applications index.py pandas python_fundamentals theme
index.ipynb introduction problem_sets scientific |
@AakashGfude I have opened #194 to update |
@mmcky , i think the path is different in server than in local? Is their an artifact we can download? |
@mmcky actually the path generated is wrong altogether, as the file it is trying to find, for example, is |
yeah -- that's right. It seems to be missing the |
@mmcky But also, locally it is |
How do they avoid conflicts -- is that |
@AakashGfude the https://github.com/QuantEcon/lecture-datascience.myst/actions/runs/1357596935 under artifacts |
@AakashGfude so the |
Hmm, will check what is 'cause' and what is 'effect' here |
@AakashGfude what confuses me is that the other repos are building on |
This PR has been halted from merging, because of HTML build failing. Which is caused by the server of Canadian government, geolocation service being currently down. https://www.nrcan.gc.ca/science-and-data/science-and-research/earth-sciences/geography/topographic-information/web-services/geolocation-service/17304 |
@AakashGfude hopefully this server issue is now resolved. So could you re-trigger the |
@mmcky I did run it again, and got the following error. Some nltk issue, |
Is this on your local? I saw the Roger that. @jbrightuniverse any ideas on how to resolve this |
according to those logs:
it seems that a language set is missing? the logs claim executing that line at some point in the build would solve it; I'm not familiar with the codebase so I'm not sure if that already happens or if the set is expected to already be there. Also notable is the logs claim:
|
This PR enables the book style PDF to be built via LaTeX.
Changes:
Upgrading to mathjax v3 to use textmacros was necessary, to escape
_
inside\text{}
as it is a special character. https://github.com/QuantEcon/lecture-datascience.myst/compare/pdf-changes?expand=1#diff-596037ac6201ed91873ef81f374bc604c6c1f0a4d56833e749433585288d7b1eR135NOTE that while using
_
or any special characters inside\text{}
we need to escape it. Like its done in this PR by using\_
instead of_
{align*}
is an environment, which throws errors in latex, when its inside another environment like$$
. Using{aligned}
instead is the way to go.