aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xvmodels/latex2svg.sh22
-rw-r--r--vmodels/lin1d.hpp4
2 files changed, 23 insertions, 3 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
diff --git a/vmodels/lin1d.hpp b/vmodels/lin1d.hpp
index a16ce03..7f150d3 100644
--- a/vmodels/lin1d.hpp
+++ b/vmodels/lin1d.hpp
@@ -54,9 +54,7 @@ namespace opt_utilities
private:
std::string do_get_information()const
{
- return "<math><mrow> <mtext>f(x;k,b)=k x+b</mtext> \
- </mrow> \
-</math>";
+#include "lin1d.info"
}
};
}