%Based upon https://github.com/benedictdudel/pandoc-letter-din5008
\documentclass[
    paper=A4,
    version=last,
    firstfoot=false      % first-page footer 
]{scrartcl}

\PassOptionsToPackage{hyphens}{url}
\PassOptionsToPackage{unicode$for(hyperrefoptions)$,$hyperrefoptions$$endfor$}{hyperref}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\hypersetup{
$if(is-de)$
  $if(de-subject)$
    pdftitle={$de-subject$},
  $endif$
$else$
  $if(en-subject)$
    pdftitle={$en-subject$},
  $endif$
$endif$
$if(author-meta)$
  pdfauthor={$author-meta$},
$endif$
$if(lang)$
  pdflang={$lang$},
$endif$
$if(subject-meta)$
  pdfsubject={$subject-meta$},
$endif$
$if(apc-ident)$
  pdfkeywords={$apc-ident$},
$endif$
}
\usepackage{url}

\usepackage{iftex}

%\usepackage[ngerman]{babel}
$if(lang)$
\ifLuaTeX
\usepackage[bidi=basic]{babel}
\else
\usepackage[bidi=default]{babel}
\fi
\babelprovide[main,import]{$babel-lang$}
$for(babel-otherlangs)$
\babelprovide[import]{$babel-otherlangs$}
$endfor$
% get rid of language-specific shorthands (see #6817):
\let\LanguageShortHands\languageshorthands
\def\languageshorthands#1{}
$endif$

\ifLuaTeX
  \usepackage{selnolig}  % disable illegal ligatures
\fi

\ifPDFTeX
  \usepackage{helvet}
  \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage{textcomp}% provide euro and other symbols
  \usepackage{DejaVuSansMono}% better monofont  
  \renewcommand{\familydefault}{\sfdefault}
\else 
  % if luatex or xetex
  \usepackage{fontspec}    
  %\setmainfont{TeXGyreHeros}%could not install the package somehow tex-gyre in default.nix/shell.nix did not work
  \setmainfont{DejaVu Sans}
  \setmonofont{DejaVu Sans Mono}
  \renewcommand{\familydefault}{\sfdefault}
\fi 

$if(mathspec)$
  \ifXeTeX
    \usepackage{mathspec}
  \else
    \usepackage{unicode-math}
  \fi
$else$
  \usepackage{unicode-math}
$endif$

%\usepackage[a4paper, bottom=8cm, top=3cm]{geometry} %%% THIS HAD NO EFFECT AT ALL

\usepackage{parskip}% might be useful for pandoc tightlist

\usepackage{graphics}
\usepackage{xcolor}

\usepackage{booktabs}
\usepackage{longtable}

\usepackage[right]{eurosym}

\usepackage{enumitem}

%\setlength{\oddsidemargin}{\useplength{toaddrhpos}}
%\addtolength{\oddsidemargin}{-1in}
%\setlength{\textwidth}{\useplength{firstheadwidth}}

\usepackage[absolute,quiet,overlay]{textpos}%,showboxes
\setlength{\TPHorizModule}{1mm}
\setlength{\TPVertModule}{1mm}

\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}

\pagestyle{empty}

\begin{document}%    
  $if(apc-ident)$
    \begin{textblock}{200}(5,5)%hpos,vpos
      \textcolor{white!0}{$apc-ident$}%
    \end{textblock}%
  $endif$
        
  $body$
        
\end{document}
