ZZ, RR, etc.: mathbb vs. mathbf

512 views
Skip to first unread message

John H Palmieri

unread,
Mar 24, 2009, 12:58:51 PM3/24/09
to sage-devel
Currently the latex methods for ZZ, RR, etc. all used mathbf -- plain
boldface -- rather than mathbb -- 'blackboard' bold. See also the (not
currently in use) file SAGE_ROOT/devel/sage/doc/common/macros.tex:
lots of mathbf, no mathbb.

Is this an official style choice for Sage, or did it just
spontaneously occur?

What do you think of this choice? (I happen to prefer mathbf.)

Would it be worthwhile to have it user-customizable somehow? We could
have a command \sagebold or \ring or something, which might be \mathbf
by default, but if you set a variable or call a function, it would
change to \mathbb. (I am willing to implement this, but are there
similar configurable options in Sage on which I could model it?)

John

William Stein

unread,
Mar 24, 2009, 1:15:50 PM3/24/09
to sage-...@googlegroups.com
On Tue, Mar 24, 2009 at 9:58 AM, John H Palmieri <jhpalm...@gmail.com> wrote:
>
> Currently the latex methods for ZZ, RR, etc. all used mathbf -- plain
> boldface -- rather than mathbb -- 'blackboard' bold. See also the (not
> currently in use) file SAGE_ROOT/devel/sage/doc/common/macros.tex:
> lots of mathbf, no mathbb.
>
> Is this an official style choice for Sage, or did it just
> spontaneously occur?

I "officially" chose it for the same reason I chose mathbb in all the
books/articles I wrote, which is that numerous people in publishing
convinced me that it is a better choice.

> What do you think of this choice?  (I happen to prefer mathbf.)

I personally like it, since I made it.

> Would it be worthwhile to have it user-customizable somehow?  We could
> have a command \sagebold or \ring or something, which might be \mathbf
> by default, but if you set a variable or call a function, it would
> change to \mathbb.  (I am willing to implement this, but are there
> similar configurable options in Sage on which I could model it?)

I definitely think it would be worthwhile to have it
user-customizable. I think one of the best configurable options in
Sage is the proof object (type pro[tab]). This suggests maybe an
object, called maybe "tex", "typeset", or "latex", or something, which
has well-documented functions for each option one might want to
configure, e.g.,

sage: latex.matrix_parens('[',']')
sage: latex.sagebold('mathbf')

I like "latex", since in the notebook, I think there is *already* a
latex object:

sage: latex = sage.misc.latex.Latex()
sage: latex?

and we could just add to it. Note that the latex object is predefined
in notebook sessions but not on the command line right now, but you
could change that (make it be always defined).

- William

>
>  John
>
> >
>



--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

Jason Grout

unread,
Mar 24, 2009, 1:48:00 PM3/24/09
to sage-...@googlegroups.com
William Stein wrote:
> On Tue, Mar 24, 2009 at 9:58 AM, John H Palmieri <jhpalm...@gmail.com> wrote:
>> Currently the latex methods for ZZ, RR, etc. all used mathbf -- plain
>> boldface -- rather than mathbb -- 'blackboard' bold. See also the (not
>> currently in use) file SAGE_ROOT/devel/sage/doc/common/macros.tex:
>> lots of mathbf, no mathbb.
>>
>> Is this an official style choice for Sage, or did it just
>> spontaneously occur?
>
> I "officially" chose it for the same reason I chose mathbb in all the
> books/articles I wrote, which is that numerous people in publishing
> convinced me that it is a better choice.


I'm curious what the persuasive reasoning was. I've always liked mathbb.

Jason


John H Palmieri

unread,
Mar 24, 2009, 2:22:26 PM3/24/09
to sage-devel
On Mar 24, 10:48 am, Jason Grout <jason-s...@creativetrax.com> wrote:
> William Stein wrote:
> > On Tue, Mar 24, 2009 at 9:58 AM, John H Palmieri <jhpalmier...@gmail.com> wrote:
> >> Currently the latex methods for ZZ, RR, etc. all used mathbf -- plain
> >> boldface -- rather than mathbb -- 'blackboard' bold. See also the (not
> >> currently in use) file SAGE_ROOT/devel/sage/doc/common/macros.tex:
> >> lots of mathbf, no mathbb.
>
> >> Is this an official style choice for Sage, or did it just
> >> spontaneously occur?
>
> > I "officially" chose it for the same reason I chose mathbb in all the
> > books/articles I wrote, which is that numerous people in publishing
> > convinced me that it is a better choice.
>
> I'm curious what the persuasive reasoning was.  I've always liked mathbb.

