%^^A meta-comment
%^^A  An Infrastructure for Semantic Macros and Module Scoping
%^^A  Copyright (c) 2022 Michael Kohlhase, all rights reserved
%^^A                 this file is released under the
%^^A                 LaTeX Project Public License (LPPL)
%^^A  
%^^A  The original of this file is in the public archive at 
%^^A  http://github.com/sLaTeX/sTeX/
%^^A 
% \iffalse
%<*driver>

\def\stexdocpath{../doc}
\def\sourcepath{./}
\input{\stexdocpath/stex-docheader}
\stextoptitle{The \sTeX Package}{stex}
\docmodule{chapter}
%</driver>
% \fi
%
%
%^^A \begin{stexmanual}
%^^A \end{stexmanual}
%
% \begin{documentation}
%^^A Foo Bar Baz Blubb
%^^A    \begin{sfragment}{\sTeX Developer Manual}
%^^A      \input{\stexdocpath/stex-devel}
%^^A    \end{sfragment}
% \end{documentation}
%
% \begin{implementation}
%
%   \begin{sfragment}{Setting up}
% Setup code for the document class
%    \begin{macrocode}
%<*cls>
%%%%%%%%%%%%%   stex.dtx   %%%%%%%%%%%%%

\RequirePackage{expl3,l3keys2e}
\ProvidesExplClass{stex}{2025/11/11}{4.0.0}{sTeX document class}
\IfFileExists{stex-expl-compat.sty}{
  \usepackage{stex-expl-compat}
}{}

\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{stex}}
\ProcessOptions

\RequirePackage{stex}
\str_set:Nn \g_stex_document_kind_str{fragment}

\LoadClass{article}
%</cls>
%    \end{macrocode}
%
% Setup code for the package
%
%    \begin{macrocode}
%<*package>
\RequirePackage{expl3,l3keys2e,ltxcmds}
\ProvidesExplPackage{stex}{2025/11/11}{4.0.0}{sTeX package}
\IfFileExists{stex-expl-compat.sty}{
  \usepackage{stex-expl-compat}
}{}
\RequirePackage{stex-logo} % externalized for backwards-compatibility reasons
\RequirePackage{standalone}

\bool_new:N \c_stex_use_sref_bool
\message{^^J*~This~is~sTeX~version~4.0.0~*^^J}
%    \end{macrocode}
%
% Package options:
%
%    \begin{macrocode}
\keys_define:nn { stex / package } {
  debug      .str_set_x:N  = \c_stex_debug_clist ,
  lang       .clist_set:N  = \c_stex_languages_clist ,
  mathhub    .tl_set_x:N   = \mathhub ,
  usesms     .bool_set:N   = \c_stex_persist_mode_bool ,
  writesms   .bool_set:N   = \c_stex_persist_write_mode_bool ,
  forcenousesms .bool_set:N   = \c_stex_persist_force_bool ,
  checkterms .bool_set:N   = \c_stex_check_terms_bool ,
  metadata   .bool_set:N   = \c_stex_metadata_bool ,
  image      .bool_set:N   = \c_tikzinput_image_bool,
  nofrontmatter .bool_set:N = \c_stex_no_frontmatter_bool,
  unknown    .code:n       = {}
}
\exp_args:NNo \clist_set:Nn \c_stex_debug_clist \c_stex_debug_clist
\ProcessKeysOptions { stex / package }
%    \end{macrocode}
%
% Error messages:
%    \begin{macrocode}
\input{stex-en.ldf}
%    \end{macrocode}
%
% \end{sfragment}
% \end{implementation}
%
% \input{\sourcepath stex/utilities.idtx}
% \input{\sourcepath stex/html.idtx}
% \input{\sourcepath stex/archives.idtx}
% \input{\sourcepath stex/uris.idtx}
% \input{\sourcepath stex/documents.idtx}
% \input{\sourcepath stex/modules.idtx}
% \input{\sourcepath stex/symbols.idtx}
% \input{\sourcepath stex/notations.idtx}
% \input{\sourcepath stex/structures.idtx}
% \input{\sourcepath stex/statements.idtx}
% \input{\sourcepath stex/proofs.idtx}
% \input{\sourcepath stex/metatheory.idtx}
% \input{\sourcepath stex/others.idtx}
%
\endinput