Difference between revisions of "Bold typewriter"

From Wiki
Jump to navigation Jump to search
(spam)
m (category and texcode added)
Line 2: Line 2:
  
 
LaTeX:
 
LaTeX:
<pre>
+
<texcode>
 
\documentclass{article}
 
\documentclass{article}
 
\DeclareFontShape{OT1}{cmtt}{bx}{n}{
 
\DeclareFontShape{OT1}{cmtt}{bx}{n}{
Line 9: Line 9:
 
\texttt{Normal and \textbf{bold Typewriter.}}
 
\texttt{Normal and \textbf{bold Typewriter.}}
 
\end{document}
 
\end{document}
</pre>
+
</texcode>
  
 
ConTeXt:
 
ConTeXt:
Put this in /usr/share/texmf/tex/context/third/type-loc.tex to define the bold typewriter fonts:
+
Put this in <code>/usr/share/texmf/tex/context/third/type-loc.tex</code> to define the bold typewriter fonts:
<pre>
+
<texcode>
 
\newif\ifVeryBoldTT % turn this on, if it's not bold enough:
 
\newif\ifVeryBoldTT % turn this on, if it's not bold enough:
 
%\VeryBoldTTtrue
 
%\VeryBoldTTtrue
Line 31: Line 31:
 
\fi
 
\fi
 
\stoptypescript
 
\stoptypescript
</pre>
+
</texcode>
  
<tt>cmbtt[8,9,10]</tt> is the more recent family of fonts and bolder than the older <tt>cmttb10</tt> font.
+
<code>cmbtt[8,9,10]</code> is the more recent family of fonts and bolder than the older <code>cmttb10</code> font.
  
 
Then, the fonts can be accessed as in this example:
 
Then, the fonts can be accessed as in this example:
<pre>
+
<texcode>
 
\starttext
 
\starttext
 
{\tt Normal and \bf bold Typewriter.}
 
{\tt Normal and \bf bold Typewriter.}
 
\stoptext
 
\stoptext
</pre>
+
</texcode>
 +
 
 +
[[Category:Fonts]]
 +
[[Category:From LaTeX]]

Revision as of 16:53, 11 August 2005

< From LaTeX to ConTeXt

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

cmbtt[8,9,10] is the more recent family of fonts and bolder than the older cmttb10 font.

Then, the fonts can be accessed as in this example:

\starttext
{\tt Normal and \bf bold Typewriter.}
\stoptext