[texhax] \special{} and postscript

Reinhard Kotucha reinhard.kotucha at web.de
Fri Mar 17 00:49:52 CET 2006


>>>>> "Martin" == Martin Schröder <martin at oneiros.de> writes:

  > Almost anything that works specially for pdftex, e.g. hyperref or
  > geometry. Please consult the pdftex manual.

  > I still don't understand what you want to achieve.

The problem is that the logo contains text using a particular font.

The logo should be integrated in some .cls file so that it is
sufficient to load the class and then refer to the logo by a macro,
\logo{3cm} for instance.

It would be sufficient if a .pdf or .eps file can be installed
system-wide and will be found by kpathsea.  I think that this will
solve the problem.

There are some differences between dvips and pdftex:

dvips allows you to put arbitrary PostScript code into your tex style
or class file.  You can do almost anything.  If you convert pfb files
to pfa (using t1ascii) you can even insert fonts.

If people need the logo many times it can be inserted as a procedure
into the PostScript header and the \specials in the text just call
this procedure.  This way the code will appear only once in the output
file.

Also, PostScript is an extremely powerful tool and the language is
straightforward and very clean. 

Nothing I described above works with pdftex.  It does not make much
fun to use \pdfliteral at all.  Very brave people might insert vector
graphics manually, but I can't imagine that it makes fun and I do not
see any solution for inserting a font.

Is it possible at all to convert an eps file to pdf and put it into a
\pdfliteral (maybe with some pre-processing)?

However, I agree with Tom that it is unacceptable that every user has
to have the logo in his current working directory.  This is an
important point.  Remember that Tom wants to convince people to use
TeX who have never seen anything else but Word.

I don't know whether kpathsea will find eps and pdf files within the
texmf trees already.  kpsewhich --help was not very promising.

BTW., the width and height of a \special or \pdfliteral is zero.  This
is not a big problem if the logo appears in the headline only (it even
avoids overfull \vbox messages there) but TeX will not reserve space
for it. If you don't reserve space, hyperref has a problem: It assumes
that your logo is arbitrary small.

The solution is to put an empty box with the same dimensions as the
logo there.

  > On 2006-03-16 13:50:03 -0500, tom sgouros wrote:
  >> I meant, do you know of a class that inserts literal PDF code?

As I said before, tikz/pgf is good for graphics but I don't see any
solution for the font problem...

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha			              Phone: +49-511-4592165
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------




More information about the texhax mailing list