3 ##########################################################################
4 # Script to collect together processnetwork.xsd, architecture.xsd, and
5 # mapping.xsd into a single LaTeX document.
7 # Lines longer than 80 characters in the source files are truncated.
9 # modification history:
12 ##########################################################################
14 ##########################################################################
16 ##########################################################################
18 echo -e %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'\n'\
19 % XML Schema Definitions.'\n'\
20 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'\n'\
22 '\\'documentclass[11pt,oneside]{book}'\n'\
23 '\\'usepackage{fancyhdr,ifthen,a4wide,textcomp,version,amsmath,bbm,url}'\n'\
24 '\\'usepackage[latin1]{inputenc}'\n'\
26 %package for including listings'\n'\
27 '\\'usepackage{listings}'\n'\
28 '\\'lstset{basicstyle='\\'small, xleftmargin=12pt, numbersep=12pt, numbers=left,'\n'\
29 numberstyle='\\'tiny, numbersep=5pt}'\n'\
30 %print two-digit line numbers'\n'\
31 '\\'newcommand{'\\'twodig}[1]'\n'\
32 {'\\'ifcase#1 00'\\'or01'\\'or02'\\'or03'\\'or04'\\'or05'\\'or06'\\'or07'\\'or08'\\'or09'\\'else#1'\\'fi}'\n'\
33 '\\'renewcommand{'\\'thelstnumber}{'\\'twodig{'\\'arabic{lstnumber}}}'\n'\
35 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'\n'\
36 %page layout and graphics path'\n'\
37 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'\n'\
38 '\\'setlength{'\\'textwidth}{18 true cm}'\n'\
39 '\\'setlength{'\\'textheight}{27.4 true cm}'\n'\
40 '\\'oddsidemargin -1.0 cm'\n'\
41 '\\'evensidemargin -1.0 cm'\n'\
42 '\\'topmargin -2.4 cm'\n'\
43 '\\'setlength{'\\'parindent}{0pt}'\n'\
46 '\\'pagestyle{empty}'\n'\
48 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'\n'\
49 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'\n'\
51 '\\'begin{document} > latex_header.tex
54 ##########################################################################
56 ##########################################################################
58 echo -e '\\'end{document} > latex_footer.tex
61 ##########################################################################
62 # create listings header and footer
63 ##########################################################################
65 echo -e '\\'newpage'\n'\
66 '\\'begin{lstlisting} > listing_header.tex
68 echo -e '\\'end{lstlisting} > listing_footer.tex
71 ##########################################################################
73 ##########################################################################
75 cat latex_header.tex listing_header.tex processnetwork.xsd listing_footer.tex \
76 listing_header.tex architecture.xsd listing_footer.tex \
77 listing_header.tex mapping.xsd listing_footer.tex latex_footer.tex > schemas.tex
80 ##########################################################################
81 # truncate lines longer than 80 characters
82 ##########################################################################
84 sed -i 's/\(^.\{80\}\).*/\1.../g' schemas.tex
87 ##########################################################################
89 ##########################################################################
91 rm -f latex_header.tex latex_footer.tex listing_header.tex listing_footer.tex