Questions tagged [dtx]

Questions about dtx, LaTeX self-documenting code system

Filter by
Sorted by
Tagged with
1 vote
1 answer
16 views

Index section title not appearing when compiling dtx file

I have a file called _dtx.dtx with the following code: % \iffalse %<*driver> \documentclass[10pt]{article} \usepackage[numbered]{hypdoc} \usepackage{titlesec} \usepackage{hyperref} \...
10 votes
1 answer
314 views

Best practice for dtx workflow

I'm sorry, if this question isn't appropriate here, since it asks (at least partly) for opinions. However, there exists a "best-practices" tag, and I believe, the answer could be of public ...
  • 622
1 vote
1 answer
68 views

Which code is executed when generating .sty from .dtx?

I am trying to understand how to generate .sty using .dtx. Suppose I want the following code to be in the .sty file: \NewDocumentCommand{\foo}{ }{} \NewDocumentCommand{\bar}{ }{} \ifluatex \let\baz\...
0 votes
2 answers
90 views

Is there a package for typing examples inside DTX documentation?

This is what I see in pgf documentation, for example: Is there a package, which would help me render similar two-column samples in my own DTX documentation? I want to type something like this: \begin{...
  • 11.2k
1 vote
1 answer
40 views

How to use CJK environment in .dtx documentation?

This is my a.dtx file, which doesn't compile: % \GetFileInfo{a.dtx} % \iffalse %<*driver> \ProvidesFile{a.dtx} %</driver> %<class>\NeedsTeXFormat{LaTeX2e} %<class>\...
  • 11.2k
0 votes
0 answers
34 views

Is there a package that would download release history from GitHub and create \changes in LaTeX?

In my .dtx file I want to have a full list of \changes{} lines for all releases I've made on GitHub. I don't want to put them over there manually (I will miss something). This would be better: % \...
  • 11.2k
0 votes
1 answer
32 views

Why can I no longer remove "General:" when using \PrintChanges as of doc 3?

As of version 3, the doc package provides reportchangedates option to display dates along with package changes. I want to remove the word "General" and the colon that follows it from the ...
4 votes
2 answers
76 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{...
  • 1,286
2 votes
1 answer
31 views

Set a PDF image file in the tex directory instead of the doc directory in l3build

I have a xxxlogo.pdf file, which is a logo image file for users to use with .cls. By default, l3build will consider this as a document and place it in the doc directory. For this reason, I set some ...
  • 3,662
0 votes
1 answer
47 views

How to "\DoNotIndex" an environment?

I'm writing a dtx file for a class I created. I'm using \EnableCrossrefs, but I have the minted environment indexed. \DoNotIndex{minted} does not work. How do I tell makeindex to not index a specific ...
  • 3
1 vote
1 answer
59 views

How to share the date and version number in dtx when developing LaTeX3 package?

When using the syntax of LaTeX2e, we can share information such as date, version number and description in the following way, so that the document and package use the same version number and date, and ...
  • 3,662
0 votes
1 answer
53 views

Where in a .dtx file does \DefineOptions go and what are the rules?

Given the source of demopkg.dtx: % \iffalse meta-comment % !TEX program = pdfLaTeX %<*internal> \iffalse %</internal> %<*readme> -------------------------...
  • 1,493
1 vote
2 answers
38 views

doc package: multiple macros with one definition

I'm writing class documentation with the doc package (well, via ltxdoc documentclass). I have several similar options like font sizes and line spacing, that I want to group together in one macro ...
  • 2,558
0 votes
0 answers
90 views

Compile .dtx into .sty for TexPad?

I need to use the accessibility package with my TexPad application for MacOS, but the package includes both .dtx and .ins files. When I try to compile the .dtx file with pdfLaTeX in TexPad to generate ...
  • 1
1 vote
1 answer
60 views

LaTeX doc package document keys for keyval package

I am trying to document a package that uses keyval for key/value argument parsing. I wish to document the key/value options for some of the commands in the same way that I document macros and ...
1 vote
0 answers
24 views

Generated macro names in files generated with docstrip

I started using DocStrip and Doc. I already managed to use different guards or modules, to create different package files from one single .dtx-source and I am happy with that. I am wondering, if it ...
  • 5,182
0 votes
1 answer
40 views

Can I reset codline numbering when importing code from multiple dtx files?

I have studied Will Robertson's DTXGALLERY examples and now have my package set up as a bundle consisting of three packages. Each package's code lives in separate dtx files, two of which are imported ...
4 votes
1 answer
70 views

How does the `LaTeXdemo` environment in `siunitx.dtx` be defined?

I want to translate the siunitx.pdf to another language, so I have to read the siunitx.dtx and make use of some source code in it. But I have problem to write my own .tex file when I meet the ...
  • 987
1 vote
1 answer
66 views

Is it possible to use l3build to extract (working) lua source from dtx?

I have created one dtx containing both tex/latex/expl3 code and also lua code. When running l3build doc on the dtx I obtain what I need with one problem which I don't see how to solve: the lua file ...
0 votes
0 answers
20 views

Why would a .ins file create null output files/

I had a .dtx/.ins pair of files using dox.sty which installed a .sty file and half a dozen ancillary files, which has been working perfectly for years. After a long series of edits, it now only ...
  • 2,636
1 vote
1 answer
91 views

lgrind.dtx no longer compiles as of TeX Live 2020, potential problem with new latex3 core?

I originally asked this question on the tldistro mailing list (I'm the TeX Live package maintainer for OpenBSD) and Karl Berry suggested I post here. The lgrind.dtx included in lgrind-3.67 no longer ...
4 votes
1 answer
121 views

Using @@ to mark private code does not prevent conflict between modules

The doc for expl3 says: In the code below, pkgA and pkgB both define \@@_foo:, and pkgB relies on pkgA. I would have thought %<@@=module> would prevent this error: ERROR: LaTeX3 Error: ...
  • 1,962
0 votes
0 answers
157 views

calendar package usage

I've been trying to use an old calendar package downloaded from here: https://ctan.org/tex-archive/macros/latex/contrib/calendar?lang=en and now I'm not sure how to use it. I've installed it and was ...
3 votes
1 answer
136 views

StopEventually behaves differently in LtxDoc and L3Doc

I was going through two of my own *.dtx files and noticed that the content between \StopEventually and \Finale would be hidden or displayed based on the document class and not on the setting of \...
  • 978
4 votes
1 answer
138 views

Help with makedtx --- DocInput undefined

I am trying to generate a CTAN .dtx/.ins files for a package I have and I stumbled upon a problem that I can't solve nor find a way around. I am on a Ubuntu 18.04, with a LaTeX Live 2017. Consider ...
  • 34.8k
0 votes
0 answers
56 views

Typesetting the source code documentation for xcolor

I want to get the source code documentation for the xcolor package. For this, I removed \OnlyDescription from xcolor.dtx (line 111) and ran pdflatex xcolor.dtx pdflatex xcolor.dtx makeindex -s gind....
  • 13.7k
3 votes
0 answers
134 views

Record changes for removed macro in dtx [closed]

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....
  • 3,035
2 votes
1 answer
69 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 ...
  • 978
0 votes
1 answer
67 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 ...
  • 978
1 vote
1 answer
680 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 % % ...
  • 978
0 votes
0 answers
1k 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 ...
  • 831
2 votes
1 answer
126 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{\...
2 votes
1 answer
73 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,819
2 votes
1 answer
57 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 ...
  • 495
0 votes
1 answer
82 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
1 answer
418 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. ...
  • 2,120
8 votes
1 answer
491 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@...
  • 919
1 vote
1 answer
151 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} % ...
  • 443
3 votes
2 answers
281 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 ...
11 votes
1 answer
534 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
1 answer
200 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 ...
  • 168
2 votes
1 answer
237 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
1 answer
108 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. ...
  • 1,107
2 votes
1 answer
124 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,107
2 votes
1 answer
183 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 ...
20 votes
2 answers
638 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 ...
  • 2,813
3 votes
1 answer
135 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{...
  • 186k
3 votes
1 answer
498 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 ...
  • 2,913
0 votes
0 answers
557 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 ...
  • 61
1 vote
0 answers
139 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,...