[pdftex] Rerunning pdflatex

Vafa Khalighi vafakh84 at gmail.com
Wed Apr 7 09:18:32 CEST 2010


>
> pages are compiled independently by default.  this is the way tex works.
>
> that information is passed to future runs via the .aux file, so that
> later compilations know (on page n) what happened on pages n+1, n+2,
> etc.
>
>
>
It is true that page breaking is unpredicted in TeX but with some tricks you
can overcome this. As an example in bidi package, \autofootnoterule is
implemented. If the first footnote in a page is RTL, the footnote rule is on
right hand side, no matter what other footnotes on that specific page are
and if the first footnote in a page is LTR, the footnote rule on that
specfic page is on the left hand side, no matter what other footnotes on
that page are. bidi implements this and  you always get the correct footnote
rule, there is no way that you get the wrong footnote rule. and this only
requires one run of latex. but there are similar packages which are
disappointed of doing this and requires two run of latex and they use a very
bad approach and that is writing to .aux.

The trick I've performed here is to maintain a list the ht+dp of footnotes
inserted and the resolved direction of that footnote.  Then in the output
routine, from the ht+dp of the footins box and this list of mine, I can
figure out what the direction of the first footnote in this page is, and
which footnotes are actually put in this page, and update my list.



-- 
Best wishes,
Vafa Khalighi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pdftex/attachments/20100407/0dd887fb/attachment.html>


More information about the pdftex mailing list