Difference between revisions of "Bold typewriter"

From Wiki
Jump to navigation Jump to search
m (bold typewritter should land into type-siz.tex)
Line 1: Line 1:
< [[From LaTeX to ConTeXt]] >
< [[From LaTeX to ConTeXt]] >
== LaTeX ==
Yijdcd  <a href="http://dircbosexqfp.com/">dircbosexqfp</a>, [url=http://paxunvfgasel.com/]paxunvfgasel[/url], [link=http://jqbcqnagsgpw.com/]jqbcqnagsgpw[/link], http://kltuwbkfqlqf.com/
In LaTeX, one can declare <code>cmttb10</code> as a boldface version of <code>cmtt</code> and then use it with the standard <code>\texttt</code> and <code>\textbf</code> commands.
\texttt{Normal and \textbf{bold Typewriter.}}
== ConTeXt ==
== ConTeXt ==

Revision as of 19:18, 9 November 2010

< From LaTeX to ConTeXt >

Yijdcd <a href="http://dircbosexqfp.com/">dircbosexqfp</a>, [url=http://paxunvfgasel.com/]paxunvfgasel[/url], [link=http://jqbcqnagsgpw.com/]jqbcqnagsgpw[/link], http://kltuwbkfqlqf.com/


The exact same thing can be done in ConTeXt, although the syntax is slightly more verbose.

\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]

{\tt Normal and \bf bold Typewriter.}

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 /usr/share/texmf/tex/context/third/type-loc.tex. The version shown here also uses the newer (and bolder) cmbtt family; to use the older cmttb10 fonts, uncomment them and comment out the other set.

\starttypescript [mono] [computer-modern] [size]
% Newer, more-bold version of the bold typewriter fonts.
  \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]
%% Older, less-bold version of the bold typewriter fonts.
%  \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]

Then, the fonts can be accessed without any additional setup in the documents, as in this example:

{\tt Normal and \bf bold Typewriter.}

The support for bold typewriter exists also as a module: http://pmrb.free.fr/work/OS/ConTeXt/

(But it would be great if those definitions were a part of type-siz.tex; --Mojca)