mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 19:28:39 +00:00
This adds support for the following input sequences: -- --- ` ' `` '' \degree \pounds \maltese resulting in – — ‘ ’ “ ” ° £ ✠ symbols already present in our fonts. As part of this modification, the recognition of multiple dashes was moved from the lexer to the parser. This is neccessary since in math mode a sequence of hyphens is just a sequence of minus signs. Just like a pair of apostrophes in math mode is a double prime not a right double quotation mark. To make this easier, parseGroup and parseOptionalGroup have been merged.
43 lines
1014 B
TeX
43 lines
1014 B
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{etoolbox}
|
|
\setlength{\parindent}{0pt}
|
|
\pagestyle{empty}
|
|
|
|
\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$}
|
|
\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}
|