aboutsummaryrefslogtreecommitdiffstats
path: root/vmodels/latex2svg.sh
diff options
context:
space:
mode:
authorastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2011-05-16 15:15:04 +0000
committerastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2011-05-16 15:15:04 +0000
commitfb68069517cf879b8833b225cc552894c7634fb0 (patch)
tree3864684cc8ff1e8dd4fccb2c87062dcc2cb8ae8c /vmodels/latex2svg.sh
parent20c287b91345e348cc00b8a0da53ff967be0cac9 (diff)
downloadopt-utilities-fb68069517cf879b8833b225cc552894c7634fb0.tar.bz2
git-svn-id: file:///home/svn/opt_utilities@198 ed2142bd-67ad-457f-ba7c-d818d4011675
Diffstat (limited to 'vmodels/latex2svg.sh')
-rwxr-xr-xvmodels/latex2svg.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/vmodels/latex2svg.sh b/vmodels/latex2svg.sh
new file mode 100755
index 0000000..60061dc
--- /dev/null
+++ b/vmodels/latex2svg.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+# you need gs-common, pstoedit and skencil to
+# get this script working
+export BASENAME="`basename $1 .tex`";
+echo $BASENAME
+
+latex ${BASENAME}.tex
+
+dvips ${BASENAME}.dvi
+# Outline fonts
+eps2eps -dNOCACHE ${BASENAME}.ps ${BASENAME}2.ps
+
+# Fix bounding box
+ps2epsi ${BASENAME}2.ps ${BASENAME}.ps
+rm ${BASENAME}2.ps
+
+# Convert to Sketch
+pstoedit -f sk ${BASENAME}.ps ${BASENAME}.sk
+
+# Convert to SVG
+skconvert ${BASENAME}.sk ${BASENAME}.svg