[texhax] vanishing tab characters and docstrip

Mathias Bauer mathias.bauer at gmx.net
Wed Oct 21 12:16:06 CEST 2009


Hello list!

* Mathias Bauer schrieb am Mo, 19.10.2009 um 17:42 (+0200):

> With docstrip and the package doc, I want to generate commented
> Makefile code (and code using other programming languages, too)
> instead of LaTeX code.  Running either tex or latex on the .ins
> installation file
>     latex test.ins
> kills all tab characters at the beginning of a line.  Because
> of the Makefile syntax requiring tab characters at the
> beginning of some lines, docstrip's behaviour is unsolicited
> and in some sense "erroneous".
> [...]
> How can I avoid docstrip killing tab characters at the input
> line's beginning?  Can anybody give me a hint?

For the archives:

Following an advice of Martin Schröder the best solution seems to
be using a space character at the respective source code line's
beginning, which will be translated with
    sed -e 's/^ /\t'
*after* running LaTeX/TeX on the .ins installation file.

Moreover with that tab character handling there's no need to
configure the Emacs mode docTeX/FM, which doesn't normally allow
the user to save any tabs at all.  They were translated to 8
space characters on the fly.

Mathias


More information about the texhax mailing list