[tex4ht] [bug #301] problem breaking URL when using tex4ht only

Nasser M. Abbasi nma at 12000.org
Sun May 8 22:24:13 CEST 2016


URL:
  <http://puszcza.gnu.org.ua/bugs/?301>

                 Summary: problem breaking URL when using tex4ht only
                 Project: tex4ht
            Submitted by: nma123
            Submitted on: Sun 08 May 2016 11:24:13 PM EEST
                Category: None
                Priority: 5 - Normal
                Severity: 3 - Minor
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Full problem description is also posted at 

http://tex.stackexchange.com/questions/308309/problem-breaking-url-when-using-tex4ht-only

This problem only shows up when compiling to HTML.

I have some long URL's and a URL with underscore does not break inside a table
cell when compiled to HTML as it does when compiled to PDF. Long URL with
hyphens does break correctly. It is only the ones with underscore that do not
break as expected.

MWE follows compiled with TL 2015

------------------------------------------
\documentclass[12pt]{article}%
\usepackage{longtable}
\usepackage{hyperref}
\makeatletter %from
http://tex.stackexchange.com/questions/3033/forcing-linebreaks-in-url
\g at addto@macro{\UrlBreaks}{\UrlOrds}
\makeatother

%\usepackage[hyphenbreaks]{breakurl}
%\usepackage[hyphens]{url}

\begin{document}
\begin {longtable}{|p{.2in}|p{2.2in}|p{1in}|p{.8in}|}\hline
1&
\url{http://www.foo.com/questions/aaaaaa/aaaaaaa-aa-aaa-aaaaaaaaa-aaaaaaaaaa-aaaaa-aa-aaaaaaa-aaaaaa}
&
more&1/5/2016
\\\hline
\end{longtable}

Another table

\begin {longtable}{|p{.2in}|p{2.2in}|p{1in}|p{.8in}|}\hline
2&
\url{https://www.foo.com/post/aaa_aaa_aaaa_aaaaaaaa_aaaaa_aa_aaaaaaaaa_aaaaaa_aaa_aaa_aaaaaaaaa_aa_aaaaaaa_aaa_aaaaaaaa_aaaaaaa}
&another good question&1/5/2016\\\hline
\end{longtable}    
another one

\begin {longtable}{|p{.2in}|p{2.2in}|p{1in}|p{.8in}|}\hline
1&
aaaaaa aaaaaaa aa aaa aaaaaaaaa aaaaaaaaaa aaaaa aa aaaaaaa 
aaaaaa aaaaa aaaaaaaaaa aaaaaaaa aaaaa aaaaaa
aaaaaa aaaaaaa aa aaa aaaaaaaaa aaaaaaaaaa aaaaa aa aaaaaaa 
&more&1/5/2016
\\\hline
\end{longtable}
\end{document}
----------------------------

When compiled to PDF, the middle URL breaks correctly, but not when compiled
to html, using either make4ht or htlatex

htlatex foo.tex "htm,p-width"

I think the URL should break the same way as it does in PDF. May be there is a
workaround?





    _______________________________________________________

Reply to this item at:

  <http://puszcza.gnu.org.ua/bugs/?301>

_______________________________________________
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



More information about the tex4ht mailing list