|
From: rtoy <rt...@us...> - 2025-10-03 17:16:26
|
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-rework-highlightjs-vars has been created
at d974c31ece4986086fdf6ccbd60cdad160be139e (commit)
- Log -----------------------------------------------------------------
commit d974c31ece4986086fdf6ccbd60cdad160be139e
Author: Raymond Toy <toy...@gm...>
Date: Fri Oct 3 10:15:14 2025 -0700
Add some comments about the variables
It's important that the variables fit on one line. If they aren't the
generated makefile is broken.
diff --git a/configure.ac b/configure.ac
index b3455f3eb..46f0240bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -745,10 +745,17 @@ if test x"${enable_build_docs}" = xtrue ; then
TEXI_EXTRA_TAIL=')'
fi
if test x${syntax_highlighting} = xhighlightjs; then
+ dnl Update HIGHTLIGHT_VER, LIGHTMODE, and DARKMODE
+ dnl variables if we decide to change the version, the light
+ dnl mode style or the dark mode style.
CDN="https://cdnjs.cloudflare.com/ajax/libs/highlight.js"
HIGHLIGHT_VER="11.11.1"
LIGHTMODE="github.min.css"
DARKMODE="github-dark.min.css"
+ dnl Make sure HIGHLIGHT1 and HIGHLIGHT2 are all on one line
+ dnl because these variables are placed in the Makefile and
+ dnl make doesn't support multiple-line variable
+ dnl assignments.
HIGHLIGHT1=$(cat <<EOF
<link rel="stylesheet" media="(prefers-color-scheme: light)" href="$CDN/$HIGHLIGHT_VER/styles/$LIGHTMODE" > <link rel="stylesheet" media="(prefers-color-scheme: dark)" href="$CDN/$HIGHLIGHT_VER/styles/$DARKMODE" > <script src="$CDN/$HIGHLIGHT_VER/highlight.min.js"></script> <script src="$CDN/$HIGHLIGHT_VER/languages/maxima.min.js"></script>
EOF
commit f17a1020bddf14d8ef983dfac36fc9e2d7f9ed08
Author: Raymond Toy <toy...@gm...>
Date: Fri Oct 3 10:08:00 2025 -0700
Rework highlightjs to make it easier read/modify
The variable HIGHLIGHT1 has a lot of redundant stuff. Let's define
some variables to make reading and modifying HIGHGLIGHT1 simpler.
* CDN si the main part of the URL where we're loading
highlightjs from.
* HIGHLIGHT_VER is the version we want to use
* LIGHTMODE is the CSS file we want for light mode display
* DARKMODE is the CSS file we want for dark mode display
Finally, use these variables to define the value of HIGHLIGHT1. To do
this we use `cat` with a `HERE` document to make shell substitution
easier. Otherwise we get into a huge mess of shell-quoting issues
with single- and double-quotes.
diff --git a/configure.ac b/configure.ac
index 2f81ef6fb..b3455f3eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -745,10 +745,15 @@ if test x"${enable_build_docs}" = xtrue ; then
TEXI_EXTRA_TAIL=')'
fi
if test x${syntax_highlighting} = xhighlightjs; then
- HIGHLIGHT1='<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/github.min.css" media="(prefers-color-scheme: light)"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/github-dark.min.css" media="(prefers-color-scheme: dark)"> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/languages/maxima.min.js"> </script>
-'
- HIGHLIGHT2="<script> hljs.configure({languages: [['Maxima']], cssSelector: ${HLJS_CSS_SELECTOR}}); hljs.highlightAll(); </script>
-"
+ CDN="https://cdnjs.cloudflare.com/ajax/libs/highlight.js"
+ HIGHLIGHT_VER="11.11.1"
+ LIGHTMODE="github.min.css"
+ DARKMODE="github-dark.min.css"
+ HIGHLIGHT1=$(cat <<EOF
+<link rel="stylesheet" media="(prefers-color-scheme: light)" href="$CDN/$HIGHLIGHT_VER/styles/$LIGHTMODE" > <link rel="stylesheet" media="(prefers-color-scheme: dark)" href="$CDN/$HIGHLIGHT_VER/styles/$DARKMODE" > <script src="$CDN/$HIGHLIGHT_VER/highlight.min.js"></script> <script src="$CDN/$HIGHLIGHT_VER/languages/maxima.min.js"></script>
+EOF
+)
+ HIGHLIGHT2="<script> hljs.configure({languages: [['Maxima']], cssSelector: ${HLJS_CSS_SELECTOR}}); hljs.highlightAll(); </script>"
fi
if test x${syntax_highlighting} = xpygments; then
if test ${makeinfo_version} -ge 702; then
@@ -761,7 +766,7 @@ if test x"${enable_build_docs}" = xtrue ; then
dnl AC_SUBST(HLJS_CSS_SELECTOR)
AC_SUBST(TEXI_EXTRA_TAIL)
AC_SUBST(HIGHLIGHT1)
- AC_SUBST(HIGHLIGHT2)
+ AC_SUBST(HIGHLIGHT2)
AC_SUBST(USE_PYGMENTS)
TEXI2HTML=texi2html.init
AC_SUBST(TEXI2HTML)
commit 638aa82fc250aea133ce79ac87e8a1efa9f79fab
Author: Raymond Toy <toy...@gm...>
Date: Fri Sep 19 12:46:13 2025 -0700
Run update_examples on one example for integrate_use_rootsof
Apparently we didn't run update_examples on all the examples in
Integration.texi.m4. We missed one exapmle for integrate_use_rootsof.
Regenerate this example which also allows syntax highlighting for this
example.
diff --git a/doc/info/Integration.texi.m4 b/doc/info/Integration.texi.m4
index 4a382dba0..7c55b1abf 100644
--- a/doc/info/Integration.texi.m4
+++ b/doc/info/Integration.texi.m4
@@ -756,7 +756,7 @@ function:
@c integrate_use_rootsof: true$
@c integrate (1/(1+x+x^5), x);
@c ===end===
-@example
+@example maxima
(%i1) integrate_use_rootsof: true$
@group
(%i2) integrate (1/(1+x+x^5), x);
-----------------------------------------------------------------------
hooks/post-receive
--
Maxima CAS
|