QuantEcon / quantecon-book-theme

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

Styling margin directive from sphinx-book-theme #238

Closed AakashGfude closed 9 months ago

AakashGfude commented 10 months ago

Desktop :

Screen Shot 2023-11-07 at 11 58 22 am

Mobile:

Screen Shot 2023-11-07 at 11 56 03 am

TODO:

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

codecov[bot] commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (e65778b) 73.18% compared to head (8e898ab) 73.07%. Report is 2 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #238 +/- ## ========================================== - Coverage 73.18% 73.07% -0.11% ========================================== Files 2 2 Lines 261 260 -1 ========================================== - Hits 191 190 -1 Misses 70 70 ``` | [Flag](https://app.codecov.io/gh/QuantEcon/quantecon-book-theme/pull/238/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=QuantEcon) | Coverage Δ | | |---|---|---| | [pytests](https://app.codecov.io/gh/QuantEcon/quantecon-book-theme/pull/238/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=QuantEcon) | `73.07% <100.00%> (-0.11%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=QuantEcon#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

mmcky commented 10 months ago

thanks @AakashGfude this is looking nice.

does the margin note need to have a title (or is that optional?)

AakashGfude commented 10 months ago

@mmcky, that is optional, but it currently has a fixed title space. The style coming from Pydata:

Screen Shot 2023-11-10 at 10 57 20 am

Unlike that in sbt:

Screen Shot 2023-11-10 at 11 07 11 am

I will fix it.

AakashGfude commented 10 months ago

@mmcky I have done this here, for margins without title:

Screen Shot 2023-11-10 at 1 24 21 pm
mmcky commented 10 months ago

thanks @AakashGfude happy for your to go ahead and merge when you're ready.

can you add that this is supported to the docs as well

AakashGfude commented 10 months ago

@mmcky, this has been added to the docs. What do you think?

Screen Shot 2023-11-14 at 10 52 31 am
AakashGfude commented 10 months ago

@mmcky I have also cleaned the design a bit, mimicking the sphinx-book-theme now:

Screen Shot 2023-11-14 at 2 49 10 pm

What do you think?

There are a few additional changes/additions for margin content:

Screen Shot 2023-11-14 at 3 03 47 pm Screen Shot 2023-11-14 at 3 04 11 pm
mmcky commented 10 months ago

thanks @AakashGfude this is looking nice -- much better.

Last question -- what happens on the latex side of things for margin notes?

mmcky commented 9 months ago

@AakashGfude I am going to merge this just curious re: latex side if we start to use them.

Last question -- what happens on the latex side of things for margin notes?

AakashGfude commented 9 months ago

@mmcky, I have this planned this week—the latex thing. The latex build was failing in my system, so I could not test it immediately. I will correct that first.

AakashGfude commented 9 months ago

@mmcky for latex build, the margin is looking like this:-

Screen Shot 2023-12-12 at 4 38 57 pm

What do you think is the best UI for margins? Given they can't stick to the sides like websites. Let me check jupyter book as well

mmcky commented 9 months ago

thanks @AakashGfude if they don't break LaTeX builds that is great news.

That means we can deploy this theme update without potential lack of support on the pdf side causing build failures.

Of course it would be good to add support for it over time to sphinx-jupyterbook-latex

Perhaps next steps are:

  1. Open an Issue in sphinx-jupyterbook-latex to make improvements to margin object support in pdf
  2. I think this is probably the most common practice in terms of TeX support https://www.overleaf.com/learn/latex/Margin_notes
AakashGfude commented 9 months ago

That sounds excellent @mmcky. Thanks, I will do that.