Christian Baun | 17 Mar 16:07 2006
Picon
Picon

dvi output with tetex 3.0

Hi all,

today my Debian-System did an teTeX upgrade from 2.0.2 to 3.0. 
Now, /usr/bin/latex is a Link to pdfetex (!?)
When I start LaTeX, it don't produce dvi output. Only pdf output. Why?

I have seen on http://www.tug.org/tetex/tetex-texmfdist/doc/
"Default engine: pdfetex is now the default engine used for most formats 
(including latex)."

But how can I get my dvi back?

Thanks
	Christian

--

-- 
---------
Christian Baun                                          http://www.bauni.de
Diplom-Informatiker (FH)                                       UIN: 9107054

Thomas Esser | 18 Mar 02:35 2006
Picon
Picon

Re: dvi output with tetex 3.0

> When I start LaTeX, it don't produce dvi output. Only pdf output. Why?

It must be something in your macros or someone's package that turns on
pdf mode. By default, latex still produces dvi. Just try
  latex small2e
to see that this is right.

> But how can I get my dvi back?

Just don't switch to pdf mode!

Thomas

Harry Schmidt | 21 Mar 09:47 2006

Re: dvi output with tetex 3.0

Christian Baun schrieb:

> today my Debian-System did an teTeX upgrade from 2.0.2 to 3.0.
> Now, /usr/bin/latex is a Link to pdfetex (!?)

> When I start LaTeX, it don't produce dvi output. Only pdf output. Why?

   You have some code along the lines of

\newif\ifpdf
\ifx\pdfoutput\undefined
  \pdffalse
\else
  \pdfoutput=1
  \pdftrue
\fi

in your document to distinguish between pdfTeX and TeX (btw., this code
was *never* really correct).  Since now pdfeTeX is the standard engine
for LaTeX alwas the \else path is taken and \pdfoutput is set to 1,
thus enabling PDF output instead of DVI output (\pdfoutput=0, the
standard value whan calling latex).

   Are you really sure you have to distinguish between PDF and DVI
output?  Many packages (notably graphicx and hyperef) are clever enough
to detect the desired output automatically.  If you are really sure you
need to distinguish by hand then use ifpdf.sty.

 
> I have seen on http://www.tug.org/tetex/tetex-texmfdist/doc/
(Continue reading)

Christian Baun | 22 Mar 13:06 2006
Picon
Picon

Re: dvi output with tetex 3.0

>    You have some code along the lines of
>
> \newif\ifpdf
> \ifx\pdfoutput\undefined
>   \pdffalse
> \else
>   \pdfoutput=1
>   \pdftrue
> \fi

You are absolutely right. This was my problem. 

Thanks
        Christian

--

-- 
---------
Christian Baun                                          http://www.bauni.de
Diplom-Informatiker (FH)                                       UIN: 9107054

João Batista | 11 Apr 10:18 2006
Picon

Re: dvi output with tetex 3.0

Christian Baun <cray <at> unix-ag.uni-kl.de> writes:
> 
> >    You have some code along the lines of
> >
> > \newif\ifpdf
> > \ifx\pdfoutput\undefined
> >   \pdffalse
> > \else
> >   \pdfoutput=1
> >   \pdftrue
> > \fi
> 
> You are absolutely right. This was my problem. 
> 
> Thanks
>         Christian
> 

OK, one question then.

Suppose we're using a ill-formatted template with precisely those commands.
Isn't there a way to disable PDF output from the command line?

For example, I expected that doing 

  latex -output-format=dvi myfile.tex

would override the previous code and put out a DVI file...

Cheers,
(Continue reading)

David Kastrup | 11 Apr 12:28 2006
Picon
Picon

Re: dvi output with tetex 3.0

João Batista <joao_mn_batista <at> portugalmail.pt> writes:

> Christian Baun <cray <at> unix-ag.uni-kl.de> writes:
>> 
>> >    You have some code along the lines of
>> >
>> > \newif\ifpdf
>> > \ifx\pdfoutput\undefined
>> >   \pdffalse
>> > \else
>> >   \pdfoutput=1
>> >   \pdftrue
>> > \fi
>> 
>> You are absolutely right. This was my problem. 
>> 
>> Thanks
>>         Christian
>> 
>
> OK, one question then.
>
> Suppose we're using a ill-formatted template with precisely those commands.
> Isn't there a way to disable PDF output from the command line?
>
> For example, I expected that doing 
>
>   latex -output-format=dvi myfile.tex
>
> would override the previous code and put out a DVI file...
(Continue reading)

João Batista | 11 Apr 17:05 2006
Picon

Re: dvi output with tetex 3.0

David Kastrup <dak <at> gnu.org> writes:

