Questions tagged [dtx]

Questions about dtx, LaTeX self-documenting code system

Many TeXnicians following Knuth use versions of Literate programming style. In this style the master document contains both the code and its description, and tools are used to either extract the code or typeset the documentation.

Most LaTeX authors use the variant of Literate programming based on docstrip program. In this variant a .dtx file contains both the code, the comments and sometimes user manual. Running latex on this file typesets the commented code, while running latex on the .ins file extracts the corresponding .cls, .sty and other LaTeX files.

128 questions
18
votes
1 answer

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…
10
votes
1 answer

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: % \iffalse meta-comment % !TEX program =…
7
votes
1 answer

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 appended at the end. The important part regarding…
6
votes
3 answers

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 I can learn some thing from the tex source.
pythonee
  • 2,567
5
votes
1 answer

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 doesn't work because the .bst file isn't being…
You
  • 6,713
  • 2
  • 29
  • 27
4
votes
1 answer

.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 won't load the style file though. No error that it…
rzach
  • 426
3
votes
0 answers

Best repository practices for packages

I have a repository with a package which I am satisfied with. It is laid out like so, . ├── README.md ├── examples │   ├── command1.tex │   └── command2.tex ├── package.sty ├── command1.tex └── command2.tex Where ./command1.tex is the…
Logan
  • 113
3
votes
1 answer

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 pdflatex democlass.dtx I get the error ! LaTeX…
Brian
  • 321
  • 2
  • 9
3
votes
1 answer

Generate .tex from .dtx

I have been trying to extract .tex code out of a .dtx file (this file to be precise, which should produce the microtype documentation). I understand the idea of having a single .dtx file from which all the documentation etc. can be generated but I…
nomad
  • 33
2
votes
1 answer

DTX: Avoid preamble for non-latex files?

When generating files with the docstrip utility, it adds a preamble of %-commented lines. This easily violates the syntax of output files, if they are not latex formats. E.g. running pdftex on the file minimal.dtx (see below), will produce a…
kdb
  • 1,889
2
votes
1 answer

Is it possible to make comments in dtx file?

When writing dtx file, is it possible to make comments in the section behind the % line? In more detail, I mean the commented lines, which don't appear in the generated files. Some hidden code for developers or author's notes... Maybe not…
mezek
  • 168
  • 6
2
votes
1 answer

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 tried to create a new…
2
votes
1 answer

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 % \iffalse % <*example> %…
2
votes
1 answer

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 working just fine; however, when I tried to create…
dgoodmaniii
  • 4,270
  • 1
  • 19
  • 36
1
vote
0 answers

l3doc not replacing @@ module name?

I am using l3doc and DocStrip more and more these days. Also, I am using more and more LaTeX3 and love the ability, to give the variables and functions readable and meaningfull names. Added with scope and type info, the names tend to be much longer…
Jan
  • 5,293
1
2