Monday, March 30, 2009

Formatting Cross-References in InDesign

For years I used FrameMaker to layout my books so that I could take advantage of its robust cross-referencing. I was so dependent on its power that I stuck with it as it crashed continously and made me jump through hoops to get images and color the way I wanted them. But when I got my Intel MacBook, I had to say goodbye... Frame wouldn't run on Classic and Adobe decided not to upgrade Frame for OSX. So, I went back to InDesign and marveled at how my fingers still remembered so many keyboard shortcuts from my PageMaker days.

But if you've seen any of my books since then, you'll know that I have really had to tone down my penchant for copious cross-referencing. No longer! Though I tend not to upgrade unless I have to, InDesign's new cross-references had me chomping at the bit. And I have not been disappointed.

InDesign not only lets you create cross-references but gives you a fair bit of control over how to format them. Today I completely automated the extra bits section of my upcoming 2nd edition of my Blogger book.

The title of each extra bits section comes from the corresponding header earlier in the chapter, along with a page number, which in turn has its own character style.

InDesign offers the "Character Style for Cross-Reference" option for applying a character style to the entire cross reference, but you have to check the help files to see how to add a character style to only a portion of the cross-reference. Basically, you add <cs name="style name"> before the part of the cross-reference that should be formatted with the style name style, and </cs> after it.

What I discovered though, and the reason I'm writing this instead of just pointing you to the documentation, is that you need the "Character Style for Cross Reference" option even when you're not applying a character style to the whole cross-reference.

In my example, I want to grab the header name, append "p." and then grab the page number. I want the header to be styled with the "extra bits header" paragraph style and the page number to also be styled with the "extra bits page number" character style.

So, I start out with <fullPara /> <cs name="extra bit page number"> p. <pageNum /></cs>, and don't check "Character Style for Cross Reference". But curiously, it applies the extra bit page number style to the whole cross-reference and not just the bit it surrounds.

The solution is to choose "Character Style for Cross References" and then choose [None] in the pop-up menu. Now the header uses just the paragraph style and the p. and the page number use the character style as well.

Hmm. Now I'm getting intermittent results. That is, sometimes I need to check the "Character Style for Cross-References" option and sometimes not. Well, if it helps to keep part of the cross-reference in the base style, you know you heard it here first :)

Tuesday, March 24, 2009

Ada Lovelace Day, or On the Shoulders of Giantesses

Suw Charman-Anderson put out a challenge to her readers to honor Ada Lovelace, the first computer programmer (ever!) by writing blog posts on March 24 about women in technology whom they admire. So, Happy Ada Lovelace Day!

Although there are many women in technology who I admire, among them Dori Smith, Molly Holzschlag, Robin Williams, and Lynda Weinman, there is one who was a particular inspiration to me: Laura Lemay.

I don't know Laura personally, but when I was just learning HTML, she had three or four books already out on the topic. And though I found the information in her books useful, among other sources, what really inspired me was her attitude. She was a really smart programmer, and wasn't shy to tell you about it. I loved that she was a woman. If she could do it, I could do it.

Thanks, Laura!

And now she has chickens like me!

My Books