TransWikia.com

How to define a fixed spacing between characters independent of font-size?

TeX - LaTeX Asked by Miladiouss on August 23, 2021

As it can be seen in the following two equations, the spacing between the first two A’s depends on the font size and changes if the new AA symbol is used in a fraction.

- ${Ahspace{-.7ex}A}{AA}$
- $frac{Ahspace{-.7ex}A}{AA}$

enter image description here

I have tried em, mm, and pt with no success. How can one define a negative spacing that functions the same way everywhere, independent of the font size?

Or similarly, how can I define a new composit symbol (e.g. AA) that looks the same everywhere?

2 Answers

Set it up to account for the math style.

documentclass{article}
newcommanddblA{mathchoice
{Ahspace{-.7ex}A}
{Ahspace{-.7ex}A}
{Ahspace{-.58ex}A}
{Ahspace{-.55ex}A}%
}
begin{document}
$dblA AA$

$scriptstyledblA AA$

$scriptscriptstyledblA AA$
end{document}

enter image description here

Correct answer by Steven B. Segletes on August 23, 2021

Use mathematical kerns, that automatically adapt to the style.

documentclass{article}

DeclareRobustCommand{AAA}{Amkern-5mu A}

begin{document}

[
AAAfrac{AAA}{AA}textstylefrac{AAA}{AA}scriptstylefrac{AAA}{AA}
]

end{document}

enter image description here

Answered by egreg on August 23, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP