# Tag Info

4

Is not exactly what you asked, but may be is useful for someone. The advantage is that the tcolorbox package can print the LaTeX code and the result of this code in a environment with a lot of options. \documentclass{article} \usepackage[most]{tcolorbox} \usepackage{menukeys} ...

10

You should absorb the two arguments verbatim, which xparse allows to do; then you can “rescan” the two arguments when you want to show the effect. \documentclass{article} \usepackage{fontspec} \usepackage{menukeys} \usepackage{xparse} \ExplSyntaxOn \NewDocumentEnvironment{command}{vv} { \tl_set:Nn \l_macmad_argument_i_tl { #1 } \tl_set:Nn ...

4

This should do as wanted, and also allows multiple arguments. The only problem is that if there are control sequences in the second argument they are appended with a space. \documentclass{article} \usepackage{fontspec} \usepackage{environ} \usepackage{marginnote} \usepackage{menukeys} \NewEnviron{command}[2]{% \par ...

4

Package hypdoc loads hyperref and adds some "hyper" support for the document class ltxdoc with its package doc. The index entries are then linked: \documentclass{ltxdoc} \usepackage{hypdoc} \CodelineIndex \EnableCrossrefs \begin{document} ... Mind that you need to run the document through LaTeX and makeindex at least twice to get correct links within the ...

2

Use the option hyperindex=false to prevent the 'wrong' behaviour of hyperref for this. \documentclass{ltxdoc} \CodelineIndex \EnableCrossrefs \usepackage[hyperindex=false]{hyperref} \begin{document} \DescribeMacro{\macro} A description of \cs{macro} \begin{macrocode} \macro % \end{macrocode} \PrintIndex \end{document}

Top 50 recent answers are included