[texworks] Passing $synctexoption to Windows batch script?

Kyle Woodward kyle.woodward at gmail.com
Wed Feb 19 18:54:03 CET 2020


Hi,

I am having trouble with a custom typesetting script (Windows batch). I
would like to pass $synctexoption to the script (in my case, `-synctex=1`).

When I read command-line arguments, batch reads = as a delimiter. I wind up
with (e.g.) %1 being `-synctex` and %2 being `1`. If I try to enclose
$synctexoption in quotes, "$synctexoption", TeXworks escapes the quotation
marks, giving %1 as `\"-synctex=1\"`, and thus %~1 is also
`\"-synctex=1\"`. That is, batch cannot natively remove the quotation marks.

There are many feasible workarounds within the batch script, but the most
straightforward would be for TeXworks to not escape the quotation marks. Is
there an option somewhere to disable this escaping? (I have disabled
in-editor quotation mark escaping, but this is a separate thing)

[sorry for mixing backticks and quotes; I hope the problem is clear]

Thanks,
Kyle
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texworks/attachments/20200219/25c5556b/attachment.html>


More information about the texworks mailing list.