Re: [NTG-context] Deprecated $…$ for inline math?

2016-02-17 Thread Alan BRASLAU
On Thu, 18 Feb 2016 00:40:39 +0100
Pablo Rodriguez  wrote:

> Excuse me, Alan, this is exclamation in Spanish (and only in Spanish).

Bigre ! Of course, I know that.

> Just out of curiosity, why do you think he should have chosen that?

I was attempting to make some fun with this thread.

More seriously, \( expression \) was already an attempt to come up with
something "better". I am risking to state that $expression$ and
\math{expression} are two good solutions for ConTeXt and that
\m{expression} is, at best, just useless. Furthermore, any suggestion to
depreciate $expression$ is, in my opinion (and apparently in the
opinion of others), ludicrous.

Alan

P.S. I am a present writing a chapter on mathematics for a small
introduction on typesetting with ConTeXt, so this discussion is
highly relevant.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Deprecated $…$ for inline math?

2016-02-17 Thread Pablo Rodriguez
On 02/17/2016 11:18 PM, Alan BRASLAU wrote:
> On Wed, 17 Feb 2016 20:08:31 +0100 Hans Hagen wrote:
> 
>> you're an american citizen who likes $x^2$ but to call if
>> beautiful ... €x^2€ nor £x^2£ (in 8 bit encodings / local keyboards
>> times) all look bad ... 
> 
> Hans, you forgot: ¥x^2¥, ₽x^2₽, ₱x^2₱, ₹x^2₹, ...
> Besides, U+0024 comes from ASCII and all programmers know that it is a
> perfectly valid and useful character. 

Of course, and even ₧x²₧ or even ₯x²₯...

>> we need a proper begin/end symbol .. 
> 
> Too bad Knuth did not choose ¡x^2! 

Excuse me, Alan, this is exclamation in Spanish (and only in Spanish).

Just out of curiosity, why do you think he should have chosen that?

Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Deprecated $…$ for inline math?

2016-02-17 Thread Alan BRASLAU
On Wed, 17 Feb 2016 13:24:53 -0500
Aditya Mahajan  wrote:

> I am curious to know if there is ANYONE who types in a lot of math
> and regularly uses \m{...} or \math{...}. I still use $$ and use
> \math{..} or \mathematics{...} only when generating output from lua
> code: context.math("") etc. is cleaner than context("$%s$", ...)

