Our solution relies on R code-chunk formatting for most images, with some exceptions. Also, we wanted auto-numbering of images by chapter. For each image, we wanted one set of instructions to display an interactive chart/map/video using an embedded iframe in the HTML web edition, but display a static PNG image in the full-length Markdown edition, or to substitute a smaller PDF static image when available in the PDF book edition. In writing this book, one of key goals was to create R Markdown syntax to display different versions of images for different Bookdown editions. move all reduced-size PDFs back to the original images folderĪs a result, a simple image may have only one file in the the images folder, but large and complex images may consist of multiple files: images/chapter/image.png.select all image thumbnails in Preview again, and File > Export, with Option to change file format to PDF, but keep same file name as PNG.select all image thumbnails in Preview, reduce image size for all by 50% (or more), and save. select all of the duplicated PNG files and open with Mac Preview to view all.create duplicates of all PNGs and drag to a separate folder.Since large PNG images sometimes appear too large in the PDF edition, convert a copy into a smaller PDF image to fit better. In the publisher’s Figure Log we will point to the original image, and add a note to the annotated version as a guide for any artwork that they wish to redraw. If a screenshot requires additional artwork or text for the HTML edition, make a copy of the original, modify using a graphics tool, and add the suffix -annotated to note that this version is annotated, save into the same folder with the same root file name, and use in the code-chunk image pathnames. If we need to create side-by-side images, save each element using the root file name plus a suffix, and use Photoshop or to combine images and also save in Photoshop format (.psd) in the images subfolder. Avoid numbering images since they may not match the final sequence. Despite being in separate folders, avoid duplicate image file names across the book. Write file names in lowercase with dashes (not spaces) and begin with keyword of relevant section to keep related images grouped together. Make sure that color images include high contrast and/or shading, because they will be converted to grayscale by the publisher for the print book. Save items into the images subfolder that corresponds with each chapter. In general, create high-resolution color screenshots with the paid SnagIt tool (to capture cursors) on a high-resolution Retina monitor (144 ppi) with tight cropping, and save in PNG format (preferred over JPG due to image loss). View the underlying source code to understand how this page was composed at:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |