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

2016-02-16 Thread Nicola

I read in the wiki (http://wiki.contextgarden.net/Math) that $…$
for inline math is deprecated in favor of \m{…} and more verbose
variants. Is that really the case? If so, what is the reason and
what are the differences?

Nicola


___
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-16 Thread Hans Hagen

On 2/16/2016 9:22 AM, Nicola wrote:

I read in the wiki (http://wiki.contextgarden.net/Math) that $…$
for inline math is deprecated in favor of \m{…} and more verbose
variants. Is that really the case? If so, what is the reason and
what are the differences?


that page probably needs updating

anyway, it's unlikely that $ will be dropped  (ok, i can imagine a mode 
where dollars are dollars) because it's popular as math delimiter; 
however \m has more potential for structure (we can at some point even 
considering it an instance of a more general inline math mechanism)


Hans

-
  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] Deprecated $…$ for inline math?

2016-02-16 Thread Marco Patzer
On Tue, 16 Feb 2016 09:22:23 +0100
Nicola  wrote:

> I read in the wiki (http://wiki.contextgarden.net/Math) that $…$
> for inline math is deprecated in favor of \m{…} and more verbose
> variants. Is that really the case? If so, what is the reason and
> what are the differences?

When \asciimode is used you can input special characters without
escaping: $5, 1%, etc. But this of course changes the syntax for the
original constructs. Comments use %%, inline math becomes \math{…}
or shorter \m{…}.

More detailed explanation (credits to Aditya):

  
https://randomdeterminism.wordpress.com/2011/09/04/some-thoughts-on-lowering-the-learning-curve-for-using-tex-part-i/

I like the new syntax and almost always use it, but I don't believe
it's use is wide-spread.

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] horizontal list of sections/topics?

2016-02-16 Thread Thomas A. Schmitz

On 02/14/2016 12:48 PM, Marco Patzer wrote:

I did something similar for a few presentations and wrote a small
module:

   https://github.com/mpfusion/context-slide


Thank you very much, your code was very helpful. I was trying to 
reinvent the wheel – as usually, there was already a solution in ConTeXt...


All best

Thomas
___
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] tip

2016-02-16 Thread Hans Hagen

On 2/16/2016 3:52 AM, Rik Kabel wrote:

On 2016-02-15 04:56, Hans Hagen wrote:

Hi,

There are quite some probably unknown features in context, here are two:

\enabletrackers[visualizers.justification] % overfull/underfull
\enabletrackers[typesetters.suspects] % suspicious spacing

\setuplayout[width=3mm] \showframe

\starttext

\hsize 3mm

xxx

x

$x$x

x:$x$

\stoptext


Interesting stuff. Can you point to or provide documentation on the
meaning of the hbar colors? (I did try to follow the code, but could not
make sense of it.)

With visualizers.justification, I see:

  * green
  o after loose text?
  * blue
  o in margin after tight text?


these are the bad ones

can also become red when no stretch/shrink permitted


  * yellow
  o around centering text
  * cyan
  o before flush-right text?
  * magenta
  o after flush-left text?


these are suboptimal ones (often harmless) .. the color reflects the 
flush mode



It is not clear what these all mean (except the yellow). What is the
difference between magenta and green (I see both in tables and some
column-set paragraphs)? What is the difference between green and blue?
Does green show how close to needing intraword space compression while
blue indicates the degree of compression that was done?


green is used with normal justification


With typesetters.suspects, I see

  * orange with
  o required space (*~*)
  o occasionally between words where no markup appeared (could this
flag a small word space?)


they normally reflect those invisible spacing characters being used (non 
break space and so)



  * maroon with
  o *’* preceded by whitespace as with the contraction /’tis/
  o *»* preceded by whitespace as an opening quotation mark for German
  * blue with
  o most punctuation, but not *]* or *)*, when at paragraph end or
