Today I want to draw several 3D schematic diagrams that could be inserted in my LaTeX files. And I chose asymptote because of its widely known 3D rendering advantage over other tools.
I configured "asy-mode" in my favorable Emacs to code my first script. However, when I press C-c C-c to compile, the compilation process will open the output file(.eps or .pdf) and will half untile I close that file.
That is really a trouble to close preview every time. When I compile tex files, the compiler only parses and processes and won't open the .dvi file and wait for me to preview. Instead, after the compilation, yap can detect the change and automatically reload it. Many pdf viewers also have auto reload feature. That's particularly convenient when I'm using a computer with two screens.
But now every time "asy" will open the preview file and I have to close it to proceed. I notice the command for the compilation is
asy -V -wait file.asy
I tried many ways, but nothing prevents "asy" from opening the output files. I edited asy-mode.el to delete the -wait parameters; I compile it manually outside Emacs trying all possible parameters, like
asy -silent file.asy
the window keeps jumping out after successful execution of the command.
That's really frustrated. Do you guys have any solutions or work around? I'm using Emacs 23.4 on Windows 7 and the asymptote version is 2.24.
Thanks in advance.
-V
option is precisely the one that asks the OS to view the file.asy -noV file.asy
? Another possibility is to end your file with the lineshipout(view=false);
the latter should (I think) suppress the output even when you compile in Emacs with C-c C-c.negate by replacing - with -no
. In general, I recommend looking at the Asymptote manual, which you can probably see by typingtexdoc asymptote
at the command line.asy
with-V
, no preview is attempted.