There are a few approaches, and the 'best' one depends upon the nature of your target community.
Approach one is to use a .dtx
file to distribute your class. You can then include and .eps
file in the source and have it extract out on unpacking. I've done this in the chemstyle
package. Now, you will end up needing to use latex
rather than pdflatex
in this case, although automatic conversion is available using the auto-pst-pdf
package or in TeX Live 2010 with no extra effort.
Approach two is to distribute your files as a ready-to-install 'TDS-style' .zip
file. The idea here is that you include everything in a .zip
file with the correct folder structure to just unzip in the local texmf folder on the users PC. In that case, you can include both a .eps
and .pdf
version of the picture. This method is also best for raster images, as you can have a .jpeg
for pdflatex
and convert it to .eps
format for latex
users.
The third approach is as you say to use tikz
. That avoids needing anything other than the .cls
file itself, and keeps things easy to use with latex
and pdflatex
. The downside is the requirement for a reasonably new distribution. Then again, you might find it better to require something up to date as other packages can also change a lot over the years.
Finally, you could just not worry too much and provide a standard .zip
file including the necessary extras. This is often seen with journals. It's then down to the user to put the right files in the right place, but this is probably the easiest and most general approach for you.
As I say, what is best in a given case does to some extent depend on the situation. For example, normally logos are only needed withing organisations. I do a journal class which in the 'real thing' includes a logo, but that is only needed for final printing by the publisher. So the user version just has a space!
Don't use backslashes recklessly. The standard directory separator should work fine on all platforms:
\includegraphics[width=0.5\textwidth]{folder/test.jpg}
% ^^^^^
You can even omit the suffix .jpg
to let the driver pick the best representation of the image (e.g. JPEG for PDF, and EPS for PS).
Best Answer
There are several vector graphics format in use these days by vector graphics packages, the most common ones being
pdf
,eps
, andsvg
.SVG
tends to be the de facto internal working format for most of them these days, and it is a very good format for web applications as most browser will be able to display them natively. However, unfortunately,svg
is currently not supported in LaTeX documents.The historical format for vector graphics in TeX is
eps
and it is indeed the only format supported by the original latex, even for raster based images (indeed, all these file formats can contain both vector and raster based images).With the
graphicx
package, andpdflatex
(and newer incarnations such asxelatex
andlualatex
) you can now include raster files such asjpg
,png
, and so on, without having to put them in aeps
container, and you can also includepdf
files, however you lose the ability to includeeps
files.Most graphics packages will allow you to export as eps or pdf so you can choose at the time which format you want. Alternatively, you can easily convert from one format to the other with command line tools such as
epstopdf
.As for which format is better, this is open for debate,
pdf
is basically built oneps
with more features such as embed fonts, includingttf
andotf
ones, and compressibility (so apdf
will usually be smaller than aneps
) among others. People will usually also have something installed on there computer that readspdf
, whereas,eps
may be an issue.