I defined the following simple macro:
\def\greek#1{
\symbol{\numexpr"03B0+#1}
}
This is supposed to convert numbers into greek characters for numbering purposes (so 1 becomes α, 2 becomes β etc.). It does its job, but for some weird reason, it always creates a whitespace of about 3pt behind the character, so that \greek{1}\greek{2}\greek{3} looks like this:
when it should actually look like this:
I know that I can get rid of that space by simply doing something like
\def\greek#1{
\symbol{\numexpr"03B0+#1}\hspace{-3.33pt}
}
but that seems to be a rather "hacked" solution. Is there any better way to do this? Why does it even do that anyway?


\def\greek#1{SPACEis a space (newlines are spaces in TeX (as they are in markdown or html on this site) You are adding two such spaces – David Carlisle Aug 28 '22 at 16:50\def\greek#1{\symbol{\numexpr"03B0+#1}}(although better to use\newcommandrather than\def) – David Carlisle Aug 28 '22 at 16:53