Questions tagged [dtx]

Questions about dtx, LaTeX self-documenting code system

33
votes
6answers
3k views

Side-by-side source and output when documenting a style file

When documenting a style file, it would be nice to be able to easily put side by side different examples of code, side-by-side with the output they produce. What recommendations to people have to do ...
29
votes
3answers
37k views

How do I install a .dtx file?

When I run: tex algorithms.dtx for example, I get this message. ! Undefined control sequence. l.34 \documentclass {ltxdoc} ? Help?
18
votes
1answer
1k views

What exactly happens when LaTeX runs on a dtx file?

I am confused on how docstrip/ltxdoc really runs. It seems that LaTeX runs twice when called on such a simple dtx file. % \iffalse %<*installation> \expandafter\begingroup \input docstrip.tex \...
21
votes
2answers
2k views

Editor for DTX files

DTX files are based on LaTeX comments, which means that any editor that can highlight LaTeX code will print most of the DTX files - all the documentation - as a comment and thus not highlight the code....
13
votes
3answers
828 views

(How) Can I write a .dtx file without having to comment out *everything*?

I have a reasonable understanding now of how .dtx files work. But it's a great pain having to put a % character before every line of documentation. Also, depending on which editor you're using, it ...
24
votes
2answers
6k views

What's the point of INS and DTX files

I just downloaded the installation files for a LaTeX package from CTAN. They mostly comprised a load of DTX files, and an INS file. The instructions said to run latex on the INS file, and I did. It ...
12
votes
2answers
519 views

How to add listings environment to DTX files

I am working on my first DTX file and want to add a code example, which shall be printed with listings. This works so far, but since the documentation is commented the listings code is using a full ...
11
votes
3answers
969 views

What to put into the dtx file?

Many packages are written as a single dtx file from that everything that composes the package is extracted. Apart from documentation and package code (the sty or cls), the installation instructions (...
7
votes
2answers
272 views

How to document a expl3 macro using dtx

I am writing the documentation to a package implemented in expl3 using ltxdoc, and the relevant part would look like % \begin{macro}{\conteq_args_once} % Some explanation % % \begin{macrocode} \...
6
votes
2answers
4k views

Can I convert a dtx file to tex file

I know dtx file is literate programming style file. I also know that I can compile it with pdflatex to generate pdf file. But I wonder could I just extract the tex code to a independent file? I think ...
2
votes
2answers
320 views

How can i pull an example out of a dtx file?

The central question is how can i convert a part of a dtx file to straight LaTeX. In learning more about a package, I want to play with an example from a dtx? The output shows up in the pdf. The ...
2
votes
1answer
2k views

generation of sty file from dtx fails

I have implemented a dtx file with listings code according to the answer of this question: How to add listings environment to DTX files where the listings code is placed in the dtx file as % \...
7
votes
1answer
15k views

When using Caption Package, I receive: “Undefined control sequence \captionsetup ”

I introduce a figure as follows: \begin{figure} \centering \includegraphics[scale=0.300]{Figure.eps} \caption{Caption for the figure} \label{a} \end{figure} In the preamble I have written: \...
5
votes
1answer
5k views

Manually install packages from dtx file on ubuntu [duplicate]

Possible Duplicate: How do I install an individual package on a Linux system? My TeXLive doesn't have the standalone package. I read part of the documentation, the PDF file from the standalone ...
5
votes
1answer
416 views

What path provide in a .dtx file (located in source/ folder) to reach files located in doc/ folder?

For a class I want to upload on CTAN, I'd like the provided files to be organized as follows when installed by TeX distributions: 〈ROOT PATH〉/doc/latex/myclass/ myclass.pdf sample/sample.tex ...
4
votes
1answer
1k views

Is it possible to extract a .cls from a .dtx and avoid the Two \LoadClass commands error?

I have tried to adapt Joseph Wright's model dtx file for a class that I'm writing based on the article class (a reduced working example is below, which I have named democlass.dtx). But when I run ...
2
votes
1answer
41 views

Replacing ^^J with ^^J%% within DocTeX's first pass of a DocTeX document?

Question Is it possible to perform text replacement during the first pass of a document by DocTeX ? Specifically, how can I replace ^^J with ^^J%% in a \edef'd macro ? Background I had recently ...
2
votes
1answer
56 views

Still problems with multiple indexes in ltxdoc

I refer to the solution that was presented in multiple indexes in ltxdoc When I add some lines, it doesn't work anymore. I have the feeling that something deeper is wrong, but for a start consider ...
1
vote
1answer
58 views

Change macrocode environment colour when documenting package with ltxdoc

Need help in customising class ltxdoc. I would like to colour code macrocode environments so as to facilitate the visual distinction between package's macro code and it associated documentation. I ...
0
votes
1answer
38 views

Multiple copyright messages in ones doctex templates

I just realized that I have three copyright sections in my DocTeX templates ??? I was trying to merge my templates, generated from the DTXTut by Scott Pakin, with the model DTX file, proposed by ...
0
votes
0answers
10 views

Can docstrip be configured to output ONLY tagged snippets? [duplicate]

In the DTX file format, all lines that are meant to appear exclusively in the typeset document, but not in the files output by \generate have to be commented. Any line, that is not commented, is ...
0
votes
1answer
62 views

Yet another problem using imakeidx in a dtx file

I refer to Still problems with multiple indexes in ltxdoc The solution given there works for that simple MWE, but in my real project I encounter a more serious problem. The next M_not_WE shows it. ...