%=============================================================================
% File:  stanli.tex -- Structural Analysis Library based on PGF/TikZ
% Author(s): Juergen Hackl <[email protected]>
% Creation:  20 Dec 2016
% Time-stamp: <Mit 2016-12-21 10:22 juergen>
%
% Copyright (c) 2016 Juergen Hackl <[email protected]>
%
% More information on LaTeX: http://www.latex-project.org/
%=============================================================================

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[%
 a4paper,
 BCOR20mm,
 pointlessnumbers,
 twoside,
 halfparskip,
 openright,
]{scrreprt}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% PACKAGES
\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage{ae,aecompl}
\usepackage[automark]{scrpage2}
\usepackage[pdftex]{graphicx}
\usepackage[margin=0.75in]{geometry}
\usepackage{xcolor}
\usepackage{listings}
\usepackage{stanli}
\usetikzlibrary{backgrounds}

\usepackage[%
 pdftex=true,
 hypertexnames=false,
 plainpages=false,
 pdfpagelabels,
 pagebackref=false,
 colorlinks=false,
 bookmarks=true,
 bookmarksopen=true,
 bookmarksnumbered=true,
 pdftitle={TikZ Library for Structural Analysis},
 pdfauthor={Juergen HACKL},
 pdfcreator={Accomplished with LaTeX2e and pdfLaTeX with hyperref-package.},
]{hyperref}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% SELF-DEFINED MACROS
\newcommand{\tikzsym}{Ti\emph{k}Z }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Header, Footer, Page format
\setlength{\paperheight}{30cm}
\setlength{\textheight}{24.5cm}
\setlength{\paperwidth}{21cm}
\setlength{\textwidth}{16.8cm}
\setlength{\oddsidemargin}{-0.3cm}
\setlength{\evensidemargin}{-0.3cm}
\setlength{\parindent}{0cm}
\setlength{\topmargin}{-1.9cm}
\setlength{\headsep}{1.3cm}
\setlength{\footskip}{1.5cm}

\pagestyle{scrheadings}
\setheadsepline{.4pt}
\automark[section]{chapter}
\clearscrheadfoot

\ohead[]{\footnotesize{\headmark}}
\ifoot{\footnotesize{TikZ Library for Structural Analysis}}
\ofoot[\footnotesize{\pagemark}]{\footnotesize{\pagemark}}

\addtokomafont{caption}{\small}
\addtokomafont{captionlabel}{\small}
\setkomafont{captionlabel}{\sffamily\bfseries}

\graphicspath{{./pictures/}}

\definecolor{ibfblue}{cmyk}{0.49,0.22,.15,0}

\lstset{ %
basicstyle=\scriptsize\ttfamily,
commentstyle=\itshape\color{black!70},
stepnumber=2,
backgroundcolor=\color{ibfblue!40},
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2,
captionpos=b,
breaklines=true,
breakatwhitespace=false,
title=\lstname,
escapeinside={+*}{*+},
morekeywords={*,...},
stringstyle=\ttfamily,
emphstyle={\color{red}\bfseries},
}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% DOCUMENT
\begin{document}

\tikzset{background rectangle/.style={fill=yellow!30}}

