bugtex4ht - Bugs: bug #412, tex4ht \Css code works using...

 
 
Show feedback again

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

bug #412: tex4ht \Css code works using standard document class but has no effect using koma-script class

Submitted by:  Nasser M. Abbasi <nma123>
Submitted on:  Mon Feb 11 03:35:29 2019  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Mon Aug 19 01:19:01 2019, comment #2:

i guess conclusion is not a bug? closing.

Karl Berry <karl>
Project Administrator
Fri Mar 15 14:56:44 2019, comment #1:

Hi Nasser,

I don't think it was a bug, it was just the fact that different elements were used in configurations for Komascript and base classes.

Anyway, since HTML5 provides <figure> and <figcaption> elements, the configurations for floats, figures and captions will use these in the html5 output.

Best,
Michal

Michal Hoftich <michal_h21>
Project Member
Mon Feb 11 03:35:29 2019, original submission:

I think this is a bug, so to be safe, I am reporting here as well.

Cross posted at

https://tex.stackexchange.com/questions/474282/tex4ht-css-code-works-using-standard-book-class-but-has-no-effect-using-koma-sc

I am using a \Css configuration which centers a caption under a figure thanks to https://tex.stackexchange.com/questions/472625/how-to-make-caption-be-centered-under-table-when-using-tex4ht

Now I find this does not work if I change document class to koma-script !

Here is a MWE

----------------
%\documentclass[11pt]{scrbook}
\documentclass[11pt]{book}

\usepackage{graphicx}
\usepackage{float}

\begin{document}

\begin{figure}[H]
\centering
\includegraphics[width=0.5\textwidth]{example-image-b}
\caption{test image}
\end{figure}

\end{document}
--------------------------------

Now compiled using make4ht -c my.cfg where my.cfg is

\Preamble{xhtml}
\Css{div.caption{text-align:center;}}
\Css{div.figure img {text-align:center;display:block;margin-left:auto; margin-right: auto;}}
\begin{document}
\EndPreamble

Gives the expected output with the caption right under the image.

Now changed the document to

\documentclass[11pt]{scrbook}

And making no other changes and compiling again using same command, gives the caption no longer centered under the image. Meaning the CSS code had no effect.

Why would changing the document class makes the CSS configuration have no effect?

TL 2018

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 karl (Posted a comment)
  • -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
    Mon Aug 19 01:19:01 2019karlOpen/ClosedOpen=>Closed
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray