initial switch to latexmlmath, per #5 #6
8 changed files with 20 additions and 6 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -7,4 +7,5 @@ all_chars.txt
|
|||
woff2/
|
||||
**/serve_*
|
||||
/lexers.out
|
||||
fonts/*trial
|
||||
fonts/*trial
|
||||
**/*.log
|
||||
|
|
1
acl.cool/math_wrapper.sh
Symbolic link
1
acl.cool/math_wrapper.sh
Symbolic link
|
@ -0,0 +1 @@
|
|||
../math_wrapper.sh
|
2
build.sh
2
build.sh
|
@ -1,6 +1,6 @@
|
|||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell --pure -i bash
|
||||
#! nix-shell --pure -p nodejs_24 bash harfbuzz soupault woff2 jotdown python3 recode nodePackages_latest.katex minify
|
||||
#! nix-shell --pure -p nodejs_24 bash harfbuzz soupault woff2 jotdown python3 recode perl538Packages.LaTeXML minify
|
||||
|
||||
if ! [[ -d pgvv/ ]]; then
|
||||
python3 -m venv pgvv
|
||||
|
|
|
@ -245,8 +245,8 @@ code, pre code {
|
|||
font-size: calc(0.84 * var(--base-font-size));
|
||||
}
|
||||
|
||||
/* for STIX 2 */
|
||||
math {
|
||||
color: black;
|
||||
font-family: "Math";
|
||||
font-size: calc(0.96 * var(--base-font-size));
|
||||
}
|
|
@ -189,7 +189,7 @@ math[display="block"] {
|
|||
position: relative;
|
||||
left: 0;
|
||||
right: auto;
|
||||
text-align: left;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
footer {
|
||||
|
|
11
math_wrapper.sh
Executable file
11
math_wrapper.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#! /usr/bin/env sh
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo -n '<strong>BLOCK MATH ERROR</strong>'
|
||||
elif [[ "$1" == "display" ]]; then
|
||||
echo -n '<p>'
|
||||
latexmlmath --preload=amsmath.sty --preload=amssymb.sty -
|
||||
echo -n '</p>'
|
||||
else
|
||||
latexmlmath --preload=amsmath.sty --preload=amssymb.sty -
|
||||
fi
|
|
@ -132,11 +132,11 @@ command = "./syntax_wrapper.sh ${ATTR_CLASS##*-}"
|
|||
[widgets.math-inline]
|
||||
widget = "preprocess_element"
|
||||
selector = "span.math.inline"
|
||||
command = "sed -E 's/^\\\\\\((.*)\\\\\\)$/\\1/' | katex --format mathml"
|
||||
command = "./math_wrapper.sh inline"
|
||||
action = "replace_element"
|
||||
|
||||
[widgets.math-display]
|
||||
widget = "preprocess_element"
|
||||
selector = "span.math.display"
|
||||
command = "sed -E 's/^\\\\\\[(.*)\\\\\\]$/\\1/' | katex -d --fleqn --format mathml | awk '{print \"<p>\" $0 \"</p>\"}'"
|
||||
command = "./math_wrapper.sh display"
|
||||
action = "replace_element"
|
1
ytheleus.org/math_wrapper.sh
Symbolic link
1
ytheleus.org/math_wrapper.sh
Symbolic link
|
@ -0,0 +1 @@
|
|||
../math_wrapper.sh
|
Loading…
Add table
Add a link
Reference in a new issue