Re: [NTG-context] Installing VSCode extension?

2020-07-29 Thread Alasdair McAndrew
Thanks again, I've fiddled with SciTE, but when I attempted to compile a
context file, I was told that "texexec" wasn't in my path, so somehow,
somewhere, I must have picked up an old version of the compile command.
Also, there doesn't seem to be an easy way of getting SciTE to use a
monospaced font.  I've fiddled with the customization files to no avail
whatsoever.  I think I have Atom already, but surely there should be some
easy way of getting other text editors working?

On Thu, Jul 30, 2020 at 1:13 AM Henning Hraban Ramm  wrote:

>
> > Am 29.07.2020 um 14:19 schrieb Alasdair McAndrew :
> >
> > Thank you very much, but in fact that script file "vscode-context.cmd"
> really just contains the same command for installing extensions as I quoted
> above - and so produces the same errors.  Maybe I'll go back to trying
> SciTe - I gave it a bit of a go, but wasn't successful.  Of all the
> information on the context-wiki, and the Pragma webpage - where would I go
> to find the most up-to-date information about configuring an editor to work
> with ConTeXt in Windows?
>
> You could try Atom and install the ConTeXt module from
> github.com/massifrg/language-context.
> Original language-context is outdated, but upstream didn’t react to mails
> from Massi and me.
> This version also isn’t perfect, but I’m using and occasionally updating
> it. (I should re-base it on the current work done for the wiki.) There’s
> also still no run command.
>
> Additionally you should install
> - language-latex (contains plain TeX commands)
> - language-lua
> - atom-ide-terminal (for running ConTeXt in place)
> - file-icons (only icon package that contains TeX icons)
> - pdf-view (not very good, but good enough for simple cases)
>
> Best, Hraban
>
>
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>


-- 
https://numbersandshapes.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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] About testing rest of space on a page

2020-07-29 Thread Willi Egger
Good evening!

I have a bookproject in which sections are ended with a small graphical 
element. Now as usual this graphic might be moved to a new page which is of 
course unwanted.

At this moment I have:

\startsetups endsection
  \vfil
  \placefigure[middle,none][]{}{\externalfigure[ornament2][height=2\lineheight]}
  \stopsection
\stopsetups

\def\stopmysection{\setups{endsection}}

I use then instead of \stopsection the \stopmysection. This works except that 
the ornament is in some cases placed on the next page. — My question is whether 
it is possible to do a \testpage and evaluate the result hereof and then using 
either the placement of the ornament and stop the section or just end the 
section without ornament?

Kind regards

Willi
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Pagenumbering with \setupcounter[userpagenumber]

2020-07-29 Thread Wolfgang Schuster

Willi Egger schrieb am 29.07.2020 um 21:43:

Good evening!

I am trying to make use of the userpagenumber counter. I have a book at hand, 
where I need to adjust the start of the pagenumbering.

