Introduction
Creating graphics for latex can be a real pain. There are a number of
different options for doing this, though none of them is completely ideal.
If you're comfortable using regular latex and generating DVI's, then the
pstricks package is a very powerful tool.
If you prefer generating PDF (now an open standard) files (as I do) then the
PGF/TikZ
latex packages are a very powerful and can do just about everything… except
that you have to code your graphics… which is a very slow iterative process.
The GNU Diagramming tool Dia can create
block diagrams and flow charts and can export either pstricks
or tikz
code. Inkscape is a much nicer user-oriented graphical vector drawing tool,
but doesn't have native support for for LaTex, and creating graphics including
LaTeX math-mode is a real pain. In any case, I've found a number of situations
where a figure like the following was pretty easy to do create in Inkscape.
[caption id="attachment_373" align="aligncenter" width="351" caption="Inkscape Figure for LaTeX"]![Inkscape Figure for LaTeX](http://128.31.5.103/wordpress /wp-content/uploads/2010/04/vortexElement.png)[/caption]
Getting the Fonts
In order to get the math font's to look like they do in LaTeX, though, you
need to have the font's installed where Inkscape can find them. Unfortunately,
LaTex uses type1
postscript fonts, while Inkscape can only find font's that
windows has installed in the system, which includes true-type or open-type
fonts. Fortunately you can get the fonts for "Computer Modern" (Knuth's Font
uses as the default in LaTeX) from the TeX archives in these formats. Simply
download these fonts, and install them in windows (drag them to
C:/Windows/Fonts). The next time you run Inkscape, it will have these font's
available and you can use them in your pretty graphics.
Other Fonts
There are some other font's that you'll find used by latex that aren't in OTF or TTF format though. The only (open-source) way I've found to convert type-1 font's to OTF is through an ancient tool called Font- Forge. It's an X-Windows program so you'll have to install the Cygwin x-server, or, luckily, someone has ported it to MinGW (native Win32).
Tex Text plugin
Lately, I've been using the Tex Text plugin instead of using latex fonts with regular inkscape text. The interface is a little tedious, but it works quite well (and it's a lot less tedious then laying out the text by hand).
Commentaires
Comments powered by Disqus