toc: true
toc-depth: 2

comments:
  hypothesis:
    showHighlights: whenSidebarOpen

format:
  pdf:
    default-image-extension: tex
#    links-as-notes: true
    colorlinks: false
    pdf-engine: lualatex
# permit preprocessing PlantUML SVG files with inkscape
    pdf-engine-opt: --shell-escape
    documentclass: scrreprt
    classoption:
    - DIV=calc
    csquotes: true
    papersize: a4
    fontsize: 12pt
    template: ../_templates/template.tex
    template-partials:
      - ../_templates/doc-class.tex
      - ../_templates/title.tex

    include-in-header:
# declare license
    - text: |
        \usepackage{hyperref}
        \usepackage[type={CC}, modifier={by-sa}, version={4.0}]{doclicense}
        \publishers{\vspace*{\fill}\small\par\doclicenseThis}
# define missing danish locale strings (must load after package codlicense)
# TODO: override URI suffix (curently ignored and using default URI)
    - text: |
        \makeatletter
        \@namedef{doclicense@lang@thisDoc}{Dette værk er licenseret under en}
        \makeatother
        \makeatletter
        \@namedef{doclicense@lang@word@license}{-licens}
        \makeatother
        \makeatletter
        \@namedef{doclicense@lang@lic@CC@code}{da}
        \makeatother
        \makeatletter
        \@namedef{doclicense@lang@lic@CC@by-sa@4.0}{Kreditering-DelPåSammeVilkår 4.0 International}
        \makeatother
# recalculate page margins, since mainfont was set after documentclass
    - text: |
        \KOMAoptions{DIV=last}
# avoid widow or orphan lines
    - text: |
        \usepackage[defaultlines=4,all]{nowidow}

    include-before-content:
# avoid english style of double space after punctuation
    - text: |
        \frenchspacing
# setup graph visualization libraries
    - text: |
        \usepackage{tikz}
        \usetikzlibrary{arrows.meta,chains,positioning,shapes.geometric}
        \tikzset{
         node distance = 0.75cm and 2cm, font=\bfseries,
         >=stealth,
         vertex/.style={circle,draw,minimum size=1.5em}
        }
        \tikzstyle{bag} = [align=center]