LaTeX および MathML は、これらすべての iWork App (Pages、Numbers、Keynote) と iBooks Author でサポートされています。iWork と iBooks Author は、blahtex を使って MathML に変換可能なすべての LaTex コマンドをサポートします。そのほかにも、以下の一覧で紹介している LaTeX の拡張機能がサポートされています。
LaTex と MathML を使った数式を iWork 書類に追加する方法についてはこちらの記事を、iBooks Author ブックに追加する方法についてはこちらの記事を参照してください。
LaTeX および MathML は、現時点ではiCloud.com の iWork App ではサポートされていません。
LaTeX コマンド
LaTeX では通常、数式を以下の例に示すような数式モードのコマンドで囲む必要があります。数式を簡単に作成できるように、iWork と iBooks Author の数式エディタはデフォルトで数式モードになっているので、数式に数式モードのコマンドを追加する必要はありません。
- \begin{math} … \end{math}
- \begin{displaymath} … \end{displaymath}
- \begin{equation} … \end{equation}
- $ … $
- $$ … $$
- \( … \)
- \[ … \]
iWork または iBooks Author で数式にテキストを追加し、段落スタイルを継承させたい場合は、\text{…} を使います。\text{...} の中に数式を入れ子にすることはできません。
数式モードでは、blahtex は非 ASCII の Unicode 文字に完全には対応していませんが、テキストモードではすべての Unicode 文字セットを使えます。著作権記号や、アクセント記号付きの文字など、特殊文字について詳しくは、blahtex のマニュアルの 2.22 を参照してください。
サポートされている LaTeX コマンド (blahtex の拡張機能) と、MathML の要素および属性を以下に紹介します。
iWork がサポートしている LaTeX コマンド
コマンドまたは記号 |
---|
\phantom{} |
\color |
\cancel |
\underrightarrow、\underleftarrow、\underleftrightarrow |
\lneq、\gneq、\lvertneq、\gvertneq |
\thinspace、\medspace、\thickspace、\negthinspace、\negmedspace、\negthickspace |
"\:"、"\,"、"\;"、"\!"、"\ " |
\lmoustache、\rmoustache |
\lgroup、\rgroup |
\brace、\brack |
\xleftarrow、\xrightarrow |
\dddot、\ddddot |
\copyright |
\pounds |
\diagup、\diagdown |
\dag、\ddag、\dagger、\ddagger |
\owns、\ni |
{split} |
iWork がサポートしていない LaTeX コマンド
コマンドまたは記号 | 説明 |
---|---|
\mathring{} | |
\ae、\AE | |
\smallint | |
\idotsint | |
\euro | Unicode 記号。テキストモードでのみ機能します。 |
\varGamma | |
\cal | \mathcal{} を使用します。 |
\mathml{} | |
\center | |
\aligned の中の [lrc] | |
\fillin | |
\strut | |
\vphantom | |
\hphantom | |
\smash | |
\hspace | "\:"、"\,"、"\;"、または \phantom{} を使用します。 |
\mspace | |
\centernot | |
\buildrelover | \overset、\underset を使用します。 |
\tabular 関連の環境 | \matrix および \aligned は制限付きでサポートされます。 |
\sideset | |
\pmb、\boldmath、\unboldmath | \boldsymbol を使用します。 |
iBooks Author がサポートしている LaTeX コマンド
コマンドまたは記号 |
---|
\phantom{} |
\color |
\cancel |
\underrightarrow、\underleftarrow、\underleftrightarrow |
\lneq、\gneq、\lvertneq、\gvertneq |
\thinspace、\medspace、\thickspace、\negthinspace、\negmedspace、\negthickspace |
"\:"、"\,"、"\;"、"\!"、"\ " |
\lmoustache、\rmoustache |
\lgroup、\rgroup |
\brace、\brack |
\xleftarrow、\xrightarrow |
\dddot、\ddddot |
iBooks Author がサポートしていない LaTeX コマンド
コマンドまたは記号 | 説明 |
---|---|
\mathring{} | |
\copyright | Unicode 記号。テキストモードでのみ機能します。 |
\pounds | Unicode 記号。テキストモードでのみ機能します。 |
\ae、\AE | |
\smallint | |
\diagup、\diagdown | |
\idotsint | |
\euro | Unicode 記号。テキストモードでのみ機能します。 |
\varGamma | |
\cal | \mathcal{} を使用します。 |
\mathml{} | |
\center | |
\aligned の中の [lrc] | |
\fillin | |
\strut | |
\vphantom | |
\hphantom | |
\smash | |
\dag、\ddag | \dagger、\ddagger はサポート対象です。 |
{split} | |
\hspace | "\:"、"\,"、"\;"、または \phantom{} を使用します。 |
\mspace | |
\centernot | |
\buildrelover | \overset、\underset を使用します。 |
\owns | \ni を使用します。 |
\tabular 関連の環境 | \matrix および \aligned は制限付きでサポートされます。 |
\sideset | |
\pmb、\boldmath、\unboldmath | \boldsymbol を使用します。 |
LaTeX パッケージ
以下の LaTeX パッケージはサポートされていません。
パッケージ | 説明 |
---|---|
cancel | \cancel を使用します。 |
ams | \underrightarrow、\underleftarrow、\underleftrightarrow を使用します。 |
centernot |
MathML 要素
以下の表を参考にして、iWork と iBooks Author でサポートされている MathML 要素を確認してください。
サポートされている MathML 要素
要素 | 説明 |
---|---|
mo | |
mi | |
mn | |
mrow | |
menclose | 一部の囲み形式はサポートされていません。 |
mtable | 一部の属性はサポートされていません。 |
mtr | |
mtd | |
mfrac | |
msup | |
msub | |
msubsup | |
munder | |
mover | |
munderover | |
mstack | |
msrow | |
msgroup | |
mscarries | |
mscarry | |
msline | |
mlongdiv | |
mpadded | |
mspace | |
maction | iWork と iBooks Author は、最初の MathML 子要素をサポートし、2 つ目以降は無視します。 |
mphantom | |
mfenced | |
mroot | |
msqrt | |
none | |
mstyle | |
mtext | |
ms | |
maligngroup | |
malignmark |
部分的にサポートされている MathML 要素
要素 | 説明 |
---|---|
mlabeledtr | <mtr> として処理され、最初の子要素は無視されます。 |
semantics | 行として処理されます。 |
annotation | 実質的に無視されます。 |
サポートされていない MathML 要素
要素 | 説明 |
---|---|
mmultiscripts | |
mprescripts | |
mglyph | |
merror | |
{ContExp} | MathML のコンテンツ要素はサポートされていません。 {ContExp} で扱える要素については、こちらを参照してください。 |
MathML 属性
以下の表を参考にして、iWork と iBooks Author でサポートされている MathML 属性を確認してください。
サポートされている MathML 属性
以下の MathML 属性は iWork および iBooks Author でサポートされています。
要素 | 属性 | <mstyle> からのデフォルト値の継承 | 値 (サブセット仕様の場合は値構文) |
---|---|---|---|
* | mathcolor | 可 | |
mstyle | scriptlevel | 不可 | |
mstyle | display | 不可 | |
mstyle | scriptminsize | 不可 | |
mstyle | scriptsizemultiplier | 不可 | |
mstyle | <継承可能なデフォルト値で指定された属性> | 該当なし | |
mo | lspace | 可 | |
mo | rspace | 可 | |
mo | largeop | 可 | |
mo | minsize | 可 | |
mo | maxsize | 可 | |
mo | accent | 可 | |
mo | movablelimits | 可 | |
mo | symmetric | 可 | |
mo | stretchy | 可 | |
mo | form | 可 | |
mspace | width | 可 | |
mspace | height | 可 | |
mspace | depth | 可 | |
ms | lqoute | 可 | |
ms | rqoute | 可 | |
mfrac | linethickness | 可 | |
mfrac | numalign | 可 | |
mfrac | denomalign | 可 | |
mover | accent | 可 | |
mover | align | 可 | |
munderover | accent | 可 | |
munderover | underaccent | 可 | |
munder | accentunder | 可 | |
munder | align | 可 | |
mtable | rowalign | 可 | |
mtable | columnalign | 可 | |
mtable | columnspacing | 可 | |
mtable | displaystyle | 可 | |
mtr | rowalign | 可 | |
mtr | columnalign | 可 | |
mtd | rowalign | 可 | |
mtd | columnalign | 可 | |
mstack | align | 可 | top | bottom | center | baseline | axis |
msrow | position | 可 | |
msgroup | position | 可 | |
msgroup | shift | 可 | |
mscarries | position | 可 | |
mscarries | crossout | 可 | updiagonalstrike | downdiagonalstrike | horizontalstrike | verticalstrike |
mscarry | crossout | 可 | updiagonalstrike | downdiagonalstrike | horizontalstrike | verticalstrike |
msline | length | 可 | |
msline | position | 可 | |
mpadded | height | 不可 | |
mpadded | depth | 不可 | |
mpadded | width | 不可 | |
mpadded | lspace | 不可 | |
mpadded | voffset | 不可 | |
mfenced | open | 可 | |
mfenced | close | 可 | |
mfenced | separators | 可 | |
maligngroup | groupalign | 可 | |
malignmark | edge | 可 |
部分的にサポートされている MathML 属性
以下の MathML 属性は、iWork および iBooks Author で部分的にサポートされています。
要素 | 属性 | <mstyle> からのデフォルト値の継承 | 値 (サブセット仕様の場合は値構文) |
説明 |
---|---|---|---|---|
mo、mn、mi | mathvariant | 可 | initial、stretched、looped、tailed はサポートされていません。 | |
mtable | align | 不可 | top | bottom | center | baseline | axis | rownumber はサポートされていません。 |
menclose | notation | 可 | updiagonalstrike | downdiagonalstrike | horizontalstrike | verticalstrike | 詳しくは、こちらを参照してください。 |
mlongdiv | longdivstyle | 不可 | lefttop |
サポートされていない MathML 属性
要素 | 属性 | 説明 |
---|---|---|
* | mathbackground | |
mstyle | infixlinebreakstyle | |
mstyle | veryverythinmathspace、verythinmathspace、thinmathspace、mediummathspace、thickmathspace、verythickmathspace、veryverythickmathspace | MathML 3 では非推奨。 |
mi、mn、mo、ms、mstyle、mtext | mathsize | |
mi、mn、mo、ms、mstyle、mtext | dir | |
mi、mn、mo、ms、mstyle、mtext | fontfamily、fontweight、fontstyle、fontsize、color、background | MathML 3 では非推奨。 |
mo | linebreak | |
mo | lineleading | |
mo | linebreakstyle | |
mo | linebreakmultchar | |
mo | identalign | |
mo | identshift | |
mo | identtarget | |
mo | identalignfirst | |
mo | identshiftfirst | |
mo | identalignlast | |
mo | identshiftlast | |
mo | fence | 視覚的なレイアウトには影響しません。 |
mo | separator | 視覚的なレイアウトには影響しません。 |
mspace | linebreak | |
mfrac | bevelled | |
mtable | groupalign | |
mtable | alignmentscope | |
mtable | columnwidth | |
mtable | width | |
mtable | rowspacing | |
mtable | rowlines | |
mtable | columnlines | |
mtable | frame | |
mtable | framespacing | |
mtable | equalrows | |
mtable | equalcolumns | |
mtable | side | |
mtable | minlabelspacing | |
mtr | groupalign | |
mtd | rowspan | |
mtd | columnspan | |
mtd | groupalign | |
mstack | stackalign | |
mstack | charalign | |
mstack | charspacing | |
mlongdiv | position | |
mlongdiv | shift | |
mscarries | location | |
mscarries | scriptsizemultiplier | |
mscarry | location | |
msline | leftoverhang | |
msline | rightoverhang | |
msline | mslinethickness | |
msub | subscriptshift | |
msup | superscriptshift | |
msubsup | superscriptshift | |
msubsup | subscriptshift | |
mrow | ltr | |
maction | selection | |
maction | actiontype |
サンプル数式
基本的な計算
LaTeX | 実行結果 |
---|---|
0.15 \cdot \frac{1}{8} |
![]() |
-22 \div 11 |
![]() |
2x + 3y \ge -21 |
![]() |
3(b-5) < -6(b+5) |
![]() |
\left \{ 6 {\textstyle \frac{4}{5}}, \, \sqrt{49}, \, 6.\overline{3}, \, 7\sqrt{5} \right \} |
![]() |
配置
LaTeX | 実行結果 |
---|---|
\begin{aligned} 9 && < && 15 && < && 16 \\ \sqrt{9} && < && \sqrt{15} && < && \sqrt16 \\ 3 && < && \sqrt{15} && < && 4 \end{aligned} |
![]() |
\begin{aligned} \text{first number} & & \text{second number} \\ 10 \mbox{\phantom{=digit}} & \cdot & 9 \mbox{\phantom{=digit}} \end{aligned}
|
![]() |
\begin{aligned} N &= 0.555\ldots \\ {\color{red}10}N &= {\color{red} 10}(0.555\ldots) \\ 10N &= 5.555\ldots \end{aligned} |
![]() |
色
LaTeX | 実行結果 |
---|---|
\begin{aligned} N &= 0.555\ldots \\ {\color{red}10}N &= {\color{red} 10}(0.555\ldots) \\ 10N &= 5.555\ldots \end{aligned} |
![]() |
\sum_{\color{0A7C10}n=0}^{\color{red}\infty} a_n x^n |
![]() |
積分
LaTeX | 実行結果 |
---|---|
\textstyle \int_{-N}^{N} e^x\, dx |
![]() |
\int_{-N}^{N} e^x\, dx |
![]() |
\textstyle はインライン数式とディスプレイ数式を区別します。
行列
LaTeX | 実行結果 |
---|---|
\begin{matrix} a & b \\ c & d \\ \end{matrix} |
![]() |
\begin{matrix} c(1)^{n-1} & \dots & c(1)^2 & c(1) & 1 \\ c(2)^{n-1} & \dots & c(2)^2 & c(2) & 1 \\ \vdots & \ddots & \vdots & \vdots & \vdots \\ c(n)^{n-1} & \dots & 1 & 0 & 0 \end{matrix} |
![]() |
|x| = \begin{cases} \phantom{-} x& \text{if } x \geq 0 \\ -x & \text{if } x<0 \end{cases} |
![]() |
R_\theta = \begin{bmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \phantom{-} \cos \theta \end{bmatrix} |
![]() |
一般的な数式要素
LaTeX | 実行結果 |
---|---|
\(\Delta S^\circ=\sum S^{\circ }\text{products} - \sum S^{\circ }\text{reactants}\) |
![]() |
HF(aq) +H_{2}O(l) \rightleftharpoons H_{3}O^{+} (aq) +F_{-}(aq) |
![]() |
\nabla \times \overrightarrow{\mathbf{B}} - \frac{1}{C} \frac{\delta \overrightarrow{\mathbf{E}}}{\delta t} = 4\pi \rho |
![]() |
x = \frac{- b\pm\sqrt{b^2-4a c}}{2a} |
![]() |
筆算
MathML | 実行結果 |
---|---|
<?xml version="1.0"?> <math xmlns="http://www.w3.org/1998/Math/MathML"> <mstack> <mscarries location='nw'> <none/> <mscarry crossout='updiagonalstrike' location='n'> <mn>2</mn> </mscarry> <mn>1</mn> <none/> </mscarries> <mn>2,327</mn> <msrow> <mo>-</mo> <mn> 1,156</mn> </msrow> <msline/> <mn>1,171</mn> </mstack> </math> |
|
<math xmlns="http://www.w3.org/1998/Math/MathML"> <mlongdiv> <mn> 12 </mn> <mn> 16.5 </mn> <mn> 198 </mn> <msgroup position='1' shift='-1'> <msgroup> <mn> 12</mn> <msline length='2'/> </msgroup> <msgroup> <mn> 78</mn> <mn> 72</mn> <msline length='2'/> <mn> 6.0</mn> <mn> 6.0</mn> </msgroup> <msgroup position='-1'> <!-- extra shift to move to the right of the "." --> <msline length='3'/> <mn> 0</mn> </msgroup> </msgroup> </mlongdiv> </math> |
|
<math xmlns="http://www.w3.org/1998/Math/MathML"> <mstack charspacing="loose"> <mscarries position="1"> <mn>1</mn> </mscarries> <mscarries position="1"> <mn>1</mn> <mn>2</mn> </mscarries> <mn>435</mn> <msrow> <mo>×</mo> <none/> <mn>25</mn> </msrow> <msline/> <mscarries position="2"> <mn>1</mn> </mscarries> <mn>2175</mn> <msrow position="1"> <mn>870</mn> </msrow> <msline/> <mn>10875</mn> </mstack> </math> |
|
iWork および iBooks Author は、LaTeX の割り算の筆算と剰余には対応していません。割り算の筆算と剰余を扱う場合は、MathML を使う必要があります。