latex3 / unicode-math

XeLaTeX/LuaLaTeX package for using unicode/OpenType maths fonts
http://ctan.org/pkg/unicode-math
LaTeX Project Public License v1.3c
239 stars 28 forks source link

add \diagup (U+27CB) and \diagdown (U+27CD) to unicode-math-table #604

Closed AlphaZTX closed 10 months ago

AlphaZTX commented 1 year ago

Status

READY

Description

Add \diagup(U+27CB) and \diagdown(U+27CD) to unicode-math-table.tex according to Section 2.15 of Unicode TR25.

Minimal example demonstrating the new functionality

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{STIX Two Math}
\begin{document}
\[
  \diagup \qquad \diagdown
\]
\end{document}
AlphaZTX commented 1 year ago

Maybe we can try the following code:

\UnicodeMathSymbol{"027CB}{\diagup                   }{\mathord}{mathematical rising diagnal}%
\UnicodeMathSymbol{"027CB}{\diaguprel                }{\mathrel}{mathematical rising diagnal (relation)}%

U+27CD is similar.

davidcarlisle commented 1 year ago

something like that yes (\mathrel for the second one of course:-)

Main argument against adding these is that latin modern math doesn't seem to have anything usable, so the default behaviour of the new commands would be a missing glyph warning, which is a bit unfortunate

wspr commented 10 months ago

I'm really surprised these were missing given \diagup is in amsmath. Based on a very cursory scan of how \diagup is used in the wild, I think \mathrel doesn't seem right:

https://arxiv.org/search/advanced?advanced=1&terms-0-operator=AND&terms-0-term=%5Cdiagup&terms-0-field=all&classification-physics_archives=all&classification-include_cross_list=include&date-filter_by=all_dates&date-year=&date-from_date=&date-to_date=&date-date_type=submitted_date&abstracts=show&size=50&order=-announced_date_first

I'm inclined to only provide \mathord for now.

davidcarlisle commented 10 months ago

I'm inclined to only provide \mathord for now.

Given amssymb makes them mathord I guess that is best. Bit of pain that mathml4 and mathml-core give them a default 3mu space left and right following the R(elation) classification from Unicode TR25 but getting all these things lined up is hard.

wspr commented 10 months ago

Many thanks!