We should DROP \m{} (in favor of \math{}) as this is really useless. I
suppose that in the beginning (and according to Aditya's blog), this
was some attempt to be as short as $...$, well only two characters
longer. Since no one in his or her right mind would regularly use
\m{...} in favor to $...$, as Aditya himself suggests above, it is
redundant. Indeed, \math{...}, context.math(¨..."), \mathematics{...}
and context.mathematics("...") have their utility. See also below.

On Wed, 17 Feb 2016 20:08:31 +0100
Hans Hagen  wrote:

> you're an american citizen who likes $x^2$ but to call if
> beautiful ... €x^2€ nor £x^2£ (in 8 bit encodings / local keyboards
> times) all look bad ... 

Hans, you forgot: ¥x^2¥, ₽x^2₽, ₱x^2₱, ₹x^2₹, ...
Besides, U+0024 comes from ASCII and all programmers know that it is a
perfectly valid and useful character. 

> we need a proper begin/end symbol .. 

Too bad Knuth did not choose ¡x^2! 

> anyway, this won't happen as it's too tricky:
> 
> $[i:tight] x^2$

This is a good case for \math[i:tight]{x^2}
 
> so for controlled situations (we happen to need it) the \m or s
> variant is quite ok (inside xml processing one only needs a few such
> calls in mappings

The \math or \mathematics variant should work in all such cases.

Alan
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Deprecated $…$ for inline math?

2016-02-17 Thread Rogers, Michael K
I use $…$.  And for copying text from one TeX to another (e.g. ConTeXt <—> 
PlainTex/Latex/Markdown/Jax), it would be a pain if I couldn't.

Michael

> On Feb 17, 2016, at 1:24 PM, Aditya Mahajan  wrote:
>
> On Wed, 17 Feb 2016, Alan BRASLAU wrote:
>
>> However, I can see situations where one might want to tighten spacing
>> in order to fit a particular expression within a line or in a table,
>> for example. Here, \math[options]{expression} is a reasonable syntax,
>> yet I cannot foresee ever using the very cryptic \m{} for any reason:
>> it is just plain ugly! (No TeXie would ever find $$ as
>> ugly...)
>
> I am curious to know if there is ANYONE who types in a lot of math and 
> regularly uses \m{...} or \math{...}. I still use $$ and use \math{..} or 
> \mathematics{...} only when generating output from lua code: 
> context.math("") etc. is cleaner than context("$%s$", ...)
>
> Aditya
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Deprecated $…$ for inline math?

2016-02-17 Thread Aditya Mahajan

On Wed, 17 Feb 2016, Alan BRASLAU wrote:


However, I can see situations where one might want to tighten spacing
in order to fit a particular expression within a line or in a table,
for example. Here, \math[options]{expression} is a reasonable syntax,
yet I cannot foresee ever using the very cryptic \m{} for any reason:
it is just plain ugly! (No TeXie would ever find $$ as
ugly...)


I am curious to know if there is ANYONE who types in a lot of math and 
regularly uses \m{...} or \math{...}. I still use $$ and use \math{..} 
or \mathematics{...} only when generating output from lua code: 
context.math("") etc. is cleaner than context("$%s$", ...)


Aditya
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Deprecated $…$ for inline math?

2016-02-17 Thread Alan BRASLAU
On Wed, 17 Feb 2016 10:44:43 +0100
Hans Hagen  wrote:

> also, but don't tell alan, there is this:
> 
> \m[i:tight]{}
> 
> i:default, i:tight, i:half, i:fixed

I spy...

I would suggest that one would set (inline) math spacing and other
options (like \mathscriptsmode) globally for a document, as it would not
be very good style to mix and match.

However, I can see situations where one might want to tighten spacing
in order to fit a particular expression within a line or in a table,
for example. Here, \math[options]{expression} is a reasonable syntax,
yet I cannot foresee ever using the very cryptic \m{} for any reason:
it is just plain ugly! (No TeXie would ever find $$ as
ugly...)

Alan 
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] applying properties to columns / rows in xtables

2016-02-17 Thread Pablo Rodriguez
On 02/17/2016 04:22 PM, Wolfgang Schuster wrote:
> [...]
> \setupxtable[align=\ifcase\currentxtablecolumn\or flushright\else middle\fi]

Many thanks for your fast reply, Wolfgang.

This is exactly what I need. I wouldn’t have found out myself in centuries.

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] applying properties to columns / rows in xtables

2016-02-17 Thread Wolfgang Schuster

Pablo Rodriguez 
17. Februar 2016 um 16:12

Sorry, Wolfgang. You’re right, I forgot to tell-

I want to avoid tagging each cell to get this:

\starttext
\startxtable[option=stretch]
\startxrow
\startxcell[align=left] one \stopxcell
\startxcell[align=center] two \stopxcell
\stopxrow
\startxrow
\startxcell[align=left] alpha \stopxcell
\startxcell[align=center] beta \stopxcell
\stopxrow
\stopxtable
\stoptext

I don’t know whether there is something similar to:

\setupxtable[column:first][align=left]

Having to add an identifier to the xcell is something that I would like
to avoid too.

Many thanks for your help,

Pablo
Wolfgang Schuster 
17. Februar 2016 um 16:01
What do you want to do?

Wolfgang
Pablo Rodriguez 
17. Februar 2016 um 15:48
Dear list,

having this basic xtable (adapted from xtables-mkiv.pdf):

\starttext
\startxtable[option=stretch]
\startxrow
\startxcell one \stopxcell
\startxcell two \stopxcell
\stopxrow
\startxrow
\startxcell alpha \stopxcell
\startxcell beta \stopxcell
\stopxrow
\stopxtable
\stoptext

Is there any way to apply properties to the first column and the second
column without having to add an identifier to each xcell?

In this sample, it would be easy. In a longer xtable, I would like to
avoid it :-).

