Document Classesgraphics path in class file

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
steve6390
Posts: 16
Joined: Sat Nov 29, 2008 6:36 am

graphics path in class file

Post by steve6390 »

Hello!

I have a class file that uses \includegraphics for a logo. The class file is in a common area, not per document. I add the .cls file location to the root directories, update FNDB, and everything works except the logo graphic isn't found.

I tried some experiments with using \graphicspath in the class file, but no luck.

I don't want users to explicitly add the path the graphic in their own documents. I want users to simply specify the document class and have the logo be automatically found by some means.

I'm using MikTex 2.8.

Thanks for any advice!
-steve

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

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: graphics path in class file

Post by frabjous »

Where did you put the logo file? In the same folder as the .cls file? I would have guess that should work...
steve6390
Posts: 16
Joined: Sat Nov 29, 2008 6:36 am

graphics path in class file

Post by steve6390 »

Right, I tried putting them in the same spot. In my case the paths look like this:

Code: Select all

my_class/tex/latex/base/myclass.cls
my_class/tex/latex/base/mylogo.pdf
But no luck.
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: graphics path in class file

Post by frabjous »

Try in my_class/tex/generic/mylogo.pdf and refresh the FNDB afterwards.
steve6390
Posts: 16
Joined: Sat Nov 29, 2008 6:36 am

Re: graphics path in class file

Post by steve6390 »

That works! Thanks frabjous!
Post Reply