Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TOC based on style - having a formatting problem

Status
Not open for further replies.

KatyWhite

Technical User
Jan 15, 2004
16
US
Hello,

I am generating a TOC based on a style in my document. This is the field code I am using to generate the TOC.

{TOC \t "CAPTION" \w \z \n \x* MERGEFORMAT}

I want to generate the TOC based on the style "CAPTION", I don't want to show the page numbers, I want to retain the tabs. For some reason, I keep getting a return after each caption number. How can I get rid of this? My TOC looks like this


Table 1.1
Study Populations and Patient Disposition
Table 1.2
Baseline Patient Demographics
Safety Population
Table 1.3
Cancer Information and Prior Anti-Tumor Therapies
Safety Population
Table 1.4
Exposure to Study Medication

but I want it to look like this

Table 1.1 Study Populations and Patient Disposition
Table 1.2 Baseline Patient Demographics Safety
Population
Table 1.3 Cancer Information and Prior Anti-Tumor
Therapies Safety Population
Table 1.4 Exposure to Study Medication

The captions are set to look like this

Table 1.1
Study Populations and Patient Disposition

The return gets stuck at teh end of the table numbers regardless of if I have a tab there or a return.

Help! How can I get rid of the extra returns?

 
One reason could be that the spaces between the words in Study Populations and Patient Disposition are 'hard' spaces and not normal spaces. This would make the whole sentence be considered as one word and thus you get a line break just before.
This is a little unlikely to occur on all the headings unless they are imported from an external source (are they?).
Are the margins correct for this style? are you using narrow columns?


_______________________________________
There are three different kinds of people:
Those who can count, and those who cannot.

Eman_2005
Technical Communicator
 
Not sure what you mean by hard spaces ... there are no columns in the captions.

All this document contains is tables with captions; the captions are above the tables. The TOC is based on the captions.

If there is any other info that I can provide please let me know. This is driving me crazy!
 
When you hit Ctrl_Shift and Space you create what looks like a space but treated like any other character. It's actually called nonbreaking space.

You can make a search/Replace this kind of space by a normal space.

What happens if you save a copy of the document and remove the tables and keep the captions alone?

You did not answer my earlier question, are the captions imported from and external source (lotus, word perfect or even a different word document?



_______________________________________
There are three different kinds of people:
Those who can count, and those who cannot.

Eman_2005
Technical Communicator
 
This is an existing document that I am updating to generate a TOC automatically rather than manually as has been done. I have tried to redefine the existing table titles as captions (for now they are 'normal') and I have tried recreating test captions from new. I get the same thing.

The titles all could mostly fit on a single line. The pages are standard 8 1/2x 11 with a 1 inch margin all around. I have hanging tabs set in the TOC to 1.5 so that if the caption does go more than one line the words will wrap.
 
It's an existing document, so you don't know what editing has taken place before you and where the text came from originally. Did you try the search-replace?
Are you sure the caption line is not inside a table cell with invisible borders? Try to select it and Table_Convert to Text.
How did you create the style? Did you select formatted text and created new style based on the selection?
What kind of style is it?
Paragraph style? Character style? Table style?
How did you deal with the numbering?

_______________________________________
There are three different kinds of people:
Those who can count, and those who cannot.

Eman_2005
Technical Communicator
 
The numbering is going to be done manually by typing them in - the statisticians have very specific needs and it is just easier at this point to let them do it this way.

I modified the existing caption style to suit my needs.

The captions are just text, there are not part of the table.

I have tried to format existing table captions plus I created a few 'dummy' captions from scratch to see if they behaved differently. They did not.

Thanks for trying to help me figure this out - I appreciate it!
 
The /x preserves newline characters. Perhaps if you remove that it will work.
 
That's right, BenRowe.
I was thinking the cause might be in the style itself and so was trying to find the reason there.
Good point. I hope it's the right solution.

_______________________________________
There are three different kinds of people:
Those who can count, and those who cannot.

Eman_2005
Technical Communicator
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top