\starttext

\setupxtable[align=\ifcase\currentxtablecolumn\or flushright\else middle\fi]

\startxtable[option=stretch]
\startxrow
\startxcell one \stopxcell
\startxcell two \stopxcell
\stopxrow
\startxrow
\startxcell alpha \stopxcell
\startxcell beta \stopxcell
\stopxrow
\stopxtable

\stoptext

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] applying properties to columns / rows in xtables

2016-02-17 Thread Pablo Rodriguez
On 02/17/2016 04:01 PM, Wolfgang Schuster wrote:
>> Pablo Rodriguez 17. Februar 2016 um 15:48
>> In this sample, it would be easy. In a longer xtable, I would like to
>> avoid it :-).
> 
> What do you want to do?

Sorry, Wolfgang. You’re right, I forgot to tell-

I want to avoid tagging each cell to get this:

\starttext
\startxtable[option=stretch]
\startxrow
\startxcell[align=left] one \stopxcell
\startxcell[align=center] two \stopxcell
\stopxrow
\startxrow
\startxcell[align=left] alpha \stopxcell
\startxcell[align=center] beta \stopxcell
\stopxrow
\stopxtable
\stoptext

I don’t know whether there is something similar to:

   \setupxtable[column:first][align=left]

Having to add an identifier to the xcell is something that I would like
to avoid too.

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] applying properties to columns / rows in xtables

2016-02-17 Thread Wolfgang Schuster

Pablo Rodriguez 
17. Februar 2016 um 15:48
Dear list,

having this basic xtable (adapted from xtables-mkiv.pdf):

\starttext
\startxtable[option=stretch]
\startxrow
\startxcell one \stopxcell
\startxcell two \stopxcell
\stopxrow
\startxrow
\startxcell alpha \stopxcell
\startxcell beta \stopxcell
\stopxrow
\stopxtable
\stoptext

Is there any way to apply properties to the first column and the second
column without having to add an identifier to each xcell?

In this sample, it would be easy. In a longer xtable, I would like to
avoid it :-).

What do you want to do?

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] applying properties to columns / rows in xtables

2016-02-17 Thread Pablo Rodriguez
Dear list,

having this basic xtable (adapted from xtables-mkiv.pdf):

\starttext
\startxtable[option=stretch]
\startxrow
\startxcell one \stopxcell
\startxcell two \stopxcell
\stopxrow
\startxrow
\startxcell alpha \stopxcell
\startxcell beta \stopxcell
\stopxrow
\stopxtable
\stoptext

Is there any way to apply properties to the first column and the second
column without having to add an identifier to each xcell?

In this sample, it would be easy. In a longer xtable, I would like to
avoid it :-).

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] two issues with xtables

2016-02-17 Thread Pablo Rodriguez
On 02/17/2016 03:22 PM, Pablo Rodriguez wrote:
> [...]
> I wonder whether a common \installframerenderer would make sense here.
> It would simplify code writing. Or at least I think it may be useful.

Excuse my nonsense. I have just realized that lines must be different
for top/bottom and left/right.

Sorry for the noise,


Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] two issues with xtables

2016-02-17 Thread Pablo Rodriguez
On 02/17/2016 03:08 PM, Aditya Mahajan wrote:
> On Wed, 17 Feb 2016, Pablo Rodriguez wrote:
>> [..]
>> I’m afraid that only leftframe seems to work with latest beta:
>>
>>\installleftframerenderer{big}{\blackrule[height=\overlayheight,
>>width=3\linewidth]}
> 
> You need to add \installrightframerenderer, \installtopframerenderer, and 
> \installbottomframerenderer.

