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 \unexpanded\def

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

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 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 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

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 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 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 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

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 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

Re: [NTG-context] Math alignment

2015-07-07 Thread Hans Aberg
On 7 Jul 2015, at 16:47, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: I get errors when using \MC - see example below. The \NR before \stopmathcases is missing in all your examples. OK. Though I know it, it is hard to get used to, coming from LaTeX. But the spacing is wrong:

Re: [NTG-context] Math alignment

2015-07-07 Thread Hans Aberg
On 7 Jul 2015, at 04:46, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: The spacing is different in cases - TeX also has such a variation. Specifically, there is extra space before the conditionals. In addition, it seems \startmathcases ... \stopmathcases is not working with

[NTG-context] Environments

2015-07-07 Thread Hans Aberg
ConTeXt does not seem to have LaTeX style environments. FYI, for the latter, I developed [1] a long time ago more advanced ones: The environments admit hooks, i.e., code executed before and after the local group. The name can be omitted in the closing, which works also when using one

Re: [NTG-context] Math alignment

2015-07-07 Thread Hans Aberg
On 7 Jul 2015, at 20:17, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: You can set the alignment for each column in a matrix with the align key. \definemathmatrix [aligned] [n=2, align={right,left}, distance=\spaceamount] \starttext \startformula J^j:

Re: [NTG-context] Math alignment

2015-07-07 Thread Hans Aberg
On 7 Jul 2015, at 21:49, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: You should google for mathalign.pdf which explains and shows examples for the matrix, cases etc. environments. To get the same result as your LaTeX example you can use the m key for \startalign.

Re: [NTG-context] Math alignment

2015-07-07 Thread Hans Aberg
On 7 Jul 2015, at 20:17, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: You can set the alignment for each column in a matrix with the align key. FYI, the document amshelp.pdf says that AMS-LaTeX environments align, align*, and aligned, can have multiple alignments, and gives this

Re: [NTG-context] Math alignment

2015-07-07 Thread Hans Aberg
On 7 Jul 2015, at 21:18, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: I have also put in an extra alignment to see what happens, monospace code alignment style. Changing ‘left’ to ‘right did not seem to have any effect here. Can you see the effect of the alignment?

Re: [NTG-context] Math alignment

2015-07-07 Thread Hans Aberg
On 7 Jul 2015, at 21:49, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: You should google for mathalign.pdf which explains and shows examples for the matrix, cases etc. environments. It looks rather basic, except for last formula of section 9. The document amshelp.pdf, ch. 7, has

Re: [NTG-context] Environments

2015-07-07 Thread Hans Aberg
On 7 Jul 2015, at 11:05, luigi scarso luigi.sca...@gmail.com wrote: For LaTeX style environments do you mean e.g. https://it.sharelatex.com/learn/Environments ? (just to be sure ) Yes, the \begin{foo} … \end{foo} syntax. Technically, an environment means that variables are stacked in a

[NTG-context] Smallmatrix not implemented

2015-07-06 Thread Hans Aberg
Smallmatrix from AMS-TeX is not implemented in ConTeXt (Tex Live 2015), though crossed out in m-newmat.tex. I found this old post: http://www.ntg.nl/pipermail/ntg-context/2005/013146.html ___ If your question is

[NTG-context] Math alignment

2015-07-06 Thread Hans Aberg
The example below shows the intended output when using original TeX code (compiled with ‘context' of TeX Live 2015): a pair of left braced formulas. The first comment shows what works in AMS-LaTeX. However, when trying similar ConTeXt commands, I get the error shown in the comment below. What

[NTG-context] Integral spacing

2015-07-06 Thread Hans Aberg
I get too much spacing after the integrals when using ‘context’ (TeX Live 2015) - see first example below. Cf. the second example below, compiled with luatex. In ConTeXt, the result is the same regardless of body font, and also if using original TeX \int. --- context ---

Re: [NTG-context] Math alignment

2015-07-06 Thread Hans Aberg
[I do not get copies from the list, though having signed up.] Wolfgang Schuster wrote: On 6 Jul 2015, at 11:24, Hans Aberg haber...@telia.com wrote: The example below shows the intended output when using original TeX code (compiled with ‘context' of TeX Live 2015): a pair of left braced

Re: [NTG-context] Smallmatrix not implemented

2015-07-06 Thread Hans Aberg
[I do not get copies from the list, though having signed up.] Smallmatrix from AMS-TeX is not implemented in ConTeXt (Tex Live 2015), though crossed out in m-newmat.tex. You can create your own matrix environment for inline use: \definemathmatrix [smallmatrix] [left=\Big(,

[NTG-context] Font selection ranges

2011-09-30 Thread Hans Aberg
I want to define an environment for computer code including non-ASCII characters, using Xits or STIXGeneral except in the ASCII range, where some monospace font like Courier should be used. If I do: \setupbodyfont[xits,10pt] \definetyping[code] \setuptyping[code][margin=yes] \starttext