Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
%<*internal>
\iffalse
%</internal>

%<*internal>
\fi
\def\nameofplainTeX{plain}
\ifx\fmtname\nameofplainTeX\else
  \expandafter\begingroup
\fi
%</internal>
%<*install>
\input docstrip.tex
\keepsilent
\askforoverwritefalse
\preamble
----------------------------------------------------------------
demopkg --- description text
----------------------------------------------------------------

\endpreamble
%</install>
%<install>\endbatchfile
%<*internal>
\nopreamble\nopostamble
\ifx\fmtname\nameofplainTeX
  \expandafter\endbatchfile
\else
  \expandafter\endgroup
\fi
%</internal>
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{demopkg}[2009/10/06 v1.0 description text]
%</package>
%<*driver>
% \documentclass{l3doc}
\documentclass{ltxdoc}
\usepackage{minted}
\usepackage{etoolbox}
\begin{document}
  \DocInput{\jobname.dtx}
\end{document}
%</driver>
% \fi
%  Text
%
% \begin{minted}{latex}
%  \begin{document}
%   \DocInput{\jobname.dtx}
%  \end{document}
% \end{minted}
% \iffalse
%<*example>
% \fi
\begin{minted}{latex}
 \begin{document}
  \DocInput{\jobname.dtx}
 \end{document}
\end{minted}
% \iffalse
%</example>
% \fi

%  Text
%
%\Finale

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

share|improve this question

1 Answer 1

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

 
discard

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.