Page 1 of 1

Extra space in <tm> fields.

Posted: Mon Feb 10, 2025 12:56 pm
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.

Re: Extra space in <tm> fields.

Posted: Wed Feb 12, 2025 12:57 pm
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

Re: Extra space in <tm> fields.

Posted: Thu Feb 13, 2025 12:17 pm
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

Re: Extra space in <tm> fields.

Posted: Fri Feb 21, 2025 7:54 pm
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.