### Summary Support SyncTeX and discussion on whether that'd provide significant gains
### Details * SyncTeX is a program that allows to quickly jump from PDF to the (TeX) source. - [ref](https://wiki.contextgarden.net/SyncTeX) * If that's supported, then the TeX workflow in geany can be made somewhat more streamlined with some user's personal level tweaks to build task to open the pdf after the build is complete
### Environment * Geany: 1.38 "Sulamar" * OS: Windows 10
Build commands are editable by the user, see [the manual](https://www.geany.org/manual/current/index.html#build-menu)
Closed #3146.
* Thanks a lot for providing the link to manual, ... * ... but that (editing build commands) is only half part of the issue. * The other half is being able to support the SyncTeX ... * ... which requires some additional thing as well. * Although that (SyncTeX) might be more suited towards a separate plugin if possible. * I thought i will add some more info regarding that, but i cant manage to find that, so, just sharing the above stuff.
@elextr wrote:
Build commands are editable by the user, see the manual[image]
The other half is being able to support the SyncTeX which requires some additional thing as well. Although that (SyncTeX) might be more suited towards a separate plugin if possible.
You will probably need to explain what the "additional thing" is.
If that suggests it is to be a plugin you might want to suggest it on the Geany-plugins issues.
In a normal reverse
synchronization flow, the user asks the viewer to synchronize the text editor with a given location in a given page of an output file, the viewer asks the SyncTEX parser for the input file name and line number corresponding to the location; it then asks the text editor to display the named input file and highlight the numbered line.
For reverse synchronization, the user asks the
viewer to synchronize the text editor with a given location in a given page of an output file, the viewer forwards this information to the synctex tool together with some scripting command to activate the text editor, the synctex tool transparently asks the SyncTEX parser for the input file name and line number corresponding to the information it has received, then it asks the text editor to proceed according to the received scripting command
Ref: * https://tug.org/TUGboat/tb29-3/tb93laurens.pdf#page=5 * via https://tex.stackexchange.com/questions/118489/what-exactly-is-synctex
This is something that should definitely be implemented in a plugin, such language specific features should not be implemented in Geany core.
I was wondering that:
1. Aint the ability to goto a particular line already there? I think similar ability is also used in debugging the source of programming languages.
2. If yes, then can that ability be triggered via command line somehow?
3. If yes to 2, then the "SyncTex support" adding plugin should not be a complicated task it seems.
1. Yes 2. only when opening a file, to open at a position, but a plugin does not need to send commands since it can call the appropriate Geany positioning function. 3. I would have thought the complication is communication between the plugin and the viewer. Since the viewers seem to expect to execute commands to communicate with the editor there will probably need to be an executable that the viewer can execute with appropriate arguments, and which then communicates those arguments to the plugin which calls the Geany positioning function. "Interesting" problems include what communication method to use including its portability to Windows and Macos and making sure the plugin does not block Geany when waiting for a communication.
STOP PRESS:
Geany in single instance mode will behave the way you want, once one Geany is running further geany executions will open the files listed on the command line in the single instance with the specified :line:col: and if the file is already open will simply go to the line/col.
what does STOP PRESS mean? 🤔
(marking this comment as offtopic)
https://en.wikipedia.org/wiki/Stop_press "an idiomatic exclamation when significant information is discovered"
I wanted to, & i tried to figure it precisely, but it was quite complicated and beyond my understanding.
elextr wrote:
You will probably need to explain what the "additional thing" is.
okay, so, for sumatra pdf viewer, it's under the name of "Set inverse search command-line": Enter the command-line to invoke when you double-click on the PDF document * the default one specified is: `"C:\Program Files\Notepad++\notepad++.exe" -n%l "%f"`
So the Geany command is the same (except its the path to Geany of course) but use `-l` not `-n`
umh, `geany "%f":%l` or `geany -l%l "%f"` ??
I don't know if the first one will work right with the quotes not around the whole argument, thats why I suggested the second. See https://www.geany.org/manual/current/index.html#command-line-options
ahw, ohkay, super nice. i am using the first one - the full version mentioned in the original comment now, and that is working good too . but glad to know this other one and ofcourse about the corresponding documentation page too
github-comments@lists.geany.org