not followed by whitespace
  o some punctuation (*@ # & % *** / …***·* *and others) at any
position
  o *.* preceding a character other than *]*
  o *.* preceding *\,*
  o some asterisms ⁂ (the second and third when three spaced are
used as a break)
  * green with
  o ς directly preceding another letter (perhaps other terminal
characters, my sample only has this)
  o digit preceding *,* in index
  o italic letter preceding or following an upright character
  o small-cap letter preceding or following a non-whitespace character

There are some obvious patterns here (font style transitions, for
example) but the logic some seems less clear. Can we get a guide?


some day ... but your observations are quite ok ... the colors are 
chosen to make sure they don't collapse too much


it's something we use in automated workflows involving thousands of xml 
files coming from repositories so that a quick visual check of what can 
be wrong is needed (much involves spacing as that is what often gets 
messed up in the xml editors / converters / tools that are used at the 
publishers / editors end)


Hans


-
  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] Deprecated $…$ for inline math?

2016-02-16 Thread Alan BRASLAU
On Tue, 16 Feb 2016 09:54:25 +0100
Hans Hagen  wrote:

> On 2/16/2016 9:22 AM, Nicola wrote:
> > I read in the wiki (http://wiki.contextgarden.net/Math) that $…$
> > for inline math is deprecated in favor of \m{…} and more verbose
> > variants. Is that really the case? If so, what is the reason and
> > what are the differences?  
> 
> that page probably needs updating
> 
> anyway, it's unlikely that $ will be dropped  (ok, i can imagine a
> mode where dollars are dollars) because it's popular as math
> delimiter; however \m has more potential for structure (we can at
> some point even considering it an instance of a more general inline
> math mechanism)

Personally, I never use \m and remain (culturally) attached to $...$
syntax. This being said, I am not a TeX purist as I never use
$$
...
$$
to delimit display math (even in LaTeX).

I see no problem with having a few reserved characters, and since I do
not often write about money or use percentages much, I have no problem
using {\%} or {\$} when I really need them. I can imagine, though, that
a finance writer might find this annoying.

I do note that the VIM syntax highlighting routine is pretty poor and
has difficulties around $, which is a symbol that I like using
(unpaired) quite a lot in MetaPost (\startMPcode...\stopMPcode).

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.

Alan





-- 
Alan Braslau
CEA DSM-IRAMIS-SPEC
CNRS UMR 3680
Orme des Merisiers
91191 Gif-sur-Yvette cedex FRANCE
tel: +33 1 69 08 73 15
fax: +33 1 69 08 87 86
mailto:alan.bras...@cea.fr
___
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] tip

2016-02-16 Thread Alan BRASLAU
On Tue, 16 Feb 2016 11:30:50 +0100
Hans Hagen  wrote:

>  Can we get a guide?  
> 
> some day ... but your observations are quite ok ...

You could Wikify it! ;-)

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-16 Thread Marco Patzer
On Tue, 16 Feb 2016 08:21:42 -0700
Alan BRASLAU  wrote:

> I do note that the VIM syntax highlighting routine is pretty poor and
> has difficulties around $, which is a symbol that I like using
> (unpaired) quite a lot in MetaPost (\startMPcode...\stopMPcode).

The stock vim context syntax highlighting ist terrible, indeed. I
modified the syntax files, the result is still terrible (and reflect
my personal context writing style instead of being general), but for
me they're better than the original ones. Then I contacted Nikolai
with the patches a while ago. He told me that he's not maintaining
the syntax files any longer and if I want to take over
maintainership. I declined because I know I wouldn't have much time
at my disposal the next months.

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

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] Deprecated $…$ for inline math?

2016-02-16 Thread Hans Hagen

On 2/16/2016 4:21 PM, Alan BRASLAU 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.\def\m#1{\startimath


you being a mathematics-physics-chemistry mixed mode user ...

\mathscriptsmode0 #1\stopimath} \m{a^l_an b^ras^l_au}
\def\m#1{\startimath\mathscriptsmode1 #1\stopimath} \m{a^l_an b^ras^l_au}
\def\m#1{\startimath\mathscriptsmode2 #1\stopimath} \m{a^l_an b^ras^l_au}
\def\m#1{\startimath\mathscriptsmode3 #1\stopimath} \m{a^l_an b^ras^l_au}
\def\m#1{\startimath\mathscriptsmode4 #1\stopimath} \m{a^l_an b^ras^l_au}
\def\m#1{\startimath\mathscriptsmode5 #1\stopimath} \m{a^l_an b^ras^l_au}

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

