Changes

Jump to navigation Jump to search
1,238 bytes added ,  01:26, 17 November 2023
You may need to modify the command for executing ConTeXt first (you need to add <code>--synctex</code> switch in preferences).
 
=== Emacs + auctex ===
 
To implement forward search with auctex (i.e., open the viewer at the right page from emacs)
creating a shell script called '''synctex''' in some directory which precedes one containing
the "usual" synctex (if any) in your $PATH with the following contents has been demonstrated
to work on at least Slackware64 15.0:
 
#! /bin/zsh
# synctex replacement to allow forward search from emacs+auctex to (at least) evince
# Emacs + auctex calls synctex up to three times.
# For example, attempting to view the PDF of <FILE>.tex would cause
# emacs to run the following commands ($PWD is the path to the
# current directory):
# synctex view -i <LINE>:<COL>:$PWD/./<FILE>.tex -o <FILE>.pdf
# synctex view -i <LINE>:<COL>:<FILE>.tex -o <FILE>.pdf
# synctex view -i <LINE>:<COL>:$PWD/<FILE>.tex -o <FILE>.pdf
line_number=${3%%:*}
tex_file=${3##*:}
synctex_file=${tex_file%.tex}.synctex
# Transmogrify the output format of mtxrun into something that emacs+auctex
# (and maybe other editors?) recognizes:
mtxrun --script synctex --find \
--file=$tex_file --line=$line_number $synctex_file \
| sed 's/.*page=/Page:/'
 
(Note: this has only been tested with simple document structures.)
=== Evince, Okular & Kile ===
37

edits

Navigation menu