1SYNCTEX(5)                  BSD File Formats Manual                 SYNCTEX(5)
2

NAME

4     synctex — Synchronize TeXnology help file
5

DESCRIPTION

7     Synchronize TeXnology help file (synctexs) are text files that help
8     input/output synchronization during document preparation with the TeX
9     typesetting system.
10

BASICS

12     The structure of this file should not be considered public, in the sense
13     that no one should need to parse its contents, except the synctex command
14     line utility, and the synctex_parser library which are both publicly
15     available. Unless it is absolutely not avoidable, access to the contents
16     of the synctex file should only be made through requests made to the
17     synctex command line utility.
18

STRUCTURE

20     The element structure of a synctex file is a list of text line records as
21     follows.  ‘*’, ‘+’, and ‘?’ have their usual EBNF meanings: ‘*’ means
22     zero or more, ‘+’ means one or more, and ‘?’ means zero or one (i.e.,
23     optional).
24
25           <SyncTeX> ::= (The whole contents in 4 sections)
26
27                 <Preamble>
28
29                 <Content>
30
31                 <Postamble>
32
33                 <Post Scriptum>
34
35     Each section starts with the first occurrence of a sectioning line, and
36     ends with the next section, if any.  In the following definitions, we do
37     not mention the section ending condition.
38

The preamble

40           <Preamble> ::=
41
42                 "SyncTeX Version:" <Version Number> <EOL>
43
44                 <Input Line>*
45
46                 "Magnification:" <TeX magnification> <EOL>
47
48                 "Unit:" <unit in scaled point> <EOL>
49
50                 "X Offset:" <horizontal offset in scaled point> <EOL>
51
52                 "Y Offset:" <vertical offset in scaled point> <EOL>
53
54           <Input Line> ::= "Input:" <tag> ":" <File Name> <EOL>
55

The content

57           <Content> ::=
58
59                 <byte offset record>
60
61                 "Content:" <EOL>
62
63                 (<Form(k)>|<Input Line>)*
64
65                 <sheet(1)>
66
67                 (<Form(k)>|<Input Line>)*
68
69                 <sheet(2)>
70
71                 (<Form(k)>|<Input Line>)*
72
73                 ...
74
75                 <sheet(N)>
76
77                 (<Form(k)>|<Input Line>)*
78
79           <byte offset record> ::= "!" <byte offset> <end of record>
80
81           <sheet(n)> ::=
82
83                 <byte offset record>
84
85                 "{" <the integer n> <end of record>
86
87                 <vbox section>|<hbox section>
88
89                 <byte offset record>
90
91                 "}" <the integer n> <end of record>
92
93           <Form> ::=
94
95                 <byte offset record>
96
97                 "<" <form tag> <end of record>
98
99                 <vbox section>|<hbox section>
100
101                 <byte offset record>
102
103                 ">" <end of record>
104
105           <form tag> ::= <integer>
106
107     Forms are available with pdfTeX.  All the numbers are integers encoded
108     using the decimal representation with "C" locale.  The <box content>
109     describes what is inside a box.  It is either a vertical or horizontal
110     box, with some records related to glue, kern or math nodes.
111
112           <box content> ::=
113
114                 <vbox section>|<hbox section>
115
116                 |<void vbox record>|<void hbox record>
117
118                 |<current record>|<glue record>|<kern record>
119
120                 |<math record>|<form ref record>|<Form>
121
122           <vbox section> ::=
123
124                 "[" <link> ":" <point> ":" <size> <end of record>
125
126                 <box content>*
127
128                 "]" <end of record>
129
130           <hbox section> ::=
131
132                 ( <link> ":" <point> ":" <size> <end of record>
133
134                 <box content>*
135
136                 ")" <end of record>
137
138     Void boxes:
139
140           <void vbox record> ::= "v" <link> ":" <point> ":" <size> <end of
141           record>
142
143           <void hbox record> ::= "h" <link> ":" <point> ":" <size> <end of
144           record>
145
146           <link> ::= <tag> "," <line>( "," <column>)?
147
148           <point> ::= <full point>|<compressed point>
149
150           <full point> ::= <integer> "," <integer>
151
152           <compressed point> ::= <integer> ",="
153
154           <line> ::= <integer>
155
156           <column> ::= <integer>
157
158           <size> ::= <Width> "," <Height> "," <Depth>
159
160           <Width> ::= <integer>
161
162           <Height> ::= <integer>
163
164           <Depth> ::= <integer>
165
166     The forthcoming records are basic one liners.
167
168           <current record> ::= "x" <link> ":" <point> <end of record>
169
170           <kern record> ::= "k" <link> ":" <point> ":" <Width> <end of
171           record>
172
173           <glue record> ::= "g" <link> ":" <point> <end of record>
174
175           <math record> ::= "$" <link> ":" <point> <end of record>
176
177           <form ref record> ::= "f" <form tag> ":" <point> <end of record>
178

The postamble

180     The postamble closes the file If there is no postamble, it means that the
181     typesetting process did not end correctly.
182
183           <Postamble>::=
184
185                 <byte offset record>
186
187                 "Count:" <Number of records> <EOL>
188

The post scriptum

190     The post scriptum contains material possibly added by 3rd parties.  It
191     allows to append some transformation (shift and magnify).  Typically, one
192     applies a dvi to pdf filter with offset options and magnification, then
193     he appends the same options to the synctex file, for example
194
195           synctex update -o foo.pdf -m 0.486 -x 9472573sp -y 13.3dd source.dvi
196
197           <Post Scriptum>::=
198
199                 <byte offset record>
200
201                 "Post Scriptum:" <EOL>
202
203                 "Magnification:" <number> <EOL> (Set additional
204                 magnification)
205
206                 "X Offset:" <dimension> <EOL> (Set horizontal offset)
207
208                 "Y Offset:" <dimension> <EOL> (Set vertical offset)
209     This second information will override the offset and magnification previ‐
210     ously available in the preamble section.  All the numbers are encoded
211     using the decimal representation with "C" locale.
212

USAGE

214     The <current record> is used to compute the visible size of hbox's.  The
215     byte offset is an implicit anchor to navigate the synctex file from sheet
216     to sheet. The second coordinate of a compressed point has been replaced
217     by a "=" character which means that it is the second coordinate of the
218     last full point available above.
219

SEE ALSO

221     synctex(1) tex(1)
222

AUTHOR

224     The Synchronize TeXnology is essentially due to Jerome Laurens, with use‐
225     ful suggestions by some well known actors of the TeX world.
226

HISTORY

228     This document has been updated on Sat Apr 22 09:57:20 UTC 2017 to include
229     \pdfxform support.
230
231Independent                      Jan 17, 2018                      Independent
Impressum