QuantEcon / quantecon-book-theme

A Jupyter Book Theme for QuantEcon Book Style Projects
BSD 3-Clause "New" or "Revised" License
41 stars 21 forks source link

🐛 FIX: Configuring mathjax before the script that loads mathjax #137

Closed AakashGfude closed 3 years ago

AakashGfude commented 3 years ago

Added hardcoded mathjax inline script, before mathjax itself loads, to make the config work, according to: http://docs.mathjax.org/en/latest/web/configuration.html#configuration-using-an-in-line-script

The present config option to configure mathjax in _config.yml wont work with mathjaxv3 as mentioned in the following comment. https://github.com/executablebooks/jupyter-book/blob/master/docs/_config.yml#L66

Once, we start using sphinx v4, we can use mathjax3_config to set all the macros in the configuration file https://sphinx--9094.org.readthedocs.build/en/9094/usage/extensions/math.html#confval-mathjax3_config .

But, for now, we will have to make with hardcoded configuration in the theme.

fixes https://github.com/QuantEcon/quantecon-book-theme/issues/135

codecov[bot] commented 3 years ago

Codecov Report

Merging #137 (c7f4a58) into master (5ddb974) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #137   +/-   ##
=======================================
  Coverage   72.29%   72.29%           
=======================================
  Files           2        2           
  Lines         231      231           
=======================================
  Hits          167      167           
  Misses         64       64           
Flag Coverage Δ
pytests 72.29% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5ddb974...c7f4a58. Read the comment docs.

mmcky commented 3 years ago

nice work @AakashGfude the preview project won't have any argmin or argmax but I'm happy for you to go ahead and merge if you're happy with this solution. Let's open a tracking issue to remove this hard coding when sphinx>=4.0 is supported.

Nice investigative work on this!