My impression is that people (maybe Bourbaki?) decided that bold-face
should be used for Z, R, etc. Then people giving lectures wanted a
way to reproduce this, so someone invented blackboard bold for use on
a blackboard. And then the handwritten blackboard bold began to creep
into printed material, and we now have mathbb. So to me it seems sort
of backwards to use blackboard bold when you can use ordinary bold
face.

Also, Wikipedia claims that Serre disapproves of the use of blackboard
bold in typesetting, and Serre's opinion carries some weight...

John

William Stein

unread,
Mar 24, 2009, 3:00:14 PM3/24/09
to sage-...@googlegroups.com

Thanks John. That's precisely the argument that influenced me long ago...

William

Marshall Hampton

unread,
Mar 24, 2009, 4:20:45 PM3/24/09
to sage-devel
It would be nice have user-configurable settings like this. I
definitely prefer mathbb - I think its nice to have special symbols
for things like the rationals (as \mathbb{Q}); it lets you use Q as a
variable or other object without confusion.

-Marshall

Jason Grout

unread,
Mar 24, 2009, 4:23:51 PM3/24/09
to sage-...@googlegroups.com
William Stein wrote:
> On Tue, Mar 24, 2009 at 11:22 AM, John H Palmieri
> <jhpalm...@gmail.com> wrote:
>> On Mar 24, 10:48 am, Jason Grout <jason-s...@creativetrax.com> wrote:
>>> I'm curious what the persuasive reasoning was. I've always liked mathbb.
>> My impression is that people (maybe Bourbaki?) decided that bold-face
>> should be used for Z, R, etc. Then people giving lectures wanted a
>> way to reproduce this, so someone invented blackboard bold for use on
>> a blackboard. And then the handwritten blackboard bold began to creep
>> into printed material, and we now have mathbb. So to me it seems sort
>> of backwards to use blackboard bold when you can use ordinary bold
>> face.
>>
>> Also, Wikipedia claims that Serre disapproves of the use of blackboard
>> bold in typesetting, and Serre's opinion carries some weight...
>>
>
> Thanks John. That's precisely the argument that influenced me long ago...
>

Okay. Another sentence from Wikipedia persuades me that mathbb is the
way to go, though:

"The symbols are nearly universal in their interpretation, unlike their
normally-typeset counterparts, which are used for many different purposes."

Jason

Rob Beezer

unread,
Mar 24, 2009, 11:56:05 PM3/24/09
to sage-devel
I'm in favor of making some of these LaTeX choices configurable.
William's example of the grouping symbols for matrices (e.g. square
brackets or large parentheses) is the first thing I thought of. I
never liked Mathematica's choice and was always just cutting out the
rows of a matrix to use within my own delimiters.

I frequently use Sage as a sort of equation editor. If I need a 10 x
10 identity matrix in a document, its easier to contruct the matrix in
Sage and call latex() on it. Of course, this is not the raison d'etre
for Sage, but I find its latex support a real plus. Making some of
these stylistic decisions configurable globally would make it even
better.

Rob

Henryk Trappmann

unread,
Mar 25, 2009, 9:05:51 AM3/25/09
to sage-devel
Because Bourbaki and Serre said so?
Sorry guys but thats the strangest justificiation Iv ever heard.
At the first place for me is understandability, which is often coupled
with common use.
Imho the \mathbb notation is the most widespread and most recognized
variant.
Another important aspect is unambiguity.
Bold big letters are often used as a variable for a group, ring, or
field, usually R for a ring. Especially in general Algebra you use the
bold big letter notation, to distuingish the algebra from the mere set
(which is non-bold).
But \mathbb R, or \mathbb Q i have never seen in a different meaning.
And even the sage abbreviation RR and QQ hint to the use of \mathbb.

John H Palmieri

unread,
Mar 25, 2009, 12:20:52 PM3/25/09
to sage-devel
On Mar 25, 6:05 am, Henryk Trappmann <bo198...@googlemail.com> wrote:
> Because Bourbaki and Serre said so?
> Sorry guys but thats the strangest justificiation Iv ever heard.

I don't know quite where you heard it, because it's not what I wrote,
especially the part about Bourbaki. However, if a leading
mathematician like Serre expresses an opinion about something, I think
it's worth paying attention. For what it's worth, Knuth also seems to
dislike the use of blackboard bold fonts in printed material, and he's
probably thought more about technical typesetting than all of us put
together. I think it's dangerous to dismiss his view without further
consideration.

I haven't heard about Bourbaki expressing a preference for mathbf over
mathbb. The way I understand it, Bourbaki may have been the ones who
popularized the use of bold face for Z, R, etc., and this was before
blackboard bold existed. Mathematicians liked this bold face notation
enough that someone invented blackboard bold for handwritten use.
People became so used to seeing it in lectures and so on that they
created computer fonts to replicate it.

That is, blackboard bold was invented as a substitute for bold when
bold was not available. From this point of view, preferring blackboard
bold over plain bold is like preferring margarine to butter. I also
happen to think that bold looks better: it fits with the roman and
italic fonts better.

Unambiguity of mathbb is worth something, but I don't recall ever
being confused by a bold face Z or R or ...

By the way, widespread use is not a convincing argument; many people
use Z_p to represent the integers mod p, and I will *not* agree that
this is acceptable usage.

John

Gonzalo Tornaria

unread,
Mar 25, 2009, 12:33:43 PM3/25/09
to sage-...@googlegroups.com
On Wed, Mar 25, 2009 at 12:56 AM, Rob Beezer <goo...@beezer.cotse.net> wrote:
> I frequently use Sage as a sort of equation editor. If I need a 10 x
> 10 identity matrix in a document, its easier to contruct the matrix in
> Sage and call latex() on it. Of course, this is not the raison d'etre
> for Sage, but I find its latex support a real plus. Making some of
> these stylistic decisions configurable globally would make it even
> better.

Here's a concrete proposal on how to arrange style configuration.
Rather than having a global setting in sage which alters the latex
code which is output (e.g. \mathbb{Z} vs. \mathbf{Z}), define a set
of latex macros which configure the way the latex output is rendered.

For example, the latex output for ZZ could be "\ZZ" or "\sageZZ", etc.
And so on with macros for the different fields and rings, and also
macros to render sage matrices, etc.

Then we can use a package, say "sage.sty", which defines all this
symbols in some way. then the user can configure
the way ZZ is rendered with one of the following options:

1) use \renewcommand for the symbols to be customized, right after
\usepackage{sage}
2) edit sage.sty to suit the desired style
3) implement a sage-local.sty package which imports sage.sty then
redefines some styles
4) there may already be alternate implementations of sage.sty by
different authors, so choose which style to go with.

What is important in this idea is that the actual "latex
representation" of sage objects would be invariant. one could "borrow"
latex objects from one paper to another, even if the papers have
different styles. Writing papers with different coauthors using
different styles would not require changing configuration of sage,
etc.

The only drawback I see is that the latex code won't work standalone,
i.e. unless \usepackage{sage} is included. I don't know if jsmath, for
instance, can be adjusted to this (without hacking it, that is).

Gonzalo

Gonzalo Tornaria

unread,
Mar 25, 2009, 12:51:34 PM3/25/09
to sage-...@googlegroups.com
On Wed, Mar 25, 2009 at 1:20 PM, John H Palmieri <jhpalm...@gmail.com> wrote:
>
> I don't know quite where you heard it, because it's not what I wrote,
> especially the part about Bourbaki. However, if a leading
> mathematician like Serre expresses an opinion about something, I think
> it's worth paying attention. For what it's worth, Knuth also seems to
> dislike the use of blackboard bold fonts in printed material, and he's
> probably thought more about technical typesetting than all of us put
> together. I think it's dangerous to dismiss his view without further
> consideration.

