プラグイン

インラインプラグイン &eq

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

このように、$$ y = f(x) $$の形でTexの数式を文中に埋め込められる。

数式が複雑な場合、複数行プラグインを利用できる。

  1
  2
  3
  4
  5
  6
  7
  8
前前前
$eq(){{{
    \begin{bmatrix}
        a_{11} & a_{12}
     \\ a_{21} & a_{22}
    \end{bmatrix}
}}}
後後後

前前前$$ \begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix} $$後後後

ブロックプラグイン #code

  1
  2
  3
  4
  5
  6
  7
  8
前前前
#eq(){{{
    \begin{bmatrix}
        a_{11} & a_{12}
     \\ a_{21} & a_{22}
    \end{bmatrix}
}}}
後後後

前前前

$$ \begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix} $$

後後後

ネイティブエイリアス

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

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

  1
  2
  3
$$ a + b = b + a $$と書くと式を丸ごと転送するが、
$$ a  $ + $ b $ = $ b $ + $ a $$と書くと、
実際処理するのが「$$ a $$」、「$$ b $$」、「$$ + $$」、「$$ = $$」だけになる。

$$ a + b = b + a $$と書くと式を丸ごと転送するが、$$ a $$$$ + $$$$ b $$$$ = $$$$ b $$$$ + $$$$ a $$と書くと、実際処理するのが「$$ a $$」、「$$ b $$」、「$$ + $$」、「$$ = $$」だけになる。

インライン書式の場合、式の分数線を文字列の中心線に合わせるように配置される。そのため、上下非対称な式を埋めると、行間が空くようになる。

  1
  2
  3
□□□□□□前の行□□□□□□&br;
前前前$$ \ffd{\ffd{A}{B}}{C} $ \neq $ \ffd{A}{\ffd{B}{C}} $$後後後
&br;□□□□□□後ろの行□□□□□□

□□□□□□前の行□□□□□□
前前前$$ \ffd{\ffd{A}{B}}{C} $$$$ \neq $$$$ \ffd{A}{\ffd{B}{C}} $$後後後
□□□□□□後ろの行□□□□□□

また、「$$$」のみの行で挟まれる部分は #eq() に渡され、ブロックプラグインと等価。

  1
  2
  3
$$$
    e^{\pi i} + 1 = 0
$$$
$$ e^{\pi i} + 1 = 0 $$

拡張コマンド

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

分数・微分・ルート

微分記号

  1
  2
  3
\newcommand{\pr}{\partial}
\newcommand{\dl}{\delta}
\newcommand{\Dl}{\varDelta}
d D \dl \Dl \pr
$$ d $$$$ D $$$$ \dl $$$$ \Dl $$$$ \pr $$

線幅調節スタイル

  1
  2
  3
  4
\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} $$

ディスプレイスタイル

  1
  2
  3
  4
\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} $$

ベクトル・テンソル

  1
  2
  3
  4
  5
\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
Last-modified: 2013.0811 (日) 2145.1700 (3903d)