Jump to navigation Jump to search
857 bytes added ,  01:23, 4 September 2005
Clarified and expanded.
< [[From LaTeX to ConTeXt]]> == LaTeX == In LaTeX, one can declare <code>cmttb10</code> as a boldface version of <code>cmtt</code> and then use i with the standard <code>\texttt</code> and <code>\textbf</code> commands.
== ConTeXt:==Put The exact same thing can be done in ConTeXt, although the syntax is slightly more verbose. <texcode>\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] \starttext{\tt Normal and \bf bold Typewriter.}\stoptext</texcode> However, instead of requiring that this be defined in each document, ConTeXt also provides the possibility of including it automatically as part of the default font setups. This can be done by putting the following typescript definitions in <code>/usr/share/texmf/tex/context/third/type-loc.tex</code> to define . The version shown here also includes a switch between <code>cmttb10</code> and the bold typewriter fonts:newer (and bolder) <code>cmbtt</code> family. 
\newif\ifVeryBoldTT % turn this on, if it's not bold enough:
<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 without any additional setup in the documents, as in this example:

Navigation menu