Re: Formatting - bold characters as variables?
- To: mathgroup at smc.vnet.net
- Subject: [mg111944] Re: Formatting - bold characters as variables?
- From: Simon <simonjtyler at gmail.com>
- Date: Fri, 20 Aug 2010 07:07:22 -0400 (EDT)
- References: <email@example.com>
Hi Ryan, You could try something like bf /: MakeBoxes[bf[i_String], fmt_] := InterpretationBox[StyleBox[i, Bold], bf[i]] Then bf["a"] will return a bold "a". If you select bf["a"] and press Ctrl-Shift-N for normal form, then it will display as the bold "a". The inverse is to press Ctrl-Shift-I for input form. I'm using this type of thing for quite a few of my calculations at the moment, where I have spinor[__] objects etc... I originally stole this from Rolf Mertig's http://www.feyncalc.org/FeynCalcBook/ Simon On Aug 19, 9:20 pm, telefunkenvf14 <rgo... at gmail.com> wrote: > Group: > > What follows is a suggestion. Maybe someone can explain a way to > implement it in v7. Otherwise, consider it an idea for future versions > of Mathematica. > > In economics, we commonly use subscripted variables to refer to, say, > the ith individual or jth firm, etc. (BTW, wish it was easier to use > subscripted variables, but thats not the main issue I want to > address.) To minimize notational clutter, it's common to then use > *bold* fonts to indicate vectors of these variables---this is what I'd > like to be able to do in Mathematica. > > Based on my current understanding, this may NOT be very > straightforward to implement... > > As we all know, the front end displays code in bold by default. But > (of course) these bolded characters aren't represented as > fundamentally different raw characters, which means a bold variable is > the same to Mathematica as its unbolded counterpart. > > Would it be feasible to define a new, expanded character set that > includes bolded character codes? Assuming the default display options > are in effect, the front end would then need to double-bold their > appearance. (don't know if there is such a term as 'double bold', but > you get the idea) > > -RG > > PS -- I know I'll get suggestions to use the double-struck or fancy > scripted characters. While useful at times, I find that referring to > different characters makes lecture notes, etc., more of a pain to > write-up and less clear (when trying to explain results from a > textbook). IMO, *bold* is just easier.