[OS X TeX] pdfsync changes page breaks?

Ross Moore ross at ics.mq.edu.au
Sun Jul 9 00:32:36 EDT 2006

Hi Haris,

On 09/07/2006, at 7:54 AM, Charilaos Skiadas wrote:

> On Jul 8, 2006, at 4:43 PM, Gary L. Gray wrote:
>> On Jul 8, 2006, at 5:38 PM, Alex Scorpan wrote:
>>> I'm working on a big doc, 150 pages, and decided to try adding 
>>> pdfsync to the sync method.  After adding \usepackage{pdfsync}, the 
>>> page breaks were different.  Is this normal, known, whatever?
>> This is a known problem. If you are using TeXShop, I recommend using 
>> the "Search" sync method under Preferences > Misc.
> I must say I find this both perplexing and slightly distressing. I 
> just don't see what pdfsync has to do with page breaks. Could anyone 
> offer some more details/links on this?

I believe that  pdfsync  adds to the material that is output into the 
final PDF file.
This can upset the allocation of  \penalty s, which affects TeX's 
algorithms for determining how acceptable is a line-break or page-break
at any given place. This is true even when the added material has zero 

Schematically, the following both produce the same visual effect on a 

     .....  some text material in a paragraph<sync>
     breaking at the end of a line ...

     .....  some text material in a paragraph
     <sync>breaking at the end of a line ...

where <sync> denotes zero-sized material inserted for the purposes
of synchronisation.  However, the internal TeX calculations for the
desirability of each break can conceivably produce different answers
-- thereby resulting in a break being chosen at a place different to 
what is best when there is no <sync> material.

The same kind of problem affects use of the  hyperref  package,
wherever anchors for hyperlinks are inserted, and also where
active links themselves occur. In this case, however, the problem
is usually manifest more in the amount of visible vertical space
between (sub-)sections and environments, rather than for line-breaking
within paragraphs.

Try a test, with a largish document having plenty of sectioning,
math-equations, cross-references and citations; e.g. a typical (math)
journal article.  Process it multiple times with LaTeX until stable,
both with  hyperref loaded, and without it.
Check the paginations; I'll bet that you find some subtle differences.

It takes quite tricky macro-programming to keep this to a minimum.

> Is there some technical reason why this is not fixed, or is it that 
> no-one has gotten around to giving it a try?

The notions of hyperlinking and synchronisation are not something
that is built-in to TeX, as primitives. These are added at the level of 
using those structures (such as \special ) that TeX does provide for 

To "fix this properly", whatever that actually means, would almost 
require rewriting fundamental parts of the algorithms that TeX uses for
determining the best places for line- and page-breaks in the output.

> Is there a particular page number where things start going amiss? Is 
> the same true if the file is broken in smaller files via \include 
> commands?

Not likely.
The nature of the "problem" is quite fundamental.

BTW, if you are wondering about how Textures managed synchronization,
and whether there were similar problems there, the answer is "no".

This is because Textures had its own integrated viewer, so the same
Application was handling both the editing and viewing windows, as
well as the internal processing. This gave Textures  the luxury of 
being able
to extend the data-structure used to represent letters and symbols, so 
as to
include the file-name and location within that file whence each 
character came.
This is completely orthogonal to the actual typesetting,
so the previously-described effects would not occur.

Recall that Textures did not produce a .dvi file as a result of 
To get one, you needed to "Export" the typeset window to a .dvi file.
One step in this procedure is stripping out that extra structure.
(If you re-Import the Exported .dvi file, then there's no 
  --- well, there isn't really any .tex source to synchronise with, 
It'll be interesting to see how the new TeXtures manages sychronisation
with .pdf output, or whether that will similarly require use of an 
Export option.

>> Regards,
>>   Gary
> Haris

Hope this helps,


------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/

More information about the MacOSX-TeX mailing list