latex2e icon indicating copy to clipboard operation
latex2e copied to clipboard

docstrib doesn't replace @@-module markers in lines added with a <+tag>

Open u-fischer opened this issue 2 years ago • 2 comments

Brief outline of the bug

When unpacking a dtx which contains tags with a plus, e.g. like in this dtx

%<@@=test>
%    \begin{macrocode}
%<base>\tl_new:N\g_@@_blubA_tl
%<+base>\tl_new:N\g_@@_blubB_tl
%    \end{macrocode}

with

\input docstrip.tex
\generate{\file{testbase.sty}{\from{test.dtx}{base}}}
\endbatchfile

Then in the resulting sty @@ marker aren't expanded correctly

%%
\tl_new:N\g__test_blubA_tl
\tl_new:N\g_@@_blubB_tl

test.log

u-fischer avatar Jul 27 '22 09:07 u-fischer

I think this lines are missing

\def\plusOption+#1>#2\endLine{%
  \maybeMsg{<+#1 . >}%
  \Evaluate{#1}%
  \def\do##1##2##3{%
    \if1\Expr{##2}%
     \def\inLine{#2}%<<------new
      \replaceModuleInLine %<-------new
      \StreamPut##1{\inLine}\fi %<-------changed
    }%
  \activefiles
  }

u-fischer avatar Jul 27 '22 09:07 u-fischer

lines are missing

yep, but also for the %<-...> case

FrankMittelbach avatar Sep 03 '22 14:09 FrankMittelbach