%
% $LastChangedRevision: 4180 $
% $LastChangedDate:: 2026-04-07 18:02:35 +0200#$
%
% This file is part of X2C. http://x2c.lcm.at/
%
% Copyright (c) 2013, Linz Center of Mechatronics GmbH (LCM) http://www.lcm.at/
% All rights reserved.
%
%
% This file is licensed according to the BSD 3-clause license as follows:
%
% Redistribution and use in source and binary forms, with or without
% modification, are permitted provided that the following conditions are met:
%     * Redistributions of source code must retain the above copyright
%       notice, this list of conditions and the following disclaimer.
%     * Redistributions in binary form must reproduce the above copyright
%       notice, this list of conditions and the following disclaimer in the
%       documentation and/or other materials provided with the distribution.
%     * Neither the name of the "Linz Center of Mechatronics GmbH" and "LCM" nor
%       the names of its contributors may be used to endorse or promote products
%       derived from this software without specific prior written permission.
%
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
% ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
% WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
% IN NO EVENT SHALL "Linz Center of Mechatronics GmbH" BE LIABLE FOR ANY
% DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
% (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
% LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
% ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
% (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
% SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
%

% ---------- LANGUAGE / FONTENCODING --------
\usepackage[T1]{fontenc}
%\usepackage[latin9]{inputenc}
\usepackage[scaled]{uarial}	% use a font similar to arial
\usepackage[american]{babel}
% change language with \selectlanguage{american}
% ------------------------------------------

% --------------- PROGRAMMING --------------
\usepackage{calc} % allows calculation of parameters, e.g. calculation of cell lengths
% ------------------------------------------

% ----------- PAPER SIZE / MARGINS --------
\usepackage{geometry}
\geometry{a4paper,bottom=1cm,top=1.2cm,includeheadfoot}

\usepackage{pdflscape}
% -----------------------------------------


% ---------- DEFINE CUSTOM COLORS ---------
\ifdefined\useRegularTable
  \usepackage[table]{xcolor}
\else
  \usepackage{xcolor}
\fi
\definecolor{hrefcolor}{rgb}{0,0,0.7} % darkblue
\definecolor{listingcolor}{rgb}{0.95,0.95,0.95} % lightgray
% -----------------------------------------

% ------------ GLOBAL FORMATTING ----------
\usepackage{sectsty}
\allsectionsfont{\sffamily\upshape} % (See the fntguide.pdf for font help)
\renewcommand{\familydefault}{\sfdefault}

\setlength{\parindent}{0em} % indentination of first line of a paragraph

\usepackage{microtype}
\microtypesetup{protrusion = false}
\frenchspacing
% -----------------------------------------

% ---------- NOFLOAT  / FLOATS ------------
\usepackage{float}
% ------------------------------------------

% --------------- TABLES -------------------
% set tabular environment properties
\setlength{\tabcolsep}{1em} % half distance between to columns
\setlength{\arrayrulewidth}{1pt} % thickness of vertical and horizontal lines
\setlength{\doublerulesep}{1mm} % distance between double lines
\renewcommand{\arraystretch}{1.2} % multiplication factor for line distance

%\usepackage{longtable}
% -----------------------------------------

% ----------- FIGURES / DRAWINGS ----------
\usepackage{graphicx}
\DeclareGraphicsExtensions{.png,.pdf,.eps,.jpg} 
\usepackage{subfig} % make it possible to include more than one captioned figure/table in a single float
% ------------------------------------------


% ---------- USERDEFINED LISTINGS ----------
\usepackage{listings}

% special setting for java code listing
\newcommand{\jlisting}{
  \lstset{language = Java,%
    numbers = none,%
    numbersep = -5pt,%
    numberstyle = \tiny,%
    numberblanklines = true,%
    linewidth=\linewidth,          % line width
    breaklines=true,               % line break
    breakatwhitespace=true,        % line break at spaces
    frame = lines,%
    basicstyle = \small,%
    extendedchars = true,%
    backgroundcolor = \color{listingcolor}%
    }%
}

% special setting for matlab code listing
\newcommand{\mlisting}{
  \lstset{language = Matlab,%
    numbers = left,%
    numbersep = -5pt,%
    numberstyle = \tiny,%
    numberblanklines = true,%
    linewidth=\linewidth,          % line width
    breaklines=true,               % line break
    breakatwhitespace=true,        % line break at spaces
    frame = lines,%
    basicstyle = \small,%
    extendedchars = true,%
    backgroundcolor = \color{listingcolor}%
    }%
}

% special setting for c code listing
\newcommand{\clisting}{
  \lstset{language = C,%
    numbers = none,%
    numbersep = -5pt,%
    numberstyle = \tiny,%
    numberblanklines = true,%
    linewidth=\linewidth,          % line width
    breaklines=true,               % line break
    breakatwhitespace=true,        % line break at spaces
    frame = lines,%
    basicstyle = \small,%
    extendedchars = true,%
    backgroundcolor = \color{listingcolor}%
    }%
}

% special setting for command line code listing
\newcommand{\cmdlisting}{
  \lstset{language = {command.com},% windows xp command line
    numbers = none,%
    numbersep = -5pt,%
    numberstyle = \tiny,%
    numberblanklines = true,%
    linewidth=\linewidth,          % line width
    breaklines=true,               % line break
    breakatwhitespace=true,        % line break at spaces
    frame = single,%
    basicstyle = \small,%
    extendedchars = true%
    }%
}

\newcommand{\verblisting}{ % not for general use, only for autogenerated things!
  \lstset{
    language={},
    backgroundcolor=\color{white},
    linewidth=\linewidth,          % line width
    breaklines=true,               % line break
    breakatwhitespace=true,        % line break at spaces
    breakindent = 0pt,
    numbers = none,
    frame = none%
  }
}
% ------------------------------------------    


% --------------- FORMULAS ------------------
\usepackage{amsmath}
% ------------------------------------------

% ------------------ INDEX -----------------
\usepackage{makeidx}
\makeindex
% ------------------------------------------


% ------------- HEADER - FOOTER ------------
\usepackage{fancyhdr}
\usepackage{lastpage}
% -------------------------------------------

% ------------ INPUTPATH -------------------
\newcommand{\InputPath}{.}
% ------------------------------------------

% --------------- TITLEPAGE ---------------
\ifdefined \XcHomePath
  \newcommand{\generalPath}{\XcHomePath/Documentation/General/Styles}
  \usepackage{\generalPath/X2C/specificX2C}
\fi

\ifdefined \XtoCDoku
\usepackage{\generalPath/X2C/X2CDokuStyle}
\fi
% ------------------------------------------

% ------------ LINKS in PDF ----------------
\usepackage{hyperref} % should be last package included

\hypersetup{colorlinks=true,%
 breaklinks=true,%
 linkcolor=hrefcolor,%
 menucolor=hrefcolor,%
 urlcolor=hrefcolor,%
 citecolor=hrefcolor}
% ------------------------------------------

% ----------- Correction of "array" and "eqnarray" Environments -----------
\ifdefined \spaceWidth
\else
  \newlength \spaceWidth
  \settowidth \spaceWidth {\ensuremath{\mkern\thickmuskip}}
  \BeforeBeginEnvironment {array} {\begingroup\setlength\arraycolsep{\spaceWidth}}
  \AfterEndEnvironment    {array} {\endgroup}
  \BeforeBeginEnvironment {eqnarray} {\begingroup\setlength\arraycolsep{0.5\spaceWidth}}
  \AfterEndEnvironment    {eqnarray} {\endgroup}
\fi

% ----------- Correction of Apostrophe -----------
\def \ttapostrophe {\fontencoding{OT1}\selectfont\symbol{13}}