4

I have a LaTeX source code compiled with synctex=1. If I open it in TeXShop and I can click in the viewer on a certain word then I am navigated exactly on the word in the source code. By contrast, if I open it in TeXworks and click on the same word, the whole paragraph containing the word is highlighted, which is a bit confusing when the paragraphs are quite long.

Any ideas how to force TeXworks to highlight only the particular word and not the whole paragraph?

1 Answer 1

6

SyncTeX only includes stores information on a line-by-line basis in the source, not to the granulatiry of individual letters or words. It is possible for editors to set up a search-based approach to give better synchronisation, as for example discussed in Forward-inverse search using SyncTeX with the precison of a single word. However, that is not necessarily trivial!

For this reason (and others), many experiences TeX authors write their source with 'hard' line breaks, rather than using the word wrap feature of their editor. This means that synchronisation will match to a single line. With a typical line length of 70-80 characters, this is usually sufficiently accurate for real-world use.

3
  • One of the keyboard shortcuts I use more often is Command-I that I remapped to "wrap paragraph" (that is, use hard wrapping).
    – egreg
    Commented Mar 31, 2012 at 14:41
  • "It is possible for editors to set up a search-based approach to give better synchronisation, as for example discussed in ...": How? The question now has a bounty, in case you have the answer...
    – krlmlr
    Commented Jun 13, 2012 at 19:27
  • related: tex.stackexchange.com/a/54188/8569
    – matth
    Commented May 16, 2015 at 12:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .