[tex4ht] How to add custom Css code into the configuration file? @media

Nasser M. Abbasi nma at 12000.org
Sat Oct 14 22:38:57 CEST 2023

On 10/14/2023 3:24 PM, Michal Hoftich wrote:
> Hi Nasser,
>> It is because it is trying to copy the style file nma.css to the output directory!
>> And so ofcourse there is no folder /styles/css/ on the Linux disk. This is
>> meant only for the web server to use from its root public_html.
> In this case, you can use this configuration instead:
> \Configure{@HEAD}{<link href='/styles/css/nma.css' rel='stylesheet'
> type='text/css' />}

Thanks Michal. THis is a very good solution. I removed \Configure{AddCss}
and replaced by the following:

You had small typo, I found I need \Hcode in there. So it is now

\Configure{@HEAD}{\HCode{<link href='/styles/css/nma.css' rel='stylesheet' type='text/css' />}}

Now I can use output directory option and no files  needs to be copiled.

>> Why is make4ht trying to copy to the output_dir what is defined in \Configure{AddCss}?
> Because that file is registered, and all registered files are copied
> to the output directory.
> Best regards,
> Michal


More information about the tex4ht mailing list.