Questions about dtx, LaTeX self-documenting code system

learn more… | top users | synonyms

21
votes
5answers
1k 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 ...
17
votes
2answers
9k 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?
14
votes
2answers
816 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 ...
9
votes
2answers
263 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 ...
7
votes
2answers
138 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} ...
2
votes
2answers
211 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 ...
1
vote
1answer
619 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 % ...
4
votes
1answer
87 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 ...
3
votes
2answers
1k 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
1answer
80 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: ...