Replies: 5 comments 2 replies
-
Hello @chipbrock . You can modify the original <script type="text/x-mathjax-config"> using the |
Beta Was this translation helpful? Give feedback.
-
Hi. Thanks for your reply. I assume that I’m using Mathjax 2.x. A produced HTML page in _build shows:
<script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["\\(", "\\)"]], "displayMath": [["\\[", "\\]"]], "processRefs": false, "processEnvironments": false}})</script>
which is not entirely satisfying.
and from RStudio for my former life inside of bookdown, Mathjax is loaded dynamically:
<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
(function () {
var script = document.createElement("script");
script.type = "text/javascript";
var src = "true";
if (src === "" || src === "true") src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-MML-AM_CHTML";
if (location.protocol !== "file:")
if (/^https?:/.test(src))
src = src.replace(/^https?:/, '');
script.src = src;
document.getElementsByTagName("head")[0].appendChild(script);
})();
</script>
which points to 2.7.2 I believe.
I’m uncertain about “what to say” to change the font size for display math in the _config.yml .
Can you help me there?
It’s pretty stock at the moment:
# Book settings
# Learn more at https://jupyterbook.org/customize/config.html
title: My sample book
author: The Jupyter Book Community
logo: logo.png
# Force re-execution of notebooks on each build.
# See https://jupyterbook.org/content/execute.html
execute:
execute_notebooks: auto
exclude_patterns: [randomly/content.md]
# Define the name of the latex output file for PDF builds
latex:
latex_documents:
targetname: book.tex
# Add a bibtex file so that we can create citations
bibtex_bibfiles:
- references.bib
# Information about where the book exists on the web
repository:
url: https://github.com/executablebooks/jupyter-book # Online location of your book
path_to_book: docs # Optional path to your book, relative to the repository root
branch: master # Which branch of the repository should be used when creating links (optional)
# Add GitHub buttons to your book
# See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository
html:
use_issues_button: true
use_repository_button: true
thanks
On Jun 23, 2021, at 2:11 AM, AakashGC ***@***.******@***.***>> wrote:
Hello @chipbrock<https://urldefense.com/v3/__https://github.com/chipbrock__;!!HXCxUKc!gHruPhXCbCa9LfLUx8a5mR8Bxuxc8IR7L32vzZHhsRQoz26CnX6o04it5N96cU0$> . You can modify the original <script type="text/x-mathjax-config"> using the mathjax_config option in your _config.yml: https://jupyterbook.org/advanced/sphinx.html#defining-tex-macros<https://urldefense.com/v3/__https://jupyterbook.org/advanced/sphinx.html*defining-tex-macros__;Iw!!HXCxUKc!gHruPhXCbCa9LfLUx8a5mR8Bxuxc8IR7L32vzZHhsRQoz26CnX6o04itQHxyjRE$> . Do note that this option works only with Mathjax v2.
Hope this helps.
Which Mathjax version are you using btw?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https://github.com/executablebooks/meta/discussions/402*discussioncomment-908260__;Iw!!HXCxUKc!gHruPhXCbCa9LfLUx8a5mR8Bxuxc8IR7L32vzZHhsRQoz26CnX6o04it8W-gvuI$>, or unsubscribe<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ABCOLTOKCK3QWYJU3VLQF3LTUF3KXANCNFSM467N7OBQ__;!!HXCxUKc!gHruPhXCbCa9LfLUx8a5mR8Bxuxc8IR7L32vzZHhsRQoz26CnX6o04itwwDvu4M$>.
…---------------------------------------------------------------
Raymond Brock * University Distinguished Professor
Department of Physics and Astronomy, Michigan State University
Adjunct Professor of Physics
Department of Physics, Arizona State University
MSU address:
3210 BPS Building
Michigan State University * East Lansing, MI 48824
sent from: ***@***.******@***.***>
MSU office: (517)353-1693/884-5579
open fax: (517)355-6661
secure fax: (517)351-0688
Vidyo personal room: http://goo.gl/AgiDJ4
CERN Office: 32 2-B03 * 76-71756
|
Beta Was this translation helpful? Give feedback.
-
hi
Thanks. I’m embarrassed to say that I’ve not done that before. I work outside of GitHub, but I used it for learning. It’s probably time to figure that out.
On Jun 23, 2021, at 8:11 AM, AakashGC ***@***.******@***.***>> wrote:
Hi @chipbrock<https://urldefense.com/v3/__https://github.com/chipbrock__;!!HXCxUKc!jb4vL6qywyTh2g3FLUczQsbX_7CB0o5zvgrioEKyEIxKL5XrnQj_W7xIK6sIApo$>, can you share the repo or upload your code in a GitHub repo? so that we can directly replicate the issue.
Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https://github.com/executablebooks/meta/discussions/402*discussioncomment-909760__;Iw!!HXCxUKc!jb4vL6qywyTh2g3FLUczQsbX_7CB0o5zvgrioEKyEIxKL5XrnQj_W7xIFohNgoQ$>, or unsubscribe<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ABCOLTNQOXLPUVNBFDMHPE3TUHFP3ANCNFSM467N7OBQ__;!!HXCxUKc!jb4vL6qywyTh2g3FLUczQsbX_7CB0o5zvgrioEKyEIxKL5XrnQj_W7xI6Rcw_tI$>.
…---------------------------------------------------------------
Raymond Brock * University Distinguished Professor
Department of Physics and Astronomy, Michigan State University
Adjunct Professor of Physics
Department of Physics, Arizona State University
MSU address:
3210 BPS Building
Michigan State University * East Lansing, MI 48824
sent from: ***@***.******@***.***>
MSU office: (517)353-1693/884-5579
open fax: (517)355-6661
secure fax: (517)351-0688
Vidyo personal room: http://goo.gl/AgiDJ4
CERN Office: 32 2-B03 * 76-71756
|
Beta Was this translation helpful? Give feedback.
-
hi
I may have done it. It’s been a mess because I have so many folders with more than 100 files so drag and drop needed to be tended carefully. images may still not load and the config file will maybe call for stuff that’s not in the repo.
https://github.com/chipbrock/QSBB_relativity
let me know if this worked.
thanks
On Jun 23, 2021, at 8:41 AM, AakashGC ***@***.******@***.***>> wrote:
@chipbrock<https://urldefense.com/v3/__https://github.com/chipbrock__;!!HXCxUKc!il6mu9zlHbAqZKRxRDOdkroNjWi2r0cnx_btyV6J3xOe6R07yjVZytgH35W8MMA$> everyone have their first time :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https://github.com/executablebooks/meta/discussions/402*discussioncomment-909925__;Iw!!HXCxUKc!il6mu9zlHbAqZKRxRDOdkroNjWi2r0cnx_btyV6J3xOe6R07yjVZytgHzM3O2Eg$>, or unsubscribe<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ABCOLTM52ZURCNIWFLRSZGLTUHI6BANCNFSM467N7OBQ__;!!HXCxUKc!il6mu9zlHbAqZKRxRDOdkroNjWi2r0cnx_btyV6J3xOe6R07yjVZytgHAr3RfUc$>.
…---------------------------------------------------------------
Raymond Brock * University Distinguished Professor
Department of Physics and Astronomy, Michigan State University
Adjunct Professor of Physics
Department of Physics, Arizona State University
MSU address:
3210 BPS Building
Michigan State University * East Lansing, MI 48824
sent from: ***@***.******@***.***>
MSU office: (517)353-1693/884-5579
open fax: (517)355-6661
secure fax: (517)351-0688
Vidyo personal room: http://goo.gl/AgiDJ4
CERN Office: 32 2-B03 * 76-71756
|
Beta Was this translation helpful? Give feedback.
-
were you able to access it?
On Jun 23, 2021, at 8:41 AM, AakashGC ***@***.******@***.***>> wrote:
@chipbrock<https://urldefense.com/v3/__https://github.com/chipbrock__;!!HXCxUKc!il6mu9zlHbAqZKRxRDOdkroNjWi2r0cnx_btyV6J3xOe6R07yjVZytgH35W8MMA$> everyone have their first time :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https://github.com/executablebooks/meta/discussions/402*discussioncomment-909925__;Iw!!HXCxUKc!il6mu9zlHbAqZKRxRDOdkroNjWi2r0cnx_btyV6J3xOe6R07yjVZytgHzM3O2Eg$>, or unsubscribe<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ABCOLTM52ZURCNIWFLRSZGLTUHI6BANCNFSM467N7OBQ__;!!HXCxUKc!il6mu9zlHbAqZKRxRDOdkroNjWi2r0cnx_btyV6J3xOe6R07yjVZytgHAr3RfUc$>.
…---------------------------------------------------------------
Raymond Brock * University Distinguished Professor
Department of Physics and Astronomy, Michigan State University
Adjunct Professor of Physics
Department of Physics, Arizona State University
MSU address:
3210 BPS Building
Michigan State University * East Lansing, MI 48824
sent from: ***@***.******@***.***>
MSU office: (517)353-1693/884-5579
open fax: (517)355-6661
secure fax: (517)351-0688
Vidyo personal room: http://goo.gl/AgiDJ4
CERN Office: 32 2-B03 * 76-71756
|
Beta Was this translation helpful? Give feedback.
-
I'm converting from R bookdown to Jupyter-books and I have a constant struggle to try to replicate the css that I have used into this project. For example, I prefer serif fonts for easy long-form reading of a textbook and I can make that happen with my own css inside of _static and here's what I use (which is identical to my bookdown text):
p { font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
color: #000000;
font-weight: 500;
font-size: 1.4rem;
line-height: 1.8rem;
margin-top: 1.4rem;
margin-bottom: 1.4rem;
padding-right: 0;
vertical-align: baseline;
}
But. When I do this, the mathematics that's rendered by MathJax is tiny...appropriate to the default formatting of the stock san-serif git-looking css for body the body font.
--> This is only wrong for display math:$$....$$ or $$\begin{align}...\end{align}$$. In-line mathematics is properly formatted with the body.
How can I adjust this so that the math rendering is the same size as my body-text rendering?
I'm actually not sure that css is the proper way to mess with MathJax...I suspect it has to be done in the original <script type="text/x-mathjax-config"> which I have no idea how to modify it properly in Jupyter-books. The js in the bookdown html is quite extensive.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions