bugtex4ht - Bugs: bug #579, tex4ht does not handle listing...

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #579: tex4ht does not handle listing correctly when using smaller font size

Submitted by:  Nasser M. Abbasi <nma123>
Submitted on:  Fri Oct 28 07:50:56 2022  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Sat Oct 29 12:12:50 2022, comment #1:

Hi Nasser,

I've posted my answer at TeX.sx. I don't think that it is universally useful, so I won't add it to TeX4ht sources. The issue with wrong size of spaces should be fixed by the current make4ht version.

Best,
Michal

Michal Hoftich <michal_h21>
Project Member
Fri Oct 28 07:50:56 2022, original submission:

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

Nasser M. Abbasi <nma123>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by michal_h21 (Posted a comment)
  • -unavailable- added by nma123 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    1 latest change follows.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Nov 29 10:07:00 2022michal_h21Open/ClosedOpen=>Closed
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray