Skip to main content

Questions tagged [doc]

doc is a package for documenting the source code of LaTeX packages and classes. doc is commonly used with the ltxdoc class and with the docstrip utility to extract the package code from the source. Questions about the .doc file format used by the Word processing software should be tagged with {msword} instead.

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

What is the meaning of ModuleDepth in the doc/docstrip system?

What is the meaning of the counter Module Depth in the doc/docstrip system? I read the package documentation but I am still not clear if I understand it correctly. Can someone give a concrete example ...
yannisl's user avatar
  • 118k
2 votes
1 answer
65 views

Use of \SpecialMacroIndex and related commands in tables

Some time ago, the "doc" package evidently changed its default from not including hyperref to including hyperref, and I noticed a change in my output (other than the appearance of ...
karlh's user avatar
  • 774
4 votes
1 answer
115 views

Can I use ltxdoc, makeidx, doc and bookmarks? If so, how?

Is it possible to use ltxdoc.cls with makeidx and bookmark? MNWE: \documentclass{ltxdoc} \usepackage{makeidx} \usepackage{bookmark} \makeindex \begin{document} \DescribeMacro{\mymacro}\marg{argument}\...
cfr's user avatar
  • 208k
5 votes
1 answer
105 views

How to modify doc's v3 documentation macros à la doctools?

I used the ltxdoc class with doc and doctools to document prooftrees. That documentation currently requires the compatibility option doc2 as my modifications don't work with version 3 of doc. I'm ...
cfr's user avatar
  • 208k
2 votes
1 answer
160 views

equal symbol (=) behaves unacceptably in `doc`

I want to make a document with the package doc. When I type = in \changes, words before = disappear. Why would this happen? \documentclass{article} \usepackage{doc} \begin{document} \RecordChanges \...
Syvshc's user avatar
  • 1,358
1 vote
1 answer
159 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
1 answer
43 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
1 answer
163 views

What causes Unused global option(s) error after updating to latex-base 2022-06-01-PL1?

After applying today's kernel updates (2022-06-01-PL1) it seems loading the doc package now causes an Unused global option(s) warning over options passed to the article document class that was not ...
LaTeXereXeTaL's user avatar
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,618
1 vote
0 answers
37 views

Strange sorting in Change History with docstrip

I am slowly moving from writing packages from scratch to using Doc and DocStrip instead. Recently I noticed a strange sorting in the "Change History" section of my documents. I am using ...
Jan's user avatar
  • 5,323
2 votes
1 answer
228 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,323
1 vote
2 answers
82 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,824
2 votes
1 answer
114 views

Troubleshooting \PrintIndex \PrintChanges

The code below contains a change markup and the intent is that it be printed. I get: ERROR: LaTeX Error: \verb ended by end of line. How can I fix it? foo.dtx % \iffalse meta-comment % !TEX program ...
Erwann's user avatar
  • 2,130
1 vote
1 answer
87 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
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
1 vote
1 answer
40 views

CodelineIndex from doc package: sorting page vs codeline index entries

In the following sample "documentation" of a macro \foo using the doc package, index entries for \foo are in an unnatural order. How can this be avoided? \documentclass{article} \usepackage{...
Bruno Le Floch's user avatar
3 votes
0 answers
119 views

\box\@labels and macrocode environment

I'm not sure what macrocode environment intends to do with \box\@labels. Initially \box\@labels is void. When macrocode environment ends, it leaves some contents: \box15= \hbox(0.0+0.0)x0.0 .\...
Hironobu YAMASHITA's user avatar
3 votes
1 answer
48 views

Problem with equals sign in doc \changes

When documenting a class/package with the doc package (or some derivative), what's the best way of including a literal equals sign in the text of a \changes command? Since = is used as a special ...
Alex Ball's user avatar
  • 412
0 votes
1 answer
3k views

Converting Lyx to Word

I am using Lyx2.3.3. I have installed Pandoc. I reconfigured Lyx ( Tools> reconfigure). I should then be able to simply export lyx file to the MS Word Office open XML, however I get an error as shown ...
Sabreen's user avatar
  • 65
2 votes
2 answers
3k views

Is it common to save each chapter of a document as a separate file?

I’m due to start my dissertation and saw a few people recommend the technique of having one master file which links to each chapter which in itself is saved as a separate file. If this is optimal, how ...
Roberto_1986's user avatar
1 vote
1 answer
88 views

How to use doc package \efill

I'm using indexing with the doc package and I've run in to an issue. When I have keys that are more than one word they justify over the whole column. I wanted to use the \efill macro to get the keys ...
Kajsa's user avatar
  • 677
1 vote
2 answers
151 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
18 votes
3 answers
580 views

About what TeX does after it finds commented conditionals with ltxdoc

When I thought I understood the concept of the doc package, LaTeX proved me wrong. I was trying to make a file to use with ltxdoc when I realised I could not use conditionals in the preamble because ...
Phelype Oleinik's user avatar
3 votes
1 answer
602 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 ...
XZS's user avatar
  • 2,983
24 votes
1 answer
637 views

How to customize `l3doc`?

As I'm currently writing a package and started to use dtx format I wondered if there are alternative classes just using doc, so I started to use l3doc (since I use expl3 syntax). I'm pretty satisfied ...
TeXnician's user avatar
  • 33.7k
2 votes
0 answers
124 views

Wrong bookmarks with hypdoc

The following MWE points out that, with hypdoc package, the bookmark of the change history section is wrong: "Change History" instead of "Other title for change history". \documentclass{article} % \...
Denis Bitouzé's user avatar