> 
> João Batista <joao_mn_batista <at> portugalmail.pt> writes:
> > >    You have some code along the lines of
> > >
> > > \newif\ifpdf
> > > \ifx\pdfoutput\undefined
> > >   \pdffalse
> > > \else
> > >   \pdfoutput=1
> > >   \pdftrue
> > > \fi
> >
> > Suppose we're using a ill-formatted template with precisely those commands.
> > Isn't there a way to disable PDF output from the command line?
> >
> > For example, I expected that doing 
> >
> >   latex -output-format=dvi myfile.tex
> >
> > would override the previous code and put out a DVI file...
> 
> This should presumably work by making any assignment to \pdfoutput
> fail to have an effect.  But this would still set "\pdftrue" above.
> And this means that the document (which presumably does the above not
> for the sole purpose of annoying people) will then compile a
> non-functional document, by assuming PDF mode (which won't work).
> 
> Then you could call for your "-output-format" option to actually make
(Continue reading)

Thomas Esser | 11 Apr 20:39 2006
Picon
Picon

Re: dvi output with tetex 3.0

> Oh man... I thought that the command line arguments took precedence over what's
> in the files! (IMHO, it should. I like my tools "intelligent", but I like them
> even more to be obedient...).

Right and that works the way it is documented. latex.fmt and pdflatex.fmt
have a default for the variable that defines the output format. The
commad line switch can override this. Just try
  latex -output-format=pdf small2e
  pdflatex -output-format=dvi small2e

The command line switch just sets a default that is active at the
moment when processing the file starts. The document can still switch
the output format. As David has poined out, it would have too many side
effects to manipulate the primitives of pdftex.

Really, any document which assumes pdf output mode without checking
\pdfoutput in the right way *is broken*. pdftex was able to create dvi
files since the first public release.

> For me it's not really that serious, it's more an annoyance. But I think I can
> live with that (as long as the "official" templates included in tetex are
> consistent, I'll be happy!).

I think that they are. Just let me know if you find something broken.

> I'd like to ask then, what is the purpose of "-output-format"? Better
> yet: what was the rationale behind the switch to use pdfetex in place
> of latex?

- the latex team has asked to an eTeX based engine for latex
(Continue reading)

Reinhard Kotucha | 12 Apr 00:52 2006
Picon

Re: dvi output with tetex 3.0

>>>>> "Thomas" == Thomas Esser <te <at> dbs.uni-hannover.de> writes:

  > As David has poined out, it would have too many side effects to
  > manipulate the primitives of pdftex.

Even if the side effects can be ignored, it is wrong to change
primimitives in order to fix bugs in macro packages.

Maybe it is sufficient to write a little file

fixpdftest.tex:
___________________________________________
\input ifpdf.sty
\ifpdf \else \let\pdfoutput\undefined \fi
___________________________________________

and put the line

   \input fixpdftest

into your LaTeX document before any other macro package is loaded.

Some people might not check \pdfoutput but \pdftexversion, for instance.
If you encounter such a file, you can add the line 

   \ifpdf \else \let\pdftexversion\undefined \fi

to fixpdftest.tex.

However, the best thing you can do is to politely ask the author of
(Continue reading)

Rolf.Niepraschk | 12 Apr 11:55 2006
Picon

Re: dvi output with tetex 3.0


owner-tetex <at> dbs.uni-hannover.de schrieb am 12.04.2006 00:52:38:

> >>>>> "Thomas" == Thomas Esser <te <at> dbs.uni-hannover.de> writes:
>
>   > As David has poined out, it would have too many side effects to
>   > manipulate the primitives of pdftex.
>
> Even if the side effects can be ignored, it is wrong to change
> primimitives in order to fix bugs in macro packages.
>
> Maybe it is sufficient to write a little file
>
> fixpdftest.tex:
> ___________________________________________
> \input ifpdf.sty

Don't use the plain TeX syntax!

> \ifpdf \else \let\pdfoutput\undefined \fi
> ___________________________________________
>
> and put the line
>
>    \input fixpdftest
>
> into your LaTeX document before any other macro package is loaded.

Don't use the plain TeX syntax! Better:

(Continue reading)

Reinhard Kotucha | 13 Apr 00:59 2006
Picon

Re: dvi output with tetex 3.0

>>>>> "Rolf" == Rolf Niepraschk <Rolf.Niepraschk <at> ptb.de> writes:

  > Don't use the plain TeX syntax! Better:

  >   \input{fixpdftest}

  > or

  >   \usepackage{fixpdftest}% fixpdftest.tex --> fixpdftest.sty

Of course, \input{<filename>} is more appropriate for LaTeX users than
\input <filename>.

However, I proposed \input instead of \usepackage to allow inserting
it at the very top of a file, i.e. before \documentclass.

\usepackage will issue the following error massage in this case:

   ! LaTeX Error: \usepackage before \documentclass.

There is another interesting thing.  How about this one?

   latex fixpdftest myfile

In this case fixpdftest.tex will be executed before \documentclass.

Regards,
  Reinhard

--

-- 
(Continue reading)

David Kastrup | 13 Apr 09:20 2006
Picon
Picon

Re: dvi output with tetex 3.0

Reinhard Kotucha <reinhard.kotucha <at> web.de> writes:

> However, I proposed \input instead of \usepackage to allow inserting
> it at the very top of a file, i.e. before \documentclass.

That's a bad idea since it will not set the right catcodes for  <at>  and
not record stuff properly and the option parsing does not work, and
you'll have \ProvidesPackage barf.

> \usepackage will issue the following error massage in this case:
>
>    ! LaTeX Error: \usepackage before \documentclass.

So use \RequirePackage instead.  That's for "internal use" and works
before \documentclass.

--

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


Gmane