% Common preamble for manual and component reference

\usepackage[final]{graphicx}
\usepackage{amsfonts}
\usepackage{amsbsy}
\usepackage{ifdraft}

% A few macros:
\newcommand{\MCS}{McStas\xspace}
\newcommand{\mcs}{\texttt{mcstas}\xspace}
\newcommand{\version}{3.5\xspace}
\newcommand{\reldate}{August, 2024}

% Unused:
% The next rawfonts package one is used in the ``datablad''.
% FIXME \usepackage[only,egtrm]{rawfonts}
% Handle sorting in reference list
% FIXME \usepackage{citesort}
% For html links in install chapter (install latex2html package to get
% this style)
% \usepackage{html}

% Create an index table
\ifdraft{\usepackage{showidx}}{}
\usepackage{imakeidx}
\newcommand{\indexEV}[1]{\index{Environment variables!\texttt{#1}}\index{#1@\texttt{#1} (environment variable)}}
\newcommand{\indexKW}[1]{\index{#1@\texttt{#1} (McStas keyword)}}
\newcommand{\indexDOCSEC}[3]{\index{#1 (McDoc)@\texttt{#2} (McDoc section)|#3}}
\newcommand{\indexDOCKEY}[2]{\index{#1 (McDoc)@\texttt{#1} (McDoc keyword)|#2}}
\newcommand{\indexTOOL}[1]{\index{#1}}
\newcommand{\indexMCSW}[3]{\index{#1@\texttt{#1} (McStas #2)|#3}}
\newcommand{\indexMCTOOL}[2]{\indexMCSW{#1}{tool}{#2}}
\newcommand{\indexSIG}[2]{\index{#1 (signal)@\texttt{#1} (signal)|#2}\index{SIG#1@\texttt{SIG#1}|#2}\index{Signal handler!\texttt{#1} signal|#2}}
\newcommand{\indexLIB}[2]{\index{#1 (library)|#2}\index{Library!#1|#2}}
\newcommand{\indexMCRC}[2]{\index{#1 (C function mcstas-r.c)@\texttt{#1} (C function, mcstas-r.c)|#2}}
\newcommand{\indexMCRH}[2]{\index{#1 (C macro mcstas-r.h)@\texttt{#1} (C macro, mcstas-r.h)|#2}}
\newcommand{\indexMCCC}[2]{\index{#1 (C function mccode-r.c)@\texttt{#1} (C function, mccode-r.c)|#2}}
\newcommand{\indexMCCH}[2]{\index{#1 (C macro mccode-r.h)@\texttt{#1} (C macro, mccode-r.h)|#2}}
\newcommand{\indexRTLC}[2]{\index{#1 (C function read\_table-lib.c)@\texttt{#1} (C function, read\_table-lib.c)|#2}}
\makeindex % enable index generation

\usepackage{color}
\usepackage{xcolor}

\input{syntaxhighlighting}

\usepackage{xspace}
 
\newcommand{\smallverbatimfile}[1]{{\footnotesize\verbatimfile{#1}}}

\def\reportnum{DTU}
