unicode-math icon indicating copy to clipboard operation
unicode-math copied to clipboard

Remapping characters to upright

Open wspr opened this issue 14 years ago • 7 comments

Some authors might want to have "e" and "\pi" and possibly "d" (any others?) remapped into uppercase symbols. This is sort-of impossible at the moment.

wspr avatar Jun 01 '10 05:06 wspr

Have them use the characters in the Letter-Like Symbols page in Unicode (I believe you called them mathbbit), make them active, and have them resolve appropriately. For example, I found a macro to set the differential d with certain spacing tweaks, and I attached it to ‘ⅆ’ (U+2146); see jcsalomon/thesis/jcs-thesis-math.sty for example.

jcsalomon avatar Jun 01 '10 12:06 jcsalomon

That's a good idea, thanks. Certainly suits the intention of the glyph, I think. (As I understand it, the italic double-struck letters came from Mathematica, which uses unique glyphs for differential d and imaginary i and exponent e.)

If you were to use ⅆ in this manner then you wouldn't want to use \mathbbit{d}, of course; the \mathbbit alphabet was only invented in case someone wanted an "ascii" way of referring to the character.

wspr avatar Jun 01 '10 12:06 wspr

That would be very cool to do that in the package options. Especially for $\pi$. The numbers "e" and "i" could be handy as well. Depends of what you are writing. Maybe some \defineconstant{\pi}{\mathup{\pi}} or alike could be a solution. Thanks.

Tchiller avatar Sep 03 '13 09:09 Tchiller

What would currently be the best way to make a single Greek letter be upright? For example, how can I make \pi render as \symup{\pi}, and leave all other characters as they are?

joukewitteveen avatar Feb 01 '19 10:02 joukewitteveen

If you are happy continuing to write \pi in your document I think you should be able to write

\AtBeginDocument{\renewcommand\pi{\symup{\muppi}}}

wspr avatar Feb 01 '19 10:02 wspr

Ah, thanks! I had tried it without the additional \symup and then the symbol just disappeared. I couldn't find any documentation on where these \muppi-like macros come from (neither could I find them in the source code, although I didn't look too hard) and how they are supposed to be used.

joukewitteveen avatar Feb 01 '19 10:02 joukewitteveen

They’re essentially defined within unicode-math-table.tex. They’re intended to be equivalent to typing the raw unicode char directly into the source.

wspr avatar Feb 01 '19 11:02 wspr