[Tugindia] Inserting Tab in Output Stream.

David Kastrup tugindia@tug.org
Tue, 3 Dec 2002 10:29:07 +0100

Manoj Kummini <kummini@yahoo.com> writes:

> Hello All,
> I was looking for a method to insert <TAB> (ASCII Code 0x09) in a
> output stream generated by a macro. I tried using 
> \write\t@gfile{#1^^09\jobname.tex}
> and
> \write\t@gfile{#1^^I\jobname.tex}
> where \t@gfile has been opened by \newwrite and \openout. I see only
> a space where the TAB is intended. Then I tried ^^J, and found that
> LF is inserted. There is a line in latex.ltx which changes the
> catcode of ^^I to 10 (blank). I changed it to 11, but that doesn't do
> what I meant. Is there any other way of inserting a TAB?

^^I is a non-printable character.  TeX will always write it out as
^^I unless you create your own TCX file (you could start with
cp8bit.tcx as a base) in which ^^I has been declared printable and
use TeX's -translate-file option.

David Kastrup, Kriemhildstr. 15, 44793 Bochum