I am trying to get in boldface part of a text set in a verbatim
environment.
Somehow it does not want to do boldface. However, if I try it with
italics, it does work!
Here's what I do:
\DefineVerbatimEnvironment%
{example}{Verbatim}
{fontsize=\footnotesize}
\begin{example}[commandchars=+\[\]]
A +textbf[C T C A]
T G A G T
\end{example}
Also, if I change the text `+textbf' to `+textsf[+textbf[' the outcome
is indeed boldface, but in sf font, which I do not want.
What am I overlooking? Is there no bold for typewriter font?
Inge
Not in CM. Try using courier as typewriter font.
\documentclass{article}
\usepackage{fancyvrb,courier}
\begin{document}
\DefineVerbatimEnvironment%
{example}{Verbatim}
{fontsize=\footnotesize}
\begin{example}[commandchars=+\[\]]
A +textbf[C T C A]
T G A G T
\end{example}
\end{document}
And if you want a nice looking typewriter font try BeraMono or LuxiMono.
Both on CTAN, both comming with the usual four shapes.
cheerio
ralf
txttt might also be an alternative, since at least luximono might be a bit dark
for CM
simply use
\renewcommand\ttdefault{txtt}
--
/daleif (remove RTFSIGNATURE from email address)
LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl
The recent versions of the Latin Modern fonts have bold typewriter
fonts.
\usepackage{lmodern}
will do the trick, and as a bonus won't change the look (well,
negligibly if much) of your document while having a bold tt that
matches well your other text.
Will
>Ralf Stubner wrote:
>> Martin Heller <mr_h...@yahoo.dk> writes:
>>
>>>Inge.v...@gmail.com skrev:
>>>
>>>
>>>>What am I overlooking? Is there no bold for typewriter font?
>>>
>>>Not in CM. Try using courier as typewriter font.
>>
>>
>> And if you want a nice looking typewriter font try BeraMono or LuxiMono.
>> Both on CTAN, both comming with the usual four shapes.
>>
>> cheerio
>> ralf
>
>txttt might also be an alternative, since at least luximono might be a bit dark
>for CM
>
>simply use
>
>\renewcommand\ttdefault{txtt}
LuxiMono needs to be scaled to match the height of cmr. If one does
\usepackage[scaled=.87]{luximono}
there is not much difference between luximono and txtt in darkness.
Perhaps LuxiMono is even a bit lighter (and better quality, it seems).
Personally, I don't like either of the two with cmr (both are too
dark), but I think both work OK with Times as the body font. In
that case, I use luximono with the option scaled=.85.
BeraMono is also better with similar scaling (though I think it is
still too dark for cm). Even cmtt is too dark for cmr, while courier
seems too light.
Dan
To reply by email, change LookInSig to luecking
--
Posted via a free Usenet account from http://www.teranews.com
Have you tried the light typewriter font in the Latin Modern
collection?
Given the above, it might be more to your taste. (I wrote about these
fonts earlier this year if you'd like a sample:
<http://www.tug.org/pracjourn/2006-1/robertson/>)
Will
>Dan Luecking wrote:
>> Even cmtt is too dark for cmr, while courier
>> seems too light.
>
>Have you tried the light typewriter font in the Latin Modern
>collection?
I have now. Not bad, but I'd prefer something between the
light and the medium.
I agree :)
Will