diff options
-rw-r--r-- | model_doc/bpl.tex | 15 | ||||
-rwxr-xr-x | model_doc/latex2svg.sh | 28 | ||||
-rw-r--r-- | model_doc/lin1d.tex | 11 | ||||
-rwxr-xr-x | model_doc/make_doc.sh | 12 | ||||
-rw-r--r-- | vmodels/bpl.hpp | 2 | ||||
-rw-r--r-- | vmodels/lin1d.hpp | 2 |
6 files changed, 68 insertions, 2 deletions
diff --git a/model_doc/bpl.tex b/model_doc/bpl.tex new file mode 100644 index 0000000..814ccd1 --- /dev/null +++ b/model_doc/bpl.tex @@ -0,0 +1,15 @@ +\documentclass{article} +\usepackage{amsmath} +\usepackage{amssymb} +\usepackage{amsfonts} + +\thispagestyle{empty} +\begin{document} +\begin{equation} + y=\left\{\begin{array}{c} + y_{\rm break}(\frac{x}{x_{\rm break}})^{\gamma_1} (x<x_{\rm break})\\ + y_{\rm break}(\frac{x}{x_{\rm break}})^{\gamma_2} (x>=x_{\rm break}) + \end{array} + \right .\notag +\end{equation} +\end{document} diff --git a/model_doc/latex2svg.sh b/model_doc/latex2svg.sh new file mode 100755 index 0000000..4a216a4 --- /dev/null +++ b/model_doc/latex2svg.sh @@ -0,0 +1,28 @@ +#!/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 + +echo -e return "\"\c" >${BASENAME}.info + +cat ${BASENAME}.svg | sed -e ':a;N;$!ba;s/\n//g' -e 's/\"/\\\"/g' >>${BASENAME}.info + +echo \"\; >>${BASENAME}.info diff --git a/model_doc/lin1d.tex b/model_doc/lin1d.tex new file mode 100644 index 0000000..e474924 --- /dev/null +++ b/model_doc/lin1d.tex @@ -0,0 +1,11 @@ +\documentclass{article} +\usepackage{amsmath} +\usepackage{amssymb} +\usepackage{amsfonts} + +\thispagestyle{empty} +\begin{document} +\begin{equation} + y=kx+b\notag +\end{equation} +\end{document} diff --git a/model_doc/make_doc.sh b/model_doc/make_doc.sh new file mode 100755 index 0000000..d0aee70 --- /dev/null +++ b/model_doc/make_doc.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +for i in *.tex +do + ./latex2svg.sh $i +done + +rm -f *.aux +rm -f *.sk +rm -f *.ps +rm -f *.dvi +rm -f *.log diff --git a/vmodels/bpl.hpp b/vmodels/bpl.hpp index 5f60ae4..a1f43aa 100644 --- a/vmodels/bpl.hpp +++ b/vmodels/bpl.hpp @@ -63,7 +63,7 @@ namespace opt_utilities private: std::string do_get_information()const { - return ""; +#include <model_doc/bpl.info> } }; } diff --git a/vmodels/lin1d.hpp b/vmodels/lin1d.hpp index 7f150d3..701e8e3 100644 --- a/vmodels/lin1d.hpp +++ b/vmodels/lin1d.hpp @@ -54,7 +54,7 @@ namespace opt_utilities private: std::string do_get_information()const { -#include "lin1d.info" +#include <model_doc/lin1d.info> } }; } |