incorporating images used in latex preamble

My latex preamble files (header, document etc.) include an image (an icon) which I include in certain sections, using a LaTex command. :open_mouth:

When I compile from Scrivener, this images is not included, because it’s not located within the body of the text. If I compile to LaTex, I can manually include the image and then produce a pdf. :smiley:

Yet, if I compile to a pdf directly, which I regularly wish to do, the image is not found / included in the compile. :cry:

Is there a way round this?


There isn’t a way around that. The direct to PDF tool is mainly going to be for convenience and proofing, where things can stand to look a little rough. Anyone that needs to either compile auxiliary files (like bibliographies and glossaries), make use of stylesheets and other extra material or have custom graphics that are a part of the style and not the content will not be able to just run off a quick PDF temp folder compile.

I’m in that group as well for most of my LaTeX usage. I have the L&L logo and various vector images for the Mac shortcuts that I need in the tex folder, so PDF isn’t something I can use for final output. However, I do make extensive use of it for non-galley proofing. I just omit the fancy title pages, symbols and all that—I basically just use the stock vanilla “Book” output for proofing. So, if you can get away with that way of working, that’s my advice.

Note you can save project compile presets so you can quickly swap between different workflows. Use the management option at the bottom of the Format As menu.

The following works for full compile and then typesetting in latex: I don’t know if it works for the quick pdf compile (it may depend on which mmd helper files Scrivener uses for the direct to pdf compile).

Where you have a logo called in one of your latex input files, such as mmd-memoir-header.tex, copy the logo into the same folder as those input files (library/texmf/tex/latex/mmd). On compile it turns up in the final pdf as it should, without having to manually copy it into the compile folder.

And on further testing, it seems to work if you create an ‘images’ folder (library/texmf/tex/latex/images) and put the logo in there. That is probably tidier.

Many thanks, AmberV and MrGruff. Both helpful answers :slight_smile:

I’ll play around with the second option in particular and see if that works out. :wink: