Extra space in <tm> fields.

Post here questions and problems related to editing and publishing DITA content.
Vinny
Posts: 26
Joined: Wed Jan 12, 2022 1:07 pm

Extra space in <tm> fields.

Post by Vinny »

Folks,
For whatever reason, an extra space seems to be inserted in <tm> fields, so that <tm tmtype="tm">Windows</tm> results in ‘Windows ™'' rather than 'Windows™'

Example:

Code: Select all

<li>Connect the terminal to the UART 0, corresponding to <codeph>COMa</codeph> in the <tm tmtype="tm">Windows</tm> enumeration.</li>
Results in:

Code: Select all

<li class="- topic/li li">Connect the terminal to the UART 0, corresponding to <code class="+ topic/ph pr-d/codeph ph codeph">COMa</code> in the <span class="- topic/tm tm" tmtype="tm">Windows<span class="- topic/tmmark tmmark ">™</span></span> enumeration.</li>
And using that CSS:

Code: Select all

em,
span.tm,
span.tmmark,
span.keyword {
    font-style: italic !important;
    border: 1px green solid;
}
I get what you can see in attachment. I don’t know where the extra-space comes from, neither how I am supposed to squeeze it. Interestingly, <tm> fields seem to work (no extra space) within <title> tags.
Screenshot 2025-02-10 at 10.52.04.png
Any idea of a workaround or fix?
Thanks!
Vincent

EDIT: I was able to find a workaround:

Code: Select all

span.tmmark {
    display: none;
}

span.tm:after {
    content: '™';
}
But it doesn’t explain the extra space.
You do not have the required permissions to view the files attached to this post.
marius
Posts: 52
Joined: Thu Mar 05, 2009 11:44 am

Re: Extra space in <tm> fields.

Post by marius »

Hello,

Upon reviewing your issue with Oxygen XML Editor 27.0, we were unable to replicate the problem of extra space being added when running the default (unchanged) DITA Map WebHelp Responsive transformation scenario with your sample code. As demonstrated in the screenshot bellow, no extra space is present.
image.png
Could you please confirm the version of Oxygen XML Editor you are using? Additionally, does this issue occur when you run the default WebHelp Responsive transformation scenario?
A useful step would be to utilize the browser's Inspector tool to determine the origin of the CSS style that is affecting the TM element.

Kind regards,
Marius
You do not have the required permissions to view the files attached to this post.
Marius Ciolacu
Syncro Soft / Oxygen XML
Vinny
Posts: 26
Joined: Wed Jan 12, 2022 1:07 pm

Re: Extra space in <tm> fields.

Post by Vinny »

Thanks Marius for the reply.
I’m a bit busy atm, but I’ll try to investigate further asap (early next week probably).
Thanks for your patience,
Vincent
Vinny
Posts: 26
Joined: Wed Jan 12, 2022 1:07 pm

Re: Extra space in <tm> fields.

Post by Vinny »

Hi Marius,
I finally found what was wrong.
The problem was with the CSS default entry:

Code: Select all

* {
    font-family: 'Raleway';
    font-weight: 100 !important;
    font-size: 9pt;
    text-align: justify;
    text-justify: inter-word;
    margin-left: 0mm;
    line-height: 1.4;
    border: none;
    color: #000000;
}
I’m not exactly sure what causes the extra space insertion. Maybe the justification, or the margin specification. In any case, splitting it into the much more 'sensible':

Code: Select all

* {
    font-family: 'Raleway';
    font-weight: 100 !important;
    font-size: 9pt;
    color: #000000;
}

p {
    text-align: justify;
    text-justify: inter-word;
    margin-left: 0mm;
    line-height: 1.4;
    border: none;
}
caused the problem to disappear. No extra space any more.
Thanks for your help!

P.S.: The first wrong CSS would also cause an extra space to be inserted before <sub> and probably <sup> tags.
Post Reply