TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is a good way to get LaTeX formulas into CorelDRAW figures?

I will provide a solution below, based on a rather old macro adapted to work on 64 bit systems as well as 32 bit - it works well, but if anyone knows of a newer and/or better solution, please post it!

Note: I am not sure whether this is the right place for a question like this one, but as I find it very useful to integrate CorelDRAW and LaTeX, and it cost me quite some time around the internet to make it work, I think this information should be up somewhere where it is easily accessible.

share|improve this question
You can draw over your Corel Draw image : tex.stackexchange.com/questions/9559/… – percusse Nov 3 '12 at 13:20
Will post my answer later - my reputation (below 10) doesn't allow me to post it right away. – Jonatan Bohr Brask Nov 3 '12 at 13:27
@percusse Yes, that's nice, but it doesn't enable you to style you formulas using all the machinery of CorelDRAW, e.g. making matching labels and curves in corresponding colours etc. rather cumbersome. – Jonatan Bohr Brask Nov 3 '12 at 13:30

Here is one way to integrate LaTeX in CorelDRAW on Windows.

This macro will allow you to insert LaTeX into your figures as vector graphics which can be edited just like any other curve in CorelDRAW, e.g. setting fill colour, outline etc.


Get the CorelDRAW macro by Jan Bender from: impulse-based.de


It can be made to work with CorelDRAW X5 32bit and CorelDRAW X6 64bit. Presumably, it works with earlier versions as well. It requires the latex.exe and dvips.exe to be in the path.


  1. Extract the contents of the ZIP file somewhere. I keep them in a subfolder of the CorelDRAW program folder, e.g. Corel_Latex.

  2. In CorelDRAW X5 or X6 go to Tools → Macros → Macro editor. In the macro editor, highlight the GlobalMacros (GlobalMacros.gms) item in the list on the left, then go to File → Import File and import the .bas and the .frm files. Close the macro editor.

  3. To setup a keyboard shortcut for the LaTeX macro, go to Tools → Customization, select Commands in the list on the left, then select Macros from the drop-down menu on the right.

    Find LatexEdit in the list, click on it, then under the Shortcut Keys tab on the right, click in the New Shortcut Key field, and define your shortcut using the keyboard, e.g. type Alt+A. Click Assign, and then OK.

  4. After setting this up, you can create LaTeX by hitting Alt+A (or whatever shortcut you defined). You get a pop-up window where you can type the LaTeX code (remember the $ signs for math).

    To edit formulas which have been created using the macro, simply select them and hit the keyboard shortcut to bring up the LaTeX editor. Note though, that editing the LaTeX will reset properties such as fill colour and outline (but not size) — at least on my system it does.


If the macro does not work after following steps 1. to 4. one of the following fixes may help:

  • If the macro runs, but the resulting graphic does not display the LaTeX font right — i.e. if symbols like Greek letters are replaced with their Arial equivalents and mathematical symbols like integrals disappear, try this:
    Import any .ps file and make sure to set “import text as curves” in the process. Now run the macro again.

  • If you are running X5 32bit, the macro runs, but the LaTeX doesn't format right and the previous fox does not help, try renaming your Ghostscript directory, e.g. rename C:\Program Files (x86)\gs to C:\Program Files (x86)\gs_newname. Open CorelDRAW and run the macro again.

  • If you are running X6 64bit and you get a compiler error when you try to execute the macro, in the macro editor replace the following lines (which will be highlighted in red when the compiler errs)

    Private Declare Function OpenProcess...
    Private Declare Function GetExitCodeProcess...


    Private Declare PtrSafe Function OpenProcess...
    Private Declare PtrSafe Function GetExitCodeProcess...

    and save the macro again.

    Then is should compile and work fine. In principle handle and pointer variables should be declared as PtrLong rather than Long on a 64bit system, but the macro seems to work without any further modifications.

share|improve this answer
Thank you very much! You helped me a lot. I registered solely to upvote you, but apparently I am not reputable enough. – user25398 Feb 2 '13 at 13:39
@Gerard: Welcome to TeX.sx! I converted your post to a comment. You need 15rep in order to up-vote. See tex.stackexchange.com/privileges for more details. – Martin Scharrer Feb 2 '13 at 15:03
Is it possible to modify something so that it will run with latex-beamer fonts to put it on a presentation? – HericDenis Jun 27 '14 at 0:59
This is very useful. I can now draw and put formulae easily. Amazing feature! – Ustanak Apr 7 at 14:50

I follow the steps 1 to 4 but I'm getting the following message, after try use it in Corel Draw X7 64 bits:

Run-time error '-2147467259 (80004005)':

Method 'ImportEx' of object 'IVGLayer' failed

Is there something that I can do in order to fix this?

share|improve this answer
Well, that is a question you should better ask the support of Corel Draw, I guess. As it seems to be error messages from Corel. Have you checked the system panel of windows? Have you searched for the meanings of the shown messages there? – Kurt May 25 at 20:21
Dear Kurt, thanks for the reply. I import a .ps file, as the troubleshooting part suggests and try it again. After I receive a new error message (latex.exe doesn't work and needs to be closed) it works perfectly. Thanks! – h3r0n3dU May 26 at 12:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.