% !TeX program = pdflatex
% !TeX option = --shell-escape

% underline links generated with the keyword api defined in preamble/keydoc.tex
% does *not* affect \ref, \cite, table of contents etc.
\newif\ifunderlinelinks
\underlinelinkstrue

\documentclass[a4paper]{article}

\input{preamble/geometry}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{csquotes}
\input{preamble/bibliography}
\input{preamble/macros}
\input{preamble/examplecode}
\input{preamble/markdown}
\input{preamble/link}
\input{preamble/keydoc}
\input{preamble/description-links}
\input{preamble/pdfstring}
\input{preamble/todo}
\input{preamble/changelog}

\usepackage[hidelinks, pdfusetitle]{hyperref}
\usepackage[nameinlink, noabbrev]{cleveref}
\usepackage{microtype}

\usepackage{silence}
\WarningFilter{latex}{Marginpar on page 38 moved}  % caused by \DescribeMacro{\Crefname}

\newlicense{lppl}{\LaTeX\ Project Public License}{https://www.latex-project.org/lppl/}
\newlicense{wtfpl}{WTFPL}{http://www.wtfpl.net/}

\makeindex

\title{An easier interface to insert figures, tables and other objects in \LaTeX}
\author{Erik Zöllner}
\date{October~28, 2024}
\package{\jobname}
\version{v1.1.0}

\newcommand{\myinput}[1]{\input{#1}\unskip}

\input{links}
\begin{document}
	\myinput{undescribed-keywords}
	\myinput{content/f1_titlepage}

	\myinput{content/s1_examples}
	\myinput{content/s2_names}
	\myinput{content/s3_documentation}

	\myinput{content/s4_installation}\notocspace
	\myinput{content/s5_bug-reports-and-contributions}\notocspace
	\myinput{content/s6_changelog}\notocspace
	\myinput{content/s7_license}

	\appendix
	\addtocontents{toc}{\protect\setcounter{tocdepth}{1}}
	\myinput{content/x1_motivation}\notocspace
	\myinput{content/x2_used-packages}\notocspace
	\myinput{content/x3_other-packages}\notocspace

	\section{\refname}
	\label{references}
	Works cited in this documentation (ordered by appearance in this document,
	if there are several versions on CTAN I am referring to the English pdf):
	\printbibliography[heading=none]

	\addtocontents{toc}{\protect\setcounter{tocdepth}{3}}
\end{document}
