Inserting overline

alexabelson
Posts: 8
Joined: 2016-10-21
Location: United States

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.

Thanks!

Capture.JPG

wings
Posts: 62
Joined: 2016-04-27
Location: China

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.


thomas_braun
Posts: 534
Joined: 2009-10-07
Location: Germany

I think in Igor 7 you can just combine the unicode characters, or?


Posts: 1868
Joined: 2007-06-29
Location: United States

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:
\Z161\[02\[1\y+45\L0600\Y03
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.
support@wavemetrics.com

AttachmentSize
junk.png1.74 KB

JimProuty's picture
Posts: 641
Joined: 2007-07-19
Location: United States

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.

AttachmentSize
XRD Examples.png8.46 KB
CrystallographyAnnotationIgor6.ipf2.31 KB

alexabelson
Posts: 8
Joined: 2016-10-21
Location: United States

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!


Back to top