Skip to content

Commit

Permalink
Add \g_@@_{latex_option{s_seq,_types_prop},default_latex_options_prop}
Browse files Browse the repository at this point in the history
Progresses #124.
  • Loading branch information
Witiko committed Jun 12, 2022
1 parent 3691b89 commit f6b04f8
Showing 1 changed file with 54 additions and 8 deletions.
62 changes: 54 additions & 8 deletions markdown.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -14409,6 +14409,19 @@ pdflatex --shell-escape document.tex
% are rendered. The rest of the interface is inherited from the plain \TeX{}
% interface (see Section <#sec:texinterface>).
%
% The \LaTeX{} implementation redefines the plain \TeX{} logging macros (see
% Section <#sec:texinterfacelogging>) to use the \LaTeX{} \mref{PackageInfo},
% \mref{PackageWarning}, and \mref{PackageError} macros.
%
% \end{markdown}
% \begin{macrocode}
\newcommand\markdownInfo[1]{\PackageInfo{markdown}{#1}}%
\newcommand\markdownWarning[1]{\PackageWarning{markdown}{#1}}%
\newcommand\markdownError[2]{\PackageError{markdown}{#1}{#2.}}%
\input markdown/markdown
% \end{macrocode}
% \begin{markdown}
%
% The \LaTeX{} interface is implemented by the `markdown.sty` file, which
% can be loaded from the \LaTeX{} document preamble as follows:
% \end{markdown}
Expand Down Expand Up @@ -14588,9 +14601,45 @@ document:
}
```

%</manual-options>
%<*latex>
% \fi
% \par
% \begin{markdown}
%
% To enable the enumeration of \LaTeX{} options, we will maintain the
% \mdef{g_\@\@_latex_options_seq} sequence.
%
% \end{markdown}
% \begin{macrocode}
\ExplSyntaxOn
\seq_new:N \g_@@_latex_options_seq
% \end{macrocode}
% \begin{markdown}
%
% To enable the reflection of default \LaTeX{} options and their types, we
% will maintain the \mdef{g_\@\@_default_latex_options_prop} and
% \mdef{g_\@\@_latex_option_types_prop} property lists, respectively.
%
% \end{markdown}
% \begin{macrocode}
\prop_new:N \g_@@_latex_option_types_prop
\prop_new:N \g_@@_default_latex_options_prop
\tl_const:Nn \c_@@_option_category_latex_tl { latex }
\seq_put_right:NV \g_@@_option_categories_seq \c_@@_option_category_latex_tl
\cs_new:Nn
\@@_add_latex_option:nnn
{
\@@_add_option:Vnnn
\c_@@_option_category_latex_tl
{ #1 }
{ #2 }
{ #3 }
}
% \end{macrocode}
% \iffalse
%</latex>
%<*manual-options>

#### No default token renderer prototypes {#latexplain}

Expand All @@ -14614,6 +14663,11 @@ from being loaded:
%<*latex>
% \fi
% \begin{macrocode}
\@@_add_latex_option:nnn
{ plain }
{ boolean }
{ false }
\ExplSyntaxOff
\newif\ifmarkdownLaTeXPlain
\markdownLaTeXPlainfalse
\define@key{markdownOptions}{plain}[true]{%
Expand Down Expand Up @@ -22063,16 +22117,8 @@ end
% format~[@latex17, Section 9]. As a consequence, we can directly reuse the
% existing plain \TeX{} implementation.
%
% The \LaTeX{} implementation redefines the plain \TeX{} logging macros (see
% Section <#sec:texinterfacelogging>) to use the \LaTeX{} \mref{PackageInfo},
% \mref{PackageWarning}, and \mref{PackageError} macros.
%
% \end{markdown}
% \begin{macrocode}
\newcommand\markdownInfo[1]{\PackageInfo{markdown}{#1}}%
\newcommand\markdownWarning[1]{\PackageWarning{markdown}{#1}}%
\newcommand\markdownError[2]{\PackageError{markdown}{#1}{#2.}}%
\input markdown/markdown
\def\markdownVersionSpace{ }%
\ProvidesPackage{markdown}[\markdownLastModified\markdownVersionSpace v%
\markdownVersion\markdownVersionSpace markdown renderer]%
Expand Down

0 comments on commit f6b04f8

Please sign in to comment.