Many thanks for your help, Aditya.

Of course, you’re right. I totally overlooked it. I misread
\installframerenderer.

I wonder whether a common \installframerenderer would make sense here.
It would simplify code writing. Or at least I think it may be useful.

Many thanks for your help (and sorry for still being asleep  :-)),

Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] two issues with xtables

2016-02-17 Thread Aditya Mahajan

On Wed, 17 Feb 2016, Pablo Rodriguez wrote:


On 02/16/2016 09:07 PM, Wolfgang Schuster wrote:

Pablo Rodriguez 16. Februar 2016 um 20:59
[...]
MetaPost is unknown to me. How would it be with this minimal sample?


There is a second method which let you create your own argument for the
leftframe,
rightframe etc. keys.


Many thanks for your reply, Wolfgang.

I’m afraid that only leftframe seems to work with latest beta:

   \installleftframerenderer{big}{\blackrule[height=\overlayheight,
   width=3\linewidth]}


You need to add \installrightframerenderer, \installtopframerenderer, and 
\installbottomframerenderer.


Aditya___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] two issues with xtables

2016-02-17 Thread Pablo Rodriguez
On 02/16/2016 09:07 PM, Wolfgang Schuster wrote:
>> Pablo Rodriguez 16. Februar 2016 um 20:59
>> [...]
>> MetaPost is unknown to me. How would it be with this minimal sample?
> 
> There is a second method which let you create your own argument for the
> leftframe,
> rightframe etc. keys.

Many thanks for your reply, Wolfgang.

I’m afraid that only leftframe seems to work with latest beta:

\installleftframerenderer{big}{\blackrule[height=\overlayheight,
width=3\linewidth]}

\starttext

\framed{Text}

\framed[leftframe=big]{Text}

\framed[bottomframe=big]{Text}

\framed[rightframe=big]{Text}

\framed[topframe=big]{Text}

\stoptext

I have no idea about what I may be doing wrong.

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Buffer with syntax highlighting

2016-02-17 Thread Procházka Lukáš Ing .

That's it, thank you! Lukas


On Wed, 17 Feb 2016 13:39:47 +0100, Marco Patzer  wrote:


On Wed, 17 Feb 2016 13:16:03 +0100
Procházka Lukáš Ing.  wrote:


is it possible to \typebuffer with a syntax highlighting?


\typebuffer
  [demo]
  [option=context]

Also have a look at Aditya's vim syntax highlighter module which is
great.

Marco
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Titles numbering

2016-02-17 Thread Wolfgang Schuster

Michał Goliński 
17. Februar 2016 um 14:32
The following file used to give me numbered titles (and still gives 
numbered titles in TeXLive):


\setuphead[part][
  placehead=yes,
  page=yes,
%  number=yes
]

\setuphead[chapter][
  page=yes,
%  number=yes
]

\starttext

\startbodymatter

  \startpart[title={Part one}]
\startchapter[title={Fancy chapter name}]
  \startsection[title={A very very very long section title}, 
list={Shortened somewhat}]

\input knuth
  \stopsection
\stopchapter
  \stoppart

\stopbodymatter

  \startbackmatter
\startchapter[title={Contents}]
  \placecontent[criterium=all]
\stopchapter
  \stopbackmatter
\stoptext


In the current beta, they are unnumbered. Has the syntax changed?


Besides, according to wiki, "number=yes" should force a numbered 
title, while uncommenting these lines in fact suppresses the number in 
TeXLive (and does not help in beta).


Is this a bug/work in progress or am I doing something wrong here?

You’re missing the start/stop-commands for the bodypart.

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Titles numbering

2016-02-17 Thread Michał Goliński
The following file used to give me numbered titles (and still gives 
numbered titles in TeXLive):


\setuphead[part][
  placehead=yes,
  page=yes,
%  number=yes
]

\setuphead[chapter][
  page=yes,
%  number=yes
]

\starttext
  \startpart[title={Part one}]
