diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-07-14 19:00:50 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-07-14 19:00:50 +0000 |
commit | d71f49db443ba1d5b9cd19073bba2f4ae8ef1935 (patch) | |
tree | 28091ee37701e34b7b51498a11602e95be979772 | |
parent | af27879be6859c9f17eb63509da1e314891e95a4 (diff) |
Fix a bug that Magnification is not recorded correctly. Reort by Karel Horak.
git-svn-id: svn://tug.org/texlive/trunk@48195 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Build/source/texk/web2c/synctexdir/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/web2c/synctexdir/synctex.c | 12 |
2 files changed, 12 insertions, 6 deletions
diff --git a/Build/source/texk/web2c/synctexdir/ChangeLog b/Build/source/texk/web2c/synctexdir/ChangeLog index 223a1f9b4f9..d878f8925ed 100644 --- a/Build/source/texk/web2c/synctexdir/ChangeLog +++ b/Build/source/texk/web2c/synctexdir/ChangeLog @@ -1,3 +1,9 @@ +2018-07-15 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + + * synctex.c: Fix a bug that Magnification is not correctly + recorded. Report by Karel Horak: + https://tug.org/pipermail/tex-live/2018-July/042063.html + 2018-06-13 Karl Berry <karl@tug.org> * man1/synctex.1: man page list syntax. diff --git a/Build/source/texk/web2c/synctexdir/synctex.c b/Build/source/texk/web2c/synctexdir/synctex.c index 0c48281a823..52d0cad2365 100644 --- a/Build/source/texk/web2c/synctexdir/synctex.c +++ b/Build/source/texk/web2c/synctexdir/synctex.c @@ -1047,17 +1047,17 @@ void synctexsheet(integer mag) } return; } + if (SYNCTEX_GET_TOTAL_PAGES() == 0) { + /* Now it is time to properly set up the scale factor. */ + if (mag > 0) { + synctex_ctxt.magnification = mag; + } + } if (NULL != synctex_prepare_content()) { /* First possibility: the .synctex file is already open because SyncTeX was activated on the CLI * or it was activated with the \synctex macro and the first page is already shipped out. * Second possibility: tries to open the .synctex, useful if synchronization was enabled * from the source file and not from the CLI. */ - if (SYNCTEX_GET_TOTAL_PAGES() == 0) { - /* Now it is time to properly set up the scale factor. */ - if (mag > 0) { - synctex_ctxt.magnification = mag; - } - } synctex_record_sheet(SYNCTEX_GET_TOTAL_PAGES()+1); } # if SYNCTEX_DEBUG |