Family Cookbook 2.0 continued

When we left off with our project, we had transmogrified the cookbook Quark file into InDesign, and a made few observations about the potential work needed to make it the apple of our cross-media eyes.

plish004-fritter.gif

Remember, what we (I) have to work with is Quark Xpress 4.11, InDesign CS3, Acrobat, and no scripting knowledge, Xtensions, Xcetera. At the finish we want to serve up our cookbook content in an nice HTML/CSS website, plus a new InDesign doc for print.

Before we start working in InDesign, just so you’ll never think I’m lazy (crazy, sure; lazy, no) here’s a list of alternate methods I explored for getting the content out of that old XPress file, and why I didn’t choose them.

The Roads Not Taken

1. Quark to ASCII: yields nice clean text, but no hooks to attach the XML tags to, and the text from the recipe cards gets left out since it’s not part of the main story.

2. Quark to XPress Tags: a little more interesting. Any time we hear the word “tags” our ears should prick up. It also gave me a reason to dust off David Blatner’s venerable Quark XPress 4 Book, and read the section on XPress Tags. His enthusiasm about them makes me feel like I missed out on something cool, well geek cool, since I never really used them before. Guess I’ll never know.

Quark’s tagging syntax is quite different from XML. It’s based on presentation and uses only opening tags. So we’d need to be clever about crafting a Find-and-Replace scheme. Before I read A Designer’s Guide to InDesign and XML, I would have just given up and moved on, but that book gave me the confidence to try just about anything with Find and Replace. I’ll spare you the gory details, but in 3 steps, I went from the XPress Tags and whitespace surrounding the ingredients to real live opening and closing XML tags.

plish004-xtagstoxml.jpg

So this method does work. But it kind of hurts my brain. And anyway, there’s that same deal killer of the recipe card content getting left out. Ahh, if only I could go back in time and warn myself not to put that stuff in inline text boxes…

3. Quark to Word: I can save to either Word 6 or Word 8. Both versions crash InDesign when I try to place them. No thanks.

4. Quark to PDF to Word: practically every paragraph is in it’s own text frame and somehow my 6 paragraph styles have ballooned into 44 styles named CM1-CM44. Pass.

5. Quark to PDF to RTF: I had high hopes for this one, since I thought it would reuinte those inline boxes with the rest of the text and have a style attached to everything. But I’ve tried several times to import it into ID and it crashes it every time. Sucks to be me.

6. Quark to PDF to HTML: no cards, plus everything’s chopped to bits in tiny <p> and <span> elements that don’t really correspond to meaningful elements. I think I need a beer.

7. Quark to PDF to XML: This is also kind of interesting, but not in a good way. More like Marshmallow-Peeps-in-a-microwave interesting. Almost everything is wrapped in <P> tags, which alone would be a deal breaker. But I really screwed things up by carelessly making the PDF from Quark with missing fonts, and as a result some of the recipe cards have overset text. Of course, the PDF doesn’t include any of that overset text, so it’s just gone. I also think the missing fonts resulted in some of the ingredients ending up in table tags. Very loose lines of justified text also got put into tables. “Clean-up in aisle 7!”

plish004-justifed.jpg

plish004-tablexml.jpg

8. Quark to PDF to Mars to SVG to XML: OK, I need to stop. You get the point. Besides if I do the work in InDesign, I can make use of what’s already there for the print side of things.

If you just can’t get enough of this text-out-of-Quark topic, by all means check out the InDesign Secrets thread on it. It just makes me jealous that I don’t have access to things like TeXTractor (or a comp vendor in India).

Here’s how you know you’ve drunk the Adobe kool aid: I can’t type the word “India” without capitalizing the “d,” so it’s always InDia the first time. I am no longer capable of InDependent thought. InDeed, it’s InDefensible.

InDesign clean-up