2016-02-16 Thread Hans Hagen

On 2/16/2016 4:23 PM, Alan BRASLAU wrote:

On Tue, 16 Feb 2016 11:30:50 +0100
Hans Hagen  wrote:


  Can we get a guide?

some day ... but your observations are quite ok ...


You could Wikify it! ;-)


Me? Rik you mean ...

Hans (too busy with other manuals)


-
  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] Deprecated $…$ for inline math?

2016-02-16 Thread Hans Hagen

On 2/16/2016 4:59 PM, Marco Patzer wrote:

On Tue, 16 Feb 2016 08:21:42 -0700
Alan BRASLAU  wrote:


I do note that the VIM syntax highlighting routine is pretty poor and
has difficulties around $, which is a symbol that I like using
(unpaired) quite a lot in MetaPost (\startMPcode...\stopMPcode).


The stock vim context syntax highlighting ist terrible, indeed. I
modified the syntax files, the result is still terrible (and reflect
my personal context writing style instead of being general), but for
me they're better than the original ones. Then I contacted Nikolai
with the patches a while ago. He told me that he's not maintaining
the syntax files any longer and if I want to take over
maintainership. I declined because I know I wouldn't have much time
at my disposal the next months.


context --extra=listing --scite --compact yoursource.tex

gives the kind of highlighting that I use here (mixed tex / mp / lua mode)


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

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
___




--

-
  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-16 Thread Volker Mische
On 02/15/2016 11:45 AM, Hans Hagen wrote:
> On 2/15/2016 11:10 AM, Volker Mische wrote:
>> On 02/15/2016 10:58 AM, Hans Hagen wrote:
>>> On 2/15/2016 10:32 AM, Volker Mische wrote:
 Hi all,

 I'd like to position some text in a corner of a natural table cell. I
 got as far as being able to put the same text on every cell (a "p" in
 the example). Now my problem is, how do I specify the contents of the
 overlay/layer on a per cell basis?

 Best for me would be if I could define the text directly within the
 cell. I'm surely open to a completely different solution that has the
 same outcome.

 Here's the minimal example of what I currently have.

 \starttext

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



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

 \bTABLE
 \setupTABLE[each][each][background=pagenumber]
 \bTR
   \bTD multiline \par text \eTD
   \bTD some cell \par with even \par more \par text \eTD
 \eTR
 \eTABLE

 \stoptext
>>>
>>> \bTABLE
>>>\bTR
>>>  \bTD multiline \par text \eTD
>>>  \bTD[background=pagenumber] some cell \par with even \par more \par
>>> text \eTD
>>>\eTR
>>> \eTABLE
>>
>>
>> I wasn't clear enough. I still want to have `pagenumber` on every cell,
>> but I'd like to be able to define its contents within the cell (instead
>> of having something like "p" hard-coded).
>>
>> So I'm looking for something like
>>
>>  \bTD multiline \par text \setlayercontents[pagenumber]{newval}\eTD
>>  \bTD some cell \par with even \par more \par text
>> \setlayercontents[pagenumber]{differentval}\eTD
> \startsetups pagenumber
>\setlayerframed
>  [pagenumber]
>  [preset=rightbottom]
>  {\getvariable{table}{p}}
> \stopsetups
> 
> \bTABLE
>\setupTABLE[each][each][background=pagenumber]
>\bTR
>  \bTD \setgvariable{table}{p}{b} multiline \par text \eTD
>  \bTD \setgvariable{table}{p}{p} some cell \par with even \par more
> \par text \eTD
>\eTR
> \eTABLE

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]

\bTABLE
   \setupTABLE[each][each][background=pagenumber]
   \bTR
 \bTD \startpn b \stoppn multiline \par text \eTD
 \bTD \startpn p \stoppn some cell \par with even \par more \par
