Image included but not inline in Scrivener project

I’m writing a document that I’ve converted over (by hand, mostly) from LaTeX. In the LaTeX original, I had a composite image, made of four other “subimages” (in PDF) that I generated in a drawing program.

The LaTeX code to do this was quite satisfactory, and I don’t think that I want to try to reproduce it in MMD, as I can pass the code through in HTML comments. But I need the images to be passed through when I compile. I don’t want to include them inline in the draft document, since LaTeX will take care of all the positioning and formatting, and inline images would just print twice.

The images, since they’re PDFs, cannot be put in the project binder Draft section. I’ve got them sitting in another folder in the binder. So how do I get the MMD -> LaTeX compiler to use them?

Here, btw, is the code to arrange them in the LaTeX document.

\begin{sidewaysfigure} \begin{center} \subfloat[Hierarchy]{\includegraphics[width=.4\textwidth]{pics/hierarchy}\label{fig:hierarchyfig}} \hspace{5em} \subfloat[Centralized Network]{\includegraphics[width=.4\textwidth]{pics/networkstrong}\label{fig:networkstrfig}} \\ \subfloat[Dispersed Network]{\includegraphics[width=.4\textwidth]{pics/networkweak}\label{fig:networkwkfig}} \qquad \qquad \subfloat[Market]{\includegraphics[width=.4\textwidth]{pics/market}\label{fig:marketfig}} \end{center} \caption{Different Organizational forms}\label{fig:difforgforms} \end{sidewaysfigure}

Ioa probably has a funky way of doing this, but I would:

  1. Compile to latex.
  2. Find the folder containing the .tex folder.
  3. Create a pics folder inside that .tex folder and copy the images into it.
  4. Typeset.

When you come to re-compile it should leave your images in there.

That is only going to work if you have another image in your project which is going to force Scrivener to create a containing folder, rather than just tex file. If you don’t have that, create a folder, put the pics folder with the images in that, then make sure the tex file is created there.

Hmm, when Scrivener compiles to LaTeX for me, it’s a “flat” folder. I.e., there’s a folder called “Project.tex” and within that folder are the various tex files and the pic/images, all at the top level of the folder.

I believe there may be a built-in method that will work perfectly for what you are doing. Given that we cannot predict how everyone will want to generate figures, and that the abstractions we use with inline images only have so many options that do not cover everything MMD can do with an image tag (let alone everything LaTeX can do), we have an alternate method, that does not generate full image syntax. It is described on page 323 of the user manual, in the second enumerated item toward the bottom of the page:

As I say, this method was built to provide one with a way to use more complex MMD image syntax (for example, to add title or image attributes), but the principle of the matter is identical to what you’re doing. I.e. Scrivener doesn’t care at all what you do with the text around the hyperlink to the image—it assumes you know what you are doing. The entirety of its responsibility is to produce the requested image into your compile folder, and to ensure that the referenced name in the text matches the output filename. So in excerpt, you would have something like this in Scrivener:

[size=80]Scrivener Link highlighted for clarity[/size]

When compiled, I get the following files in the compile folder:

Compile Folder/ compiled_file.tex sample_image.pdf

And the .tex code would end up as:

\subfloat[Centralized Network]{\includegraphics[width=.4\textwidth]{sample_image.pdf}\label{fig:networkstrfig}} \\

That was exactly it! That element works perfectly now.


Didn’t I say Ioa would have a funky way of doing it?