|
From: rtoy <rt...@us...> - 2025-11-20 18:15:53
|
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-texi-dev has been created
at 8776caa54f9260b1fe16b969e48c95f72fdf50e2 (commit)
- Log -----------------------------------------------------------------
commit 8776caa54f9260b1fe16b969e48c95f72fdf50e2
Author: Raymond Toy <toy...@gm...>
Date: Thu Nov 20 10:14:31 2025 -0800
Support custom pygments
This means we tell texinfo to use a custom pygments command to do what
we want. This requires that manual.css has the CSS styles we want for
pygments highlighting.
diff --git a/doc/info/build_html.sh.in b/doc/info/build_html.sh.in
index e8736aee4..b01521732 100755
--- a/doc/info/build_html.sh.in
+++ b/doc/info/build_html.sh.in
@@ -198,7 +198,9 @@ if [ -n "@USE_PYGMENTS@" ]; then
SET_HIGHLIGHT="--set-customization-variable HIGHLIGHT_SYNTAX=pygments"
fi
-SET_HIGHLIGHT="-c HIGHLIGHT_SYNTAX='pygmentize -f html -l '"
+if [ -n "@USE_CUSTOM_HILITE@" ]; then
+ SET_CUSTOM=true
+fi
# Currently the Russian documentation has errors in it, so we're just
# going to force makeinfo to build anyway.
@@ -217,14 +219,14 @@ set -x
TEXIOPT="$FORCE --html -c OUTPUT_ENCODING_NAME=UTF-8 -e 10000 --document-lang=$language -I . -I $languagedir --css-ref=manual.css -I ../.. -I @abs_srcdir@/figures --init-file $texiinitfile ${SET_HTML_MATH}"
echo $TEXIOPT
# Show the commands.
-@MAKEINFO@ $FORCE -c HIGHLIGHT_SYNTAX='pygmentize -f html -l %l' --split=chapter --no-node-files --output="$languagedestdir" $TEXIOPT maxima.texi
+@MAKEINFO@ $FORCE ${SET_CUSTOM:+-c HIGHLIGHT_SYNTAX='pygmentize -f html -l %l'} --split=chapter --no-node-files --output="$languagedestdir" $TEXIOPT maxima.texi
rc=$?
if [ $rc -ne 0 ]; then
echo Failed to build multi-page html docs
exit $rc
fi
-@MAKEINFO@ $FORCE -c HIGHLIGHT_SYNTAX='pygmentize -f html -l %l' --no-split --output="$languagedestdir/maxima_singlepage.html" $TEXIOPT maxima.texi
+@MAKEINFO@ $FORCE ${SET_CUSTOM:+-c HIGHLIGHT_SYNTAX='pygmentize -f html -l %l'} --no-split --output="$languagedestdir/maxima_singlepage.html" $TEXIOPT maxima.texi
rc=$?
if [ $rc -ne 0 ]; then
echo Failed to build single page html doc
commit 370f3906f845e3a12d16ca73585d9c2d3da09ae8
Author: Raymond Toy <toy...@gm...>
Date: Thu Nov 20 10:13:30 2025 -0800
Get pygments default and rtt for the styling
The for light mode, use the pygments default. For dark mode, use rrt.
diff --git a/doc/info/manual.css b/doc/info/manual.css
index f2dd627dc..59103443c 100644
--- a/doc/info/manual.css
+++ b/doc/info/manual.css
@@ -166,7 +166,7 @@ dd { margin-left: 0.5em }
}
/*
- * CSS from pygmentize -S paraiso-light -f html
+ * CSS from pygmentize -S default -f html
*/
@media (prefers-color-scheme: light) {
pre { line-height: 125%; }
@@ -174,83 +174,79 @@ dd { margin-left: 0.5em }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
- .hll { background-color: #a39e9b }
- .c { color: #8D8687 } /* Comment */
- .err { color: #EF6155 } /* Error */
- .k { color: #815BA4 } /* Keyword */
- .l { color: #F99B15 } /* Literal */
- .n { color: #2F1E2E } /* Name */
- .o { color: #5BC4BF } /* Operator */
- .p { color: #2F1E2E } /* Punctuation */
- .ch { color: #8D8687 } /* Comment.Hashbang */
- .cm { color: #8D8687 } /* Comment.Multiline */
- .cp { color: #8D8687 } /* Comment.Preproc */
- .cpf { color: #8D8687 } /* Comment.PreprocFile */
- .c1 { color: #8D8687 } /* Comment.Single */
- .cs { color: #8D8687 } /* Comment.Special */
- .gd { color: #EF6155 } /* Generic.Deleted */
+ .hll { background-color: #ffffcc }
+ .c { color: #3D7B7B; font-style: italic } /* Comment */
+ .err { border: 1px solid #F00 } /* Error */
+ .k { color: #008000; font-weight: bold } /* Keyword */
+ .o { color: #666 } /* Operator */
+ .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */
+ .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */
+ .cp { color: #9C6500 } /* Comment.Preproc */
+ .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */
+ .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */
+ .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
+ .gd { color: #A00000 } /* Generic.Deleted */
.ge { font-style: italic } /* Generic.Emph */
.ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
- .gh { color: #2F1E2E; font-weight: bold } /* Generic.Heading */
- .gi { color: #48B685 } /* Generic.Inserted */
- .gp { color: #8D8687; font-weight: bold } /* Generic.Prompt */
+ .gr { color: #E40000 } /* Generic.Error */
+ .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+ .gi { color: #008400 } /* Generic.Inserted */
+ .go { color: #717171 } /* Generic.Output */
+ .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.gs { font-weight: bold } /* Generic.Strong */
- .gu { color: #5BC4BF; font-weight: bold } /* Generic.Subheading */
- .kc { color: #815BA4 } /* Keyword.Constant */
- .kd { color: #815BA4 } /* Keyword.Declaration */
- .kn { color: #5BC4BF } /* Keyword.Namespace */
- .kp { color: #815BA4 } /* Keyword.Pseudo */
- .kr { color: #815BA4 } /* Keyword.Reserved */
- .kt { color: #FEC418 } /* Keyword.Type */
- .ld { color: #48B685 } /* Literal.Date */
- .m { color: #F99B15 } /* Literal.Number */
- .s { color: #48B685 } /* Literal.String */
- .na { color: #06B6EF } /* Name.Attribute */
- .nb { color: #2F1E2E } /* Name.Builtin */
- .nc { color: #FEC418 } /* Name.Class */
- .no { color: #EF6155 } /* Name.Constant */
- .nd { color: #5BC4BF } /* Name.Decorator */
- .ni { color: #2F1E2E } /* Name.Entity */
- .ne { color: #EF6155 } /* Name.Exception */
- .nf { color: #06B6EF } /* Name.Function */
- .nl { color: #2F1E2E } /* Name.Label */
- .nn { color: #FEC418 } /* Name.Namespace */
- .nx { color: #06B6EF } /* Name.Other */
- .py { color: #2F1E2E } /* Name.Property */
- .nt { color: #5BC4BF } /* Name.Tag */
- .nv { color: #EF6155 } /* Name.Variable */
- .ow { color: #5BC4BF } /* Operator.Word */
- .pm { color: #2F1E2E } /* Punctuation.Marker */
- .w { color: #2F1E2E } /* Text.Whitespace */
- .mb { color: #F99B15 } /* Literal.Number.Bin */
- .mf { color: #F99B15 } /* Literal.Number.Float */
- .mh { color: #F99B15 } /* Literal.Number.Hex */
- .mi { color: #F99B15 } /* Literal.Number.Integer */
- .mo { color: #F99B15 } /* Literal.Number.Oct */
- .sa { color: #48B685 } /* Literal.String.Affix */
- .sb { color: #48B685 } /* Literal.String.Backtick */
- .sc { color: #2F1E2E } /* Literal.String.Char */
- .dl { color: #48B685 } /* Literal.String.Delimiter */
- .sd { color: #8D8687 } /* Literal.String.Doc */
- .s2 { color: #48B685 } /* Literal.String.Double */
- .se { color: #F99B15 } /* Literal.String.Escape */
- .sh { color: #48B685 } /* Literal.String.Heredoc */
- .si { color: #F99B15 } /* Literal.String.Interpol */
- .sx { color: #48B685 } /* Literal.String.Other */
- .sr { color: #48B685 } /* Literal.String.Regex */
- .s1 { color: #48B685 } /* Literal.String.Single */
- .ss { color: #48B685 } /* Literal.String.Symbol */
- .bp { color: #2F1E2E } /* Name.Builtin.Pseudo */
- .fm { color: #06B6EF } /* Name.Function.Magic */
- .vc { color: #EF6155 } /* Name.Variable.Class */
- .vg { color: #EF6155 } /* Name.Variable.Global */
- .vi { color: #EF6155 } /* Name.Variable.Instance */
- .vm { color: #EF6155 } /* Name.Variable.Magic */
- .il { color: #F99B15 } /* Literal.Number.Integer.Long */
+ .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+ .gt { color: #04D } /* Generic.Traceback */
+ .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
+ .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
+ .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
+ .kp { color: #008000 } /* Keyword.Pseudo */
+ .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
+ .kt { color: #B00040 } /* Keyword.Type */
+ .m { color: #666 } /* Literal.Number */
+ .s { color: #BA2121 } /* Literal.String */
+ .na { color: #687822 } /* Name.Attribute */
+ .nb { color: #008000 } /* Name.Builtin */
+ .nc { color: #00F; font-weight: bold } /* Name.Class */
+ .no { color: #800 } /* Name.Constant */
+ .nd { color: #A2F } /* Name.Decorator */
+ .ni { color: #717171; font-weight: bold } /* Name.Entity */
+ .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
+ .nf { color: #00F } /* Name.Function */
+ .nl { color: #767600 } /* Name.Label */
+ .nn { color: #00F; font-weight: bold } /* Name.Namespace */
+ .nt { color: #008000; font-weight: bold } /* Name.Tag */
+ .nv { color: #19177C } /* Name.Variable */
+ .ow { color: #A2F; font-weight: bold } /* Operator.Word */
+ .w { color: #BBB } /* Text.Whitespace */
+ .mb { color: #666 } /* Literal.Number.Bin */
+ .mf { color: #666 } /* Literal.Number.Float */
+ .mh { color: #666 } /* Literal.Number.Hex */
+ .mi { color: #666 } /* Literal.Number.Integer */
+ .mo { color: #666 } /* Literal.Number.Oct */
+ .sa { color: #BA2121 } /* Literal.String.Affix */
+ .sb { color: #BA2121 } /* Literal.String.Backtick */
+ .sc { color: #BA2121 } /* Literal.String.Char */
+ .dl { color: #BA2121 } /* Literal.String.Delimiter */
+ .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
+ .s2 { color: #BA2121 } /* Literal.String.Double */
+ .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */
+ .sh { color: #BA2121 } /* Literal.String.Heredoc */
+ .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */
+ .sx { color: #008000 } /* Literal.String.Other */
+ .sr { color: #A45A77 } /* Literal.String.Regex */
+ .s1 { color: #BA2121 } /* Literal.String.Single */
+ .ss { color: #19177C } /* Literal.String.Symbol */
+ .bp { color: #008000 } /* Name.Builtin.Pseudo */
+ .fm { color: #00F } /* Name.Function.Magic */
+ .vc { color: #19177C } /* Name.Variable.Class */
+ .vg { color: #19177C } /* Name.Variable.Global */
+ .vi { color: #19177C } /* Name.Variable.Instance */
+ .vm { color: #19177C } /* Name.Variable.Magic */
+ .il { color: #666 } /* Literal.Number.Integer.Long */
}
/*
- * CSS from pygmentize -S paraiso-dark -f html
+ * CSS from pygmentize -S rrt -f html
*/
@media (prefers-color-scheme: dark) {
pre { line-height: 125%; }
@@ -258,77 +254,83 @@ dd { margin-left: 0.5em }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
- .hll { background-color: #4f424c }
- .c { color: #776E71 } /* Comment */
- .err { color: #EF6155 } /* Error */
- .k { color: #815BA4 } /* Keyword */
- .l { color: #F99B15 } /* Literal */
- .n { color: #E7E9DB } /* Name */
- .o { color: #5BC4BF } /* Operator */
- .p { color: #E7E9DB } /* Punctuation */
- .ch { color: #776E71 } /* Comment.Hashbang */
- .cm { color: #776E71 } /* Comment.Multiline */
- .cp { color: #776E71 } /* Comment.Preproc */
- .cpf { color: #776E71 } /* Comment.PreprocFile */
- .c1 { color: #776E71 } /* Comment.Single */
- .cs { color: #776E71 } /* Comment.Special */
- .gd { color: #EF6155 } /* Generic.Deleted */
- .ge { font-style: italic } /* Generic.Emph */
- .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
- .gh { color: #E7E9DB; font-weight: bold } /* Generic.Heading */
- .gi { color: #48B685 } /* Generic.Inserted */
- .gp { color: #776E71; font-weight: bold } /* Generic.Prompt */
- .gs { font-weight: bold } /* Generic.Strong */
- .gu { color: #5BC4BF; font-weight: bold } /* Generic.Subheading */
- .kc { color: #815BA4 } /* Keyword.Constant */
- .kd { color: #815BA4 } /* Keyword.Declaration */
- .kn { color: #5BC4BF } /* Keyword.Namespace */
- .kp { color: #815BA4 } /* Keyword.Pseudo */
- .kr { color: #815BA4 } /* Keyword.Reserved */
- .kt { color: #FEC418 } /* Keyword.Type */
- .ld { color: #48B685 } /* Literal.Date */
- .m { color: #F99B15 } /* Literal.Number */
- .s { color: #48B685 } /* Literal.String */
- .na { color: #06B6EF } /* Name.Attribute */
- .nb { color: #E7E9DB } /* Name.Builtin */
- .nc { color: #FEC418 } /* Name.Class */
- .no { color: #EF6155 } /* Name.Constant */
- .nd { color: #5BC4BF } /* Name.Decorator */
- .ni { color: #E7E9DB } /* Name.Entity */
- .ne { color: #EF6155 } /* Name.Exception */
- .nf { color: #06B6EF } /* Name.Function */
- .nl { color: #E7E9DB } /* Name.Label */
- .nn { color: #FEC418 } /* Name.Namespace */
- .nx { color: #06B6EF } /* Name.Other */
- .py { color: #E7E9DB } /* Name.Property */
- .nt { color: #5BC4BF } /* Name.Tag */
- .nv { color: #EF6155 } /* Name.Variable */
- .ow { color: #5BC4BF } /* Operator.Word */
- .pm { color: #E7E9DB } /* Punctuation.Marker */
- .w { color: #E7E9DB } /* Text.Whitespace */
- .mb { color: #F99B15 } /* Literal.Number.Bin */
- .mf { color: #F99B15 } /* Literal.Number.Float */
- .mh { color: #F99B15 } /* Literal.Number.Hex */
- .mi { color: #F99B15 } /* Literal.Number.Integer */
- .mo { color: #F99B15 } /* Literal.Number.Oct */
- .sa { color: #48B685 } /* Literal.String.Affix */
- .sb { color: #48B685 } /* Literal.String.Backtick */
- .sc { color: #E7E9DB } /* Literal.String.Char */
- .dl { color: #48B685 } /* Literal.String.Delimiter */
- .sd { color: #776E71 } /* Literal.String.Doc */
- .s2 { color: #48B685 } /* Literal.String.Double */
- .se { color: #F99B15 } /* Literal.String.Escape */
- .sh { color: #48B685 } /* Literal.String.Heredoc */
- .si { color: #F99B15 } /* Literal.String.Interpol */
- .sx { color: #48B685 } /* Literal.String.Other */
- .sr { color: #48B685 } /* Literal.String.Regex */
- .s1 { color: #48B685 } /* Literal.String.Single */
- .ss { color: #48B685 } /* Literal.String.Symbol */
- .bp { color: #E7E9DB } /* Name.Builtin.Pseudo */
- .fm { color: #06B6EF } /* Name.Function.Magic */
- .vc { color: #EF6155 } /* Name.Variable.Class */
- .vg { color: #EF6155 } /* Name.Variable.Global */
- .vi { color: #EF6155 } /* Name.Variable.Instance */
- .vm { color: #EF6155 } /* Name.Variable.Magic */
- .il { color: #F99B15 } /* Literal.Number.Integer.Long */
+ .hll { background-color: #0000ff }
+ .c { color: #0F0 } /* Comment */
+ .err { color: #DDD } /* Error */
+ .esc { color: #DDD } /* Escape */
+ .g { color: #DDD } /* Generic */
+ .k { color: #F00 } /* Keyword */
+ .l { color: #DDD } /* Literal */
+ .n { color: #DDD } /* Name */
+ .o { color: #DDD } /* Operator */
+ .x { color: #DDD } /* Other */
+ .p { color: #DDD } /* Punctuation */
+ .ch { color: #0F0 } /* Comment.Hashbang */
+ .cm { color: #0F0 } /* Comment.Multiline */
+ .cp { color: #E5E5E5 } /* Comment.Preproc */
+ .cpf { color: #0F0 } /* Comment.PreprocFile */
+ .c1 { color: #0F0 } /* Comment.Single */
+ .cs { color: #0F0 } /* Comment.Special */
+ .gd { color: #DDD } /* Generic.Deleted */
+ .ge { color: #DDD } /* Generic.Emph */
+ .ges { color: #DDD } /* Generic.EmphStrong */
+ .gr { color: #DDD } /* Generic.Error */
+ .gh { color: #DDD } /* Generic.Heading */
+ .gi { color: #DDD } /* Generic.Inserted */
+ .go { color: #DDD } /* Generic.Output */
+ .gp { color: #DDD } /* Generic.Prompt */
+ .gs { color: #DDD } /* Generic.Strong */
+ .gu { color: #DDD } /* Generic.Subheading */
+ .gt { color: #DDD } /* Generic.Traceback */
+ .kc { color: #F00 } /* Keyword.Constant */
+ .kd { color: #F00 } /* Keyword.Declaration */
+ .kn { color: #F00 } /* Keyword.Namespace */
+ .kp { color: #F00 } /* Keyword.Pseudo */
+ .kr { color: #F00 } /* Keyword.Reserved */
+ .kt { color: #EE82EE } /* Keyword.Type */
+ .ld { color: #DDD } /* Literal.Date */
+ .m { color: #F0F } /* Literal.Number */
+ .s { color: #87CEEB } /* Literal.String */
+ .na { color: #DDD } /* Name.Attribute */
+ .nb { color: #DDD } /* Name.Builtin */
+ .nc { color: #DDD } /* Name.Class */
+ .no { color: #7FFFD4 } /* Name.Constant */
+ .nd { color: #DDD } /* Name.Decorator */
+ .ni { color: #DDD } /* Name.Entity */
+ .ne { color: #DDD } /* Name.Exception */
+ .nf { color: #FF0 } /* Name.Function */
+ .nl { color: #DDD } /* Name.Label */
+ .nn { color: #DDD } /* Name.Namespace */
+ .nx { color: #DDD } /* Name.Other */
+ .py { color: #DDD } /* Name.Property */
+ .nt { color: #DDD } /* Name.Tag */
+ .nv { color: #EEDD82 } /* Name.Variable */
+ .ow { color: #F00 } /* Operator.Word */
+ .pm { color: #DDD } /* Punctuation.Marker */
+ .w { color: #DDD } /* Text.Whitespace */
+ .mb { color: #F0F } /* Literal.Number.Bin */
+ .mf { color: #F0F } /* Literal.Number.Float */
+ .mh { color: #F0F } /* Literal.Number.Hex */
+ .mi { color: #F0F } /* Literal.Number.Integer */
+ .mo { color: #F0F } /* Literal.Number.Oct */
+ .sa { color: #87CEEB } /* Literal.String.Affix */
+ .sb { color: #87CEEB } /* Literal.String.Backtick */
+ .sc { color: #87CEEB } /* Literal.String.Char */
+ .dl { color: #87CEEB } /* Literal.String.Delimiter */
+ .sd { color: #87CEEB } /* Literal.String.Doc */
+ .s2 { color: #87CEEB } /* Literal.String.Double */
+ .se { color: #87CEEB } /* Literal.String.Escape */
+ .sh { color: #87CEEB } /* Literal.String.Heredoc */
+ .si { color: #87CEEB } /* Literal.String.Interpol */
+ .sx { color: #87CEEB } /* Literal.String.Other */
+ .sr { color: #87CEEB } /* Literal.String.Regex */
+ .s1 { color: #87CEEB } /* Literal.String.Single */
+ .ss { color: #87CEEB } /* Literal.String.Symbol */
+ .bp { color: #DDD } /* Name.Builtin.Pseudo */
+ .fm { color: #FF0 } /* Name.Function.Magic */
+ .vc { color: #EEDD82 } /* Name.Variable.Class */
+ .vg { color: #EEDD82 } /* Name.Variable.Global */
+ .vi { color: #EEDD82 } /* Name.Variable.Instance */
+ .vm { color: #EEDD82 } /* Name.Variable.Magic */
+ .il { color: #F0F } /* Literal.Number.Integer.Long */
}
commit 06f23988d67490e9a814738f47ce5e42fe377791
Author: Raymond Toy <toy...@gm...>
Date: Thu Nov 20 10:11:45 2025 -0800
Add support for custom-pygments for syntax highlighting
custom-pygments basically means we tell texinfo to run pygmentize such
that we need to use CSS to set the colors. This updates the
appropriate configure variables to tell build_html.sh what to do.
diff --git a/configure.ac b/configure.ac
index 6f655566b..10962016d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -662,18 +662,19 @@ AC_ARG_ENABLE(syntax-highlighting,
[case "${enableval}" in
yes|highlightjs) syntax_highlighting=highlightjs ;;
pygments) syntax_highlighting=pygments ;;
+ custom-pygments) syntax_highlighting=custom-pygments ;;
no) syntax_highlighting=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-syntax-highlighting) ;;
esac],
[syntax_highlighting=false])
-AS_IF([test "x$syntax_highlighting" = "xpygments"],
+AS_IF([test "x$syntax_highlighting" = "xpygments" || test "xsyntax_highlighting" = "xcustom-pygments"],
[AC_CHECK_PROG([pygmentize_found], [pygmentize],
true,
false)
AS_IF([test "x$pygmetize_found" = "xfalse"],
AC_MSG_FAILURE(
- [--enable-syntax-highlighting set to "pygments" but pygmentize not found]))])
+ [--enable-syntax-highlighting set to "pygments" or "custom-pygments" but pygmentize not found]))])
AM_CONDITIONAL(ENABLE_BUILD_DOCS, test x$enable_build_docs = xtrue)
@@ -890,7 +891,7 @@ EOF
AC_MSG_ERROR([Makeinfo version (${makeinfo_version_string}) too old to use pygments for syntax highlighting. Disable or use highlightjs])
fi
fi
- if test x${syntax_highlighting} = xcustom; then
+ if test x${syntax_highlighting} = "xcustom-pygments"; then
USE_CUSTOM_HILITE=true
fi
AC_SUBST(TEXI_EXTRA_HEAD)
commit 108537d1587dd7737eb95eb96335959828fff1ce
Author: Raymond Toy <toy...@gm...>
Date: Thu Nov 20 09:55:37 2025 -0800
Print the version out again; add some comments
We accidentally deleted makeinfo_version_string that was used for
messages. Reconstitute it.
Comment out the echo statements in extract_version_from that we don't
want.
Add a comment that Gemini created the shell function.
diff --git a/configure.ac b/configure.ac
index a3019bae2..6f655566b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -694,6 +694,9 @@ Or disable building of the docs using
fi
fi
+dnl This function was created by Gemini because I was too lazy to
+dnl figure this out myself.
+
# Description: Extracts and separates the components (N, M, P, and 'dev' suffix)
# from version strings and sets them as global shell variables.
# This version uses only basic POSIX shell features, including the
@@ -729,7 +732,7 @@ extract_version_from() {
return 1
fi
- echo "--- Parsing: \"$input_string\" ---"
+ # echo "--- Parsing: \"$input_string\" ---"
full_version=""
temp_match=""
@@ -752,7 +755,7 @@ extract_version_from() {
VERSION_M=$(echo "$full_version" | sed 's/dev$//' | cut -d'.' -f2)
VERSION_SUFFIX="dev"
- echo "Found: ${VERSION_N}.${VERSION_M}${VERSION_SUFFIX}. Variables set globally."
+ # echo "Found: ${VERSION_N}.${VERSION_M}${VERSION_SUFFIX}. Variables set globally."
else
# PRIORITY 2: Try to extract N.M.P format (three components)
@@ -815,14 +818,19 @@ if test x"${enable_build_docs}" = xtrue ; then
dnl Extract the version number from makeinfo
extract_version_from "`$MAKEINFO --version | head -1`"
- makeinfo_major="$VERSION_N"
- makeinfo_minor="$VERSION_M"
+ makeinfo_major="${VERSION_N}"
+ makeinfo_minor="${VERSION_M}"
makeinfo_patch="${VERSION_P}"
+ makeinfo_version_string="${VERSION_N}.${VERSION_M}"
dnl Treat a suffix of dev as being patch 99.
- if test -n "$VERSION_SUFFIX"; then
+ if test -n "${VERSION_SUFFIX}"; then
makeinfo_patch=99
+ makeinfo_version_string="${makeinfo_version_string}${VERSION_SUFFIX}"
+ else
+ makeinfo_version_string="${makeinfo_version_string}${VERSION_P}"
fi
+ dnl echo string ${makeinfo_version_string}
dnl echo major ${makeinfo_major}
dnl echo minor ${makeinfo_minor}
dnl echo patch ${makeinfo_patch}
commit 3084c19b9b88216d0ac28c8879c788efbb5ec450
Author: Raymond Toy <toy...@gm...>
Date: Thu Nov 20 09:40:14 2025 -0800
Add shell function to extract makeinfo version number
Development versions of texinfo have a version like "7.2dev". Add a
shell function that can extract version numbers of the form 7.1,
7.1.1, and 7.2dev. A "dev" suffix is treated as a patch version of
99.
Use the shell function to extract the version. Compute a version
number from the major, minor, and patch version. Update the version
number tests to account for the fact that we have a patch version too.
diff --git a/configure.ac b/configure.ac
index 14c3f0d9e..a3019bae2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -694,6 +694,114 @@ Or disable building of the docs using
fi
fi
+# Description: Extracts and separates the components (N, M, P, and 'dev' suffix)
+# from version strings and sets them as global shell variables.
+# This version uses only basic POSIX shell features, including the
+# 'test' command for all conditionals, and avoids Bash-specific
+# constructs like 'local', arrays, '[[ ... ]]', and the 'grep -o' option.
+#
+# Patterns supported:
+# 1. N.M.P (e.g., 5.2.10)
+# 2. N.M (e.g., 5.2, P defaults to 0)
+# 3. N.Mdev (e.g., 5.2dev, P defaults to 0)
+#
+
+VERSION_N=""
+VERSION_M=""
+VERSION_P=""
+VERSION_SUFFIX=""
+
+extract_version_from() {
+ # NOTE: All variables defined here (input_string, full_version, etc.)
+ # will be set globally due to the absence of 'local'.
+
+ input_string="$1"
+
+ # 1. Clear global version variables for a clean start
+ VERSION_N=""
+ VERSION_M=""
+ VERSION_P=""
+ VERSION_SUFFIX=""
+
+ # Check for empty input using 'test'
+ if test -z "$input_string"; then
+ echo "Error: No input string provided." >&2
+ return 1
+ fi
+
+ echo "--- Parsing: \"$input_string\" ---"
+
+ full_version=""
+ temp_match=""
+
+
+ # PRIORITY 1: Try to extract the N.Mdev format (most specific)
+ # Basic RegEx pattern supports multi-digit N and M: [[0-9]][[0-9]]*\.[[0-9]][[0-9]]*dev
+ temp_match=$(echo "$input_string" | grep '[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*dev' | head -n 1)
+
+ # Check if a dev version was found using 'test'
+ if test -n "$temp_match"; then
+ # Case 1: N.Mdev format found
+
+ # Use sed to isolate the captured pattern: .* (junk before) (\(capture\)) .* (junk after)
+ full_version=$(echo "$temp_match" | sed 's/.*\([[0-9]][[0-9]]*\.[[0-9]][[0-9]]*dev\).*/\1/')
+
+ # Set global variables
+ VERSION_N=$(echo "$full_version" | cut -d'.' -f1)
+ # Remove 'dev' before cutting the minor version
+ VERSION_M=$(echo "$full_version" | sed 's/dev$//' | cut -d'.' -f2)
+ VERSION_SUFFIX="dev"
+
+ echo "Found: ${VERSION_N}.${VERSION_M}${VERSION_SUFFIX}. Variables set globally."
+
+ else
+ # PRIORITY 2: Try to extract N.M.P format (three components)
+ # Pattern for multi-digit N.M.P
+ temp_match=$(echo "$input_string" | grep '[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*' | head -n 1)
+
+ # Check if N.M.P was found using 'test'
+ if test -n "$temp_match"; then
+ # Case 2a: N.M.P found. Isolate it with sed.
+ full_version=$(echo "$temp_match" | sed 's/.*\([[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\).*/\1/')
+ else
+ # PRIORITY 3: If N.M.P not found, try to extract N.M format (two components)
+ # Pattern for multi-digit N.M
+ temp_match=$(echo "$input_string" | grep '[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*' | head -n 1)
+
+ # Check if N.M was found using 'test'
+ if test -n "$temp_match"; then
+ # Case 2b: N.M found. Isolate it with sed.
+ full_version=$(echo "$temp_match" | sed 's/.*\([[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\).*/\1/')
+ fi
+ fi
+
+ # Check if any version was successfully isolated
+ if test -z "$full_version"; then
+ echo "Error: No matching version number found in: \"$input_string\"" >&2
+ return 1
+ fi
+
+ # Case 2: N.M.P or N.M format found
+
+ # Set global variables
+ VERSION_N=$(echo "$full_version" | cut -d'.' -f1)
+ VERSION_M=$(echo "$full_version" | cut -d'.' -f2)
+ P_raw=$(echo "$full_version" | cut -d'.' -f3)
+ VERSION_P=${P_raw:-0} # Default P to 0 if not present
+ VERSION_SUFFIX="" # Ensure suffix is cleared
+
+ display_version="${VERSION_N}.${VERSION_M}"
+ # Use 'test' command for comparison
+ if test "$VERSION_P" != "0"; then
+ display_version="${display_version}.${VERSION_P}"
+ fi
+
+ echo "Found: ${display_version}. Variables set globally."
+ fi
+
+ return 0
+}
+
if test x"${enable_build_docs}" = xtrue ; then
if test x"${makeinfo_found}" = xfalse ; then
AC_MSG_ERROR(No makeinfo found; consider --disable-build-docs)
@@ -704,29 +812,30 @@ if test x"${enable_build_docs}" = xtrue ; then
makeinfo_old=false
if test x"${makeinfo_found}" = xtrue; then
AC_MSG_CHECKING([if makeinfo version >= 5.1])
- dnl expr is looking for something like "junk<digits-or-dots>"
- dnl assuming that the end of the version string contains the
- dnl version number consisting of digits separated by a period.
- dnl This allows for version numbers like 6.8.90.
- makeinfo_version_string=`expr "\`$MAKEINFO --version | head -1\`" : '.* \([[.0-9]][[.0-9]]*\)'`
- dnl echo Makeinfo version ${makeinfo_version}
-
- dnl From makeinfo_version, extract out the major and minor
- dnl version numbers. We only need the major and minor version
- dnl numbers.
- makeinfo_major=`expr $makeinfo_version_string : '\([[0-9]][[0-9]]*\)'`
- makeinfo_minor=`expr $makeinfo_version_string : '[[0-9]][[0-9]]*\.\([[0-9]][[0-9]]*\)'`
+ dnl Extract the version number from makeinfo
+ extract_version_from "`$MAKEINFO --version | head -1`"
+
+ makeinfo_major="$VERSION_N"
+ makeinfo_minor="$VERSION_M"
+ makeinfo_patch="${VERSION_P}"
+ dnl Treat a suffix of dev as being patch 99.
+ if test -n "$VERSION_SUFFIX"; then
+ makeinfo_patch=99
+ fi
+
dnl echo major ${makeinfo_major}
dnl echo minor ${makeinfo_minor}
+ dnl echo patch ${makeinfo_patch}
dnl Create a numerical version number by multiplying the major
- dnl version by 100 and adding the minor version. This assumes
- dnl the minor version is always less than or equal to 99.
- makeinfo_version=`expr ${makeinfo_major} \* 100 \+ ${makeinfo_minor}`
+ dnl version by 1000 and adding the 100 times minor version and
+ dnl adding the patch version. This assumes the minor and
+ dnl patch version is always less than or equal to 99.
+ makeinfo_version=`expr ${makeinfo_major} \* 10000 \+ ${makeinfo_minor} \* 100 \+ ${makeinfo_patch}`
dnl If version is older than 5.1, it's too old for generating
dnl maxima docs.
- if test ${makeinfo_version} -lt 501; then
+ if test ${makeinfo_version} -lt 50100; then
AC_MSG_ERROR([Makeinfo version (${makeinfo_version_string}) too old; consider --disable-build-docs])
else
AC_MSG_RESULT([${makeinfo_version_string} (6.8 or later preferred)])
@@ -735,7 +844,7 @@ if test x"${enable_build_docs}" = xtrue ; then
dnl Enable JS highlighting of examples in the HTML docs.
dnl The API has changed between 6.8 and 7.0, so we need to substitute the
dnl the appropriate things.
- if test ${makeinfo_version} -le 608; then
+ if test ${makeinfo_version} -le 60800; then
TEXI_EXTRA_HEAD='$options->{"EXTRA_HEAD"} = '
HLJS_CSS_SELECTOR="'pre.example'"
TEXI_EXTRA_TAIL=''
@@ -767,24 +876,21 @@ 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
+ if test ${makeinfo_version} -ge 70200; then
USE_PYGMENTS=true
else
AC_MSG_ERROR([Makeinfo version (${makeinfo_version_string}) too old to use pygments for syntax highlighting. Disable or use highlightjs])
fi
fi
- if test x${syntax_highlighting} = xpygments; then
- if test ${makeinfo_version} -ge 702; then
- USE_PYGMENTS=true
- else
- AC_MSG_ERROR([Makeinfo version (${makeinfo_version_string}) too old to use pygments for syntax highlighting. Disable or use highlightjs])
- fi
+ if test x${syntax_highlighting} = xcustom; then
+ USE_CUSTOM_HILITE=true
fi
AC_SUBST(TEXI_EXTRA_HEAD)
AC_SUBST(TEXI_EXTRA_TAIL)
AC_SUBST(HIGHLIGHT1)
AC_SUBST(HIGHLIGHT2)
AC_SUBST(USE_PYGMENTS)
+ AC_SUBST(USE_CUSTOM_HILITE)
TEXI2HTML=texi2html.init
AC_SUBST(TEXI2HTML)
@@ -792,7 +898,7 @@ EOF
dnl need to include MathJax ourselves when building the HTML
dnl files.
need_mathjax=false
- if test ${makeinfo_version} -le 608; then
+ if test ${makeinfo_version} -le 60800; then
need_mathjax=true
fi
if test x"${need_mathjax}" = xtrue; then
commit 752545378717656a4777d545d13f65dc441f9555
Author: Raymond Toy <toy...@gm...>
Date: Wed Nov 19 15:24:42 2025 -0800
First cut at using new texinfo custom highlighter.
WIP. This is incomplete, but it mostly works.
diff --git a/doc/info/build_html.sh.in b/doc/info/build_html.sh.in
index ee8940688..e8736aee4 100755
--- a/doc/info/build_html.sh.in
+++ b/doc/info/build_html.sh.in
@@ -198,6 +198,8 @@ if [ -n "@USE_PYGMENTS@" ]; then
SET_HIGHLIGHT="--set-customization-variable HIGHLIGHT_SYNTAX=pygments"
fi
+SET_HIGHLIGHT="-c HIGHLIGHT_SYNTAX='pygmentize -f html -l '"
+
# Currently the Russian documentation has errors in it, so we're just
# going to force makeinfo to build anyway.
#
@@ -211,17 +213,18 @@ fi
# There should be no errors in the texi files so don't use "--force -e
# 10000" to force building the docs. We want to fail building if
# there are errors now.
-TEXIOPT="$FORCE --html -c OUTPUT_ENCODING_NAME=UTF-8 -e 10000 --document-lang=$language -I . -I $languagedir --css-ref=manual.css -I ../.. -I @abs_srcdir@/figures --init-file $texiinitfile ${SET_HTML_MATH} ${SET_HIGHLIGHT}"
-# Show the commands.
set -x
-@MAKEINFO@ $FORCE --split=chapter --no-node-files --output="$languagedestdir" $TEXIOPT maxima.texi
+TEXIOPT="$FORCE --html -c OUTPUT_ENCODING_NAME=UTF-8 -e 10000 --document-lang=$language -I . -I $languagedir --css-ref=manual.css -I ../.. -I @abs_srcdir@/figures --init-file $texiinitfile ${SET_HTML_MATH}"
+echo $TEXIOPT
+# Show the commands.
+@MAKEINFO@ $FORCE -c HIGHLIGHT_SYNTAX='pygmentize -f html -l %l' --split=chapter --no-node-files --output="$languagedestdir" $TEXIOPT maxima.texi
rc=$?
if [ $rc -ne 0 ]; then
echo Failed to build multi-page html docs
exit $rc
fi
-@MAKEINFO@ $FORCE --no-split --output="$languagedestdir/maxima_singlepage.html" $TEXIOPT maxima.texi
+@MAKEINFO@ $FORCE -c HIGHLIGHT_SYNTAX='pygmentize -f html -l %l' --no-split --output="$languagedestdir/maxima_singlepage.html" $TEXIOPT maxima.texi
rc=$?
if [ $rc -ne 0 ]; then
echo Failed to build single page html doc
diff --git a/doc/info/manual.css b/doc/info/manual.css
index c65a29667..f2dd627dc 100644
--- a/doc/info/manual.css
+++ b/doc/info/manual.css
@@ -164,3 +164,171 @@ dd { margin-left: 0.5em }
*/
line-height: normal !important;
}
+
+/*
+ * CSS from pygmentize -S paraiso-light -f html
+ */
+@media (prefers-color-scheme: light) {
+ pre { line-height: 125%; }
+ td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
+ span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
+ td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
+ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
+ .hll { background-color: #a39e9b }
+ .c { color: #8D8687 } /* Comment */
+ .err { color: #EF6155 } /* Error */
+ .k { color: #815BA4 } /* Keyword */
+ .l { color: #F99B15 } /* Literal */
+ .n { color: #2F1E2E } /* Name */
+ .o { color: #5BC4BF } /* Operator */
+ .p { color: #2F1E2E } /* Punctuation */
+ .ch { color: #8D8687 } /* Comment.Hashbang */
+ .cm { color: #8D8687 } /* Comment.Multiline */
+ .cp { color: #8D8687 } /* Comment.Preproc */
+ .cpf { color: #8D8687 } /* Comment.PreprocFile */
+ .c1 { color: #8D8687 } /* Comment.Single */
+ .cs { color: #8D8687 } /* Comment.Special */
+ .gd { color: #EF6155 } /* Generic.Deleted */
+ .ge { font-style: italic } /* Generic.Emph */
+ .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
+ .gh { color: #2F1E2E; font-weight: bold } /* Generic.Heading */
+ .gi { color: #48B685 } /* Generic.Inserted */
+ .gp { color: #8D8687; font-weight: bold } /* Generic.Prompt */
+ .gs { font-weight: bold } /* Generic.Strong */
+ .gu { color: #5BC4BF; font-weight: bold } /* Generic.Subheading */
+ .kc { color: #815BA4 } /* Keyword.Constant */
+ .kd { color: #815BA4 } /* Keyword.Declaration */
+ .kn { color: #5BC4BF } /* Keyword.Namespace */
+ .kp { color: #815BA4 } /* Keyword.Pseudo */
+ .kr { color: #815BA4 } /* Keyword.Reserved */
+ .kt { color: #FEC418 } /* Keyword.Type */
+ .ld { color: #48B685 } /* Literal.Date */
+ .m { color: #F99B15 } /* Literal.Number */
+ .s { color: #48B685 } /* Literal.String */
+ .na { color: #06B6EF } /* Name.Attribute */
+ .nb { color: #2F1E2E } /* Name.Builtin */
+ .nc { color: #FEC418 } /* Name.Class */
+ .no { color: #EF6155 } /* Name.Constant */
+ .nd { color: #5BC4BF } /* Name.Decorator */
+ .ni { color: #2F1E2E } /* Name.Entity */
+ .ne { color: #EF6155 } /* Name.Exception */
+ .nf { color: #06B6EF } /* Name.Function */
+ .nl { color: #2F1E2E } /* Name.Label */
+ .nn { color: #FEC418 } /* Name.Namespace */
+ .nx { color: #06B6EF } /* Name.Other */
+ .py { color: #2F1E2E } /* Name.Property */
+ .nt { color: #5BC4BF } /* Name.Tag */
+ .nv { color: #EF6155 } /* Name.Variable */
+ .ow { color: #5BC4BF } /* Operator.Word */
+ .pm { color: #2F1E2E } /* Punctuation.Marker */
+ .w { color: #2F1E2E } /* Text.Whitespace */
+ .mb { color: #F99B15 } /* Literal.Number.Bin */
+ .mf { color: #F99B15 } /* Literal.Number.Float */
+ .mh { color: #F99B15 } /* Literal.Number.Hex */
+ .mi { color: #F99B15 } /* Literal.Number.Integer */
+ .mo { color: #F99B15 } /* Literal.Number.Oct */
+ .sa { color: #48B685 } /* Literal.String.Affix */
+ .sb { color: #48B685 } /* Literal.String.Backtick */
+ .sc { color: #2F1E2E } /* Literal.String.Char */
+ .dl { color: #48B685 } /* Literal.String.Delimiter */
+ .sd { color: #8D8687 } /* Literal.String.Doc */
+ .s2 { color: #48B685 } /* Literal.String.Double */
+ .se { color: #F99B15 } /* Literal.String.Escape */
+ .sh { color: #48B685 } /* Literal.String.Heredoc */
+ .si { color: #F99B15 } /* Literal.String.Interpol */
+ .sx { color: #48B685 } /* Literal.String.Other */
+ .sr { color: #48B685 } /* Literal.String.Regex */
+ .s1 { color: #48B685 } /* Literal.String.Single */
+ .ss { color: #48B685 } /* Literal.String.Symbol */
+ .bp { color: #2F1E2E } /* Name.Builtin.Pseudo */
+ .fm { color: #06B6EF } /* Name.Function.Magic */
+ .vc { color: #EF6155 } /* Name.Variable.Class */
+ .vg { color: #EF6155 } /* Name.Variable.Global */
+ .vi { color: #EF6155 } /* Name.Variable.Instance */
+ .vm { color: #EF6155 } /* Name.Variable.Magic */
+ .il { color: #F99B15 } /* Literal.Number.Integer.Long */
+}
+
+/*
+ * CSS from pygmentize -S paraiso-dark -f html
+ */
+@media (prefers-color-scheme: dark) {
+ pre { line-height: 125%; }
+ td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
+ span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
+ td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
+ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
+ .hll { background-color: #4f424c }
+ .c { color: #776E71 } /* Comment */
+ .err { color: #EF6155 } /* Error */
+ .k { color: #815BA4 } /* Keyword */
+ .l { color: #F99B15 } /* Literal */
+ .n { color: #E7E9DB } /* Name */
+ .o { color: #5BC4BF } /* Operator */
+ .p { color: #E7E9DB } /* Punctuation */
+ .ch { color: #776E71 } /* Comment.Hashbang */
+ .cm { color: #776E71 } /* Comment.Multiline */
+ .cp { color: #776E71 } /* Comment.Preproc */
+ .cpf { color: #776E71 } /* Comment.PreprocFile */
+ .c1 { color: #776E71 } /* Comment.Single */
+ .cs { color: #776E71 } /* Comment.Special */
+ .gd { color: #EF6155 } /* Generic.Deleted */
+ .ge { font-style: italic } /* Generic.Emph */
+ .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
+ .gh { color: #E7E9DB; font-weight: bold } /* Generic.Heading */
+ .gi { color: #48B685 } /* Generic.Inserted */
+ .gp { color: #776E71; font-weight: bold } /* Generic.Prompt */
+ .gs { font-weight: bold } /* Generic.Strong */
+ .gu { color: #5BC4BF; font-weight: bold } /* Generic.Subheading */
+ .kc { color: #815BA4 } /* Keyword.Constant */
+ .kd { color: #815BA4 } /* Keyword.Declaration */
+ .kn { color: #5BC4BF } /* Keyword.Namespace */
+ .kp { color: #815BA4 } /* Keyword.Pseudo */
+ .kr { color: #815BA4 } /* Keyword.Reserved */
+ .kt { color: #FEC418 } /* Keyword.Type */
+ .ld { color: #48B685 } /* Literal.Date */
+ .m { color: #F99B15 } /* Literal.Number */
+ .s { color: #48B685 } /* Literal.String */
+ .na { color: #06B6EF } /* Name.Attribute */
+ .nb { color: #E7E9DB } /* Name.Builtin */
+ .nc { color: #FEC418 } /* Name.Class */
+ .no { color: #EF6155 } /* Name.Constant */
+ .nd { color: #5BC4BF } /* Name.Decorator */
+ .ni { color: #E7E9DB } /* Name.Entity */
+ .ne { color: #EF6155 } /* Name.Exception */
+ .nf { color: #06B6EF } /* Name.Function */
+ .nl { color: #E7E9DB } /* Name.Label */
+ .nn { color: #FEC418 } /* Name.Namespace */
+ .nx { color: #06B6EF } /* Name.Other */
+ .py { color: #E7E9DB } /* Name.Property */
+ .nt { color: #5BC4BF } /* Name.Tag */
+ .nv { color: #EF6155 } /* Name.Variable */
+ .ow { color: #5BC4BF } /* Operator.Word */
+ .pm { color: #E7E9DB } /* Punctuation.Marker */
+ .w { color: #E7E9DB } /* Text.Whitespace */
+ .mb { color: #F99B15 } /* Literal.Number.Bin */
+ .mf { color: #F99B15 } /* Literal.Number.Float */
+ .mh { color: #F99B15 } /* Literal.Number.Hex */
+ .mi { color: #F99B15 } /* Literal.Number.Integer */
+ .mo { color: #F99B15 } /* Literal.Number.Oct */
+ .sa { color: #48B685 } /* Literal.String.Affix */
+ .sb { color: #48B685 } /* Literal.String.Backtick */
+ .sc { color: #E7E9DB } /* Literal.String.Char */
+ .dl { color: #48B685 } /* Literal.String.Delimiter */
+ .sd { color: #776E71 } /* Literal.String.Doc */
+ .s2 { color: #48B685 } /* Literal.String.Double */
+ .se { color: #F99B15 } /* Literal.String.Escape */
+ .sh { color: #48B685 } /* Literal.String.Heredoc */
+ .si { color: #F99B15 } /* Literal.String.Interpol */
+ .sx { color: #48B685 } /* Literal.String.Other */
+ .sr { color: #48B685 } /* Literal.String.Regex */
+ .s1 { color: #48B685 } /* Literal.String.Single */
+ .ss { color: #48B685 } /* Literal.String.Symbol */
+ .bp { color: #E7E9DB } /* Name.Builtin.Pseudo */
+ .fm { color: #06B6EF } /* Name.Function.Magic */
+ .vc { color: #EF6155 } /* Name.Variable.Class */
+ .vg { color: #EF6155 } /* Name.Variable.Global */
+ .vi { color: #EF6155 } /* Name.Variable.Instance */
+ .vm { color: #EF6155 } /* Name.Variable.Magic */
+ .il { color: #F99B15 } /* Literal.Number.Integer.Long */
+}
commit 40fa90ce23a0362a2c560eaa0d8baf26ec0ad76a
Merge: da563ae4f 3f014279a
Author: Raymond Toy <toy...@gm...>
Date: Wed Nov 19 12:17:55 2025 -0800
Merge branch 'master' into rtoy-highlightjs-example-maxima-blocks
diff --cc configure.ac
index eba6ab9d0,2e6668797..14c3f0d9e
--- a/configure.ac
+++ b/configure.ac
@@@ -745,12 -745,28 +745,35 @@@ if test x"${enable_build_docs}" = xtru
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.10.0/styles/github.min.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/highlight.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/languages/maxima.min.js"> </script>
- '
- HIGHLIGHT2="<script> hljs.configure({languages: [['Maxima']], cssSelector: ${HLJS_CSS_SELECTOR}}); hljs.highlightAll(); </script>
- "
+ 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"
+ HIGHLIGHTJS_HASH="sha512-EBLzUL8XLl+va/zAsmXwS7Z2B1F9HUHkZwyS/VKwh3S7T/U0nF4BaU29EP/ZSf6zgiIxYAnKLu6bJ8dqpmX5uw=="
+ MAXIMAJS_HASH="sha512-AhvLFkEPexok+HSQKpnwMdX1f0PVRUYera3PJV8u3lotioIqfR9ThqCEydkI7RkSjQNcJm/pQl15AgqWcufw1Q=="
+ LIGHTMODE="github.min.css"
+ LIGHTMODECSS_HASH="sha512-0aPQyyeZrWj9sCA46UlmWgKOP0mUipLQ6OZXu8l4IcAmD2u31EPEy9VcIMvl7SoAaKe8bLXZhYoMaE/in+gcgA=="
+ DARKMODE="github-dark.min.css"
+ DARKMODECSS_HASH="sha512-rO+olRTkcf304DQBxSWxln8JXCzTHlKnIdnMUwYvQa9/Jd4cQaNkItIUj6Z4nvW1dqK0SKXLbn9h4KwZTNtAyw=="
+ 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" integrity="$LIGHTMODECSS_HASH" crossorigin="anonymous"> <link rel="stylesheet" media="(prefers-color-scheme: dark)" href="$CDN/$HIGHLIGHT_VER/styles/$DARKMODE" integrity="$DARKMODECSS_HASH" crossorigin="anonymous"> <script src="$CDN/$HIGHLIGHT_VER/highlight.min.js" integrity="$HIGHLIGHTJS_HASH" crossorigin="anonymous"></script> <script src="$CDN/$HIGHLIGHT_VER/languages/maxima.min.js" integrity="$MAXIMAJS_HASH" crossorigin="anonymous"></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
++ USE_PYGMENTS=true
++ else
++ AC_MSG_ERROR([Makeinfo version (${makeinfo_version_string}) too old to use pygments for syntax highlighting. Disable or use highlightjs])
++ fi
+ fi
+ if test x${syntax_highlighting} = xpygments; then
if test ${makeinfo_version} -ge 702; then
USE_PYGMENTS=true
else
diff --cc doc/info/manual.css
index 5bc1f205a,674e23ae7..c65a29667
--- a/doc/info/manual.css
+++ b/doc/info/manual.css
@@@ -55,18 -55,18 +55,27 @@@ pre.example, pre.example-preformatted
padding: 5px;
background-color: var(--example-background-color);
/* Add scrollbar for examples for narrow windows */
- overflow: auto
+ 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;
}
+/*
+ * 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 {
-----------------------------------------------------------------------
hooks/post-receive
--
Maxima CAS
|