Tagged Questions

Questions about dtx, LaTeX self-documenting code system

learn more… | top users | synonyms

4
votes
1answer
56 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 ...
0
votes
1answer
28 views

Can \GetFileInfo read \ProvidesLanguage?

I am not sure but it seems to me that \GetFileInfo used for documentation of .dtx files ignores \ProvidesLanguage from the babel system. Why?
1
vote
1answer
30 views

Indexing in ltxdoc dtx using doc package

I've combed the documentation for a solution to this, and Googled like crazy, but haven't been able to come up with anything. I'm working on a fairly complex dtx file and have gotten the index ...
2
votes
0answers
31 views

How to display the dates in the \PrintChanges' changes?

An information I'm often missing when I have a look at the "Change History" of a package/classe is the dates of the changes because, IMHO, just the version number is not informative enough: if I could ...
2
votes
1answer
445 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: ...
4
votes
1answer
115 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 ...
5
votes
1answer
48 views

.DTX won't load corresponding .STY

I'm preparing a documented source for a package file and I basically use the skeleton from the ltxdoc manual verbatim. For some reason, when I compile the .dtx to generate the documentation, it just ...
7
votes
1answer
88 views

Conflict between verbatim.sty and ltxdoc.cls

I am writing a package which uses the verbatim package. \RequirePackage{verbatim} For the documentation I'm using the ltxdoc class. So I have to put an % character before every line of the ...
4
votes
2answers
75 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
273 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
100 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
35 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 ...
8
votes
2answers
105 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
643 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
149 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
64 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.
7
votes
2answers
145 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} ...
1
vote
0answers
74 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 ...
3
votes
1answer
142 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 ...
9
votes
1answer
235 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 ...
5
votes
1answer
229 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 ...
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 ...
3
votes
1answer
69 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> ...
9
votes
3answers
309 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
184 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 ...
5
votes
1answer
2k 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 ...
7
votes
1answer
213 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
132 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
146 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
127 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> ...
4
votes
1answer
170 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
91 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
130 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 ...
8
votes
2answers
10k 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 ...
2
votes
1answer
106 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 ...
1
vote
1answer
627 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 ...
1
vote
1answer
703 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 % ...
9
votes
2answers
280 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 ...
14
votes
2answers
879 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
621 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 ...
5
votes
1answer
91 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
374 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) ...
5
votes
2answers
614 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 ...
25
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 ...
2
votes
2answers
218 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 ...
4
votes
2answers
563 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 ...
19
votes
2answers
11k 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?