\startchapter[title={Fancy chapter name}]
  \startsection[title={A very very very long section title}, 
list={Shortened somewhat}]

\input knuth
  \stopsection
\stopchapter
  \stoppart

  \startbackmatter
\startchapter[title={Contents}]
  \placecontent[criterium=all]
\stopchapter
  \stopbackmatter
\stoptext


In the current beta, they are unnumbered. Has the syntax changed?


Besides, according to wiki, "number=yes" should force a numbered title, 
while uncommenting these lines in fact suppresses the number in TeXLive 
(and does not help in beta).


Is this a bug/work in progress or am I doing something wrong here?

Regards
Michał


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] new error in Context-Metapost

2016-02-17 Thread Meer, Hans van der
Thanks for the quick answer.
This error looks tricky indeed. I haven't the faintest illusion I could have 
found out by myself...

Hans van der Meer




On 17 Feb 2016, at 13:34, Hans Hagen > 
wrote:
That was a tricky one to nail down ... it related to the fact that have \{ and 
\} have a different meaning when we flush metapost text (makes me wonder if 
that is still needed)

this helps

\installmathfencepair
 \letteropenbrace \Lbrace
 \letterclosebrace \Rbrace

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Buffer with syntax highlighting

2016-02-17 Thread Marco Patzer
On Wed, 17 Feb 2016 13:16:03 +0100
Procházka Lukáš Ing.  wrote:

> is it possible to \typebuffer with a syntax highlighting?

\typebuffer
  [demo]
  [option=context]

Also have a look at Aditya's vim syntax highlighter module which is
great.

Marco
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Buffer with syntax highlighting

2016-02-17 Thread Hans Hagen

On 2/17/2016 1:16 PM, Procházka Lukáš Ing. wrote:

Hello,

is it possible to \typebuffer with a syntax highlighting?

\typefile allows to specific syntax highlighter, e.g.
\typefile[TEX]{file.tex};
\typebuffer does not (AFAIK).

It would be useful to have:

\startbuffer[demo]
   \startitemize
 \item Hello!
   \stopitemize
\stopbuffer

which would get the original code and its result:

"
Sample code:
\typebuffer[demo][syntax=ConTeXt] % Specify syntax highlighter, show the
code
produces:
\getbuffer[demo] % Result
"

Is it possible somehow?


the 'option' key does that (option=tex)


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] new error in Context-Metapost

2016-02-17 Thread Hans Hagen

On 2/17/2016 11:27 AM, Meer, Hans van der wrote:

Some code that worked ok but hasn't been used for some time, now gives
an error: missing $.
It is working fine in ConTeXt, but putting it inside an MPpage goes wrong.


That was a tricky one to nail down ... it related to the fact that have 
\{ and \} have a different meaning when we flush metapost text (makes me 
wonder if that is still needed)


this helps

\installmathfencepair
  \letteropenbrace \Lbrace
  \letterclosebrace \Rbrace



Here a minimal example, the output of the ConTeXt run and the error on
the MPpage run.
Has something changed I missed?

Hans van der Meer


The error occurs in this code, my suspect is the cases macro.
\starttext
\startsetups[dif-1]
$\displaystyle
\Delta_{in} = 1000_2 \cases{(A,2)(2,A)&\cr (6,E)(E,6)&\cr}
\buildrel S_1 \over \rightarrow \quad
\Delta_{uit} = 1011_2 \cases{(6,D)(D,6)&\cr (B,0)(0,B)&\cr}
$
\stopsetups
\startMPpage
label("\setup[dif-1]",origin);
\stopMPpage
\stoptext

tex error   > tex error on line 9 in file
/Users/hansm/Documents/TeX/Test-tex/cases/cases.tex: ! Missing $ inserted


$

\endgroup
\math_fenced_fenced_stop ...leparameter \endgroup
   \advance
\c_math_fenced_ne...
\14>:dif-1 ...ses {(A,2)(2,A)&\cr (6,E)(E,6)&\cr }
   \buildrel S_1 \over
