synctex_parser_readme.txt 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. This file is part of the SyncTeX package.
  2. Please refer to synctex_parser_readme.md
  3. The Synchronization TeXnology named SyncTeX is a new feature
  4. of recent TeX engines designed by Jerome Laurens.
  5. It allows to synchronize between input and output, which means to
  6. navigate from the source document to the typeset material and vice versa.
  7. More informations on http://itexmac2.sourceforge.net/SyncTeX.html
  8. This package is mainly for developers, it mainly contains the following files:
  9. synctex_parser_readme.txt
  10. synctex_parser_version.txt
  11. synctex_parser_utils.c
  12. synctex_parser_utils.h
  13. synctex_parser_local.h
  14. synctex_parser_private.h
  15. synctex_parser.h
  16. synctex_parser.c
  17. The file you are reading contains more informations about the SyncTeX parser history.
  18. In order to support SyncTeX in a viewer, it is sufficient to include
  19. in the source the files synctex_parser.h and synctex_parser.c.
  20. The synctex parser usage is described in synctex_parser.h header file.
  21. The other files are used by tex engines or by the synctex command line utility:
  22. ChangeLog
  23. README.txt
  24. am
  25. man1
  26. man5
  27. synctex-common.h
  28. synctex-convert.sh
  29. synctex-e-mem.ch0
  30. synctex-e-mem.ch1
  31. synctex-e-rec.ch0
  32. synctex-e-rec.ch1
  33. synctex-etex.h
  34. synctex-mem.ch0
  35. synctex-mem.ch1
  36. synctex-mem.ch2
  37. synctex-pdf-rec.ch2
  38. synctex-pdftex.h
  39. synctex-rec.ch0
  40. synctex-rec.ch1
  41. synctex-rec.ch2
  42. synctex-tex.h
  43. synctex-xe-mem.ch2
  44. synctex-xe-rec.ch2
  45. synctex-xe-rec.ch3
  46. synctex-xetex.h
  47. synctex.c
  48. synctex.defines
  49. synctex.h
  50. synctex_main.c
  51. tests
  52. Version:
  53. --------
  54. This is version 1, which refers to the synctex output file format.
  55. The files are identified by a build number.
  56. In order to help developers to automatically manage the version and build numbers
  57. and download the parser only when necessary, the synctex_parser.version
  58. is an ASCII text file just containing the current version and build numbers.
  59. History:
  60. --------
  61. 1.1: Thu Jul 17 09:28:13 UTC 2008
  62. - First official version available in TeXLive 2008 DVD.
  63. Unfortunately, the backwards synchronization is not working properly mainly for ConTeXt users, see below.
  64. 1.2: Tue Sep 2 10:28:32 UTC 2008
  65. - Correction for ConTeXt support in the edit query.
  66. The previous method was assuming that TeX boxes do not overlap,
  67. which is reasonable for LaTeX but not for ConTeXt.
  68. This assumption is no longer considered.
  69. 1.3: Fri Sep 5 09:39:57 UTC 2008
  70. - Local variable "read" renamed to "already_read" to avoid conflicts.
  71. - "inline" compiler directive renamed to "SYNCTEX_INLINE" for code support and maintenance
  72. - _synctex_error cannot be inlined due to variable arguments (thanks Christiaan Hofman)
  73. - Correction in the display query, extra boundary nodes are used for a more precise forwards synchronization
  74. 1.4: Fri Sep 12 08:12:34 UTC 2008
  75. - For an unknown reason, the previous version was not the real 1.3 (as used in iTeXMac2 build 747).
  76. As a consequence, a crash was observed.
  77. - Some typos are fixed.
  78. 1.6: Mon Nov 3 20:20:02 UTC 2008
  79. - The bug that prevented synchronization with compressed files on windows has been fixed.
  80. - New interface to allow system specific customization.
  81. - Note that some APIs have changed.
  82. 1.8: Mer 8 jul 2009 11:32:38 UTC
  83. Note that version 1.7 was delivered privately.
  84. - bug fix: synctex was causing a memory leak in pdftex and xetex, thus some processing speed degradation
  85. - bug fix: the synctex command line tool was broken when updating a .synctex file
  86. - enhancement: better accuracy of the synchronization process
  87. - enhancement: the pdf output file and the associated .synctex file no longer need to live in the same directory.
  88. The new -d option of the synctex command line tool manages this situation.
  89. This is handy when using something like tex -output-directory=DIR ...
  90. 1.9: Wed Nov 4 11:52:35 UTC 2009
  91. - Various typo fixed
  92. - OutputDebugString replaced by OutputDebugStringA to deliberately disable unicode preprocessing
  93. - New conditional created because OutputDebugStringA is only available since Windows 2K professional
  94. 1.10: Sun Jan 10 10:12:32 UTC 2010
  95. - Bug fix in synctex_parser.c to solve a synchronization problem with amsmath's gather environment.
  96. Concerns the synctex tool.
  97. 1.11: Sun Jan 17 09:12:31 UTC 2010
  98. - Bug fix in synctex_parser.c, function synctex_node_box_visible_v: 'x' replaced by 'y'.
  99. Only 3rd party tools are concerned.
  100. 1.12: Mon Jul 19 21:52:10 UTC 2010
  101. - Bug fix in synctex_parser.c, function __synctex_open: the io_mode was modified even in case of a non zero return,
  102. causing a void .synctex.gz file to be created even if it was not expected. Reported by Marek Kasik concerning a bug on evince.
  103. 1.13: Fri Mar 11 07:39:12 UTC 2011
  104. - Bug fix in synctex_parser.c, better synchronization as suggested by Jan Sundermeyer (near line 3388).
  105. - Stronger code design in synctex_parser_utils.c, function _synctex_get_name (really neutral behavior).
  106. Only 3rd party tools are concerned.
  107. 1.14: Fri Apr 15 19:10:57 UTC 2011
  108. - taking output_directory into account
  109. - Replaced FOPEN_WBIN_MODE by FOPEN_W_MODE when opening the text version of the .synctex file.
  110. - Merging with LuaTeX's version of synctex.c
  111. 1.15: Fri Jun 10 14:10:17 UTC 2011
  112. This concerns the synctex command line tool and 3rd party developers.
  113. TeX and friends are not concerned by these changes.
  114. - Bug fixed in _synctex_get_io_mode_name, sometimes the wrong mode was returned
  115. - Support for LuaTeX convention of './' file prefixing
  116. 1.16: Tue Jun 14 08:23:30 UTC 2011
  117. This concerns the synctex command line tool and 3rd party developers.
  118. TeX and friends are not concerned by these changes.
  119. - Better forward search (thanks Jose Alliste)
  120. - Support for LuaTeX convention of './' file prefixing now for everyone, not only for Windows
  121. 1.17: Fri Oct 14 08:15:16 UTC 2011
  122. This concerns the synctex command line tool and 3rd party developers.
  123. TeX and friends are not concerned by these changes.
  124. - synctex_parser.c: cosmetic changes to enhance code readability
  125. - Better forward synchronization.
  126. The problem occurs for example with LaTeX \item command.
  127. The fact is that this command creates nodes at parse time but these nodes are used only
  128. after the text material of the \item is displayed on the page. The consequence is that sometimes,
  129. forward synchronization spots an irrelevant point from the point of view of the editing process.
  130. This was due to some very basic filtering policy, where a somehow arbitrary choice was made when
  131. many different possibilities where offered for synchronisation.
  132. Now, forward synchronization prefers nodes inside an hbox with as many acceptable spots as possible.
  133. This is achieved with the notion of mean line and node weight.
  134. - Adding support for the new file naming convention with './'
  135. + function synctex_ignore_leading_dot_slash_in_path replaces synctex_ignore_leading_dot_slash
  136. + function _synctex_is_equivalent_file_name is more permissive
  137. Previously, the function synctex_scanner_get_tag would give an answer only when
  138. the given file name was EXACTLY one of the file names listed in the synctex file.
  139. The we added some changes accepting for example 'foo.tex' instead of './foo.tex'.
  140. Now we have an even looser policy for dealing with file names.
  141. If the given file name does not match exactly one the file names of the synctex file,
  142. then we try to match the base names. If there is only one match of the base names,
  143. then it is taken as a match for the whole names.
  144. The base name is defined as following:
  145. ./foo => foo
  146. /my///.////foo => foo
  147. /foo => /foo
  148. /my//.foo => /my//.foo
  149. 1.17: Tue Mar 13 10:10:03 UTC 2012
  150. - minor changes, no version changes
  151. - syntax man pages are fixed as suggested by M. Shimata
  152. see mail to tex-live@tug.org titled "syntax.5 has many warnings from groff" and "syntax.1 use invalid macro for mdoc"
  153. 1.17: Tue Jan 14 09:55:00 UTC 2014
  154. - fixed a segfault, from Sebastian Ramacher
  155. 1.17: Mon Aug 04
  156. - fixed a memory leak
  157. 1.18: Thu Jun 25 11:36:05 UTC 2015
  158. - nested sheets now fully supported (does it make sense in TeX)
  159. - cosmetic changes: uniform indentation
  160. - suppression of warnings, mainly long/int ones. In short, zlib likes ints when size_t likes longs.
  161. - CLI synctex tool can build out of TeXLive (modulo appropriate options passed to the compiler)
  162. 1.19: Thu Mar 9 21:26:27 UTC 2017
  163. - the nested sheets patch was not a good solution.
  164. It has been moved from the parser to the engine.
  165. See the synctex.c source file for detailed explanations.
  166. - there is a new synctex format specification.
  167. We can see that a .synctex file can contain many times
  168. the same vertical position because many objects belong
  169. to the same line. When the options read -synctex=±2 or more,
  170. a very basic compression algorithm is used:
  171. if synctex is about write the same number then it writes
  172. an = sign instead. This saves approximately 10% of the
  173. synctex output file, either compressed or not.
  174. The new synctex parser has been updated accordingly.
  175. Actual tex frontend won't see any difference with the
  176. TeX engines that include this new feature.
  177. Frontends with the new parser won't see any difference
  178. with the older TeX engines.
  179. Frontends with the new parser will only see a difference
  180. with new TeX engines if -synctex=±2 or more is used.
  181. Acknowledgments:
  182. ----------------
  183. The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
  184. and significant help from XeTeX developer Jonathan Kew
  185. Nota Bene:
  186. ----------
  187. If you include or use a significant part of the synctex package into a software,
  188. I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
  189. Copyright (c) 2008-2014 jerome DOT laurens AT u-bourgogne DOT fr