Questions tagged [dtx]

Questions about dtx, LaTeX self-documenting code system

Filter by
Sorted by
Tagged with
0
votes
0answers
29 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
vote
1answer
46 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
0answers
16 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 ...
0
votes
1answer
25 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
1answer
55 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 ...
0
votes
0answers
79 views

Manually install package with .dtx (when no .ins) is available

Due to internet firewall in office, I am cursed to install tex packages manually. Painstakingly, I have been able to do it using this life saving answer. However, I ran into trouble with trimspaces ...
1
vote
1answer
50 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
0answers
19 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 ...
0
votes
0answers
38 views

How do I include an up-to-date version of expl3 within a local directory?

I am trying to submit a LaTeX manuscript to a journal. This journal asks for the LaTeX source files, then compiles it on their server. The first time I did this, I got an error due to their siunitx ...
1
vote
1answer
60 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
1answer
106 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: ...
0
votes
0answers
83 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
1answer
70 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 \...
4
votes
1answer
84 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 ...
0
votes
0answers
40 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
0answers
102 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....
2
votes
1answer
59 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
54 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
465 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
553 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
97 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
1answer
52 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
45 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
68 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
364 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
412 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
128 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
176 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
1answer
345 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
150 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
144 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
91 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
92 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 ...
2
votes
1answer
119 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
2answers
527 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
124 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
278 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
506 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
110 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
309 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 ...
27
votes
2answers
10k 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
159 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
83 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} % ...
5
votes
0answers
163 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
274 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....
5
votes
1answer
615 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
91 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
99 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
80 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 ...
2
votes
1answer
499 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 ...