Skip to content

Import Adobe Illustrator images into LaTeX

License

Notifications You must be signed in to change notification settings

lxma/AILaTeXImport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Remark

As I don´t own Adobe Illustrator any more, there won’t be any changes with this repository. I suppose it still works, but I cannot test it. I keep it available as an exemplary resource.

AILaTeXImport

Import Adobe Illustrator images into LaTeX

In the past I often used XFig to make simple drawings and include them in LaTeX documents. I particularly admire XFig's feature to export combined PDF and LaTeX files.

This project contains

  • An .jsx script that enables Illustrator to do a similar combined PDF/LaTeX export
  • An .sty package to be included in the LaTeX document

Up to now this script has been tested with Illustrator CS4 only. Please give me feedback if you know it does / does not work with other versions.

Usage

Prerequisits: Copy aiimport.sty to a place where LaTeX will find it. You will also need the packages "graphicx" and "xkeyval" installed.

Exporting from Illustrator

Before you can start exporting you need to ensure following:

  • The text you want to export must reside in a seperate Layer named "Text". Before export to PDF this layer will be made invisible. Therefore it should contain the exported text only.

  • All text items must be single lines of type "pointtext" (not "areatext" or "pathtext").

  • Beware of the character encoding. Illustrator uses UTF-8. So special characters won't work out of the box. If you stick to ASCII Symbols you are on the safe side.

  • You must to tell Illustrator not to use "typographers quotes". Otherwise TeX will choke on quote characters (").

To perform the combined export, run the script. Choose File->Scripts->Other Script and select the file "Illustrator LaTeX Export.jsx" from the js directory of the repository.

The script generates two files, both with the same base name as the original Illustrator image:

  1. A PDF file containing all image data except for the text elements

  2. A LaTeX file (with the extension ".tex") containing LaTeX instructions to place all text elements and to include the PDF file

Importing into LaTeX

  • Insert \usepackage{aiimport} into the document preamble.

  • At the place you want to import the document just use \input{latex-part}. The TeX file contains LaTeX instructions to place the text elements as well as the exported PDF image.

About

Import Adobe Illustrator images into LaTeX

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published