# How do I define custom shortcuts in WinEdt 7?

I decided that it makes more sense to post the LaTeX related stuff (and since I use WinEdt for LaTeX editing, WinEdt counts as LaTeX related) on tex.stackexchange.com rather than here. So if you’re wondering about the answer to the above question, have a look at this post. — But do feel free to leave a comment here anyway…

# Problems with Winedt 7 and Adobe Acrobat?

I just spent a while trying to solve this problem: the latest version of WinEdt (v7) seems to be unable to close the pdf document that it is working on and therefore can’t compile a new version of it (because Adobe Acrobat is blocking access to the file). I keep getting an error message saying “Cannot Open DDE Link to: “C:\Program Files (x86)\Adobe\Acrobat9.0\Acrobat\Acrobat.exe” Service: AcroviewA10 …” (see screenshot below).

Some posts (can’t find it anymore) suggest that this is not so much a problem of WinEdt but of Adobe constantly changing the interface of their pdf software. Whoever is to blame: I could not find a solution that works with WinEdt 7. Regardless of some people stating that the solution is the same for any version of WinEdt, the idea of  replacing DDE Service Acroview with AcroviewR10 (Acrobat Reader) or AcroviewA10 (Adobe Acrobat) in “PDFCloseDoc.edt” (that’s what the file is called in WinEdt 7) does not work (for me).

So what’s the solution? It’s more a workaround than a solution: don’t use an Adobe product as your pdf viewer when working with WinEdt. You can keep Adobe Acrobat or Adobe Reader and use it as you like, but don’t have it as your pdf Viewer in WinEdt. Use Sumatra pdf instead. WinEdt works fine with it and you no longer need to close your pdf-document manually everytime you compile your LaTeX text.

How do you change the settings in WinEdt? – Go to

Options -> Execution Modes -> PDF Viewer

and change the path to the “PDF Viewer Executable” to wherever you installed SumatraPDF (in my case, it is “C:\Program Files (x86)\SumatraPDF\SumatraPDF.exe” because I have a 64bit version of Windows). Voilà!

# WinEdt + biblatex + refsection

This little latex/bibtex problem has cost me some hours today and I could not find anything on the net about this. So maybe this is of help to someone (please let me know in the comments).

Note: this is probably only relevant to you if you use both WinEdt and biblatex with reference sections.

Problem:

I cannot get to WinEdt to work with multiple aux-files automatically. – Why do I need more than one aux-file for? – It comes from biblatex when you use the refsection command to create multiple bibliographies. Biblatex then creates one aux file for each section (marked by \begin{refsection} and \end{refsection}), and consequently bibtex will have to run over each of them. Something like this:

pdflatex mydoc.tex bibtex mydoc1-blx.aux bibtex mydoc2-blx.aux pdflatex mydoc.tex pdflatex mydoc.tex

(The endings .tex and .aux, are not necessary to run the commands but I include them here for clarification)

The problem with the standard configuration of WinEdt seems to be that all the macros which automatically run bibtex between (pdf)latex apparently don’t understand this special demand from biblatex, they probably just follow the scheme:

pdflatex mydoc.tex bibtex mydoc-blx.aux pdflatex mydoc.tex pdflatex mydoc.tex

Or something like this. I’m not really sure whether this explanation is exactly right, but in any case, I did not manage to get WinEdt to run properly on a document with refsections.And if I had understood the core of the problem earlier, it would have saved me some time.

For someone who is good at writing macros for WinEdt, it surely is not a problem to fix this, but I don’t have the time now to go into this. If you have a solution for this or a correction regarding the above, please post it in the comments.

Workaround:

For now, the only workaround for me, at the moment, is the following:

1. Run pdflatex by clicking the pdflatex icon in WinEdt
2. Open a command prompt window and run bibtex on the two files (i.e. bibtex mydoc1-blx and bibtex mydoc2-blx where “mydoc” stands for the file name of by main tex-document)
3. Run pdflatex twice by clicking the pdflatex icon in WinEdt

You can, of course also run pdflatex manually at the command prompt or write a script or fly to the moon, but since bibtex only needs to be run when my references change, this is most convenient to me.

Finally:

I know that it is very much recommended to use biber instead of bibtex when using biblatex and I would like to do that (especially now that both biber and biblatex are finally part of the MikTeX package). But: I did not get biber to run with WinEdt either. The solutions that I found on the web (here and here) did not work for me because they are not for WinEdt 5.5 but even when I tried them out on a trial version of WinEdt 6, they did not work for me. It just comes to my mind that  that might have been related to the use of refsections (i.e. same problem as with bibtex described above). But since the main point of this post is the combination of WinEdt + biblatex + refsections, I won’t go into this.