dol: initial dol commit
[jump.git] / dol / examples / schema / createschemastex
diff --git a/dol/examples/schema/createschemastex b/dol/examples/schema/createschemastex
new file mode 100644 (file)
index 0000000..9b7fe4a
--- /dev/null
@@ -0,0 +1,91 @@
+#!/bin/bash
+
+##########################################################################
+# Script to collect together processnetwork.xsd, architecture.xsd, and
+# mapping.xsd into a single LaTeX document.
+#
+# Lines longer than 80 characters in the source files are truncated.
+# 
+# modification history:
+# 2006-08-22: created
+#
+##########################################################################
+
+##########################################################################
+# create LaTeX header
+##########################################################################
+
+echo -e %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'\n'\
+% XML Schema Definitions.'\n'\
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'\n'\
+'\n'\
+'\\'documentclass[11pt,oneside]{book}'\n'\
+'\\'usepackage{fancyhdr,ifthen,a4wide,textcomp,version,amsmath,bbm,url}'\n'\
+'\\'usepackage[latin1]{inputenc}'\n'\
+'\n'\
+%package for including listings'\n'\
+'\\'usepackage{listings}'\n'\
+'\\'lstset{basicstyle='\\'small, xleftmargin=12pt, numbersep=12pt, numbers=left,'\n'\
+         numberstyle='\\'tiny, numbersep=5pt}'\n'\
+%print two-digit line numbers'\n'\
+'\\'newcommand{'\\'twodig}[1]'\n'\
+   {'\\'ifcase#1 00'\\'or01'\\'or02'\\'or03'\\'or04'\\'or05'\\'or06'\\'or07'\\'or08'\\'or09'\\'else#1'\\'fi}'\n'\
+'\\'renewcommand{'\\'thelstnumber}{'\\'twodig{'\\'arabic{lstnumber}}}'\n'\
+'\n'\
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'\n'\
+%page layout and graphics path'\n'\
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'\n'\
+'\\'setlength{'\\'textwidth}{18 true cm}'\n'\
+'\\'setlength{'\\'textheight}{27.4 true cm}'\n'\
+'\\'oddsidemargin  -1.0 cm'\n'\
+'\\'evensidemargin -1.0 cm'\n'\
+'\\'topmargin      -2.4 cm'\n'\
+'\\'setlength{'\\'parindent}{0pt}'\n'\
+'\\'sloppy'\n'\
+'\\'flushbottom'\n'\
+'\\'pagestyle{empty}'\n'\
+'\n'\
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'\n'\
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'\n'\
+'\n'\
+'\\'begin{document} > latex_header.tex
+
+
+##########################################################################
+# create LaTeX footer
+##########################################################################
+
+echo -e '\\'end{document} > latex_footer.tex
+
+
+##########################################################################
+# create listings header and footer
+##########################################################################
+
+echo -e '\\'newpage'\n'\
+'\\'begin{lstlisting} > listing_header.tex
+
+echo -e '\\'end{lstlisting} > listing_footer.tex
+
+
+##########################################################################
+# create document
+##########################################################################
+
+cat latex_header.tex listing_header.tex processnetwork.xsd listing_footer.tex \
+                     listing_header.tex architecture.xsd   listing_footer.tex \
+                     listing_header.tex mapping.xsd listing_footer.tex latex_footer.tex > schemas.tex
+
+
+##########################################################################
+# truncate lines longer than 80 characters
+##########################################################################
+
+sed -i 's/\(^.\{80\}\).*/\1.../g' schemas.tex
+
+
+##########################################################################
+# remove help files
+##########################################################################
+
+rm -f latex_header.tex latex_footer.tex listing_header.tex listing_footer.tex
\ No newline at end of file