commit 71881e3d36bd5d07c6fadf017eb3c667d61e2ee3
parent 8accf0f18a17852fceb8cc9421508491f8cd5cde
Author: Martin von Gagern <gagern@ma.tum.de>
Date: Thu, 10 Sep 2015 16:05:23 +0200
Make texcmp work again, including KaTeX logo
Since all the math font test cases use the KaTeX logo, we need that.
I started with the definition of the logo from katex.less, but tweaked that
until it gave a good visual match, in particular a very similar logo width,
no matter the actual numbers.
With that logo, most tests can be compiled again, with the exception of the
one containing illegal functions to test visual error reporting.
That one needs to be explicitely disabled.
Diffstat:
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/test/screenshotter/ss_data.yaml b/test/screenshotter/ss_data.yaml
@@ -52,9 +52,7 @@ Exponents: a^{a^a_a}_{a^a_a}
FractionTest: \dfrac{a}{b}\frac{a}{b}\tfrac{a}{b}\;-\dfrac12\;1\tfrac12
Functions: \sin\cos\tan\ln\log
GreekLetters: \alpha\beta\gamma\omega
-KaTeX:
- tex: \KaTeX
- nolatex: There is no LaTeX command for this (yet)
+KaTeX: \KaTeX
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
@@ -108,6 +106,7 @@ 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
diff --git a/test/screenshotter/test.tex b/test/screenshotter/test.tex
@@ -1,6 +1,8 @@
\documentclass[10pt]{article}
\usepackage{amsmath,amssymb}
+\usepackage[mathscr]{eucal}
+\usepackage{eufrak}
\usepackage[papersize={133pt,100pt},margin=0.5pt]{geometry}
\usepackage{color}
\usepackage{etoolbox}
@@ -9,6 +11,14 @@
\newcommand{\blue}[1]{\textcolor{blue}{#1}}
+\DeclareRobustCommand{\KaTeX}{\mbox{%
+K\kern-.26em%
+{\sbox0 T\vbox to\ht0{\kern.05em\hbox%
+ {\fontsize{.75em}{1em}\selectfont A}%
+\vss}}%
+\kern-.23em%
+\TeX}}
+
% Thanks to http://tex.stackexchange.com/a/26017/16923
\newtoks\kasizetoks
\def\kasizecollect#1{\afterassignment\kasizeapply\kasizetoks=\bgroup#1$}