Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing size difference between binary operators and their N-ary counterparts #129

Open
cionx opened this issue Feb 16, 2022 · 5 comments
Open
Labels
enhancement may be implemented as an enhancement

Comments

@cionx
Copy link

cionx commented Feb 16, 2022

Many mathematical operators come in two versions: a binary one and and an N-ary one. The symbol for the N-ary operator is typically a larger version of the symbol for the binary operator.

However, there is often no such distinction in the current version of JuliaMono, as can be seen from the following comparison.¹

juliamono

In the first group, there is only a small difference between U+2294 (Square Cup) and U+2A06 (N-Ary Square Union Operator), but otherwise no difference, which makes it impossible to tell the two versions apart.

In the second group, we have a good visible difference between U+2A3F (Amalgamation or Coproduct) and U+2210 (N-Ary Coproduct), but the distinciton between U+00D7 (Multiplication Sign) and U+2A09 (N-Ary Times Operator) seems somewhat small.

In the third group, the N-ary versions appear slightly smaller than the binary versions.

I’d assume that for the symbols in the first group it should be possible to make the N-Ary version noticably larger than the binary version by simply extending/vertically stretching the N-ary versions to the same height as the summation sign, i.e., U+2211 (N-Ary Summation).

I’m not sure how to deal with U+2A09 (N-Ary Times Operator) from the second group and the symbols from the third group.

It would be, in my opinion, acceptable to give the N-Ary Times Operator some vertical stretching. This would probably make the symbol less symmetric looking, but I’d find this acceptable since we are dealing with a monospace font.

But for the third group this approach is probably not possible because of the circle. (One could stretch these circles into ellipses, but that would probably be somewhat of an acquired taste… Maybe a stylistic set?) But I think that the N-ary versions should at least not appear smaller than their binary counterparts.


¹ The comparison was created with LaTeX via XeLaTeX and the code below. Dashes represent symbols that seem to be missing from Unicode.

Code for generating the comparison.
\documentclass{scrartcl}

\usepackage{array}
\usepackage{booktabs}
\usepackage{fontspec}

\setmainfont{Libertinus Serif}
\setsansfont{Libertinus Sans}
\setmonofont{JuliaMono}


\begin{document}
\begin{tabular}{l>{\ttfamily}c>{\ttfamily}c}
	\toprule
	\textbf{description} &
	\textrm{\textbf{binary}} &
	\textrm{\textbf{$N$-ary}} \\
	\midrule
	intersection          & ∩ & ⋂ \\
	union                 & ∪ & ⋃ \\
	square union          & ⊔ & ⨆ \\
	square intersection   & — & ⨅ \\
	union with dot        & — & ⨃ \\
	intersection with dot & ⩀ & — \\
	logical and           & ∧ & ⋀ \\
	logical or            & ∨ & ⋁ \\
	\midrule
	sum                   & + & ∑ \\
	times                 & × & ⨉ \\
	product               & — & ∏ \\
	coproduct             & ⨿ & ∐ \\
	\midrule
	circled plus          & ⊕ & ⨁ \\
	circled times         & ⊗ & ⨂ \\
	circled dot           & ⊙ & ⨀ \\
	\bottomrule
\end{tabular}
\end{document}
@cormullion cormullion added the enhancement may be implemented as an enhancement label Feb 16, 2022
@cormullion
Copy link
Owner

I'll have a look sometime. The main restriction here of course is the width; unlike typical LATEX fonts, we can't spread ourselves wider, bring monospaced.

@anderslundstedt
Copy link

anderslundstedt commented Feb 22, 2022

As for the first group, personally I would like if the binary versions were made a bit smaller—I would like more whitespace around the operators in, for example, the following:
Screen Shot 2022-02-22 at 14 03 10

@cormullion
Copy link
Owner

I'm going to go for slight size and weight differences:

Screenshot 2022-02-23 at 11 43 49

although these will probably look terrible on low-resolution Windows terminals, but you can't win, really... :)

@anderslundstedt
Copy link

As for the first group, personally I would like if the binary versions were made a bit smaller—I would like more whitespace around the operators in, for example, the following:
Screen Shot 2022-02-22 at 14 03 10

I think my example definitely looks better in the latest version (0.046):

Screen Shot 2022-09-15 at 17 55 51

Thanks @cormullion!

Copy link

github-actions bot commented Dec 7, 2023

This issue has been open for 30 days with no activity.

@github-actions github-actions bot added stale and removed stale labels Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement may be implemented as an enhancement
Projects
None yet
Development

No branches or pull requests

3 participants