Reviewed-on: #6
This commit is contained in:
commit
4d5e1e8b10
8 changed files with 20 additions and 6 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -8,3 +8,4 @@ woff2/
|
||||||
**/serve_*
|
**/serve_*
|
||||||
/lexers.out
|
/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
|
#! /usr/bin/env nix-shell
|
||||||
#! nix-shell --pure -i bash
|
#! 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
|
if ! [[ -d pgvv/ ]]; then
|
||||||
python3 -m venv pgvv
|
python3 -m venv pgvv
|
||||||
|
|
|
@ -245,8 +245,8 @@ code, pre code {
|
||||||
font-size: calc(0.84 * var(--base-font-size));
|
font-size: calc(0.84 * var(--base-font-size));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* for STIX 2 */
|
||||||
math {
|
math {
|
||||||
color: black;
|
|
||||||
font-family: "Math";
|
font-family: "Math";
|
||||||
font-size: calc(0.96 * var(--base-font-size));
|
font-size: calc(0.96 * var(--base-font-size));
|
||||||
}
|
}
|
|
@ -189,7 +189,7 @@ math[display="block"] {
|
||||||
position: relative;
|
position: relative;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: auto;
|
right: auto;
|
||||||
text-align: left;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
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]
|
[widgets.math-inline]
|
||||||
widget = "preprocess_element"
|
widget = "preprocess_element"
|
||||||
selector = "span.math.inline"
|
selector = "span.math.inline"
|
||||||
command = "sed -E 's/^\\\\\\((.*)\\\\\\)$/\\1/' | katex --format mathml"
|
command = "./math_wrapper.sh inline"
|
||||||
action = "replace_element"
|
action = "replace_element"
|
||||||
|
|
||||||
[widgets.math-display]
|
[widgets.math-display]
|
||||||
widget = "preprocess_element"
|
widget = "preprocess_element"
|
||||||
selector = "span.math.display"
|
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"
|
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