Inserting overline

I am interested in placing an overline above a number for XRD peak labeling. I managed to get something reminiscent of what I want using the unicode U+0305 character, however the overline is offset from the number, as shown in the attached image (supposed to over the final "1").

Is there a clever way to do this so that it's not offset? I would like to incorporate this into a procedure, but may end up doing it manually by drawing lines, if need be.

Using code like \Z24\[01\X0¯23

Displayhelptopic "Elaborate Annotations".

The help topic about this feature seems too simpe in Igor 7. You can get a detailed description in Igor 6.37 using displayhelptopic "Elaborate Text Info Variables Example" instead.
I did some experimentation with "combining overline" and the results were... not great. Here is my attempt:
TextBox/N=overline "12"+U+0305+"3"
The result depends on the font. On my Macintosh, using Helvetica, the overline is in the correct place horizontally, but it seems designed for lower case combining letters.
If I change to Arial on Macintosh, I get something that looks a lot like the original picture; the overline is high enough, but misplaced horizontally.
This gets really close using only Igor's annotation escape codes:
In this, the \Z16 just makes the font bigger. Then there's a "1", then a code to save the current position into variable 0, then a "2", then a code to raise the drawing position to a place over the characters in the line, then a code to draw a 1-point line from the position saved in variable 0 to the current X position, a code to restore the drawing Y position, then a "3". Result is attached- it looks like with Helvetica font on a Macintosh the X position for the 3 isn't quite right...

John Weeks
WaveMetrics, Inc.
JimProuty wrote:
I've attached a procedure I wrote for an XRD customer a while ago that adds an "Add Crystal Annotation..." item to the Graph menu.

Perhaps that'll help.

--Jim Prouty
Software Engineer, WaveMetrics, Inc.

Hi Jim,

This is great and exactly what I need. Thanks for sharing.

Thanks everyone who answered!

Yes, this is WAY easier than the Igor version!  Unfortunately, the implementation of LaTeX in Igor seems very limited.  For example, \dot{x} does not work, even though it does work in the online editor at, which is what I thought Igor uses.

In recent work, we've had to use awkward (and not very pretty) kluges with dots in graphics mode.  Writing a procedure code as above also does not seem attractive.

Any comments as to why \dot{x} does not work in $WMTEX$ ?

While this does not answer your question, you know that you can just use unicode characters for this right? As the manual states, Igor uses only a subset of commands, which are most useful and otherwise would be tedious to realize. You can also write an email to the support with commands you need to create your annotations and the staff may consider adding it.

Thanks.  I am not too familiar with using special unicode characters.  Do you know how this would work?  (One would want to add the dot -- and occasionally a double-dot -- to a chosen letter, not just 'x'.)

And, yes, I know that Igor only implements a subset of LaTeX.  I just thought it was a larger set than it seems to be.  But adding various things over or under a letter (dots, tildes, bars, etc.) are just the kind of thing that I often need and for which Igor has been very klugey.  It seems to me a fairly basic / standard category that should be better supported.

I can only guess that any additional command needs to be specifically implemented by the Igor team, and they rather want to avoid recreating all this stuff which can be achieved differently in a simple way.

As for unicode support, this is easy: Just copy the character from a unicode table or website or use the character map from within Igor (Character => Character Map). If you happen to know the code for the character you want, you can also enter codes directly by choosing Character => Enter Character and then write the character code in hex. For example, for a dot over the small x the code is 0x1E8B. Copying the character from a document or website is usually easiest. For example, you can have a small file with all characters you usually use listed, so you can quickly copy them in. Here is a list of characters with a dot above:

Naturally, the font you use needs to support the character. You can, of course, always switch to a different font in-between just for these special characters.

Thanks, chozo!  I can't get this to work -- I have to say that WM's manual on how to use UTF-8 characters is confusing at best.  I don't see how to get your code as a label on a graph.  For example, I did put in (in the Label axis dialog)


but this gives an overdot that is to the left of the W, not on top as I want.

When I try \{0x1E8B} I just get the string '7819' (in smaller font, amusingly), so again not what is hoped for....

Regarding your speculations about why there are so few LaTeX commands implemented, I suppose that is a reasonable explanation. But I would have naively thought there is a way to leverage all that coding to the LaTeX program itself, so that all that would be needed is to make sure the proper package is included.  Having to program each character seems a painful way to go.

Maybe WM folks can comment on all this?

You can use a Unicode combining character to get a W with a dot above using this command:

Label bottom "W\\{U+0307}"

U+02D9 is Unicode "dot above", but that's not what you actually want.

Igor doesn't use the LaTeX package itself. All supported LaTeX commands use our own drawing code (some of which might have been adapted from the original LaTeX drawing code).

Thanks, aclight.  That will work for now (it's not beautiful for Wdot but is better for Fdot).

I guess this will count as a plea for \dot{x}, \ddot{x}, and \vec{x}.  I notice you have \overline{x} and \tilde{x}, so these would be natural "cousins" of those symbols.  Using slightly bigger dots (more like "small filled circles") and placing them slightly higher than the unicode would look much nicer.

PS  Accommodating italics (math mode) characters is also important.  At least for me, this issue is arising in describing the rate of change of a variable.  It looks like the unicode does not work with italics.  (Or, I couldn't get it to work...)

An alternative option on macOS could be to use LaTeXiT, create a PDF or PNG image for the label text, import the image to the experiment, and add the image as the label.

The best option would be when Igor Pro would have a flag or preference setting to indicate that a LaTeX string should be run through a local LaTeX compiler to create the text.