INCLUDETEXT field adding extra carriage return before and after

P

petersk

Is there any way to eliminate the extra paragraph mark being inserted in MS
Word 2003 before and after the field {INCLUDETEXT} ?

Kurt
 
P

petersk

Actually, this is happening before even my field {TOC \o "1-2" \h \z \u} as
well. WHAT is the deal? It's REALLY messing up formatting!
 
S

Stefan Blom

But wouldn't such a paragraph break disappear as soon as you updated the
field?
 
S

Suzanne S. Barnhill

Well, the one that is at the end of the TOC field code (which appears to be
outside the TOC but is actually inside it) was what was in my mind, but I
suppose you're right.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
P

petersk

Seems it had something to do with a text box.

I had to delete everything on the toc page between the two section breaks to
get the carriage return to go away.
THAT ALL BEING SAID:
What I need to do is this, and it seems impossible:
I have three tables: TOC, List of Tables, and List of Figures. The TOC
and List of Figures are more than 1 page. Therefore, I'm required to have
the header:
"Item <tab>page"
at the top of each page.
Of course the first page, must have above that "Table of Contents" or "List
of Figures" respectively.

Is there an easy way to do that?

I'm currently using sections and putting the TITLE of TOC or LOF in a text
box, since "different first page" doesn't seem to work for the header for
sections INSIDE a document (don't know why).

Any ideas?
Kurt
 
P

petersk

OK, but if I delete the text box, press F9 the extra paragraph mark goes away!
What's going on here?
Kurt
 
S

Suzanne S. Barnhill

A text box must be anchored to a text paragraph; that paragraph cannot be
inside a TOC field; that's why Word is insisting on inserting an empty
paragraph.

A better approach: put each TOC in a separate section with "Different first
page" enabled. Put the "Table of Contents" or "List of Figures" heading and
your "Item<tab>page" heading in ordinary text paragraphs before the TOC
field and leave the First Page Header empty. In the Header put your running
head ("Table of Contents" or "List of Figures") and your other heading.

FWIW, I don't think you need the "Item<tab>page" heading at all. Most people
understand how TOCs work and that the number is a page number.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
P

petersk

Thanks, that's what I ended up doing, but I couldn't really do that in a
separate document using INCLUDETEXT (for the TOC document) because the
different first page didn't seem to allow me to bring that in to the main
document. So... I had to do the TOCs in the MAIN document instead of a
group of little ones.

Now, I'm wondering if the header for the Figures will show up in the TOC.

As far as your FWIW statement, unfortunately, logic rarely comes into place
when you're (I'm) dealing with authorative editors.
Kurt
 
P

Peter Jamieson

Although the rest of this conversation appears to be about TOC fields,
as far as INCLUDETEXT fields go, whether they insert "extra" paragraph
marks depends on
a. what is in the thing you are inserting
b. what type of file you are inserting

For (a), if you are inserting a complete Word file, you need to know
that a Word document always has a final paragraph/section mark, and that
is inserted. e.g. suppose you have a document called myfile.doc that
contains single paragraph as follows:

Hello world!

then a document containing

aaa{ INCLUDETEXT "myfile.doc" }zzz

will show

aaaHello world!
zzz

not

aaaHello world!zzz

You can work around that problem by inserting a bookmark, e.g. mybm, in
myfile.doc that covers all the text except the final paragraph mark, and
referencing that in the includetext field, e.g.

aaa{ INCLUDETEXT "myfile.doc" mybm }zzz

For (b), if you include text from (say) a plain text file, you will also
always get a paragraph mark at the end of the field result, even if the
text file has no CR or CRLF at the end. AFAIK you cannot avoid that
using a bookmark (i.e. as above) because plain text fiels don't have
bookmarks.

Beyond that (doubt if many people need to know stuff beyond that,
but...) what happens depends partly on whether Word uses a built-in text
converter (the sort it uses to open "native" Word formats such as Word
..doc, .rtf, possibly .txt and certainly .htm) or an external text
converter, e.g. the sort it uses to open WordPerfect or Works files.
With internal converters, it is still possible to INCLUDETEXT without
inserting a paragraph mark if the source format supports bookmarks. For
example, you can define a bookmark in HTML using the <a> element

(e.g.

<a name="mybm">Hello world!</a>

and that bookmark can be referenced in an INCLUDETEXT field the same way
as a bookmark in a .doc

With external converters, Word inserts at least one additional paragraph
mark whatever you do. That is a little strange because in Word 2003,
converters have to supply Word with a stream of RTF, i.e. the bookmarks
look exactly the same as they do in a .rtf file, but Word inserts an
extra paragraph mark anyway.

Peter Jamieson

http://tips.pjmsn.me.uk
 
P

petersk

The header trick seemed to work. Just got to get the distance from the top
just right now. That vertical ruler is pretty useless other than eyeballing
things. I wish there was a way to have guidelines from the ruler to show
just how far you are from the paper's (or margin's) edge.
Kurt
 
P

petersk

I'm not sure what you mean by that Suzanne. Have you read my explanation
that my editor requires the heading on each page?
Kurt
 
S

Suzanne S. Barnhill

Ah, if the editor requires it, then I suppose it must be done. You might,
however, point out that it's rather an insult to the reader.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
P

petersk

Thanks for the help all. I used Suzanne's suggestion and no longer import
(using INCLUDETEXT) the list of figures, table of contents, or list of tables
files. I create them in the "main" document. Although not as elegant, it's
working well.

Have a problem to solve with the figures somehow not keeping their spacing,
but that can be handled by going to each one and fixing them. Otherwise,
things are almost done. I would have expected a little more from MS Word
with it being in it's tenth or so revision, but oh well, I guess that's why
people still use Latex.

Kurt
 

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