[LH4661] Centred text fixed yet? And new section formatting.

I posted about this at the beginning of July but thought I’d repost to attract attention again. Using a paragraph style of Centered Text for my section separator (which is just letters, not a graphic: oOo) and compiling to .mobi always produces a separator that is ranged left.

I’ve tried using the justification menu icons, a paragraph style, a character style … nothing works. Any news or suggestions?

While I’m here … To compile to .mobi, I use the Section style that creates a new chapter with the first three words capitalised and ranged left. OK, that works. But I can’t then find a way to format a first paragraph after the separator mentioned above - i.e. a new section in the text. I want it to be the same as the beginning of the chapter - capitalised and ranged left. Formatting the text in the editor doesn’t work. either with a new paragraph style or using a character style. The compile strips out all formatting except what it insists on - the first three words in the chapter to be capitalised.

I should add this is only a problem when compiling to .mobi. It works to format text appropriately in the editor when compiling to .docx (as does the centered separator) i.e. the formatting I want is kept. I haven’t tried epub or other formats.

In Compile, please Edit Format and click the ‘Separators’ tab. Check at the bottom of the window that ‘Ignore indents when centering custom separators’ is enabled. Does that fix the centering issue?

Epub and Mobi strip out much of the formatting when you compile, because things like font and size are set by the reader’s e-reader. In your case though, if everything else is compiling correctly with your chosen formatting, it sounds like it could be a section layout issue. Do you have the text after the separator in a separate text document, assigned with an appropriate section type? You’ll want to make sure that the section layout assigned to this text’s section type is one that incorporates the formatting you want. You can do this either by editing the section layout to include your capitalization/left-aligned formatting, or by applying the formatting in the editor and then choosing a section type with a ‘compile as-is’ section layout.

I was also having issues with centred text when this was raised in the OP’s original post on July 1st.

Just checking in again this time round to say I’m still having the same issues. It’s not confined to separators for me, none of the headings are given a centre style even if that is what you configure in the export formatting. Happens for epub and mobi.

My current workaround is to export to epub and add in text-align: center; to the style sheet using sigil for the various classes which are supposed to have them. If it’s useful I can try and reproduce from a fresh project or collect whatever debugging data is needed to help address this.

Thanks, I’ve tested the conditions of this in several different ways, and have concluded that text alignment (and paragraph padding besides) are not being properly conveyed to CSS through the compiler. The problems have been filed.

Please do note, as a workaround, you have full control of the CSS output in the compile format pane that goes by that name. You do not need to go in with Sigil after every compile, you can establish the correct formatting yourself.

Fantastic! Great to hear you’ve got a reproduction.