#nofollow
#norelated
%indent
////////////////////////////////////////////////////////////////
* プラグイン [#qb86616b]

''インラインプラグイン ##&eq##''
###
このように、&eq{y = f(x)};の形でTexの数式を文中に埋め込められる。
###
このように、&eq{y = f(x)};の形でTexの数式を文中に埋め込められる。

数式が複雑な場合、複数行プラグインを利用できる。
#tab
    ###
    前前前
    $eq(){{{
        \begin{bmatrix}
            a_{11} & a_{12}
         \\ a_{21} & a_{22}
        \end{bmatrix}
    }}}
    後後後
    ###
#tab
    前前前
    $eq(){{{
        \begin{bmatrix}
            a_{11} & a_{12}
         \\ a_{21} & a_{22}
        \end{bmatrix}
    }}}
    後後後
#tab(end)

''ブロックプラグイン ###code##''
#tab
    ###
    前前前
    #eq(){{{
        \begin{bmatrix}
            a_{11} & a_{12}
         \\ a_{21} & a_{22}
        \end{bmatrix}
    }}}
    後後後
    ###
#tab
    前前前
    #eq(){{{
        \begin{bmatrix}
            a_{11} & a_{12}
         \\ a_{21} & a_{22}
        \end{bmatrix}
    }}}
    後後後
#tab(end)

////////////////////////////////////////////////////////////////
* ネイティブエイリアス [#e32191ed]

WikiCodeの可読性を改善するため、コードに関して専用記号「&code($);」を割り当てている。

「$$」で括られたコードは &eq() に渡され、インラインプラグインと等価。
また、数式を「$」で区切ることにより、複数の数式画像に分割して処理できる。
数式に共通部が多い場合、データの転送量が減り、数式の表示が速くなる。
###
$$ a + b = b + a $$と書くと式を丸ごと転送するが、
$$ a  $ + $ b $ = $ b $ + $ a $$と書くと、
実際処理するのが「$$ a $$」、「$$ b $$」、「$$ + $$」、「$$ = $$」だけになる。
###
$$ a + b = b + a $$と書くと式を丸ごと転送するが、
$$ a  $ + $ b $ = $ b $ + $ a $$と書くと、
実際処理するのが「$$ a $$」、「$$ b $$」、「$$ + $$」、「$$ = $$」だけになる。

インライン書式の場合、式の分数線を文字列の中心線に合わせるように配置される。
そのため、上下非対称な式を埋めると、行間が空くようになる。
###
□□□□□□前の行□□□□□□&br;
前前前$$ \ffd{\ffd{A}{B}}{C} $ \neq $ \ffd{A}{\ffd{B}{C}} $$後後後
&br;□□□□□□後ろの行□□□□□□
###
□□□□□□前の行□□□□□□&br;
前前前$$ \ffd{\ffd{A}{B}}{C} $ \neq $ \ffd{A}{\ffd{B}{C}} $$後後後
&br;□□□□□□後ろの行□□□□□□

また、「$$$」のみの行で挟まれる部分は #eq() に渡され、
ブロックプラグインと等価。
#tab
###
$$$
    e^{\pi i} + 1 = 0
$$$
###
#tab
$$$
    e^{\pi i} + 1 = 0
$$$
#tab(end)

////////////////////////////////////////////////////////////////
* 拡張コマンド [#o7ff322b]

インライン数式、ブロック数式を問わず、
デフォルトでは ##msmath##、##amssymb##、##bm##パッケージを適応している。
その上、日本で使われる表記に近づけるよう、Texコードが短くなるよう、
独自のTexコマンドを定義している。

** 分数・微分・ルート [#k525a51b]

*** 微分記号 [#l8faaf31]

###
\newcommand{\pr}{\partial}
\newcommand{\dl}{\delta}
\newcommand{\Dl}{\varDelta}
###

|## d ##|## D ##|## \dl ##|## \Dl ##|## \pr ##|
|$$ d $$|$$ D $$|$$ \dl $$|$$ \Dl $$|$$ \pr $$|

*** 線幅調節スタイル [#c4e0c612]

###
\newcommand{\ff} [2]{\frac{\,{#1}\,}{\,{#2}\,}}
\newcommand{\dd} [2]{\frac{\,d{#1}\,}{\,d{#2}\,}}
\newcommand{\pp} [2]{\frac{\,\pr{#1}\,}{\,\pr{#2}\,}}
\newcommand{\rt}[2][{\;\;}]{\sqrt[#1]{#2\,}} 
###

|## \ff{y}{x} ##|## \dd{y}{x} ##|## \pp{y}{x} ##|#$ \rt{x} ##|## \rt[n]{x} ##|
|$$ \ff{y}{x} $$|$$ \dd{y}{x} $$|$$ \pp{y}{x} $$|$$ \rt{x} $$|$$ \rt[n]{x} $$|

*** ディスプレイスタイル [#r48e6bfe]

###
\newcommand{\disp}[1]{{\displaystyle {#1}}}
\newcommand{\ffd}[2]{\disp{\ff{\disp{#1}\mathstrut}{\disp{#2}\mathstrut}}}
\newcommand{\ddd}[2]{\disp{\dd{\disp{#1}\mathstrut}{\disp{#2}\mathstrut}}}
\newcommand{\ppd}[2]{\disp{\pp{\disp{#1}\mathstrut}{\disp{#2}\mathstrut}}}
###

|## \ffd{\ffd{A}{B}}{C} ##|## \ddd{\ddd{A}{B}}{C} ##|## \ppd{\ppd{A}{B}}{C} ##|
|$$ \ffd{\ffd{A}{B}}{C} $$|$$ \ddd{\ddd{A}{B}}{C} $$|$$ \ppd{\ppd{A}{B}}{C} $$|

*** ベクトル・テンソル [#cf331e6f]

###
\def\:#1{{\b#1}}
\newcommand{\sx}{ {\bm \cdot} }         % スカラー積
\newcommand{\vx}{ \! \times  \! }       % ベクトル積
\newcommand{\wx}{ \! \wedge  \! }       % ウェッジ積
\newcommand{\tx}{ \! \otimes \! }       % テンソル積
###

|## A \:A ##|## \:A \sx \:B ##|## \:A \vx \:B ##|## \:A \wx \:B ##|## \:A \tx \:B ##|
|$$ A \:A $$|$$ \:A \sx \:B $$|$$ \:A \vx \:B $$|$$ \:A \wx \:B $$|$$ \:A \tx \:B $$|

////////////////////////////////////////////////////////////////

    技術 一覧 検索 最新 バックアップ リンク元   ヘルプ   最終更新のRSS