It appears to me, that the \setupcounter[userpagenumber[state=stop] and later 
the \setupcounter[userpagenumber][state=start,start=7] is not giving the 
expected result.

MWE:

[...]


Is this a bug or do I miss something?


The second one.

The name of the counter isn't "userpagenumber" and you don't even have 
to know the name of the counter because \setupuserpagenumber has the 
same options (and passes the values to \setupcounter).


\setupfootertexts[\userpagenumber]

\starttext

\setupuserpagenumber[state=stop]

\dorecurse{10}{\input knuth }

\page \setupuserpagenumber[state=start,number=7]

\dorecurse{10}{\input zapf }

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Pagenumbering with \setupcounter[userpagenumber]

2020-07-29 Thread Willi Egger
Good evening!

I am trying to make use of the userpagenumber counter. I have a book at hand, 
where I need to adjust the start of the pagenumbering.

It appears to me, that the \setupcounter[userpagenumber[state=stop] and later 
the \setupcounter[userpagenumber][state=start,start=7] is not giving the 
expected result.

MWE:

% Context file

\mainlanguage[en]

\usetypescript[termes]
\setupbodyfont[termes,9pt]

\setuppapersize [A5][A5]


\setuppagenumbering[location=,alternative=doublesided]

\setupheadertexts
[text]
[]
[\userpagenumber]
[\userpagenumber]
[{\getmarking[chapter]}]

\setupfootertexts
[]
[\pagenumber]
[\pagenumber]
[]

\setupmakeup[standard][top=,bottom=,doublesided=yes]

\setupcounter[userpagenumber][state=stop]

\starttext

\startstandardmakeup[page=yes,doublesided=yes]
\strut
\godown[.2\textheight]
\rightaligned{Bramble-Bees}
\stopstandardmakeup

\startstandardmakeup[doublesided=yes,page=yes]
\strut
\godown[.1\textheight]
\startalignment[middle]
{\bfb BRAMBLE-BEES AND OTHER} 
\blank[line]
{\bfa by J. HENRI FABRE}
\stopalignment
\vfill
\startalignment[middle]
{TRANSLATED BY ALEXANDER TEIXEIRA DE MATTOS, F.Z.S.}
\stopalignment
\stopstandardmakeup


\starttitle[title={TRANSLATOR'S NOTE.}]
\input ward
\stoptitle


\setupcounter[userpagenumber][state=start,number=7]

\starttitle[title=Contents]
\placelist[chapter]
\stoptitle

\startchapter[title=Ward]
\input ward
\stopchapter

\startchapter[title=Knuth]
\input knuth
\stopchapter

\stoptext


Is this a bug or do I miss something?

Kind regards

Willi
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Is there a bug in lmt_shade[...=...,...=...]

2020-07-29 Thread Keith McKay

Thanks again Hans, lmt_shade now works as before.

Keith

On 29/07/2020 16:13, Keith McKay wrote:

Thanks Hans! Much appreciated.

Keith

On 29/07/2020 16:04, Hans Hagen wrote:

On 7/29/2020 3:43 PM, Keith McKay wrote:


Has a bug appeared in the command lmt_shade[ ]?
Looks that way. I'll fix it (upload later today). We now have some 
better (potentially more efficient) ways to feed back results into mp 
so that's where the cycle property seems to get lost.


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Lua related change in LuaMetaTeX?

2020-07-29 Thread Marcel Fabian Krüger
On Wed, Jul 29, 2020 at 09:37:13PM -0700, Hans Hagen wrote:
> > One other question about LuaMetaTeX 2.7.1: I noticed that the
> > terminal_input callback is gone. Does this mean that the current
> > behaviour of basically freezing when previously terminal input was
> > requested is hardcoded or is some other callback invoked which can then
> > provide some tokens?
> > 
> > Marcel
> 
> first line on console was already gone (only the filename gets pushed into 
> the input because tex forces an input

I think this is a misunderstanding. I wasn't referring to the first
line, but to lines after the main input is fully evaluated. E.g. as a
ConTeXt example

  \starttext
  \def\dosomethinguseful#1{Do something useful with #1}
  \dosomethinguseful{
Ups, I "forgot" to close this brace
  \stoptext

This used to end up asking for terminal input. Especially since the
terminal_input callback was available, it was possible to detect such
situations and trigger an error. With the current ConTeXt code, I
couldn't find a nice solution for this and when running such documents,
the interpreter basically freezes, starts consuming memory and finally
gets killed by the out of memory handler. Experients with
token.scan_next suggest that instead of asking for input, TeX keeps
seeing a special relax-like token. I was hoping that there is some
callback which can be used to intercept this and either fail gracefully
with an error message or to provide more useful tokens.
> 
> anyway, read/write channel zero are for the terminal
> 

That's good to know, thank you.

Marcel
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] tabulate inside itemize

2020-07-29 Thread Mike Cooper
THANKS ADITYA!
I got Wolfgang's solution first and it works great.
But I think there are some things in your solution that I should try to learn 
about.  :)


> -Original Message-
> From: ntg-context [mailto:ntg-context-boun...@ntg.nl] On Behalf Of Aditya
> Mahajan
> Sent: Wednesday, July 29, 2020 11:12 AM
> To: mailing list for ConTeXt users
> Subject: Re: [NTG-context] tabulate inside itemize
> 
> On Wed, 29 Jul 2020, Mike Cooper wrote:
> 
> > I would normally use tab stops and line breaks to achieve the following in a
> numbered list:
> >
> > 1.  DC =  3.20 bbl =   420 ft
> >HWDP   =  3.90 bbl =   450 ft
> >DP = 34.63 bbl = 2,037 ft
> >Totals = 41.73 bbl = 2,907 ft
> >
> > 2.  [next step …]
> >
> >
> > This is what I tried, but the output has a blank line at the number.  I 
> > can’t find
> anything about tabulate inside itemize.
> >
> > \starttext
> >
> > \startitemize[n]
> >\startitem \starttabulate[|l|l|r|l|r|]
> >\NC DC \NC = \NC 3.20 bbl \NC = \NC 420 
> > ft \NC \NR
> >\NC HWDP \NC = \NC 3.90 bbl \NC = \NC 
> > 450 ft \NC \NR
> >\NC DP \NC = \NC 34.63 bbl \NC =  \NC 
> > 2,037 ft \NC \NR
> >\NC DC \NC = \NC 41.73 bbl \NC =  \NC 
> > 2,907 ft \NC \NR
> >\stoptabulate \stopitem
> >\startitem Convert 2,907 to TVD: \\TVD = 2,907 × cosine 45° = 
> > 2,907 ×
> 0.707 = 2,056 ft \stopitem
> >\startitem ΔP = 2,056 ft × 0.052 × (15 - 7.2) = 834 psi
> > \stopitemize
> >
> > \stoptext
> 
> Naive solution: Add a \hbox around tabulate:
> 
> 
> \defineframed[tabulateframed][location=top,frame=off]
> 
> \starttext
> 
> \startitemize[n]
>  \startitem \dontleavehmode
>\tabulateframed{\starttabulate[|l|l|r|l|r|]
>  \NC DC \NC = \NC 3.20 bbl \NC = \NC 420 
> ft \NC \NR
>  \NC HWDP \NC = \NC 3.90 bbl \NC = \NC 
> 450 ft \NC \NR
>  \NC DP \NC = \NC 34.63 bbl \NC =  \NC 
> 2,037 ft \NC \NR
>  \NC DC \NC = \NC 41.73 bbl \NC =  \NC 
> 2,907 ft \NC \NR
>  \stoptabulate} \stopitem
>  \startitem Convert 2,907 to TVD: \\TVD = 2,907 × cosine 45° = 
> 2,907 ×
> 0.707 = 2,056 ft \stopitem
>  \startitem ΔP = 2,056 ft × 0.052 × (15 - 7.2) = 834 psi 
> \stopitemize
> 
> \stoptext
> 
> Normally, you can fix such issues by appending a \dontleavehmode in front of 
> the
> command but that doesn't work here. The offending code is line 1300 of tabl-
> tbl.mkxl:
> 
> \unexpanded\def\tabl_tabulate_outside_before
>{\ifhmode\par\fi
> \ifhmode
>   \vbox\bgroup
>   \let\tabl_tabulate_outside_after\egroup
>   \let\tabl_tabulate_outside_inbetween\relax
> \orelse\ifinner
>   \let\tabl_tabulate_outside_after\relax
>   \let\tabl_tabulate_outside_inbetween\relax
> \else
>   \whitespace
>   \tabulationparameter\c!before
>   \relax
>   \let\tabl_tabulate_outside_after\tabl_tabulate_outside_after_indeed
>   
> \let\tabl_tabulate_outside_inbetween\tabl_tabulate_outside_inbetween_indeed
> \fi}
> \protect
> 
> When you use \dontleavehmode\starttabulate, \starttabulate starts in 
> horizontal
> mode but the first \par in the above command takes it back to vertical mode. 
> The
> next \ifhmode then evaluates to false, \ifinner also evaluates to false, so 
> we enter
> the \else loop which inserts a \whitespace.
> 
> The reason why adding a \hbox{...} (which is what \framed without an align key
> does) works is because inside an \hbox{...} \par doesn't take TeX back to 
> vertical
> mode. So, we enter the first branch.
> 
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] tabulate inside itemize

2020-07-29 Thread Mike Cooper
THANKS HANS!
I got Wolfgang's solution first and it works great.



> -Original Message-
> From: ntg-context [mailto:ntg-context-boun...@ntg.nl] On Behalf Of Hans Hagen
> Sent: Wednesday, July 29, 2020 11:11 AM
> To: mailing list for ConTeXt users
> Subject: Re: [NTG-context] tabulate inside itemize
> 
> On 7/29/2020 6:38 PM, Mike Cooper wrote:
>  > I would normally use tab stops and line breaks to achieve the following
>  > in a numbered list:
> I know this looks terrible:
> 
> \define\MyTabulateHack{\vskip-\lineheight\blank[disable]}
> 
> \startitemize[n]
> 
>  \startitem \MyTabulateHack
>  \starttabulate[|l|l|r|l|r|]
> 
> but it kind of works ok in your case.
> 
> Hans
> 
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] tabulate inside itemize

2020-07-29 Thread Hans Hagen

On 7/29/2020 7:09 PM, Wolfgang Schuster wrote:

Mike Cooper schrieb am 29.07.2020 um 18:38:
I would normally use tab stops and line breaks to achieve the 
following in a numbered list:


1. DC=3.20 bbl =420 ft
HWDP= 3.90 bbl =450 ft
DP= 34.63 bbl = 2,037 ft
Totals = 41.73 bbl = 2,907 ft

2. [next step …]

This is what I tried, but the output has a blank line at the number.I 
can’t find anything about tabulate inside itemize.


\starttext

\startitemize[n]
\startitem \starttabulate[|l|l|r|l|r|]
\NC DC \NC = \NC 3.20 bbl \NC = \NC 420 ft \NC \NR
\NC HWDP \NC = \NC 3.90 bbl \NC = \NC 450 ft \NC \NR
\NC DP \NC = \NC 34.63 bbl \NC =\NC 2,037 ft \NC \NR
\NC DC \NC = \NC 41.73 bbl \NC =\NC 2,907 ft \NC \NR
\stoptabulate \stopitem
\startitem Convert 2,907 to TVD: \\TVD = 2,907 × cosine 45° = 2,907 × 
0.707 = 2,056 ft \stopitem

\startitem ΔP = 2,056 ft × 0.052 × (15 – 7.2) = 834 psi
\stopitemize

\stoptext

Is there some way to stop the blank line or should I use an entirely 
different approach?


1. Use \blank[overlay] to continue on the first line of the item entry


Ah ... I start forgetting things ... bad ... (I should use tex more 
often I guess)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] tabulate inside itemize

2020-07-29 Thread Aditya Mahajan

On Wed, 29 Jul 2020, Mike Cooper wrote:


I would normally use tab stops and line breaks to achieve the following in a 
numbered list:

1.  DC =  3.20 bbl =   420 ft
   HWDP   =  3.90 bbl =   450 ft
   DP = 34.63 bbl = 2,037 ft
   Totals = 41.73 bbl = 2,907 ft

2.  [next step …]


This is what I tried, but the output has a blank line at the number.  I can’t 
find anything about tabulate inside itemize.

\starttext

\startitemize[n]
   \startitem \starttabulate[|l|l|r|l|r|]
   \NC DC \NC = \NC 3.20 bbl \NC = \NC 420 ft 
\NC \NR
   \NC HWDP \NC = \NC 3.90 bbl \NC = \NC 450 ft 
\NC \NR
   \NC DP \NC = \NC 34.63 bbl \NC =  \NC 2,037 
ft \NC \NR
   \NC DC \NC = \NC 41.73 bbl \NC =  \NC 2,907 
ft \NC \NR
   \stoptabulate \stopitem
   \startitem Convert 2,907 to TVD: \\TVD = 2,907 × cosine 45° = 2,907 
× 0.707 = 2,056 ft \stopitem
   \startitem ΔP = 2,056 ft × 0.052 × (15 - 7.2) = 834 psi
\stopitemize

\stoptext


Naive solution: Add a \hbox around tabulate:


\defineframed[tabulateframed][location=top,frame=off]

\starttext

\startitemize[n]
\startitem \dontleavehmode
  \tabulateframed{\starttabulate[|l|l|r|l|r|]
\NC DC \NC = \NC 3.20 bbl \NC = \NC 420 ft 
\NC \NR
\NC HWDP \NC = \NC 3.90 bbl \NC = \NC 450 
ft \NC \NR
\NC DP \NC = \NC 34.63 bbl \NC =  \NC 2,037 
ft \NC \NR
\NC DC \NC = \NC 41.73 bbl \NC =  \NC 2,907 
ft \NC \NR
\stoptabulate} \stopitem
\startitem Convert 2,907 to TVD: \\TVD = 2,907 × cosine 45° = 2,907 
× 0.707 = 2,056 ft \stopitem
\startitem ΔP = 2,056 ft × 0.052 × (15 - 7.2) = 834 psi
\stopitemize

\stoptext

Normally, you can fix such issues by appending a \dontleavehmode in front of 
the command but that doesn't work here. The offending code is line 1300 of 
tabl-tbl.mkxl:

\unexpanded\def\tabl_tabulate_outside_before
  {\ifhmode\par\fi
   \ifhmode
 \vbox\bgroup
 \let\tabl_tabulate_outside_after\egroup
 \let\tabl_tabulate_outside_inbetween\relax
   \orelse\ifinner
 \let\tabl_tabulate_outside_after\relax
 \let\tabl_tabulate_outside_inbetween\relax
   \else
 \whitespace
 \tabulationparameter\c!before
 \relax
 \let\tabl_tabulate_outside_after\tabl_tabulate_outside_after_indeed
 \let\tabl_tabulate_outside_inbetween\tabl_tabulate_outside_inbetween_indeed
   \fi}
\protect

When you use \dontleavehmode\starttabulate, \starttabulate starts in horizontal 
mode but the first \par in the above command takes it back to vertical mode. 
The next \ifhmode then evaluates to false, \ifinner also evaluates to false, so 
we enter the \else loop which inserts a \whitespace.

The reason why adding a \hbox{...} (which is what \framed without an align key 
does) works is because inside an \hbox{...} \par doesn't take TeX back to 
vertical mode. So, we enter the first branch.

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] tabulate inside itemize

