Does anyone know how the "Computer Modern Typewriter Proportional" font would be specified in ConTeXt? In Latex is is specified as follows: \usepackage[T1]{fontenc} \renewcommand*\ttdefault{cmvtt} \renewcommand*\familydefault{\ttdefault} %% Only if the base font of the document is to be typewriter style See: http://www.tug.dk/FontCatalogue/cmvtt/ Any help would be appreciated!
On 2011-01-09 <19:31:24>, Raymond LeClair wrote:
Does anyone know how the "Computer Modern Typewriter Proportional" font would be specified in ConTeXt?
In Latex is is specified as follows:
\usepackage[T1]{fontenc} \renewcommand*\ttdefault{cmvtt} \renewcommand*\familydefault{\ttdefault} %% Only if the base font of the document is to be typewriter style
See: http://www.tug.dk/FontCatalogue/cmvtt/
Any help would be appreciated!
Hello Raymond, there’s two ways I know of: 1. for *latin* modern, use the typescript “modern-variable”; 2. for *cm unicode*, redefine the mono typefaces. (Of course, if yow need exactly cm then this might not help you at all, sorry.) Here’s an example to demonstrate both. ·····8<·························································· \usetypescriptfile[type-cmu] \unprotect \starttypescript [\s!mono] [computer-modern-unicode] % by default cmu does not define the variable width mono faces \setups[\s!font:\s!fallback:\s!mono] \definefontsynonym [\s!Mono] [CMUTypewriter-Variable] [\s!features=\s!default] \definefontsynonym [\s!MonoItalic] [CMUTypewriter-VariableItalic] [\s!features=\s!default] \stoptypescript \protect \usetypescript [computer-modern-unicode] % for cmu \usetypescript [modern-variable] % for lm %\usetypescript [modern-variable-light] % alternative for lm \setupbodyfont [computer-modern-unicode] \starttext {\tt\input knuth\par} % testing cmu {\tt\italic\input knuth\par} % testing cmu-it {\switchtobodyfont[modernvariable]\tt\input knuth\par} % testing lm \stoptext ·····8<·························································· Regards, Philipp Btw, modern-variable causes different line breaks than ordinary lm-tt but it does not appear to be as proportional as the cmu version. Did I do something wrong?
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
This is terrific! Thank you. On Jan 10, 2011, at 3:36 AM, Philipp Gesang wrote:
On 2011-01-09 <19:31:24>, Raymond LeClair wrote:
Does anyone know how the "Computer Modern Typewriter Proportional" font would be specified in ConTeXt?
In Latex is is specified as follows:
\usepackage[T1]{fontenc} \renewcommand*\ttdefault{cmvtt} \renewcommand*\familydefault{\ttdefault} %% Only if the base font of the document is to be typewriter style
See: http://www.tug.dk/FontCatalogue/cmvtt/
Any help would be appreciated!
Hello Raymond,
there’s two ways I know of: 1. for *latin* modern, use the typescript “modern-variable”; 2. for *cm unicode*, redefine the mono typefaces. (Of course, if yow need exactly cm then this might not help you at all, sorry.) Here’s an example to demonstrate both.
·····8<··························································
\usetypescriptfile[type-cmu]
\unprotect \starttypescript [\s!mono] [computer-modern-unicode] % by default cmu does not define the variable width mono faces \setups[\s!font:\s!fallback:\s!mono] \definefontsynonym [\s!Mono] [CMUTypewriter-Variable] [\s!features=\s!default] \definefontsynonym [\s!MonoItalic] [CMUTypewriter-VariableItalic] [\s!features=\s!default] \stoptypescript \protect
\usetypescript [computer-modern-unicode] % for cmu \usetypescript [modern-variable] % for lm %\usetypescript [modern-variable-light] % alternative for lm
\setupbodyfont [computer-modern-unicode]
\starttext
{\tt\input knuth\par} % testing cmu {\tt\italic\input knuth\par} % testing cmu-it {\switchtobodyfont[modernvariable]\tt\input knuth\par} % testing lm
\stoptext
·····8<··························································
Regards, Philipp
Btw, modern-variable causes different line breaks than ordinary lm-tt but it does not appear to be as proportional as the cmu version. Did I do something wrong?
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
participants (2)
-
Philipp Gesang
-
Raymond LeClair