h1

Word: Getting a two-line heading onto one line in the Table of Contents

February 24, 2011

Larry had a problem. He had a heading on two lines, and he wanted the heading to display on a single line in the Table of Contents (TOC).

Here’s an example of what he had; both lines are styled with Heading 1:

Because each line is in a separate paragraph, Word treats them as two separate Heading 1s when it creates the automatic TOC:

What Larry wanted was for the two lines to remain in the body of the document but display on one line in the TOC.

Update September 2020: Make sure Track Changes is OFF.

The simplest solution to this is to use a ‘soft return’ (Shift+Enter) between the lines in the body of the document, instead of Enter. It looks like this (with formatting marks showing):

And when you update the TOC, you select Update entire table:

Your TOC now displays the text on one line:

Personally, I don’t like how the title butts up against the section label, so I added five spaces after ‘Section 3’ (I could have used a Tab):

This extra space makes the TOC more readable, in my opinion:

See also: A method to use Style Separator to show what you want to see in a TOC: https://office-watch.com/2021/selecting-heading-words-for-a-table-of-contents/

[Links last checked July 2021]

32 comments

  1. That soft enter idea saved me a lot of time. Thanks a lot.


  2. Thanks. That really helped me out!!


  3. This totally saved my bacon in regards to my master’s thesis. No one seemed to be able to help me. What an elegant solution to a difficult problem.


  4. This solves the problem but creates another one. The second heading assumes the format of the first heading. The text has the first heading left justified and the second heading centered. Using the soft return makes both left justified or centered.


  5. Hi Jeff

    Yes. The soft return means that both ‘lines’ are now treated as one paragraph — this is by design.Therefore, they take on the formatting of a single paragraph. You can decide to have left OR center (or right) justified, but you can’t have both with a soft return, as far as I know.

    –Rhonda


  6. If you then press Ctrl Tab on the second line, it will act like a normal Tab but your Table of Contents will still be on the same line
    Alison


  7. Thank you :)


  8. Could not find this in word, in the tutorials, anywhere. You said it and easily and had an easy fix. Thanks


  9. Hi, I did what you said and now have one-line headings in my TOC. However, this doesn’t work when inserting the heading in a header/footer; it stays on 2 lines. What must I do to force the header to consider the heading as 1 line? Thank you in advance.


  10. Hi Cherinam

    I’m not sure if you’re using field codes in your header, but if you’re not, why not just manually remove the paragraph mark between the two lines and replace it with a space or two (or a tab)?

    –Rhonda


  11. Dang, this doesn’t work for me. It shows the soft return shift+enter when the formatting is turned on, but it doesn’t adjust the Table of Contents. Any other ideas?


  12. doesn’t work for me either :-(


  13. oh wait! I realized my problem. Track changes need to be off for this to work…


  14. This was pretty helpful to me. How then can I have the TOC show a colon (:) between the section and title for example as such;

    SECTION: PROPOSAL EVALUATION CRITERIA


  15. Hi Will

    In your example, it doesn’t look like you’re using outline numbering, as my authors do. If that’s the case, then you’d have to manually type ‘Section: ‘ at the beginning of each Heading 1.

    If you *are* using outline numbering, then you have to add the word ‘Section’ and the colon as part of the multilevel numbering scheme.

    –Rhonda


  16. This was an awesome post! Totally saved my booty… and my new book!


  17. Thank you for this information. It helped me a lot.


  18. wow thanks


  19. This works if there are two adjacent fields on separate lines. I want the first part of line one, concatenated with line 2. But there is additional data on line one that I do not want. And actually the field are cells in a table.


  20. The problem with this method, is it modifies the style reference for that heading for things like Headers and Footers, which will also have that soft return. This isn’t really a solution for having two headings on one line in a TOC. Only a work-around.


  21. Hi, I did what you said and now have one-line headings in my TOC. However, this doesn’t work when inserting the heading in a header/footer; it stays on 2 lines. What must I do to force the header to consider the heading as 1 line?
    Your answer to this post is as:
    I’m not sure if you’re using field codes in your header, but if you’re not, why not just manually remove the paragraph mark between the two lines and replace it with a space or two (or a tab)?
    My Points:
    I am using field codes for headers, But the problem still exists, and I could not get the second part of your answer.Can you help to figure out this?
    Thank you in advance.


  22. Hi Saaim

    I just tested the headings in a StyleRef field in the headers, and it doesn’t seem to work there at all.

    First I removed the soft line break in the header but that didn’t put the two lines onto one. Then I put the cursor at the beginning of line 2 and pressed the backspace key. That got rid of the soft line break and put line 2 onto line 1. I thought I had it!

    But as soon as I moved out of the header area, Word automatically switched back to two lines. I checked and tried all the likely options for the StyleRef field, but none solved this issue.

    I don’t know if there’s a solution to this. Sorry.

    –Rhonda


  23. Hi
    I have had the same problem with the header keeping the soft-return but as a work-around I went into my header and formatted the soft-return as a fontsize of “1” and it improved the layout immensely.

    ~Karen


  24. Thank you so much Sir, It was really helpfull


  25. I used this method first to create the double line, and then when needing to align the text to be centered, I used the ruler guides to move the text into place. Each line will get it’s own ruler guides so you can adjust the text position accordingly while keeping the TOC heading entry as one line.


  26. This has been EXTREMELY helpful and beneficial. We were at our wits end trying to resolve this problem. Thanks to all of you.


  27. Thanks to Jude for figuring out that all this had to be done with the TRACK CHANGES option turned off. I am an editor and always use TRACK CHANGES when I’m working. I struggled and struggled with this “2 lines of text on 1 line in the Table of Contents” issue until I finally came across Jude’s post.

    Again, THANK YOU.


  28. Got the same problem in Google Document.


  29. how do you get say an arrow instead of space
    between the Section 3 and Basic Proposal


  30. Hi Ma

    You could add an arrow symbol after the heading (in the main part of the doc, not the TOC). However, while that adds an arrow in the updated TOC, you’ll also now have an arrow in the main heading and that may not be what you want. I don’t have any other suggestions.

    –Rhonda


  31. I have the same problem in Google Docs like “ems” previously. Is there another fix for Docs?



Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.