Latex in Igor?
bech
So, having an option to replace Igor's system of control for labels, etc. with Latex syntax would improve the program (and make it easier to learn for those who already know Latex).
________________________________________________________
On Feb 2, 2012, at 5:18 PM, David Nicholls wrote:
> I've been trying to insert a "vertical" fraction character into an annotation on a graph. i.e. I want the equivalent of the LaTex $\frac{1}{2}$
>
From: Jim Prouty
Subject: Re: Vertical fractions in annotations? LaTeX? (Mac)
You can use the escape codes to do this directly:
This is \[1\S1\y-15\L1400\X1\Y1\M\B2\M of the total
________________________________________________________
Out of curiosity, do you know of any programs that do this?
February 3, 2012 at 03:24 pm - Permalink
I could settle for something akin to LinkBack on the Mac using LaTeXiT, where an annotation text would become a dynamic link to an engine that parses the LaTeX code. The inverse of this process is what many want Igor to be able to do after they paste a graph in to a Word document -- have that graph serve as a dynamic link back to Igor for making changes.
ps -- The ability of (annotation) objects in Igor to serve as "buttons" that call out to scripts and then fill their contents with the return contents would be a generally useful thing all around.
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
February 3, 2012 at 05:10 pm - Permalink
The LaTeX Pictures.ipf procedure file implements a "LaTeX Pictures" panel which uses a web site to render LaTeX math equations into PNG bitmaps. Igor 6.20 or later is required.
This version generates only PNG pictures that can be drawn in Igor annotations and with DrawPICT (Igor's drawing tools).
This is mostly a proof-of-concept project that would be improved by finding or establishing an online LaTeX-to-PDF renderer to provide high-resolution equations.
See the project page for more details and to download the procedure file.
http://www.igorexchange.com/project/LaTeXPictures
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
February 8, 2012 at 06:36 pm - Permalink
http://www.codecogs.com/latex/eqneditor.php
It would be quite easy to construct the right URL for this site.
February 9, 2012 at 12:33 am - Permalink
String formula, picture = ""
formula = replacestring(" ", formula, "&space;")
print formula
formula = "http://latex.codecogs.com/pdf.download?" + formula
EasyHttp/TIME=10/File="foobar:Users:anz:Desktop:eqn.pdf" formula
//alternatively
//EasyHttp/TIME=10 formula, picture
print V_flag
End
Function test()
getexample("x=\frac{-b\pm\\sqrt{b^2-4ac}}{2a }")
End
February 9, 2012 at 06:31 pm - Permalink
Not so much on Windows, where Igor can't load PDFs as pictures. Perhaps EMF can work, though what I've seen from that site looks pretty bad in EMF format.
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
February 11, 2012 at 09:38 am - Permalink
Oh dear, when will Microsoft learn how to create proper screen display.
How about PNG, that seems to work ok.
February 11, 2012 at 01:43 pm - Permalink
Isn't that still BITMAPPED though?
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
February 11, 2012 at 05:09 pm - Permalink
theta = base + (max - base) / (1 + (K_d/x)^rate)
It is the hill equation which I have entered in the user defined function section. Annoyingly, Igor presents the formula nicely in the fitting GUI, but there is no way to lift or otherwise export this to, for example, an annotation. Ive been digging thru the escape codes thanks to this thread, but have yet to find any documentation that explains just exactly what each code is doing, and trying to work backwards from the example given in the OP here resulted in many headaches.
Ultimately I suppose I will just paste in a picture of the formula from another program, but it sure would be neat to have the same matching text etc as Igor and not have to bandage things like that.
EDIT: Microsoft paint to the rescue. made a copy graph with all the required symbols etc and just copy pasted them into place in the final image file. Ugh.
April 24, 2013 at 05:59 am - Permalink
The Curve Fitting dialog displays images of the built-in equations that are stored as application resources. It is not possible for a user to access these directly.
The escape codes used in annotations and text boxes are explained in the command help entry for TextBox. Look in the details section. You can execute the following command to bring up the help:
In case you missed Jim's post above, you can use the LaTeX Pictures package to assist with this.
April 24, 2013 at 06:03 am - Permalink
April 25, 2013 at 01:03 am - Permalink
Look in the Details section of the help topic that follows the Flags section - the various escape codes, such as \S = Subscript, are listed there.
April 25, 2013 at 01:42 am - Permalink
April 25, 2013 at 04:11 am - Permalink