Open shiblon opened 8 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).
Reported by shiblon
on 2009-10-20 18:19:41
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.
Reported by fdemesmay
on 2009-10-20 21:48:23
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.
Reported by shiblon
on 2009-10-21 13:18:46
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
Reported by fdemesmay
on 2009-10-21 13:30:40
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.
Reported by shiblon
on 2009-10-21 13:47:51
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
Reported by fdemesmay
on 2009-10-21 14:10:37
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.
Reported by shiblon
on 2009-10-21 15:12:36
Fixing issue dispenation.
Reported by shiblon
on 2009-10-21 19:17:08
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)
Reported by fdemesmay
on 2009-10-21 23:38:30
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 60 (copying binaries to another directory).
Please update this bug if it works (or especially if it doesn't)!
Reported by shiblon
on 2009-10-22 13:29:35
Fixed
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.
Reported by fdemesmay
on 2009-10-22 13:35:36
Excellent! Hopefully you will continue being bold about submitting issues. I want
to
continue improving it.
Reported by shiblon
on 2009-10-22 13:48:38
Verified
Originally reported on Google Code with ID 46
Reported by
fdemesmay
on 2009-10-18 09:15:50