%general
\newcommand{\textreg}{$^{\text{\textregistered}}$}
\newcommand{\Sr}[1]{\S\ref{#1} \nameref{#1}}
\newcommand{\Fref}[1]{Figure \ref{#1}}
\newcommand{\issue}[1]{{\bf(A-{#1})}}
\newcommand{\PVA}[1]{(PVA \S{#1})}
\newcommand{\superscript}[1]{$^{\text{#1}}$}
\newcommand{\errmessagedisp}[1]{\textcolor{red}{#1}\errmessage{#1}}

% https://tex.stackexchange.com/questions/150492/how-to-use-itemize-in-table-environment
\newcommand{\tabitem}{\textbullet~}

%math
\newcommand{\mathsub}[2]{#1_{\mathrm{#2}}}

%software
%\newcommand{\matlab}{Matlab\textregistered}
\newcommand{\matlab}{Matlab\textsuperscript{\tiny\textregistered}}
\newcommand{\Arcpython}{ArcGIS python\textregistered}
\newcommand{\Arcgis}{ArcGIS\textregistered}
\newcommand{\python}{Python}
\newcommand{\Pmap}{Pmap}
\newcommand{\telemac}{\textsc{Telemac-Mascaret-Sisyphe}}
%deltares software
\newcommand{\baseline}{Baseline}
\newcommand{\basfm}{Bas2FM}
\newcommand{\dhydro}{D-HYDRO}
\newcommand{\dfastmi}{D-FAST Morphological Impact}
\newcommand{\drtc}{D-RTC}
\newcommand{\dtd}{Delft3D}
\newcommand{\dtdiv}{Delft3D 4}
\newcommand{\dtdf}{Delft3D-Flow}
\newcommand{\fm}{Delft3D FM}
\newcommand{\fmod}{Delft3D FM 1D}
\newcommand{\nefis}{NEFIS}
\newcommand{\openda}{OpenDA}
\newcommand{\qp}{QUICKPLOT}
\newcommand{\rtc}{RTC}
\newcommand{\st}{\textsc{SOBEK} 3}
\newcommand{\sre}{\textsc{SOBEK-RE}}
\newcommand{\smt}{SMT}
\newcommand{\waqua}{\textsc{WAQUA}}
\newcommand{\waqmorf}{\textsc{WAQMORF}}
\newcommand{\fortran}{\textsc{Fortran}}

%institutes
\newcommand{\RWS}{\textit{Rijkswaterstaat}}
\newcommand{\rtm}{\textsc{Rivers2Morrow}}
\newcommand{\rl}{\textsc{RiverLab}}

%institutes reference
\newcommand{\refRIZA}{Institute of Inland Water Management and Waste Water Treatment (RIZA), Arnhem, the Netherlands}
\newcommand{\refDHL}{\refWL{}}
\newcommand{\refDHI}{Danish Hydraulic Institute}
\newcommand{\refWL}{W.L. | Delft Hydraulics Laboratory, Delft, the Netherlands}
\newcommand{\refRHDHV}{HaskoningDHV Nederland B.V., the Netherlands}
\newcommand{\refFugro}{Fugro Ingenieursbureau B.V., the Netherlands}
\newcommand{\refUU}{Utrecht University, the Netherlands.}
\newcommand{\refHKV}{HKV Consultants, Lelystad, the Netherlands}
\newcommand{\refRWS}{Rijkswaterstaat, the Netherlands}
\newcommand{\refDeltares}{Deltares, the Netherlands}
\newcommand{\refMeander}{Meander, Advies en Onderzoek}
\newcommand{\refTUD}{Delft University of Technology, Delft, the Netherlands}

% hydrosettings 
\newcommand{\morfac}{\textsc{MorFac}}
\newcommand{\bedlevtype}{\textsc{BedlevType}} 
\newcommand{\ashld}{$\mathsub{A}{Shld}$}
\newcommand{\bshld}{$\mathsub{B}{Shld}$}
\newcommand{\cshld}{$\mathsub{C}{Shld}$}
\newcommand{\dshld}{$\mathsub{D}{Shld}$}
\newcommand{\espir}{$\mathsub{E}{spir}$}
\newcommand{\thtrlyr}{$\mathsub{L}{a}$} 
\newcommand{\thcrslyr}{$\mathsub{L}{c}$} 
\newcommand{\ACal}{$\mathsub{A}{cal}$}
\newcommand{\acal}{\ACal}
\newcommand{\ASKLHE}{$\mathsub{A}{SKLHE}$}
\newcommand{\thetacr}{$\mathsub{\theta}{cr}$}
\newcommand{\thresh}{\textsc{Thresh}} 

\newcommand{\keyword}[1]{\texttt{#1}}


%reference levels 
\newcommand{\OLR}{OLR}
\newcommand{\OLRlong}{Overeengekomen lage rivierstand}
\newcommand{\OLW}{OLW}
\newcommand{\OLWlong}{Overeengekomen lage waterstand}
\newcommand{\NAP}{NAP}
\newcommand{\NAPlong}{Normaal Amsterdams peil}
\newcommand{\MGD}{MGD}
\newcommand{\MGDlong}{Minst gepeilde diepte}

\newcommand{\vaargeulEN}{navigation channel} %150 m
\newcommand{\vaarwaterEN}{navigable part of the river} %170 m
\newcommand{\bevaarbarebreedteEN}{navigable width} %200 m

\newcommand{\vaargeulNL}{'vaargeul'} %150
\newcommand{\vaarwaterNL}{'vaarwater'} %170
\newcommand{\bevaarbarebreedteNL}{'bevaarbare breedte'} %200

%LTW
\newcommand{\LTW}{LTW}
\newcommand{\ltws}{longitudinal training walls}
\newcommand{\Ltws}{Longitudinal training walls}
\newcommand{\ltw}{longitudinal training wall}
\newcommand{\Ltw}{Longitudinal training wall}

\newcommand{\oevergeulNL}{oevergeul}
\newcommand{\oevergeulEN}{auxiliary channel}
\newcommand{\oevergeulenNL}{oevergeulen}
\newcommand{\oevergeulenEN}{auxiliary channels}
\newcommand{\OevergeulNL}{Oevergeul}
\newcommand{\OevergeulEN}{Auxiliary channel}

%locations
\newcommand{\SG}{Sambeek-Grave} 
\newcommand{\JK}{Juliana Kanaal} 
\newcommand{\GM}{Gemeenschappelijke Maas}
\newcommand{\ZM}{Zandmaas}
%latinism spanish
\newcommand{\ie}{\textit{i.~e.}}
\newcommand{\eg}{\textit{e.~g.}}

%To do list
%https://tex.stackexchange.com/questions/247681/how-to-create-checkbox-todo-list#313337
\newcommand{\open}{$\square$}
\newcommand{\done}{\rlap{\raisebox{0.3ex}{\hspace{0.4ex}\tiny \ding{52}}}$\square$}
\newcommand{\wontfix}{\rlap{\raisebox{0.3ex}{\hspace{0.4ex}\scriptsize \ding{56}}}$\square$}

%https://duckduckgo.com/?q=latex+pifont&atb=v314-1&iax=images&ia=images&iai=http%3A%2F%2Fla.buvette.org%2Ftech%2FLaTeX%2Fpifont.png
\newcommand{\followup}{\ding{220}}
\newcommand{\finding}{\ding{81}}

% Example: 
%\begin{itemize}
%	\item[\open] Still open action.
%	\item[\done] Completed/Fixed
%	\item[\wontfix] Won't fix
%\end{itemize}%references functions
% \usepackage{xstring}

%references functions
% \newcommand{\bibentrylanguage}[2]{%
    % \IfEqCase{#1}{%
        % {}{$\sqrt{#2}$}%
        % {b}{Hi}%
    % }[\PackageError{tree}{Undefined option to tree: #1}{}]%
% }%

%references to section or ref
%\newcommand{\isreport}{0} %0=no appendix; 1=add appendix
%
%\newcommand{\refsubsecfenomenosmorpho}[1]{
%\ifnum #1=1
%(sección \ref{subsec:fenomenos_morpho})
%\else
%\citep{Chavarrias21_5}
%\fi
%}
%
%\refsubsecfenomenosmorpho{\isreport}

%sections
\newcommand{\gensection}[3]{
\ifnum #1=1 %report
	\ifnum #2=1
		\chapter{#3}
	\else
		\ifnum #2=2
			\section{#3}
		\else
			\ifnum #2=3
				\subsection{#3}
			\else
				\ifnum #2=4
						\subsubsection{#3}
				\else
				\fi %subsubsection
			\fi %subsection
		\fi %section
	\fi %chapter
\else %memo
	\ifnum #2=1
		\section{#3}
	\else
		\ifnum #2=2
			\subsection{#3}
		\else
				\ifnum #2=3
					\subsubsection{#3}
				\else
				\fi %subsubsection
		\fi %subsection
	\fi %section
\fi %report
}
