Possible Bug with “(floating)” Character Styles

Post Reply
RKanarek
Posts: 158
Joined: Tue Jan 13, 2004 6:59 am

Possible Bug with “(floating)” Character Styles

Post by RKanarek »

Greetings,

I believe that there is a problem with the current version of TextMaker and its handling of character styles. (The problem probably goes back some time, but that is a separate issue.) Perhaps someone can either correct the problem, or correct me.

Background:
Per TextMaker’s online help system – the proper offline help system still being MIA – the formatting of character styles can be “based on” other character styles. Alternatively, one can base a character style on “(floating)” in which case the following is supposed to happen:
“If you select the option (floating) and you apply the new character style to a text, only the formatting attribute that you changed in the character style will take effect.”
(Aside: there is also the option of basing a character style on “(floating, paragraph),” but this option is not relevant in this discussion.)

Problem:
I created a character style “SubScript” and “SuperScript” so that I could subscript and superscript characters as I preferred, rather than as TextMaker prefers. Both character styles only contain changes relevant to subscripting/superscripting and are “based upon” “(floating).” Despite the use of “(floating)” and the assurances from the online (i.e. where it shouldn’t be) help, these character styles change the font too, if the font is not the default font of the paragraph.
Note that the above example is but one example, and there could be other issues.
TextMaker 2024 - Character Style Problem - Example.jpg
Thoughts?
Attachments
Possible Bug with (floating) Character Styles - 2025-01-25.tmdx
(17.73 KiB) Downloaded 15 times
RKanarek
Posts: 158
Joined: Tue Jan 13, 2004 6:59 am

Re: Possible Bug with “(floating)” Character Styles

Post by RKanarek »

Hello, this is your OP'er. Yes, I should have put my post in the TextMaker forum, not in the General forum. One lives and learns. Or at least lives.

If the forum administrator would care to move the thread, s/he is most welcome to do so.

Sorry!
lgsl
Posts: 176
Joined: Wed Mar 04, 2020 8:00 pm

Re: Possible Bug with “(floating)” Character Styles

Post by lgsl »

This is because the character style "SuperScript" is begin based on "Normal" that is using the defualt font for paragraph. You need to set the desired font for the character style SuperScript to DejaVu LGC Sans Mono.

I tried doing th is with the file you provided and works and you need it to.
RKanarek
Posts: 158
Joined: Tue Jan 13, 2004 6:59 am

Re: Possible Bug with “(floating)” Character Styles

Post by RKanarek »

Dear Lgsl,

Thanks for the reply. Regrettably, your reply seems to overlook three important points:
1. The character styles “SuperScript”, “SubScript”, and “Math” are all “based upon” the style “(floating)”, and not, as you wrote, “Normal”. Or at least they should be.
Character Style SuperScript - Screen Capture 1 of 2.jpg
Character Style SuperScript - Screen Capture 2 of 2.jpg
2. If I were to specify the font for the character styles “SuperScript” and/or “SubScript”, applying either to a character would also change the character’s font. As I might well want to apply subscripting and superscripting to characters in various fonts (e.g., fonts used in text, mathematical equations, etc.), this would be highly undesirable.
3. A character style that is “based on” “(floating)” that changes font characteristics unbidden would seem to be “verboten” per the documentation (as I understand the documentation). It is also rather inconvenient.

Cordially,
Richard Kanarek
lgsl
Posts: 176
Joined: Wed Mar 04, 2020 8:00 pm

Re: Possible Bug with “(floating)” Character Styles

Post by lgsl »

You are right. I overlooked that detail.

I took another look at your example file and simply changed the font for the paragraph style "Normal" and the character "Math" to something that allowed me to distinguish better the difference than a simple mono font. Everything worked as expected. (See attachments).

Fonts used: Basic Sans and Arial Black
Attachments
Possible Bug with (floating) Character Styles - 2025-01-25 (1).tmdx
Modified file
(17.79 KiB) Downloaded 12 times
Screenshot
Screenshot
RKanarek
Posts: 158
Joined: Tue Jan 13, 2004 6:59 am

Re: Possible Bug with “(floating)” Character Styles

Post by RKanarek »

Dear Lgsl,

Thanks for your continuing attention to this matter.

It would seem that we are having a problem communicating, as your example demonstrates the issue I reported, not its resolution.

If you examine the screen capture you produced, you will surely notice that, when the character style “SuperScript” was applied to the letter “h” in “here,” it changed both the font and removed the bold face. Examining the character style “SuperScript” as it appears in your updated TMDX file indicates – as I understand it – that neither of these changes were meant to have occurred.

In your TMDX file, like my original, the “SuperScript” character style does not specify a font nor a “style” (“style” this time being used to indicate bold, italic, etc.). Since “SuperScript” is (still) “based upon” “(floating),” and since the description of “(floating)” in the (regrettably) online (rather than offline) help system seems to state that unspecified options should not be applied by a character style when a character style is based upon “(floating)”, only the size and positioning of the letter “h” should have been changed by applying “SuperScript”. Your example, however, demonstrates that both the font and the “style” have been changed, indicating that either character styles are not being applied properly or they are not described properly in TM's documentation. Or did I miss something?

Kind regards,
Richard Kanarek
lgsl
Posts: 176
Joined: Wed Mar 04, 2020 8:00 pm

Re: Possible Bug with “(floating)” Character Styles

Post by lgsl »

Ok. I think I understand what the problem is. You applied a character style: math to "here" and then subscript to "h" hoping that h would inherit the character style of math.
As far as I know is not possible to ¿have two character styles applied to the same character. The manual states: "When you create a new character style based on another style, all existing formatting attributes (font, font size, font color, etc.) are generally copied from that style basis. (...) However: The text will also be formatted with all other attributes of the style basis (font, font size, etc). If you do not want this formatting, you can proceed in an alternative manner. On the Style tab, the dropdown list Based on contains two special entries: (floating) and (floating, paragraph). If you select the option (floating) and you apply the new character style to a text, only the formatting attribute that you changed in the character style will take effect. If, for example, the font color was changed in the new character style and you apply this "floating" character style to a text, you will only change its font color, but all other formatting attributes of the text (font, font size, etc.) will be retained in their current formatting." Meaning: that the way you are trying to archive your goal is the wrong way around because you want to base a character style based on another character style and not a paragraph style, hence the result. As I gather (floating) will take as a base the parent paragraph style where it is applied, not the nearest character style.

The solution to your issue would be: Set the subscript character style to be based on the math character style. This way: subscript will inherit math's font, size, color... as a (floating) for a character style on a character style.
Post Reply

Return to “TextMaker NX and 2024 for Windows”