[OS X TeX] SVG to LaTeX?
Alain Schremmer
Schremmer.Alain at gmail.com
Thu Jun 29 00:53:50 CEST 2006
Maarten Sneep wrote:
> I see two options here:
> 1) the svg file is encoded in UTF-16. Opening the file is a text
> editor (TextWrangler, SubEthaEdit) will allow you to determine this.
> 2) The file includes some binary material.
>
> I guess it is #1, feff seems like a byte order mark for UTF-16, but I
> may be mistaken.
>
> The solution is to treat the file as binary (encode in Base-64, and
> extract in multiple stages). I think the code to do that was already
> posted before in this thread.
>
> Of course, this assumes the error is in or near the filecontents
> environment.
This kind of investigation is not my forte. (Not even my piano.) However
I think I have made progress:
1) When I open mypicture.svg with SubethaEdit, I can email the code (See
below.) As mentioned before, not so with TeXShop.
2) Thus filled of hope, I pasted the SubethaEdit code in place of
... SVG coding for a picture ...
3) And now, when I try to typeset, I get something entirely different:
LaTeX Warning: Writing file `./mypicture.svg'.
(./TestForSVG.aux)
(/usr/local/teTeX/share/texmf.tetex/tex/context/base/supp-pdf.tex
(/usr/local/teTeX/share/texmf.tetex/tex/context/base/supp-mis.tex
loading : Context Support Macros / Missing
)
loading : Context Support Macros / PDF
)sh: line 1: svg2pdf: command not found
LaTeX Warning: File `mypicture.pdf' not found on input line 294.
Error: /usr/local/teTeX/bin/powerpc-apple-darwin-current/pdflatex
(file mypictu
re.pdf): cannot find image file
==> Fatal error occurred, the output PDF file is not finished!
4) And, indeed,
- In addition to the files
(my)picture.svg The (renamed) original file
mypicture.svg The file LaTeX just created
TestForSVG.log
TestForSVG.idx
TestForSVG.tex TestForSVG.pdf The output of the
original TestForSVG with just the text "TESTING"
there is now also the files
TestForSVG.aux
TestForSVG.pdfsync
- mypicture.svg is not empty anymore:
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC
"-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><!--Generated
by Intaglio, www.PurgatoryDesign.com--><svg
viewBox="0,0,576,734" xmlns="http://www.w3.org/2000/svg"
version="1.1"><path fill="#fff" stroke="#000" d="M201,196
L422,196 L422,290 L201,290 Z"></path></svg><?xml version="1.0"
standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><!--Generated
by Intaglio, www.PurgatoryDesign.com--><svg
viewBox="0,0,576,734" xmlns="http://www.w3.org/2000/svg"
version="1.1"><path fill="#fff" stroke="#000" d="M201,196
L422,196 L422,290 L201,290 Z"></path></svg>
- But Intaglio still thinks that the page is empty which would be a
problem for later "graphic editing".
So, all of this seems to say that extraction has been completed but that
conversion cannot be done so that,
> The second part of [my] problem is that the program svg2pdf must be
> installed and available for this to work at all,
and I have no idea how to do that. I hope to be able to pick the brain
of a friend next week.
Very grateful regards.
--schremmer
P.S. The TeXShop version of mypicture.svg starts with the two characters
that survived in my first post. When I tried to paste then in front of
the SubEthaEdit version, it said: Warning: You are trying to insert
characters that cannot be handled by the file's current encoding. Do you
want to cancel the change or promote to a richer encoding: Unicode?
UTF8? I tried both in place of'
... SVG coding for a picture ...
but neither worked and both gave error messages that looked very much
like the one above.
------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
More information about the macostex-archives
mailing list