\part{Testing}

Textwidth: \the\textwidth
\\Linewidth: \the\linewidth

% \directlua{tex.sprint("Compiled in directory: \\detokenize{" .. lfs.currentdir() .. "}")} \\
% \directlua{tex.sprint("Jobname: " .. tex.jobname)} \\
% \directlua{tex.sprint("Output directory \\detokenize{" .. os.getenv("TEXMF_OUTPUT_DIRECTORY") .. "}")} \\
% \directlua{tex.sprint("String sanitize \\detokenize{" .. string.sanitize("m_a^th?") .. "}")}

\languagename

\paragraph{File loading}
\noindent Lua Aux loaded? \luaAuxLoaded\\
% Translations Aux loaded? \translationsAuxLoaded\\
Input only: \inputOnlyFile

\paragraph{Testing GT, GetTranslation, IfTranslationExists, IfTranslation}
\addtranslation{english}{ttest}{This is the english translation of \texttt{ttest}}
\noindent
GT: ttest = \GT{ttest}\\
% GetTranslation: ttest = \GetTranslation{ttest}\\
% Is english? = \IfTranslation{english}{ttest}{yes}{no} \\
% Is german? = \IfTranslation{german}{ttest}{yes}{no} \\
Is defined = \IfTranslationExists{ttest}{yes}{no} \\

\paragraph{Testing translation keys containing macros}
\def\ttest{NAME}
% \addtranslation{english}{\ttest:name}{With variable}
% \addtranslation{german}{\ttest:name}{Mit Variable}
% \addtranslation{english}{NAME:name}{Without variable}
% \addtranslation{german}{NAME:name}{Without Variable}
\DT[\ttest:name]{english}{DT With variable}
\DT[\ttest:name]{german}{DT Mit Variable}
\noindent
GT: {\textbackslash}ttest:name = \GT{\ttest:name}\\
% GetTranslation: {\textbackslash}ttest:name = \GetTranslation{\ttest:name}\\
% Is english? = \IfTranslation{english}{\ttest:name}{yes}{no} \\
% Is german? = \IfTranslation{german}{\ttest:name}{yes}{no} \\
% Is defined? = \IfTranslationExists{\ttest:name}{yes}{no} \\
% Is defined? = \expandafter\IfTranslationExists\expandafter{\ttest:name}{yes}{no}

\paragraph{Testing relative translations}
\begingroup
    \edef\prevFqname{\fqname}
    \edef\fqname{\prevFqname:test}
    \eng{English, relative}
    \ger{Deutsch, relativ}
\endgroup
\dt[testkey]{english}{Testkey}
{\textbackslash}gt\{test\}: \gt{test}\\
{\textbackslash}gt\{test\}: \gt{testkey}

% \DT[qty:test]{english}{HAHA}

\paragraph{Testing hyperrefs}
\noindent{This text is labeled with "test" \label{test}}\\
\fRef[This should refer to the line above]{test}\\
Link to quantity which is defined after the reference: \qtyRef{test}\\
\DT[eq:test]{english}{If you read this, then the translation for eq:test was expandend!}
Link to defined quantity: \qtyRef{mass}
\\ Link to element with name: \ElRef{H}
\begin{equation}
    \label{eq:test}
    E = mc^2
\end{equation}

\paragraph{Testing translation keys with token symbols like undescores}
\noindent
\GT{absolute_undefined_translation_with_underscors}\\
\gt{relative_undefined_translation_with_underscors}\\
\GT{absolute_undefined_translation_with_&ampersand}


\paragraph{Testing formula2}
\begin{formula}{test}
    \desc{Test}{Test Description}{Defs}
    \desc[german]{Test (DE)}{Beschreibung}{Defs (DE)}
    \eq{
        \text{equationwith}_{\alpha} \delta \E \left[yo\right]
    }
    \quantity{\tau}{\m\per\s}{iv}
\end{formula}
\begin{formula}{test2}
    \desc{Test2}{Test Description}{Defs}
    \desc[german]{Test2 (DE)}{Beschreibung}{Defs (DE)}
    \ttxt{
        \eng{This text is english}
        \ger{Dieser Text ist deutsch}
    }
    \ttxt[moretext]{
        \eng{This text is english, again}
        \ger{Dieser Text ist wieder deutsch}
    }
    \begin{equation}
        M\omega\rho\epsilon
    \end{equation}
\end{formula}
\begin{formula}{test3}
    \desc{Test2}{Test Description}{Defs}
    \desc[german]{Test2 (DE)}{Beschreibung}{Defs (DE)}
    Formula  with just plain text.
\end{formula}



\newpage
\Section{layout}
    \desc{Layout Test}{}{}
    \desc[german]{}{}{}

\begin{formula}{tt1}
    \desc{Formula}{Desc}{Defs}
    \eq{E=mc^2}
\end{formula}

\begin{bigformula}{tt2}
    \desc{Big formula}{Desc}{Defs}
    \eq{E=mc^3}
\end{bigformula}


\begin{formulagroup}{tt3}
    \desc{Formula group}{Desc}{Defs}
    \begin{formula}{tt1}
        \desc{Formula}{Desc}{Defs}
        \eq{E=mc^2}
    \end{formula}

    \begin{bigformula}{tt2}
        \desc{Big formula}{Desc}{Defs}
        \eq{E=mc^3}
    \end{bigformula}

\end{formulagroup}