text \eTD
   \eTR
\eTABLE

\stoptext

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
___

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

2016-02-16 Thread Wolfgang Schuster

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

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] Deprecated $…$ for inline math?

2016-02-16 Thread Aditya Mahajan

On Tue, 16 Feb 2016, Marco Patzer wrote:


On Tue, 16 Feb 2016 08:21:42 -0700
Alan BRASLAU  wrote:


I do note that the VIM syntax highlighting routine is pretty poor and
has difficulties around $, which is a symbol that I like using
(unpaired) quite a lot in MetaPost (\startMPcode...\stopMPcode).


The stock vim context syntax highlighting ist terrible, indeed. I
modified the syntax files, the result is still terrible (and reflect
my personal context writing style instead of being general), but for
me they're better than the original ones. Then I contacted Nikolai
with the patches a while ago. He told me that he's not maintaining
the syntax files any longer and if I want to take over
maintainership. I declined because I know I wouldn't have much time
at my disposal the next months.


You could try my syntax files for context:

https://github.com/adityam/vim-context

It is fairly rudimentary (compared to the syntax files for latex), but I 
do get correct syntax highlighting inside metapost and lua environments.


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
___

[NTG-context] two issues with xtables

2016-02-16 Thread Pablo Rodriguez
Dear list,

I have the following table:

\starttext
\startalign[center]
\startxtable[location=middle, frame=off, bottomframe=on,
topframe=on, rulethickness=2em,
%~ before={\startalign[center]}, after={\stopalign}
]
\startxrow
\startxcell test \stopxcell
\stopxrow
\stopxtable
\stopalign
\stoptext

Well, I thought location would center the table. Before and after (with
\startalign) crash compilation. Aligning the whole table doesn’t seem to
make any difference. Sorry, but how can I center the table and not its
contents?

The second issue is about rulethickness: would it be possible to specify
different dimensions for each frame (top, bottom, left, right)?

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] Deprecated $…$ for inline math?

2016-02-16 Thread Alan BRASLAU
On Tue, 16 Feb 2016 17:20:04 +0100
Hans Hagen  wrote:

> On 2/16/2016 4:59 PM, Marco Patzer wrote:
> > On Tue, 16 Feb 2016 08:21:42 -0700
> > Alan BRASLAU  wrote:
> >  
> >> I do note that the VIM syntax highlighting routine is pretty poor
> >> and has difficulties around $, which is a symbol that I like using
> >> (unpaired) quite a lot in MetaPost (\startMPcode...\stopMPcode).  
> >
> > The stock vim context syntax highlighting ist terrible, indeed. I
> > modified the syntax files, the result is still terrible (and reflect
> > my personal context writing style instead of being general), but for
> > me they're better than the original ones. Then I contacted Nikolai
> > with the patches a while ago. He told me that he's not maintaining
> > the syntax files any longer and if I want to take over
> > maintainership. I declined because I know I wouldn't have much time
> > at my disposal the next months.  
> 
> context --extra=listing --scite --compact yoursource.tex
> 
> gives the kind of highlighting that I use here (mixed tex / mp / lua
> mode)

During the last ConTeXt meeting, we held a workshop on Hans' scite
setup. It turns out that it depends on a Lua parsing library available
on Windows that we did not succeed in compiling/porting to other
systems. OK, we did not try too hard...


On Tue, 16 Feb 2016 13:50:33 -0500
Aditya Mahajan  wrote:

> You could try my syntax files for context:
> 
> https://github.com/adityam/vim-context
> 
> It is fairly rudimentary (compared to the syntax files for latex),
> but I do get correct syntax highlighting inside metapost and lua
> environments.

Thank you. This surely must work better than what is shipped with vim.

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] two issues with xtables

2016-02-16 Thread Wolfgang Schuster

Pablo Rodriguez 
16. Februar 2016 um 20:11
Dear list,

I have the following table:

\starttext
\startalign[center]
\startxtable[location=middle, frame=off, bottomframe=on,
topframe=on, rulethickness=2em,
%~ before={\startalign[center]}, after={\stopalign}
]
\startxrow
\startxcell test \stopxcell
\stopxrow
\stopxtable
\stopalign
\stoptext

