[tex4ht] tex4ht do not change title font size like PDF does.

Michal Hoftich michal.h21 at gmail.com
Wed Sep 25 11:32:00 CEST 2024


Hi Nasser,


But I think tex4ht should modify it if user asks to
> change it as in this example.
>

I am afraid it is not possible in general and not in this particular case.
In general, we need to create semantic HTML that can be styled using CSS.

One might want to change title size for different web pages
> and it is not practical to use make separate CSS style for
> each page that matches the font size they happened
> to use in Latex each time. This I think should be done
> automatically by the software. Right?
>

Well, you can try this configuration which keeps the title styling:

%%%%%%%%%%%%%%%%%%
\Preamble{xhtml}

\begin{document}
\catcode`\:=11
\makeatletter
\Configure{maketitle}
   {\ifvmode \IgnorePar\fi \EndP {\Configure{maketitle}{}{}{}{}%
\a:NoSection \let\leavevmode\empty \let\not at math@alphabet\:gobbleII
\def\text at command##1{##1}\let\selectfont\empty
\def\check at icl ##1\check at icr{}%
\let\thanks\:gobble
\def\TeX{TeX}%
\def\mbox{\hbox}%
\def\gobble:font##1##2{##2}\:TITLE: \no:fonts
\def\footnotemark[##1]{}%
\def\:hashintitle{\protect\symbol{35}}
\let\#\:hashintitle
\Tag{TITLE+}{\@title}}
%
    \HCode{<div class="maketitle">}}
   {\ifvmode \IgnorePar\fi \EndP \HCode{</div>}}
   {\IgnorePar\HCode{<div class="titleHead"\a:LRdir>}\IgnorePar}
   {\HCode{</div>}\IgnoreIndent}
\makeatother
\catcode`\:=12
\EndPreamble
%%%%%%%%%%%%%%%%%%%%%%

But I don't think it is a good idea.

Best regards,
Michal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/tex4ht/attachments/20240925/9ef3545e/attachment.htm>


More information about the tex4ht mailing list.