1

I can include a jpg to a LaTeX document using the \includegraphic command.

In a simulation program, the program writes latex code into a .tex file to create a result pdf. A graphic should appear. If I use includegraphics, I need to copy the included jpg file to the working directory (or another fixed path, but then the simulation is system dependent).

I would prefer an inline graphic definition in the LaTeX code, such that beside the created .tex no other files are used. The LaTeX-Source is automatically created, therefore long and difficult to read latex code is no problem.

Any solutions for this? Thanks! :)

Jörg
  • 11
  • You can set \graphicspath, but you can also place the JPG in your local texmf folder. Is you main aim to create the PDF without the JPG? That is, create the image from scratch rather than to rely on the external JPG. – Werner Jan 23 '21 at 17:17
  • you don't give many clues, does it have to be jpg? if it is a possible to have a vector format you could perhaps do it in tikz or pstricks, but if you can write a tex file why is it an issue to write the jpg to the same place? – David Carlisle Jan 23 '21 at 17:23
  • Thanks for the proposed solutions. The idea is to include the company logo on the report titlepage. There are also some vector graphics, the results are shown as xy-Plots using picture environaments, polygons, also tikz. But the logo is a jpeg (alternative pdf). – Jörg Jan 23 '21 at 18:37
  • If I set the \graphicspath (or \includegraphics{absolute_path_name}), the problem is that the tool no longer works if copied to another machine. Ok, if the jpg is also copied, but I'd prefer to define the graphic in the text, if feasible. – Jörg Jan 23 '21 at 19:06
  • There is also https://github.com/zerotoc/pdfinlimg that directly embeds an image object in the pdf file, seems interesting as it does not use any external tools for the image embedding (but I didn't try it, so I'm not sure if it works). – Marijn Jan 24 '21 at 17:12

0 Answers0