[tex4ht] [bug #579] tex4ht does not handle listing correctly when using smaller font size
Nasser M. Abbasi
puszcza-hackers at gnu.org.ua
Fri Oct 28 09:50:56 CEST 2022
URL:
<http://puszcza.gnu.org.ua/bugs/?579>
Summary: tex4ht does not handle listing correctly when using
smaller font size
Project: tex4ht
Submitted by: nma123
Submitted on: Fri Oct 28 07:50:56 2022
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 shots at
https://tex.stackexchange.com/questions/663305/tex4ht-does-not-handle-listing-correctly-when-using-smaller-font-size
tex4ht destroys code alignment when using basicstyle=\small (with or without
font family being given) compare to when not using basicstyle. This only
happens in the HTML. The pdf is correct. Here is a MWE
--------------------------
\documentclass[12pt]{article}
\usepackage{listings}
\begin{document}
\begin{lstlisting}[language={},keepspaces=true,basicstyle=\small]
local case_one_gamma_entry := module()
option object;
export pole_location := 0;
export pole_order := 0;
export sqrt_r := 0;
export alpha_plus := 0;
export alpha_minus := 0;
export b := 0;
end module;
\end{lstlisting}
\begin{lstlisting}[language={},keepspaces=true]
local case_one_gamma_entry := module()
option object;
export pole_location := 0;
export pole_order := 0;
export sqrt_r := 0;
export alpha_plus := 0;
export alpha_minus := 0;
export b := 0;
end module;
\end{lstlisting}
\end{document}
----------------------
compiled with
make4ht -ulm default -a warning foo2.tex "mathjax,htm"
This is the HTML
<screen shot at link>
No problem in PDF.
I like to user smaller font size in the HTML. Is there a way to make tex4ht
not change the source code when using smaller font size? I also tried
basicstyle=\ttfamily\small but no effect.
TL 2022.
>which tex4ht
/usr/local/texlive/2022/bin/x86_64-linux/tex4ht
>make4ht --version
make4ht version v0.3l
_______________________________________________________
Reply to this item at:
<http://puszcza.gnu.org.ua/bugs/?579>
_______________________________________________
Message sent via/by Puszcza
http://puszcza.gnu.org.ua/
More information about the tex4ht
mailing list.