Graphics, Figures & TablesStyle Changes when including Illustrator CS6 Graphics

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Style Changes when including Illustrator CS6 Graphics

Post by ghostanime2001 »

Hi all,

I created a graphic with illustrator CS6. It is called D1.ai/pdf/eps (short for diagram 1). I successfully put the graphic into my document however I noticed that the line width has increased from the PDF I created using illustrator CS6 and the PDF produced from using the packages graphicx and epstopdf to import my graphic (D1.eps) into my document. I attached the two PDF files and the source code. Is there a better way to put exactly the PDF that I created using Illustrator into a LaTeX document without having style changes ? (I have used PDF files created from using MS Word 2010 and that did a pretty good job but I don't have MS Office 2010 installed at the present moment).

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\usepackage{microtype}
\usepackage{chemmacros}
\usepackage{chemfig}
\usepackage{mhchem}
\usepackage{graphicx}
\usepackage{epstopdf}

\begin{document}
  \includegraphics{D1.eps}
\end{document}
Attachments
latex.pdf
Graphics file included into LaTeX document.
(31.19 KiB) Downloaded 207 times
D1.pdf
Pure Illustrator CS6 graphic.
(299.45 KiB) Downloaded 239 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Style Changes when including Illustrator CS6 Graphics

Post by localghost »

I can't comprehend the problem because I can't spot any difference in display (with Okular on Linux).

But instead of doing such things with an (overprized) external tool, you might be interested in a LaTeX solution by the tikZ/PGF package (output attached).

Code: Select all

\documentclass[11pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage{tikz}

\begin{document}
  \begin{tikzpicture}[thick]
    \draw[-stealth,dashed] (-1,0) -- (5,0) node[right] {$x$};
    \draw[-stealth,dashed] (0,-5) -- (0,5) node[above] {$y$};
    \draw[->,blue] (0,0) -- (4,0) node[pos=0.865,below] {$F_3$};
    \draw[-stealth,green!50!black] (0,0) -- (3,3) node[midway,above left] {$F_1$};
    \draw[thin,dashed,green!50!black] (0,3) -| (3,0);
    \draw[->,green!50!black] (0,0) -- (3,0);
    \draw[->,green!50!black] (0,0) -- (0,3);
    \draw[->,thin,green!50!black] (0.6,0) arc (0:45:0.6);
    \node[green!50!black] at (22.5:0.9) {$\theta_1$};
    \draw[-stealth,red!50!black] (0,0) -- (2,-2.5) node[midway,below left] {$F_2$};
    \draw[thin,dashed,red!50!black] (0,-2.5) -| (2,0);
    \draw[->,red!50!black] (0,0) -- (2,0);
    \draw[->,red!50!black] (0,0) -- (0,-2.5);
    \draw[->,thin,red!50!black] (0.4,0) arc (0:-52:0.4);
    \node[red!50!black] at (-26:0.7) {$\theta_2$};
  \end{tikzpicture}
\end{document}

Thorsten
Attachments
Output obtained by the introduced code.
Output obtained by the introduced code.
ztmp.png (3.47 KiB) Viewed 4676 times
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Re: Style Changes when including Illustrator CS6 Graphics

Post by ghostanime2001 »

Before using illustrator I tried to draw Free body diagrams with tikz but instead of using what you did there i tried to use intersections library to get my point of intersections and then drawing lines to the origin so that when I changed my angle later the intersecting lines would also change. It proved to be too much coding so I gave up and used illustrator instead and completed my drawing within 10 minutes. I'm not saying that i was lazy or don't want to use tikz because of how long it takes but it's too much coding unfortunately :( unless there is a way to simply the code (I wish a graphical program were made specifically for tikz)
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Re: Style Changes when including Illustrator CS6 Graphics

Post by cgnieder »

There really is nothing against using an external program if it fits your needs better.

I also can't verify the issue with the two PDF files.

Regards
site moderator & package author
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Re: Style Changes when including Illustrator CS6 Graphics

Post by ghostanime2001 »

for example look at the x-component of the red vector in both pdf files. The line thickness is greater in the one drawn with illustrator and that file which was imported into latex lost some of it's line thickness.
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Style Changes when including Illustrator CS6 Graphics

Post by cgnieder »

I still can't see it, but here's an idea: if you can create a PDF that only contains the graphic (not a whole page) you can simply include it with \includegraphicy{<filename>.pdf} like any other graphic.

If you can create a cropped version of the pdf you can still include it and clip its margins. You're already using graphicx which offers a trim option, although if prefer to use adjustbox and its \adjincludegraphics and its trim option.

Regards
site moderator & package author
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Re: Style Changes when including Illustrator CS6 Graphics

Post by ghostanime2001 »

I think you mean "\includegraphics{<filename>.pdf}"
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Re: Style Changes when including Illustrator CS6 Graphics

Post by cgnieder »

Yes, of course ... :oops:
site moderator & package author
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Re: Style Changes when including Illustrator CS6 Graphics

Post by ghostanime2001 »

Is there a english version of tkz-euclide ???
Post Reply