% preamble for dtx documentations of the luatexbase package/bundle.

% packages
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{lmodern}
\usepackage{booktabs}
\usepackage{enumitem}
\usepackage{xspace}
\usepackage[a4paper]{geometry}
\usepackage[english]{babel}
\usepackage[colorlinks]{hyperref}
\usepackage{bookmark}

% logos
\makeatletter
\newcommand \eTeX       {$\m@th\varepsilon$-\TeX}
\newcommand \LuaTeX     {Lua\TeX}
\renewcommand \PlainTeX {Plain\thinspace\TeX}
\newcommand \TeXe       {\TeX\thinspace82}
\newcommand \TeXLive    {\TeX\thinspace Live}
\makeatother

% logos for the lazy me (mpg)
\newcommand \tex      {\TeX\xspace}
\newcommand \latex    {\LaTeX\xspace}
\newcommand \etex     {\eTeX\xspace}
\newcommand \luatex   {\LuaTeX\xspace}
\newcommand \texe     {\TeXe\xspace}
\newcommand \texlive  {\TeXLive\xspace}
\newcommand \plaintex {\PlainTeX\xspace}

% special elements of text
\newcommand*\email [1] {\href{mailto:#1}{#1}}
\newcommand \file       {\nolinkurl}
\newcommand \pk         {\textsf}
\newcommand \cmdname    {\texttt}

% compact lists
\setitemize{itemsep=0pt, parsep=0pt}
\setdescription{itemsep=0pt, parsep=0pt}

% no so nice, but anyway...
\newenvironment{qcode}{%
  \quote \ttfamily \catcode`\_=12\relax \obeylines
}{%
  \endquote
}

% for hyperref
\pdfstringdefDisableCommands{%
  \def\cs#1{\@backslashchar #1}%
}

% constant metadata
\newif\ifluatexbase
\author{%
  Heiko Oberdiek (primary author of \pk{luatex}) \\
  \'Elie Roux (primary author of \pk{luatextra}) \\
  Manuel P\'egouri\'e-Gonnard (current developper)\thanks{%
    See ``History''
    \ifluatexbase\else in \href{luatexbase.pdf}{\file{luatexbase.pdf}} \fi
    for details.}%
  \\[1ex]
  \url{https://github.com/mpg/luatexbase} \\
  \email{lualatex-dev@tug.org}%
}
\hypersetup{%
  pdfsubject = {Basic resource management for LuaTeX},
  pdfauthor = {Manuel P\'egouri\'e-Gonnard, \'Elie Roux, Heiko Oberdiek},
}

% other metadata
\newcommand*\pkdate [2] {%
  \title{The \pk{#1} package}
  \date{#2}
  \hypersetup{pdftitle={The #1 package}}
}


% ltxdoc setup
\DisableCrossrefs