2020-07-29 Thread Hans Hagen

On 7/29/2020 6:38 PM, Mike Cooper wrote:
> I would normally use tab stops and line breaks to achieve the following
> in a numbered list:
I know this looks terrible:

\define\MyTabulateHack{\vskip-\lineheight\blank[disable]}

\startitemize[n]

\startitem \MyTabulateHack
\starttabulate[|l|l|r|l|r|]

but it kind of works ok in your case.

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] tabulate inside itemize

2020-07-29 Thread Wolfgang Schuster

Mike Cooper schrieb am 29.07.2020 um 18:38:
I would normally use tab stops and line breaks to achieve the following 
in a numbered list:


1. DC=3.20 bbl =420 ft
HWDP= 3.90 bbl =450 ft
DP= 34.63 bbl = 2,037 ft
Totals = 41.73 bbl = 2,907 ft

2. [next step …]

This is what I tried, but the output has a blank line at the number.I 
can’t find anything about tabulate inside itemize.


\starttext

\startitemize[n]
\startitem \starttabulate[|l|l|r|l|r|]
\NC DC \NC = \NC 3.20 bbl \NC = \NC 420 ft \NC \NR
\NC HWDP \NC = \NC 3.90 bbl \NC = \NC 450 ft \NC \NR
\NC DP \NC = \NC 34.63 bbl \NC =\NC 2,037 ft \NC \NR
\NC DC \NC = \NC 41.73 bbl \NC =\NC 2,907 ft \NC \NR
\stoptabulate \stopitem
\startitem Convert 2,907 to TVD: \\TVD = 2,907 × cosine 45° = 2,907 × 
0.707 = 2,056 ft \stopitem

