From: rtoy <rt...@us...> - 2025-08-21 01:45:47
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Maxima CAS". The branch, rtoy-highlightjs-example-maxima-blocks has been updated via 2348a2e23d7314d4f68121e7e14f1cef2f8f0990 (commit) via 3dce57e60ce7b284df5610b77d3ba2d0d39b07ae (commit) via 16ae1b7a50aa43b2d183582e4b6db05dd81822e0 (commit) via 8edacfceecbdd7ec17c32b26f23d3bb8958213c5 (commit) via 0180fc0c55b281acb60795e458e3f3ebdf74a1b6 (commit) from 96af0cab64113a47adbc622d7ad991ba63044bab (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2348a2e23d7314d4f68121e7e14f1cef2f8f0990 Author: Raymond Toy <toy...@gm...> Date: Wed Aug 20 18:44:59 2025 -0700 Support dark mode too for pygments The color scheme isn't so great, but at least the background for the pygments highlighting matches the example background. diff --git a/doc/info/manual.css b/doc/info/manual.css index 393fe75c8..5bc1f205a 100644 --- a/doc/info/manual.css +++ b/doc/info/manual.css @@ -2,6 +2,11 @@ :root { --example-background-color: rgb(238,238,255); } +@media (prefers-color-scheme: dark) { + :root { + --example-background-color: #aab; + } +} /* Overrides to the default Makeinfo CSS */ div.display {margin-left: 0} @@ -138,7 +143,10 @@ dd { margin-left: 0.5em } pre.example, pre.example-preformatted { border: 1px solid black; color: black; - background-color: #aab; + background-color: var(--example-background-color); + } + div.highlight { + background-color: var(--example-background-color) !important; } div.categorybox { background-color: #544 } div.textbox, div.titlebox, div.synopsisbox { color: black;} commit 3dce57e60ce7b284df5610b77d3ba2d0d39b07ae Author: Raymond Toy <toy...@gm...> Date: Wed Aug 20 18:36:14 2025 -0700 Make the background for pygments to match examples We want to background color for pygments highlighting to match the background used for examples. Otherwise it looks weird. To do this, define a CSS variable `--example-background-color` that is set to the example background color. Use this variable to set the example background and the div highlight class for pygments. diff --git a/doc/info/manual.css b/doc/info/manual.css index 9f0728012..393fe75c8 100644 --- a/doc/info/manual.css +++ b/doc/info/manual.css @@ -1,3 +1,8 @@ +/* Define variable for background color for examples */ +:root { + --example-background-color: rgb(238,238,255); +} + /* Overrides to the default Makeinfo CSS */ div.display {margin-left: 0} div.example { @@ -43,11 +48,20 @@ div.synopsisbox { pre.example, pre.example-preformatted { border: 1px solid rgb(180,180,180); padding: 5px; - background-color: rgb(238,238,255); + background-color: var(--example-background-color); /* Add scrollbar for examples for narrow windows */ overflow: auto } +/* + * For pygments, make the background color of the highlighted code the + * same as the example background color. Without this, it looks funny. + */ + +div.highlight { + background-color: var(--example-background-color) !important; +} + div.spacerbox { border: none; padding: 2em 0 } div.image { margin: 0; padding: 1em; text-align: center } div.categorybox { commit 16ae1b7a50aa43b2d183582e4b6db05dd81822e0 Author: Raymond Toy <toy...@gm...> Date: Wed Aug 20 18:35:46 2025 -0700 Fix typo in error message about pygments Change "to" to "too". diff --git a/configure.ac b/configure.ac index cbbb37cc9..eba6ab9d0 100644 --- a/configure.ac +++ b/configure.ac @@ -754,7 +754,7 @@ if test x"${enable_build_docs}" = xtrue ; then if test ${makeinfo_version} -ge 702; then USE_PYGMENTS=true else - AC_MSG_ERROR([Makeinfo version (${makeinfo_version_string}) to old to use pygments for syntax highlighting. Disable or use highlightjs]) + AC_MSG_ERROR([Makeinfo version (${makeinfo_version_string}) too old to use pygments for syntax highlighting. Disable or use highlightjs]) fi fi AC_SUBST(TEXI_EXTRA_HEAD) commit 8edacfceecbdd7ec17c32b26f23d3bb8958213c5 Merge: 96af0cab6 0180fc0c5 Author: Raymond Toy <toy...@gm...> Date: Mon Aug 18 07:04:11 2025 -0700 Merge branch 'master' into rtoy-highlightjs-example-maxima-blocks ----------------------------------------------------------------------- Summary of changes: configure.ac | 2 +- doc/info/manual.css | 26 ++++++++++++++++++++++++-- tests/rtesthyp.mac | 2 ++ 3 files changed, 27 insertions(+), 3 deletions(-) hooks/post-receive -- Maxima CAS |