LoginSignup
3
0

More than 3 years have passed since last update.

テンソル書きたい

Last updated at Posted at 2021-04-12

tensor パッケージを使おう.

tensor.sty | CTAN

  • 上付き添え字と下付き添え字をずらす
  • 左側にも添え字を付与できる

○ 使い方

  • \indices, \indices* : 右側添え字
  • \tensor, \tensor* : テンソル表記
  • \nuclide : 化学元素

* 付きコマンドは添え字を詰めることが出来る.

■ 右側添え字

右側に添え字を付与する.

\indices{<右側添え字>}

例 :

M\indices{^a_b^{cd}_e}

tensor-indices.png

また,このコマンドは前の記号のサイズから反映されて添え字の高さを自動的に変更することが出来るようだ.

■ テンソル表記

テンソルを表記するときに利用したい.

\tensor[<左側添え字>]{<テンソル>}{<右側添え字>}

例 :

\tensor[^a_b^c_d]{T}{^e_f^g_h}

tensor-tensor.png

* を付ける

* を付けない場合には以下のようになる.

M\indices{^a_{bcd}^{ef}_g}
\tensor[^a_{bc}^d_{efg}]{T}{^{hi}_j^{klm}_n}

tensor-indices-tensor.png

* を付けると添え字が詰まる.

M\indices*{^a_{bcd}^{ef}_g}
\tensor*[^a_{bc}^d_{efg}]{T}{^{hi}_j^{klm}_n}

tensor-star.png

また,添え字に* を付けると以下のようになる.

M\indices*{*^a_{bcd}^{ef}_g}
\tensor*[*^a_{bc}^d_{efg}]{T}{*^{hi}_j^{klm}_n}

tensor-star-star.png

☆ ! Double superscript / subscript.

テンソルに名前を付与する際に,以下のようにすることがあるだろう.しかし,この場合にはエラーが発生する.

M_0 \indices{^a_b^{cd}_e}
\tensor[^a_b^c_d]{T_1}{^e_f^g_h}

Example of Error :
下付き添え字が二重になっているために起こるエラーのようだ.

! Double subscript.
\tnsr@Fin ->^{\the \tnsr@Sps }_
                               {\the \tnsr@Sbs }

これを回避するためには,() を付ける.

(M_0) \indices{^a_b^{cd}_e}
\tensor[^a_b^c_d]{(T_1)}{^e_f^g_h}

tensor-paren.png

■ ブランクに記号を挿入する

\renewcommand\indexmarker{<ブランクに入れる記号>}

例 :

\renewcommand\indexmarker{\cdot}
\tensor[^a_b^c_d]{T}{^e_f^g_h}

tensor-indexmarker.png

■ 化学元素記号

化学元素記号も出せる.1

\nuclide[<mass No.>][<atomic No.>]{<symbol>}

例 :

\nuclide[14][12]{C}

tensor-atom-symbol.png

余談

テンソル表記に使うコマンドは\indices\tensor のどちらが良いのだろう.
左側に添え字を付与しない場合であれば,どちらであっても同じ結果を得る.


  1. テンソルと化学元素を同時に使う人がいるのか分からない. 

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0