Difference between revisions of "Bold typewriter"
Jump to navigation
Jump to search
m (Added note about the change of fonts from cmttb to cmbtt, changed wording around it slightly.) |
m |
||
Line 14: | Line 14: | ||
Put this in /usr/share/texmf/tex/context/third/type-loc.tex to define the bold typewriter fonts: | Put this in /usr/share/texmf/tex/context/third/type-loc.tex to define the bold typewriter fonts: | ||
<pre> | <pre> | ||
+ | \newif\ifVeryBoldTT % turn this on, if it's not bold enough: | ||
+ | %\VeryBoldTTtrue | ||
\starttypescript [mono] [computer-modern] [size] | \starttypescript [mono] [computer-modern] [size] | ||
− | \definebodyfont [12pt] [tt] [bf=cmbtt10 at 12pt] | + | \ifVeryBoldTT |
− | \definebodyfont [11pt] [tt] [bf=cmbtt10 at 11pt] | + | \definebodyfont [12pt] [tt] [bf=cmbtt10 at 12pt] |
− | \definebodyfont [10pt] [tt] [bf=cmbtt10] | + | \definebodyfont [11pt] [tt] [bf=cmbtt10 at 11pt] |
− | \definebodyfont [9pt] [tt] [bf=cmbtt9] | + | \definebodyfont [10pt] [tt] [bf=cmbtt10] |
− | \definebodyfont [8pt] [tt] [bf=cmbtt8] | + | \definebodyfont [9pt] [tt] [bf=cmbtt9] |
+ | \definebodyfont [8pt] [tt] [bf=cmbtt8] | ||
+ | \else | ||
+ | \definebodyfont [12pt] [tt] [bf=cmttb10 at 12pt] | ||
+ | \definebodyfont [11pt] [tt] [bf=cmttb10 at 11pt] | ||
+ | \definebodyfont [10pt] [tt] [bf=cmttb10] | ||
+ | \definebodyfont [9pt] [tt] [bf=cmttb10 at 9pt] | ||
+ | \definebodyfont [8pt] [tt] [bf=cmttb10 at 8pt] | ||
+ | \fi | ||
\stoptypescript | \stoptypescript | ||
</pre> | </pre> |
Revision as of 18:39, 16 August 2004
LaTeX:
\documentclass{article} \DeclareFontShape{OT1}{cmtt}{bx}{n}{ <5><6><7><8><9><10><10.95><12><14.4><17.28><20.74><24.88>cmttb10}{} \begin{document} \texttt{Normal and \textbf{bold Typewriter.}} \end{document}
ConTeXt: Put this in /usr/share/texmf/tex/context/third/type-loc.tex to define the bold typewriter fonts:
\newif\ifVeryBoldTT % turn this on, if it's not bold enough: %\VeryBoldTTtrue \starttypescript [mono] [computer-modern] [size] \ifVeryBoldTT \definebodyfont [12pt] [tt] [bf=cmbtt10 at 12pt] \definebodyfont [11pt] [tt] [bf=cmbtt10 at 11pt] \definebodyfont [10pt] [tt] [bf=cmbtt10] \definebodyfont [9pt] [tt] [bf=cmbtt9] \definebodyfont [8pt] [tt] [bf=cmbtt8] \else \definebodyfont [12pt] [tt] [bf=cmttb10 at 12pt] \definebodyfont [11pt] [tt] [bf=cmttb10 at 11pt] \definebodyfont [10pt] [tt] [bf=cmttb10] \definebodyfont [9pt] [tt] [bf=cmttb10 at 9pt] \definebodyfont [8pt] [tt] [bf=cmttb10 at 8pt] \fi \stoptypescript
(Note that this is using the more recent cmbtt[8,9,10] family of fonts, rather than the older cmttb10 font used in the LaTeX example.)
Then, the fonts can be accessed as in this example:
\starttext {\tt Normal and \bf bold Typewriter.} \stoptext