1

pdftex sets the box in the mwe below correctly with a centered, large, bold title.

However with tex4ebook it is neither centered nor bold and large.

Please help me set a centered, bold, larger font size Title in tcolorbox using tex4ebook to make epub format.

mwe:

\documentclass{book}
\usepackage[most]{tcolorbox}

\begin{document}

\begin{tcolorbox}[colback=black!5,
    colframe=black!5,
    title={Top Title},
    coltitle=black, 
    fonttitle=\bfseries\Huge\centering, % in epub is not centered, bold, or big
    sharp corners,
    enhanced,
    breakable,
]

  My box.

\end{tcolorbox}
    
\end{document}

1 Answer 1

2

You can style the tcolorbox title using CSS. Try this configuration file, config.cfg:

\Preamble{xhtml}
\Css{.tcolorbox-title{text-align:center;font-weight:bold;font-size: 1.4rem;}}
\begin{document}
\EndPreamble

Compile using:

$ tex4ebook -c config.cfg sample.tex

This is the result:

enter image description here

1
  • Thank you!!! Wonderful.
    – David B
    Jun 8, 2023 at 23:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .