Re: [NTG-context] \documentvariable (used in environment)

2020-07-22 Thread Wolfgang Schuster

Alan Braslau schrieb am 23.07.2020 um 00:21:

Hello,

I have put the following in an environment

\startenvironment MYENVIRONMENT

\setupdocument
   [metadata:title={\documentvariable{title}},
    metadata:subtitle={\documentvariable{subtitle}},
    metadata:author={\documentvariable{author}},
    metadata:keywords={\documentvariable{keywords}}]

\stopenvironment

and correct use would be

\environment MYENVIRONMENT

\startdocument [title={My title}]

\stopdocument

because, of course, the environment contains more than \setupdocument 
such as font loading that should be done before the \startdocument.


The metadata does not get set properly, having to do with expansion or 
other notions of TeX that I never seem to get right. What might be the 
proper way of handling this?


What exactly doesn't work and do you get the same problems when you set 
the values in the following minimal example (everything has to be in the 
same file).


 begin example
\setupdocument
  [metadata:title={\documentvariable{title}},
   metadata:subtitle={\documentvariable{subtitle}},
   metadata:author={\documentvariable{author}},
   metadata:keywords={\documentvariable{keywords}}]

\startdocument [title={My title}]
\input knuth
\stopdocument
 end example

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] \documentvariable (used in environment)

2020-07-22 Thread Alan Braslau

Hello,

I have put the following in an environment

\startenvironment MYENVIRONMENT

\setupdocument
  [metadata:title={\documentvariable{title}},
   metadata:subtitle={\documentvariable{subtitle}},
   metadata:author={\documentvariable{author}},
   metadata:keywords={\documentvariable{keywords}}]

\stopenvironment




and correct use would be

\environment MYENVIRONMENT

\startdocument [title={My title}]

\stopdocument


because, of course, the environment contains more than \setupdocument 
such as font loading that should be done before the \startdocument.


The metadata does not get set properly, having to do with expansion or 
other notions of TeX that I never seem to get right. What might be the 
proper way of handling this?


Thank you

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


Re: [NTG-context] Using variables and macros for styling of section title and line in table of contents

2020-07-22 Thread James Withers
Thanks so much for such a quick reply Wolfgang


Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Wed, 22 Jul 2020 at 20:38, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> James Withers schrieb am 22.07.2020 um 21:20:
> > Dear list
> >
> > I have a document with section headings which include a title, date and
> > reference spread over two lines with different font style and
> > justification, plus a slightly different text for the table of contents.
> >
> > So that I can alter the styling of the section headings without having
> > to recode each \startsection command, I have used variables and a macro
> > command for the style.
> >
> > This works for section 'title' and 'marking', but not for the 'list'
> > attribute.
>
> The title argument works only because it is placed in the text but it
> won't work when you try to show the argument in the ToC like the list
> argument.
>
> > The minimal working example below shows what I'm trying to do.
> >
> > Best wishes and many thanks in advance.
> >
> > James
> >
> >
> \define\mytitle{\getvariable{myvar}{title}\crlf{\tfx\getvariable{myvar}{date}\hfill\getvariable{myvar}{ref}}}
> > \define\mylist{\getvariable{myvar}{list}---{\bf
> \getvariable{myvar}{date}}}
>
> In this case you have to use \defineexpandable to create your commands
> and enable expansion for sections.
>
> \defineexpandable\mytitle{...}
> \defineexpandable\mylist {...}
>
> \setuphead[section][expansion=yes]
>
> 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
___


Re: [NTG-context] Using variables and macros for styling of section title and line in table of contents

2020-07-22 Thread Wolfgang Schuster

James Withers schrieb am 22.07.2020 um 21:20:

Dear list

I have a document with section headings which include a title, date and 
reference spread over two lines with different font style and 
justification, plus a slightly different text for the table of contents.


So that I can alter the styling of the section headings without having 
to recode each \startsection command, I have used variables and a macro 
command for the style.


This works for section 'title' and 'marking', but not for the 'list' 
attribute.


The title argument works only because it is placed in the text but it 
won't work when you try to show the argument in the ToC like the list 
argument.



The minimal working example below shows what I'm trying to do.

Best wishes and many thanks in advance.

James

\define\mytitle{\getvariable{myvar}{title}\crlf{\tfx\getvariable{myvar}{date}\hfill\getvariable{myvar}{ref}}}
\define\mylist{\getvariable{myvar}{list}---{\bf \getvariable{myvar}{date}}}


In this case you have to use \defineexpandable to create your commands 
and enable expansion for sections.


\defineexpandable\mytitle{...}
\defineexpandable\mylist {...}

\setuphead[section][expansion=yes]

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] Using variables and macros for styling of section title and line in table of contents

2020-07-22 Thread James Withers
Dear list


I have a document with section headings which include a title, date and
reference spread over two lines with different font style and
justification, plus a slightly different text for the table of contents.


So that I can alter the styling of the section headings without having to
recode each \startsection command, I have used variables and a macro
command for the style.


This works for section 'title' and 'marking', but not for the 'list'
attribute.


The minimal working example below shows what I'm trying to do.


Best wishes and many thanks in advance.


James



\define\mytitle{\getvariable{myvar}{title}\crlf{\tfx\getvariable{myvar}{date}\hfill\getvariable{myvar}{ref}}}
\define\mylist{\getvariable{myvar}{list}---{\bf \getvariable{myvar}{date}}}

\starttext

\completecontent

\setvariables[myvar][
title={What I would like},
date={2020},
ref={Reference No 1},
list={Variation on title},
]

\startsection[title=\mytitle,list={Variation on title---{\bf 2020}}]

Contents line to look like this:

\mylist

\stopsection


\setvariables[myvar][
title={What I get},
date={2021},
ref={Reference No 2},
list={Something for the contents},
]

\startsection[title=\mytitle,list=\mylist]

Contents line to look like this:

\mylist

\stopsection
\stoptext


Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
___
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] --silent and so on

2020-07-22 Thread thierry horsin

Thanls a lot.

Thierry

Le 22/07/2020 à 18:08, Wolfgang Schuster a écrit :

thierry horsin schrieb am 22.07.2020 um 17:57:

Hi everybody

I am a current context user since now many years and in particular I 
use it on linux with automatic compilation with a bash script 
detecting any modifications of the .tex file. In order for this to 
work I used with previous versions


the "--nonstopmode --batchmode --silent --noconsole" compilation 
options.


With these options with a new error in the .tex files with old 
versions of mkiv the previous pdf produced was not changed. Now with 
lmtx, appears a single page pdf file with ERROR written on it. Are 
there compulations options with lmtx in order to have something 
similar as before ?


context --nodummy 

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
___ 


___
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] --silent and so on

2020-07-22 Thread Wolfgang Schuster

thierry horsin schrieb am 22.07.2020 um 17:57:

Hi everybody

I am a current context user since now many years and in particular I use 
it on linux with automatic compilation with a bash script detecting any 
modifications of the .tex file. In order for this to work I used with 
previous versions


the "--nonstopmode --batchmode --silent --noconsole" compilation options.

With these options with a new error in the .tex files with old versions 
of mkiv the previous pdf produced was not changed. Now with lmtx, 
appears a single page pdf file with ERROR written on it. Are there 
compulations options with lmtx in order to have something similar as 
before ?


context --nodummy 

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] --silent and so on

2020-07-22 Thread thierry horsin

Hi everybody

I am a current context user since now many years and in particular I use 
it on linux with automatic compilation with a bash script detecting any 
modifications of the .tex file. In order for this to work I used with 
previous versions


the "--nonstopmode --batchmode --silent --noconsole" compilation options.

With these options with a new error in the .tex files with old versions 
of mkiv the previous pdf produced was not changed. Now with lmtx, 
appears a single page pdf file with ERROR written on it. Are there 
compulations options with lmtx in order to have something similar as 
before ?


Any ideas ?

Thanks

___
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] Bug with lmtx and color in table

2020-07-22 Thread Wolfgang Schuster

Fabrice Couvreur schrieb am 22.07.2020 um 17:09:

Hello,
With the latest version of lmtx, the background color of cells does not 
work.


Unrelated to tables.

You can reduce xtable and natural table based examples very often to a 
simple \framed because both tables types inherit many features from it.


\starttext

\startbuffer
\vrule width 4cm height 4cm depth 0pt\relax
\stopbuffer

\typebuffer \getbuffer

\startbuffer
\hrule width 4cm height 4cm depth 0pt\relax
\stopbuffer

\typebuffer \getbuffer

\startbuffer
\frule width 4cm height 4cm type fill\relax
\stopbuffer

\typebuffer \getbuffer

\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] Bug with lmtx and color in table

2020-07-22 Thread Fabrice Couvreur
Hello,
With the latest version of lmtx, the background color of cells does not
work.
Thank you.
Fabrice

\starttext
\startxtable
  [align={middle,lohi}, offset=0.8ex,background=color,
   backgroundcolor=red,frame=off]
  \startxrow
\startxcell
  \m{\displaystyle\binom{n-1}{k-1}}
\stopxcell
\startxcell[width=fit]
  \m{+}
\stopxcell
\startxcell
  \m{\displaystyle\binom{n-1}{k}}
\stopxcell
  \stopxrow
  \startxrow
\startxcell

\stopxcell
\startxcell[width=fit]
  \m{=}
\stopxcell
\startxcell
  \m{\displaystyle\binom{n}{k}}
\stopxcell
  \stopxrow
\stopxtable
\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] No inverse Search when using \usepath

2020-07-22 Thread Hans Hagen

On 7/22/2020 9:03 AM, Aradenatorix Veckhôm Avecælus wrote:

I think so. In fact, I have this doubt, can you use synctex with
ConTeXt or do you have something that works like it?


You have to enable it:

\setupsynctex[state=start]

because it adds quite some overhead.

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] No inverse Search when using \usepath

2020-07-22 Thread Aradenatorix Veckhôm Avecælus
I think so. In fact, I have this doubt, can you use synctex with
ConTeXt or do you have something that works like it?
___
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] Bug in latest LMTX

2020-07-22 Thread Hans Hagen

On 7/22/2020 5:43 AM, Otared Kavian wrote:

Hi Hans,

It seems that \cap is not anymore defined in the latest LMTX: the following 
gives an error

\starttext
$A \cap B$
\stoptext

with current version: 2020.07.21 18:39.

Also, I would like to place a request about the reporting of errors: can we get 
back the nice reporting of errors we had a few months ago?
Indeed while a few months ago the reporting of errors was extremeley clear and 
helpful, now one gets a cryptic message like this in the html file produced:

Error  ! Missing } inserted
File   chapitre-1.tex
Line   834

Of course there is no missing } error in that file and that line, and one has 
to spend a lot of time to find what the error would be. In this case I could 
guess that the error comes from the fact that \cap is not defined, but it 
wasn't easy (the file used to typeset correctly with version 2020.07.13, and it 
typesets correctly with mkiv).
In eralier versions, ConTeXt would tell the user
undefined control sequence \cap
and one could fix things very quickly.


\cap is defined (just put \meaning in front), it just doesn't have the 
meaning you want in math (a symbol), so it scane for an argument


fixed in next (the running out of text is on the agenda for later, part 
of something larger)


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
___