Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [docstrip]

The `docstrip` pack­age pre­pares a LaTeX pack­age source file for ac­tual use, by re­mov­ing the doc­u­men­ta­tion and meta-data.

Filter by
Sorted by
Tagged with
2 votes
0 answers
39 views

When generating files with docstrip, can I insert the output file name anywhere besides preamble and postamble?

I'm generating source files from a .dtx file using docstrip. I would like the literal file name to be placed in the argument to a \ProvidesFile command. Right now I'm doing it something like this: %&...
Matthew Leingang's user avatar
0 votes
1 answer
46 views

Use DocStrip (.dtx) with Unicode input

When I compile this file (test.dtx) with tex test.dtx && latexmk -pdflua test.tex, it doesn't support the UTF8 input. %<*driver> \input docstrip.tex \keepsilent \askforoverwritefalse \...
steve's user avatar
  • 2,174
1 vote
1 answer
119 views

Source generated commentary

Had a look at source2e.pdf and source3.pdf. From what I understand, the developers of latex include commentary in the source files. The source files can then be processed by some tool to make a ...
Veak's user avatar
  • 1
1 vote
1 answer
58 views

AUCTeX auto style files for .dtx and .tex with the same base name

In a LaTeX package using DocStrip with pretty standard structure one could have the following files: mypackage-code.tex mypackage.dtx mypackage.ins mypackage.tex mypackage.dtx is the main file where ...
gusbrs's user avatar
  • 14k
2 votes
1 answer
103 views

Guard of the docstrip

In docstrip, there is something called guard. For example, %<*install> and %</install> are used for producing the .ins installation file. %<*driver> and %</driver> are used for ...
Stephen's user avatar
  • 4,084
1 vote
0 answers
27 views

Improve the undesirable empty line produced by docstrip [closed]

In my .ins file, I have this setup before \generate: \input docstrip.tex \keepsilent \askforoverwritefalse \begingroup \catcode`\^^M=\active% \obeyspaces% \gdef\copyright{% \ds@heading% This is file.....
Jinwen's user avatar
  • 8,578
4 votes
2 answers
84 views

vertical bar in docstrip file changes to j with unicode-math

I'm writing a .dtx file that can generate multifiles, here is my minimal working example. % \iffalse %<*driver> \ProvidesFile{my.dtx}[2022/05/17 3.1a mytest] \documentclass{ltxdoc} \usepackage{...
Syvshc's user avatar
  • 1,348
2 votes
1 answer
214 views

Documentation of `l3doc` functions

By digging through some Question and Answers from here, I stumbled upon the MWE in this question. The part % \begin{function}{\mymacro} % \begin{syntax} % \cs{mymacro}\marg{Arg1} % \end{...
Jan's user avatar
  • 5,313
2 votes
1 answer
98 views

The `macrocode` environment not working in a normal use of the `l3doc` class

I am writing a package with .dtx and .ins pair. I want it's documentation to be bilingual, but I don't want to complicate my .dtx file by having the documentation to have two languages and the source ...
Niranjan's user avatar
  • 3,415
0 votes
0 answers
34 views

description list and macrocode indentation

With l3doc, when using macrocode inside a description list, it is displayed with an extra indentation, how to remove it ? Here is the dtx for a MWE % \iffalse meta-comment %<*driver> \...
Jérôme LAURENS's user avatar
2 votes
1 answer
135 views

Process index of l3doc file / of .dtx file

I understand that .dtx files are a way to both document and implement a package in one file together. Also, in newer versions, usually pdflatex package.dtx should typeset the documentation. I wanted ...
Maximilian Keßler's user avatar
5 votes
1 answer
78 views

How to comment out a line in docstrip?

While using docstrip to write a documented package, I have difficulties in commenting lines of the doc. Here is my minimal test.dtx % \iffalse %<*driver> \documentclass{l3doc} \begin{document} ...
Jérôme LAURENS's user avatar
1 vote
2 answers
147 views

Using edef'd text with doctex pre/postamble

I'm updating my DocTeX template(s) given the model DTX file by Joseph Wright, who includes a readme guard from which the readme.txt is generated. The \delcarepre/postamble macros from DocTeX prefix \...
Carel's user avatar
  • 988
0 votes
1 answer
73 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 ...
Carel's user avatar
  • 988
1 vote
1 answer
833 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 % % ...
Carel's user avatar
  • 988
2 votes
1 answer
146 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{\...
lukascbossert's user avatar
3 votes
1 answer
137 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{...
cfr's user avatar
  • 202k
1 vote
1 answer
478 views

Help needed: DocStrip with multiple files

I am maintaining a bunch of files, presenting packages and classes for my university corporate design. In order to use literate programming and have better documentation, I am playing around with ...
Jan's user avatar
  • 5,313
4 votes
0 answers
118 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 ...
XZS's user avatar
  • 2,963
2 votes
1 answer
190 views

Does DocStrip dislike glossaries?

I had a rather nice idea, pop any glossary terms into a DTX file. I can partition any terms by domain/topic into styles files called domain.sty/topic.sty and load whatever is relevant. So I run ...
Carel's user avatar
  • 988
4 votes
1 answer
652 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 ...
Denis Bitouzé's user avatar
12 votes
3 answers
2k 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 (...
XZS's user avatar
  • 2,963
6 votes
1 answer
106 views

Variant of DocStrip's \file that doesn't add .tex extension

For a class I want to upload on CTAN, several files are generated thanks to DocStrip's utility: \generate{\file{⟨output⟩}{\from{⟨input⟩}{⟨optionlist⟩}}} Quoting Heiko Oberdiek in What path provide ...
Denis Bitouzé's user avatar
5 votes
1 answer
612 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 ...
Denis Bitouzé's user avatar
5 votes
2 answers
163 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 ...
Bruno BEAUFILS's user avatar
5 votes
1 answer
132 views

Why does compiling this .dtx produce a blank page at the beginning?

This is my first time using docstrip. I've written the attempt.dtx file shown below. However, if I compile attempt.dtx using pdflatex attempt.dtx the generated documentation starts by a blank page (...
jub0bs's user avatar
  • 59.1k
9 votes
1 answer
533 views

How do I use l3docstrip?

I've got a bundle I'd like to properly document (and begin to release) that uses expl3 intimately, and it should be documented similarly to expl3 itself (as seen in texdoc interface3. I did a little ...
Sean Allred's user avatar
  • 27.4k
3 votes
1 answer
399 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, ...)?
user avatar
9 votes
2 answers
231 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 ...
Sean Allred's user avatar
  • 27.4k
10 votes
1 answer
330 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 ...
Tomas Aschan's user avatar
  • 15.5k
14 votes
3 answers
1k 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 ...
mhelvens's user avatar
  • 6,126
12 votes
3 answers
603 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 ...
mhelvens's user avatar
  • 6,126
31 votes
2 answers
13k views

What is the docstrip utility?

What is the docstrip utility? I have seen the string below many times, in many sources: generated with the docstrip utility but what is it? Is it a kind of LaTeX editor?
Aurelius's user avatar
  • 7,673
6 votes
1 answer
165 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 ...
Javier Bezos's user avatar
  • 10.3k