From 3b35e76b5bc121b48fd7e91810d09f5f62f1ecf1 Mon Sep 17 00:00:00 2001 From: astrojhgu Date: Tue, 17 May 2011 17:58:16 +0000 Subject: git-svn-id: file:///home/svn/opt_utilities@199 ed2142bd-67ad-457f-ba7c-d818d4011675 --- model_doc/bpl.tex | 15 +++++++++++++++ model_doc/latex2svg.sh | 28 ++++++++++++++++++++++++++++ model_doc/lin1d.tex | 11 +++++++++++ model_doc/make_doc.sh | 12 ++++++++++++ vmodels/bpl.hpp | 2 +- vmodels/lin1d.hpp | 2 +- 6 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 model_doc/bpl.tex create mode 100755 model_doc/latex2svg.sh create mode 100644 model_doc/lin1d.tex create mode 100755 model_doc/make_doc.sh 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}) + \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 } }; } 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 } }; } -- cgit v1.2.2