Ahhh, it feels so good to be back in InDesign after all that Quark-Word silliness (told ya I drank the Kool-Aid). Let’s do this quick. I want that text creamed and buffed with a fine chamois, and I want it now. Chop chop. The first thing is to clean up the paragraph styles so they match the element names I want to use in my XML. I have the luxury of not having to conform to a DTD or Schema, so I can call ’em anything I want. For now I’ll stay with simple semantic names. Then I’ll create tags with matching names that match the styles, and I change the default Root to cookbook. I’ll tag the story frame as recipies.

plish004-tagsnstyles.jpg
Now to clean up those two-column ingredients. A quick trip to the Find/Change dialog will suffice. First we replace all tabs in the ingredient style with paragraph returns. I also had some soft returns in there to put comments under ingredients, so let’s replace those with regular spaces. And last let’s use 3 of InDesign’s built-in GREP searches to tidy up any extra returns, spaces, or tabs.

plish004-grep.jpg

Now comes the moment of truth. Mapping Styles to Tags. If I’ve done things right to this point, everything will fall into place. And…I think it worked. The XML is pretty flat but I like what we’ve got here. In a project with more than one destination for this code, I’d want some nesting so that each recipe was a enclosed in a set of tags, and maybe even the ingredients and groups as well. But this is a one-off kind of thing.

plish004-cleantagstruct.jpg

The next step is straight out of A Designer’s Guide… Chapter 9 to be precise. Since there’s no other re-use of this content besides a page on a Web server, then there is no need to get all huffy about keeping the semantic nature of our tags. I already have things grouped consistently, so I can change XML tags to HTML tags, add a few things and I’m good to go. First I’ll change cookbook to HTML, then add a tag called head, and drag it waaaaaaaaaay up in the structure pane, just under HTML. I’ll change the recipes tag to div, and map the card tag to it. The code is starting to look Webbish.

plish004-finalxml.jpg

Let’s export it.

InDesign gives me a little agita on the way out:

plish004-cannotbeencoded.jpg

I tried in vain to find these shady characters. How dare they refused to be encoded! I want to speak to their parent elements!

I thought the warning might have something to do with the Structure Pane Gremlin I’ve seen from time to time. Here he is.

plish004-gremlin.jpg

Has anyone else seen this thing and know what it is? Looks like an Asian character of some sort. He is darn difficult to get rid of. I’ve had to untag and delete all the surrounding content to get rid of him. I thought maybe the Department of Homeland Security had bugged my InDesign file to see if I was a terrorist. Or maybe it’s just a glitch in the Matrix. Nothing to worry about. The Gremlin appeared 3 times in the cookbook code. Unfortuantely, even after removing all 3, I still get the warning message, so I have two unsolved mysteries. But the good news is the code looks fine when I eyeball it in Firefox.

That’s all for now. When we pick this up again, we’ll try to achieve Find and Replace nirvana in oXygen and test my ability to use CSS without making a MESS.

Advertisements

Family Cookbook 2.0

Now that all our Easter eggs have been consumed, let’s continue on with that XML theme with a little project to illustrate the joy and pain of bringing old content into the brave new world of cross-media publishing. The goal is to take the files from old print project, languishing on some dusty CD in the basement, and give them new life as spiffy Web content.

The content we’re going to work with is a cookbook. And yes, I did hear that collective groan from across cyberspace. If you’ve read anything about XML and publishing, you know that all XML demos are based on cookbooks. I think it’s a law or something. Actually, I really did want to update the cookbook and put it online, so I grabbed it for this demo.

I’ll break the demo up over a few posts since it’s too much to digest in one sitting. It hurt to write that one, but I couldn’t help myself.

The cookbook was a personal project. I made it when my son Ethan was a baby, to say thanks for all the help everyone gave my wife and I at the time. I was also inspired by the memory of a great-grandmother, Nana Mac, a legendary cook who never wrote down any of her recipes.

plish-nanamac.jpg

Now they’re all gone with her. I wished that my kids could be connected in a some way, to the great people who came before them. So I sent out a request to all family members to submit their favorite recipes and any interesting stories that went along with them. I got a nice response, 54 recipes from 28 people.

