在 Latex 类文件中包含图形
我有一些乳胶类文件,扉页上有公司徽标。我现在已将该公司的所有模板存储在一个文件夹中,并将此路径添加到 MiKTeX 。我已将徽标放置在名为“graphics”的模板的子文件夹中。然后,在类文件中,我使用 \includegraphics{./graphics/logo} 导入徽标。这会给出文件未找到错误。
有没有办法将徽标放在一个地方?或者我是否需要将徽标复制到与文档相同的位置?
I have some class files in latex with a company logo on the titlepage. I have now stored all templates for this company in one folder and added this path to MiKTeX . I have placed the logo in a child folder of the templates named "graphics". In the class files I then import the logo with \includegraphics{./graphics/logo}. This gives a file not found error.
Is there a way to have the logo at one place? Or do I need to copy the logo to the same place as I have the document?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保您的模板遵循所需的 texmf 结构。我将图形放入 tex/latex/... 文件夹中。我不确定它们是否必须去那里,但如果我把它们放在那里,总是会找到它们。
无需给出路径。只需使用
\includegraphics{logo}
。如果徽标不在本地目录中,MikTeX 将搜索路径来查找它(并自动在子目录中查找)。此外,请确保您在添加徽标文件后已刷新文件名数据库。
Make sure your templates follow the required texmf structure. I put figures inside the
tex/latex/...
folder. I'm not sure if they have to go there, but they are always found if I put them there.There is no need to give the path. Just use
\includegraphics{logo}
. If logo is not in the local directory, MikTeX will search the path to find it (and will automatically look in sub-directories).Also, make sure you have refreshed the filename database after you added the logo file.