Not sure who is that Knuth you mention, but a bit of googling reveals
that he seems to be picky about fonts (e.g.
http://www-cs-faculty.stanford.edu/~knuth/cm.html).

Seriously, I can't find a quote of him about the use of blackboard
bold, but I think I read something about it (maybe in his math writing
class notes?)

> People became so used to seeing it in lectures and so on that they
> created computer fonts to replicate it.

I still remember using these in early 90s (before amsfonts, I guess):

\def\C{I\!\!\!\!\!\:C}
\def\R{I\!\!R}
\def\Z{Z\!\!\!Z}


> By the way, widespread use is not a convincing argument; many people
> use Z_p to represent the integers mod p, and I will *not* agree that
> this is acceptable usage.

I'm starting to think this is a lost one...

Gonzalo

kcrisman

unread,
Mar 25, 2009, 12:59:44 PM3/25/09
to sage-devel

>
> > By the way, widespread use is not a convincing argument; many people
> > use Z_p to represent the integers mod p, and I will *not* agree that
> > this is acceptable usage.
>
> I'm starting to think this is a lost one...

What, you don't find Z_{p} versus Z_{(p)} versus Z_{\{p\}}to be a
perfectly clear distinction? :)

(Though I personally enjoy Z_p for use in contexts where the word
'ring' will never be used.)

- kcrisman

kcrisman

unread,
Mar 25, 2009, 1:05:28 PM3/25/09
to sage-devel

More seriously, I think that for some people the distinction between Z
and boldface Z might be hard to pick out (visually, that is). \mathbb
{Z} is unambiguous, has a nice chalkboard equivalent, and so on. I
know at least that trying to get anyone to tell the difference between
v and bold v in any vector setting - whether in a book or on the
chalkboard - is nightmarish, which is why putting those little arrows
over vectors is so helpful. Presumably the same people who need the
large-print version of things would also find \mathbb helpful.

So even though it looks nice in a book, there might be something to be
said for standardizing a notation that allows one to separately talk
about some other thing Z (for instance, a variable for a form) if that
is helpful. Not that that has anything to do with Sage.

- kcrisman

John H Palmieri

unread,
Mar 25, 2009, 1:36:04 PM3/25/09
to sage-devel
Somewhat seriously, I have another argument against using blackboard
bold fonts: I can't get them to work with jsMath. I think I have all
of the appropriate fonts installed, but when I try to view something
typeset in blackboard bold, I get the message "Unknown control
sequence '\msbm'." Does anyone have any advice?

John

John H Palmieri

unread,
Mar 25, 2009, 1:58:58 PM3/25/09
to sage-devel
On Mar 25, 10:36 am, John H Palmieri <jhpalmier...@gmail.com> wrote:
>
> Somewhat seriously, I have another argument against using blackboard
> bold fonts: I can't get them to work with jsMath.  I think I have all
> of the appropriate fonts installed, but when I try to view something
> typeset in blackboard bold, I get the message "Unknown control
> sequence '\msbm'."  Does anyone have any advice?

Anyway, glossing over the jsMath issue, here's a ticket implementing a
version of switching between mathbf and mathbb: <http://
trac.sagemath.org/sage_trac/ticket/5610>.

John

Henryk Trappmann

unread,
Mar 25, 2009, 3:12:48 PM3/25/09
to sage-devel
On Mar 25, 5:20 pm, John H Palmieri <jhpalmier...@gmail.com> wrote:
> On Mar 25, 6:05 am, Henryk Trappmann <bo198...@googlemail.com> wrote:
>
> > Because Bourbaki and Serre said so?
> > Sorry guys but thats the strangest justificiation Iv ever heard.
>
> I don't know quite where you heard it, because it's not what I wrote,
> especially the part about Bourbaki.

Its quite close to what you wrote. And the impression of you blindly
trusting authorities is deepened by your subsequenct post.

> However, if a leading
> mathematician like Serre expresses an opinion about something, I think
> it's worth paying attention.  

Its worth paying attention to hear the perhaps high quality arguments.
But you didnt mentioned any arguments of Serre or Knuth.
Just: they said it, hence we should follow.
Thats what I call a strange justification.

Also I dont see that this question falls into Serres base competence.
I mean would you ask Obama to decide this question?

> For what it's worth, Knuth also seems to
> dislike the use of blackboard bold fonts in printed material, and he's
> probably thought more about technical typesetting than all of us put
> together. I think it's dangerous to dismiss his view without further
> consideration.

If you could bring some arguments of Knuth ...; "dislikes" is not
especially a good argument and I see no technical difficulties to use
bb fonts. (Except your personal technical problem with jsMath.)

> That is, blackboard bold was invented as a substitute for bold when
> bold was not available. From this point of view, preferring blackboard
> bold over plain bold is like preferring margarine to butter.  

