Checkbox to remove images during compile

This would be useful for outputting in plain manuscript format, where images are unneeded or discouraged.

I’m not sure I follow - why would you have images in the text that you don’t want to compile? If you need this, it might be better to place the images in separate documents and include them conditionally.
All the best,
Keith

In general terms, I’ve assumed that images should be stripped from plain-text manuscripts compiled for agents, editors, etc, unless the images are really needed to make sense of the surrounding text. Is this an incorrect assumption?

Also for my particular case, I happen to be using images to create a “big first letter” effect at the beginning of every chapter, in a manuscript that is otherwise devoid of images. I found this preferable to changing the font and size of the first letter because it preserves the spacing between the first two lines of text.

For every word with a big first letter, I’ve colored the actual first letter white and made it 1pt in size, essentially hiding it without deleting it. This preservation is needed by e-book apps that read aloud, which would otherwise garble the first word of every chapter. It’s also useful for my “plain-text manuscript” compile mode, which converts all text into black 12pt Times New Roman, essentially making all the hidden letters visible. Since the compile mode still preserves images however, I must manually edit the RTF after every compile, removing all the big first letters that are no longer needed or wanted.

Because this use case requires images to be displayed inline, I can’t place them in separate documents. Actually, I lied a bit when I said my manuscript was devoid of images, because I do in fact have an image at the start of each chapter, but these are easily excluded from plain-text compiles, like you mentioned.

This has been on my list to look at and consider since this post was created nine months ago - I’m replying after all that time because that part of my long list finally came around for consideration.

Having looked into it, this feature is not required as it is already achievable (something that didn’t occur to me before). If you want to set Compile up so that images are removed during Compile, do the following:

  1. In the editor, select an image in the text and hit Copy (Cmd-C).

  2. In Compile, select the “Replacements” tab.

  3. Create a new replacement.

  4. Edit the “Replace” field and hit “Paste”. Nothing will seem to happen, but this will paste in the invisible “image attachment” character, which will have been copied in Step 1.

  5. Leave the “With” field blank.

  6. Compile - all images will be removed.

This works because all images in OS X’s rich text system are anchored in the text by a special “text attachment” character. Copying a selected image copies this character to the plain text pasteboard, so it can be pasted into the Replacements “Replace” field. As all images use the same character, this will remove all images during Compile.

I know this is too late for the op’s request, but hopefully it will help someone else searching the forums to do something similar.

All the best,
Keith

1 Like

This is great to know. Thanks!

Hi Keith, I’m curious if this topic is still relevant. I’ve tried on multiple images to make this work but haven’t been successful. I’m running on a Mac v3.3.6.

Apologies for the late reply (although in all fairness this thread is twelve years old!).

Unfortunately it does seem that this is no longer possible. Testing it out, it appears that Apple has made it so that you can no longer paste the special “image attachment” character into text fields, which is what made this possible.

All the best,
Keith

Thanks Keith. No worries on the timing. But if you can think of another way to accomplish this, please let me know. Thanks for all your work.

The best way to do this these days, which wasn’t possible back when this thread was started, is to use a paragraph style for your images (or a character style for inline images). Not only does that help you keep the formatting neat and consistent across them all—if you want to adjust the padding around images, you can do that in one place instead of having to go through and fix them one by one—there is a checkbox in the compile Format Designer: Styles pane that lets you delete whatever is marked in a particular style.

I’ve created a test project that demonstrates the technique:

image_removal.zip (56.4 KB)

  • If you compile that with its given settings, you’ll see the image and its caption appear normally.
  • To test the removal, select the “Remove Images” compile Format in the left sidebar, and compile again. As you will note, this not only removes the image and the caption, but cleans up the empty lines that would be left behind, as well.
  • To see how it works, load Compile again, and double-click on “Remove Images” to edit it, selecting the Styles pane. It’s the Delete text of this style checkbox, set to both of these styles, that you’re looking for.
1 Like