Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [dtx]

Questions about dtx, LaTeX self-documenting code system

3
votes
0answers
52 views

Record changes for removed macro in dtx

Following the advice in How to Package Your LATEX Package by Scott Pakin I am recording changes to a package I maintain, similar to the following: \RecordChanges \begin{macro}{\somemacro} \changes{0....
2
votes
1answer
40 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 ...
0
votes
1answer
37 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 ...
1
vote
1answer
106 views

Templates in DocTeX : Documenting and producing code within the macrocode environment

I'm writing a DocTeX file (*.dtx) to create a family of classes. From this file I am also generating and documenting the templates that illustrate their usage. %\iffalse %<*template> %\fi % % ...
0
votes
0answers
137 views

not able to find the right formatting for Elsevier double column style

I want to use a double column format for Elsevier like this paper, which basically should look like this. However I'm not able to find the right template or figure out the right settings. From their ...
1
vote
1answer
40 views

How to generate a Makefile from dtx // keeping the tab width

For a complete documentation I would like to maintain and explain the Makefile within my dtx-file. Two problems occur: docstrip always adds an extension to the generated file (\file{Makefile}{\from{\...
0
votes
0answers
27 views

Docstrip: Suppress output of lines outside guards?

Is it possible make the docstrip utility's \generate ignore all lines, that have not been marked by the %<*guard>...%</guard> construct? This ties in to my (duplicate) question Can ...
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 ...
2
votes
1answer
27 views

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 ...
1
vote
1answer
33 views

What do the labels (such as <*dircheck>) mean in `source2e.pdf`?

I am studying source2e.pdf and I have encountered something such as <*dircheck>, <*initex>, <*2ekernel>,<latexrelease>. I thought that they might be some sort of label to mark ...
0
votes
1answer
36 views

dirtree clashes with dtx-file

The following error occurs when I try to generate my documentation of a dtx file. ! Use of \next doesn't match its definition. <argument> .1 \meta {Catalog’s ID}\DTcomment {This ...
1
vote
1answer
190 views

problem with generating marginnote.sty from marginnote.dtx

Running marginnote.dtx (latest version from CTAN) with pdflatex results in the following files: marginnote.aux marginnote.glo marginnote.idx marginnote.log marginnote.pdf marginnote.toc That's all. ...
8
votes
1answer
306 views

Problem with dtx file after LaTeX kernel upgrade (2018/04/01)

Today, the generation of one of my dtx files stopped with the error: ! Undefined control sequence. \UseTextAccent ...up \@firstofone \let \@curr@enc \cf@...
1
vote
1answer
95 views

Where are the separate .dtx files of the source2e.tex

I'm analyzing the source2e.tex file in an effort to better understand (La)TeX, and I see a load of separate .dtx files: \DocInclude{ltdirchk} % System dependent initialisation \DocInclude{ltplain} % ...
3
votes
2answers
139 views

Common practises for documenting CTAN-packages

Background I have lately been thinking about contributing to CTAN. This question has many nice links in that regard. However: I've noticed that most (if not all) of the packages have the same ...
7
votes
0answers
188 views

How to create a boilerplate dtx file for a package using LaTeX3 (similar to dtxgen for LaTeX2e)

I'm interested in making a package using LaTeX3, but I can't (a) find documentation on how to generate a new dtx file for it or (b) find a template for creating a dtx file for a package using LaTeX3 (...
2
votes
1answer
78 views

Is it possible to make comments in dtx file?

When writing dtx file, is it possible to make comments in the section behind the %</driver> line? In more detail, I mean the commented lines, which don't appear in the generated files. Some ...
2
votes
1answer
85 views

How to include preamble-only commands in .dtx file?

I am trying to write my first package using Doc and DocStrip but I have problems including preamble-only commands into the documentation. For example I want to include \allowdisplaybreaks inside \...
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. ...
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 ...
19
votes
2answers
434 views

Recommended means of testing packages while writing them

What is the recommended way of writing a package in the .dtx format? Do package authors usually just write the .dtx first, or use some kind of tool to create a .dtx from the .sty files? I know both ...
3
votes
1answer
93 views

How can I extract standalone.tex from standalone.dtx?

standalone's manual explains three ways of using the package. standalone.sty: \usepackage{standalone}: for use with a non-standalone class, setting \standalonefalse; standalone.cls: \documentclass{...
2
votes
1answer
133 views

Change the comment character (%) for the doc class

When generating files from a *.dtx source, Docstrip discards lines starting with the comment character % (unless they contain guards %<guard>content). When typesetting the documentation with ...
0
votes
0answers
373 views

MikteX portable version 2.9 requiring package file .sty and not working with .dtx [duplicate]

I downloaded this morning the latest version of MikteX portable (2.9) on Windows to update my old version (dating back from 2013 I would say). I have a personal directory with some additional packages ...
1
vote
0answers
82 views

Use latexmk on dtx file and then run it again on the tex file(s) it creates

I'm using latexmk on a dtx file that generates tex files as follows: %<*driver> \input docstrip.tex \askforoverwritefalse \generate{ \file{\jobname_allnotes.tex}{\from{\jobname.dtx}{longcalc,...
0
votes
0answers
164 views

With R, knitr and RStudio, how do you compile a .dtx file to get the .sty file needed for a package?

Working through Stefan Kottwitz's LaTeX Cookbook, page 82, I tried to use the package pullquote. I am using R, the knitr library and the RStudio IDE. When I compiled the .Rnw script that has the ...
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 ...
0
votes
1answer
126 views

Documenting Pics

I have a few packages that provide some TikZ based pics. Originally I've written these using the dtxdoc class file but have started switching over to l3doc files. When I use the newmacro ...
0
votes
0answers
63 views

References to the macro environment

Suppose I have the following in my dtx file (using ltxdoc): %\begin{macro}{\mymacro} % \label{macro:mymacro} % Example text % \begin{macrocode} \newcommand{\mymacro}[0]{An example macro} % ...
4
votes
0answers
123 views

Conventions of package documentation

Are there guides on conventions when it comes to writing documentation for a package (especially one in a .dtx file as opposed to a separate document). I finished my first non-trivial package and ...
0
votes
0answers
194 views

How to run latex doc.dtx?

I am learning LaTeX from lshort. Page 12, Table 1.3: Some of the Packages Distributed with LaTeX, contains the following. doc Allows the documentation of L A TEX programs. Described in doc....
4
votes
1answer
417 views

How to set macrocode using the listings package

When writing a dtx file, is it possible to typeset the code samples (i.e., everything enclosed in a macrocode environment) using the listings package? For completeness, here's Joseph Wright's model ...
2
votes
1answer
77 views

SB@ in dtx and sty files

When reading several dtx files in order to write my own, I saw the command \SB@... in front of several other commands. What does it mean? I could not find reliable sources as explanation.
4
votes
0answers
78 views

Including compiled PDFs in documentation built by l3build

I am building a project with l3build. There are some examples I want to present in the documentation, showing their source code, annotated with DocStrip, as well as including the output they produce ...
2
votes
1answer
56 views

Creating csv files from .dtx: blank line at top

I'm working on a .dtx project in which I might embed data in the .dtx to be written to a couple of .csv files. The problem I'm encountering is that a line feed character is inserted before the first ...
1
vote
1answer
383 views

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 ...
0
votes
1answer
93 views

README file creation from a dtx file

When I run my dtx file, I get a README file with all the information, but there are no (apparent) line feeds in it. If I look at it with Notepad, everything is strung along with no line breaks at all....
1
vote
0answers
168 views

Using .cls macros in the typesetting of the .dtx from which .cls is generated

I read some advice suggesting that when writing a package, one should use that package in one's dtx file in order to demonstrate the use of macros and environments. Presumably, the same should be true ...
5
votes
1answer
53 views

Can I mark an internal function or variable as 'not documented' in l3doc?

There are several internal variables I use that I do not see a need to document in the user-interface section, but I want to explain in the implementation. I'd really like to remove the warnings ...
3
votes
1answer
141 views

use multiple .dtx file to make only .sty file

I would like to split the voluminous .dtx of eledmac in multiple .dtx file. 1) one for the user handbook 2) many other for the package code + handbook. So my objectives are: 1) have multiple .dtx ...
1
vote
1answer
102 views

Add something to the driver section inside the package code using \OnlyDescription

I would like to be able to add something to the documentation of a package in dtx format but using \OnlyDescription. I don't want the Implementation section, but somewhere on the package code I want ...
4
votes
0answers
345 views

Makefile in packages with UNIX commands and latexmk?

What are the rules regarding writing Makefiles to be part of CTAN packages? I would like to include a Makefile in a package I wrote. The package is in .dtx format with its .ins file embedded. When I ...
4
votes
1answer
389 views

\inputencoding{latin1} cannot be used in the user documentation of a .dtx file if it is \DocInput

Third edit: (As pointed out by Ulrike, my problem in fact doesn't concern listingsutf8 but only inputenc, so I reflect this by giving to the question another title and another MWE.) The following MWE ...
0
votes
1answer
120 views

Compiling documentation of a package

I have extracted the documentation of the longtable package and I want to compile it alone. By extracting the documentation I mean that I have copied the .dtx file from the \maketitle to the end and I'...
11
votes
3answers
968 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 (...
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 \...
0
votes
1answer
85 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
147 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 ...
6
votes
1answer
133 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 ...