TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The following question is related:

How to add listings environment to DTX files

I want to use the document class l3doc in combination with minted. However I am not able to get a nice result. If I use ltxdoc it works:

Here a "small" MWE:

% \iffalse meta-comment
% arara: pdflatex: { shell: true}

\input docstrip.tex
demopkg --- description text

\ProvidesPackage{demopkg}[2009/10/06 v1.0 description text]
% \documentclass{l3doc}
% \fi
%  Text
% \begin{minted}{latex}
%  \begin{document}
%   \DocInput{\jobname.dtx}
%  \end{document}
% \end{minted}
% \iffalse
% \fi
% \iffalse
% \fi

%  Text

Bonus: I want to use the environment minted without using the trick iffalse

share|improve this question
up vote 2 down vote accepted

Although l3doc is usable (I use it myself in xpeek), it is far from being in a stable state. See, for example, Joseph Wright’s answer to How to document a expl3 macro using dtx, where he describes the class as “currently a rather large collection of hacks […] lacking really comprehensive documentation: as I say, it's not exactly perfect internally!”

Similarly, Frank Mittelbach wrote in this thread on the LaTeX3 mailing list, “[l3doc] is certainly not fit for general use, neither quality-wise not in terms of stability. […] That doesn't mean that developers can't use it, but that they have to be prepared (for now) that sometimes layout may still change, while we experiment or that something breaks on the doc level or ... :-)”

In the long run, I expect l3doc to become a LaTeX3-based class, with modern solutions to indexing and cross-referencing and all that. But this will have to wait until LaTeX3-based classes are actually feasible, which means waiting for work on the output routines, templates, and similar projects—in other words, not for a few years yet.

In the meantime, the class will remain a “collection of hacks” suitable for the LaTeX3 team’s use, and adverse interaction with packages like minted (which seems to significantly change how the output is handled) are to be expected.

(And when the LaTeX3 version is available, I wouldn’t expect it to work smoothly with an intrusive LaTeX2e-based package anyway.)

So your options are these:

(Or, use l3doc and help modernize it.)

share|improve this answer
Thanks. I am writing an expl3 package and so I need some hacks of l3doc ;-) – Marco Daniel Jun 24 '13 at 19:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.