[RFC][PATCH] Improved synctex support

Stephan Witt st.witt at gmx.net
Mon Aug 8 14:46:54 UTC 2022


Hi all,

I recently had a discussion on lyx-users regarding synctex (Subject: Syncing skim with LyX) which lead me to the attached patch to improve the usability of the document setting in GuiDocument::outputModule.

I want to be sure the patch is an improvement. Therefor I ask you for comments.

1)
AFAICS the synctex activation is possible for more than pfdlatex output only. I’ve tried dvi, luatex and xetex and all of them work for me. So I’ve changed the check in BufferParams::writeLaTeX to use OutputParams::isLaTeX. Is someone to tell if this change is the right one? Perhaps it’s superfluous in BufferParams::writeLaTeX at all and one can output it w/o the check for the flavor here?

2)
The LFUN_FORWARD_SEARCH implementation relies on the correct check in getStatus. The patch adds the explicit check for presence of current buffer and active output_sync state. Regarding the latter I’m not sure if someone is unhappy with it. In case of preamble code to activate synctex the LFUN_FORWARD_SEARCH would work but LyX doesn’t know that and it’s disabled. What is your opinion here?

BR, Stephan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: synctex-1.patch
Type: application/octet-stream
Size: 1816 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20220808/4c70c377/attachment-0001.obj>


More information about the lyx-devel mailing list