Difference between revisions of "Rsfs"

From Wiki
Jump to navigation Jump to search
m (moved rsfs to Rsfs: move to Uppercase)
(4 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
== Using Ralph Smith Formal Font ==
 
== Using Ralph Smith Formal Font ==
  
Ralph Smith's Formal Font [http://www.ctan.org/tex-archive/fonts/rsfs/] provides a bit more cursive calligraphic symbols. They can be used inside ConTeX by
+
TeX provides calligraphic alphabets, which can be accessed using <cmd>cal</cmd> however, there are no script alphabets in Computer Modern or Latin Modern. Raph Smith's Formal Font [http://www.ctan.org/tex-archive/fonts/rsfs/] provides script alphabets that blend well with Computer Modern and Latin Modern. They can be used inside ConTeXt as follows
  
 
<context source="yes">
 
<context source="yes">
Line 14: Line 14:
 
\definefamilysynonym [default] [scriptfamily] [mc]
 
\definefamilysynonym [default] [scriptfamily] [mc]
  
\def\scr{\fam\purefamily{scriptfamily}}
+
\def\scr{\fam\purefamily{scriptfamily}} % To use ${\scr ABC}$
 +
\def\script#1{{\scr#1}}                % To use $\script{ABC}$
  
 
\definetypeface [modern] [mm] [math] [modern] [ams] [encoding=texnansi]
 
\definetypeface [modern] [mm] [math] [modern] [ams] [encoding=texnansi]
Line 30: Line 31:
 
</context>
 
</context>
  
I less precise method of using them is
+
== Improper ways to use the font ==
  
 +
These methods are listed for people who want a stop gap solution for other fonts. These should not be used for RSFS.
 +
 +
* The first method is to use rsfs10 for all font sizes
 
<context source="yes">
 
<context source="yes">
 
  \def\mathrsfs#1{\text{\definedfont[RalfSmithFormalScript]#1\/}}
 
  \def\mathrsfs#1{\text{\definedfont[RalfSmithFormalScript]#1\/}}
 
  \mathrsfs{ABCDEFGHIJKLMNOPQRSTUVWXYZ}  
 
  \mathrsfs{ABCDEFGHIJKLMNOPQRSTUVWXYZ}  
 
</context>
 
</context>
 
which does not use the correct font size. rsfs10 is used for bodyfont, scriptsize and scriptscriptsize.
 
 
 
'''Note:''' Since this is an italic script, one needs italic correction <code>\/</code> in the definition.
 
'''Note:''' Since this is an italic script, one needs italic correction <code>\/</code> in the definition.
  
 
+
* The ''plain tex'' way of using the font is:
 
 
The ''plain tex'' way of using the font is:
 
 
<texcode>
 
<texcode>
 
  \font\tenscr  = rsfs10 at 12pt %bodyfontsize
 
  \font\tenscr  = rsfs10 at 12pt %bodyfontsize
Line 62: Line 61:
  
 
</texcode>
 
</texcode>
 
 
With these defintions one can use <cmd>scr</cmd> just like <cmd>cal</cmd>. This method has the advantage that it uses different fonts (rsfs10, rsfs7, rsfs5) in body script and scriptscipt.
 
With these defintions one can use <cmd>scr</cmd> just like <cmd>cal</cmd>. This method has the advantage that it uses different fonts (rsfs10, rsfs7, rsfs5) in body script and scriptscipt.
  

Revision as of 16:28, 10 September 2012

< Main Page | Math with newmat | MathML | Multiline equations>

Using Ralph Smith Formal Font

TeX provides calligraphic alphabets, which can be accessed using \cal however, there are no script alphabets in Computer Modern or Latin Modern. Raph Smith's Formal Font [1] provides script alphabets that blend well with Computer Modern and Latin Modern. They can be used inside ConTeXt as follows

\starttypescript [math] [modern,computer-modern,latin-modern,ams] [size]
     \definebodyfont [17.3pt,14.4pt,12pt,11pt,10pt,9pt][mm][mc=rsfs10 sa 1]
     \definebodyfont [8pt,7pt] [mm] [mc=rsfs7 sa 1]
     \definebodyfont [6pt,5pt,4pt] [mm] [mc=rsfs5 sa 1]
\stoptypescript

\definefamilysynonym [default] [scriptfamily] [mc]

\def\scr{\fam\purefamily{scriptfamily}} % To use ${\scr ABC}$
\def\script#1{{\scr#1}}                 % To use $\script{ABC}$

\definetypeface [modern] [mm] [math] [modern] [ams] [encoding=texnansi]

\setupbodyfont[reset,modern,11pt]

\starttext

${\scr ABCDEFGHIJKLMNOPQRSTUVWXYZ}$

$\sum_{\scr ABCDEFGHIJKLMNOPQRSTUVWXYZ}$

\stoptext

Improper ways to use the font

These methods are listed for people who want a stop gap solution for other fonts. These should not be used for RSFS.

  • The first method is to use rsfs10 for all font sizes
 \def\mathrsfs#1{\text{\definedfont[RalfSmithFormalScript]#1\/}}
 \mathrsfs{ABCDEFGHIJKLMNOPQRSTUVWXYZ} 

Note: Since this is an italic script, one needs italic correction \/ in the definition.

  • The plain tex way of using the font is:
 \font\tenscr   = rsfs10 at 12pt %bodyfontsize
 \font\sevenscr = rsfs7  at 9pt  %scriptfontsize
 \font\fivescr  = rsfs5  at 7pt  %scriptscriptfontsize

 \skewchar\tenscr   = '177
 \skewchar\sevenscr = '177
 \skewchar\fivescr  = '177

 \newfam\scrfam

 \textfont\scrfam         = \tenscr
 \scriptfont\scrfam       = \sevenscr
 \scriptscriptfont\scrfam = \fivescr

 \def\scr{\fam\scrfam}

With these defintions one can use \scr just like \cal. This method has the advantage that it uses different fonts (rsfs10, rsfs7, rsfs5) in body script and scriptscipt.