三款 iWork app(Pages、Numbers 和 Keynote)與 iBooks Author 皆支援 LaTeX 與 MathML。iWork 與 iBooks Author 皆支援所有能夠以 blahtex 轉換為 MathML 的 LaTeX 指令。以下列出其他支援的 LaTeX 延伸功能。
瞭解如何使用 LaTex 和 MathML,將方程式新增到 iWork 文件或 iBooks Author 書籍。
iCloud.com 上的 iWork app 中目前不支援 LaTeX 和 MathML。
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 子項,並忽略其他子項 |
mphantom | |
mfenced | |
mroot | |
msqrt | |
none | |
mstyle | |
mtext | |
ms | |
maligngroup | |
malignmark |
部分支援的 MathML 元件
元件 | 備註 |
---|---|
mlabeledtr | 已忽略視為含第一個子項的 <mtr> |
semantics | 視為 row |
annotation | 確實忽略 |
不支援的 MathML 元件
元件 | 備註 |
---|---|
mmultiscripts | |
mprescripts | |
mglyph | |
merror | |
{ContExp} | 不支援內容 MathML 元件。 查看 {ContExp} 涵蓋哪些元件。 |
MathML 屬性
若要瞭解 iWork 和 iBooks Author 支援的 MathML 屬性,請參閱下方表格。
支援的 MathML 屬性
iWork 和 iBooks Author 支援下列 MathML 屬性:
元件 | 屬性 | 可從 <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 屬性
iWork 和 iBooks Author 部分支援下列 MathML 屬性:
元件 | 屬性 | 可從 <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。