I transferred all the recipes from hand-written index cards, or copied and pasted from e-mails into a Quark layout. Like my fellow Southeastern MA native, Emeril Lagasse, I kicked it up several notches. I probably went overboard, with not one but two indices, a forward and a dedication, and of course drop shadows on every page “burned” with ShadowCaster. I figured out the imposition and printed 30 copies of the pages on my Epson Stylus Color 740i, which matched my Bondi Blue iMac. The Epson still cranks out pages today. Never fed it an OEM ink cart either. The inkjet gods must be smiling on me. I bound the books, using a cordless drill and hand-bent staples. Ouch! Talk about old world craftsmanship! Could have used one of these sweet book staplers. Then again, maybe I should’ve just gone to Kinko’s. But the whole point was to do it all myself on the cheap. The book came out quite nicely, if you forgive the slight shingle of the pages, and the fact that I didn’t laminate the covers, so they get a bit smudgy in the kitchen.

plish-cookbookcover.jpg

I undertook this project in the spring of 2000. Those were the days when the wooly mammoth known as Quark XPress 4, roamed the Earth and dominated the publishing world with a 90% market share. Yes, there was a new thing called InDesign, but I laughed at it. Version 1.0 would launch, sort of. Everything else I tried to do with it caused it to crash. I mocked it as Illustrator with multiple pages. When InDesign 2.0 came out I quickly changed my tune. But that’s a story for different day.

Thus for our current project we have the dusty old Quark 4.04 file and a couple of pieces of art. Nowadays, I pretty much bleed Adobe Red (Pantone 485). I don’t own or know the versions of Quark XPress after 4.11. This is a problem for a few reasons, not the least of which is, if I upgrade all my machines to Leopard, I’ll be without Classic support, and thus without Quark. There is a workaround: have a partition running Tiger/Classic, but that’s like having to keep a second stereo in the living room to play your 8-track tape collection. Perhaps it’s time to upgrade. I must at least check out, if not actually buy XPress 7. I’m looking forward to it, but with the same feeling when you meet up with an old friend you haven’t seen in years: a mix of curiosity and unease. What’s changed? Will we still get along? Does he still remember the secret handshake (keyboard shortcut)? For now, we’ll attempt the Extreme Cookbook Makeover with InDesign CS3, Syncro Soft’s Oxygen, and Dreamweaver.

One last a stupid question: Why is it when I type “Dreamweaver”, I hear the song from ’70s? “Ooohh, dreeeeem weavahhh, I believe we can reach the morning liiight.” Maybe it was Wayne’s World that resurrected those dying neurons. But I am suspicious there’s also a K-Tel Records commercial playing endlessly in some dark corner of my mind. That would explain a lot. Hopefully my curse will not now become yours. OK, this blog is over 3000 words old, let’s finally do stuff.

CookBook Makeover

Step 1: The Conversion Drop Ye Olde XPresse File onto InDesign CS3. On my vintage G4, 40 seconds goes by before the Open progress bar appears. Tempting to go play on the Web, but in the interest of science I will ignore my ADD instincts and wait it out. For about a minute we get the “Converting Regular Spreads” message. Hmmm. What exactly is a “Regular” spread? Does this mean there are “Irregular” spreads? “Atypical” spreads? “Highly Unusual” spreads? I’d hate to have InDesign tell me it was converting “Unprecedented” spreads. Then again, that seems a little exciting. I have seen this dialog box a hundred times, without ever really comprehending it. Do I care enough to Google? Apparently so, and here’s the answer: “Regular” spreads are document pages, the ones that actually get printed in the book, as opposed to “Master” spreads which hold master pages. Hoping for something more interesting weren’t you? So was I, but we move on.

Next up, Warnings. “Shadow attribute not supported for characters.” OK, I don’t remember ever shadowing characters, but I’ll take your word for it, InDesign. Go on. “Missing Fonts.” No surprise here. Almost all the files I ever open were created at another time in another place, so this is my default state of existence. I was born missing fonts, man. I could load the entire Adobe Font Folio, add everything from Linotype, ITC, and ImageClub and somehow I’d still be missing FranklinGothicDemiCaramelMacciato.

What I really need is a preference like this:
plish-pinkenough.png

