mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 03:08:40 +00:00
* Update texcmp to ubuntu 17.04 and avoid mounted host directory Switch to linux 17.04 in order to have a version of nodejs which understands ES6 syntax, for the sake of a consistent codebase. Avoid mounting the host directory, but use “docker cp” instead to transfer files between host and container. This should avoid ownership and permission issues. Support macros with positional arguments. Fix one overline example which caused LaTeX failure due to missing braces. * Extract texcmp results as current user This allows running the texcmp.sh script using sudo on afs. * Change texcmp conversion to gray As per #708, this should increase compatibility with older versions of imagemagick, and might also do a better job of preserving the original sRGB color space. * Abandon tar and use plain docker cp instead Thanks to Erik Demaine for suggesting this. * Move npm install into creation of texcmp docker image
193 lines
7.7 KiB
YAML
193 lines
7.7 KiB
YAML
# List of test cases for which we create screenshots and other documents.
|
|
# Each value in the top level dictionary is either a string or a dict
|
|
# which may contain the following keys:
|
|
# - tex: the KaTeX input string
|
|
# - pre: some HTML to insert before the KaTeX content
|
|
# - post: some HTML to insert after the KaTeX content
|
|
# - display: set this to 1 in order to use display style
|
|
#
|
|
# Note that YAML will treat a value starting in { as a flow mapping.
|
|
# To avoid that, either enclose the value in '…' or use a block scalar style,
|
|
# writing | (or >) as the first symbol of the value and then continuing
|
|
# on the next line. See http://www.yaml.org/ for syntax details.
|
|
|
|
Accents: \vec{A}\vec{x}\vec x^2\vec{x}_2^2\vec{A}^2\vec{xA}^2
|
|
Aligned: |
|
|
\begin{aligned}
|
|
a &= 1 & b &= 2 \\
|
|
3a &= 3 & 17b &= 34
|
|
\end{aligned}
|
|
Arrays: |
|
|
\left(\begin{array}{|rl|c||}
|
|
1&2&3\\
|
|
1+1&2+1&3+1\cr1\over2&\scriptstyle 1/2&\frac12\\[1ex]
|
|
\begin{pmatrix}x\\y\end{pmatrix}&0&\begin{vmatrix}a&b\\c&d\end{vmatrix}
|
|
\end{array}\right]
|
|
ArrayMode:
|
|
tex: |
|
|
\begin{matrix}
|
|
\frac{\partial^2 f}{\partial x_1^2} & \frac{\partial^2 f}{\partial x_1\,\partial x_2} & \cdots & \frac{\partial^2 f}{\partial x_1\,\partial x_n} \\
|
|
\frac{\partial^2 f}{\partial x_2\,\partial x_1} & \frac{\partial^2 f}{\partial x_2^2} & \cdots & \frac{\partial^2 f}{\partial x_2\,\partial x_n} \\
|
|
\vdots & \vdots & \ddots & \vdots \\
|
|
\frac{\partial^2 f}{\partial x_n\,\partial x_1} & \frac{\partial^2 f}{\partial x_n\,\partial x_2} & \cdots & \frac{\partial^2 f}{\partial x_n^2}
|
|
\end{matrix}
|
|
display: 1
|
|
ArrayType: 1\begin{array}{c}2\\3\end{array}4
|
|
Baseline: a+b-c\cdot d/e
|
|
BasicTest: a
|
|
BinCancellation: |
|
|
\begin{array}{cccc}
|
|
+1 & 1+ & 1+1 & (,) \\
|
|
1++1 & 3\times) & 1+, & \left(,\right)
|
|
\end{array}
|
|
BinomTest: \dbinom{a}{b}\tbinom{a}{b}^{\binom{a}{b}+17}
|
|
BoldSpacing: \mathbf{A}^2+\mathbf{B}_3*\mathscr{C}'
|
|
Cases: |
|
|
f(a,b)=\begin{cases}
|
|
a+1&\text{if }b\text{ is odd} \\
|
|
a&\text{if }b=0 \\
|
|
a-1&\text{otherwise}
|
|
\end{cases}
|
|
Colors:
|
|
tex: \blue{a}\color{#0f0}{b}\color{red}{c}
|
|
nolatex: different syntax and different scope
|
|
ColorSpacing: \color{red}{\displaystyle \int x} + 1
|
|
DashesAndQuotes: \text{``a'' b---c -- d----`e'-{-}-f}--``x''
|
|
DeepFontSizing:
|
|
tex: |
|
|
a^{\big| x^{\big(}}_{\Big\uparrow} +
|
|
i^{i^{\Huge x}_y}_{\Huge z} +
|
|
\dfrac{\Huge x}{y}
|
|
nolatex: \Huge inside \dfrac doesn't work, needs an extra {…}
|
|
DelimiterSizing: |
|
|
\bigl\uparrow\Bigl\downarrow\biggl\updownarrow
|
|
\Biggl\Uparrow\Biggr\Downarrow\biggr\langle\Bigr\}\bigr\rfloor
|
|
DisplayMode:
|
|
tex: \sum_{i=0}^\infty \frac{1}{i}
|
|
pre: pre
|
|
post: post
|
|
display: 1
|
|
DisplayStyle: |
|
|
{\displaystyle\sqrt{x}}{\sqrt{x}}
|
|
{\displaystyle \frac12}{\frac12}{\displaystyle x^1_2}{x^1_2}
|
|
Exponents: a^{a^a_a}_{a^a_a}
|
|
FractionTest: \dfrac{a}{b}\frac{a}{b}\tfrac{a}{b}\;-\dfrac12\;1\tfrac12\;{1 \atop 2}
|
|
Functions: \sin\cos\tan\ln\log
|
|
Gathered: |
|
|
\begin{gathered}
|
|
x = \frac{1}{2} \\
|
|
y = \sum_{i=1}^n i
|
|
\end{gathered} \approx
|
|
\begin{array}{c}
|
|
x = \frac{1}{2} \\
|
|
y = \sum_{i=1}^n i
|
|
\end{array}
|
|
GreekLetters: \alpha\beta\gamma\omega
|
|
GroupMacros:
|
|
macros:
|
|
\startExp: e^\bgroup
|
|
\endExp: \egroup
|
|
tex: \startExp a+b\endExp
|
|
KaTeX: \KaTeX
|
|
Kern:
|
|
tex: \frac{a\kern{1em}b}{c}a\kern{1em}b\kern{1ex}c\kern{-0.25em}d
|
|
nolatex: LaTeX fails to typeset this, “Missing number, treated as zero.”
|
|
Lap: ab\llap{f}cd\rlap{g}h
|
|
LeftRight: \left( x^2 \right) \left\{ x^{x^{x^{x^x}}} \right.
|
|
LeftRightListStyling: a+\left(x+y\right)-x
|
|
LeftRightMiddle: \left( x^2 \middle/ \right) \left\{ x^{x^{x^{x^x}}} \middle/ y \right.\left(x\middle|y\,\middle|\,z\right)
|
|
LeftRightStyleSizing: |
|
|
+\left\{\rule{0.1em}{1em}\right.
|
|
x^{+\left\{\rule{0.1em}{1em}\right.
|
|
x^{+\left\{\rule{0.1em}{1em}\right.}}
|
|
LimitControls: |
|
|
\displaystyle\int\limits_2^3 3x^2\,dx + \sum\nolimits^n_{i=1}i +
|
|
\textstyle\int\limits_x^y z
|
|
MathAtom: a\mathrel{\mathop{=}\limits^{\blue ?}}b
|
|
MathAtom2: \mathop{\overline{\mathrm{lim}}}\limits_{x\to\infty}f(x)
|
|
MathDefaultFonts: Ax2k\breve{a}\omega\Omega\imath+\KaTeX
|
|
MathBb: \mathbb{Ax2k\breve{a}\omega\Omega\imath+\KaTeX}
|
|
MathBf: \mathbf{Ax2k\breve{a}\omega\Omega\imath+\KaTeX}
|
|
MathCal: \mathcal{Ax2k\breve{a}\omega\Omega\imath+\KaTeX}
|
|
MathFrak: \mathfrak{Ax2k\breve{a}\omega\Omega\imath+\KaTeX}
|
|
MathIt: \mathit{Ax2k\breve{a}\omega\Omega\imath+\KaTeX}
|
|
MathRm: \mathrm{Ax2k\breve{a}\omega\Omega\imath+\KaTeX}
|
|
MathSf: \mathsf{Ax2k\breve{a}\omega\Omega\imath+\KaTeX}
|
|
MathScr: \mathscr{Ax2k\breve{a}\omega\Omega\imath+\KaTeX}
|
|
MathTt: \mathtt{Ax2k\breve{a}\omega\Omega\imath+\KaTeX}
|
|
Mod: |
|
|
\begin{array}{cc}
|
|
a \bmod 2 & b \pod 3 \\
|
|
c \pmod{4} & d \mod{56} \\
|
|
\displaystyle a\bmod 2 & \displaystyle b \pod 3 \\
|
|
\displaystyle c\pmod{4} & \displaystyle d \mod{56}
|
|
\end{array}
|
|
ModScript: |
|
|
\begin{array}{cc}
|
|
\scriptstyle a\bmod 2 & \scriptstyle b \pod 3 \\
|
|
\scriptstyle c\pmod{4} & \scriptstyle d \mod{56}
|
|
\end{array}
|
|
NegativeSpaceBetweenRel: A =\!= B
|
|
NestedFractions: |
|
|
\dfrac{\frac{a}{b}}{\frac{c}{d}}\dfrac{\dfrac{a}{b}}
|
|
{\dfrac{c}{d}}\frac{\frac{a}{b}}{\frac{c}{d}}
|
|
NullDelimiterInteraction: a \bigl. + 2 \quad \left. + a \right)
|
|
OldFont: |
|
|
\begin{matrix}
|
|
\rm rm & it & \it it & \bf bf & \sf sf & \tt tt \\
|
|
\text{\rm rm} & \text{rm} & \text{\it it} & \text{\bf bf} & \text{\sf sf} & \text{\tt tt} \\
|
|
i\rm r\it i & \text{r\it i\rm r}
|
|
\end{matrix}
|
|
OpLimits: |
|
|
{\sin_2^2 \lim_2^2 \int_2^2 \sum_2^2}
|
|
{\displaystyle \lim_2^2 \int_2^2 \intop_2^2 \sum_2^2}
|
|
OverUnderline: x\underline{x}\underline{\underline{x}}\underline{x_{x_{x_x}}}\underline{x^{x^{x^x}}}\overline{x}\overline{x}\overline{x^{x^{x^x}}} \blue{\overline{\underline{x}}\underline{\overline{x}}}
|
|
OverUnderset: |
|
|
\begin{array}{l}
|
|
x\overset?=1\\
|
|
{\displaystyle\lim_{t\underset{>0}\to0}}\\
|
|
a+b+c+d\overset{b+c=0}\longrightarrow a+d\\
|
|
\overset { x = y } { \sqrt { a b } }
|
|
\end{array}
|
|
Phantom: \dfrac{1+\phantom{x^{\blue{2}}} = x}{1+x^{\blue{2}} = x}
|
|
PrimeSpacing: f'+f_2'+f^{f'}
|
|
PrimeSuper: x'^2+x'''^2+x'^2_3+x_3'^2
|
|
RlapBug: \frac{\rlap{x}}{2}
|
|
Rule: \rule{1em}{0.5em}\rule{1ex}{2ex}\rule{1em}{1ex}\rule{1em}{0.431ex}
|
|
SizingBaseline:
|
|
tex: '{\tiny a+b}a+b{\Huge a+b}'
|
|
pre: x
|
|
post: M
|
|
Sizing: |
|
|
{\Huge x}{\LARGE y}{\normalsize z}{\scriptsize w}
|
|
Spacing: ^3+[-1][1-1]1=1(=1)\lvert a\rvert~b
|
|
Sqrt: |
|
|
\sqrt{\sqrt{\sqrt{x}}}_{\sqrt{\sqrt{x}}}^{\sqrt{\sqrt{\sqrt{x}}}
|
|
^{\sqrt{\sqrt{\sqrt{x}}}}}
|
|
SqrtRoot: |
|
|
1+\sqrt[3]{2}+\sqrt[1923^234]{2^{2^{2^{2^{2^{2^{2^{2^{2^{2^{2^2}}}}}}}}}}}
|
|
StackRel: a \stackrel{?}{=} b \stackrel{\text{def}}{=} c
|
|
StyleSpacing: \scriptstyle ab\;cd
|
|
StyleSwitching: a\cdot b\scriptstyle a\cdot ba\textstyle\cdot ba\scriptstyle\cdot b
|
|
SupSubCharacterBox: a_2f_2{f}_2{aa}_2{af}_2\mathbf{y}_Ay_A
|
|
SupSubHorizSpacing: |
|
|
x^{x^{x}}\Big|x_{x_{x_{x_{x}}}}\bigg|x^{x^{x_{x_{x_{x_{x}}}}}}\bigg|
|
|
SupSubLeftAlignReset: |
|
|
\omega^8_{888} \quad \frac{1}{\hat{\omega}^{8}_{888}} \quad \displaystyle\sum_{\omega^{8}_{888}}
|
|
SupSubOffsets: \displaystyle \int_{2+3}x f^{2+3}+3\lim_{2+3+4+5}f
|
|
Symbols1: |
|
|
\maltese\degree\pounds\$
|
|
\text{\maltese\degree\pounds\textdollar}
|
|
Text: \frac{a}{b}\text{c~ {ab} \ e}+fg
|
|
TextWithMath: \text{for $a < b$ and $ c < d $}.
|
|
Unicode: \begin{matrix}\text{ÀàÇçÉéÏïÖöÛû} \\ \text{БГДЖЗЙЛФЦШЫЮЯ} \\ \text{여보세요} \\ \text{私はバナナです} \end{matrix}
|
|
UnsupportedCmds:
|
|
tex: \err\,\frac\fracerr3\,2^\superr_\suberr\,\sqrt\sqrterr
|
|
noThrow: 1
|
|
errorColor: "#dd4c4c"
|
|
nolatex: deliberately does not compile
|
|
VerticalSpacing:
|
|
pre: potato<br>blah
|
|
tex: x^{\Huge y}z
|
|
post: <br>moo
|