\startitem ΔP = 2,056 ft × 0.052 × (15 – 7.2) = 834 psi
\stopitemize

\stoptext

Is there some way to stop the blank line or should I use an entirely 
different approach?


1. Use \blank[overlay] to continue on the first line of the item entry

2. Disable the blank line at the start of the table with "before="

\starttext

\startitemize[n]
\startitem \blank[overlay]
\starttabulate[|l|c|r|c|r|][before=,after=]
\NC DC   \NC = \NC  3.20 bbl \NC = \NC   420 ft \NC\NR
\NC HWDP \NC = \NC  3.90 bbl \NC = \NC   450 ft \NC\NR
\NC DP   \NC = \NC 34.63 bbl \NC = \NC 2,037 ft \NC\NR
\NC DC   \NC = \NC 41.73 bbl \NC = \NC 2,907 ft \NC\NR
\stoptabulate
\stopitem
\startitem
Convert 2,907 to TVD:\crlf
TVD = 2,907 × cosine 45° = 2,907 × 0.707 = 2,056 ft
\stopitem
\startitem
ΔP = 2,056 ft × 0.052 × (15 – 7.2) = 834 psi
\stopitem
\stopitemize

\stoptext


You can also get rid of the = in your table when you use the \EQ column 
separator and set the sign for the separator to =.


