\documentclass{article}
\begin{document}
hello world
\end[document}
versus
\documentclass{article}
\usepackage[dvipsone]{hyperref}
\begin{document}
hello world
\end[document}
The latter file is latexed twice. I've tried to run down the problem
by carefully tracing Heiko's hyperref, but cannot locate the problem.
Heiko, or anyone, any ideas?
The problem does not occur when I use MikTeX (2.8),
don
Well if I use texify from miktex to compile your document (which
tries to run a document as often as needed) it calls latex twice
too. I don't know how exactly texify tries to decide if another run
is needed but the log-file contains the warning "Package hyperref
Warning: Rerun to get /PageLabels entry." after the first run, so it
does the right thing.
--
Ulrike Fischer
> I am using the yandytex compiler, and lately I've noticed that eveny
> time I latex a document that uses hyperref, the doc is compiled twice.
> \documentclass{article}
> \usepackage[dvipsone]{hyperref}
> \begin{document}
> hello world
> \end[document}
>
> The latter file is latexed twice. I've tried to run down the problem
> by carefully tracing Heiko's hyperref, but cannot locate the problem.
It's quite easy, just check the .log file for rerun warnings, for
example:
| Package hyperref Warning: Rerun to get /PageLabels entry
You are using a driver that is based on DVI+PostScript.
For PageLabels, \thepage must be known for *each* page
of the document, also the last page. And based on this
data \special commands must be thrown out. But this isn't
possible after the last page, because there isn't a page
left, where the specials can be put. Therefore the .aux file
records the data and the /PageLabels are set in the second
run at the beginning/first page.
If your document entirely uses arabic numbers starting
with 1 and incrementing with 1 you can disable the
PageLabels, because this is the default in the PDF
specification.
\usepackage[dvipsone,pdfpagelabels=false]{hyperref}
Other example is bookmarks, use package `bookmark':
\usepackage[dvipsone]{hyperref}
\usepackage[dvipsone]{bookmark}
It uses an improved algorithm that stores the PostScript
data in a file that is included at the first page as
PostScript header file.
The same trick could be also used for PageLabels,
but the current implementation of PageLabels in
hyperref predates the package bookmark.
--
Heiko Oberdiek
Thanks Heiko and Ulrike for the info. Most of the time I latex only
once during document development, and latex three times to get all aux
data up to date. It is tiresome to be forced into two compilations
each time.
don
Heiko, this does not work (pdfpagelabels=false). Of course, I know the
file must be compiled several times to bring all aux info up to date,
that was not my issue. My issue is that when I latex (using yandy),
the file is AUTOMATICALLY compiled twice. Is there something that
hyperref does that would force the automatic re-compile?
Compilation is initialted by LaTeX.edt, a macro file of WinEdt,
perhaps it only has the power to cause an automatic re-compile.
don
> Heiko, this does not work (pdfpagelabels=false). Of course, I know the
> file must be compiled several times to bring all aux info up to date,
> that was not my issue. My issue is that when I latex (using yandy),
> the file is AUTOMATICALLY compiled twice. Is there something that
> hyperref does that would force the automatic re-compile?
No. It is either the compiler or a winedt macro which is doing it. I
looked in the default Yandy-configuration of winedt6: latex seems to
use a "yandytex\tex.bat". So I would at first check what this
bat-file is actually doing.
--
Ulrike Fischer
> Heiko, this does not work (pdfpagelabels=false).
*What* does not work?
Of course, you have to analyze the .log file and find out, which
rerun warnings you have.
> Of course, I know the
> file must be compiled several times to bring all aux info up to date,
> that was not my issue. My issue is that when I latex (using yandy),
> the file is AUTOMATICALLY compiled twice.
Usually "latex" calls the TeX compiler with the LaTeX format.
If the file gets compiled twice, then you have something different.
> Is there something that
> hyperref does that would force the automatic re-compile?
There is nothing. Of course, there might be "rerun" warnings
by hyperref or other packages or by the LaTeX kernel.
These warnings are print on the screen and written to the .log file.
Thus another program can find them and do some action,
e.g. re-compile the file.
> Compilation is initialted by LaTeX.edt, a macro file of WinEdt,
That isn't "latex"!
> perhaps it only has the power to cause an automatic re-compile.
That's much more probable that the re-compile is done by
WinEdt than a single "latex" call.
Check LaTeX.edt and the documentation of WinEdt.
Also delete the .aux, .out files and call "latex" manually
on the command line to get the .log file of the first compile run.
--
Heiko Oberdiek
I have bypassed the LaTeX.edt (WinEdt) macro file, and not when I
latex, the file is only latexed once. The problem, then, lies with
LaTeX.edt. I haven't been able to trace through that winedt macro file
yet, Thr problem the is not with hyperref, but most likely with
the .edt file.
Thanks one, and all.
dps