[comp.text.tex] SCCS and LaTeX

av@kielo.uta.fi (Arto V. Viitanen) (10/22/90)

I use SUN's SCCS version control system for my LaTeX documents. SCCS has a
program called 'what', which is used to check from what versions of files a
program is made. This works, since SCCS's get command (to get specific
version of file) expands name, version number and date to the file.

I thought, that it would be nice to use "what" on dvi-files, so I use
following text on my LaTeX files:



{%
\catcode`\#=11%
\special{what: %A%\#}%
}%

Point is, SCCS's get expands %A% to name of file, plus version number with
some special characters around. Since I use \special, it is inserted verbatim
to dvi-file and "what" can find it there. 

BUT, dvips and dvi2ps (dvi printing programs for PostScript) think, that
'what:' is for them and they insert contents of the file mentioned in
\special to PostScript file and LaserWriter does not understand LaTeX!. I
thought Knuth said in TeXBook, that \special's first word says for which
program \special is for ??

Can you help me ?
--
Arto V. Viitanen				         email: av@kielo.uta.fi
University Of Tampere,				   	    av@ohdake.cs.uta.fi
Finland

tim@maths.tcd.ie (Timothy Murphy) (10/23/90)

In <AV.90Oct22100439@kielo.uta.fi> av@kielo.uta.fi (Arto V. Viitanen) writes:

>BUT, dvips and dvi2ps (dvi printing programs for PostScript) think, that
>'what:' is for them and they insert contents of the file mentioned in
>\special to PostScript file and LaserWriter does not understand LaTeX!. I
>thought Knuth said in TeXBook, that \special's first word says for which
>program \special is for ??

I cannot find any such statement in the TeXbook.
However, it would seem to me courteous of driver writers
to follow such a practice.

-- 

Timothy Murphy  

e-mail: tim@maths.tcd.ie

av@kielo.uta.fi (Arto V. Viitanen) (10/23/90)

>>>>> On 23 Oct 90 02:22:00 GMT, tim@maths.tcd.ie (Timothy Murphy) said:

Timothy> In <AV.90Oct22100439@kielo.uta.fi> av@kielo.uta.fi (Arto V. Viitanen) writes:

>BUT, dvips and dvi2ps (dvi printing programs for PostScript) think, that
>'what:' is for them and they insert contents of the file mentioned in
>\special to PostScript file and LaserWriter does not understand LaTeX!. I
>thought Knuth said in TeXBook, that \special's first word says for which
>program \special is for ??

Timothy> I cannot find any such statement in the TeXbook.
Timothy> However, it would seem to me courteous of driver writers
Timothy> to follow such a practice.

Ok, your right. Knuth says "The <token list> is a \special command should
consist of a keyword followed if necessary by a space and appropriate
arguments" (TeXBook p. 228). I thought, that if driver does not know keyword,
it does not guess.. (like texx).

Uwe Geuder <geuder@az3.informatik.uni-stuttgart.de> sent me solution to
problem:  The dvips man page tells, that \special{" <any post script command>}
is an acceptable syntax for dvips. Since % is comment for PostScript,
following works:

{%
\catcode`\#=11
\catcode`\"=11
\catcode'\%=11
\special{"%what: %A%}
}%

Thank you Uwe!

--
Arto V. Viitanen				         email: av@kielo.uta.fi
University Of Tampere,				   	    av@ohdake.cs.uta.fi
Finland