When I compile to PDF this latex file


\title{\footnotesize my title}

This is a test

The fontsize of the title changes correctly to \footnotesize. But when tex4ht ignores the fontsize change request and always shows the title in very large font. Compiled using make4ht bug.tex

Mathematica graphics

I simply wanted to make the title font smaller.

Why does tex4ht ignore font size command in the title? Is this a known issue? Is there a workaround? I tried all other sizes, \small etc.. non of them work in tex4ht like in pdf.

which tex4ht
  • The generated .css file has h2.titleHead{text-align:center;}. As you should know, changing the appearance of the title should be a job of \maketitle, not of formatting instructions in the argument to \title. It seems that tex4ht enforces this.
    – egreg
    May 18, 2017 at 6:55
  • it is so completely wrong to have a size command in the argument to \title why would you expect it to be supported by default? May 18, 2017 at 6:57

1 Answer 1


As David and Egreg said, it is not really a good idea to put formatting commands to \title. It's contents are used at two places, at place where \maketitle was used in the document, and in the <title> element.

<title> should contain only text, so it could be harmful if any formatting elements were included here. tex4ht tries to clean it, but some rubbish can end here when you use anything but text in your \title, resulting in invalid HTML. You can use \Configure{TITLE+}{alternative title} in such cases.

You have issue with other \title use, in the \maketitle. In this place, font processing is disables with \NoFonts ...EndNoFonts`. You either should use some CSS to style it according to your wishes:


which is preferred way, or you can use alternative configuration for maketitle, which doesn't suppress the font processing:

\Configure{maketitle}{\ifvmode\IgnorePar\fi \EndP\HCode{<div class="maketitle">}}
{\IgnorePar\HCode{<div class="title">}\IgnorePar}


This is the result:

enter image description here

As I said, I would use the CSS styling.

You must log in to answer this question.

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