Re: [NTG-context] Math literal colon

2015-07-24 Thread Hans Hagen
On 7/20/2015 6:06 PM, Hans Aberg wrote: On 20 Jul 2015, at 16:40, Aditya Mahajan adit...@umich.edu wrote: On Mon, 20 Jul 2015, Hans Aberg wrote: The LaTeX package unicode-math has an option colon=literal, which makes it behave as in math functions (as in example below). Has ConTeXt a

Re: [NTG-context] Math literal colon

2015-07-24 Thread Hans Hagen
On 7/20/2015 6:09 PM, Hans Aberg wrote: On 20 Jul 2015, at 17:50, Manuel Blanco manue...@ucm.es wrote: A little bit more of intelligence can be given with \begingroup\lccode`\~=`\:\lowercase{\endgroup \unexpanded\def~}{\futurelet\tmptoken\docolon}

Re: [NTG-context] Math literal colon

2015-07-24 Thread Hans Hagen
On 7/20/2015 6:22 PM, Hans Aberg wrote: On 20 Jul 2015, at 17:43, Manuel Blanco manue...@ucm.es wrote: Well, you can make the colon active in math mode and then let it output \colon. This is a TeX way, I don't know if there's a ConTeXt way for this:

Re: [NTG-context] Math literal colon

2015-07-24 Thread Hans Aberg
On 24 Jul 2015, at 11:40, Hans Hagen pra...@wxs.nl wrote: On 7/20/2015 6:09 PM, Hans Aberg wrote: On 20 Jul 2015, at 17:50, Manuel Blanco manue...@ucm.es wrote: A little bit more of intelligence can be given with \begingroup\lccode`\~=`\:\lowercase{\endgroup

Re: [NTG-context] Math literal colon

2015-07-24 Thread Hans Aberg
On 24 Jul 2015, at 11:43, Hans Hagen pra...@wxs.nl wrote: On 7/20/2015 6:22 PM, Hans Aberg wrote: On 20 Jul 2015, at 17:43, Manuel Blanco manue...@ucm.es wrote: Well, you can make the colon active in math mode and then let it output \colon. This is a TeX way, I don't know if

Re: [NTG-context] Math literal colon

2015-07-24 Thread Hans Hagen
On 7/24/2015 6:18 PM, Hans Aberg wrote: On 24 Jul 2015, at 16:28, Hans Hagen pra...@wxs.nl wrote: On 7/24/2015 4:13 PM, Hans Aberg wrote: You can add it if you think it is no problem. Proper Unicode characters in the input help the readability, so putting them at high priority seems good.

Re: [NTG-context] Math literal colon

2015-07-24 Thread Hans Aberg
On 24 Jul 2015, at 15:34, Hans Hagen pra...@wxs.nl wrote: I have experimented with a theorem proof assistant that admitted parallel ASCII and Unicode symbol names, but it turns out to be complicated. Think of C/C++ trigraphs, a chore to implement, only to be removed in the latest

Re: [NTG-context] Math literal colon

2015-07-24 Thread Hans Hagen
On 7/24/2015 4:13 PM, Hans Aberg wrote: On 24 Jul 2015, at 15:34, Hans Hagen pra...@wxs.nl wrote: I have experimented with a theorem proof assistant that admitted parallel ASCII and Unicode symbol names, but it turns out to be complicated. Think of C/C++ trigraphs, a chore to implement,

Re: [NTG-context] Math literal colon

2015-07-24 Thread Hans Aberg
On 24 Jul 2015, at 16:26, Hans Hagen pra...@wxs.nl wrote: On 7/24/2015 4:08 PM, Hans Aberg wrote: I was thinking of just having the two, \colon and \ratio. Looking into some books before electronic typesetting, the spacing of the latter can vary widely: some do not use spaces at all.

Re: [NTG-context] Math literal colon

2015-07-24 Thread Hans Aberg
On 24 Jul 2015, at 16:28, Hans Hagen pra...@wxs.nl wrote: On 7/24/2015 4:13 PM, Hans Aberg wrote: You can add it if you think it is no problem. Proper Unicode characters in the input help the readability, so putting them at high priority seems good. fyi, on the agenda for the gyre

Re: [NTG-context] Math literal colon

2015-07-24 Thread Hans Aberg
On 24 Jul 2015, at 15:48, Hans Hagen pra...@wxs.nl wrote: In the examples I mentioned (below), running ‘context’ on the first produces large colons, whereas ‘luatex’ on the second does not. The latter looks right to me. define 'luatex' ... it's all about choices that macro packages make

Re: [NTG-context] Math literal colon

2015-07-24 Thread Hans Hagen
On 7/24/2015 4:19 PM, Hans Aberg wrote: On 24 Jul 2015, at 15:48, Hans Hagen pra...@wxs.nl wrote: In the examples I mentioned (below), running ‘context’ on the first produces large colons, whereas ‘luatex’ on the second does not. The latter looks right to me. define 'luatex' ... it's

Re: [NTG-context] Math literal colon

2015-07-24 Thread Hans Hagen
On 7/24/2015 4:08 PM, Hans Aberg wrote: I was thinking of just having the two, \colon and \ratio. Looking into some books before electronic typesetting, the spacing of the latter can vary widely: some do not use spaces at all. So a set might look {x:x a} instead of {x : x a} But that

Re: [NTG-context] Math literal colon

2015-07-24 Thread Hans Aberg
On 24 Jul 2015, at 21:58, Hans Hagen pra...@wxs.nl wrote: On 7/24/2015 6:57 PM, Hans Aberg wrote: The Unicode monospace characters were added by mistake, because in computer science, style does not affect semantics, as it does math. Looking into old computer science books, they do not

Re: [NTG-context] Math literal colon

2015-07-24 Thread Hans Aberg
On 24 Jul 2015, at 18:34, Hans Hagen pra...@wxs.nl wrote: On 7/24/2015 6:18 PM, Hans Aberg wrote: On 24 Jul 2015, at 16:28, Hans Hagen pra...@wxs.nl wrote: On 7/24/2015 4:13 PM, Hans Aberg wrote: You can add it if you think it is no problem. Proper Unicode characters in the input

Re: [NTG-context] Math literal colon

2015-07-24 Thread Hans Aberg
On 24 Jul 2015, at 16:29, Hans Hagen pra...@wxs.nl wrote: On 7/24/2015 4:19 PM, Hans Aberg wrote: The function $f: A → B$, $g\colon A → B$. we could add a mathsymbol entry but I leave that to Aditya to decide { adobename=colon, category=po, cjkwd=na, description=COLON,

Re: [NTG-context] Math literal colon

2015-07-24 Thread Hans Aberg
On 24 Jul 2015, at 15:29, Hans Hagen pra...@wxs.nl wrote: On 7/24/2015 2:32 PM, Hans Aberg wrote: [Note: I use the cc to know that I have received a reply.] On 24 Jul 2015, at 10:30, Hans Hagen pra...@wxs.nl wrote: On 7/20/2015 6:06 PM, Hans Aberg wrote: On 20 Jul 2015, at 16:40,

Re: [NTG-context] Math literal colon

2015-07-24 Thread Hans Hagen
On 7/24/2015 6:57 PM, Hans Aberg wrote: On 24 Jul 2015, at 18:34, Hans Hagen pra...@wxs.nl wrote: On 7/24/2015 6:18 PM, Hans Aberg wrote: On 24 Jul 2015, at 16:28, Hans Hagen pra...@wxs.nl wrote: On 7/24/2015 4:13 PM, Hans Aberg wrote: You can add it if you think it is no problem.

Re: [NTG-context] Math literal colon

2015-07-24 Thread Hans Hagen
On 7/24/2015 3:00 PM, Hans Aberg wrote: On 24 Jul 2015, at 11:43, Hans Hagen pra...@wxs.nl wrote: On 7/20/2015 6:22 PM, Hans Aberg wrote: On 20 Jul 2015, at 17:43, Manuel Blanco manue...@ucm.es wrote: Well, you can make the colon active in math mode and then let it output \colon. This is

Re: [NTG-context] Math literal colon

2015-07-24 Thread Hans Hagen
On 7/24/2015 2:32 PM, Hans Aberg wrote: [Note: I use the cc to know that I have received a reply.] On 24 Jul 2015, at 10:30, Hans Hagen pra...@wxs.nl wrote: On 7/20/2015 6:06 PM, Hans Aberg wrote: On 20 Jul 2015, at 16:40, Aditya Mahajan adit...@umich.edu wrote: On Mon, 20 Jul 2015, Hans

Re: [NTG-context] Math literal colon

2015-07-24 Thread Hans Hagen
On 7/24/2015 2:40 PM, Hans Aberg wrote: On 24 Jul 2015, at 11:40, Hans Hagen pra...@wxs.nl wrote: On 7/20/2015 6:09 PM, Hans Aberg wrote: On 20 Jul 2015, at 17:50, Manuel Blanco manue...@ucm.es wrote: A little bit more of intelligence can be given with

Re: [NTG-context] Math literal colon

2015-07-24 Thread Hans Aberg
[Note: I use the cc to know that I have received a reply.] On 24 Jul 2015, at 10:30, Hans Hagen pra...@wxs.nl wrote: On 7/20/2015 6:06 PM, Hans Aberg wrote: On 20 Jul 2015, at 16:40, Aditya Mahajan adit...@umich.edu wrote: On Mon, 20 Jul 2015, Hans Aberg wrote: The LaTeX package

[NTG-context] Math literal colon

2015-07-20 Thread Hans Aberg
The LaTeX package unicode-math has an option colon=literal, which makes it behave as in math functions (as in example below). Has ConTeXt a similar option? lualatex \documentclass[leqno]{article} \usepackage[colon=literal]{unicode-math} \begin{document} The function $f: A → B$.

Re: [NTG-context] Math literal colon

2015-07-20 Thread Aditya Mahajan
On Mon, 20 Jul 2015, Hans Aberg wrote: The LaTeX package unicode-math has an option colon=literal, which makes it behave as in math functions (as in example below). Has ConTeXt a similar option? No. You have to use \colon. Aditya

Re: [NTG-context] Math literal colon

2015-07-20 Thread Hans Aberg
On 20 Jul 2015, at 16:40, Aditya Mahajan adit...@umich.edu wrote: On Mon, 20 Jul 2015, Hans Aberg wrote: The LaTeX package unicode-math has an option colon=literal, which makes it behave as in math functions (as in example below). Has ConTeXt a similar option? No. You have to use

Re: [NTG-context] Math literal colon

2015-07-20 Thread Hans Aberg
On 20 Jul 2015, at 17:50, Manuel Blanco manue...@ucm.es wrote: A little bit more of intelligence can be given with \begingroup\lccode`\~=`\:\lowercase{\endgroup \unexpanded\def~}{\futurelet\tmptoken\docolon}

Re: [NTG-context] Math literal colon

2015-07-20 Thread Hans Aberg
On 20 Jul 2015, at 17:43, Manuel Blanco manue...@ucm.es wrote: Well, you can make the colon active in math mode and then let it output \colon. This is a TeX way, I don't know if there's a ConTeXt way for this: \begingroup\lccode`\~=`\:\lowercase{\endgroup \let~}\colon

Re: [NTG-context] Math literal colon

2015-07-20 Thread Aditya Mahajan
On Mon, 20 Jul 2015, Hans Aberg wrote: On 20 Jul 2015, at 16:40, Aditya Mahajan adit...@umich.edu wrote: On Mon, 20 Jul 2015, Hans Aberg wrote: The LaTeX package unicode-math has an option colon=literal, which makes it behave as in math functions (as in example below). Has ConTeXt a

Re: [NTG-context] Math literal colon

2015-07-20 Thread Hans Aberg
On 20 Jul 2015, at 18:37, Aditya Mahajan adit...@umich.edu wrote: On Mon, 20 Jul 2015, Hans Aberg wrote: On 20 Jul 2015, at 16:40, Aditya Mahajan adit...@umich.edu wrote: On Mon, 20 Jul 2015, Hans Aberg wrote: The LaTeX package unicode-math has an option colon=literal, which makes it

Re: [NTG-context] Math literal colon

2015-07-20 Thread Manuel Blanco
A little bit more of intelligence can be given with \begingroup\lccode`\~=`\:\lowercase{\endgroup \unexpanded\def~}{\futurelet\tmptoken\docolon} \unexpanded\def\docolon{\ifx=\tmptoken\mathrel{\mathop{\mathchar`\:}}\else\colon\fi} \mathcode`\:=8000 % That lets you do $f: A \to

Re: [NTG-context] Math literal colon

2015-07-20 Thread Hans Aberg
On 20 Jul 2015, at 18:37, Aditya Mahajan adit...@umich.edu wrote: It is easy to change the mapping, but if the mapping is reversed, is there is standard name for : as a relation? Looking into a book on algebraic geometry, it seems fine to use operator : for projective coordinates. So skip

Re: [NTG-context] Math literal colon

2015-07-20 Thread Hans Aberg
On 20 Jul 2015, at 18:37, Aditya Mahajan adit...@umich.edu wrote: On Mon, 20 Jul 2015, Hans Aberg wrote: It would be nice with such an option, as it helps the readability of the input files. There are two uses of colon in math, as a relation (in sets \{ x : f(x) = 0 \} and in ratios

Re: [NTG-context] Math literal colon

2015-07-20 Thread Hans Aberg
On 20 Jul 2015, at 21:34, Manuel Blanco manue...@ucm.es wrote: I'm not sure I understand what you mean. It's true that the colon used in \colon differs from the one used if you input : directly by default (it's smaller). Right. For some reason, your code gives the right, smaller, colon

Re: [NTG-context] Math literal colon

2015-07-20 Thread Manuel Blanco
I'm not sure I understand what you mean. It's true that the colon used in \colon differs from the one used if you input : directly by default (it's smaller). In any case, I don't see where your discussion is going, so I will write here a few definitions. This is the definition of amsmath in

Re: [NTG-context] Math literal colon

2015-07-20 Thread Hans Aberg
On 20 Jul 2015, at 21:34, Manuel Blanco manue...@ucm.es wrote: The definition of a coordinate separator should be with \mathpunct, although it doesn't look particularly good, so may be better to use no space at all (as commented in other mails). In the case of \ratio, since it's a binary