EnableTeXEnhancements reset itself
I tried to disable double-click to open my Latex file, so I set
EnableTeXEnhancements = false
But it resets to true every time I close and reopen the program.
version: v3.1.2 64-bit
OS: Windows 10
@StevenLi-DS
[EDIT] see later post where I confirm I was wrong here
That is most unusual. Having tested LaTeX in dozens of editors, I can't remember the false not disabling even if the default command of InverseSearchCmdLine = notepad %fis left in place.
What WILL retrigger the setting to true is if the Editor during compilation calls SumatraPDF with the -inverse-search command, which is why in ALL editor configurations I advise against its use. (manually set it true ONCE only)
I just tried to set it back to notepad %f, and retried. It still happened.
I just wanna disable double-clicking to show source LaTeX. Is there a way to do so? I can leave InverseSearchCmdLine blink but it will show a message whenever I double-click.
I tried:
C:\Program Files\SumatraPDF\SumatraPDF.exe -reuse-instance
it seems a workaround for me but I don't know if this will just refresh the program or something.
SumatraPDF looks at the filename PDF file folder location IF there is a similar filename.synctex or filename.synctex.gz alongside it will attempt on double click to run the synctex source.tex name with the stored command I just tested with 3.1.2 (without any LaTeX editor) and it DOES reset itself to true when the file is present thus a "feature" (so a bug for some) that I had forgotten You can remove the command in the "options dialog" (keep a copy in-case you want it back later) but that will give an error message that it cannot start inverse command ! The alternative is to delete the unwanted synctex file, some editors have clean-up options to remove auxillary files
@kjk [EDIT] I previously said "for legacy reasons it is perhaps best to NOT change this behaviour"
however the more I think about it I see no reason for a double click to change the setting from false to true. It should be sticky as the user sets it, The situation where an editor uses -inverse-search to set the editor command IS the only reason to over-ride the user setting.
The prime reason for the setting is to expose the command entry box, however I am suggesting it bu used to signal/perform a secondary funtion
[Feature Request]
Is to add yet another over-ride control (debug menu ?) to disregard synctex[.gz] files on demand ?
[Feature request / BugFix]
The EnableTeXEnhancements = false should STAY false UNLESS a specific command line -inverse-search call requests a CHANGE of InverseSearchCmdLine
The slight delay while the new -inverse-search commandline is checked against current setting should only happen once SINCE I have always advocated that it should never have been a permanent setting in the editor. Those that follow poor legacy advice will soon see that folly.
The secondary natural use of setting Tex Enhancements to false should be to disable the double click synctex call
Maybe add a command like “ignore” or “doing nothing”?
I just realize this issue is more general. I changed the background in the setting file to be dark but sometimes I do need it to be white, so I comment out my setting:
FixedPageUI [
TextColor = #f5f5f5
BackgroundColor = #FFFFFF
# BackgroundColor = #1a1a1a
SelectionColor = #0080ff
WindowMargin = 1 1 1 1
PageSpacing = 2 2
]
But it will restore itself after I restart the program.
@StevenLi-DS: So any change you make to SumatraPDF-settings.txt is getting reverted? Are you sure you have the necessary permissions to edit that file?
@SumatraPeter these two issues are seperate however in both cases SumatraPDF will "correct" the settings.txt in opposition to user preference
Both "corrections" are understandable but user preference in each case should be allowable.
@SumatraPeter If I have comments then it will be reset to the default.
@SumatraPeter that's expected behavior.
The way saving preferences works is: we serialize current state of the program and write it out to settings file (if changed from the time we've read it).
If you make changes outside of sumatra, we'll over-write them.
@SumatraPeter https://github.com/sumatrapdfreader/sumatrapdf/issues/1327
I've moved my commented settings related discussion to #1327 since it fits better there.
This issue is still occurring. It would be nice to disable the synctex and make it stick. A workaround I found is to set the inverse search command to rundll32.exe, which is a program that does nothing from no arguments (https://superuser.com/questions/381103/is-there-a-windows-exe-that-does-nothing) and doesn't cause an error message to pop up.