[tex4ht] How to make tex4ht insert <BR> without adding <P> also?

Nasser M. Abbasi nma at 12000.org
Mon Sep 23 10:34:28 CEST 2024


On 9/23/2024 2:43 AM, Michal Hoftich wrote:

> 
> The correct solution is to use CSS:
> 
> \Preamble{xhtml}
> \Css{.sectionTOCS{margin-bottom:2rem;}}
> \begin{document}
> \EndPreamble
> 
> Adjust the value of the margin to your desired size.
> 
> Best regards,
> Michal
> 

Thanks Michal;

Yes, using CSS is better, this way I do not have to modify
the Latex sources.

I am testing it now,. With 1rem it gives good space. Here is
screen shot of before and after

<https://12000.org/tmp/image.png>

I add these to my .cfg

\Css{.partTOCS{margin-bottom:1rem;}}
\Css{.chapterTOCS{margin-bottom:1rem;}}
\Css{.sectionTOCS{margin-bottom:1rem;}}
\Css{.subsectionTOCS{margin-bottom:1rem;}}

I only now need to find how to make the space between the section or
subsection titles and the local TOC that follows also 1rem.

Right now the vertical space there is too large as you see. I
will try to use same trick you did with CSS to make that
space also 1rem.

In PDF, they are come out same space. Not too large and
not too small. In html one has to keep doing lots of tweeking
to make the web page look as nice as in PDF.

my .cfg now is so big, I lose track of what is in it all the time.

Thanks
--Nasser


More information about the tex4ht mailing list.