20.5.11

LaTeX en CorelDraw




If you want introduce formulas in Corel Draw using Latex code, I recommend the plugin developed by Jan Bender and improved by Sebastian Held. You can download this plugin in:
http://www.impulse-based.de in download section or Latex_CorelDraw_modified.zip (May 15th 2009) in http://hft.uni-duisburg-essen.de/projects/latex_formulas_win.shtml
The original version by Jan Bender works perfectly.

Or in http://www.simonklein.de/index.php/dev

LaTeX for Corel Draw

A vba macro for Corel Draw for quickly placing and editing LaTeX objects (Formulas) in Corel Draw. Needs LaTeX and Ghostscript installed (or only MikTeX), tested to work with Corel Draw x5.
This is a modified version of the macro created by Jan Bender (http://www.impulse-based.de/). It utilizes Ghostscript to convert the pdf created by pdflatex to a interpreted postscript file without the need of Fonts.
Installation: Just copy the .gms file inside the zip to %appdata%\Corel\CorelDRAW Graphics Suite [VERSION]\Draw\GMS
UPDATE (27.12.2012):
The Macro now brings its icon with it and installs it to the toolbox... only the .gms is needed now. (Make sure, "Delayed loading" is disabled under Settings-->VBA)

UPDATE (12.08.2013):
Total rewrite of this Macro. It is now implemented as a .net usercontrol and installs as a Docker in Corel X6. Works only with X6!
__________________________________________________________________


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.

Download

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

Requirements

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.

Installation

  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. typeAlt+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.
  5. Screen capture




Troubleshooting

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...
    with
    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.

3 comentarios:

  1. Funcionando en Corel DESIGNER 2020 (64 bit), después de arreglar el problema de x86 con los pasos de TROUBLESHOOTING. Muchas Gracias.

    ResponderEliminar
  2. El Blog Del Latex Fino: Latex, Beamer Y Otras Cosas Útiles By The Latex Expert!: Latex En Coreldraw >>>>> Download Now

    >>>>> Download Full

    El Blog Del Latex Fino: Latex, Beamer Y Otras Cosas Útiles By The Latex Expert!: Latex En Coreldraw >>>>> Download LINK

    >>>>> Download Now

    El Blog Del Latex Fino: Latex, Beamer Y Otras Cosas Útiles By The Latex Expert!: Latex En Coreldraw >>>>> Download Full

    >>>>> Download LINK EO

    ResponderEliminar