ext/synctex/synctex_parser_readme.md
This file is part of the SyncTeX package.
Changes in version 1.22
static keyword added)va_end)Changes in version 1.21
\ character from the name ot 2 test files.class to class_ because the former is a reserved keyword in C++.void in forward function declaration.Changes in version 1.20
One bug fixed in some initialization and different syntax to make some compilers happy.
Changes in version 1.19
A long standing bug affecting only pdftex has been fixed by adding support to pdf forms. As a side effect, the synchronization algorithm gains in accuracy for all the engines, especially from pdf to source. Of course, there is a small cost in both memory footprint and computational time, but none is noticeable.
Some technical changes in the API.
more consistent type naming convention
_s suffix for struct's_p suffix for pointers_t suffix for standard types_f suffix for functions...thus synctex_node_t has become synctex_node_p.
supplemental argument in synctex_display_query. Set page_hint to the currently displayed pdf page number (0 based). If this info is not available, set page_hint to 0, it corresponds to the old behaviour.
rename synctex_next_result to synctex_scanner_next_result
additional synctex_parser_private.h header where
more API are exposed. For an advanced usage only (eg parallel synchronizations).
SYNCTEX_NO_UPDATER preprocessor macro to deactivate some code useless to frontends.
The Synchronization TeXnology named SyncTeX is a new feature of recent TeX engines designed by Jérôme Laurens. It allows to synchronize between input and output, which means to navigate from the source document to the typeset material and vice versa. Browse the source code for more information.
This package is mainly for developers, it contains the following files:
synctex_parser_readme.md (this file)synctex_parser_version.txtsynctex_parser_utils.csynctex_parser_utils.hsynctex_parser_local.hsynctex_parser.hsynctex_parser_advanced.hsynctex_parser.cThe file you are reading contains more informations about the SyncTeX parser history.
All stable sources are available from TeXLive repository.
Latest development sources are available from GitHub.
Please notice that due to the complexity of the TeXLive TeX distribution, there might be some delay before synchronization occurs between various repositories.
In order to support SyncTeX in a viewer, it is sufficient to include
in the source the files synctex_parser.c and synctex_parser_utils.c.
The synctex parser usage is described in synctex_parser.h header file.
More advanced usage is found in synctex_parser_advanced.h
The other files are used by tex engines or by the synctex command line utility:
ChangeLog
README.txt
am
man1
man5
synctex-common.h
synctex-convert.sh
synctex-e-mem.ch0
synctex-e-mem.ch1
synctex-e-rec.ch0
synctex-e-rec.ch1
synctex-etex.h
synctex-mem.ch0
synctex-mem.ch1
synctex-mem.ch2
synctex-pdf-rec.ch2
synctex-pdftex.h
synctex-rec.ch0
synctex-rec.ch1
synctex-rec.ch2
synctex-tex.h
synctex-xe-mem.ch2
synctex-xe-rec.ch2
synctex-xe-rec.ch3
synctex-xetex.h
synctex.c
synctex.defines
synctex.h
synctex_main.c
tests
...
This is version 1, which refers to the synctex output file format.
The files are identified by a build number.
In order to help developers to automatically manage the version and build numbers
and download the parser only when necessary, the synctex_parser_version.txt
is an ASCII text file just containing the current version and build numbers eg 1.19.
1.1: Thu Jul 17 09:28:13 UTC 2008
1.2: Tue Sep 2 10:28:32 UTC 2008
1.3: Fri Sep 5 09:39:57 UTC 2008
1.4: Fri Sep 12 08:12:34 UTC 2008
1.6: Mon Nov 3 20:20:02 UTC 2008
1.8: Mer 8 jul 2009 11:32:38 UTC Note that version 1.7 was delivered privately.
1.9: Wed Nov 4 11:52:35 UTC 2009
1.10: Sun Jan 10 10:12:32 UTC 2010
1.11: Sun Jan 17 09:12:31 UTC 2010
1.12: Mon Jul 19 21:52:10 UTC 2010
1.13: Fri Mar 11 07:39:12 UTC 2011
1.14: Fri Apr 15 19:10:57 UTC 2011
1.15: Fri Jun 10 14:10:17 UTC 2011 This concerns the synctex command line tool and 3rd party developers. TeX and friends are not concerned by these changes.
1.16: Tue Jun 14 08:23:30 UTC 2011 This concerns the synctex command line tool and 3rd party developers. TeX and friends are not concerned by these changes.
1.17: Fri Oct 14 08:15:16 UTC 2011 This concerns the synctex command line tool and 3rd party developers. TeX and friends are not concerned by these changes.
synctex_parser.c: cosmetic changes to enhance code readability
Better forward synchronization. The problem occurs for example with LaTeX \item command. The fact is that this command creates nodes at parse time but these nodes are used only after the text material of the \item is displayed on the page. The consequence is that sometimes, forward synchronization spots an irrelevant point from the point of view of the editing process. This was due to some very basic filtering policy, where a somehow arbitrary choice was made when many different possibilities where offered for synchronisation. Now, forward synchronization prefers nodes inside an hbox with as many acceptable spots as possible. This is achieved with the notion of mean line and node weight.
Adding support for the new file naming convention with './'
synctex_ignore_leading_dot_slash_in_path replaces synctex_ignore_leading_dot_slash_synctex_is_equivalent_file_name is more permissive
Previously, the function synctex_scanner_get_tag would give an answer only when
the given file name was EXACTLY one of the file names listed in the synctex file.
The we added some changes accepting for example 'foo.tex' instead of './foo.tex'.
Now we have an even looser policy for dealing with file names.
If the given file name does not match exactly one the file names of the synctex file,
then we try to match the base names. If there is only one match of the base names,
then it is taken as a match for the whole names.
The base name is defined as following:./foo => foo /my///.////foo => foo /foo => /foo /my//.foo => /my//.foo
1.17: Tue Mar 13 10:10:03 UTC 2012
1.18: Thu Jun 25 11:36:05 UTC 2015
1.19: Mon Jul 3 20:03:56 UTC 2017
synctex.c source file for detailed explanations..synctex file can contain many times
the same vertical position because many objects belong
to the same line. When the options read -synctex=±2 or more,
a very basic compression algorithm is used:
if synctex is about to write the same number then it writes
an = sign instead. This saves approximately 10% of the
synctex output file, either compressed or not.
The new synctex parser has been updated accordingly.
Actual tex frontend won't see any difference with the
TeX engines that include this new feature.
Frontends with the new parser won't see any difference
with the older TeX engines.
Frontends with the new parser will only see a difference
with new TeX engines if -synctex=±2 or more is used.The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh, and significant help from XeTeX developer Jonathan Kew.
If you include or use a significant part of the SyncTeX package into a software, I would appreciate to be listed as contributor and see SyncTeX" highlighted.
Copyright (c) 2008-2017 jerome DOT laurens AT u-bourgogne DOT fr