[tex4ht] [bug #489] problem with hyperref in tex4ht after TL Oct. update

Nasser M. Abbasi nma at 12000.org
Mon Nov 23 11:36:37 CET 2020


On 11/23/2020 3:37 AM, Michal Hoftich wrote:
> Hi Nasser,
> 
>>
>> if it is of any help for you, if you like at the HTML page,
>> the link to the above HTML is now here
>>
>> https://www.12000.org/my_notes/faq/MAPLE/maple.htm
> 

> This error means that the generated HTML is not well-formed XML. For
> example, there may be spurious <p> tags, etc. In your case, I can see
> these errors:
> 
> </p><!--l. 1830--><p class="noindent" > <p><IMG SRC="movies/movie.gif"
> ALT="some text" WIDTH=750></p>
> </p><!--l. 1834--><p class="noindent" >Another version
> </p>
> 
> You should remove additional <p> tags around your <IMG> tag. I assume
> that you add this from your cfg file, because it doesn't look like
> TeX4ht output. It should be rather:
> 
> <IMG SRC="movies/movie.gif" ALT="some text" WIDTH="750" />
> 
> TeX4ht handles paragraphs, so don't add them by hand.
> 

Thanks. Yes, I had code inside the Latex file itself, not my .cfg,
as follows

======================
\ifdefined\HCode
Here is the animation from the Maple notebook:

\ScriptEnv{html}
    {\NoFonts\hfill\break}
    {\EndNoFonts}
   
   \HCode{
   <p><IMG SRC="movies/movie.gif" ALT="some text" WIDTH=750></p>
   }
\fi
=======================

I'll fix it now to remove those p's. The above is old code. But
the warning is new, which is good.

> There is also a really weird link:
> 
> <a
> href="http://www.mapleprimes.com/blog/jacquesc/vim-mode-for-maple"
> http://mooedit.sourceforge.net/ >
> 
> How did you get this spurious http://mooedit.sourceforge.net/ here?
> 

That was my own error actually. I fixed it. I had extra stuff
there.

btw, I noticed something while fixing the url.

Before, I had this (this is old file, I did not know about \url then)

            \href{http://...}{\nolinkurl{http://...}}

I now changed it to

           \url{http://...}

But the HTML in the first case shows an EXTRA space in the first
example above after the http:// compared to second example above.
(please see screen shot attached)

Both links work though. It is just strange why the first one has extra space
there.

I attach this small Latex file if you like to try it and see for yourself.
It is not a big deal, as link works and I do not use \nolinkurl anymore,
changing everything to \url{} now.

The command  I used to compile the attached file is

make4ht -ulm default -a debug foo5.tex "mathjax,htm"

> HTML validator reports much more errors regarding <style> and <script>
> elements, but these don't matter to DOM filters.
> 
> Best regards,
> Michal
> 

Thanks,
--Nasser
-------------- next part --------------
\documentclass[12pt]{article}
\usepackage{hyperref}
\begin{document}

\begin{enumerate}
\item \href{http://www.mapleprimes.com/blog/jacquesc/vim-mode-for-maple}{\nolinkurl{http://www.mapleprimes.com/blog/jacquesc/vim-mode-for-maple}}
\end{enumerate}

\begin{enumerate}
\item \url{http://www.mapleprimes.com/blog/jacquesc/vim-mode-for-maple}
\end{enumerate}

\end{document}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: extra_space.png
Type: image/png
Size: 6156 bytes
Desc: not available
URL: <https://tug.org/pipermail/tex4ht/attachments/20201123/822f9629/attachment-0001.png>


More information about the tex4ht mailing list.