Created attachment 111185 [details] TOC eliminates formatting of headers When the TOC is generated it filtres out any formatting present in the Headings To Reproduce: 1. Write «1st Heading» 2. Format as Heading 1 3. Insert → Index and Tables Current Behaviour: All the text is cleared of the formatting Expected behaviour: The TOC should also contain the formatting of the headings.
Comment on attachment 111185 [details] TOC eliminates formatting of headers Fix mimetype
TESTING with LO 4.4.0.1 + Ubuntu 14.04 (In reply to Walter from comment #0) > To Reproduce: > 1. Write «1st Heading» > 2. Format as Heading 1 > 3. Insert → Index and Tables Insert -> Index and Tables -> Index and Tables -> (click the OK button) > Current Behaviour: > All the text is cleared of the formatting CONFIRMED: The text is cleared of the formatting, however this makes some sense. > Expected behaviour: > The TOC should also contain the formatting of the headings. If different headers have different sizes, colors, etc., I'm not sure that such formatting should be included in the ToC. Why would we want to retain such formatting inside the ToC? (after you reply, please change Status back to UNCONFIRMED. Thanks!)
If the user applies direct formatting I think it reasonable to assume that he would want it to appear in the TOC. When I format a title I intend to give emphasis to some particular word and I do want it to appear in the TOC. Eg: 1. 1st, 2nd, ecc. 2. A TITLE WITH A FOREIGN WORD. I write foreign words in italics and I would like it to be in italics also in the TOC 3. I think it would apply also to color. There is a reason why the user choses to use color. What I intend is to retain the DIRECT FORMATTING and not the formatting of the style used. I agree that the formatting of the Heading style should be stripped out. Thanks
(In reply to Walter from comment #3) > If the user applies direct formatting I think it reasonable to assume that > he would want it to appear in the TOC. When I format a title I intend to > give emphasis to some particular word and I do want it to appear in the TOC. > Eg: > 1. 1st, 2nd, ecc. > 2. A TITLE WITH A FOREIGN WORD. I write foreign words in italics and I would > like it to be in italics also in the TOC Hmm...italics could be a desirable piece of formatting to include. > 3. I think it would apply also to color. There is a reason why the user > choses to use color. Possibly, although what if the text is formatted white on a black page, and the ToC has a white page bg? > What I intend is to retain the DIRECT FORMATTING and not the formatting of > the style used. I agree that the formatting of the Heading style should be > stripped out. What about size of text? I think that the text in the ToC should all be (roughly) the same size, height, etc, otherwise you'll have 36pt text next to 10pt text. I'm going to toss this one over to the UX Team to see if they have some good suggestions for what kind of formatting should (and shouldn't) be scrubbed before being displayed in the ToC. Status -> NEW OS/Arch -> (Generalize)
Perhaps the TOC creation could only take into account the characters when they are formatted using character styles? I do use italics (char style Italics) to denote foreign words or brand names and having this automatically set into the TOC would be appreciated.
We're replacing our use of the 'ux-advise' component with a keyword: Component -> LibreOffice Add Keyword: needsUXEval [NinjaEdit]
ToC's have own styles and do not allow direct formatting/character styles. Not sure if the format permits this at all. Regina? (Summary changed from "FORMATTING: Table of Contents removes formatting of the Headings")
Created attachment 135339 [details] MS Word MS Word 2010 ignores alignment and font size but takes the italics or bold as well as background color and font name but neither font color, font size nor underlined. Makes no sense to me to pick some properties.
A TOC-item is a simple <text:p> element, without any attribute or child element specific to an index. I find no reason in the specification, that would prevent copying the <tspan> elements from a heading to a TOC-item.
(In reply to Heiko Tietze from comment #7) > ToC's have own styles and do not allow direct formatting/character styles. The TOC dialog allows to set the index read only - or not. When it's not, direct formatting, or applying character styles, is easily done. And some TOC designs ask for it. And that of course would be easiest if direct formatting/character styles in headings are retained. Prolly not an easy hack, but .. ;)
May I suggest this workaround: That the TOC maintains any character styles present in the paragraph styles used to generate the TOC. This would enable the user to specify which particular character formatting he/she wants to be visible in the TOC and discrimination between desired and undesired formatting would be easier.
(In reply to Walter from comment #11) > May I suggest this workaround: That the TOC maintains any character styles > present in the paragraph styles used to generate the TOC. That's not a workaround but the enhancement request :-) Taking the character style/direct formatting from the headings we have to discuss the scope, meaning to accept all properties font name, size, color, background... or to restrict like Microsoft does. (The topic is on the agenda for the design meeting.)
(In reply to Walter from comment #11) > May I suggest this workaround: That the TOC maintains any character styles > present in the paragraph styles used to generate the TOC. > > This would enable the user to specify which particular character formatting > he/she wants to be visible in the TOC and discrimination between desired and > undesired formatting would be easier. No, that is not the problem. You can already determine a character style in the paragraph style of a TOC line. The request here is, that <text:span> elements, which hold the direct formatting or formatting by character style for a portion of the text in the heading, are retained in the TOC, so that such portion of text can get a different styling then the rest of the line.
FWIW, there are a few bugreports related to this bug, not sure if they were already mentioned: - bug 30732 already implements some support for formatting in ToC - bug 99689 requests to have the same for figures/tables as well The bug title sounds like not knowing about the first; so perhaps first define what is still wanted on top of the first bug?
We talked about this topic in the design meeting today. The decision was to not recommend this enhancement because a) ToC should remain plain, b) taking all or some properties may end up in a mess, c) the formatting in the ToC can't be removed or error-prone features need to added. If someone wants to implement this feature it should be optional and at least not take font size. (removing needsUX)
*** Bug 157414 has been marked as a duplicate of this bug. ***
Perhaps allow for a check box to select or unselect whether the formatting from the character style or direct formatting gets brought into the TOC or other items. This way one can choose whether they want this to happen or not.