Questions about dtx, LaTeX self-documenting code system

learn more… | top users | synonyms

4
votes
2answers
66 views

Why is it not possible to embed \if construction in docstrip

I would like to create a DTX files which could be compiled in two different ways depending of a user's choice. One way to get only the user documentation, and another to get user documentation and ...
7
votes
2answers
192 views

dtx file: how to run it?

I want to clarify first that I am a beginner, and thus my question might be imprecise or inadequate. Anyway: I found this documentation file for the package microtype, can be easily found on ctan. It ...
3
votes
1answer
70 views

Removing \CheckSum and \CharacterTable for some generated files

How can you prevent \CheckSum and \CharacterTable appearing in some of the generated files (examples include README, ChangeLog, LaTeX example files, ...)?
2
votes
1answer
30 views

Using \CodelineIndex alongside other indices in a dtx file

Is it possible (and if so, 'how?') to have multiple indices (via imakeidx) in the documentation for a package/class file, and include the codeline index and change log without completely redefinining ...
1
vote
1answer
40 views

modifying PrintDescribeMacro of doc.sty

I would like to redefine the command PrintDescribeMacroof doc.sty in order to create a label that I can link to using hyperref. However whenever I add a label to the command I get an error ...
8
votes
2answers
97 views

How to “\DoNotIndex \,” in a dtx file?

I'm using \EnableCrossrefs in a dtx file. In the index I now have \, indexed. I tried \DoNotIndex{{\,}} and \DoNotIndex{\thinspace} without success. Is there a way to prevent the inclusion of \, in ...
2
votes
2answers
296 views

Undefined control sequence: \undefinedpagestyle at \end{macrocode}

The full source can be found here (static link), but here is the relevant bit: ... % \begin{macrocode} %<*package> % \end{macrocode} % \begin{macro}{\BCSet} % And stuff % ...
7
votes
2answers
141 views

What is the ^^A in DTX sources?

After fleshing out (with my own project) Joseph Wright's lovely model, I've noticed that the explicit control character ^^A is used at the end of some lines. Its use appears similar to that of % to ...
4
votes
1answer
59 views

Tabular in dtx documentation

How to make table in .dtx documentation with vertical bars? % \begin{tabular}{c|c} % |sf| & \emph{mathsf}\\ % \end{tabular} fails, because |foo| is magic for verbatim.
6
votes
2answers
132 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} ...
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 ...
0
votes
0answers
65 views

Compiling .dtx file to .sty [duplicate]

I downloaded the fancytooltips package, including the files fancytooltips.dtx and fancytooltips.ins, and then compiling three times with pdflatex fancytooltips.dtx. I see that the user guide ...
9
votes
1answer
221 views

How do I move the package implementation to the back of the documentation?

I'm trying to learn how to use .dtx files, docstrip etc to produce both package code and documentation from a single file. My primary source of information so far has been Joseph Wright's model dtx ...
3
votes
1answer
109 views

Avoid: multicol Error: Error saving partial page

In my package I am using in the dtx file the ltxdoc class which uses multicol for the index. Currently I get this error: ! Package multicol Error: Error saving partial page. See the multicol ...
5
votes
1answer
182 views

disable index creation in dtx file

The following code is a minimal dtx code with ending .tex (only for the example). I try to understand when an index created and when not, how this is influenced by the loading of hyperref and fail to ...
3
votes
1answer
59 views

index completely messed up in dtx file

I fight with the strange and useless entries of the index in dtx files. It can reproduced with % \iffalse %<*driver> \ProvidesFile{dtxcode.tex} %</driver> % %<*driver> ...
15
votes
2answers
8k 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?
9
votes
3answers
273 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 ...
10
votes
3answers
164 views

What does the “driver” section do in a .dtx file?

I've read the docstrip documentation, but have yet to form an intuition about how package documentation is extracted when I simply run pdflatex package.dtx. Let's say I'm using the simple dtxtut ...
3
votes
1answer
1k 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 ...
6
votes
2answers
8k views

Where do I get the everyshi.sty file from?

I've downloaded and unzipped the ms folder which supposedly has the everyshi.sty file; however, to my dismay, the folder has every other file but that one! As a result, I'm failing to run TikZ, since ...
7
votes
1answer
186 views

getfileinfo not working in Joseph Wright's model dtx file creating a class

I love Joseph Wright's model dtx file for style file creation, but would like to use it for classes, too. So I did some replacements in it (sty -> cls and the like) and got this democls.dtx: % ...
6
votes
2answers
117 views

dtx file and history

The \changes command of DTX file is used to record changes. The \PrintChanges command print the list of change, sorted by number ... except when a number is greater than 10. To see the problem, I ...
7
votes
1answer
128 views

How to get a correct README when using a dtx file

I use Joseph Wright's model dtx file. Unfortunately, when using it, the generated README.txt file contains parts of the package code, which is of course unwanted. The rather long minimal example is ...
4
votes
2answers
115 views

A dangerous \if@ in the dtx preamble

Why does the following .dtx not compile, while the equivalent .tex file does? (You must name the file error.dtx, that's what \DocInput includes.) DTX: % \iffalse meta-comment %<*driver> ...
13
votes
2answers
778 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 ...
4
votes
1answer
146 views

how to organise common preamble of dtx files

I have some new packages (see latexthesistemplate/trunk/packages/template which all use a shared preamble file. I want all of them to have the same packages and commands available and the same ...
4
votes
1answer
83 views

\batchinput (docstrip) in a different directory

docstripprovides the macro \batchinput, which calls a separate ins file. This file can be in a different directory with, say: \batchinput{../contrib/xx.ins} and they are generated, but in the same ...
2
votes
1answer
125 views

dtx: add code to sty file without printing it to pdf

I want to add comments to the sty file that should not be printed to the pdf, because the description is almost identical. Is it possible to configure the dtx file, such that not every code added to ...
2
votes
1answer
102 views

Resetting line count in dtx files

I'm writing a dtx file containing several source files. Is there a way to reset the line counter when commenting the code of a different file? My dtx file looks something like this: .... %\iffalse ...
5
votes
2answers
526 views

How to use condensed typewriter with latin modern and doc

I'm documenting a class with (ltx)doc. The macro names are quite long so I get a lot of overfull hboxes. AFAIK latin modern has an additional typewriter font which is condensed. How do I switch the ...
1
vote
1answer
494 views

Problem with dtx code: rowcolors unknown

I get the following error in my .dtx file: ) (./test.dtx ! Undefined control sequence. l.35 % \rowcolors {1}{colorrow}{colorbody} which I do not understand since xcolor and colortbl are loaded and ...
8
votes
2answers
239 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 ...
0
votes
1answer
529 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
491 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 ...
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
2answers
201 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 ...
5
votes
1answer
82 views

DTX file generates empty file

I recently gave the documentation of my chscite package a facelift for inclusion in CTAN, and was assuming that doing so wouldn't break anything. Unfortunately, I just discovered that the package ...
14
votes
2answers
342 views

Multiple documents from a single dtx

The DTX format allows to generate both the package code (.sty file) and documentation (.pdf file) from a single dtx file. Is it possible to generate several PDFs (for example for different languages) ...
4
votes
2answers
542 views

Download all dtx from CTAN

I've written some code to extract some help from dtx files (documented package), and I have tested it on a few packages for which I had the .dtx. It seems, however, that .dtx files are not shipped ...