InDesign tip : #23

sometimes you get a reminder that what is obvious to you may not necessarily be obvious to others. and this is why sharing information on blogs and forums is important. knowledge only becomes obvious once you possess it.

this post was inspired by seeing an experienced InDesign user forcing text to the next column with multiple returns. there are a bunch of different break characters in InDesign. this post is about the big four :

1. return — also called a line break or hard return — the most common break, this designates the end of a paragraph.

2. soft return — also called a forced line break — place a soft return using shift-return — you use these when you want to force a line break within a paragraph. the difference between a return and a soft return is particularly noticeable when using paragraph styles or space after/space before settings.

screen grab showing four different break characters

3. column break — THIS is what you should use if you want to force text to the next column. why? because if you use multiple returns, and then later edit the text before those returns, there’s a pretty high likelihood that you’ll stuff up your neat columns. if you have a keyboard with a number pad, you can use the enter key to place a column break. with a truncated keyboard you use function-return (the function key is the fn at bottom left). you can also use a right-click (or the type menu) to access the conditional menu :

screen grab showing how to select break characters from conditional menu

4. page break — similar to the column break — hopefully the name makes its purpose obvious. also accessible through the conditional menu.

work smarter, not harder. and get in the habit of using returns and breaks correctly — this will make you a better layout artist.

macgrunt icon

deleting empty folders

some workflows involve creating standard sets of job folders at the beginning of a project and then going through and cleaning out any unused folders at the end. this is a good way to standardise archiving procedures but it can also be tedious to clean up once the project is done. this post shows how to easily delete empty folders using applescript.

thanks to xander at cadcoder (sorry this link seems to be broken at the moment — Aug 2013) for the basic structure of the shell command.

Applescript Icon to follow along, copy and paste the script examples into applescript editor (found in applications > utilities) or, for older OS versions, script editor (applications > applescript). we’re going to set this one up as a droplet (so you’ll save it from script editor as an application). you can save a droplet to your desktop or drag it to your sidebar for easy access. to run the script just drag and drop a folder onto the droplet’s icon.

the basic form of the script goes like this :

on open mgItem
  do shell script "cd " & quoted form of POSIX path of mgItem & " && find . -type d -empty -delete;"
end open

in the shell, a folder is known as a directory (d). the first part of the command changes the current directory (cd) to our dropped folder. then it performs a search of that folder (find) for empty subfolders (-type d -empty) and deletes them. simple.

this works a treat — most of the time. but macs have these dastardly hidden files, the most common of which are the good old .DS_Store files which help the finder do its thing. a folder containing nothing but a .DS_Store file looks empty, but as far as the shell is concerned, it’s not.

so, here’s a variation to deal with that issue — first delete any .DS_Store files, then delete empty folders :

on open mgItem
  do shell script "cd " & quoted form of POSIX path of mgItem & " && find . -name .DS_Store -delete; find . -type d -empty -delete;"
end open

ok, that’s better. but to make the droplet a little more user-friendly, we should ensure it can handle multiple dropped folders — rather than having to drop them one at a time :

on open mgItems
  repeat with mgItem in mgItems
    do shell script "cd " & quoted form of POSIX path of mgItem & " && find . -name .DS_Store -delete; find . -type d -empty -delete;"
  end repeat
end open

and to make it more robust, it should not have a conniption if we inadvertently drop files instead of, or as well as, folders :

on open mgItems
  repeat with mgItem in mgItems
    set mgItem to mgItem as alias
    tell application "System Events" to set theClass to get class of item (mgItem as string)
    
    if (theClass as string) contains "cfol" then
      do shell script "cd " & quoted form of POSIX path of mgItem & " && find . -name .DS_Store -delete; find . -type d -empty -delete;"
    end if
    
  end repeat
end open

that’s about it — super fast, super easy way to clean out any unused folders.

for those interested in this sort of thing…
applescript droplet icon when an applescript is saved as a droplet, its icon includes a downwards pointing arrow. the on open mgItems line at the start of this script is what allows the saved application to run as a droplet. without that on open command you’d need to find some other way to reference the folders to be processed. renaming finder items shows a couple of other ways you could do this.

macgrunt icon

book mockup imposition

if you still get confused when working out which page goes next to which when you’re creating a book mockup or dummy, this post is for you — all you need is grade 3 maths ability.

we’ll use a 16pp book as our example. the front and back covers are pages 1 and 16 — add those two numbers and you’ll get 17. the inside covers are pages 2 and 15 — add them together and you’ll get 17. see a pattern here?

it’s the same for any book — take the total number of pages and add 1 — that’s the magic number your imposed spreads should add up to. page 6 of a 16pp book will be next to page 11, page 13 will be next to page 4, etc.

the only other thing you need to worry about is which page goes on which side of the imposed spread. again, it’s just a matter a grade 3 maths — even numbered pages are always on the left.

showing page imposition for 16 page book

macgrunt icon

what dat?

.dat files are a pain — yet another reason to swear under your breath (or out loud if you prefer) at megasoft. they arrive in your inbox as win.dat or winmail.dat and trying to explain to the sender “yes, I know you sent me a pdf, but what I got was a dat…” is about as tedious as it gets. no doubt megasoft had some good reason to invent the transport neutral encapsulation format but that’s not helpful to a mac user in a hurry.

for those interested in this sort of thing, you can read more about the tnef format at wikipedia

TNEF's Enough icon TNEF’s Enough was created by a clever bloke called josh jacob. you can download this beaut little app from here. he’s offered this up as freeware, but feel free to make a donation.

it’s free and it works — bonza!

macgrunt icon