bugtex4ht - Bugs: bug #162, Extra space in html output with...

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #162: Extra space in html output with some predefined TeX commands

Submitted by:  Bitouze <denisbitouze>
Submitted on:  Thu May 17 09:37:33 2012  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: CV Radhakrishnan <cvr>
Open/Closed: Closed

(Jump to the original submission Jump to the original submission)

Thu Jul 2 20:06:59 2020, comment #9:

Ah I meant that there is added space. But Karl already updated TL, so it comes correctly now.

Michal Hoftich <michal_h21>
Project Member
Thu Jul 2 19:41:20 2020, comment #8:

>And you are right that the following text is still shifted too close to the fancy logo.


Really? I don't see this trouble anymore with the "fancylogo" option and:

\documentclass{article}
\begin{document}
\noindent\LaTeX{} foo

\noindent\LaTeX foo

\noindent\LaTeX{}.

\noindent\LaTeX.
\end{document}

Bitouze <denisbitouze>
Wed Jul 1 20:55:20 2020, comment #7:

Yes, we use the plain logo by default now. But it is still possible to use the logo that emulates the fancy logo using the "fancylogo" option.

And you are right that the following text is still shifted too close to the fancy logo. I've found that it can be fixed using following CSS:

\Css{span.LATEX span.TEX{ position:relative; margin-left: -0.4em; margin-right: 0.125em; }}%
\Css{span.TEX {letter-spacing: -0.125em; margin-right:0.125em}}

Michal Hoftich <michal_h21>
Project Member
Wed Jul 1 17:57:32 2020, comment #6:

Well, I don't remember (8 years later ;) what I got at the moment, but, currently with:

<pre>
File List
article.cls 2019/12/20 v1.4l Standard LaTeX document class
size10.clo 2019/12/20 v1.4l Standard LaTeX file (size option)
tex4ht.sty
article.4ht
l3backend-dvips.def 2020-06-29 L3 backend support: dvips
l3backend-dvips.def 2020-06-29 L3 backend support: dvips
***********
</pre>
the "\LaTeX" logo is displayed just as "LaTeX":

<code>
<!--l. 14--><p class="noindent" >LaTeX
</code>

Maybe this explains the issue seems fixed. I wonder what we would get if the logo would be preserved in the HTML output.

Bitouze <denisbitouze>
Wed Jul 1 17:44:35 2020, comment #5:

I think this is fixed already.

Michal Hoftich <michal_h21>
Project Member
Wed Sep 19 08:11:03 2012, comment #4:

Well, not that good: the entire "LaTeX" word is shifted to the right and a spurious space appears at its left.

Thanks to http://edward.oconnor.cx/2007/08/tex-poshlet a (working I hope) workaround would be:

Bitouze <denisbitouze>
Wed Sep 19 07:27:39 2012, comment #3:

I found a workaround: it is enough to add, after the span.LATEX entries from *.css:

I hope it is exempt of side effects.

Bitouze <denisbitouze>
Wed Sep 5 09:44:15 2012, comment #2:

The html output created by TeX4ht is similar to pdf. There is no spurious space. See:

</head><body

>

<!--l. 9--><p class="noindent" ><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span
class="E">E</span>X</span></span> foo
<!--l. 11--><p class="noindent" ><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span
class="E">E</span>X</span></span>foo

</body></html>

The <span> element introduces a space after it while rendering in a browser. If you comment out the span.LATEX entries from *.css, and refresh your browser, the spurious space disappears. I am out of wits here.

Radhakrishnan

CV Radhakrishnan <cvr>
Project AdministratorIn charge of this item.
Thu May 17 09:50:57 2012, comment #1:

Even worse, a spurious space is inserted before periods:

\documentclass{article}
\begin{document}
\noindent\LaTeX{}.

\noindent\LaTeX.
\end{document}

Bitouze <denisbitouze>
Thu May 17 09:37:33 2012, original submission:

Hello,

there is an extra space in html output after some predefined TeX
commands, as pointed out by the following MCE (compile with htlatex
and with pdflatex in order to see the difference):

\documentclass{article}
\begin{document}
\noindent\LaTeX{} foo

\noindent\LaTeX foo
\end{document}

Best regards.

Bitouze <denisbitouze>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by michal_h21 (Posted a comment)
  • -unavailable- added by cvr (Updated the item)
  • -unavailable- added by denisbitouze (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    2 latest changes follow.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed Jul 1 17:44:35 2020michal_h21Open/ClosedOpen=>Closed
    Wed Sep 5 09:38:48 2012cvrAssigned toNone=>cvr
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray