Skip to content

Commit

Permalink
new doc version supporting \outer
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankMittelbach committed Feb 7, 2021
1 parent dde68b5 commit 18f8b74
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
21 changes: 12 additions & 9 deletions base/doc-v3beta.sty
Expand Up @@ -51,7 +51,7 @@
\DeclareCurrentRelease{v3}{2018-04-16}

\ProvidesPackage{doc-v3beta}
[2021/02/05 v3.0c
[2021/02/07 v3.0e
Standard LaTeX documentation package V3 (FMi)]
%%
%% Package `doc' to use with LaTeX 2e
Expand All @@ -78,6 +78,7 @@
\DeclareStringOption{idxtype}
\DeclareStringOption{idxgroup}
\DeclareStringOption{printtype}
\DeclareBoolOption[false]{outer}
\ProcessKeyvalOptions*
\newif\ifscan@allowed \scan@allowedtrue
\def\SetupDoc#1{%
Expand Down Expand Up @@ -394,11 +395,11 @@
}
\cs_new:Npn \__doc_dont_index:n #1 {
\group_end:
\__doc_trace:x{Disable~ indexing~ for~ '\exp_not:n{#1}' }
\clist_map_function:nN {#1} \__doc_dont_index:N
\__doc_trace:x{Disable~ indexing~ for~ '\tl_to_str:n{#1}' }
\clist_map_function:nN {#1} \__doc_dont_index_aux:n
}
\cs_new:Npn \__doc_dont_index:N #1 {
\seq_put_right:Nx \l__doc_donotindex_seq {\cs_to_str:N #1}
\cs_new:Npn \__doc_dont_index_aux:n #1 {
\seq_put_right:Nx \l__doc_donotindex_seq {\expandafter\@gobble \string#1}
}
\cs_set_eq:NN \DoNotIndex \doc_dont_index:n
\def \ShowIndexingState {
Expand Down Expand Up @@ -948,7 +949,6 @@
}

\ExplSyntaxOff

\long\def\@doc@env@#1#2#3{%
\topsep\MacroTopsep
\trivlist
Expand Down Expand Up @@ -989,18 +989,21 @@
\fi
\ifdoc@noindex\else
\global\advance\c@CodelineNo\@ne
\@nameuse{SpecialMain#2Index}{#3}\nobreak
\csname SpecialMain#2Index\expandafter\endcsname
\expandafter{\saved@macroname}\nobreak
\global\advance\c@CodelineNo\m@ne
\fi
\if#1\expandafter\DoNotIndex \csname \saved@indexname\endcsname \fi
\if#1\expandafter\DoNotIndex \expandafter {\saved@macroname}\fi
\ignorespaces}

\def\doc@env#1#2[#3]{%
\@nameuse{doc@noprint\doc@noprintdefault}%
\@nameuse{doc@noindex\doc@noindexdefault}%
\setkeys{doc}{#3}%
\begingroup
\catcode`\\12
\ifdoc@outer
\catcode`\\12
\fi
\MakePrivateLetters
\@doc@env{#1}{#2}%
}
Expand Down
2 changes: 1 addition & 1 deletion base/ltmath.dtx
Expand Up @@ -516,7 +516,7 @@

%
% \begin{macro}{\tmspace}
% \begin{macro}{{\,}}
% \begin{macro}{\,}
% \begin{macro}{\thinspace}
% \begin{macro}{\!}
% \begin{macro}{\negthinspace}
Expand Down
2 changes: 1 addition & 1 deletion required/tools/bm.dtx
Expand Up @@ -977,7 +977,7 @@
% \end{macro}
% \end{macro}
%
% \begin{macro}{\bm@end}
% \begin{macro}[outer]{\bm@end}
% \changes{v0.10}{1997/01/04}
% {Macro added}
% Normally speaking |\outer| declarations should be avoided at all
Expand Down

0 comments on commit 18f8b74

Please sign in to comment.