\input{stex-docheader}
\def\sourcepath{../source/}

\stextoptitle{The {\protect\stex{4}} Package Collection}{}

\begin{document}
  \EnableManual
  \usemodule[sTeX/Documentation]{common}
  \maketitle
  \libinput[sTeX/Documentation]{docparts}

\tableofcontents

\begin{experimental}
  \stex is -- by now -- relatively stable and ready to use for the
  general public. However, it is also actively being developed further
  and subject to ongoing research. Some of the features described in
  here might not fully work as expected, 
  some are still experimental, there might occasionally be cryptic
  error messages, and in general bugs are expected.

  We welcome all kinds of issues you might encounter at 
  \url{https://github.com/slatex/sTeX}.
\end{experimental}
\edef\stexmatrixlink{\noexpand\url{https://matrix.to/\#/\#stex:fau.de}}
\begin{center}\emph{
  If you have questions or problems with \stex, you can talk to us 
  directly at \stexmatrixlink.
}\end{center}

\DisableDocumentation
\DisableImplementation

\begin{blindfragment}
  \inputref[sTeX/Documentation]{setup}
\end{blindfragment}

\begin{sfragment}{Tutorial}
  \inputref[sTeX/Documentation]{tutorial.en}
\end{sfragment}

\begin{sfragment}{User Manual}
  \let\RequirePackage\documentclass
  \inputref[sTeX/Documentation]{manual}

  \begin{sfragment}{Additional Packages}
    \DocInput{../source/notesslides.dtx}
    \DocInput{../source/problem.dtx}
    \DocInput{../source/hwexam.dtx}
    \DocInput{../source/tikzinput.dtx}
  \end{sfragment}
\end{sfragment}

\DisableManual
\EnableDocumentation
\DisableImplementation

\begin{sfragment}{Documentation}
  \DocInput{../source/stex.dtx}

  \begin{sfragment}{Additional Packages}
    \DocInput{../source/notesslides.dtx}
    \DocInput{../source/problem.dtx}
    \DocInput{../source/hwexam.dtx}
    \DocInput{../source/tikzinput.dtx}
  \end{sfragment}
\end{sfragment}

\EnableImplementation
\DisableDocumentation

\begin{sfragment}{Implementation}
  %\DocInputAgain
  \DocInput{../source/stex.dtx}

  \begin{sfragment}{Additional Packages}
    \DocInput{../source/notesslides.dtx}
    \DocInput{../source/problem.dtx}
    \DocInput{../source/hwexam.dtx}
    \DocInput{../source/tikzinput.dtx}
  \end{sfragment}
\end{sfragment}

\DelayPrintIndex

\end{document}
