I use Joseph Wright's model dtx file. Unfortunately, when using it, the generated README.txt file contains parts of the package code, which is of course unwanted.
The rather long minimal example is appended at the end. The important part regarding my question is quite on the top, where only "Text" should end up in the README.txt to my understanding:
%<*readme>
Text
%</readme>
Instead, the README.txt looks like
Text
\endbatchfile
\def\shouldNotBeInReadme{really}
Why is that? What did I do wrong?
% \iffalse meta-comment
%<*internal>
\iffalse
%</internal>
%<*readme>
Text
%</readme>
%<readme>\endbatchfile
%<*internal>
\fi
\def\nameofplainTeX{plain}
\ifx\fmtname\nameofplainTeX\else
\expandafter\begingroup
\fi
%</internal>
%<*install>
\input docstrip.tex
\keepsilent
\askforoverwritefalse
\preamble
Preamble
\endpreamble
\postamble
Postamble
\endpostamble
\usedir{tex/latex/tikzscale}
\generate{
\file{\jobname.sty}{\from{\jobname.dtx}{package}}
}
%</install>
%<install>\endbatchfile
%<*internal>
\usedir{source/latex/tikzscale}
\generate{
\file{\jobname.ins}{\from{\jobname.dtx}{install}}
}
\nopreamble\nopostamble
\usedir{doc/latex/tikzscale}
\generate{
\file{README.txt}{\from{\jobname.dtx}{readme}}
}
\ifx\fmtname\nameofplainTeX
\expandafter\endbatchfile
\else
\expandafter\endgroup
\fi
%</internal>
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{tikzscale}[2012/09/10 v0.1 tikzscale LaTeX package]
%</package>
%<*driver>
\documentclass{ltxdoc}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
%</driver>
% \fi
%
%\GetFileInfo{\jobname.sty}
%
%\title{Title}
%\author{Author}
%\date{Released \filedate}
%
%\maketitle
%
%\changes{v0.1}{2012/09/10}{First public release}
%
% Text
\def\shouldNotBeInReadme{really}
%
%
%\StopEventually{^^A
% \PrintChanges
%^^A \PrintIndex
%}
%
%\Finale
README, notREADME.txt-- renaming it slows us down, so please try to remember that the.txtbit is a mistake. (my apologies if you weren't intending that the package be submitted to ctan.) – wasteofspace Sep 11 '12 at 09:42.dtxis to use a sensible extension. (In the build scripts I've also discussed on my blog, I think I've mentioned something similar and include a rename part.) – Joseph Wright Sep 11 '12 at 10:15\generate{\file{README.}{\from{\jobname.dtx}{readme}}}with a period afterREADMEI get the file without an extension. Is this a change from your comment above? – Bill N Aug 28 '15 at 22:42README.with a full stop in it: that's not the same asREADMEwith no extention at all. Notably, CTAN now accept files calledREADME.md(MarkDown) which would probably be the easiest approach to take. – Joseph Wright Aug 29 '15 at 09:10lsfrom Linux ordirfrom Windows in the directory with that file I getREADME, notREADME.I generated the file from a TeXLive setup on a Windows machine. At the bottom line, I guess I'll use the.mdextension just to be sure. – Bill N Aug 29 '15 at 14:55README.txtfile toREADMEand that works just fine. I may begin usingREADME.mdwith my next update. – LaTeXereXeTaL Nov 26 '20 at 21:24