Questions tagged [dtx]

Questions about dtx, LaTeX self-documenting code system

Filter by
Sorted by
Tagged with
1 vote
1 answer
14 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>\...
  • 10.3k
0 votes
0 answers
32 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: % \...
  • 10.3k
0 votes
1 answer
27 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
72 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,228
2 votes
1 answer
26 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 ...
  • 1,567
0 votes
0 answers
22 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 ...
1 vote
1 answer
52 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 ...
  • 1,567
0 votes
1 answer
38 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,483
1 vote
2 answers
31 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,528
0 votes
0 answers
54 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
56 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
22 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,090
0 votes
1 answer
36 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
66 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 ...
  • 411
1 vote
1 answer
63 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,586
1 vote
1 answer
83 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
112 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,910
0 votes
0 answers
124 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
114 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 \...
  • 968
4 votes
1 answer
118 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 ...
  • 31.3k
0 votes
0 answers
50 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....
3 votes
0 answers
131 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,025
2 votes
1 answer
68 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 ...
  • 968
0 votes
1 answer
64 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 ...
  • 968
1 vote
1 answer
616 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 % % ...
  • 968
0 votes
0 answers
976 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 ...
  • 801
2 votes
1 answer
113 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
67 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,779
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
76 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
406 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,100
8 votes
1 answer
466 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@...
  • 909
1 vote
1 answer
144 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
238 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
491 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
190 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
215 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
104 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,067
2 votes
1 answer
113 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,067
2 votes
1 answer
150 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
611 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,783
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{...
  • 184k
3 votes
1 answer
434 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,903
0 votes
0 answers
546 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 ...
  • 51
1 vote
0 answers
129 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
0 answers
329 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 ...
  • 169
31 votes
2 answers
12k 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 ...
  • 10.5k
1 vote
1 answer
176 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 ...
  • 968
0 votes
0 answers
89 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,915