Well, I thought location would center the table. Before and after (with
\startalign) crash compilation. Aligning the whole table doesn’t seem to
make any difference. Sorry, but how can I center the table and not its
contents?

Use

\startlinealignment[middle]
   \startxtable
...
\stopxtable
\stoplinealignment

or

\startplacetable[location={force,none}]
   \startxtable
...
\stopxtable
\stopplacetable

The second issue is about rulethickness: would it be possible to specify
different dimensions for each frame (top, bottom, left, right)?

Disable the normal frame and use a metapost background with
different values for all borders.

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] two issues with xtables

2016-02-16 Thread Pablo Rodriguez
On 02/16/2016 08:22 PM, Wolfgang Schuster wrote:
>> Pablo Rodriguez 16. Februar 2016 um 20:11
>> [...]
>> Well, I thought location would center the table. Before and after (with
>> \startalign) crash compilation. Aligning the whole table doesn’t seem to
>> make any difference. Sorry, but how can I center the table and not its
>> contents?
> 
> Use
> 
> \startlinealignment[middle]
> or
> \startplacetable[location={force,none}]

Many thanks for your reply, Wolfgang.

Only the second option works with the real table. The first one crashes
compilation.

>> The second issue is about rulethickness: would it be possible to specify
>> different dimensions for each frame (top, bottom, left, right)?
> Disable the normal frame and use a metapost background with
> different values for all borders.

MetaPost is unknown to me. How would it be with this minimal sample?

\starttext
\startxtable[bottomframe=on, topframe=on, rulethickness=2em]
\startxrow
\startxcell test \stopxcell
\stopxrow
\stopxtable
\stoptext

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-16 Thread Wolfgang Schuster

Pablo Rodriguez 
16. Februar 2016 um 20:59
On 02/16/2016 08:22 PM, Wolfgang Schuster wrote:

Pablo Rodriguez 16. Februar 2016 um 20:11
[...]
Well, I thought location would center the table. Before and after (with
\startalign) crash compilation. Aligning the whole table doesn’t seem to
make any difference. Sorry, but how can I center the table and not its
contents?

Use

\startlinealignment[middle]
or
\startplacetable[location={force,none}]


Many thanks for your reply, Wolfgang.

Only the second option works with the real table. The first one crashes
compilation.


The second issue is about rulethickness: would it be possible to specify
different dimensions for each frame (top, bottom, left, right)?

Disable the normal frame and use a metapost background with
different values for all borders.


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.

\installleftframerenderer 
{small}{\blackrule[height=\overlayheight,width=1\linewidth]}

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


\starttext

\framed{Text}

\framed[leftframe=small]{Text}

\framed[leftframe=medium]{Text}

\framed[leftframe=big]{Text}

\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] Absolute position in table cell

2016-02-16 Thread Volker Mische
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.

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
___

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

2016-02-16 Thread Hans Hagen

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}


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

2016-02-16 Thread Rik Kabel

On 2016-02-16 11:18, Hans Hagen wrote:

On 2/16/2016 4:23 PM, Alan BRASLAU wrote:

On Tue, 16 Feb 2016 11:30:50 +0100
Hans Hagen  wrote:


  Can we get a guide?

some day ... but your observations are quite ok ...


You could Wikify it! ;-)


Me? Rik you mean ...

Hans (too busy with other manuals)



Done.

I updated the description at Command/enabletrackers 
 and added two 
pages, Trackers/typesetters.suspects 
 and 
Trackers/visualizers.justification 
. I am 
not well-versed in the structure of the wiki, so perhaps others can add 
appropriate decorations to the new pages, and move the new pages if they 
belong elsewhere. Others might also be interested in adding 
documentation for other trackers in that hierarchy.


--
rik
___
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-16 Thread Otared Kavian
I agree totally with Alan in saying that the inline math signals $\cdots$ 
should NEVER be left out from ConTeXt, or even become deprecated. 

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.

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
___