Width of minus sign in legend

Dear Rooters,

Apologies for this question, I have been searching high and low for the answer but haven’t found it yet! My problem is: I have a legend which shows “e^+p” and “e^-p” as two entries. The minus sign looks less wide than the plus sign, and this makes the legend look a bit untidy. Is there a way to get a minus sign that is the same width as the plus sign? A PAW user suggested that if I was using PAW, [-] would solve the problem. I haven’t used PAW, but it looks like this means to use a Greek dash (see for example Figure 7.12 on p.123 of the PAW User’s Guide linked from the PAW webpage). Is there a root equivalent? Apologies again for such a trivial question.

Many thanks!
Katie

I am investigating

This is how the minus appears. There not much we can do.
May be something like:

TLatex t(.5,.5, “e^{#scale[1.5]{-}p}”);

In typography there are three different pauses/minuses which you can achieve (I’m sure you know this already) in LaTeX using - – — or $-$. There is difference in length between normal dash “-” and minus “$-$” (last one is longer).

I would suggest:

I haven’t test it, hope it works fine.

…:: edit

I see, that latex works in mathematical mode by default, so it should be little bit different:

or maybe

What you suggested doesn’t work with TLatex. The only minus available is the one you get by typing the [minus] key on the keyboard.

Katieo,
Well, in that case, if you want produce nice pictures, you must put some markers instead of titles and using original LaTeX and additional packages (pstricks as far I remember) you can overwrite this markers in LaTeX.

If you really need this.

Couet, but does TLatex(,-) prints the same output like normal “-” (without LaTeX). In LaTeX these both are different.

TLatex is a subset of the real LaTex and is far to implement all LaTex does.

Thank you all, I appreciate your comments. I tried to use #scale, but to my eye it makes the “-” too thick, although it is the right length. I will try pstricks…

Best wishes,
Katie

I think I may have come up with a quick and dirty fix. Instead of “-”, I can use the underscore character, “_” then I can use the new #lower command (in Version 5.28/00) to raise the _ upwards. Do you think it would work? I currently use version 5.17/05, so the new commands aren’t available to me at the moment.

Yes 5.17 is too old for #lower. But the idea you have should be ok.

FYI, I found a better solution. I changed the font of the plus and minus signs to font 12 (symbol-medium-r-normal) i.e #font[122]{-}. Then both appear the same width.

I suppose the font I am using in the legend is just unsuitable.

Thanks all!

#plus and #minus are now implemented in 5.34 and trunk

1 Like

FWIW, I managed a workaround for those bound to previous versions (like 5.34/05) by using the symbol font:#font[122]{-}
This requires TTF support.

@ adavid:

Look at katieo last post in this thread. That exactly what was said. I Guess your post can be deleted if you agree