beta-0.89.2
[luatex.git] / source / texk / web2c / synctexdir / synctex-luatex.h
blobf9146581ff49817b12153810d827c41b0cea63f4
1 /* synctex-luatex.h
3 Copyright (c) 2010, 2011 Taco Hoekwater <taco@luatex.org>
5 This file is part of LuaTeX.
7 License:
8 --------
9 Permission is hereby granted, free of charge, to any person
10 obtaining a copy of this software and associated documentation
11 files (the "Software"), to deal in the Software without
12 restriction, including without limitation the rights to use,
13 copy, modify, merge, publish, distribute, sublicense, and/or sell
14 copies of the Software, and to permit persons to whom the
15 Software is furnished to do so, subject to the following
16 conditions:
18 The above copyright notice and this permission notice shall be
19 included in all copies or substantial portions of the Software.
21 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
23 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
25 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
26 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
28 OTHER DEALINGS IN THE SOFTWARE
30 Except as contained in this notice, the name of the copyright holder
31 shall not be used in advertising or otherwise to promote the sale,
32 use or other dealings in this Software without prior written
33 authorization from the copyright holder.
37 /* $Id: synctex-luatex.h 4064 2011-01-12 22:12:22Z hhenkel $ */
39 # define synchronization_field_size 1
41 #define SYNCTEX_TAG_MODEL(NODE,TYPE)\
42 vinfo(NODE+TYPE##_node_size-synchronization_field_size)
43 #define SYNCTEX_LINE_MODEL(NODE,TYPE)\
44 vlink(NODE+TYPE##_node_size-synchronization_field_size)
46 #define SYNCTEX_TYPE(NODE) type(NODE)
47 #define SYNCTEX_SUBTYPE(NODE) subtype(NODE)
48 #define SYNCTEX_WIDTH(NODE) width(NODE)
49 #define SYNCTEX_DEPTH(NODE) depth(NODE)
50 #define SYNCTEX_HEIGHT(NODE) height(NODE)
51 #define SYNCTEX_VALUE int_par(synctex_code)
53 #define SYNCTEX_CURVV (dimen_par(page_height_code)-static_pdf->posstruct->pos.v)
54 #define SYNCTEX_CURHH static_pdf->posstruct->pos.h
56 #define SYNCTEX_CURV (static_pdf->o_mode==OMODE_PDF?SYNCTEX_CURVV:SYNCTEX_CURVV-4736287)
57 #define SYNCTEX_CURH (static_pdf->o_mode==OMODE_PDF?SYNCTEX_CURHH:SYNCTEX_CURHH-4736287)
59 #define SYNCTEX_GET_JOB_NAME() makecstring(job_name)
60 #define SYNCTEX_GET_LOG_NAME() get_full_log_name()
62 #define SYNCTEX_RULE_WD width(p)
63 #define SYNCTEX_RULE_HT height(p)
64 #define SYNCTEX_RULE_DP depth(p)
66 #define SYNCTEX_CURRENT_TAG (cur_input.synctex_tag_field)
67 #define SYNCTEX_GET_CURRENT_NAME() luatex_synctex_get_current_name()
68 #define SYNCTEX_GET_TOTAL_PAGES() (total_pages)
70 #include "ptexlib.h"
72 /* We observe static_pdf->o_mode in order to determine whether output mode is
73 * pdf or dvi.
74 * We will assume that pdf->o_mode is set before entering
75 * the synctex_sheet function below. */
76 #define SYNCTEX_OFFSET_IS_PDF (static_pdf->o_mode==OMODE_PDF)
77 #define SYNCTEX_OUTPUT ((static_pdf->o_mode==OMODE_PDF)?"pdf":"dvi")
79 #define __SyncTeX__ 1
80 #define SYNCTEX_DO_NOT_LOG_OUTPUT_DIRECTORY 1
82 /* New LuaTeX (0.87.0) or later */
83 #define glue_node 12
84 #define kern_node 13