michal-h21 / make4ht

Build system for tex4ht
131 stars 15 forks source link

make4ht does suppress itemize and enumerate - environments #146

Closed MichaelJachan closed 2 months ago

MichaelJachan commented 3 months ago

Dear Author! No matter what options i put, no matter what .cfg file i use, since several months (of updating MiKTeX), the HTML output has changed:

The content of itemize-environment is just skipped.

If needed, i can give u an MWE lateron.

Thank you, Michael:)

michal-h21 commented 3 months ago

Hi Michael,

this is not expected. I've just tried a small test file with itemize and it was converted without problems. Maybe it is caused by some package you use? I think MWE is necessary for this issue.

MichaelJachan commented 3 months ago

Good to hear. I will analyze on my side and tell u later. Thank you:)

MichaelJachan commented 2 months ago

Would you give me your MWE?

tex source? cfg file? call to htlatex, etc?

Best, MJ:)

michal-h21 commented 2 months ago

Sure, the following TeX file:

\documentclass{article}
\begin{document}
Before itemize

\begin{itemize}
  \item first item
  \item second item
\end{itemize}

After itemize
\end{document}

compiled using:

  make4ht sample.tex

Should produce this HTML:

<!DOCTYPE html> 
<html lang='en-US' xml:lang='en-US'> 
<head><title></title> 
<meta charset='utf-8' /> 
<meta content='TeX4ht (https://tug.org/tex4ht/)' name='generator' /> 
<meta content='width=device-width,initial-scale=1' name='viewport' /> 
<link href='[sample.css](view-source:file:///home/mint/texexamples/misc/stackexchange/tex4ht/michaeljachan/itemize/sample.css)' rel='stylesheet' type='text/css' /> 
<meta content='sample.tex' name='src' /> 
</head><body>
<!-- l. 3 --><p class='noindent'>Before itemize
</p>
     <ul class='itemize1'>
     <li class='itemize'>first item
     </li>
     <li class='itemize'>second item</li></ul>
<!-- l. 10 --><p class='indent'>   After itemize
</p>

</body> 
</html>
MichaelJachan commented 2 months ago

Thank you. Another question: is it necessary to run pdflatex or latex before calling make4ht sample.tex?

And what about bibtex/makeindex/glossaries?

michal-h21 commented 2 months ago

You can run pdflatex before make4ht, but it is not necessary. bibtex and glossaries should work out of the box, but for indexing, you will need a build file: https://www.kodymirus.cz/tex4ht-doc/Howto.html#indexing

MichaelJachan commented 2 months ago

It all works. I did something wrong in a sed-based postprocessing of the HTML file.

Sorry and thank you :)