\starttext

\starttabulate[|l|r|r|][EQ={=}]
\NC DC   \EQ  3.20 bbl \EQ   420 ft \NC\NR
\NC HWDP \EQ  3.90 bbl \EQ   450 ft \NC\NR
\NC DP   \EQ 34.63 bbl \EQ 2,037 ft \NC\NR
\NC DC   \EQ 41.73 bbl \EQ 2,907 ft \NC\NR
\stoptabulate

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] tabulate inside itemize

2020-07-29 Thread Mike Cooper
I would normally use tab stops and line breaks to achieve the following in a 
numbered list:

1.  DC =  3.20 bbl =   420 ft
HWDP   =  3.90 bbl =   450 ft
DP = 34.63 bbl = 2,037 ft
Totals = 41.73 bbl = 2,907 ft

2.  [next step …]


This is what I tried, but the output has a blank line at the number.  I can’t 
find anything about tabulate inside itemize.

\starttext

\startitemize[n]
\startitem \starttabulate[|l|l|r|l|r|]
\NC DC \NC = \NC 3.20 bbl \NC = \NC 420 ft 
\NC \NR
\NC HWDP \NC = \NC 3.90 bbl \NC = \NC 450 
ft \NC \NR
\NC DP \NC = \NC 34.63 bbl \NC =  \NC 2,037 
ft \NC \NR
\NC DC \NC = \NC 41.73 bbl \NC =  \NC 2,907 
ft \NC \NR
\stoptabulate \stopitem
\startitem Convert 2,907 to TVD: \\TVD = 2,907 × cosine 45° = 2,907 
× 0.707 = 2,056 ft \stopitem
\startitem ΔP = 2,056 ft × 0.052 × (15 - 7.2) = 834 psi
\stopitemize

