Mathjaxで写像/関数の定義域の制限

Mathjaxでrestriction map/functionを書く。 基本的にはtex/latexと同じである。

method1

Definition:Restriction/Mapping - ProofWiki

Proofwikiやでは|の過度な仕様を避けるため、harpoon \(\upharpoonright\) 記号を使うことを推奨している。

 f_{\restriction_{A}}

$$ f {\restriction_{A}} $$

method2

多くの本では以下の|が利用されている。 下記のlinkで紹介されているように、| をつける方法はいくつかある。 math mode - How to typeset function restrictions - TeX - LaTeX Stack Exchange

ちょっと長めの|

left. f \vphantom{\big|} \right|_{A}

$$ \left. f \vphantom{\big|} \right|_{A} $$

ちょっと短めの|

    \left.f\right|_{A}

$$ \left.f\right|_{A} $$

\defでcommandを定義できるので、commandとして登録しても良い。 \defは使用するより前に宣言していれば良い。

$$
    \def\maprestriction#1#2{\left. #1 \right|_{#2}}
    \maprestriction{f}{A}
$$

$$ \def\maprestriction#1#2{\left. #1 \right|_{#2}} \maprestriction{f}{A} $$