Alas there’s not, so we dismiss, and we’re in. Let’s take a look around.

plish-cookbookconvert.gif

All the recipes have the title and chef in inline text frames, like they did in the XPress file. To InDesign, that content is out of the flow of the story. So merging content is one hurdle to clear before we export the XML. Everything seems styled; that’s good. Thanks, Y2K self. Hmmm, the ingredients are in 2 columns. That might need to be cleaned up before I apply tags. There are a few scraps of whitespace trash lurking here and there, but I think we can make a go of it.

Since we’re starting with a converted XPress file, I am reminded of a neat InDesign feature which may be of some use to people. Normally if you choose InDesign > About InDesign… you get the lovely InDesign Purple (DIC 2618 or 40c100m) Credits window, with the version number. But if you add the Command key, you get an info-packed window called Adobe InDesign Component Information.

plish-idcomponent.gif

All the supertechy details of your document’s existence are laid bare, including whether or not it was converted from Quark XPress or PageMaker, all the versions of InDesign (including the build number) that touched the file, whether it is crash-recovered, opened with missing plug-ins, etc. It’s like doing a DNA test on your InDesign file. This info has helped me in the past with troubleshooting, in terms of hunting down what was causing a file to crash, and where in fact a file came from.

Note that like in the screen grab, Write Log File is grayed out until you save the document. If open this window with no document open, it still works, you just get the top of the dialog filled out with info about InDesign’s state for troubleshooting application problems instead of document problems.

OK, that’s all for now. Next time we’ll do text clean-up and tagging.

Easter Eggs and Red Pills

As a family, we can never let Easter pass without watching our DVD of the funniest of all Peanuts specials, It’s The Easter Beagle Charlie Brown. For me, it’s worth watching just for Snoopy’s escalator antics and Woodstock’s insanely funky groove. My kids always scream and squirm and crack up at Marcy’s doomed attempts to cook Easter eggs. So, in honor of the dear confused Marcy, and with a nod to eegs.com and eggheaven.com, here’s my Top Five Software Easter Eggs.

5. Adobe Space Monkey. Photshop CS2.

plish-eeggsmonkey.jpg

Hold down cmd-option and choose About Photoshop. Who doesn’t love monkeys in space? Just one step in a tradition of tinkering with the About Photoshop screen.

It’s been replaced by Adobe Red Pill in CS3.

plish-eegredpill.jpg

4. Friendly Alien. InDesign 2-CS3.

plish-eeggsidalien.jpg

Define a Print Preset called “Friendly Alien”, choose Print, and with the Preset selected, click the preview window in the Print dialog box. The visual action is somewhat underwhelming, but the message was loud and clear: Adobe understood us Quark geeks. The “in” joke won us over and indulged our desire to tweak Quark for years of blowing us off.
3. Eyeballs/Mouse Clicks/Mordy’s Home Number. Adobe Illustrator 5-CS3.

plish-illeyeballs.jpg

Hold down cmd-option and choose the Show menu from the pop-up in the bottom of the document window. I love the fact that this one has been around unaltered, for 10 years. Those eyeballs kept me company during some lonely freelance gigs. Later on, I would “click race” co-workers to see who clicked the most in an 8-hour shift. Never tried calling Mordy, though.

2. The Alien. Quark XPress 4.

plish-eeggalien.jpg

Draw a box, press cmd-shift-option-k. Do it 5x in a row to get the big Daniel Johnston-looking bazooka creature.

plish-eeggalien2.jpg

It was the first publishing software Easter Egg I ever knew of, and showing it to unsuspecting co-workers earned me large amounts of DTP geek cred.
1. The Grandaddy of ‘em all. On it’s 30th anniversary, I give you, The Secret Room. Atari Adventure.

plish-eeggadventure.jpg

Spread by word of mouth through the legions of 2600 fanatics, this one prompted the same reaction in 10 year olds across the nation, “Awesome!” We had no idea who this mysterious Warren Robinett was, but we were sure he was incredibly cool to us. The search for hidden truth was on. Red Pill, indeed.