[tex4ht] bolding tt font.

Wojciech Myszka wojciech.myszka at gmail.com
Wed Mar 21 16:35:44 CET 2012


Dear Thomas,

In general everything is OK. Standard LaTeX (whatever that mean) doesn't
have bold variant of typewriter (monospace) font. So TeX4ht follows LaTeX
rules.

You can use Latin Modern fonts (instead of standard Computer Modern) via
package lmodern. They have bold variant. There is only small problem with
TeX4ht – it doesn't follow this font exactly, but adding one command to css
file solves the problem. Try this:

\documentclass{report}

\usepackage{lmodern}  % <-- lmodern package


\usepackage{ulem}

\begin{document}


\Css{.rm-lmtk-10{ font-weight: bold;}} % <-- extra command to css file


Test fonts and bolding, when producing html with tt type font.

 regular text.

 \uline{underlined regular text}

 \textbf{bolded regular text}

 \uline{\textbf{bolded underlined regular text}}

 \texttt{tt font text}

 \texttt{\uline{underlined tt font text}}

 \texttt{\textbf{bolded tt font text}}

 \texttt{\uline{\textbf{bolded underlined tt font text.}}}

 \end{document}


Regards

Wojtek


2012/3/21 Beuthe, Thomas <beuthet at aecl.ca>

>  *UNRESTRICTED | ILLIMITÉ*
>
> * *
>
> I am trying to get bolded tt font to produce a monospaced font in the
> resulting html using  a simple “htlatex filename” compile.****
>
> ** **
>
> Consider the following small test file:****
>
> ** **
>
> \documentclass{report} ****
>
> \usepackage{ulem}****
>
> \begin{document}****
>
> Test fonts and bolding, when producing html with tt type font.****
>
> ** **
>
> regular text.****
>
> ** **
>
> \uline{underlined regular text}****
>
> ** **
>
> \textbf{bolded regular text}****
>
> ** **
>
> \uline{\textbf{bolded underlined regular text}}****
>
> ** **
>
> \texttt{tt font text}****
>
> ** **
>
> \texttt{\uline{underlined tt font text}}****
>
> ** **
>
> \texttt{\textbf{bolded tt font text}}****
>
> ** **
>
> \texttt{\uline{\textbf{bolded underlined tt font text.}}}****
>
> ** **
>
> \end{document}****
>
> ** **
>
> ** **
>
> Everything works fine except for the last two lines which do not produce a
> bolded monospaced font.****
>
> The underline shows up in the last line but neither the last line, nor the
> line above it produce a bolded font.****
>
> (I am using a standard install of TeXLive 2011 on a Windows 7 64 bit
> machine.)****
>
> ** **
>
> Try it and see.  The css files does not use a monospaced definition.****
>
> ** **
>
> Am I doing something wrong?****
>
> Any advice?****
>
> ** **
>
> ** **
>
> Thomas Beuthe****
>
> ** **
>
>  ****
>



-- 
---(___C'>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex4ht/attachments/20120321/6b9158be/attachment-0001.html>


More information about the tex4ht mailing list