I'm writing a DocTeX file (*.dtx) to create a family of classes. From this file I am also generating and documenting the templates that illustrate their usage.

% There are now two versions of the \package{invoice} Package
%    \begin{macrocode}
%    \end{macrocode}

For the most part this is working well but I can't seem to shake the guards (HTML like tags) in the documented code and I'm not sure where I'm going wrong

Output showing HTML like guards

From Scott Pakins' DTX tutorial (Invoke texdoc --view dtxtut from the command line to view at home) the following summary table is useful for determining where code will usually apply but the behavior is different within a macrocode environment.

Scott Pakin : DTXTtut : Comment Table

Is it possible to remove the <GUARDS> in the output (The first image) ? I know I could move the <GUARDS> from the macrocode environment into additional \iffalse...\fi but I would prefer not to pepper the document with these statements everywhere, perhaps there is another way.

  • 2
    what is your question exactly? the output you show is what I would expect. Dec 8, 2018 at 1:04
  • @DavidCarlisle I was hoping to remove the tags in the output, is this the expected behaviour ? (I updated the question to include one)
    – Carel
    Dec 8, 2018 at 8:39
  • 1
    Normally the docstrip tags allow you to make multiple files but with a shared documentation, so without the tags the documentation would be very hard t follow, eg the image you show it would look like a document with two \documentclass but as it is it document that two documents will be made, and shows the documentclass in each Dec 8, 2018 at 9:51
  • Ah so I'm fighting the design, I wasn't sure.
    – Carel
    Dec 8, 2018 at 10:04
  • @DavidCarlisle Coincidentally could one stylize the tags instead with say rounded rectangles in different colours or would that be a bit gaudy ?
    – Carel
    Dec 8, 2018 at 10:09

1 Answer 1


The answer to this is "Nope Dummy !!! Don't fight the design". I'll run through the document and fix my really bad tag name choices instead.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .