When I write something like


for a C*-algebra, the space between * and - is too large. How do I change this? Are there general criteria on how much such space should be shrinked?

  • You can manually insert \! in mathmode for a small negative space. – Steven B. Segletes Jul 22 '13 at 14:00
  • Thanks! How do I know this is the "right" amount of negative space? (Or do I have to estimate on my own?) – Deniz Jul 22 '13 at 14:07
  • It's subjective in a case like this... just be consistent. – Steven B. Segletes Jul 22 '13 at 14:13

Here's an analysis of what happens:






\fbox{$\mathrm{C}^*$}\kern-.1ex-algebra &
$\mathrm{C}^*$\kern-.1ex-algebra \\
\fbox{$\mathrm{C}^*$}\kern-.15ex-algebra &
$\mathrm{C}^*$\kern-.15ex-algebra \\
\fbox{$\mathrm{C}^*$}\kern-.2ex-algebra &
$\mathrm{C}^*$\kern-.2ex-algebra \\
\fbox{$\mathrm{C}^*$}\kern-.25ex-algebra &
$\mathrm{C}^*$\kern-.25ex-algebra \\
\fbox{$\mathrm{C}^*$}\kern-.3ex-algebra &
$\mathrm{C}^*$\kern-.3ex-algebra \\

enter image description here

The first three rows show the normal typesetting, which I don't find really bad, but it's subjective. The following rows show the same with increasing amount of (negative) kerning; on the left you can see the relation of the hyphen with the bounding box of “C*”. When you have decided the right amount, do


and type \csalg{} when you want to use the term. Choose the name you prefer, of course. It's probably worthy defining it even if you eventually decide for no kerning.

| improve this answer | |
  • Has there ever been attempts to add automatic kerning between math and text? I especially don’t like the looks of $K$-algebra and vector space over~$K$.. Especially the extra space to the between the K and the dot is annoying to look at. The only automatic solution I have found so far is to make a callback in LuaTeX to test for specific combinations. – Gaussler Jun 1 '16 at 18:18
  • @Gaussler TeX doesn't provide anything for this. – egreg Jun 1 '16 at 18:24

This answer presents two other ideas:

Protruding value of package microtype

The TeX engine pdfteX supports a feature "character protrusion". Certain characters (e.g. -, ., ,) are allowed to move into the margins. This can improve the visual smoothness of the margins.

Macro \leftprotrude grabs the next character and looks at its value for the protrusion into the left margin. \lpcode<font><character slot> expands to an integer number, the unit is a per mill of 1em.

Package microtype enables character protrusion and configures some values for the protrusion (they are font-dependent).

Vertical position of the star

For fun, the example also shows some alternatives:

  • Text mode: \textsuperscript{*}
  • Math mode: star set as limit of an operator (\mathop).





  \CalgA{} & \CalgB{} & \CalgC{} & \small(unmodified) \\
  \CalgA{\leftprotrude} & \CalgB{\leftprotrude} & \CalgC{\leftprotrude}
    & \small\verb|\leftprotrude| \\
  \CalgA{\negthinspace} & \CalgB{\negthinspace} & \CalgC{\negthinspace}
    & \small\verb|\negthinspace| \\


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.