Thats life, things change form, everything becomes substituted.
Do you stay with all things as there were originally invented
(telefone, money, clothes, ...)?

> I also
> happen to think that bold looks better: it fits with the roman and
> italic fonts better.

Well this is a matter of personal taste.

> Unambiguity of mathbb is worth something, but I don't recall ever
> being confused by a bold face Z or R or ...

because its nearly not used anymore ;)

>
> By the way, widespread use is not a convincing argument; many people
> use Z_p to represent the integers mod p, and I will *not* agree that
> this is acceptable usage.

I thought we discuss here the usefulness to the mathematical community
and not the individual aversions.

Robert Bradshaw

unread,
Mar 25, 2009, 3:39:19 PM3/25/09
to sage-...@googlegroups.com

Thanks. I don't have an idea to fix the jsMath issues, but when that
gets resolved I'll referee it.

- Robert

John H Palmieri

unread,
Mar 25, 2009, 3:44:25 PM3/25/09
to sage-devel
On Mar 25, 12:12 pm, Henryk Trappmann <bo198...@googlemail.com> wrote:
> On Mar 25, 5:20 pm, John H Palmieri <jhpalmier...@gmail.com> wrote:
>
> > On Mar 25, 6:05 am, Henryk Trappmann <bo198...@googlemail.com> wrote:
>
> > > Because Bourbaki and Serre said so?
> > > Sorry guys but thats the strangest justificiation Iv ever heard.
>
> > I don't know quite where you heard it, because it's not what I wrote,
> > especially the part about Bourbaki.
>
> Its quite close to what you wrote. And the impression of you blindly
> trusting authorities is deepened by your subsequenct post.

Meanwhile, your posts leave the impression of you insulting people
whom you've never met. I don't have any interest in responding to
you.

William Stein

unread,
Mar 25, 2009, 3:52:08 PM3/25/09
to sage-...@googlegroups.com

+1 -- I do not think Henryk Trappman's posts in this thread are up to
the level of civility and maturity expected on this (or other sage-*)
mailing lists.

-- William

Henryk Trappmann

unread,
Mar 25, 2009, 4:05:00 PM3/25/09
to sage-devel
On Mar 25, 8:44 pm, John H Palmieri <jhpalmier...@gmail.com> wrote:
> Meanwhile, your posts leave the impression of you insulting people
> whom you've never met.  I don't have any interest in responding to
> you.

Sorry, if I was insulting. The topic of blind trust in authorities
just hit a button, you know I am German.
I withdraw what I said about you blindly trusting authorities.

Jason Grout

unread,
Mar 25, 2009, 4:06:07 PM3/25/09
to sage-...@googlegroups.com

What browser/OS are you using?

Davide (author of jsmath, and who has also posted to sage lists before)
would probably be interested in any problems that crop up.

Jason

Rob Beezer

unread,
Mar 25, 2009, 4:41:17 PM3/25/09
to sage-devel
Hi John,

I've been following this thread, and read the discussion on Trac at
#5610. I've been partial to blackboard bold, but after the discussion
here am considering going back to bold. In my open-source linear-
algebra book, this will be trivial, since I can go into a single *.sty
file and make the change at clearly isolated locations. Consistent
use of macros throughout the source mean that my PDF, XML, jsMath
versions of the book will all reflect the change in the next version.
So I'm all in favor of what you are trying to accomplish here.

It strikes me that the people who care (and its clear from this thread
that some of us care) might be most comfortable with editing a tex
style file to make changes. Second-choice would I guess be to edit
some sort of Python file or notebook cell that would call methods of
latex_customize. It would sure be nice if there was just one place to
go, make changes once, and then see them reflected in documentation,
notebook, etc forever more. I am suggesting maybe there is a way
around the need to go hand-edit preambles, etc. But maybe that is not
technically possible, and I haven't studied the patch carefully. I
certainly understand the complexities of the myriad delimiters and
configuration files.

Thinking as I write, I guess I am arguing for a single point of
control, which could be made usable by all the various components of
Sage - documentation, notebook, online help (notebook and command
line). Since all these items start life with a call to sage on the
command-line, why can't they absorb the right TeX macros at the right
place, or inspect/emit information from latex_customize? Or maybe
latex_customize could be used to write a *.sty file in certain
situations? But maybe I'm just paraphrasing what you are currently
struggling with? ;-)

Secondly, are you proposing just using the \Bold{} macro to handle
only the mathbf/mathbb decision, or is there a danger \Bold might get
applied places where the blackboard fonts would be inappropriate?

Rob

John H Palmieri

unread,
Mar 25, 2009, 4:43:48 PM3/25/09
to sage-devel
On Mar 25, 1:06 pm, Jason Grout <jason-s...@creativetrax.com> wrote:
> John H Palmieri wrote:
>
> > Somewhat seriously, I have another argument against using blackboard
> > bold fonts: I can't get them to work with jsMath.  I think I have all
> > of the appropriate fonts installed, but when I try to view something
> > typeset in blackboard bold, I get the message "Unknown control
> > sequence '\msbm'."  Does anyone have any advice?
>
> What browser/OS are you using?

This is on Intel Mac OS X, with both Safari and Firefox. Of course, I
may be misreading the documentation, or maybe we need to configure
something with jsMath from the server end; I just don't know much
about it. I'll keep playing with it, but I would appreciate any
suggestions. It's frustrating, because everything else in the patch at
#5610 seems to work (for me, anyway), and if I change \mathbb to
\mathrm, for example, it works in the notebook, too. This one issue
feels like the only thing holding it up.

> Davide (author of jsmath, and who has also posted to sage lists before)
> would probably be interested in any problems that crop up.

John

John H Palmieri

unread,
Mar 25, 2009, 5:05:56 PM3/25/09
to sage-devel
On Mar 25, 1:41 pm, Rob Beezer <goo...@beezer.cotse.net> wrote:
> Hi John,

Hi Rob,

> I've been following this thread, and read the discussion on Trac at
> #5610.  I've been partial to blackboard bold, but after the discussion
> here am considering going back to bold.  In my open-source linear-
> algebra book, this will be trivial, since I can go into a single *.sty
> file and make the change at clearly isolated locations.  Consistent
> use of macros throughout the source mean that my PDF, XML, jsMath
> versions of the book will all reflect the change in the next version.
> So I'm all in favor of what you are trying to accomplish here.

Great. I don't think you're misunderstanding me, but just in case,
let me clarify one thing: I'm not trying to persuade everyone to
change to mathbf. The default situation in Sage is to use \mathbf (as
William has explained), and I'm trying to codify this, and also
provide a way to globally change it for people who object to it.

> It strikes me that the people who care (and its clear from this thread
> that some of us care) might be most comfortable with editing a tex
> style file to make changes.  Second-choice would I guess be to edit
> some sort of Python file or notebook cell that would call methods of
> latex_customize.  It would sure be nice if there was just one place to
> go, make changes once, and then see them reflected in documentation,
> notebook, etc forever more.  I am suggesting maybe there is a way
> around the need to go hand-edit preambles, etc.  But maybe that is not
> technically possible, and I haven't studied the patch carefully.  I
> certainly understand the complexities of the myriad delimiters and
> configuration files.

When you build the documentation, you are running Python, not Sage (as
far as I can tell), so I don't know how to pass the appropriate
customizations. A command-line switch would probably do it, but I'm
afraid that it might be a bit clunky.

> Thinking as I write, I guess I am arguing for a single point of
> control, which could be made usable by all the various components of
> Sage - documentation, notebook, online help (notebook and command
> line).  Since all these items start life with a call to sage on the
> command-line, why can't they absorb the right TeX macros at the right
> place, or inspect/emit information from latex_customize?  Or maybe
> latex_customize could be used to write a *.sty file in certain
> situations?  But maybe I'm just paraphrasing what you are currently
> struggling with?  ;-)

Maybe a setting in an init.sage file? How do you use that file? Can
you just put 'latex_customize.use_blackboard_bold(True)' in it?

> Secondly, are you proposing just using the \Bold{} macro to handle
> only the mathbf/mathbb decision, or is there a danger \Bold might get
> applied places where the blackboard fonts would be inappropriate?

I intend it to be used only for those circumstances where reasonable
people might want to switch from one choice to the other, so I tried
to change \mathbf to \Bold only for ZZ, RR, QQ, CC, and perhaps for P
(projective space). I certainly left other uses of \mathbf{blah} and
\mathbb{blah} in the code. I probably missed some cases, and I
probably changed a few I shouldn't have, but do my intentions sound
right? (Answering you literally, some people would suggest that
blackboard fonts would always be inappropriate :)

John

John H Palmieri

unread,
Mar 25, 2009, 5:06:45 PM3/25/09
to sage-devel
On Mar 25, 1:43 pm, John H Palmieri <jhpalmier...@gmail.com> wrote:
> On Mar 25, 1:06 pm, Jason Grout <jason-s...@creativetrax.com> wrote:
>
> > John H Palmieri wrote:
>
> > > Somewhat seriously, I have another argument against using blackboard
> > > bold fonts: I can't get them to work with jsMath.  I think I have all
> > > of the appropriate fonts installed, but when I try to view something
> > > typeset in blackboard bold, I get the message "Unknown control
> > > sequence '\msbm'."  Does anyone have any advice?
>
> > What browser/OS are you using?
>
> This is on Intel Mac OS X, with both Safari and Firefox. Of course, I
> may be misreading the documentation, or maybe we need to configure
> something with jsMath from the server end; I just don't know much
> about it. I'll keep playing with it, but I would appreciate any
> suggestions. It's frustrating, because everything else in the patch at
> #5610 seems to work (for me, anyway), and if I change \mathbb to
> \mathrm, for example, it works in the notebook, too. This one issue
> feels like the only thing holding it up.

I think I may have figured this out, but it will require patching
jsMath: we need to add a font to the spkg, I think.

John

John H Palmieri

unread,
Mar 25, 2009, 6:00:30 PM3/25/09
to sage-devel
On Mar 25, 2:06 pm, John H Palmieri <jhpalmier...@gmail.com> wrote:
>
> I think I may have figured this out, but it will require patching
> jsMath: we need to add a font to the spkg, I think.

See <http://trac.sagemath.org/sage_trac/ticket/5611>.

John

Rob Beezer

unread,
Mar 25, 2009, 7:01:46 PM3/25/09
to sage-devel
On Mar 25, 2:05 pm, John H Palmieri <jhpalmier...@gmail.com> wrote:
> let me clarify one thing: I'm not trying to persuade everyone to
> change to mathbf.

No, I think it is obvious that you are trying to accommodate both
camps (which I applaud).

> Maybe a setting in an init.sage file?  How do you use that file?  Can
> you just put 'latex_customize.use_blackboard_bold(True)' in it?

That sounds like the sort of thing I was suggesting, but I don't have
any experience with that file yet.

> I intend it to be used only for those circumstances where reasonable
> people might want to switch from one choice to the other, so I tried
> to change \mathbf to \Bold only for ZZ, RR, QQ, CC, and perhaps for P
> (projective space). I certainly left other uses of \mathbf{blah} and
> \mathbb{blah} in the code. I probably missed some cases, and I
> probably changed a few I shouldn't have, but do my intentions sound
> right? (Answering you literally, some people would suggest that
> blackboard fonts would always be inappropriate :)

That sounds great. Do you think a different name would keep somebody
from mis-using it later? Possibly they are just trying to bold
something, and then for those using the blackboard bold switch they
get some screwieness? Maybe
\BoldStyleForReallyReallyCommonRingsAndFields{}? ;-)

Gonzalo Tornaria

unread,
Mar 25, 2009, 9:04:28 PM3/25/09
to sage-...@googlegroups.com

Why not use:

\sageZZ
\sageRR
\sageQQ
\sageCC
\sageProjectiveSpace

etc. This gives maximum flexibility in that styles can be adjusted individually.

In fact, I'd go further and call those just \ZZ, \RR, \QQ, \CC,
\ProjectiveSpace, etc. (which has potential for namespace issues).
I'd love to see some standarised conventions for semantic markup of
actual mathematical objects, which latex currently doesn't have. This
enables sharing of latex snippets using these objects regardless of
stylistic choices. Modeling this after sage objects (and its need for
latex rendering) might be a good guide for this.

The point is, there could be two or three major styles the user can
choose among (so, no hand editing of preamble or packages needed) but
a determined user can still hand-tweak styles. Even a single package
could have a few options to change behaviour in different areas (bb
vs. bf, style for matrices, etc).

I do also like the idea of sage having a way to configure stylistic
choices and produce a preamble matching this configuration -- I
wouldn't try to go the other way around (python parsing latex to
figure out configuration, nah...)

Gonzalo

Reply all
Reply to author
Forward
0 new messages