[OS X TeX] pdfsync not marking paragraphs
Curtis Clifton
curt.clifton at mac.com
Mon Dec 6 04:28:32 CET 2004
I've been trying out BBEdit with TeXniscope as my LaTeX editing and
previewing combo. Using pdfsync plus Tom Kiffe's BBEdit plug-ins makes
this a wonderful set-up. (I know Claus Gerhardt also has worked on
this integration, but I happened to try Tom's efforts first.)
Anyway, I turned on synchronization mark viewing in TeXniscope and
discovered that I was not getting marks for every paragraph. Here is a
sample document that demonstrates the problem. Note that I am not
using the "nopar" option to pdfsync, so the paragraphs should be
marked.
\documentclass[10pt]{article}
\usepackage{pdfsync}
\begin{document}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam auctor,
magna dictum sodales viverra, dolor orci rhoncus felis, ut porttitor
orci tellus in augue.
Nam suscipit, wisi et bibendum dapibus, dui erat tempor lacus, id
pharetra erat odio ac velit. Sed condimentum pharetra libero. Morbi
wisi.
Etiam porttitor, sapien et volutpat vehicula, lacus ante adipiscing
ligula, a tempor turpis turpis in magna. Maecenas mauris justo, laoreet
nec, elementum eu, malesuada id, diam.
\end{document}
I did some experimenting and discovered a couple of things. One is
that if I add the following lines after the "\begin{document}", then
the synchronization marks appear at the start of each paragraph:
\makeatletter
\everypar{\@PDFSYNC}
\makeatother
However, I'm just experimenting with a simple document and suspect that
using \everypar might be problematic with a more complicated structure.
The other thing that I tried was tweaking pdfsync.sty to see why it
wasn't inserting marks at the paragraphs. I changed line 135 (of
verison 0.6, dated Jan. 31, 2004) from:
\global\let\PDFSYNC at par\@@par\gdef\@@par{\PDFSYNC at par\@PDFSYNC}\fi%
to
\global\let\PDFSYNC at par\@@par\gdef\@@par{\error\PDFSYNC at par\@PDFSYNC}\fi
%
where \error was undefined. When I typeset my document I don't get any
error messages, indicating to me that \@@par isn't being used by LaTeX.
I also inserted a \makeatletter\show\@@par\makeatother in the
document, and \@@par is definitely being defined according to my
changes.
My questions:
Is there something broken in pdfsync's use of a redefinition of \@@par
to accomplish paragraph marks? (I have Kopka and Daly, 4th ed., and
The Companion, 2nd ed., but I don't have Lamport, which I suspect might
be illuminating.) I see that prior to version 0.6, pdfsync redefined
\par instead.
Am I asking for trouble using \everypar{\@PDFSYNC}? If not, would it be
better if pdfsync used that?
Thanks!
Curt
----------------------------------
Curtis Clifton, PhD Candidate
Dept. of Computer Science, Iowa State University
http://www.cs.iastate.edu/~cclifton
--------------------- 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 Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
More information about the macostex-archives
mailing list