\documentclass[12pt,a4paper]{book}
\usepackage{djehuty}
\title{Documentation of Djehuty: a data and software repository system.}
\author{Roel Janssen}
\begin{document}
\ifdefined\HCode
\ScriptEnv{html} {\NoFonts\hfill\break} {\EndNoFonts}
\Tag{TITLE+}{Documentation of Djehuty: a data and software repository system.}
\CssFile
@font-face {
    font-family: 'SourceSans';
    src: url('fonts/SourceSansPro-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'SourceSans-Italic';
    src: url('fonts/SourceSansPro-Italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
}
@font-face {
    font-family: 'SourceSans-Bold';
    src: url('fonts/SourceSansPro-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}
@font-face {
    font-family: 'FiraMono';
    src: url('fonts/FiraMono-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
body,html {
  width: 100%; height: 100%; font-family: 'SourceSans', serif; font-size: 13pt; margin: 0pt; padding: 0pt;
  background: repeating-linear-gradient(90deg, #e6e6e6 0, #e6e6e6 5%, transparent 0, transparent 50%),
              repeating-linear-gradient(180deg, #e6e6e6 0, #e6e6e6 5%, transparent 0, transparent 50%);
  background-size: 1em 1em; background-color: #eee;
}
#wrapper { margin: auto; max-width: 1125pt; min-width: 720pt; }
#sidebar.wide { position: fixed; top: 17pt; width: 265pt; height: 100vh; font-size: .9em; overflow-y: auto; }
#sidebar.narrow { position: relative; top: auto; width: 850pt; margin-left: auto; margin-right: auto; font-size: 1.0em; background: #fff; }
#sidebar .tableofcontents { padding: 0pt 10pt 0pt 5pt; }
#sidebar .likechapterHead { padding: 10pt; background: #aaa; color: #111; margin: 0pt; border-radius: 0pt; }
#sidebar.wide .sidebarwrap { background: #f9f9f9; border-radius: 4pt; padding-bottom: 0pt; border: solid 1pt #ddd; }
#sidebar h2 a { color: #000; }
#sidebar h2 a:hover { color: #555; }
#sidebar h2.additionalHead:nth-child(1) { background: #ccc; border-radius: 4pt 4pt 0pt 0pt; }
#sidebar h2.additionalHead:nth-child(2) { background: #bbb; }
.chapter { background: #fff; margin: 10pt; width: 850pt; border-radius: 4pt; border-left: solid 1pt #ccc; border-right: solid 1pt #ccc; border-bottom: solid 1pt #ccc; }
.chapter.wide { margin-left: 275pt; }
.chapter.narrow { margin-left: auto; margin-right: auto; }
.chapter.ultra-narrow { margin-left: auto; margin-right: auto; width: 720pt; }
.chapwrap { padding: 0pt; background: none; border-radius: 4pt; }
.chapwrap p.noindent span.ectt-1200 {
  display: inline-block;
  margin-right: .25em;
  padding: .2em;
  border: solid 1pt #ccc;
  border-radius: .25em;
  background: #f8f8f8;
}
.chapwrap p, .chapwrap .likesubsubsectionHead { padding: 0pt 10pt 0pt 10pt; }
.chapwrap .sectionHead, .chapwrap .likesectionHead { padding: 5pt 10pt 5pt 10pt; background: #eee; }
.chapwrap .subsectionHead, .chapwrap .likesubsectionHead { padding: 5pt 10pt 5pt 10pt; background: #f6f6f6; border-top: solid 1pt #eee; border-bottom: solid 1pt #eee; }
.subsubsectionHead { padding: .25em 0em .25em .75em; font-size: 1em; background: #f6f6f6; }
.ectt-1095 { font-family: 'FiraMono', monospace; font-size: 11pt }
.lstlisting { font-family: 'FiraMono', monospace; font-size: 11pt; background: #f8f8f8; margin: 0pt 10pt 0pt 10pt; padding: 10pt; border-radius: 5pt; border: solid 1pt #ccc; }
.center, .caption { text-align: center; }
.ecbx-1200 { font-weight: bold; }
.ectt-1200 { font-family: 'FiraMono', 'Lucida Console', Monaco, monospace; padding: 0pt; }
.chapwrap h2.likechapterHead, .chapterHead { margin: 0pt; padding: 10pt; background: #222; color: #fff; border-radius: 4pt 4pt 0pt 0pt; border: solid 1pt #222; }
table.ultra-narrow { max-width: 700pt; }
table { margin: auto 10pt 10pt 10pt; width: 100%; max-width: 830pt; border-radius: 4pt; border-spacing: 0; border: solid 2pt #444; line-height: 1em; }
table tr:nth-child(even) { background: #f9f9f9; }
table tr:first-child { background: #444; color: #fff; }
table tbody tr:first-child .ecbx-1200 { font-size: 1.25em; font-weight: bold; }
hr { margin: 5pt 10pt 5pt 10pt; }
td { font-size: 11pt; padding-left: 10pt; }
.chapterToc { display: inline-block; padding: 4pt; font-size: 1.25em; font-weight: bold; background: #ddd; width: 100%; margin-left: -5pt; padding: 5pt 5pt 5pt 10pt; }
.chapterToc a { color: #000000; }
.chapterToc a:hover { color: #666666; }
.sectionToc { display: inline-block; width: 100%; padding: .25em 0pt .25em 7pt; font-size 1.0em; }
.sectionToc a { color: #7c0000; }
.sectionToc a:hover { color: #af6666; }
.subsectionToc { display: inline-block; width: 100%; padding-left: 20pt; font-size: 0.9em; }
.subsectionToc a { color: #00007c; }
.subsectionToc a:hover { color: #6666af; }
.subsectionToc .ectt-1200 { font-size: 0.9em; }
img { width: 60%; height: auto; }
.figure img { width: 100%; height: auto; }
dt.enumerate-enumitem { float:left; clear:left; margin: 0em 1em 0em 1em; }
h1 { font-size 4em; padding-top: 10pt; }
h3 { font-size: 1.25em; }
h4 { font-size: 1.10em; }
#titlepage-logo { width: 200pt; }
hr { border: none; }
div.figure p.noindent { display: none; }
div.figure div.center p.noindent { display: block; }
div.table div.float span.ecrm-1095 { display: none; }
div.table div.float div.caption span.content span.ecrm-1095 { font-size: 12pt; display: inline-block; }
div.table div.float div.caption span.id { font-size: 12pt; }
div.fbox { margin: 0pt 10pt 0pt 10pt; padding: .5em; background: #fffaea; border: solid 2pt #ffeecc; }
div.caption { background: #eee; padding: 5pt; margin: 0pt 150pt 0pt 150pt; min-width: 300pt; border-radius: 10pt; }
div.chapter_sections { padding: .75em 0em .75em 0em; }
a { color: #7c0000; }
a:hover { color: #af6666; }
div.section_subsections { display: none; }
div.spacer { height: 1em; }
\EndCssFile
\fi
\ifdefined\HCode
\begin{html}
<div id="titlepage" class="chapter narrow">
<div class="center">
  <h1><code>djehuty</code></h1>
  <h2>The 4TU.ResearchData and Nikhef repository system</h2>
  <p>\end{html}%
version \djehutyversion{}, \today{}
\begin{html}
  </p>
</div>
<p style="text-align: center">This document is also available as <a tabindex="-1" href="djehuty.pdf">PDF</a>.</p>
</div>
\end{html}%
\else
\begin{titlepage}
  \begin{center}
    \topskip0pt
    \vspace*{\fill}
    { \Huge \t{djehuty} }~\\~\\
    { \Large The 4TU.ResearchData and Nikhef repository system }~\\~\\
    \includegraphics[width=0.35\textwidth]{figures/logo.pdf}
    ~\\~\\
    \url{https://github.com/4TUResearchData/djehuty}~\\
    version \djehutyversion{}, \today{}
    % Put it a little bit above the center of the page.
    ~\\~\\~\\~\\~\\~\\~\\~\\~\\~\\~\\~\\~\\~\\
    \topskip0pt
    \vspace*{\fill}
  \end{center}
  \thispagestyle{empty}
\end{titlepage}
\fi

\setcounter{page}{1}
\pagenumbering{roman}
\hypersetup{linkcolor=black}

\ifdefined\HCode
\begin{html}
<div id="sidebar" class="narrow"><nav role="menu" aria-label="Navigation" class="sidebarwrap">
<h2 class="likechapterHead additionalHead"><a href="#news-section">News</a></h2>
<h2 class="likechapterHead additionalHead"><a href="#contact-section">Contact</a></h2>
\end{html}
\renewcommand{\contentsname}{\href{\#titlepage}{Documentation}}
\fi

\tableofcontents

\ifdefined\HCode
\else
\listoffigures
\fi

\newpage{}
\hypersetup{linkcolor=LinkGray}
\setcounter{page}{1}
\pagenumbering{arabic}

\ifdefined\HCode
\begin{html}
</nav><div class="spacer"></div></div><div role="region" aria-label="Chapter: Introduction" class="chapter narrow"><div class="chapwrap">
\end{html}
\fi

\input{introduction}

\ifdefined\HCode
\begin{html}
</div></div><div role="region" aria-label="Chapter: Configuring Djehuty" class="chapter narrow"><div class="chapwrap">
\end{html}
\fi

\input{running-djehuty}

\ifdefined\HCode
\begin{html}
</div></div><div role="region" aria-label="Chapter: Knowledge Graph" class="chapter narrow"><div class="chapwrap">
\end{html}
\fi

\input{knowledge-graph}

\ifdefined\HCode
\begin{html}
</div></div><div role="region" aria-label="Chapter: Contributing" class="chapter narrow"><div class="chapwrap">
\end{html}
\fi

\input{contributing}

\ifdefined\HCode
\begin{html}
</div></div><div role="region" aria-label="Chapter: Application Programming Interface" class="chapter narrow"><div class="chapwrap">
\end{html}
\fi

\input{api}

\ifdefined\HCode
\begin{html}
</div></div><div role="region" aria-label="Chapter: References" class="chapter narrow"><div class="chapwrap">
\end{html}
\fi

\bibliography{references}

\ifdefined\HCode
\begin{html}
</div></div><div role="region" aria-label="Chapter: Contact" class="chapter narrow"><div class="chapwrap">
\end{html}
\fi

\input{contact}

\ifdefined\HCode
\begin{html}
</div></div><div role="region" aria-label="Chapter: News" class="chapter narrow"><div class="chapwrap">
\end{html}
\fi

\input{news}

\ifdefined\HCode
\begin{html}
</div></div>
<script>
var windowState = "unset";
function removeWhitespace (element) {
  let sibling = element.nextElementSibling;
  if (sibling != null && sibling.nodeName === "BR") { sibling.remove(); }
  sibling = element.nextSibling;
  while (sibling !== element.nextElementSibling) {
    sibling.remove();
    sibling = element.nextSibling;
  }
}
function setWindowState (state) {
  document.getElementById("sidebar").setAttribute("class", (state !== "wide") ? "chapter narrow" : "wide");
  for (table of document.getElementsByTagName("table")) { table.setAttribute("class", `tabular ${state}`); }
  for (chapter of document.getElementsByClassName("chapter")) { chapter.setAttribute("class", `chapter ${state}`); }
  for (section of document.getElementsByClassName("section_subsections")) { section.style.display = (state !== "wide") ? "block" : "none"; }
  windowState = state;
}
function renderWindow (event) {
  let windowWidth = window.innerWidth;
  if (windowWidth < 961 && windowState !== "ultra-narrow") {
    setWindowState ("ultra-narrow");
  } else if (windowWidth > 960 && windowWidth < 1500 && windowState !== "narrow") {
    setWindowState ("narrow");
  } else if (windowWidth > 1499 && windowState !== "wide") {
    setWindowState ("wide");
  }
}
function setRoleForAnchorInside (element, role) {
  try {
    let anchors = element.getElementsByTagName("a");
    anchors[anchors.length - 1].setAttribute("role", role);
  } catch (e) {}
}
window.addEventListener('load', function () {
  let sidebar = document.getElementById("sidebar");
  for (chapter of sidebar.getElementsByClassName("likechapterHead")) {
    setRoleForAnchorInside (chapter, "menuitem");
  }
  for (chapter of sidebar.getElementsByClassName("chapterToc")) {
    removeWhitespace (chapter);
    setRoleForAnchorInside (chapter, "menuitem");
    let chapterNumber = chapter.textContent.split(" ")[0];
    let sectionsWrapper = document.createElement("div");
    sectionsWrapper.setAttribute("id", `chapter${chapterNumber}_sections`);
    sectionsWrapper.setAttribute("class", "chapter_sections");
    chapter.after(sectionsWrapper);
  }
  for (section of document.getElementsByClassName("sectionToc")) {
    removeWhitespace (section);
    setRoleForAnchorInside (section, "menuitem");
    let sectionNumber = section.textContent.split(" ")[0];
    let chapterNumber = sectionNumber.split(".")[0];
    let chapterElement = document.getElementById(`chapter${chapterNumber}_sections`);
    if (section.nextElementSibling != null && section.nextElementSibling.className !== "subsectionToc") {
      chapterElement.appendChild(section);
      continue;
    }
    let class_name = sectionNumber.split(".").join("_");
    let subsectionsWrapper = document.createElement("div");
    subsectionsWrapper.setAttribute("id", `section${class_name}_subsections`);
    subsectionsWrapper.setAttribute("class", "section_subsections");
    chapterElement.appendChild(section);
    chapterElement.appendChild(subsectionsWrapper);
  }
  for (subsection of sidebar.getElementsByClassName("subsectionToc")) {
    removeWhitespace(subsection);
    setRoleForAnchorInside (subsection, "menuitem");
    let splitted = subsection.textContent.split(" ")[0].split(".");
    let class_name = `${splitted[0]}_${splitted[1]}`;
    let sectionElement = document.getElementById(`section${class_name}_subsections`);
    sectionElement.appendChild(subsection);
  }
  let additionalHeads = document.getElementsByClassName("additionalHead");
  for (head of additionalHeads) {
    sibling = head.nextElementSibling;
    if (sibling != null && sibling.nodeName === "P") {
      sibling.remove();
    }
  }
  window.addEventListener("resize", renderWindow);
  renderWindow(null);
});
</script>
\end{html}
\fi
\end{document}
