Discussion:
Suggestion: Inkscape External Document
Paul Johnson
2014-07-28 14:02:57 UTC
Permalink
Greetings

I've found Xfig to be increasingly difficult to use on newer Linux
systems and consider now using Inkscape. It seems to me I have to edit
the same document several times in order to get changes to take
effect. For some reason, the "special" flag on text doesn't stick the
way it used to. And the bezier curves aren't too smooth either. The
only reason I stay with Xfig is that Lyx has the built-in External
Document grabber thing that runs the script to export the 2 parts.

Now Inkscape has a similar --export-latex flag, described here:

http://www.ctan.org/tex-archive/info/svg-inkscape

That has preamble code that works exactly like the LyX external document s.

I think it would be nice if you incorporate that in LyX, save me the
trouble of running inkscape scripts separately.

I made a small test file and document to convince myself this would
work. It is much nicer to work with Inkscape than Xfig, and the
document compiled after I figured out it required graphicx and color
packages

http://pj.freefaculty.org/scraps/test.pdf
http://pj.freefaculty.org/scraps/test.pdf_tex
http://pj.freefaculty.org/scraps/testInkscape.lyx

And the output from that is:

http://pj.freefaculty.org/scraps/testInkscape.pdf

pj

Oh, one more thing. Did you see this nice shout-out to Lyx on the IBM
developerWorks website You've impressed somebody over there.

http://www.ibm.com/developerworks/linux/library/os-lyx/index.html?ca=drs

http://www.ibm.com/developerworks/linux/library/os-lyx/os-lyx-pdf.pdf
--
Paul E. Johnson
Professor, Political Science Assoc. Director
1541 Lilac Lane, Room 504 Center for Research Methods
University of Kansas University of Kansas
http://pj.freefaculty.org http://quant.ku.edu
Jean-Marc Lasgouttes
2014-07-28 14:18:00 UTC
Permalink
Post by Paul Johnson
I've found Xfig to be increasingly difficult to use on newer Linux
systems and consider now using Inkscape.
[...]
Post by Paul Johnson
http://www.ctan.org/tex-archive/info/svg-inkscape
That has preamble code that works exactly like the LyX external document s.
I think it would be nice if you incorporate that in LyX, save me the
trouble of running inkscape scripts separately.
This can be done by copying and modifying the Xfig entry in
external_templates. The format looks a bit intimidating at first sight,
but it is documented as far as I know.

JMarc
Julien Rioux
2014-07-28 20:17:55 UTC
Permalink
Post by Jean-Marc Lasgouttes
Post by Paul Johnson
I've found Xfig to be increasingly difficult to use on newer Linux
systems and consider now using Inkscape.
[...]
Post by Paul Johnson
http://www.ctan.org/tex-archive/info/svg-inkscape
That has preamble code that works exactly like the LyX external document s.
I think it would be nice if you incorporate that in LyX, save me the
trouble of running inkscape scripts separately.
This can be done by copying and modifying the Xfig entry in
external_templates. The format looks a bit intimidating at first sight,
but it is documented as far as I know.
JMarc
You would need to define the converters, too. But somebody already did
this and explained it here: http://www.lyx.org/trac/ticket/7510

Cheers,
Julien
Cyrille Artho
2014-07-28 23:01:17 UTC
Permalink
Post by Jean-Marc Lasgouttes
Post by Paul Johnson
I've found Xfig to be increasingly difficult to use on newer Linux
systems and consider now using Inkscape.
[...]
Post by Paul Johnson
http://www.ctan.org/tex-archive/info/svg-inkscape
That has preamble code that works exactly like the LyX external document s.
I think it would be nice if you incorporate that in LyX, save me the
trouble of running inkscape scripts separately.
This can be done by copying and modifying the Xfig entry in
external_templates. The format looks a bit intimidating at first sight,
but it is documented as far as I know.
JMarc
You would need to define the converters, too. But somebody already did this
and explained it here: http://www.lyx.org/trac/ticket/7510
Cheers,
Julien
Hi Paul and Julien,
I agree that having this feature would be great, so I hope the patch above
can be merged. Basically xfig is no longer being developed but Inkscape is
improving over time. So it's only a matter of time until Inkscape replaces
xfig even for long-time xfig users. It would be great if using Inkscape
images from LyX was as easy as using xfig images.
--
Regards,
Cyrille Artho - http://artho.com/
A rock pile ceases to be a rock pile the moment a single man
contemplates it, bearing within him the image of a cathedral.
-- Antoine de Saint-Exupery
Paul Johnson
2014-08-01 10:10:18 UTC
Permalink
http://www.lyx.org/trac/ticket/7510#comment:13


I see my idea has already received some attention. Nothing is truly new in
my idea.

It seems to me the patch proposer will not have his way. The patch needs
to be implemented against a full source checkout, bug checked, etc. I have
some difficulty understanding details here. My experience in writing
patches for other people's projects is that they will not take interest
unless a full, tested version is supplied.

I'm going to study in the external template JMarc mentions. For me, preview
of the inkscape drawing inside LyX is not vital, treating this like an xfig
is OK.

Short term, I will get in the habit of running the Inkscape export to the
two part file separately from lyx, then ERT \includesvg{}. The difficult
part is to remember to export the svg file. That is why the LyX external
doc thing for Xfig is helpful, it ameliorates human error. The eye candy is
not important to me.

This reminds me of an Xfig related question. Can I make a script to
accelerate LyX compiles by only running the xfig transfig code when truly
necessary. What do you say to this idea:

I'm going to see if I can script up the Inkscape SVG exporter so it only
makes a new version if the existing pdf_tex file is older than the inkscape
svg file. I don't know how that might be done, but I bet it involves find,
and at least one use in awk. Possibly two greps :)

PJ
Post by Cyrille Artho
Post by Jean-Marc Lasgouttes
Post by Paul Johnson
I've found Xfig to be increasingly difficult to use on newer Linux
systems and consider now using Inkscape.
[...]
Post by Paul Johnson
http://www.ctan.org/tex-archive/info/svg-inkscape
That has preamble code that works exactly like the LyX external document s.
I think it would be nice if you incorporate that in LyX, save me the
trouble of running inkscape scripts separately.
This can be done by copying and modifying the Xfig entry in
external_templates. The format looks a bit intimidating at first sight,
but it is documented as far as I know.
JMarc
You would need to define the converters, too. But somebody already did this
and explained it here: http://www.lyx.org/trac/ticket/7510
Cheers,
Julien
Hi Paul and Julien,
I agree that having this feature would be great, so I hope the patch above
can be merged. Basically xfig is no longer being developed but Inkscape is
improving over time. So it's only a matter of time until Inkscape replaces
xfig even for long-time xfig users. It would be great if using Inkscape
images from LyX was as easy as using xfig images.
--
Regards,
Cyrille Artho - http://artho.com/
A rock pile ceases to be a rock pile the moment a single man
contemplates it, bearing within him the image of a cathedral.
-- Antoine de Saint-Exupery
--
Paul E. Johnson
Professor, Political Science Assoc. Director
1541 Lilac Lane, Room 504 Center for Research Methods
University of Kansas University of Kansas
http://pj.freefaculty.org http://quant.ku.edu
Loading...