Forgot password?
 Create new account
View 148|Reply 1

SyncTeX 有时位置不对

[Copy link]

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

hbghlyj Posted at 2023-4-30 00:00:41 |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行.

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

 Author| hbghlyj Posted at 2023-4-30 00:06:47
如果换行
  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行).

手机版Mobile version|Leisure Math Forum

2025-4-20 22:16 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list