[tex4ht] [bug #620] tex4ht breaks URL text leading to empty spaces between words generated in final HTML when \urldef

2024-02-26 Thread Michal Hoftich
Update of bug #620 (project tex4ht):

 Open/Closed:Open => Closed 


___

Reply to this item at:

  

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



[tex4ht] [bug #620] tex4ht breaks URL text leading to empty spaces between words generated in final HTML when \urldef

2024-01-16 Thread Michal Hoftich
Follow-up Comment #1, bug #620 (project tex4ht):

The original issue is caused by your URL not fitting on a line, so it gets a
linebreak, resulting in white space. The solution is to use larger
\textwidth.

We also found an actual bug, that using the `]` character in \href produced a
wrong link. I hopefully fixed that in the sources.

___

Reply to this item at:

  

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



[tex4ht] [bug #620] tex4ht breaks URL text leading to empty spaces between words generated in final HTML when \urldef

2024-01-15 Thread Nasser M. Abbasi
URL:
  

 Summary: tex4ht breaks URL text leading to empty spaces
between words generated in final HTML when \urldef
 Project: tex4ht
Submitted by: nma123
Submitted on: Mon Jan 15 23:27:58 2024
Category: None
Priority: 5 - Normal
Severity: 5 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any

___

Details:

reference and screen shot at

https://tex.stackexchange.com/questions/707149/tex4ht-breaks-url-text-leading-to-empty-spaces-between-words-generated-in-final

I use \urldef in order to make href, because the names are folder/file path
which can contain many different strange characters.

This works fine in PDF with lualatex. But I noticed that the HTML generated by
tex4ht breaks the names into 2 lines, which causes BLANK space to show in the
name when looking at it on the screen in the page. This makes it hard to read
sometimes. Here is MWE


\documentclass[12pt,oneside]{book}
\usepackage{hyperref} 
\usepackage{url}

\begin{document}

\section{Tests completed}
\begin{enumerate}
\item
\urldef\mytarget\nolinkurl{test_cases/rubi_tests/0_Independent_test_suites/1_Apostol_Problems}
\href{test_cases/rubi_tests/0_Independent_test_suites/1_Apostol_Problems/output/report.htm}{\mytarget}
\hspace{5pt}  [175]
\item
\urldef\mytarget\nolinkurl{test_cases/rubi_tests/0_Independent_test_suites/2_Bondarenko_Problems}
\href{test_cases/rubi_tests/0_Independent_test_suites/2_Bondarenko_Problems/output/report.htm}{\mytarget}
\hspace{5pt}  [35]
\end{enumerate}
\end{document}
--

When compiled using

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

It gives

enter image description here

The reason this happens is because tex4ht breaks the name when it sees _. Here
is the raw html

--
 
 
 
 
 
 
 
 
window.MathJax = { tex: { tags: "ams", }, };  
   
 
0.1  
 Tests completed
  


 test_cases/rubi_tests/0_Independent_test_suites/1_
Apostol_Problems  [175]

 test_cases/rubi_tests/0_Independent_test_suites/2_
Bondarenko_Problems  [35]
 
 



If I edit the index.htm by hand and make the name one long line by removing
the extra CR it added, the HTML now becomes

--

 
 
 
 
 
 
 
 
window.MathJax = { tex: { tags: "ams", }, };  
   
 
0.1  
 Tests completed
  


 test_cases/rubi_tests/0_Independent_test_suites/1_Apostol_Problems
 [175]

 test_cases/rubi_tests/0_Independent_test_suites/2_Bondarenko_Problems
 [35]
 
 


--

and on screen it now looks like this

enter image description here

How to fix tex4ht so it does not break long names in href and keep the name on
same line?

TL 2023 installed few days ago on Linux.





___

Reply to this item at:

  

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