Closed GoogleCodeExporter closed 9 years ago
A couple of comments:
1) You are right - there is no automatic way to avoid having .tex files be main
targets, but you can name them like mydotfile._include_.dot and get around it
that
way
2) Is there any reason you can't use the existing dot->eps facilities and
include them
as images? One of the perils of using .tex file inclusion is that latex is
really bad at
notifying us that it ran into a dependency that it couldn't resolve (it doesn't
work
properly in batchmode, for example, so it requires multiple invocations to find
all of
the .tex includes, which frankly sucks). So, we'd have to do some weird stuff
to make
it work (see ps_tex hacks in the makefile, for example).
Original comment by shiblon
on 20 Oct 2009 at 6:19
1) OK :)
2) No, there is no way to use the dot->eps toolchain. You probably don't know
what
dot2tex does but one example is that it produces dot graphs that have nodes that
contain latex math. Obviously latex is needed somewhere in the loop.
Original comment by fdemes...@gmail.com
on 20 Oct 2009 at 9:48
Actually, you can use dot->eps and still get formulas and proper fonts in your
node
labels. The way I have done this is by using the excellent psfrag module.
I'm pretty hesitant to include yet another tex-producing format, since so far
all of the
previous ones have been unmitigated disasters :(. I do encourage you to look
into
psfrag. It's pretty amazing, and has always worked wonders for me.
I can give examples if needed.
Original comment by shiblon
on 21 Oct 2009 at 1:18
Mmh, I didn't know about psfrag and it would probably have suit my needs...
albeit it
looks like more of a hack... I understand though that you're reluctant to
include
mainsteam support for dot2tex, so I'll keep my code for me :D
Original comment by fdemes...@gmail.com
on 21 Oct 2009 at 1:30
Question, then - how should this be invoked?
dot2tex infile.dot > outfile.dot_t
That's what I'm leaning toward. Note that the makefile *can't* build these
automatically
for you. It *can*, however, error out with a helpful instruction to call "make
all-dot2tex"
before proceeding, which is what I eventually had to do to support pstex.
Original comment by shiblon
on 21 Oct 2009 at 1:47
Hum, I'm not 100% sure what you are referring nor what you are implying with
your
changes since I never used pstex.
The following is the correct way to invoke dot2tex.
$(DOT) -Txdot 'infile.dot' | dot2tex --figonly > 'outfile.tex';
And of course, inside your latex file:
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
and of course:
\input{outfile.tex}
Also note that my line above with the "latex -shell-escape" is not required
Original comment by fdemes...@gmail.com
on 21 Oct 2009 at 2:10
Regarding pstex, it's just a way to convert .fig files into .tex files
(pstex_t, really). So,
it's pretty similar to this whole dot2tex idea, in that the final result is a
set of tex
commands. Therefore, this approach has issues similar to that used for pstex.
That's
why I brought it up.
Looking at the dot2tex documentation, it appears that you can just do
$(DOT2TEX) 'infile.dot' > 'outfile.dot_t'
Note that I gratuitously changed .tex to .dot_t. This makes it easier for
people to
differentiate between documents and graphic files. You can still do
\input{outfile.dot_t} and it works fine.
I am submitting a new revision to the head, and would like you to try it out.
You'll
have to change all of your \input{blah.tex} entries to be \input{blah.dot_t},
but that
should be easy for you to do. Try r62 and let me know what you think.
Original comment by shiblon
on 21 Oct 2009 at 3:12
Fixing issue dispenation.
Original comment by shiblon
on 21 Oct 2009 at 7:17
Impressive! It works really nicely.
I guess there's only one small fix I would add to your code: I would change all
the
allfiles target to be user settable in the Makefile.ini (aka change := to ?=)
The reason is that it enables people to have their own dot2tex files in another
directory than the root. Typically, I just did this for myself like this:
all_files.dot := $(wildcard *.dot) $(wildcard dot2tex/*.dot)
(and it works perfectly)
Original comment by fdemes...@gmail.com
on 21 Oct 2009 at 11:38
Excellent. I am committing this and increasing the version number to 2.1.33.
You can
get this version as r64.
That version also fixes issue 47 (copying binaries to another directory).
Please update this bug if it works (or especially if it doesn't)!
Original comment by shiblon
on 22 Oct 2009 at 1:29
It works flawlessly.
Thanks for all the support. Your project is really a *GREAT* piece of work. I
can't
stress enough how useful it is.
Original comment by fdemes...@gmail.com
on 22 Oct 2009 at 1:35
Excellent! Hopefully you will continue being bold about submitting issues. I
want to
continue improving it.
Original comment by shiblon
on 22 Oct 2009 at 1:48
Original issue reported on code.google.com by
fdemes...@gmail.com
on 18 Oct 2009 at 9:15