# TeX

{% hint style="success" %}
```tex
\overset{!}{=}                    % overset
\underbrace{...}_{\text{...}}     % underbrace
```
{% endhint %}

{% tabs %}
{% tab title="🔴 主題" %}
* [matrix](tex/matrix "mention")
* [deco](tex/deco "mention")
* [style](tex/style "mention")
{% endtab %}

{% tab title="🛠 工具" %}
* [KaTeX playground](https://katex.org/#demo)
* codecogs ⟩ [Equation Editor](https://editor.codecogs.com/)&#x20;
* [Mathcha](https://www.mathcha.io/editor)
* [Overleaf](https://www.overleaf.com)
{% endtab %}

{% tab title="📘 手冊" %}
* KaTeX ⟩&#x20;
  * [TeX functions](https://katex.org/docs/supported.html) (sorted by type) ⭐️&#x20;
  * [TeX functions](https://katex.org/docs/support_table.html) (sorted alphabetically)
{% endtab %}

{% tab title="📗 參考" %}
* Dropbox Paper ⟩ [數學式 (LaTeX)](https://paper.dropbox.com/doc/LaTeX-xBteqZ6zSoetCppOQp4Lf)
{% endtab %}

{% tab title="🗣 討論" %}
* [MathJax basic tutorial and quick reference](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference)
{% endtab %}

{% tab title="🏖️ 試玩" %}
<table><thead><tr><th width="276">result</th><th>test</th></tr></thead><tbody><tr><td><p><span class="math">% new command \newcommand \x {\times} \newcommand \y {\colorbox{green}{1}}  \left(   \begin{array}{cccc}     \x  &#x26; \x  &#x26; \x &#x26; \x \\     0   &#x26; \x  &#x26; \x &#x26; \x \\     0   &#x26; 0   &#x26; \x &#x26; \x \\     0   &#x26; 0   &#x26; 0  &#x26; \x \\     \y  &#x26; \y  &#x26; \y &#x26; \y \\   \end{array} \right)</span><span class="math">% new command \newcommand \x {\times} \newcommand \y {\colorbox{green}{1}}  \left(   \begin{array}{cccc}     \x  &#x26; \x  &#x26; \x &#x26; \x \\     0   &#x26; \x  &#x26; \x &#x26; \x \\     0   &#x26; 0   &#x26; \x &#x26; \x \\     0   &#x26; 0   &#x26; 0  &#x26; \x \\     \y  &#x26; \y  &#x26; \y &#x26; \y \\   \end{array} \right)</span><span class="math">% new command \newcommand \x {\times} \newcommand \y {\colorbox{green}{1}}  \left(   \begin{array}{cccc}     \x  &#x26; \x  &#x26; \x &#x26; \x \\     0   &#x26; \x  &#x26; \x &#x26; \x \\     0   &#x26; 0   &#x26; \x &#x26; \x \\     0   &#x26; 0   &#x26; 0  &#x26; \x \\     \y  &#x26; \y  &#x26; \y &#x26; \y \\   \end{array} \right)</span><span class="math">% new command \newcommand \x {\times} \newcommand \y {\colorbox{green}{1}}  \left(   \begin{array}{cccc}     \x  &#x26; \x  &#x26; \x &#x26; \x \\     0   &#x26; \x  &#x26; \x &#x26; \x \\     0   &#x26; 0   &#x26; \x &#x26; \x \\     0   &#x26; 0   &#x26; 0  &#x26; \x \\     \y  &#x26; \y  &#x26; \y &#x26; \y \\   \end{array} \right)</span>&#x3C;- the equation <span data-gb-custom-inline data-tag="emoji" data-code="2049">⁉️</span><br></p><p>showed up then <del>disappeared</del> shrinked to be invisible?<br><br>GitBook doesn't support <mark style="color:yellow;"><code>\newcommand</code></mark> in Math &#x26; TeX <span data-gb-custom-inline data-tag="emoji" data-code="2753">❓</span></p></td><td><pre class="language-tex"><code class="lang-tex">% test `\newcommand`
\newcommand \x {\times}
\newcommand \y {\colorbox{green}{1}}

\left(
  \begin{array}{cccc}
    \x  &#x26; \x  &#x26; \x &#x26; \x \\
    0   &#x26; \x  &#x26; \x &#x26; \x \\
    0   &#x26; 0   &#x26; \x &#x26; \x \\
    0   &#x26; 0   &#x26; 0  &#x26; \x \\
    \y  &#x26; \y  &#x26; \y &#x26; \y \\
  \end{array}
\right)
</code></pre></td></tr><tr><td></td><td></td></tr><tr><td><span class="math">% new commands \newcommand \x {\times} \newcommand \y {\colorbox{green}{1}}   \begin{pmatrix}   \x  &#x26; \x  &#x26; \x &#x26; \x \\   0   &#x26; \x  &#x26; \x &#x26; \x \\   0   &#x26; 0   &#x26; \x &#x26; \x \\   0   &#x26; 0   &#x26; 0  &#x26; \x \\   \y  &#x26; \y  &#x26; \y &#x26; \y \\ \end{pmatrix}</span></td><td></td></tr><tr><td></td><td></td></tr></tbody></table>


{% endtab %}
{% endtabs %}

$$% new command \newcommand \x {\times} \newcommand \y {\colorbox{green}{1}}  \left(   \begin{array}{cccc}     \x  & \x  & \x & \x \\     0   & \x  & \x & \x \\     0   & 0   & \x & \x \\     0   & 0   & 0  & \x \\     \y  & \y  & \y & \y \\   \end{array} \right)$$
