Adding tags to Compile → Cmp Format Designer → Styles prevents the style from being exported and applied

Hi there, brand new user here. I am trying to add an auto-numbering list associated to the various styles, such as H1, H2 and so on. This would allow me to export to LibreOffice and polish the layout there (e.g. it allows quickening the creation of references, tables of content and so on).

To do that, rather than dragging tags around, I tried to add them to Compile → Compile Format Designer → Styles.
From this panel, I added “Heading 1”, then as a prefix the tag <$n:h1>. The problem is that after exporting, the style disappears from the list of styles used and it is not even applied to the heading text itself. Unfortunately, being a new user, I cannot attach any image to the post. Let me know if the issue is clear, otherwise I will figure out something.

So, am I missing something? This feature would be fantastic for handling custom auto-numbering associated to styles in a format ready-to-go for external word processors.

Thanks!

Hi

You have to apply it to your text in the editor.
…And then have that style listed in the styles panel. (That second part you already got right.)
※※ (Note that if you don’t intend to modify a style at compile and/or add a prefix/suffix to it, you then don’t need to add it to the styles panel’s list. Any style used through the compile process will be exported along the text if you’ve checked Include styles information in exported file, regardless of whether it is listed in the styles panel or not.)
. . . . .
Or : (If the heading comes from the section layout…) →

※※ As opposed to prior, in this case the style must first be listed in the styles panel to be available in the drop down list (in the section layout – above screenshot).

Of course, if you opt to send what’s generated at the section layout’s level (title, subtitle – as depicted above) to go through a style, you then have to tweak its formatting in the styles panel, as this is how it’ll look, the section layout now being overridden for that segment.
(Although to some extent that may be relative to what exactly the style controls. (For ex: I suppose that if the style doesn’t dictate the font family, that bit will still be set by the section layout.) It is not something I’ve played with much. Run your tests, but what I screenshotted is where it happens ; assuming I understood your question properly.)

Hi Vincent,
thank you for your details answer. I have uploaded some screenshots to my site to better explain the problem, since I can’t upload directly.
You are indeed correct about the checkbox related to exported styles: without that, no styles are exported. I am in fact using it.

So, this is the test setup:

These are the compile options. I have opted to export custom H1 and H2, adding tags to them to create a list. H3 is default.

[I’m cutting the reply in 2 as new users can only post 2 links in a post :confused: ]

This is the output. As you can see, the H1/H2 lists work as desired, but the text does not have the style applied. Moreover, there is no Heading 1 / Heading 2 styles applied to the document. Heading 3 instead is working fine.

This is a more extended example of the output:

I hope this clarifies the issue.
Thanks!

I won’t pretend that I understand what is going on (because at the moment I don’t), but those “tags” you are trying to insert, if those titles and subtitles are documents’ binder names and are inserted by the compiler (they are not in the editor), the numbering placeholder goes in the title prefix of the section layout, not in the prefix of the style itself.

image

→ I simply dropped the <$n> placeholder in there for the need of the example. That’s not quite the one you need. But that’s where it goes.

And if on the opposite you put these titles and subtitles in the editor, perhaps you’d be better off typing the placeholder there as well.
(Possibly the numbering stream doesn’t like sitting in the style’s prefix so much…)

[EDIT] → Note that I regularly use <$n> as styles prefixes without any issues. So likely, if that’s the problem, it comes from the fact that you use streams. (The " :xx> " part that comes after the <$n ) — Try naming your stream not h1 to see. <$n:hone> <$n:htwo> (maybe using a digit number in there is a bad idea…)

Try compiling your test once more, but this time with no prefix at all to the styles.
It seems like the current placeholder’s syntax you are using messes things up.
It snatches the style off of the text, and we can see that only one of your styles made it through all the way to LO (the one you just so happen to have left untouched – H3).

See the enumerated outline compile format.

Off topic posts deleted.

New user created to snipe at off topic posts also deleted.

Thanks for the bug report, @krex. I’ve tested style prefix, suffix, line prefix and line suffix. Any use of those four fields, or combinations of them, will cause the style assignment to be lost in the output.

As noted above, this probably hasn’t come up in a report yet because in most cases the heading would be coming from the binder outline. The “Heading 1” style would then be applied to the Section Layout, and the title’s field used to implement any numbering, rather than the style.

But you’re right, if it was working correctly, that’s how you can do things like figure numbering on captions and so forth.

Earlier I said this :

and so @AmberV test result got me quite confused.
I went back and checked my compile format.
Since it is a compile format I use for print, but have adjustments I want to be able to apply globally once my RTF file is in LibreOffice, I don’t have the compile format set to Include style information in exported file. That’s the part I didn’t think of (soon enough – my bad).
With the compile format not exporting style info, it works. The paragraph ends up styled as it should. It just doesn’t have a style to it once in LO.

image

Yeah, I suppose if all one needs is for it to look right (for printing, as you say, that’s fine), then that is an alternative. But if you do need styled text, as styled headings are quite useful in a word processor, then using the Section Layout approach will be best.

Just wanted to clarify that my conclusion was off.
I thought it was due to the stream, when it actually doesn’t work altogether, stream or not.

Yep.