I can’t find a way to print the content of a LaTeX3 string and/or a text verbatim (or to be more precise, I found a solution by writing the content to a file and then displaying the verbatim content of that file but it looks really ugly):
\documentclass{article}
\ExplSyntaxOn
\NewDocumentCommand{\printMeVerbatim}{m}{
%% Don’t know what to put here: I managed to write it in a file to write its content verbatim,
%% but it sounds really dirty
#1
}
\ExplSyntaxOff
\begin{document}
I would like to print this string verbatim: ``\printMeVerbatim{Hello $\delta$.}'' like:
\begin{verbatim}
Hello $\delta$.
\end{verbatim}
ideally using LaTeX3 syntax.
\end{document}
ltcmd
(xparse
) I think you wantv
notm
\NewDocumentCommand{\printMeVerbatim}{v}{{\fontencoding{T1}\ttfamily#1}}
(T1-encoding just in case ... but better use it generally)\seq_map_inline:Nn \l_robExt_placeholders_seq {- ~ Placeholder ~ called ~ ``##1'' contains:}
where##1
can contain stuff like underscore. Is there a verbatim equivalent of\seq_map_inline
?