diff --git a/manual/luatex-tex.tex b/manual/luatex-tex.tex index 30a1ef7cf6e753ec8da33c0b4fd3f8c1fcf0600a..fa4688ae5ffbd4760dabb41666f7da22e06cc163 100644 --- a/manual/luatex-tex.tex +++ b/manual/luatex-tex.tex @@ -1402,8 +1402,9 @@ plain and \LATEX, so after a decade users expect a certain behaviour. \starttabulate[|l|p|] \NC set_synctex_mode \NC \type {0} is the default and used normal synctex logic, -a value of \type {1} uses the values set by the next helpers while \type {2} -also sets these for glyph nodes \NC \NR +\type {1} uses the values set by the next helpers while \type {2} +also sets these for glyph nodes; \type{3} sets glyphs and glue and \type {4} sets only +glyphs \NC \NR \NC set_synctex_tag \NC set the current tag (file) value (obeys save stack) \NC \NR \NC set_synctex_line \NC set the current line value (obeys save stack) \NC \NR \NC force_synctex_tag \NC overload the tag (file) value (\type {0} resets) \NC \NR diff --git a/manual/luatex.pdf b/manual/luatex.pdf index ac284de62f0ec8b1fe35a5f2fa561e4a6a751657..564c24d1fae3f5245f22330a3ee4a7e8b5bb72f1 100644 Binary files a/manual/luatex.pdf and b/manual/luatex.pdf differ diff --git a/source/texk/web2c/luatexdir/luatex_svnversion.h b/source/texk/web2c/luatexdir/luatex_svnversion.h index b9dba231b1c022321b7537ffd1995656d2a17fb4..2578e5582b2088c6cfdb9188f2e29f8909d00290 100644 --- a/source/texk/web2c/luatexdir/luatex_svnversion.h +++ b/source/texk/web2c/luatexdir/luatex_svnversion.h @@ -1 +1 @@ -#define luatex_svn_revision 6379 +#define luatex_svn_revision 6380 diff --git a/source/texk/web2c/luatexdir/tex/texnodes.w b/source/texk/web2c/luatexdir/tex/texnodes.w index 36b0110b194c7297f15f0fb8a4cec351ba29becf..75a8c765612e1255711fcb2e3b98aa5f3f444c60 100644 --- a/source/texk/web2c/luatexdir/tex/texnodes.w +++ b/source/texk/web2c/luatexdir/tex/texnodes.w @@ -943,33 +943,47 @@ halfword new_node(int i, int j) } if (synctex_anyway_mode) { switch (i) { - case glyph_node: /* new, experiment */ + /* 1 = all but glyphs */ + /* 2 = also glyphs */ + /* 3 = glyphs and glue */ + /* 4 = only glyphs */ + case glyph_node: if (synctex_anyway_mode > 1) { synctex_tag_glyph(n) = forced_tag ? forced_tag : cur_input.synctex_tag_field; synctex_line_glyph(n) = forced_line ? forced_line : synctex_line_field ? synctex_line_field : line; } break; case glue_node: - synctex_tag_glue(n) = forced_tag ? forced_tag : cur_input.synctex_tag_field; - synctex_line_glue(n) = forced_line ? forced_line : synctex_line_field ? synctex_line_field : line; + if (synctex_anyway_mode < 4) { + synctex_tag_glue(n) = forced_tag ? forced_tag : cur_input.synctex_tag_field; + synctex_line_glue(n) = forced_line ? forced_line : synctex_line_field ? synctex_line_field : line; + } break; case kern_node: - synctex_tag_kern(n) = forced_tag ? forced_tag : cur_input.synctex_tag_field; - synctex_line_kern(n) = forced_line ? forced_line : synctex_line_field ? synctex_line_field : line; + if (synctex_anyway_mode < 3) { + synctex_tag_kern(n) = forced_tag ? forced_tag : cur_input.synctex_tag_field; + synctex_line_kern(n) = forced_line ? forced_line : synctex_line_field ? synctex_line_field : line; + } break; case hlist_node: case vlist_node: case unset_node: /* useless */ - synctex_tag_box(n) = forced_tag ? forced_tag : cur_input.synctex_tag_field; - synctex_line_box(n) = forced_line ? forced_line : synctex_line_field ? synctex_line_field : line; + if (synctex_anyway_mode < 3) { + synctex_tag_box(n) = forced_tag ? forced_tag : cur_input.synctex_tag_field; + synctex_line_box(n) = forced_line ? forced_line : synctex_line_field ? synctex_line_field : line; + } break; case rule_node: - synctex_tag_rule(n) = forced_tag ? forced_tag : cur_input.synctex_tag_field; - synctex_line_rule(n) = forced_line ? forced_line : synctex_line_field ? synctex_line_field : line; + if (synctex_anyway_mode < 3) { + synctex_tag_rule(n) = forced_tag ? forced_tag : cur_input.synctex_tag_field; + synctex_line_rule(n) = forced_line ? forced_line : synctex_line_field ? synctex_line_field : line; + } break; case math_node: /* noads probably make more sense */ - synctex_tag_math(n) = forced_tag ? forced_tag : cur_input.synctex_tag_field; - synctex_line_math(n) = forced_line ? forced_line : synctex_line_field ? synctex_line_field : line; + if (synctex_anyway_mode < 3) { + synctex_tag_math(n) = forced_tag ? forced_tag : cur_input.synctex_tag_field; + synctex_line_math(n) = forced_line ? forced_line : synctex_line_field ? synctex_line_field : line; + } break; } } else if (synctex_par) { @@ -1191,12 +1205,14 @@ halfword copy_node(const halfword p) */ if (synctex_anyway_mode) { + /* if (t == glyph_node) { if (synctex_anyway_mode > 1) { synctex_tag_glyph(r) = forced_tag ? forced_tag : cur_input.synctex_tag_field; synctex_line_glyph(r) = forced_line ? forced_line : synctex_line_field ? synctex_line_field : line; } } + */ } else if (synctex_par) { /* handle synctex extension */ switch (t) {