[texhax] Regarding an issue in switching between the source file and the pdf file

Heiko Oberdiek heiko.oberdiek at googlemail.com
Sun May 27 08:43:22 CEST 2018


Hello,

On 2018-05-26 18:49, Avinash Kumar wrote:
> 
> But I am facing an issue in switcing between source file and pdf file.
> When I switch form pdf to source, it highlights whole paragraph instead 
> of a specific word/line which I wish to see after switching. I am 
> attaching a picture to illustrate the problem.

That attached picture shows that not the whole paragraph is highlighted
but only the current line. However, the source code line 13 is
quite long and the viewer needs several lines to show the line.

AFAIK, the TeX compilers only provide source code line numbers as 
smallest unit, the underlying feature (syncTeX) from jumping from
PDF to source cannot be more accurate than the line level.

To improve the situation, tell your editor TeXworks that it inserts
hard line breaks automatically to get shorter lines in general
(I assume TeXworks has such a feature). This also makes it more
friendly for version control (e.g., showing differences in changed
lines).

Yours sincerely
   Heiko


More information about the texhax mailing list