\right...
l.9 ...edfont[LMRoman-Regular*default]\setup [dif-1]



\relax
...
l.12 \stopMPpage

The ConTeXt run itself is ok, see below

\starttext
\startsetups[dif-1]
$\displaystyle
\Delta_{in} = 1000_2 \cases{(A,2)(2,A)&\cr (6,E)(E,6)&\cr}
\buildrel S_1 \over \rightarrow \quad
\Delta_{uit} = 1011_2 \cases{(6,D)(D,6)&\cr (B,0)(0,B)&\cr}
$
\stopsetups
\setup[dif-1]
\stoptext





___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Buffer with syntax highlighting

2016-02-17 Thread Procházka Lukáš Ing .

Hello,

is it possible to \typebuffer with a syntax highlighting?

\typefile allows to specific syntax highlighter, e.g. \typefile[TEX]{file.tex};
\typebuffer does not (AFAIK).

It would be useful to have:

\startbuffer[demo]
  \startitemize
\item Hello!
  \stopitemize
\stopbuffer

which would get the original code and its result:

"
Sample code:
\typebuffer[demo][syntax=ConTeXt] % Specify syntax highlighter, show the code
produces:
\getbuffer[demo] % Result
"

Is it possible somehow?

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] new error in Context-Metapost

2016-02-17 Thread Meer, Hans van der
Some code that worked ok but hasn't been used for some time, now gives an 
error: missing $.
It is working fine in ConTeXt, but putting it inside an MPpage goes wrong.

Here a minimal example, the output of the ConTeXt run and the error on the 
MPpage run.
Has something changed I missed?

Hans van der Meer


The error occurs in this code, my suspect is the cases macro.
\starttext
\startsetups[dif-1]
$\displaystyle
\Delta_{in} = 1000_2 \cases{(A,2)(2,A)&\cr (6,E)(E,6)&\cr}
\buildrel S_1 \over \rightarrow \quad
\Delta_{uit} = 1011_2 \cases{(6,D)(D,6)&\cr (B,0)(0,B)&\cr}
$
\stopsetups
\startMPpage
label("\setup[dif-1]",origin);
\stopMPpage
\stoptext

tex error   > tex error on line 9 in file 
/Users/hansm/Documents/TeX/Test-tex/cases/cases.tex: ! Missing $ inserted


$

\endgroup
\math_fenced_fenced_stop ...leparameter \endgroup
  \advance \c_math_fenced_ne...
\14>:dif-1 ...ses {(A,2)(2,A)&\cr (6,E)(E,6)&\cr }
  \buildrel S_1 \over \right...
l.9 ...edfont[LMRoman-Regular*default]\setup [dif-1]




\relax
...
l.12 \stopMPpage

The ConTeXt run itself is ok, see below

\starttext
\startsetups[dif-1]
$\displaystyle
\Delta_{in} = 1000_2 \cases{(A,2)(2,A)&\cr (6,E)(E,6)&\cr}
\buildrel S_1 \over \rightarrow \quad
\Delta_{uit} = 1011_2 \cases{(6,D)(D,6)&\cr (B,0)(0,B)&\cr}
$
\stopsetups
\setup[dif-1]
\stoptext





cases.pdf
Description: cases.pdf
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Deprecated $…$ for inline math?

2016-02-17 Thread Hans Hagen

On 2/17/2016 8:31 AM, Otared Kavian wrote:

I agree totally with Alan in saying that the inline math signals $\cdots$ 
should NEVER be left out from ConTeXt, or even become deprecated.


that was never the intention (as one can always run in asciimode) but 
what's being discussed here is more robust tagging (could be for editor 
lexing or other purposes)


also, but don't tell alan, there is this:

\m[i:tight]{}

i:default, i:tight, i:half, i:fixed


