[tex4ht] How to add custom Css code into the configuration file? @media
Nasser M. Abbasi
nma at 12000.org
Wed Aug 30 10:04:34 CEST 2023
On 8/30/2023 2:53 AM, Michal Hoftich wrote:
> Hi Nasser,
>
>> Ok, fixed. Found my mistake. I forget to escape % and #
>> when I copied the code from the .css to try it in .cfg !
>>
>> This now works in the .cfg.
>>
>
> In your case, you can use jurt \Configure{AddCss}{filename.css}. It
> will include link to the CSS file, which you need to place somewhere.
> The good thing is that you can use also URL. See
> https://www.kodymirus.cz/tex4ht-doc/Configurations.html#document-styling-using-css
> for more details.
>
> Best regards,
> Michal
Thanks Michal. This is very useful. I did not know about
\Configure{AddCss}{filename.css}
This will make it easy to put all css code in there, so I do not
have to worry about escaping stuff.
But it is not clear from the docs you have, what the search path for
the filename.css is.
i.e. now I have one global .cfg file, inside my $texmf
texmf/tex/latex/make4ht_cfg_folder/nma_mathjax.cfg
And when I compile using mak4ht ... -c nma_mathjax.cfg
from anywhere in the tree, make4ht finds it.
If I put my filename.css in the same folder as the .cfg, will
it also find it and read it during compile? Or does it have
to be in other location such as $HOME to see it?
Thanks
--Nasser
More information about the tex4ht
mailing list.