[OS X TeX] pdfsync.sty testers needed

Jérome Laurens jerome.laurens at u-bourgogne.fr
Mon Nov 27 04:00:13 EST 2006


the package now contains stronger code than ever thanks D. Kastrup
which is good news because David's knowledge in LaTeX is far beyond  
what I will ever reach...
pdfsync.sty is expected to work correctly in almost all situations  
but if you could make some tests on long production documents, it  
would help a lot.

Now, pdfsync requires pdfetex like engines (including xetex I guess),  
what most people should already have, no need to switch.





in case of problems.

There are 2 situations where there can be a problem:
1 -  for the layout, spacing or page breaking can be affected. This  
would be extremely rare.
2 - for the code, some incompatibility exists with actual packages:  
with bigfoot, pdfsync must be run in novbox mode

Finally, let me emphasize that pdfsync.sty is -not- an obsolete  
technology, despite what is said here and there.

TIA for your contribution

----- cut here: save the rest of the file as pdfsync.sty in your  
working directory

%% pdfsync.sty Copyright (C) 2006 J\'er\^ome Laurens
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2 of the License, or
% (at your option) any later version.
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% GNU General Public License for more details.
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA   
02110-1301  USA
%%%%  Version 1.0beta usage: \usepackage[options]{pdfsync}
%%%%  ==================
%%%%  appends reference points before each \par and at each \hbox,  
inline math;
%%%%  Known commands:
%%%%  \pdfsync: add this command everywhere you want to reference a  
%%%%  \pdfsyncstop, \pdfsyncstart: if pdfsync beaks your code,  
enclose the dangerous part in stop start group
%%%%  option: nopar
%%%%  don't insert reference point at par's
%%%%  option: nomath
%%%%  don't insert reference point at math's
%%%%  option: nohbox
%%%%  don't insert reference point at hboxes
%%%%  option: noextra
%%%%  don't insert reference point at LaTeX extra commands
%%%%  option: off
%%%%  All the pdfsync related commands are \relax'ed
%%%%  If you want additional files to be parsed, please use the command
%%%%  \include{foo} or \input{foo},
%%%%  the \input foo will break up the synchronization
%%%%  Credits:
%%%%  ========
%%%%  This file is due to Piero D'Ancona and  
jlaurens at users.sourceforge.net
%%%%  iTeXMac, TeXShop, AucTeX, TeXNiscope are supporting pdfsync
%%%%  Copy this file to ~/Library/texmf/tex/latex or ~/Library/TeX/ 
texmf/tex/latex if available
%%%%  This file is distributed under the GPL and the "smart licence":  
please make things better if you can
%%%%  copyright 2006, jlaurens at users.sourceforge.net
\ifx\pdfsync\undefined\else\message{****  pdfsync.sty: WARNING, the  
package is already loaded.}\expandafter\endinput\fi%
\def\c at nfigPDFSYNC@ff{%
\message{****  pdfsync.sty: WARNING, synchronization is only  
available with pdeftex like engines.}%
\c at nfigPDFSYNC@ff
\let\c at nfigPDFSYNC@ff=\undefined
% Defining the preamble of the style file:
\ProvidesPackage{pdfsync}[2006/09/07 v1.0beta]%
% start of the code
\let\c at nfigPDFSYNCp@r\relax%
\let\c at nfigPDFSYNCm@th\relax%
\let\c at nfigPDFSYNCdispl@y\relax%
\let\c at nfigPDFSYNChb@x\relax%
\let\c at nfigPDFSYNCvb@x\relax%
\let\c at nfigPDFSYNC@cr\relax%
% Subverting |\everypar| to prepend pdfsync |\@PDFSYNC| specific code  
that will
% be executed for each new paragraph.
%This was primarly suggested by Curtis Clifton on 12/17/2004 (google  
"subvert token" for details).
\def\c at nfigPDFSYNCp@r{\wlog{****  pdfsync.sty: Synchronizing at  
\newtoks\PDFSYNCeveryp at r
\PDFSYNCeveryp at r\everypar
   \the\PDFSYNCeveryp at r}%
\let\everypar\PDFSYNCeveryp at r
\def\c at nfigPDFSYNCdispl@y{\wlog{****  pdfsync.sty: Synchronizing at  
\newtoks\PDFSYNCeverydispl at y
\PDFSYNCeverydispl at y\frozen at everydisplay
\frozen at everydisplay{\@PDFSYNC\the\PDFSYNCeverydispl at y}%
\let\frozen at everydisplay\PDFSYNCeverydispl at y
\def\c at nfigPDFSYNCm@th{\wlog{****  pdfsync.sty: Synchronizing at  
\newtoks\PDFSYNCeverym at th
\PDFSYNCeverym at th\frozen at everymath
\frozen at everymath{\@PDFSYNC\the\PDFSYNCeverym at th}%
\let\frozen at everymath\PDFSYNCeverym at th
\def\c at nfigPDFSYNChb@x{\wlog{****  pdfsync.sty: Synchronizing at  
\newtoks\PDFSYNCeveryhb at x
\PDFSYNCeveryhb at x\everyhbox
\everyhbox{\ifPDFSYNC at unblocked
       \PDFSYNC at unblockedfalse
          \aftergroup\PDFSYNC at endhbox\the\PDFSYNCeveryhb at x
     \PDFSYNC at unblockedtrue
\let\everyhbox\PDFSYNCeveryhb at x
\def\PDFSYNC at endhbox{\ifnum\lastnodetype>\m at ne
     \egroup \unhbox\z@ \egroup \unhbox\z@
   \else \egroup \egroup \fi \endgroup \egroup}%
\def\c at nfigPDFSYNCvb@x{\wlog{****  pdfsync.sty: Synchronizing at  
\newtoks\PDFSYNCeveryvb at x
\PDFSYNCeveryvb at x\everyvbox
\everyvbox{\ifPDFSYNC at unblocked
       \PDFSYNC at unblockedfalse
          \aftergroup\PDFSYNC at endvbox\the\PDFSYNCeveryvb at x
     \PDFSYNC at unblockedtrue
\let\everyvbox\PDFSYNCeveryvb at x
\def\PDFSYNC at endvbox{\ifnum\lastnodetype>\m at ne
     \unvbox\z@ \next \unvbox\z@
   \else \egroup \egroup \fi \endgroup \egroup}%
\def\c at nfigPDFSYNC@cr{\wlog{****  pdfsync.sty: Synchronizing at  
\newtoks\PDFSYNCevery at cr
\PDFSYNCevery at cr\everycr
\everycr{\the\PDFSYNCevery at cr\@PDFSYNC}%
\let\everycr\PDFSYNCevery at cr
% Configure pdsync
\def\c at nfigPDFSYNC{\wlog{Configuring pdfsync}%
\newwrite\PDFSYNC at ut%
\immediate\openout\PDFSYNC at ut\jobname.pdfsync%
\immediate\write\PDFSYNC at ut{\jobname}% control info
\immediate\write\PDFSYNC at ut{version 1}% control info
%   patching \shipout
\let\PDFSYNCship at ut@ld\shipout%
\gdef\PDFSYNCship at utn@w{%
\afterassignment\PDFSYNC at utput%
\setbox\@cclv= %
\def\PDFSYNC at utput{%
\global\advance\PDFSYNCf at li@ by 1%
\immediate\write\PDFSYNC at ut{s\space\the\PDFSYNCf at li@}%
\PDFSYNCship at ut@ld\box\@cclv%
% patching LaTeX \InputIfFileExists for \include and \input
\let\PDFSYNCInputIfFileExists at ff\InputIfFileExists%
\long\def\PDFSYNCInputIfFileExists at n##1##2##3{%
\immediate\write\PDFSYNC at ut{(##1}%
\PDFSYNCInputIfFileExists at ff{##1}{##2}{##3}%
\immediate\write\PDFSYNC at ut{)}}%
\def\PDFSYNCP at siti@n{\the\pdflastxpos\space\the\pdflastypos}%
\newif\ifPDFSYNCst at r%
\newif\ifPDFSYNCvb at x%
\newcount\PDFSYNCf at li@\PDFSYNCf at li@=0%
\newcount\PDFSYNC at rder\PDFSYNC at rder=0%
\newif\ifPDFSYNC at unblocked
\PDFSYNC at unblockedtrue
% defining \@@PDFSYNC: the macro that writes to the .pdfsync file
\immediate\write\PDFSYNC at ut{l\space\the\PDFSYNC at rder\space\the 
\edef\next{\write\PDFSYNC at ut{p\ifPDFSYNCst at r*\else\ifPDFSYNCvb at x+\fi 
\fi\space\the\PDFSYNC at rder\space\noexpand\PDFSYNCP at siti@n}}%
\global\advance\PDFSYNC at rder by 1%
\def\@pdfsync{\bgroup\PDFSYNCst at rtrue\@PDFSYNC\egroup}%
\let\shipout\PDFSYNCship at utn@w%
\let\InputIfFileExists\PDFSYNCInputIfFileExists at n%
\let\shipout\PDFSYNCship at ut@ld%
\let\InputIfFileExists\PDFSYNCInputIfFileExists at ff%
\c at nfigPDFSYNCp@r%
\let\c at nfigPDFSYNCp@r\undefined%
\c at nfigPDFSYNCm@th%
\let\c at nfigPDFSYNCm@th\undefined%
%\c at nfigPDFSYNCdispl@y% This does not work with amsmath
\let\c at nfigPDFSYNCdispl@y\undefined%
\c at nfigPDFSYNChb@x%
\let\c at nfigPDFSYNChb@x\undefined%
\c at nfigPDFSYNCvb@x%
\let\c at nfigPDFSYNCvb@x\undefined%
%\c at nfigPDFSYNC@cr% This does not work "Missing \cr inserted" in  
\let\c at nfigPDFSYNC@cr\undefined%
% the problem of the soul package
	\message{! pdfsync is patching the soul package}
         \let\PDFSYNC at SOUL@\SOUL@
             \bgroup\pdfsyncstop\PDFSYNC at SOUL@{##1}\egroup
\wlog{****  pdfsync.sty: started}%
\c at nfigPDFSYNC%
\let\c at nfigPDFSYNC\undefined%
% end of the core code
% Declaring the option 'nopar' to disable this feature
\DeclareOption{nopar}{\let\c at nfigPDFSYNCp@r\relax}%
% Declaring the option 'nomath' to disable this feature
\DeclareOption{nomath}{\let\c at nfigPDFSYNCm@th\relax}%
% Declaring the option 'nodisplay' to disable this feature
\DeclareOption{nodisplay}{\let\c at nfigPDFSYNCdispl@y\relax}%
% Declaring the option 'nohbox' to disable this feature
\DeclareOption{nohbox}{\let\c at nfigPDFSYNChb@x\relax}%
% Declaring the option 'novbox' to disable this feature
\DeclareOption{novbox}{\let\c at nfigPDFSYNCvb@x\relax}%
% Declaring the option 'nocr' to disable this feature
\DeclareOption{nocr}{\let\c at nfigPDFSYNC@cr\relax}%
% Declaring the option 'off', all the macros are set to \relax
\DeclareOption{off}{\let\c at nfigPDFSYNC\c at nfigPDFSYNC@ff}%

------------------------- 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