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 Equation 4.18 #110

Open
mmcky opened this issue Sep 14, 2023 · 8 comments
Open

Fix Equation 4.18 #110

mmcky opened this issue Sep 14, 2023 · 8 comments
Assignees

Comments

@mmcky
Copy link
Contributor

mmcky commented Sep 14, 2023

Eq (4.18) looks broken at the end (missing brackets) but actually if
you hover over the equation there's a slider.

That's not obvious if you don't hover.

I wonder how we might deal with that?

Always show the slider? Maybe decrease the margins slightly?

I'm looking at https://64fcd7b7064a1019dc45546a--incomparable-parfait-2417f8.netlify.app/markov_asset,
which is the JAX "An Asset Pricing Problem" lecure.

@mmcky
Copy link
Contributor Author

mmcky commented Sep 14, 2023

I think the best short term solution is to split the equation over two lines for now.

@mmcky
Copy link
Contributor Author

mmcky commented Sep 14, 2023

@Smit-create can you think about a way we might be able to do a pre-commit run to check for long equations?

From @jstac

I wonder if there's a way to scan the documents for these....

@Smit-create
Copy link
Member

can you think about a way we might be able to do a pre-commit run to check for long equations?

Hmm, this might be a hard one. The main issue here is the number of characters that we write in a .md file for a latex equation is not always equal to the number of characters in the rendered equation.

One very naive approach to this problem can be to generate a pdf file -> convert it to .txt file and check the number of characters on each line in the .txt file. This might be a long and resource-consuming approach.

One another approach to detect this is if the HTML page contains a slider, then raise an error while generating the page for that file. I am not completely sure if this is possible as I need to dig into how the pages are generated internally and if there is some way to detect the same.

@jstac
Copy link
Contributor

jstac commented Sep 14, 2023

Thanks @Smit-create . Maybe that's not worth the effort. Instead we can make it the responsibility of the author to check.

Is there an easy way to allow long equations to run over the margins, instead of using a slider? That would make them easier to spot and correct.

@mmcky
Copy link
Contributor Author

mmcky commented Sep 14, 2023

@Smit-create I guess I was wondering if there are any html visual checkers that we might be able to incorporate on the html side through CI such as https://smartbear.com/product/visualtest/

This idea is a longer term project but it would be nice to find a tool that could assist with this -- particularly if we could build some visual rules like this long equation check.

@mmcky
Copy link
Contributor Author

mmcky commented Sep 14, 2023

Is there an easy way to allow long equations to run over the margins, instead of using a slider?

This behaviour would be controlled by quantecon-book-theme

@mmcky
Copy link
Contributor Author

mmcky commented Mar 7, 2024

Is there an easy way to allow long equations to run over the margins, instead of using a slider? That would make them easier to spot and correct.

@jstac this is inherited behaviour for pydata-sphinx-theme but we could try and override the math / slider behaviour in our theme. Would you prefer all equations to not scroll.

  • migrate issue to quantecon-book-theme

@jstac
Copy link
Contributor

jstac commented Mar 7, 2024

Mmmm, it's hard to say what's best. I think I'd prefer for them not to scroll.

But ideally we should go through and rejig them so they fit ---- maybe worth an issue in meta?

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

No branches or pull requests

3 participants