# Does pdf syncing (forward-inverse search) work with XeLaTeX?

I commonly use textmate+skim or more recently texpad. I have zero problems with pdfsyncing (especially since skim fixed a bug not so long ago). Even more recently I have been playing around with XeLaTeX and I find the syncing behaving incredibly bad.

Is it something I just have to live with, is there a solution to this or am I simply doing something wrong? (I'm using last year's mactex distribution if that makes a difference).

MWE

\documentclass{article}
\begin{document}
This is the document. And it doesn't seem to work!
fudge me it doesn't work!
\subsection{yope}
This is the document. And it doesn't seem to work!
fudge me it doesn't work!
This is the document. And it doesn't seem to work!
fudge me it doesn't work!
\subsection{yope}
This is the document. And it doesn't seem to work!
fudge me it doesn't work!
This is the document. And it doesn't seem to work!
fudge me it doesn't work!

\end{document}

-
Can you describe more precisely what you're trying, i.e. what your configuration for compiling and opening a viewer is, and what doesn't work (other than "the syncing behaving incredibly bad"). (I don't use any of the components you mentioned, but I imagine people who do won't be able to get a lot of information out of your question.) –  doncherry Dec 12 '12 at 8:09
Update to the most recent MacTeX; until TeX Live 2011 there was a bug in XeTeX that caused synchronization to be off by a couple of paragraphs. –  egreg Dec 12 '12 at 10:27
@doncherry: what else would be useful to you? I am using both textmate to compile with xelatex and skim to view the pdf. I also use texpad which has everything built in. The tex distribution I use is the one provided my mactex. The syncing is off by a paragraph or two (which is especially annoying when you divide your project into different files for each section and it gets the file wrong). –  John Salvatierrez Dec 12 '12 at 10:43
@egreg: I tried on another laptop with the distribution up to date, but it didn't work. I'll try updating on my current laptop anyway. –  John Salvatierrez Dec 12 '12 at 10:46
@carmelodevisu You also have to help SyncTeX: leave a blank line before \section and \subsection commands. I'm no TextMate user, but the synchronization works perfectly with Aquamacs; I tried with TextMate and from the PDF to the TeX file it works (I don't know how to do from TeX to PDF and I'm not interested in discovering it). –  egreg Dec 12 '12 at 10:51

SyncTeX works properly with MacTeX 2012 and Skim, with any editor supported by the previewer.

Until TeX Live 2011 a bug in the integration of SyncTeX with XeTeX caused synchronization to be a couple of paragraphs off (and it was an annoying bug indeed). However, the XeTeX version in TeX Live 2012 has fixed the problem.

Thus you have to upgrade to the current MacTeX, if you want synchronization to work correctly. You'll have many more benefits from the upgrade.

-
ok, I'll try and see if that was the problem –  John Salvatierrez Dec 12 '12 at 10:48
thanks a large amount - it works –  John Salvatierrez Dec 12 '12 at 13:46

Texpad developers here. Sorry for being late to the party.

I'd like to add a quick note: in v1.5.1, planned for release tomorrow (4-June-2013), we've fixed a few more issues with SyncTeX in Texpad. The synching is now much improved and accurate.

Hope it helps.

-