Indeed many people move mathematical texts from one file to another one, in 
order to be able to typeset or print it either with ConTeXt, or other 
macro-packages. Other situations include when one is collaborating with other 
people using TeX, where inline math between two $ signs  is now well 
established. Also in many situations people may use ConTeXt  for well presented 
documents, presentations and so forth, while the same text may be published in 
a scientific journal where one has to use their own formats, usually an ugly 
flavor of LaTeX, since, unfortuantely, up to now I don’t know of any 
mathematical journal where one can submit a TeX file written with ConTeXt 
macro-package.


and even if dollars were just dollars one could easily make then 
math-shift characters again


\catcode`\$ = 3

(or pounds on an brittish keyboard or ...)

btw, in math mode some chars are special too (primes for instance, a 
headache character)



Best regards: OK


On 16 Feb 2016, at 20:18, Alan BRASLAU  wrote:

On Tue, 16 Feb 2016 16:59:58 +0100
Marco Patzer  wrote:


What sort of needs for structure could \m address for inline math?
Clearly, an equation to which one might want to have a reference
math should appear rather as displayed math.


While I agree on that one, writing \math{x^2} clearly states what it
is. TeX tradition aside, dollar signs make no sense here and you
have to manually match beginning and end. Braces are matched
automatically (probably depends on the editor as well).


\math{x²} states what it is. However \m{x²} is cryptic and, although
only two characters longer than $x²$, is infinitely less readable than
the dollar-delimited variant, even now to MS/Word users who have ever
used the equation editor.

When typing sentences containing lots of math, having many \math{}
commands becomes unwieldy, but, in the end, this becomes a
question of personal taste.

Alan
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Absolute position in table cell

2016-02-17 Thread Volker Mische
On 02/16/2016 10:49 PM, Hans Hagen wrote:
> On 2/16/2016 10:29 PM, Volker Mische wrote:
>> On 02/16/2016 05:40 PM, Wolfgang Schuster wrote:
 Volker Mische 
 16. Februar 2016 um 17:21

 Thanks a lot that works.

 I've a follow up question. I'd like to wrap the `\setgvariable` in a a
 paragraph like thing. I found out about annotations, which look like
 what I've after.

 Though sadly I get an error message (! Undefined control sequence) when
 I use annotations. It works when I hard-code a value within the
 annotation, but it doesn't if I use the contents of the annotation.
 I've
 also tried it the `\placeannotationcontent` way, but there I get the
 same error. Here's the full example:

 \starttext

 \definelayer [pagenumber][width=\overlaywidth,height=\overlayheight]
 \defineoverlay[pagenumber][{\directsetup{pagenumber}\tightlayer[pagenumber]}]


 \startsetups pagenumber
 \setlayerframed
 [pagenumber]
 [preset=rightbottom]
 {\getvariable{table}{p}}
 \stopsetups

 \define[2]\PageWrapper{\setgvariable{table}{p}{#2}}

 \usemodule[annotation]
 \defineannotation
 [pn]
 [alternative=command, command=\PageWrapper]
>>> Use this defintion for your \startpn … \stoppn command:
>>>
>>> \define\startpn
>>>{\grabuntil{stoppn}{\setgvariable{table}{p}}}
>>
>>
>> Thanks for you help. Sadly I can't get it working, even if I hard-code
>> the value of \setgvariable as e.g. \setgvariable{table}{p}{q}.
>>
>> I start to wonder if my whole approach is flawed and if there's a better
>> way to display something absolutely positioned in (the corner of) a
>> table cell that gets defined in the normal flow (just like another
>> paragraph within the cell).
>>
>> Any pointers are welcome, I'm happy to dig deeper myself.
> 
> test \wordright{p}

Thanks again. It's not quite what I'm after as it would be on the same
line as the last in the paragraph (or one after), but another cell might
be higher. So it might not always end up at the absolute bottom.

Anyway, you all provided already so much help. As I'm a Context newbie
I'll just take the to play around with the stuff and see if I can come
up with something that suits my needs. I'll start a new thread in case
I've a more more specific question.

Cheers,
  Volker

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___