On May 13, 4:57 pm, John H Palmieri <jhpalmier...@gmail.com> wrote:
> On May 13, 9:49 am, Brian Hawkins <hawkins.br...@gmail.com> wrote:
>
>
>
>
>
> > I did not know about the %latex command, thanks for the tip.
>
> > Looking at the symbol table, I found one that serves my particular
> > purpose well: \top.  $M^\top$ renders as I'd like for a transpose and
> > avoids using an unsupported font in jsMath.
>
> > Brian
>
> > On May 12, 4:55 am, Jason Grout <jason-s...@creativetrax.com> wrote:
>
> > > Rob Beezer wrote:
> > > > Hi Brian,
>
> > > > In a notebook cell, I enter and evaluate:
>
> > > > %latex
> > > > $M^\mathsf{T}$
>
> > > > and get back a slanted M and a very crisp, upright superscript T.  So
> > > > it can be done, but this is accomplished by running a full-blown
> > > > instance of TeX and creating a PNG graphic as output.  $M^{\sf T}$
> > > > looks to render identically.
>
> > > > I get the error you mention when I add $M^\mathsf{T}$ via the TinyMCE
> > > > editor (shift-click on a blue bar).  I think this gets interpreted by
> > > > jsMath, so any fonts will come from jsMath.  From here I'm not sure
> > > > how to proceed, but maybe this will be enough for somebody else to
> > > > show the way forward.
>
> > > Searching in the jsmath source shows that \mathrm and \rm are defined,
> > > but \mathsf and \sf don't seem to be defined.
>
> > > Davide, does jsmath implement san serif fonts?
>
> > > Thanks,
>
> > > Jason
>
> This was posted on the jsMath help 
> forum,http://sourceforge.net/forum/forum.php?forum_id=592273:
>
> By: Davide P. Cervone (dpvc) - 2009-05-12 15:17
> No, there is no mathsf at this point. There are two possible solutions
> that I can see.
>
> The cheap but easy one is to do a definition like the following:
>
> \def\mathsf#1{\style{font-family:sanserif}{\hbox{#1}}}
>
> or
>
> jsMath.Macro('mathsf','\\style{font-family:sanserif}{\\hbox{#1}}',1);
>
> if you include it in a JavaScript file. Some disadvantages: it will
> always be at the normal text size (so won't get smaller for super- or
> sub-scripts, for example), and it will use the browser's default sans-
> serif font, not a TeX font, so it might not match the rest of the TeX
> output as well. There may also be some spacing issues, as jsMath
> doesn't really know the sizes of the characters. But it is easy to do
> and may be sufficient for your needs.
>
> The other approach is to make a new jsMath "extra font" for mathsf,
> like the ones for the other extra fonts (msam10, etc). The tools for
> doing this are on the jsMath website at
>
> http://www.math.union.edu/locate/jsMath/authors/making-fonts.html
>
> but you will have to figure out which TeX font you want to use for the
> \mathsf font. Probably cmss10 would do.
>
> Davide

More from Davide:

By: Davide P. Cervone (dpvc) - 2009-05-13 21:43
OK, I built the cmss10 font files and put them on the extra-fonts
download page at

http://www.math.union.edu/~dpvc/jsMath/download/extra-fonts/

where you can download the image fonts to install on your server, and
the TTF files for your clients. Loading the cmss10 font will cause the
\mathsf command to be defined. It is also possible to make the \mathsf
command be predefined to load the cmss font when it is first used (so
you don't have the overhead of loading the cmss font when it is not
used). To do this, use the commands

jsMath.Macro("mathsf","{\\cmss #1}",1);
jsMath.Extension.Font("cmss");

Hope that takes care of your needs.

Davide

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to