I'm trying to write a package from .dtx and .ins, following the dtx tutorial. However even when I merely try to compile the skeleton provided, I get a "! Package doc Error: Character table corrupted." I wonder why. My .dtx and .ins are saved in UTF-8; I have tried latin1 and get the same error.
Commands I run:
[cmd]
latex test.ins
latex test.dtx
[/cmd]
The first runs normally, the second throws a "! Package doc Error: Character table corrupted" error. I've tried pdflatex instead, same outcome.
Searching forums I've only found one potential explanation: during compilation some package changes some char's catcode. However in this MWE the only packages loaded are the .sty istelf and the packages loaded by ltxdoc, such as multicol.sty.
I know I could remove the character table, but I suspect the corrupted table is a symptom of hidden issue.
Here are my test.ins and test.dtx files. I'm merely removing the <...> fields of the dtxut example:
Code: Select all
Code, edit and compile here:
%%%% Copyright (C) 2021 by Julien Dutant%%%% This file may be distributed and/or modified under the%% conditions of the LaTeX Project Public License, either%% version 1.3 of this license or (at your option) any later%% version. The latest version of this license is in:%%%% http://www.latex-project.org/lppl.txt%%%% and version 1.3 or later is part of all distributions of%% LaTeX version 2005/12/01 or later.%%\input docstrip.tex\keepsilent\usedir{tex/latex/test}\preambleThis is a generated file.Copyright (C) 2021 by Julien DutantThis file may be distributed and/or modified under theconditions of the LaTeX Project Public License, eitherversion 1.3 of this license or (at your option) any laterversion. The latest version of this license is in:http://www.latex-project.org/lppl.txtand version 1.3 or later is part of all distributions ofLaTeX version 2005/12/01 or later.\endpreamble\generate{\file{test.sty}{\from{test.dtx}{package}}}\Msg{*********************************************************}\Msg{*}
Code: Select all
Code, edit and compile here:
% \iffalse meta-comment%% Copyright (C) 2021 by Julien Dutant% -----------------------------------%% This file may be distributed and/or modified under the% conditions of the LaTeX Project Public License, either version 1.3% of this license or (at your option) any later version.% The latest version of this license is in:%% http://www.latex-project.org/lppl.txt%% and version 1.3 or later is part of all distributions of LaTeX% version 2005/12/01 or later.%% \fi%% \iffalse%<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]%<package>\ProvidesPackage{test}%<package> [2021/02/03 v0.1 test dtx file]%%<*driver>\documentclass{ltxdoc}\usepackage{test}\EnableCrossrefs\CodelineIndex\RecordChanges\begin{document}\DocInput{test.dtx}\end{document}%</driver>% \fi%% \CheckSum{0}%% \CharacterTable% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z% Digits \0\1\2\3\4\5\6\7\8\9% Exclamation \! Double quote \" Hash (number) \#
Code: Select all
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex 2020.10.20) 4 FEB 2021 20:03entering extended moderestricted \write18 enabled.%&-line parsing enabled.**test.dtx(./test.dtxLaTeX2e <2020-02-02> patch level 5L3 programming layer <2020-03-06>(/usr/local/texlive/2020/texmf-dist/tex/latex/base/ltxdoc.clsDocument Class: ltxdoc 2019/09/16 v2.0y Standard LaTeX documentation class(/usr/local/texlive/2020/texmf-dist/tex/latex/base/article.clsDocument Class: article 2019/12/20 v1.4l Standard LaTeX document class(/usr/local/texlive/2020/texmf-dist/tex/latex/base/size10.cloFile: size10.clo 2019/12/20 v1.4l Standard LaTeX file (size option))\c@part=\count167\c@section=\count168\c@subsection=\count169\c@subsubsection=\count170\c@paragraph=\count171\c@subparagraph=\count172\c@figure=\count173\c@table=\count174\abovecaptionskip=\skip47\belowcaptionskip=\skip48\bibindent=\dimen134)(/usr/local/texlive/2020/texmf-dist/tex/latex/base/doc.styPackage: doc 2019/12/16 v2.1l Standard LaTeX documentation package (FMi)\c@StandardModuleDepth=\count175\guard@level=\count176\MacrocodeTopsep=\skip49\MacroIndent=\dimen135\macro@cnt=\count177\MacroTopsep=\skip50\index@excludelist=\toks15(/usr/local/texlive/2020/texmf-dist/tex/latex/tools/multicol.styPackage: multicol 2019/12/09 v1.8y multicolumn formatting (FMi)\c@tracingmulticols=\count178\mult@box=\box45