Forgot password
 Register account
View 273|Reply 1

SyncTeX 有时位置不对

[Copy link]

3211

Threads

7832

Posts

52

Reputation

Show all posts

hbghlyj posted 2023-4-30 00:00 |Read mode
  1. \documentclass{standalone}
  2. \begin{document}
  3. aaaaaaaaaaaaaaaaaaaaaaaa
  4. bbbbbbbbbbbbbbbbbbbbbbbb
  5. cccccccccccccccccccccccc
  6. \end{document}
Copy the Code
如果用Bananaspace的网页编辑器(支持SyncTeX) 定位总是精确的(似乎用HTML+JS实现的).
如果用本地的 SumatraPDF + VScode LaTeX workshop
点击a时,能正确地跳至源码第3行
点击b的前半截时,却跳至源码第3行
点击b的后半截时,能正确地跳至源码第4行
点击c时,却跳至源码第4行. 即使点击最后1个c还是跳至源码第4行.

3211

Threads

7832

Posts

52

Reputation

Show all posts

original poster hbghlyj posted 2023-4-30 00:06
如果换行
  1. \documentclass{article}
  2. \begin{document}
  3. aaaaaaaaaaaaaaaaaaaaaaaa
  4. bbbbbbbbbbbbbbbbbbbbbbbb
  5. cccccccccccccccccccccccc
  6. \end{document}
Copy the Code
点击a,b,c定位至3,5,7行都是正确的.

但如果2个空行
  1. \documentclass{article}
  2. \begin{document}
  3. aaaaaaaaaaaaaaaaaaaaaaaa
  4. bbbbbbbbbbbbbbbbbbbbbbbb
  5. cccccccccccccccccccccccc
  6. \end{document}
Copy the Code
点击a,b,c定位至4,7,10行(都是向后多了1行).

Quick Reply

Advanced Mode
B Color Image Link Quote Code Smilies
You have to log in before you can reply Login | Register account

$\LaTeX$ formula tutorial

Mobile version

2025-7-20 06:15 GMT+8

Powered by Discuz!

Processed in 0.012841 seconds, 25 queries