\input ltluatex.tex
\input luatex85.sty
\input ucwmac2.tex
\ucwmodule{luaofs}
\ucwmodule{verb}
\ucwmodule{link}
\clickablefalse


\input minim-xmp.tex
\startmetadata
    pdfaid:part 2
    pdfaid:conformance U
    stopmetadata


\pdfobjcompresslevel=0
% \pdfobj{/Alternate /DeviceRGB}


%Create an OutputIntent in order to correctly specify colours
\immediate\pdfobj stream attr{/N 3} file{sRGB.icc}
\pdfcatalog{%
  /OutputIntents [
    <<
      /Type /OutputIntent
      /S /GTS_PDFA1
      /DestOutputProfile \the\pdflastobj\space 0 R
      /OutputConditionIdentifier (sRGB)
      /Info (sRGB)
    >>
  ]
}





\parskip=5pt plus 3pt minus 2pt
\parindent=0sp

\def\strong#1{{%
\def\emph##1{{\bi{}##1}}%
\bf{}#1%
}}
\def\emph#1{{%
\def\strong##1{{\bi{}##1}}%
\it{}#1%
}}


\def\superscript#1{\leavevmode\raise3pt\hbox{\fiverm#1}}
\def\subscript#1{\leavevmode\lower1pt\hbox{\fiverm#1}}
\newcount\fncount
\fncount=1
\def\fnmark{\superscript{\the\fncount}}
\def\fn#1{\footnote\fnmark{#1}\advance\fncount by 1}
\def\section#1{{\parskip1em\settextsize{18}\bf #1}}
\def\subsection#1{{\parskip1em\settextsize{16}\bf #1}}
\def\subsubsection#1{{\parskip1em\settextsize{14}\bf #1}}
\def\subsubsubsection#1{{\parskip1em\settextsize{12}\bf #1}}
\def\subsubsubsubsection#1{{\parskip1em\settextsize{10}\bf #1}}
\def\subsubsubsubsubsection#1{{\parskip1em\settextsize{10}\bi #1}}
\long\def\blockquote#1{\vskip\lineskip\vskip\parskip\hbox{\vrule\hskip5pt\vbox{#1}}}
\def\strikeout#1{FIXME: Strikeout not implemented}
\def\underline#1{FIXME: Underline not implemented}


% Math (compatibility with KaTeX)
\font\mft=msbm10
\def\mathbb#1{\hbox{\mft #1}}



% Fonty
\ofsdeclarefamily [Pagella] {%
   \loadtextfam qplr;%
                qplb;%
                qpli;%
                qplbi;;%
}

\def\MSfeat#1{:mode=node;script=latn;+tlig}
\registertfm qplr      -      file:texgyrepagella-regular.otf\MSfeat{}
\registertfm qplb      -      file:texgyrepagella-bold.otf\MSfeat{}
\registertfm qpli      -      file:texgyrepagella-italic.otf\MSfeat{}
\registertfm qplbi     -      file:texgyrepagella-bolditalic.otf\MSfeat{}

\setfonts[Pagella/10]
\def\h{\it}		% hint
\def\bh{\bi}		% bold hint

\def\N{{\mathbb N}}
\def\R{{\mathbb R}}
\def\O{{\cal O}}
\def\SYM{{\rm SYM}}
