confused about word templates

M

mack

Thank you Bill. I haven't saved it as text. I realise that this may be
moot, but when you say my text was corrupted, is this 'normal'/ or
should I rush out and get virus software and go over my computer? I
thought macs were relatively virus-free (probably nothing to do with it
at all, I know) I know it's most likely impossible to say, but just
what the 'corruption' was has got me wondering. Possibly from a speech
recognition program which I've since uninstalled. By the way, after
reading the post about the third-party text-editor with the p-list
problems, I made myself promise not to buy ANY more software, once I've
got Word going. As it is, Word is the only other thing on my system.
 
B

Bill Weylock

Nothing to do with virus corruption, as far as I know and would expect.

It has something to do with the way you brought it in from TextEdit. When I
searched for ^p to see if replacing the paragraph markers would make allow
the paragraphs to behave more normally, I discovered that word was treating
them as if they were spaces. I didn¹t mean to alarm you.

Files get corrupted all the time. It¹s just part of working with computers.
Every once in a while one goes wonky.

Don¹t worry about a thing.


Best,


- Bill


Thank you Bill. I haven't saved it as text. I realise that this may be
moot, but when you say my text was corrupted, is this 'normal'/ or
should I rush out and get virus software and go over my computer? I
thought macs were relatively virus-free (probably nothing to do with it
at all, I know) I know it's most likely impossible to say, but just
what the 'corruption' was has got me wondering. Possibly from a speech
recognition program which I've since uninstalled. By the way, after
reading the post about the third-party text-editor with the p-list
problems, I made myself promise not to buy ANY more software, once I've
got Word going. As it is, Word is the only other thing on my system.




Panther 10.3.6
Office 2004
Windows XP Pro SP2
Office 2003
 
J

John McGhie

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
 
J

John McGhie

Yep! Bill spotted it... I guess when Mack imported from TextEdit, he did
something that converted the paragraph ends to line-enders, probably Unix
style line ends.

While this makes text appear correct on the screen, it removes the paragraph
property container, so there is nothing to hold paragraph formatting, and as
Bill points out, you then CANNOT format the paragraph -- because there is
now no paragraph to format.

Cheers

And the cash prize is awarded to Bill! :)

Daiya

--

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
 
J

John McGhie

Hi Bill:

I didn't go through "a lot of hell" :) Once I spotted the problem (the
same way you did...) I just fired a macro to round-trip it. My Explanation
of how to do it manually is quite laborious. In practice it takes about 30
seconds.

I didn't look at your fixed version because I was not sure "how" you fixed
it. I elected to work with the original so I knew that any problems caused
were my fault, not yours :) By working in XML and selectively clobbering
tags using Search/Replace, I can produce very specific alterations to a
document while keeping all of the wanted formatting. I was not sure your
method had preserved his direct formatting, of which there was rather a lot.

Cheers


Wild stuff.

I didn¹t know about the StyleRef field. That¹s slick, although I doubt I¹ll
ever need it. Obviously a great way to do his stuff. I also now understand why
he had Heading styles in the headers. The two terms are probably confusing at
first.

What I do not understand is why you went through so much hell to fix his text
when I had already fixed it. He didn¹t send you the file I had revised? What a
shame. The only thing left to do was maybe set margins and add the headings
and header reference.

Oh well.

This was sort of fun. Just a little disconcerted that my work was apparently
left by the side of the road.






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
 
J

John McGhie

Yeah, Bill:

I was pretty sure you would have preserved the formatting. I was not
wanting to denigrate your efforts.

I am simply a creature of habit: without thinking too much about it, I
elected to work with his original, largely because I did not want to spend
the time reading 166 pages of fairly dense text and comparing the two
versions :)

You would have made a different call. Your mileage *does* vary -- I am not
saying either method is preferable.

Cheers

Well it did.

I would have looked at yours.

--

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
 
M

mack

Hi,
This may be a good moment th say 'thanks' to everyone- Daiya, Bill,
and John. Without Bill's and John's help, I very much doubt that I
would have even a snowball's chance of fixing it. I cannot thank you
enough.Bill- I don't know too much about the technical side of the
issue, but all the very kind and very patient help you gave me will
always mean a lot to me. I must say that I have to rest the elbows and
lower back a while before doing anything much else. Hope you
understand. Thanks once again.
 
J

John McGhie

I am sorry, Bill, I acted without thinking. Please forgive..


Thanks. That does help a bit.

Still sucks to done that work for nothing in the end.

He was sitting there with a fully resolved, cleaned document, formatted in
every respect except chapter headings.







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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top