Forgot password?
 Register account
View 275|Reply 1

SyncTeX 有时位置不对

[Copy link]

3153

Threads

7906

Posts

610K

Credits

Credits
64096
QQ

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行.

3153

Threads

7906

Posts

610K

Credits

Credits
64096
QQ

Show all posts

 Author| 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行).

Mobile version|Discuz Math Forum

2025-6-5 01:30 GMT+8

Powered by Discuz!

× Quick Reply To Top Edit