\pagenumbering{Roman}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% contents: Titlepage                                                %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{titlepage}
 \begin{center}
   \vspace{25mm}
   \textsf{\textbf{\huge Ti\textit{k}Z Library for Structural Analysis}}\\
   \Large{\texttt{stanli} User Guide, Version 3.0}\\
   \vspace{5mm}
   \Large{J\"urgen Hackl}\\
   \normalsize \href{mailto:[email protected]}{[email protected]}\\
   \vspace{5mm}
   \today

\begin{tikzpicture}[framed]
       \scaling{.65};

       \point{a}{0}{1}; %2
       \point{b}{3}{1};        %3
       \point{c}{11}{3};       %4
       \point{d}{19}{1};       %5
       \point{e}{22}{1};       %6
       \point{f}{3}{0}; %1
       \point{g}{11}{-2};      %8
       \point{h}{19}{0};       %7

       \beam{1}{a}{b}[0][1];
       \beam{1}{b}{c}[1][1];
       \beam{1}{c}{d}[1][1];
       \beam{1}{d}{e}[1][0];
       \beam{1}{f}{b};
       \beam{1}{d}{h};
       \beam{2}{f}{g};
       \beam{2}{g}{h};
       \beam{2}{g}{c};

       \support{1}{f};
       \support{2}{h};

       \hinge{1}{f};
       \hinge{1}{h};
       \hinge{1}{g};
       \hinge{2}{c}[b][d];

       \lineload{2}{a}{b}[1][1][.5];
       \lineload{2}{b}{c};

       \dimensioning{1}{a}{b}{-2.5}[$3,0$];
       \dimensioning{1}{b}{c}{-2.5}[$8,0$];
       \dimensioning{1}{c}{d}{-2.5}[$8,0$];
       \dimensioning{1}{d}{e}{-2.5}[$3,0$];
       \dimensioning{2}{f}{a}{-1}[$1,0$];
       \dimensioning{2}{g}{f}{-1}[$2,0$];
       \dimensioning{2}{a}{c}{-1}[$2,0$];

       \influenceline{a}{e}{3}[.3];

       \notation{1}{a}{$1$}[left];
       \notation{1}{b}{$2$}[below right=2mm];
       \notation{1}{c}{$3$};
       \notation{1}{d}{$4$}[above];
       \notation{1}{e}{$5$}[above];
       \notation{1}{f}{$6$}[left=2mm];
       \notation{1}{g}{$7$}[below=2mm];
       \notation{1}{h}{$8$}[right=2mm];

       \notation{4}{f}{g}[$S$];

\end{tikzpicture}

\begin{minipage}[t]{0.45\linewidth}\begin{lstlisting}
\begin{tikzpicture}
       \scaling{.65};

       \point{a}{0}{1};
       \point{b}{3}{1};
       \point{c}{11}{3};
       \point{d}{19}{1};
       \point{e}{22}{1};
       \point{f}{3}{0};
       \point{g}{11}{-2};
       \point{h}{19}{0};

       \beam{1}{a}{b}[0][1];
       \beam{1}{b}{c}[1][1];
       \beam{1}{c}{d}[1][1];
       \beam{1}{d}{e}[1][0];
       \beam{1}{f}{b};
       \beam{1}{d}{h};
       \beam{2}{f}{g};
       \beam{2}{g}{h};
       \beam{2}{g}{c};

       \support{1}{f};
       \support{2}{h};

       \hinge{1}{f};
       \hinge{1}{h};

\end{lstlisting}\vspace{-7mm}
\end{minipage}
\hfill
\begin{minipage}[t]{0.45\linewidth}\begin{lstlisting}
       \hinge{1}{g};
       \hinge{2}{c}[b][d];

       \lineload{2}{a}{b}[1][1][.5];
       \lineload{2}{b}{c};

       \dimensioning{1}{a}{b}{-2.5}[$3,0$];
       \dimensioning{1}{b}{c}{-2.5}[$8,0$];
       \dimensioning{1}{c}{d}{-2.5}[$8,0$];
       \dimensioning{1}{d}{e}{-2.5}[$3,0$];
       \dimensioning{2}{f}{a}{-1}[$1,0$];
       \dimensioning{2}{g}{f}{-1}[$2,0$];
       \dimensioning{2}{a}{c}{-1}[$2,0$];

       \influenceline{a}{e}{3}[.3];

       \notation{1}{a}{$1$}[left];
       \notation{1}{b}{$2$}[below right=2mm];
       \notation{1}{c}{$3$};
       \notation{1}{d}{$4$}[above];
       \notation{1}{e}{$5$}[above];
       \notation{1}{f}{$6$}[left=2mm];
       \notation{1}{g}{$7$}[below=2mm];
       \notation{1}{h}{$8$}[right=2mm];
       \notation{4}{f}{g}[$S$];

\end{tikzpicture}

\end{lstlisting}\vspace{-7mm}
\end{minipage}


\end{center}
\end{titlepage}