szcf-weiya / techNotes

My notes about technology.
https://tech.hohoweiya.xyz/
11 stars 7 forks source link

mathjax #24

Open szcf-weiya opened 3 years ago

szcf-weiya commented 3 years ago

\DeclareMathOperator in the head

since Marcos does not support DeclareMathOperator, so try to also put the declaration in the header, such as image but there will be an extra space in the header, image

szcf-weiya commented 3 years ago

try to set display:none; height:0px

not work, and actually the script would render as image

szcf-weiya commented 3 years ago

an alternative way

image refer to

also check their definitions

~$ latexdef -p amsmath DeclareMathOperator

\DeclareMathOperator:
macro:->\@latex@error {Can be used only in preamble}\@eha 

(in preamble)
\DeclareMathOperator:
\long macro:->\@ifstar {\@declmathop m}{\@declmathop o}

~$ latexdef -p amsmath operatorname

\operatorname:
macro:->\protect \operatorname  

\operatorname :
\long macro:->\@ifstar {\qopname \newmcodes@ m}{\qopname \newmcodes@ o}

but the star version * seems not work, even tried to escape * via \

szcf-weiya commented 3 years ago

mathop

it seems that \mathop can achieve the star version, image but it seems not to work in the mkdocs.

szcf-weiya commented 3 years ago

\hat f

\hat f_1(x) image \hat f_{\!1}(x) image but for inline math formula, one more \ is needed to escape \!. However, if there are two math formulas, it would problematic, such as image so no change for them