\stoptext

Is there some way to stop the blank line or should I use an entirely different 
approach?

THANKS!!


Mike Cooper
Technical Trainer
Murchison Drilling Schools, Inc.
2501 Juan Tabo NE
Albuquerque, NM 87112
Tel: (505) 293-6271
Fax: (505) 298-5294
Email: 
m...@murchisondrillingschools.com
Website: 
www.murchisondrillingschools.com
[cid:image007.jpg@01D03ADC.BD6E6850]
  [cid:image008.jpg@01D03ADC.BD6E6850] 
   
[cid:image009.jpg@01D03ADC.BD6E6850] 
Murchison Drilling Schools is now part of
[cid:image001.png@01D63515.857FD120]

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Lua related change in LuaMetaTeX?

2020-07-29 Thread Hans Hagen

On 7/29/2020 6:11 PM, Marcel Fabian Krüger wrote:

there have been a couple of bug fixes after the formal 5.4.0 release but afaik 
not in the virtual machine code (which normally is the most sensitive); i used 
to mark low level changes so that it got signaled (in context) but the byte 
code version info changed late in 5.4 dev so i no longer do that now

although i occasionally have run into buglets in 5.4 code - which to me is 
quite natural as it concerns dev / exp versions so one gets what one downloads, 
i.e. one can only blame oneself for using such versions and hardly complain - 
lua is quite stable and reliable (given the massive amount of lua code that we 
use in context) ... so, normally patience - read: wait for updates - is the 
answer


Oh I see, I wasn't aware that the dev versions are used. After
recompiling with the latest development code the error is gone.

