I am trying to create user-defined commands in TeXworks, but am having problems finding the syntax to reference the main .tex file. For instance, creating a .bat-file and then a new "typesetting tool" in TeXworks pointing to that .bat file works fine if the contents is the following line:
"mylatexfile.tex" then compiles without problems, and the first line of the compiler output is
The following, however, doesn't work:
The compiler then starts with the line
and ends with "...File ignored)...". Am I wrong to assume that "%1" references the main latex file? (That's what I understood from http://code.google.com/p/texworks/wiki/AdvancedTypesettingTools#tex_-%3E_dvips_-%3E_ps2pdf.)
In the latex editor LEd, I've successfully created user-defined commands using .bat files. There, however "%2" is supposed to reference the main latex file. I've tried that in TeXworks but to no avail. I get the same result as using "%1".
I'm using MiKTeX 2.9 and Windows 7.