Questions tagged [dtx]

Questions about dtx, LaTeX self-documenting code system

Filter by
Sorted by
Tagged with
0 votes
0 answers
57 views

Documenting code in dtx environment example [closed]

I have the following code and would like to see how the environment would be documented within a .dtx file. Would be grateful if I am directed to some package that includes a dtx file that shows how \...
Ragonese's user avatar
  • 117
1 vote
0 answers
50 views

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 ...
Jan's user avatar
  • 5,283
0 votes
0 answers
42 views

Formating `dtx` file wiht `latexindent`

eI am currently writing a dtx file for a custom class. Does anybody have experiences with pretty-formatting both the source-code and the documentation inside the commends using something like ...
Cube707's user avatar
  • 404
1 vote
0 answers
43 views

Once colors are added to the 'macrocode' environment, why does the color of the 'macrocode' environment change?

I'm working on translating some LaTeX documents, aiming to distinguish parts of the document by color for ease of reading. For instance, I'd like to assign blue color to macro commands that require ...
HZ.Zhang'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,144
1 vote
1 answer
110 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
67 views

`easytable` package seems to conflict with `l3doc` class

I tried to use the TAB environment in a .dtx file with l3doc class, but It seems to make latex compilation fail. MWE: \documentclass{l3doc} \usepackage{xcolor} \usepackage{easytable} \begin{document} ...
UncleSamulus's user avatar
0 votes
0 answers
29 views

Is there a .lyx template for DTX (Documented LaTeX sources)?

Or, straight-forward instructions for configuring LyX to use DTX files? Or, more generally, what would be a simple Literate Programming system for LyX which would allow the writing of arbitrary source ...
WillAdams's user avatar
  • 7,167
1 vote
1 answer
41 views

How to patch `\LoadClass` in a LaTeX class to change the parent class without modifying the .cls file?

I am currently experimenting with .dtx files to develop a little style for my university documents. Doing so, I use l3doc class as a document class in the documentation counterpart of my dtx file. ...
UncleSamulus's user avatar
3 votes
0 answers
60 views

Best repository practices for packages [duplicate]

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 └── ...
Logan's user avatar
  • 113
1 vote
1 answer
20 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} \...
Michael Fraiman's user avatar
11 votes
1 answer
384 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 ...
Matthias's user avatar
  • 644
1 vote
1 answer
136 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\...
Michael Fraiman's user avatar
0 votes
2 answers
135 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{...
yegor256's user avatar
  • 12k
1 vote
1 answer
41 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>\...
yegor256's user avatar
  • 12k
0 votes
0 answers
38 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: % \...
yegor256's user avatar
  • 12k
0 votes
1 answer
41 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 ...
LaTeXereXeTaL's user avatar
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,328
2 votes
1 answer
54 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 ...
Clara's user avatar
  • 6,004
0 votes
1 answer
62 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 ...
Martin's user avatar
  • 3
1 vote
1 answer
69 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 ...
Clara's user avatar
  • 6,004
0 votes
1 answer
69 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> -------------------------...
hsmyers's user avatar
  • 1,495
1 vote
2 answers
66 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 ...
jessexknight's user avatar
  • 2,732
0 votes
0 answers
139 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 ...
Sarah's user avatar
  • 1
1 vote
1 answer
77 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 ...
LambdaBeta's user avatar
1 vote
0 answers
29 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 ...
Jan's user avatar
  • 5,283
0 votes
1 answer
48 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 ...
LaTeXereXeTaL's user avatar
4 votes
1 answer
74 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 ...
Stephen's user avatar
  • 3,544
1 vote
1 answer
76 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 ...
kitanokuma's user avatar
0 votes
0 answers
22 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 ...
Peter Flynn's user avatar
  • 2,850
1 vote
1 answer
102 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 ...
Edd Barrett's user avatar
4 votes
1 answer
135 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: ...
Erwann's user avatar
  • 2,100
0 votes
0 answers
187 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 ...
Malgorzata's user avatar
3 votes
1 answer
156 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 \...
Carel's user avatar
  • 988
4 votes
1 answer
169 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 ...
Rmano's user avatar
  • 40.4k
0 votes
0 answers
66 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....
schtandard's user avatar
  • 14.8k
3 votes
0 answers
136 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....
user avatar
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 ...
Carel's user avatar
  • 988
0 votes
1 answer
71 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
811 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
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 ...
Foad's user avatar
  • 873
2 votes
1 answer
145 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
2 votes
1 answer
86 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 ...
kdb's user avatar
  • 1,869
2 votes
1 answer
72 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 ...
user5938's user avatar
  • 495
0 votes
1 answer
93 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 ...
lukascbossert's user avatar
1 vote
1 answer
455 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. ...
Jürgen's user avatar
  • 2,160
7 votes
1 answer
520 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@...
Martin's user avatar
  • 919
1 vote
1 answer
164 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} % ...
Zac's user avatar
  • 483
3 votes
2 answers
328 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 ...
Andreas Storvik Strauman's user avatar
11 votes
1 answer
628 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 (...
Nathanael Farley's user avatar