From 71881e3d36bd5d07c6fadf017eb3c667d61e2ee3 Mon Sep 17 00:00:00 2001 From: Martin von Gagern Date: Thu, 10 Sep 2015 16:05:23 +0200 Subject: [PATCH] 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. --- test/screenshotter/ss_data.yaml | 5 ++--- test/screenshotter/test.tex | 10 ++++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/test/screenshotter/ss_data.yaml b/test/screenshotter/ss_data.yaml index fa722761e..2e45694a1 100644 --- 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
blah tex: x^{\Huge y}z diff --git a/test/screenshotter/test.tex b/test/screenshotter/test.tex index bc64a5640..2945e8b8c 100644 --- 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$}