Hi Bill:
Yeah, I know you did. I didn't think that would be needed. Until I saw his
document
That was one very obscure problem. I ended up round-tripping to XML to fix
the paragraphs.
I see you elected to retain his section breaks and fix them. I suggested to
him that he could remove the breaks, then use StyleRef to do the headings,
and told him how.
I sent Michael a private email that said:
Hi Michael:
Well, wasn't that exciting! We should all mutter our abject apologies to
you for yelling at you: this was one of the most obscure problems I have
ever seen, and I have never seen it before in my 30 years experience!! I
bet Microsoft would not have found that one either, not without being able
to see your document.
The problem was that your paragraph marks were not paragraph marks!
So Bill was quite correct when he suggested that you would have to save out
to plain text to cure the problem, that's very similar to what I did.
The reason for the peculiar style and selection behaviour was that somehow,
your paragraph ends had been replaced with a character that looks like a
paragraph mark, but wasn't. It was a pilcrow. It was behaving like a
line-end rather than an end-paragraph.
In Word, a paragraph mark is a container that holds some 250 pieces of
information about the contents of the paragraph, only one piece of which is
the text. The other pieces of information control the formatting of the
paragraph.
When you set a first-line indent on your style, Word applied that,
correctly, to the entire document. However, most of the document was a
single paragraph, so the indent appeared only on the first page. The other
things that looked like paragraphs are not, they have no formatting
containers, so they could not accept the property change to indent the first
line.
You can see this for yourself by going to the old document and placing your
cursor at the end of a paragraph. Hit Return (the Enter key...)
NOW you have a new paragraph. If you click before the new paragraph, then
triple-click the text, Word highlights what it considers the paragraph to
be. Now try that below where you inserted the paragraph mark. As you can
see, the highlight stretches several pages. It's all one single paragraph!!
How you managed to get the document into this condition I have no idea. To
fix it, I saved it out to XML (In Word, Save As Web Page, choose Save entire
document into HTML).
I then set Word>Preferences>Edit>Confirm Conversions and forced the HTML
file open as a text file, so I could edit the code directly. I then deleted
the entire STYLE element from the top of the document (gets rid of any
corrupt styles that were in the document). Then I used Word's Find/Replace
facility to replace the optional blank lines with ordinary paragraph ends.
Then I searched for the Pilcrow character and replaced each one with a
space.
Then I re-opened the document as an HTML file, and re-saved it as a Word
document.
People who miss WordPerfect's Reveal Codes facility can use Save As Web Page
in Word to render a document as human-readable code which they can then edit
by hand in this manner.
Once I had done this, I had your entire document correctly formatted with
the Body Text paragraph style, preserving your italic and bold formatting.
I then altered the Body Text style to have a half-inch indent on the first
line, a two cm left margin, and ten points of space below. The space below
sets paragraphs apart and makes them easier to see.
Headers
Your other problem was that you filled the document with section breaks,
using one each time you wanted to change the running header. This document
needs only one section break, if you set alternating headers and footers and
use the StyleRef field to replicate the headers.
I've done the first few for you, to show you how it's done. You can do the
rest.
First, I have used Find/Replace to search for ^b and replace it with ^p. In
the Find What box, the ^b (think of it as Control + b) stands for "Any
section break". The ^p in the replace with box stands for "a paragraph
container". This removes the section breaks you were having trouble with.
Next, I formatted the remaining section break for double-sided printing,
using Format>Document. I first set Mirror Margins to ON. Then I set 2.5 cm
margins top, bottom, and outside. I set the inside margin to 3.5 cm,
allowing 1 cm for the binding along the inside of the sheet (1 cm or 0.4
inches is the industry's normal space for the binding for most binding
processes).
Then I copied your first heading into the text and set it in Heading 1
style. I formatted Heading 1 style with 12 points Arial Bold, but you can
use anything you like.
Next I used View>Header and Footer to enter the right header and inserted a
StyleRef field. The StyleRef field copies the text of the previous
paragraph set with the specified style into the header. I set it to
replicate Heading 1 text into the header.
When inserting the field, I unset the "Preserve Formatting" checkbox so the
formatting in the header is controlled by the Header style (Word
automatically formats the Header with Header style). I formatted the Header
style to be right-aligned.
I copied what I had placed and hit Next on the Header toolbar to go to the
Left header. I pasted there to copy the StyleRef field in, since I will sue
the same text there too. I then revealed the Formatting Palette and used it
to create a new style called Header Left. Since I was clicked in a Header
style at the time, the new style is automatically based on the Header Style
and inherits all of its properties. The only change I made was to set
Header Left to be Left aligned (placing the content of the header on the
outside of the page where we want it).
Then I hit the Header/Footer button on the toolbar to swap to the footers
and inserted the Page X of Y AutoText. Again I formatted the Footer style
to be right-aligned, went Next to the left footer, and created a Footer Left
style from it to left-align the page number to the outside of the left
pages.
You can now leave the headers and footers alone: they will automatically
maintain themselves for the rest of the document, so I closed the
Header/Footer view.
Next, I went back to your old document, and copied your first Header. I
flipped back to the new document and used Find to locate the section start.
Since I replaced the section breaks with a blank paragraph, I can find the
correct spot immediately by searching for ^p^p (two paragraph marks, the
second one containing no text).
I paste your Header in to the main text, not the header, at that point, and
format it with the Heading 1 style. As soon as I do that, its text appears
in the running headers for the remainder of the document. You do not need
to place the text in the header, the StyleRef field does that automatically
for you provided you get the heading in the text formatted with Heading 1
and sitting at the place where you want the new header to start.
Then I co and copy your next header, paste it where the section break used
to be, and format it too with Heading 1. Each time I do that, the text of
the new header replaces the text in the running header. So the running
headers will now show the text of each heading one on all of the pages down
the book until the next Heading 1 style appears.
Simple! Automatically updating headers
Now what you need you to do is to copy the rest of your headers into the new
document at the correct points, and format them with the Heading 1 style.
If you want, you can edit the headings: as you do, the headers and footers
will update.
So there you go: all done for you. These are advanced techniques used by
book authors such as Bill and myself on long documents. Here's a golden
rule of Word usage you may care to ponder: "In Word, If you're typing it,
you're probably stuffing it up!!" What that means is that Word has a raft
of professional-level power tools built in. Often, they're fairly well
buried in the help, you have to look around for them. I am currently
campaigning with Microsoft to get the Help improved so that new users can
readily find these power tools. The ones you and I need for authoring books
are not the same set of tools that normal users use for small documents.
Hope this helps
--
John McGhie <
[email protected]>
Consultant Technical Writer
Sydney, Australia +61 4 1209 1410
For the record, I offered to format the whole thing for him about a week ago.
Panther 10.3.6
Office 2004
Windows XP Pro SP2
Office 2003
--
Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.
John McGhie <
[email protected]>
Consultant Technical Writer
Sydney, Australia +61 4 1209 1410