mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-06 17:45:17 +00:00
Patch from Dekel for fig2pstex
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@819 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
60a085fb1c
commit
7590dcfa98
@ -1,3 +1,7 @@
|
|||||||
|
2000-06-16 Dekel Tsur <dekel@math.tau.ac.il>
|
||||||
|
|
||||||
|
* lib/scripts/fig2pstex.py: New file
|
||||||
|
|
||||||
2000-06-16 Juergen Vigna <jug@sad.it>
|
2000-06-16 Juergen Vigna <jug@sad.it>
|
||||||
|
|
||||||
* src/insets/insettabular.C (UpdateLocal):
|
* src/insets/insettabular.C (UpdateLocal):
|
||||||
|
@ -63,8 +63,9 @@ Template XFig
|
|||||||
EditCommand "xfig $$FName"
|
EditCommand "xfig $$FName"
|
||||||
AutomaticProduction true
|
AutomaticProduction true
|
||||||
Format LaTeX
|
Format LaTeX
|
||||||
Product "$$Contents(\"$$Basename.tex\")"
|
Product "\\begin{picture}(0,0)\\includegraphics{$$Basename.eps}\\end{picture}\\input{$$Basename.pstex_t}"
|
||||||
UpdateCommand "fig2dev $$Parameters -L latex $$FName $$Basename.tex"
|
UpdateCommand "python $$Sysdir/scripts/fig2pstex.py $$FName $$Parameters"
|
||||||
|
Requirement "graphics"
|
||||||
FormatEnd
|
FormatEnd
|
||||||
Format Ascii
|
Format Ascii
|
||||||
Product "$$Contents(\"$$Basename.asc\")"
|
Product "$$Contents(\"$$Basename.asc\")"
|
||||||
|
23
lib/scripts/fig2pstex.py
Normal file
23
lib/scripts/fig2pstex.py
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
# This script converts a xfig file into Postscript/LaTeX files
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
|
filename = sys.argv[1]
|
||||||
|
basename = os.path.splitext(filename)[0]
|
||||||
|
parameters = sys.argv[2:]
|
||||||
|
|
||||||
|
pid = os.fork()
|
||||||
|
if pid == 0:
|
||||||
|
os.execvp("fig2dev", ["fig2dev", "-Lpstex"] + parameters + [filename, basename + ".eps"])
|
||||||
|
print "fig2dev did not work"
|
||||||
|
os.exit(1)
|
||||||
|
os.wait()
|
||||||
|
|
||||||
|
pid = os.fork()
|
||||||
|
if pid == 0:
|
||||||
|
os.execvp("fig2dev", ["fig2dev", "-Lpstex_t"] + parameters + [filename, basename + ".pstex_t"])
|
||||||
|
print "convert did not work second time"
|
||||||
|
os.exit(1)
|
||||||
|
os.wait()
|
Loading…
Reference in New Issue
Block a user