Archive for April, 2008

The fulllll pulllll!

Sunday, April 20th, 2008

I must ‘fess up. Despite the <tongue in cheek> air of culture and sophistication</tongue in cheek> I try to exude, I’m a petrol head.

This afternoon friends are coming around to watch the V8 supercars (Oz’s premier sedan racing class). We’ll have a meal (Chris’s putting the final touches on it now), a few drinks, cheer the Holdens, and boo the Fords. We’ll have a good afternoon as always.

But yesterday a mate and I went to the tractor pulls. It’s a great day, and it’s what motor sport should be. You get to stand a few metres from all the action. Just a light courtesy fence that a five year could cross without difficulty between you and the action. The noise, the smell of high octane fuel, the excitment of big block Chev’s running at the limit while travelling at a snail’s pace right in front of you….

It helps a rural community, struggling with the drought. We come, we see, we eat, we drink. We pay our admission fee. But it’s not a rip-off. A full day’s entertainment, some Jim Beam, steak sandwiches (with real steak) and I didn’t spend over fifty buck! THAT’s value.

The commentator walks up and down between the tractors, wisecracking in a way that everyone wants to but can’t, becasue they want to be politically correct. I mean, the whole concept of a pulling competition is open to the lowest form of puns, but this guy knows where the line is. He crossed it 5 minutes after he started so he has you in stitches for the rest of the day. And, he knows his stuff. Like why the 327 sounds different to the 350 Chev. Why Chrysler (Mopar) gave up motor sport dominance overnight. All the things petrol heads love and everyone else says “So what?”.

And then there’s the Merlins. And sisters to the Merlin, the Allison and the Meteor. These are motors from the 1930s and 40s. They put them in the front of Spitfires and other legendary fighters and bombers. The meteor was the same thing driving tanks, or side by side in patrol boats (remember McHale’s Navy?). Over 1700 cubic inches of v12. We sometimes go to the aviation museum’s engine runs, just to haer a Merlin idling…

There are tractors with these beats as well. That’s what I go for. They sound magnificent. But its not only the sound, its the vibration. You can feel these beasts as they try to drag the sled for the fullll pullll….

…When’s the next one?

Running Headers and Footers

Saturday, April 12th, 2008

 Flare masterpages have another trick up their sleeve – running headers and footers.

Flare allows you to nominate a style in a special type of variable. The first occurrence of text formatted with the nominated style on each page can be substituted for the variable. If the style doesn’t occur on the page, Flare will use the previous value. Normally you would use a heading style, but you can use whatever you like. You can even create a style specially for the running header and footer.

  the running header as it appears in Microsoft Word  

The screen grab shows a running header in Microsoft Word. It’s the standard Flare printed masterpage, except I’ve added the special variable.

So, you’ve seen it and now you want to add running headers to your project.

The first step is adding the special variable set. Click Project -> Add Variable Set… The Add Variable Set dialog opens. Make sure you have Factory Templates selected in the left window and select Running HF in the right. Give the variable set a name, something like “Running HFs” and click Add.

The standard running header and footer variable set is added to the project – you can see it in the Project Organizer Variables folder. The basic running HF set is for heading styles 1 to 6 (h1 to h6).

You might want to use something other than a heading style for the header. You might want to identify a catchy phrase from the content and use that instead. Make sure the styles tab is showing – if it isn’t press [F12]. Select the text you want to use in your running header and footer and apply one of the styles from the style window. I’m going to use anything styled as cite for my running headers. (If you are using a heading style for your running header, just apply the heading style.)

If you are using something other than h1 to h6 you’ll have to add the special variable. Double click the runningHF variable set in the Project Organizer Variables folder. You can either modify one of the existing variables or create a new one. Creating a new one seems better to me. Click the New Item button, add a name and specify the style you want to use in the format <$paratext[style]>, substitute the style name in the square brackets. You can look at how Madcap have specified the others for help.

Once you’ve set up the variables (and applied the styles throughout the project) you can modify the masterpage to add the variable.

Open the masterpage and place the cursor where you want the running header (or footer) to appear. Click Insert -> Variable... The Insert Variable dialog opens. Select the running header and footer variable set you added earlier in the left window then select the variable for the style you’re using to choose the running header. Click OK.

  the running header variable inserted into the masterpage  

Now when you create the printed output version of your project you’ll see running headers (or footers, if that’s where you inserted the variable).

Flare Paragraph Content

Wednesday, April 2nd, 2008

A recent post to the Flare user’s forum raised the issue of paragraph content added automatically.

 The original post was asking about the content selector and if it was possible to use it to add text to the beginning of a paragraph. In this case the paragrah should start with “Note: “.

CSS 2 does allow you to do this. You need to use the :before (and maybe :after) pseudo elements:

p.note:before {
content: "Note: ";
}

p.note:after {
content: " [end note];
}

CSS will let you number the notes as well.

You can use an explicit counter, in this case called note:

p.note:before{
content: "Note " counter(note) " : ";
}

You have to set the increment property for the counter, else it will show the same value every time:

p.note{
counter-increment: note;
}

And, if you want to reset the counter every chapter (and you use H1 for your chapter headings):

H1{
counter-rest: note;
}

This approach is technically correct and has the benefit of being a stylesheet solution – you could change “Note: ” to “notes: ” in your stylesheet to have all occurences changed. Unfortunately the content and counter properties aren’t supported by Internet Explorer (at least IE up to version 7).

Flare allows you to create paragraphs with preinserted text and numbers. And, it works when displayed in IE. Flare adds the text and the number as formatted text during the build, rather than relying on the browser to do it at viewing.

This stylesheet setting in Flare creates a comment – dark green text on a light green background, surrounded by a dashed red border:

comment.JPG

What about the stylesheet? This is what Flare adds:

p.comment
{
 font-weight: bold;
 color: #008000;
 border: dashed 2px;
 border-color: #ff0000;
 background-color: #90ee90;
 mc-auto-number-format: ‘R:COMMENT {Gn+}: ‘;
 mc-language: none;
}

The smoke and mirrors come from the property mc-auto-number-format. R:COMMENT {Gn+}:

The R is the series (or specific counter). I could have used something else, but in this case R for remark (the original text added to the paragraph).

Comment is the text added to the paragraph. As I said, originally I added Rem x:, but decided Comment x: read better.

Lastly we have a global counter increment command {Gn+}. If I wanted a chapter based counter, I could have used {n+}. The plus sign means the counter is incremented, to display the value without incrementing use {n}.

If I used a chapter based numbering system I’d want something like R:COMMENT {chapnum}.{n+}: . That would give me COMMENT X.Y: , where X is the chapter number and Y the comment number, resetting with each chapter.

You could use a numbered list as well, but if you want to add some default text and if the elements aren’t close in the topic, you might find it harder than getting your head around auto numbering.