3

The following macro \mytest should 1) evaluate it's argument and 2) typeset it verbatim. The output looks ok for me, but the log files says:

LaTeX Info: Active space character found while output routine is active 

(This is related to \AddToHook. Without it I do not get this message.)

Is there something wrong with the code? How can I get rid of this info?

\documentclass{article} \ExplSyntaxOn \NewDocumentCommand\mytest{+v} { \AddToHook{shipout/background}{ \put(20,-100){ \begin{minipage}[t]{120mm} #1 \end{minipage} } } \tl_set_rescan:Nnn\l_tmp_tl{}{#1} \tl_use:N\l_tmp_tl } \ExplSyntaxOff \begin{document} test \mytest{ aaa \fbox{bbb} ccc} \end{document} 

1 Answer 1

6

within the output routine an active space is defined to give the message you show, but you could locally define it to give the "normal" active definition, eg \obeyspaces

\documentclass{article} \ExplSyntaxOn \NewDocumentCommand\mytest{+v} { \AddToHook{shipout/background}{ \put(20,-100){ \begin{minipage}[t]{120mm} {\obeyspaces#1} \end{minipage} } } \tl_set_rescan:Nnn\l_tmp_tl{}{#1} \tl_use:N\l_tmp_tl } \ExplSyntaxOff \begin{document} test \mytest{ aaa \fbox{bbb} ccc} \end{document} 
4
  • 1
    Was this message added recently? I don't remember seeing this message in this case before. Commented Jul 22 at 20:58
  • @AndreasMatthias well it's been there a while, it was added with this change % \changes{v1.0n}{1994/04/30}{\cs{@activechar@warning} changed to % \cs{@activechar@info}} Commented Jul 22 at 21:48
  • @AndreasMatthias actually that was when it was changed, the message actually dates from the year before % RmS 93/09/06: Commented Jul 22 at 21:50
  • Oups, that's interesting. I'm using this code (slightly different) in unittests. And I know that this message did not appear until I updated my TeX system yesterday. Anyway, it's working fine now with \obeyspaces. Thanks. Commented Jul 22 at 22:12

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.