One other question about LuaMetaTeX 2.7.1: I noticed that the
terminal_input callback is gone. Does this mean that the current
behaviour of basically freezing when previously terminal input was
requested is hardcoded or is some other callback invoked which can then
provide some tokens?
first line on console was already gone (only the filename gets pushed 
into the input because tex forces an input


anyway, read/write channel zero are for the terminal

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Lua related change in LuaMetaTeX?

2020-07-29 Thread Marcel Fabian Krüger
> there have been a couple of bug fixes after the formal 5.4.0 release but 
> afaik not in the virtual machine code (which normally is the most sensitive); 
> i used to mark low level changes so that it got signaled (in context) but the 
> byte code version info changed late in 5.4 dev so i no longer do that now
>
> although i occasionally have run into buglets in 5.4 code - which to me is 
> quite natural as it concerns dev / exp versions so one gets what one 
> downloads, i.e. one can only blame oneself for using such versions and hardly 
> complain - lua is quite stable and reliable (given the massive amount of lua 
> code that we use in context) ... so, normally patience - read: wait for 
> updates - is the answer

Oh I see, I wasn't aware that the dev versions are used. After
recompiling with the latest development code the error is gone.

One other question about LuaMetaTeX 2.7.1: I noticed that the
terminal_input callback is gone. Does this mean that the current
behaviour of basically freezing when previously terminal input was
requested is hardcoded or is some other callback invoked which can then
provide some tokens?

Marcel
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Is there a bug in lmt_shade[...=...,...=...]

2020-07-29 Thread Keith McKay

Thanks Hans! Much appreciated.

Keith

On 29/07/2020 16:04, Hans Hagen wrote:

On 7/29/2020 3:43 PM, Keith McKay wrote:


Has a bug appeared in the command lmt_shade[ ]?
Looks that way. I'll fix it (upload later today). We now have some 
better (potentially more efficient) ways to feed back results into mp 
so that's where the cycle property seems to get lost.


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Installing VSCode extension?

2020-07-29 Thread Henning Hraban Ramm

> Am 29.07.2020 um 14:19 schrieb Alasdair McAndrew :
> 
> Thank you very much, but in fact that script file "vscode-context.cmd" really 
> just contains the same command for installing extensions as I quoted above - 
> and so produces the same errors.  Maybe I'll go back to trying SciTe - I gave 
> it a bit of a go, but wasn't successful.  Of all the information on the 
> context-wiki, and the Pragma webpage - where would I go to find the most 
> up-to-date information about configuring an editor to work with ConTeXt in 
> Windows?

You could try Atom and install the ConTeXt module from 
github.com/massifrg/language-context.
Original language-context is outdated, but upstream didn’t react to mails from 
Massi and me.
This version also isn’t perfect, but I’m using and occasionally updating it. (I 
should re-base it on the current work done for the wiki.) There’s also still no 
run command.

Additionally you should install 
- language-latex (contains plain TeX commands)
- language-lua
- atom-ide-terminal (for running ConTeXt in place)
- file-icons (only icon package that contains TeX icons)
- pdf-view (not very good, but good enough for simple cases)

Best, Hraban

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Is there a bug in lmt_shade[...=...,...=...]

2020-07-29 Thread Hans Hagen

On 7/29/2020 3:43 PM, Keith McKay wrote:


Has a bug appeared in the command lmt_shade[ ]?
Looks that way. I'll fix it (upload later today). We now have some 
better (potentially more efficient) ways to feed back results into mp so 
that's where the cycle property seems to get lost.


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Is there a bug in lmt_shade[...=...,...=...]

2020-07-29 Thread Keith McKay

Hi

Has a bug appeared in the command lmt_shade[ ]?

This used to work before I upgraded.

\setuppapersize [A5, portrait][A4, landscape]

\setuparranging[2UP]

\starttext

\startMPpage

StartPage;

width := PaperWidth ; height := PaperHeight ; unit := cm ;

definecolor [ name = "MyColor1", r = 0.781, g = 0.5, b = 0.5 ] ;

definecolor [ name = "MyColor3", r = 1, g = 1, b = 0.7983 ] ;

draw lmt_shade [

path = unitsquare xscaled width yscaled height,

direction = "up",

alternative = "linear",

colors = { "MyColor1", "MyColor3" },

] ;

StopPage;

\stopMPpage

\stoptext

The console output gives this:

system >

system > ConTeXt ver: 2020.07.29 14:08 LMTX fmt: 2020.7.29 int: 
english/english


system >

metapost > log >

metapost > log > loading metafun, including plain.mp version 1.004 for 
metafun iv and xl


metapost > log >

metapost > log > ! Not a cycle.

metapost > log > 

metapost > log > withprescript

metapost > log >  ...i.fill.mfun_shade_path.withprescript

metapost > log > "sh_domain="

metapost > log >

metapost > log > image->...ture;currentpicture:=nullpicture;(TEXT3)

metapost > log > ;currentpicture.if.str(SUF...

metapost > log >

metapost > log > lmt_do_shade->...shed.evenly;fi.fi.popparameters;)

metapost > log > endgroup

metapost > log >  lmt_do_shade

metapost > log >

metapost > log > <*> ...ar", colors = { "MyColor1", "MyColor3" }, ]

metapost > log > ; StopPage; ;

metapost > log >

system > print height forced to paper height

system > print width forced to paper width

Thanks

Keith

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] no reference output for \namedstructurevariable

