<div dir="ltr"><div>Yes, this is a reasonable workaround. However, since TeXworks provides a $synctexoption variable, wouldn't it be nice to use it?</div><div><br></div><div>The error is not in TeXworks itself, but in the Qt library. See lines 400-401:</div><div><a href="https://code.woboq.org/qt5/qtbase/src/corelib/io/qprocess_win.cpp.html">https://code.woboq.org/qt5/qtbase/src/corelib/io/qprocess_win.cpp.html</a></div><div><br></div><div>Thanks for all the help,</div><div>Kyle<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 19, 2020 at 3:09 PM Duncan Murdoch <<a href="mailto:murdoch.duncan@gmail.com">murdoch.duncan@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 19/02/2020 12:54 p.m., Kyle Woodward wrote:<br>
> Hi,<br>
> <br>
> I am having trouble with a custom typesetting script (Windows batch). I <br>
> would like to pass $synctexoption to the script (in my case, `-synctex=1`).<br>
<br>
If you are always using -synctex=1, why not hard code that in your <br>
script, instead of trying to pass it as a command line argument?<br>
> <br>
> When I read command-line arguments, batch reads = as a delimiter. I wind <br>
> up with (e.g.) %1 being `-synctex` and %2 being `1`. If I try to enclose <br>
> $synctexoption in quotes, "$synctexoption", TeXworks escapes the <br>
> quotation marks, giving %1 as `\"-synctex=1\"`, and thus %~1 is also <br>
> `\"-synctex=1\"`. That is, batch cannot natively remove the quotation marks.<br>
<br>
If you sometimes have other synctex options, why not code your batch <br>
file to ignore %1 and put "-synctex=%2" in the right place within it?<br>
<br>
Duncan Murdoch<br>
<br>
<br>
> There are many feasible workarounds within the batch script, but the <br>
> most straightforward would be for TeXworks to not escape the quotation <br>
> marks. Is there an option somewhere to disable this escaping? (I have <br>
> disabled in-editor quotation mark escaping, but this is a separate thing)<br>
> <br>
> [sorry for mixing backticks and quotes; I hope the problem is clear]<br>
> <br>
> Thanks,<br>
> Kyle<br>
<br>
</blockquote></div>