Centering Only One Line of Text

When I try to center a line of text, the whole page, sometimes the whole document gets centered as well.
The advice listed online about how to select only one line and format it does not work. There are several methods listed, None of them work.

Please upload your ODF type sample file here. (Then we will able to examine how you formatted the document.)

You can’t centre a single line because “lines” don’t exist per se: they are created on the fly to accommodate your text volume. The basic formatting unit in Writer is a paragraph. Alignment plays at paragraph level. Consequently, your “line” must be a paragraph on its own.

2 Likes

And even lines created by hard line breaks overriding automatic line wrapping do not support paragraph properties.

I’m not seeing how to upload the file.

When I look at hidden marks, the lines do indicate they are separate paragraphs, and yet they all get centered.
If I don’t select any text, and just click the center alignment button, the ENTIRE document gets centered.

Attach your file (or a reduced version of it) for analysis.

How do I attach file?

Drag your file over the comment entry box or click on the upload icon (7th icon from left; looking like an outbox basket with an up arrow) and choose the file from the dialog.

edit your Question and use the ⇑ -upload-button exactly in the middle of the toolbox.

20260830_16h35m23s_grim

@SEvans
Have you unchecked the Automatic update from document?
.

1 Like

Thank you.
File is attached.
1final manu PENNYBOTTOMS ACADEMY for WAYWARD DOGS.docx (214.4 KB)
I’ve noticed some other unusual things.
I tried to create a separate sample file to just include a small section of document, but when I did that, all the problems with centering disappeared, and I was able to center single lines fine.
I’ve also noticed that I was trying to change the line spacing of the doc from double space to single space. So I did a control-A and then changed the line spacing but it didn’t accept the change. I could select a small section and change the spacing, but not select the whole doc, which normally should work.

I can’t find a unique cause for the problem. Here are my observations:

  • your document is DOCX which is not the native LO format
    Consequently you have conversion every time you open the document and an inverse conversion when you save. This has cumulative damaging effects.
  • you have excessive direct formatting
    This ends up creating 110 paragraph styles and 88 character styles. I also found 2 spurious frame styles and 8+1 page styles without being able to tell for sure where they were used.
  • your outline structure is buggy
    • you are not consistent in your use of Heading 1/2
      Some chapters are at level 1, others at level 2. “Acknowledgments” is even at level 4.
    • you start at level 2 without a preceding level 1
      This looks like the book title and should be styled Title.
    • an intra-chapter culdelampe (3 asterisks) is set at level 2 (Heading 2)
      Such decoration should be a “normal” paragraph with an ad-hoc paragraph style. Same for additional vertical spacing you create with empty paragraphs (a well-behaved document contains absolutely no empty paragraph).
    • multi-line headings are made of several paragraphs
      This is the case for what looks like the title, “by” and author’s name. This creates 3 independent entries in the TOC while the group constitutes a single semantic unit. In such a case, the layout is achieved with line breaks Shift+Enter which don’t terminate the paragraph and keep the semantic unit together. But the main fault is probably to have applied Heading 2.
  • You have inserted a Text box in the header for no reason
    Drawing objects like a text box always create issues because they don’t interact neatly with text and you lose all the generic formatting possibilities offered by Writer, notably styles. You could as well have typed your header directly and customised Header paragraph style for right-alignment and other typographic variants.

Globally, working on a DOCX document with Writer is not a good idea. You already have 400 revisions in nearly 33 hours. With such a number of sessions, your document is probably damaged (by the repetitive conversions) beyond repair. The right workflow is to create and edit in native .odt format. If you have external constraint, e.g. your recipient claims he/she cannot handle .odt, export to DOCX only at sending time. If you receive corrections, DON’T edit this copy (because you’ll fall back into the compatibility problems). Retype the corrections in your own original (thus it is wise to enable Track changes in the DOCX to locate easily the differences).

The ODF format (.odt) is more powerful than DOCX. For example it has character and page styles to automate emphasis (or other stylistic variations) and layout respectively.

Presently, the only way to fix your problems is to paste your novel as unformatted text in a new blank .odt document, remove empty paragraphs, apply consistently styles and customise them to fit your needs.

1 Like

Thank you so much, ajlittoz, for this information. I pasted the text into a new doc, and a lot of the problems disappeared. I will use odt from now on.

2 Likes

don’t change the default style,
also make sure you have proper paragraphs image

probably, a bit of background reading will help.
Chapter 3, Using Styles and Templates
→ Formatting Marks

Ask/Guide - How to use the Ask site - The Document Foundation Wiki #More_details

2 Likes