2020-07-29 Thread Damien Thiriet
Hello,


I am facing some issue with \usernamedvariable.
Consider this MWE

\starttext
\startsection[title={Mammals and eggs},reference={mammals}]

\namedstructurevariable{section}{title}
\namedstructurevariable{section}{reference}
and
\currentstructurereference
\stopsection
\stoptext

\namedstructurevariable{section}{reference} doesn't give any output,
while \currentstructurereference does.
Is this a bug or something I miss?
I get also no output when I define custom key/value with startsection
and call them with namedstructurevariable.

Best regards,

Damien Thiriet

- End forwarded message -
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Installing VSCode extension?

2020-07-29 Thread Alasdair McAndrew
Thank you very much, but in fact that script file "vscode-context.cmd"
really just contains the same command for installing extensions as I quoted
above - and so produces the same errors.  Maybe I'll go back to trying
SciTe - I gave it a bit of a go, but wasn't successful.  Of all the
information on the context-wiki, and the Pragma webpage - where would I go
to find the most up-to-date information about configuring an editor to work
with ConTeXt in Windows?

Thanks again,
Alasdair

On Wed, Jul 29, 2020 at 2:51 AM Hans Hagen  wrote:

> On 7/28/2020 6:51 AM, Alasdair McAndrew wrote:
> > I am installing the Windows version of ConTeXt, which comes with a
> > VSCode extension, in
> >
> > \tex\texmf-context\context\data\vscode\extensions
> >
> >
> > with instructions to run (from within the VSCode terminal):
> >
> > code -- extensions-dir  -- install-extension context
> >
> >
> > The trouble is that the current ConTeXt installation (as of 65 minutes
> > ago), doesn't seem to contain an extension in the format that VSCode
> > understands.  Running that command produces the errors:
> >
> > Installing extensions...
> > Extension 'context' not found.
> > Make sure you use the full extension ID, including the publisher,
> > e.g.: ms-dotnettools.csharp
> > Failed Installing Extensions: context:
> >
> >
> > For what it's worth, I'm running VSCode 1.46.0.
> >
> > How can I install the VSCode ConTeXt extension?
> Here i just run this (seems to work with latest update):
>
> data/context/vscode-context.cmd
>
> (I only occasionally check vscode and will look into it again when there
> is easy suffix dependent runner support. Of course I do generate the
> syntax files.)
>
> Hans
>
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>


-- 
https://numbersandshapes.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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Lua related change in LuaMetaTeX?

2020-07-29 Thread Hans Hagen

On 7/29/2020 6:22 AM, Marcel Fabian Krüger wrote:

Hi,

starting with LuaMetaTeX 2.07.01, a C library I load from Lua started to
segfault and valgrind indicates that it accesses invalid memory in
multiple places in the middle of Lua internal functions?!

The whole thing looks almost like the Lua versions in LuaMetaTeX and in
the library are incompatible, but both seem to use 5.4.0. So I asked
myself if there might be changes not reflected by the version number.

tl;dr: Has the embedded Lua interpreter changed in some non ABI-compatible
way in LuaMetaTeX 2.07.01? (Especially on Linux, x86-64. I didn't test
other platforms yet)
there have been a couple of bug fixes after the formal 5.4.0 release but 
afaik not in the virtual machine code (which normally is the most 
sensitive); i used to mark low level changes so that it got signaled (in 
context) but the byte code version info changed late in 5.4 dev so i no 
longer do that now


although i occasionally have run into buglets in 5.4 code - which to me 
is quite natural as it concerns dev / exp versions so one gets what one 
downloads, i.e. one can only blame oneself for using such versions and 
hardly complain - lua is quite stable and reliable (given the massive 
amount of lua code that we use in context) ... so, normally patience - 
read: wait for updates - is the answer


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___