Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support \dddot from AMSTeX #2744

Closed
stefanspringer1 opened this issue Jan 20, 2021 · 5 comments · Fixed by #3834
Closed

Support \dddot from AMSTeX #2744

stefanspringer1 opened this issue Jan 20, 2021 · 5 comments · Fixed by #3834

Comments

@stefanspringer1
Copy link

\dddot from AMSTeX = three dots above should be supported. (KaTeX should support AMSTeX as far as possible, I think.)

@q2apro
Copy link

q2apro commented Jun 19, 2023

Is there any workaround how to do \dddot even with Katex?

@edemaine edemaine added the fonts label Jun 19, 2023
@edemaine
Copy link
Member

\stackrel{\cdot\cdot\cdot}{x} is not a terrible reproduction.
You can define this as a macro via {macros: {"\\dddot": "\\stackrel{\\cdot\\cdot\\cdot}{#1}"}}.

image

Maybe a better version is \stackrel{\raisebox{-0.2ex}{$\scriptsize\cdot\cdot\cdot$}}{x}.
Macro version: {macros: {"\\dddot": "\\stackrel{\\raisebox{-0.2ex}{$\\scriptsize\\cdot\\cdot\\cdot}}{#1}"}}

image

@edemaine
Copy link
Member

edemaine commented Jun 19, 2023

Reading AMSTeX's definition of \dddot:

\def\dddot#1{{\mathop{#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@
 \hbox{\normalfont ...}\vss}}}}

a maybe closer reproduction in KaTeX is \mathop{x}\limits^{\hbox{\normalsize ...}}
Or {macros: {"\\dddot": "\\mathop{#1}\\limits^{\\hbox{\normalsize ...}}"}}

image

But KaTeX seems to do the italic correction incorrectly, so this doesn't look great with e.g. A. Possibly related to #1821.

Oh, I just realized that the vertical alignment is off in all of these macros, so maybe they are not great. ☹️

image

@edemaine
Copy link
Member

One more version that fixes the vertical alignment (but still has the italic correction issue):

{\overset{\raisebox{-0.1ex}{\normalsize ...}}{x}}"
{macros: {"\\dddot": "{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"}}

image

Pretty close to LaTeX's rendering:

ql_1a7a1e0280b1d7ff4b6d093366e52dec_l3

This seems close enough that I'll work it into a PR.

edemaine added a commit that referenced this issue Jun 19, 2023
Fixes #2744 (though italic correction is off)
edemaine added a commit that referenced this issue Dec 8, 2024
* feat: \dddot and \ddddot support

Fixes #2744 (though italic correction is off)

* Document \dddot and \ddddot
KaTeX-bot added a commit that referenced this issue Dec 8, 2024
## [0.16.14](v0.16.13...v0.16.14) (2024-12-08)

### Features

* \dddot and \ddddot support ([#3834](#3834)) ([bda35cd](bda35cd)), closes [#2744](#2744)
@KaTeX-bot
Copy link
Member

🎉 This issue has been resolved in version 0.16.14 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants