On Tue, May 20, 2014 at 11:39 AM, Will Robertson wrote:

1. \mathbf and friends go back to simply selecting a text font. Note that they still need to remap \mathcode{}s in this case because normal unicode math glyphs exist all the way up in Plane 1 where text fonts daren't to tread.

I see it's been a while since I looked at this (and shouldn't write these emails in a rush) -- if the class of each math char is set to 7 then the remapping mentioned above to enable old-style \mathbf etc is not necessary. This is better.

Updated plain example below.

Cheers,
Will

\font\rm = "Linux Libertine O:color=AA00AA" at 10pt\relax
\font\bf = "Linux Libertine O Bold:color=0000FF" at 10pt\relax
\font\it = "Linux Libertine O Italic:color=00AA00" at 10pt\relax
\font\mm = "[latinmodern-math.otf]:color=FF0000" at 10pt\relax

\newfam\rmmathfam
\newfam\bfmathfam
\newfam\itmathfam

\textfont\rmmathfam\rm
\textfont\bfmathfam\bf
\textfont\itmathfam\it
\textfont1\mm

\def\alpha{α}
\def\beta{β}
\def\gamma{γ}

\def\codemathhigh{%
\Umathcode\a = 7 1 "1D44E\relax
\Umathcode\b = 7 1 "1D44F\relax
\Umathcode\c = 7 1 "1D450\relax
\Umathcode"03B1 = 7 1 "1D6FC\relax
\Umathcode"03B2 = 7 1 "1D6FD\relax
\Umathcode"03B3 = 7 1 "1D6FE\relax
}
\def\codemathsymup{%
\Umathcode\a = 7 1 \a\relax
\Umathcode\b = 7 1 \b\relax
\Umathcode\c = 7 1 \c\relax
\Umathcode"03B1 = 7 1 "03B1\relax
\Umathcode"03B2 = 7 1 "03B2\relax
\Umathcode"03B3 = 7 1 "03B3\relax
}
\def\codemathsymbf{%
\Umathcode\a = 7 1 "1D41A\relax
\Umathcode\b = 7 1 "1D41B\relax
\Umathcode\c = 7 1 "1D41C\relax
\Umathcode"03B1 = 7 1 "1D6C2\relax
\Umathcode"03B2 = 7 1 "1D6C3\relax
\Umathcode"03B3 = 7 1 "1D6C4\relax
}

\def\mathrm#1{{\fam\rmmathfam #1}}
\def\mathit#1{{\fam\itmathfam #1}}
\def\mathbf#1{{\fam\bfmathfam #1}}
\def\symbf#1{{\codemathsymbf #1}}
\def\symup#1{{\codemathsymup #1}}

\parindent=0pt\relax
\hsize=6cm\relax
\hrule
\bigskip

\rm
\codemathhigh

Regular symbols:
$$a + b + c \quad \alpha + \beta + \gamma$$
Roman, italic, and bold math families:
$$\mathrm{abc\alpha\beta\gamma} \quad \mathit{abc\alpha\beta\gamma} \quad \mathbf{abc\alpha\beta\gamma}$$
Bold math symbols:
$$\symbf{a+b+c} \quad \symbf{\alpha + \beta + \gamma}$$
Upright math symbols:
$$\symup{a+b+c} \quad \symup{\alpha + \beta + \gamma}$$

\bye