mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-06 03:38:39 +00:00
Update `test/screenshotter/test.tex`'s definition of `\KaTeX` macro to match the metrics of `src/macros.js`'s definition of `\KaTeX`, and thereby fix #1703. I just changed the `\kern` metrics to match the update from #974, and left the font selection code to match LaTeX's definition of `\LaTeX`.
47 lines
1.1 KiB
TeX
47 lines
1.1 KiB
TeX
\documentclass[10pt]{article}
|
|
|
|
\usepackage{amsmath,amssymb,textcomp,gensymb}
|
|
\usepackage[mathscr]{eucal}
|
|
\usepackage{eufrak}
|
|
\usepackage[papersize={133pt,100pt},margin=0.5pt]{geometry}
|
|
\usepackage{color}
|
|
\usepackage{cancel}
|
|
\usepackage[normalem]{ulem}
|
|
\usepackage{etoolbox}
|
|
\setlength{\parindent}{0pt}
|
|
\pagestyle{empty}
|
|
|
|
\newcommand{\blue}[1]{\textcolor{blue}{#1}}
|
|
|
|
% Based on LaTeX's definition of \LaTeX, with L changed to K and kerns
|
|
% changed as in src/macros.js
|
|
\DeclareRobustCommand{\KaTeX}{\mbox{%
|
|
K\kern-.17em%
|
|
{\sbox0 T\vbox to\ht0{\hbox%
|
|
{\fontsize{.75em}{1em}\selectfont A}%
|
|
\vss}}%
|
|
\kern-.15em%
|
|
\TeX}}
|
|
|
|
% Thanks to http://tex.stackexchange.com/a/26017/16923
|
|
\newtoks\kasizetoks
|
|
\def\kasizecollect#1{\afterassignment\kasizeapply\kasizetoks=\bgroup#1$}
|
|
\def\kasizeapply{\mbox{\the\kasizetoks$\egroup}}
|
|
\def\kasize#1{\csletcs{ka#1}{#1}%
|
|
\csdef{#1}{\ifmmode\expandafter\kasizecollect\csname ka#1\endcsname%
|
|
\else\csname ka#1\endcsname\fi}}
|
|
\kasize{tiny}
|
|
\kasize{scriptsize}
|
|
\kasize{footnotesize}
|
|
\kasize{small}
|
|
\kasize{normalsize}
|
|
\kasize{large}
|
|
\kasize{Large}
|
|
\kasize{LARGE}
|
|
\kasize{huge}
|
|
\kasize{Huge}
|
|
|
|
\begin{document}
|
|
$...$
|
|
\end{document}
|