[tex4ht] bolding tt font.

Beuthe, Thomas beuthet at aecl.ca
Wed Mar 21 19:10:39 CET 2012


UNRESTRICTED | ILLIMITÉ

 

Dear Wojtek,

 

Thanks for your timely reply!

This solution is perfect for me.

Although the actual situation in my document is far more complicated than the simple

example I have illustrated here, I should be able to easily incorporate your suggested solution into it.

 

Thanks again!

 

Thomas

 

 

From: Wojciech Myszka [mailto:wojciech.myszka at gmail.com] 
Sent: 21-Mar-12 11:36 AM
To: Beuthe, Thomas
Cc: tex4ht at tug.org
Subject: Re: [tex4ht] bolding tt font.

 

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/a012002f/attachment.html>


More information about the tex4ht mailing list