Custom style not showing in writer document

Try First Steps

thanks i’ll try that. i dont have home internet only on my phone so it’ll probably take a while.

I’ve tried 7.6.4.1 and the problem persists. A footnote anchor has a derived style applied which has a different highlighting colour but still shows in the document with the default footnote anchor highlight colour font effects.
G.
Further information: the problem manifests only with footnotes (and maybe endnotes); it doesn’t happen with a cross reference to a footnote, which does show the appropriate style in the document, even though the applied style there is another style which inherits from footnote anchor.
G.

Please upload an anonymized sample file (1-2 pages) containing the problem here. Thank you.

I’ve prepared a sample file but I’m not sure how to upload it.

This may help you

This is the guide - How to use the Ask site? - #3 by Hrbrgr

1 Like

Thanks, it did help. I have now identified the upload button. But when I tap it, nothing seems to happen. I would have expected something to appear that would enable me to navigate to the relevant file.

Yes, a file manager dialog should appear, enabling to pick a file to attach.

With some browsers, in some situations, on some websites, the file picker dialog window seems to pop up behind the main window. Try pressing ctrl+tab or alt+tab, or minimize the main window, when you have clicked the upload icon.

Also, it may work better to edit your question and add an attachment there, rather than to use a comment. Maybe not. Try both.

I’m using an android phone, it’s the only Internet access I’ve got.

  1. You should see the colours in the paragraph styles in the sidebar for the sample below. Some accessibility options might prevent you seeing colour in the document such as Use automatic font colour for screen display in Tools > Options > LibreOffice > Accessibility (might need to restart LO to see) but they seem to still be there in the sidebar which might be a bug.
    Check your accessibility settings in the operating system and LibreOffice.
  2. The footnote anchors always use Footnote Anchor character style, it will not use another style, see 136554 – Footnote/endnote anchors don't respond to new "Position" properties when another character style is applied (see comment 16)
    I have to admit it looks less than ideal in the following sample.

FootnoteAnchors100592.odt (28.6 KB)

I was able to use styles which inherited from footnote anchor in an earlier version of LO ,- has the possibility been removed for more recent versions? If so, it would be helpful if it could be restored. What is the rationale for not allowing change of style here? After all, changecof style is allowed for cross references, which don’t seem to be vastly different in principle.

What version?

The linked comment in the bug report covers much of your question.
You might like to follow the link to the enhancement request in the last comment in the bug report

Hmm, yes, it seems I must have been mistaken about what I thought I’d been able to do in the past. Perhaps I’m going senile. I can see the force of the argument. But cross reference anchors can be assigned a new style and surely the arguments for footnote anchors are equally applicable? Perhaps the request to enable search / replace of character styles (78582) could be implemented at some stage; then it seems the arguments may carry less weight … (but please, please, never restrict cross reference anchors in the same way that footnote and endnote anchors are restricted!)

In that bug report (136554) Mike Kaganski writes, ‘… since “Footnote Anchor” character style only defines superscript automatic, all other properties (font, color, …) would take effect from the text …’
However, whilst I can indeed change the font, I can’t seem to change the highlight colour - which is what I want to do, and which the above quote implies that I should be able to do. Am I missing something?

As a workaround, you can add a thick lower border for the character style.
imagen

1 Like

style in the sidebar and set the appropriate values and click ok but the
values are not applied and when I go back to edit the style again they have
been reset. Is there a switch or something that I need to set in order to
have the values applied to the style?

Create a new style based on Footnote Anchor, e.g. Footnote Anchor Lower Border, add a lower border to the style and OK. Apply the new style to the footnote number and it will take that as a second character style.

Note that you could , in Font Effects, set an overline in Bold, red and apply that new character style.
FootnoteAnchorRedOverline

1 Like

Formatting notes anchor is a bit tricky because creating a note involves a lot of implicit processing by Writer behind the scene. As only one example, think of what may happen/conflict if you already have a character style applied in the region where you insert a note.

Since note anchor is formatted with a specific character style, some precedence rule is needed to eliminate potential conflict.

Here, the precedence is given by Tools>Footnotes & Endnotes. In this configuration dialog, you designate which character style will be specifically applied to the note number either to the anchor (Text area) or to the note itself (XXXnote area).

In your sample file, you show two notes. The first note has no manual character style, thus is is formatted according to the default style, i.e. Footnote Anchor. The second one is explicitly styled Endnote Anchor RedBold which overrides the typographical attributes in the Red Bold paragraph style but is overridden by the automatic application of Footnote Anchor.

I assume you don’t want all your note anchors changed to red (otherwise it is easy to change the character style in Tools>Footnotes & Endnotes). Unfortunately, it looks like all other attributes can be changed with direct formatting except colour. This is where a bug may lie.

Since you can’t select the note number in the footnote area, you can’t apply direct formatting to change a single number. All numbers are decorated by the sample character style. There is no way to make a number stand out among the others.

Not my document (which I haven’t been able to upload yet) but appears to show the same or closely related problem. What i want is to indicate at a glance the “category” of a footnote by using different highlight colours for the footnote anchor in the text area. As you rightly say, it is easy to change the highlighting of all footnote anchors, either by your method or ( perhaps simpler) to edit the footnote anchor style directly by right clicking on it in the styles panel and choosing edit style; but I would like to have different highlight colours and that, it seems, is not possible either by direct formatting or by applying a style to an individual anchor in the text - which is a pity, since other properties, such as font, can be changed. (For my purposes it doesn’t matter whether or not this style/highlight is carried through to the number in the footnote area).

I understood your purpose as such. IMHO, there is a bug in handling direct formatting on note anchor. I already detected a similar discrepancy on list number/bullet (see tdf#158835) and I commented tdf#136554 to draw developers’ attention on the similarity and possible same cause.


Usually, the styling precedence is paragraph < character < direct formatting. Here this precedence is followed except when colours are involved (text colour or background highlighting colour). This twist is really upsetting.


I could not find any valid workaround. The only thing you can do is to apply bold (but this gives you only two categories and this is not very noticeable due to size reduction of the anchor), italics (same comment), underline (idem). Changing font face, though allowing for more categories, again is not visually sufficient due to the size of the anchor.