[NTG-context] Alignment

2019-05-13 Thread Fabrice Couvreur
Hi,
Not having too many ideas, I did this: is there not a more elegant way ?
Thank you.
Fabrice

\definemathmatrix [pmatrix][matrix:parentheses][simplecommand=MATRIX]
\starttext
\startmidaligned
\startxtable[align={middle,lohi},frame=off,offset=0.8ex]
  \startxrow
\startxcell
  \m{P\times M=P}
\stopxcell
\startxcell
  \math{\iff}
\stopxcell
\startxcell
  \m{\MATRIX{x,y}\times
\MATRIX{0.22,0.78;0.53,0.47}=\MATRIX{x,y}}
\stopxcell
  \stopxrow
  \startxrow
\startxcell

\stopxcell
\startxcell
  \m{\iff}
\stopxcell
\startxcell[align=right]
  \math{\startmathcases
 \NC 0.22x+0.53y=x\NR
 \NC 0.78x+0.47y=y \NR
 \stopmathcases}
\stopxcell
  \stopxrow
  \startxrow
\startxcell

\stopxcell
\startxcell
  \m{\iff}
\stopxcell
\startxcell[align=right]
  \m{0.78x-0.53y=0}
\stopxcell
  \stopxrow
  \startxrow
\startxcell

\stopxcell
\startxcell
  \m{\iff}
\stopxcell
\startxcell[align=right]
 \m{78x-53y=0}
\stopxcell
  \stopxrow
\stopxtable
  \stopmidaligned
\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
___


[NTG-context] several blocks of text in the margin

2019-04-27 Thread Fabrice Couvreur
Hi
How to put several blocks of text in the margin without them encroaching
each other ?
Thank.
Fabrice

\setuplayout
  [width=12cm,
  rightmargin=5cm]

\definemathmatrix [pmatrix][matrix:parentheses][simplecommand=MATRIX]

\unexpanded\def\pcent#1{#1\,\%}

\defineuserdata [margintext] [alternative=margintext]

\defineuserdataalternative [margintext] [renderingsetup=userdata:margintext]

\startsetups [userdata:margintext]
  \margindata
[inright]
[%style=\smallbodyfont,
 style={\switchtobodyfont[9pt]},
 width=\rightmarginwidth,
 align={flushleft,broad}]
{{\bf Exemple — }\getinlineuserdata}
\stopsetups

\starttext
\startuserdata[margintext]
 Une population, à effectif stable, se répartit entre deux régions A et B.

  On suppose que chaque année :
  \startitemize[1]
  \item \pcent{30} des habitants de la région A déménagent pour la
région B (les autres restent dans la région A);
  \item \pcent{20} des habitants de la région B déménagent pour la
région A.
  \stopitemize
  La situation peut être représentée par le graphe probabiliste suivant
:

  Les sommets A et B représentent les régions A et B.

  \m{0,3} est la probabilité de passage de la région A vers la région B
; la probabilité de passage de la région A vers elle-même est donc égale à
\m{0,7}.

  En considérant les sommets dans l'ordre alphabétique, ,la matrice
\m{M} de transition du graphe est :
  \startformula
M=\MATRIX{0.7,0.3;0.2,0.8}.
  \stopformula
\stopuserdata
\dorecurse{4}{\input ward} %-> playing with the number to adjust
\startuserdata[margintext]
 Une population, à effectif stable, se répartit entre deux régions A et B.

  On suppose que chaque année :
  \startitemize[1]
  \item \pcent{30} des habitants de la région A déménagent pour la
région B (les autres restent dans la région A);
  \item \pcent{20} des habitants de la région B déménagent pour la
région A.
  \stopitemize
  La situation peut être représentée par le graphe probabiliste suivant
:

  Les sommets A et B représentent les régions A et B.

  \m{0,3} est la probabilité de passage de la région A vers la région B
; la probabilité de passage de la région A vers elle-même est donc égale à
\m{0,7}.

  En considérant les sommets dans l'ordre alphabétique, ,la matrice
\m{M} de transition du graphe est :
  \startformula
M=\MATRIX{0.7,0.3;0.2,0.8}.
  \stopformula
\stopuserdata
\input ward
\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
___


[NTG-context] Text around a figure

2019-04-24 Thread Fabrice Couvreur
Hi,
Why does bold text touch the figure ?
Thank you.
Fabrice


\definefloat
   [recipe]
   [figure]

\setupfloat
   [recipe]
   [default={right,none}]


\starttext

  \placerecipe{}{
  \setupbodyfont[8pt,pagella]
  \startMPcode

path p, q ;
p:= unitsquare xyscaled (1.5cm,1.5cm) ;
q:= unitsquare xyscaled (2.5cm,2.5cm) shifted (1.5cm,0);

draw p withpen pencircle scaled 1pt ;
draw q withpen pencircle scaled 1pt ;

label.llft("$A$", p) ;
label.lrt("$M$", p) ;
label.ulft("$P$", p) ;
label.urt("$N$", p) ;
label.lrt("$B$", q) ;
label.urt("$Q$", q) ;
label.ulft("$R$", q) ;

  \stopMPcode
}
 Sur la figure ci-contre, \m{[AB]} est un segment de longueur 4.

\m{M} est un point mobile sur le segment \m{[AB]} .

\m{AMNP} et \m{MBQR} sont deux carrés.

On note \m{x} la distance \m{AM}.
\blank
  {\bf On cherche les positions de \m{M} telles que la surface
constituée par les deux carrés soit supérieure à 10.}
\blank
\startitemize[n]
\item À quel intervalle appartient \m{x} ?
\item Montrer que le problème revient à résoudre l'inéquation :
  \startformula
2x²-8x+6\geqslant 0.
  \stopformula
\item Développer le produit \m{(2x-6)(x-1)}.
\item En déduire les solutions de l'inéquation \m{2x²-8x+6\geqslant 0}
et conclure concernant le problème.
\stopitemize
\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
___


[NTG-context] Strange behavior with offset key in a xtable

2019-04-22 Thread Fabrice Couvreur
Hi,
Why is the height of the cells of the third line different ?
Thank you.
Fabrice

\starttext
 \startxtable[align={lohi,middle},offset=0.8ex,width=3cm]
\startxrow
  \startxcell
\m{x}
  \stopxcell
  \startxcell[nx=3]
\math{-\infty} \hfill \math{+\infty}
  \stopxcell
\stopxrow
\startxrow
  \startxcell
Signe de \m{3x-6}
  \stopxcell
  \startxcell
\unknown
  \stopxcell
  \startxcell
\unknown
  \stopxcell
  \startxcell
\unknown
  \stopxcell
\stopxrow
\startxrow
  \startxcell
Signe de \m{-2x+8}
  \stopxcell
  \startxcell
\unknown
  \stopxcell
  \startxcell
\unknown
  \stopxcell
  \startxcell
\unknown
  \stopxcell
\stopxrow
\startxrow
  \startxcell[width=6cm]
Signe de \m{(3x-6)(-2x+8)}
  \stopxcell
  \startxcell
\unknown
  \stopxcell
  \startxcell
\unknown
  \stopxcell
  \startxcell
\unknown
  \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
___


[NTG-context] Filling the diamond in enumeration

2019-04-20 Thread Fabrice Couvreur
Hi,
Is it possible to fill the diamond ?
Thank you.
Fabrice

\starttext
\startitemize[4][color=red]
\item One
\item Two
\stopitemize
\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] Strange behavior with \usetikzlibrary [matrix]

2019-04-18 Thread Fabrice Couvreur
Hi Henry,
I am confused because I forgot to replace & by \& in the definition of the
matrix.
Thank you.
Fabrice

Le jeu. 18 avr. 2019 à 12:31, Henri Menke  a écrit :

> On 4/18/19 10:22 PM, Fabrice Couvreur wrote:
> > Hi Henry,
> > This has no effect, the problem is the same.
>
> ConTeXt  ver: 2019.04.16 08:54 MKIV beta
>
> PDF is attached.
>
> > Fabrice
> >
> > Le jeu. 18 avr. 2019 à 12:17, Henri Menke  a
> écrit :
> >
> >> In ConTeXt the ampersand is not an alignment character but has catcode
> >> 12 by default.  Use the "ampersand replacement" option.
> >>
> >> \usemodule[tikz]
> >> \usetikzlibrary[matrix,decorations.pathreplacing, calc, positioning,fit]
> >> \starttext
> >>
> >> \starttikzpicture[>=stealth,thick,baseline,
> >> every right delimiter/.append style={name=rd},
> >> ]
> >> \matrix [matrix of math nodes,
> >> left delimiter=(,
> >> right delimiter=),
> >> ampersand replacement=\&
> >> ](A){
> >> a_{1,1} \& a_{1,2} \& \dots  \& a_{1,j} \& \dots \& a_{1,n}\\
> >> a_{2,1} \& a_{2,2} \& \dots  \& a_{2,j} \& \dots \& a_{2,n}\\
> >> \vdots  \& \vdots  \&  \& \vdots  \&  \& \vdots\\
> >> a_{i,1} \& a_{i,2} \& \dots  \& a_{i,j} \& \dots \& a_{i,n}\\
> >> \vdots  \& \vdots  \&  \& \vdots  \&  \& \vdots\\
> >> a_{n,1} \& a_{n,2} \& \dots  \& a_{n,j} \& \dots \& a_{n,n}\\
> >> };
> >>
> >> \draw[<-] (rd)--++(0:6mm) node[right]{$i$-ième colonne};
> >> \draw[<-] (A.south-|A-1-4.center) --++(-90:6mm) node[below]{$j$-ième
> >> colonne};
> >>
> >> \stoptikzpicture
> >> \stoptext
> >>
> >>
> >>
> >> On 4/18/19 9:26 PM, Fabrice Couvreur wrote:
> >> > Hi,
> >> > If I compile the following code, the result is not the one expected.
> >> >
> >> > \usemodule[tikz]
> >> > \usetikzlibrary[matrix,decorations.pathreplacing, calc,
> positioning,fit]
> >> > \starttext
> >> >
> >> > \starttikzpicture[>=stealth,thick,baseline,
> >> > every right delimiter/.append style={name=rd},
> >> > ]
> >> > \matrix [matrix of math nodes,
> >> > left delimiter=(,
> >> > right delimiter=),
> >> > ](A){
> >> > a_{1,1} & a_{1,2} & \dots  & a_{1,j} & \dots & a_{1,n}\\
> >> > a_{2,1} & a_{2,2} & \dots  & a_{2,j} & \dots & a_{2,n}\\
> >> > \vdots  & \vdots  &  & \vdots  &  & \vdots\\
> >> > a_{i,1} & a_{i,2} & \dots  & a_{i,j} & \dots & a_{i,n}\\
> >> > \vdots  & \vdots  &  & \vdots  &  & \vdots\\
> >> > a_{n,1} & a_{n,2} & \dots  & a_{n,j} & \dots & a_{n,n}\\
> >> > };
> >> >
> >> > \draw[<-] (rd)--++(0:6mm) node[right]{$i$-ième colonne};
> >> > \draw[<-] (A.south-|A-1-4.center) --++(-90:6mm) node[below]{$j$-ième
> >> > colonne};
> >> >
> >> > \stoptikzpicture
> >> > \stoptext
> >> >
> >> > Thank you
> >> > Fabrice
> >> >
> >> >
> >> >
> >>
> ___
> >> > 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://contextgar

Re: [NTG-context] Strange behavior with \usetikzlibrary [matrix]

2019-04-18 Thread Fabrice Couvreur
Hi Henry,
This has no effect, the problem is the same.
Fabrice

Le jeu. 18 avr. 2019 à 12:17, Henri Menke  a écrit :

> In ConTeXt the ampersand is not an alignment character but has catcode
> 12 by default.  Use the "ampersand replacement" option.
>
> \usemodule[tikz]
> \usetikzlibrary[matrix,decorations.pathreplacing, calc, positioning,fit]
> \starttext
>
> \starttikzpicture[>=stealth,thick,baseline,
> every right delimiter/.append style={name=rd},
> ]
> \matrix [matrix of math nodes,
> left delimiter=(,
> right delimiter=),
> ampersand replacement=\&
> ](A){
> a_{1,1} \& a_{1,2} \& \dots  \& a_{1,j} \& \dots \& a_{1,n}\\
> a_{2,1} \& a_{2,2} \& \dots  \& a_{2,j} \& \dots \& a_{2,n}\\
> \vdots  \& \vdots  \&  \& \vdots  \&  \& \vdots\\
> a_{i,1} \& a_{i,2} \& \dots  \& a_{i,j} \& \dots \& a_{i,n}\\
> \vdots  \& \vdots  \&  \& \vdots  \&  \& \vdots\\
> a_{n,1} \& a_{n,2} \& \dots  \& a_{n,j} \& \dots \& a_{n,n}\\
> };
>
> \draw[<-] (rd)--++(0:6mm) node[right]{$i$-ième colonne};
> \draw[<-] (A.south-|A-1-4.center) --++(-90:6mm) node[below]{$j$-ième
> colonne};
>
> \stoptikzpicture
> \stoptext
>
>
>
> On 4/18/19 9:26 PM, Fabrice Couvreur wrote:
> > Hi,
> > If I compile the following code, the result is not the one expected.
> >
> > \usemodule[tikz]
> > \usetikzlibrary[matrix,decorations.pathreplacing, calc, positioning,fit]
> > \starttext
> >
> > \starttikzpicture[>=stealth,thick,baseline,
> > every right delimiter/.append style={name=rd},
> > ]
> > \matrix [matrix of math nodes,
> > left delimiter=(,
> > right delimiter=),
> > ](A){
> > a_{1,1} & a_{1,2} & \dots  & a_{1,j} & \dots & a_{1,n}\\
> > a_{2,1} & a_{2,2} & \dots  & a_{2,j} & \dots & a_{2,n}\\
> > \vdots  & \vdots  &  & \vdots  &  & \vdots\\
> > a_{i,1} & a_{i,2} & \dots  & a_{i,j} & \dots & a_{i,n}\\
> > \vdots  & \vdots  &  & \vdots  &  & \vdots\\
> > a_{n,1} & a_{n,2} & \dots  & a_{n,j} & \dots & a_{n,n}\\
> > };
> >
> > \draw[<-] (rd)--++(0:6mm) node[right]{$i$-ième colonne};
> > \draw[<-] (A.south-|A-1-4.center) --++(-90:6mm) node[below]{$j$-ième
> > colonne};
> >
> > \stoptikzpicture
> > \stoptext
> >
> > Thank you
> > Fabrice
> >
> >
> >
> ___
> > 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
>
> ___
>
___
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] Strange behavior with \usetikzlibrary [matrix]

2019-04-18 Thread Fabrice Couvreur
Hi,
If I compile the following code, the result is not the one expected.

\usemodule[tikz]
\usetikzlibrary[matrix,decorations.pathreplacing, calc, positioning,fit]
\starttext

\starttikzpicture[>=stealth,thick,baseline,
every right delimiter/.append style={name=rd},
]
\matrix [matrix of math nodes,
left delimiter=(,
right delimiter=),
](A){
a_{1,1} & a_{1,2} & \dots  & a_{1,j} & \dots & a_{1,n}\\
a_{2,1} & a_{2,2} & \dots  & a_{2,j} & \dots & a_{2,n}\\
\vdots  & \vdots  &  & \vdots  &  & \vdots\\
a_{i,1} & a_{i,2} & \dots  & a_{i,j} & \dots & a_{i,n}\\
\vdots  & \vdots  &  & \vdots  &  & \vdots\\
a_{n,1} & a_{n,2} & \dots  & a_{n,j} & \dots & a_{n,n}\\
};

\draw[<-] (rd)--++(0:6mm) node[right]{$i$-ième colonne};
\draw[<-] (A.south-|A-1-4.center) --++(-90:6mm) node[below]{$j$-ième
colonne};

\stoptikzpicture
\stoptext

Thank you
Fabrice
___
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] Text in the margin

2019-04-10 Thread Fabrice Couvreur
Hi,
Wolfgang suggested this to put text in the margin but since some updates it
does not work anymore :

\setuplayout
  [width=12cm,
   rightmargin=5cm]

\defineuserdata [margintext] [alternative=margintext]

\defineuserdataalternative [margintext] [renderingsetup=userdata:margintext]

\startsetups [userdata:margintext]
  \margindata
[inright]
[%style=\smallbodyfont,
 style={\switchtobodyfont[9pt]},
 width=\rightmarginwidth,
 align={flushleft,broad}]
{{\bf Exemple — }\getinlineuserdata}
\stopsetups

\starttext
\startuserdata[margintext]
 \input ward
\stopuserdata
\stoptext


Thank you.
Fabrice
___
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] Emacs with context lmtx

2019-04-09 Thread Fabrice Couvreur
Hi Vladimir,
This seems to work well :


(eval-after-load "context"
  '(setq TeX-command-list
(append
  '(
("context"
"PATH=/home/viserion/context/tex/texmf-linux-64/bin:$PATH context
--purgeall %s"
  TeX-run-command nil t :help "Run context (MarkIV)")
("luametatex"
"PATH=/home/viserion/data/context/tex/texmf-linux-64/bin:$PATH context
--purgeall %s"
  TeX-run-command nil t :help "Run context (LMTX)")
  ) TeX-command-list
)
  )
)



Thank you so much.
Fabrice


Le mar. 9 avr. 2019 à 09:04, Vladimir Lomov  a écrit :

> Hello,
> ** Fabrice Couvreur [2019-04-09 00:58:46 +0200]:
>
> > Hi Vladimir,
> > I use AUCTeX and I compile with the command C-c C-c. The configuration
> you
> > proposed for my .emacs file last time works perfectly. So I tried to do
> the
> > same thing with context lmtx and if I add this
> >
> > ("ConTeXt" "PATH = /home/viserion/data/context/tex/texmf-linux-64/bin: $
> > PATH context --purgeall% s"
> >  TeX-run-command nil t: help "Run context (LMTX)") TeX-command-list)
> > I get the message
> >
> > For information about GNU Emacs and the GNU system, type C-h C-a.
> > File mode specification error: (wrong-type-argument symbolp (ConTeXt
> PATH =
> > / home / viserion / data / context / tex / texmf-linux-64 / bin: $ PATH
> > context -purgeall% s TeX-run-command nil t : help Run context (LMTX)))
>
> This message tells that something wrong with your settings (I assume the
> spaces in above strings are side effect of mail system). The 'cons'
> function that you use allows to add only one element to a list (see
> Emacs Lisp documentation). I'm not familiar very well with Emacs Lisp
> but tested a bit and think this should work:
>
>  8< 
> (eval-after-load "context"
>   '(setq TeX-command-list
> (append
>   '(
> ("ConTeXt" "PATH=...:$PATH context --purgeall %s"
>   TeX-run-command nil t :help "Run context (MarkIV)")
> ("LMTX""PATH=...:$PATH context --purgeall %s"
>   TeX-run-command t   t :help "Run context (LMTX)")
>   ) TeX-command-list
> )
>   )
> )
>  8< 
>
> I'm not absolutely sure about 'TeX-run-command' (code of AUCTeX uses
> 'TeX-run-TeX' for TeX stuff). You may test and use 'TeX-run-TeX' instead
> of 'TeX-run-command'. Also you may change the 'nil t' to 't
> (context-mode)' if you what to edit (expanded) string and only want to
> see these entries for buffers set in 'context' mode.
>
> And please check the binary name and it's location (I didn't play with
> LMTX yet).
>
> > Fabrice
>
> ---
> WBR, Vladimir Lomov
>
> --
>  Anyone here knowledgable in matters of water fowl?  If you
>  walk through a park, and a goose starts following you... and
>  ends up following you more than half a mile until you reach
>  your car... at 11pm.  Is the goose rabid or something?
>
___
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] Emacs with context lmtx

2019-04-08 Thread Fabrice Couvreur
Hi Vladimir,
I use AUCTeX and I compile with the command C-c C-c. The configuration you
proposed for my .emacs file last time works perfectly. So I tried to do the
same thing with context lmtx and if I add this

("ConTeXt" "PATH = /home/viserion/data/context/tex/texmf-linux-64/bin: $
PATH context --purgeall% s"
 TeX-run-command nil t: help "Run context (LMTX)") TeX-command-list)
I get the message

For information about GNU Emacs and the GNU system, type C-h C-a.
File mode specification error: (wrong-type-argument symbolp (ConTeXt PATH =
/ home / viserion / data / context / tex / texmf-linux-64 / bin: $ PATH
context -purgeall% s TeX-run-command nil t : help Run context (LMTX)))

Fabrice

Le lun. 8 avr. 2019 à 14:01, Vladimir Lomov  a écrit :

> Hello,
> ** Fabrice Couvreur [2019-04-08 12:08:44 +0200]:
>
> > Hi,
> > I compile all my files with Emacs and standalone context. I would like to
> > compare context lmtx.
> > I added this in my .emacs file but it does not work.
>
> Does Emacs prints error messages? How do you run the command in Emacs?
> Do you use AUCTeX or not? What messages do you see in *Messages* buffer?
>
> >
> #
> > (eval-after-load "context"
> >   '(setq TeX-command-list
> >(cons '("ConTeXt"
> > "PATH=/home/viserion/context/tex/texmf-linux-64/bin:$PATH context
> > --purgeall %s"
> > TeX-run-command nil t :help "Run context (MarkIV)")
> > TeX-command-list)
> >("ConTeXt"
> > "PATH=/home/viserion/data/context/tex/texmf-linux-64/bin:$PATH context
> > --purgeall %s"
> > TeX-run-command t t :help "Run context (LMTX)") t)
> > )
> >
> #
> >
> >
> > For information about GNU Emacs and the GNU system, type C-h C-a.
> > File mode specification error: (wrong-type-argument symbolp (ConTeXt
> > PATH=/home/viserion/data/context/tex/texmf-linux-64/bin:$PATH context
> > --purgeall %s TeX-run-command t t :help Run context (LMTX)))
> >
> > Thank you.
> > Fabrice
>
> P.S. I didn't try lmtx yet, on my agenda.
>
> P.P.S. It might be more useful to discuss this topic on AUCTeX mailing
> list if you use AUCTeX.
>
> ---
> WBR, Vladimir Lomov
>
> --
> Nothing recedes like success.
> -- Walter Winchell
>
> ___
> 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
___


[NTG-context] Emacs with context lmtx

2019-04-08 Thread Fabrice Couvreur
Hi,
I compile all my files with Emacs and standalone context. I would like to
compare context lmtx.
I added this in my .emacs file but it does not work.

#
(eval-after-load "context"
  '(setq TeX-command-list
   (cons '("ConTeXt"
"PATH=/home/viserion/context/tex/texmf-linux-64/bin:$PATH context
--purgeall %s"
TeX-run-command nil t :help "Run context (MarkIV)")
TeX-command-list)
   ("ConTeXt"
"PATH=/home/viserion/data/context/tex/texmf-linux-64/bin:$PATH context
--purgeall %s"
TeX-run-command t t :help "Run context (LMTX)") t)
)
#


For information about GNU Emacs and the GNU system, type C-h C-a.
File mode specification error: (wrong-type-argument symbolp (ConTeXt
PATH=/home/viserion/data/context/tex/texmf-linux-64/bin:$PATH context
--purgeall %s TeX-run-command t t :help Run context (LMTX)))

Thank you.
Fabrice
___
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] Can not update Context Standalone

2019-04-08 Thread Fabrice Couvreur
Hi,
I just updated this morning and it works well now !
Fabrice

Le dim. 7 avr. 2019 à 13:23, Fabrice Couvreur 
a écrit :

> Hi,
> I have just updated context standalone and I get the following errors :
>
> When you want to use context, you need to initialize the tree by typing:
>
>   . /home/viserion/context/tex/setuptex
>
> in your shell or add
>   "/home/viserion/context/tex/texmf-linux-64/bin"
> to PATH variable if you want to set it permanently.
> This can usually be done in .bashrc, .bash_profile
> (or whatever file is used to initialize your shell).
>
> [viserion@archlinux context]$ mtxrun --generate
> bash: /home/viserion/bin/mtxrun: Aucun fichier ou dossier de ce type
> [viserion@archlinux context]$ context --make
> /home/viserion/texlive/2018/bin/x86_64-linux/context: ligne 2:
> /home/viserion/bin/mtxrun: Aucun fichier ou dossier de ce type
> [viserion@archlinux context]$
>
> Thanks
> Fabrice
>
___
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] luametatex : command not found

2019-04-08 Thread Fabrice Couvreur
You only have to write  export PATH =
$HOME/data/context/tex/texmf-linux-64/bin:$ PATH

Le lun. 8 avr. 2019 à 10:04, Fabrice Couvreur 
a écrit :

> Hi Joseph,
> Yes I did it as with standalone context
> export PATH = $HOME/home/viserion/context/tex/texmf-linux-64/bin:$ PATH
> but writing this time
>
> export PATH = $HOME/home/viserion/data/context/tex/texmf-linux-64/bin:$
> PATH
> Thanks
> Fabrice
>
> Le dim. 7 avr. 2019 à 23:07, Joseph Canedo  a
> écrit :
>
>> Hi Fabrice,
>>
>>
>>
>> Have you added /home/viserion/data/context/tex/texmf-linux-64/bin to
>> your PATH environment variable?
>>
>>
>>
>> Joseph
>>
>>
>>
>> *De : *Fabrice Couvreur 
>> *Envoyé le :*dimanche 7 avril 2019 13:13
>> *À : *mailing list for ConTeXt users 
>> *Objet :*[NTG-context] luametatex : command not found
>>
>>
>>
>> Hi,
>> My system is unix and my platform is linux-64. I installed ConTeXt LMTX
>> as described, namely in my home and in the directory /data /context/
>> I then tried to compile but without success a file :
>>
>>
>>
>> [viserion@archlinux ~]$
>> /home/viserion/data/context/tex/texmf-linux-64/bin/context area.tex
>> mtx-context | run 1: luametatex
>> --fmt="/home/viserion/data/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en"
>> --jobname="area"
>> --lua="/home/viserion/data/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui"
>> --c:currentrun=1 --c:fulljobname="./area.tex" --c:input="./area.tex"
>> --c:kindofrun=1 --c:maxnofruns=9
>> --c:texmfbinpath="/home/viserion/data/context/tex/texmf-linux-64/bin"
>> "cont-yes.mkiv"
>>
>> sh: luametatex : commande introuvable
>> mtx-context | fatal error: return code: 32512
>> [viserion@archlinux ~]$
>>
>> Thanks
>>
>> Fabrice
>>
>>
>>
>> ___
>> 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] luametatex : command not found

2019-04-08 Thread Fabrice Couvreur
Hi Joseph,
Yes I did it as with standalone context
export PATH = $HOME/home/viserion/context/tex/texmf-linux-64/bin:$ PATH but
writing this time

export PATH = $HOME/home/viserion/data/context/tex/texmf-linux-64/bin:$
PATH
Thanks
Fabrice

Le dim. 7 avr. 2019 à 23:07, Joseph Canedo  a
écrit :

> Hi Fabrice,
>
>
>
> Have you added /home/viserion/data/context/tex/texmf-linux-64/bin to your
> PATH environment variable?
>
>
>
> Joseph
>
>
>
> *De : *Fabrice Couvreur 
> *Envoyé le :*dimanche 7 avril 2019 13:13
> *À : *mailing list for ConTeXt users 
> *Objet :*[NTG-context] luametatex : command not found
>
>
>
> Hi,
> My system is unix and my platform is linux-64. I installed ConTeXt LMTX as
> described, namely in my home and in the directory /data /context/
> I then tried to compile but without success a file :
>
>
>
> [viserion@archlinux ~]$
> /home/viserion/data/context/tex/texmf-linux-64/bin/context area.tex
> mtx-context | run 1: luametatex
> --fmt="/home/viserion/data/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en"
> --jobname="area"
> --lua="/home/viserion/data/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui"
> --c:currentrun=1 --c:fulljobname="./area.tex" --c:input="./area.tex"
> --c:kindofrun=1 --c:maxnofruns=9
> --c:texmfbinpath="/home/viserion/data/context/tex/texmf-linux-64/bin"
> "cont-yes.mkiv"
>
> sh: luametatex : commande introuvable
> mtx-context | fatal error: return code: 32512
> [viserion@archlinux ~]$
>
> Thanks
>
> Fabrice
>
>
>
> ___
> 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
___


[NTG-context] Can not update Context Standalone

2019-04-07 Thread Fabrice Couvreur
Hi,
I have just updated context standalone and I get the following errors :

When you want to use context, you need to initialize the tree by typing:

  . /home/viserion/context/tex/setuptex

in your shell or add
  "/home/viserion/context/tex/texmf-linux-64/bin"
to PATH variable if you want to set it permanently.
This can usually be done in .bashrc, .bash_profile
(or whatever file is used to initialize your shell).

[viserion@archlinux context]$ mtxrun --generate
bash: /home/viserion/bin/mtxrun: Aucun fichier ou dossier de ce type
[viserion@archlinux context]$ context --make
/home/viserion/texlive/2018/bin/x86_64-linux/context: ligne 2:
/home/viserion/bin/mtxrun: Aucun fichier ou dossier de ce type
[viserion@archlinux context]$

Thanks
Fabrice
___
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] luametatex : command not found

2019-04-07 Thread Fabrice Couvreur
Hi,
My system is unix and my platform is linux-64. I installed ConTeXt LMTX as
described, namely in my home and in the directory /data /context/
I then tried to compile but without success a file :

[viserion@archlinux ~]$
/home/viserion/data/context/tex/texmf-linux-64/bin/context area.tex
mtx-context | run 1: luametatex
--fmt="/home/viserion/data/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en"
--jobname="area"
--lua="/home/viserion/data/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui"
--c:currentrun=1 --c:fulljobname="./area.tex" --c:input="./area.tex"
--c:kindofrun=1 --c:maxnofruns=9
--c:texmfbinpath="/home/viserion/data/context/tex/texmf-linux-64/bin"
"cont-yes.mkiv"

sh: luametatex : commande introuvable
mtx-context | fatal error: return code: 32512
[viserion@archlinux ~]$
Thanks
Fabrice
___
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] Macro for a header does not work as well

2019-02-19 Thread Fabrice Couvreur
Hi Otared,
No that's not what I want to talk about. Before I got this "27 février
2019" and now this d = 27 m = 02 y = 2019.
Thank you.
Fabrice

Le lun. 18 févr. 2019 à 14:31, Otared Kavian  a écrit :

> Hi Fabrice,
>
> Do you mean the fact that the date is not in the usual French format? In
> that case you should add
>
> \mainlanguage[fr]
>
> to the beginning of your file.
>
> Best regards: OK
>
> > On 18 Feb 2019, at 12:04, Fabrice Couvreur 
> wrote:
> >
> > Hi,
> > Aditya offered me this macro some time ago for my header. I updated
> context standalone, and the display of the date I want to do the evaluation
> (different from the current date) is no longer the same.
> > Thank you.
> > Fabrice
> >
> > \setupbackgrounds
> >[header]
> >[text]
> >[frame=off,
> > topframe=off,
> > bottomframe=on,
> > framecolor=,
> > rulethickness=1pt]
> >
> > \defineframed
> >[headerframed]
> >[frame=off,
> > height=fit,
> > width=fit]
> >
> > \startsetups [headertext]
> >
> > \setupheadertexts
> >[{
> >  \startframed [headerframed] [foregroundstyle=bold]
> >  \getvariable{headertext}{title}
> n\high{o}\,\getvariable{headertext}{number}
> >  \stopframed
> >}]
> >
> > \setupheadertexts
> > [{
> >   \startframed [headerframed]
> [align=flushleft,foregroundstyle=\ssx]
> >   \getvariable{headertext}{location}\\
> >   \getvariable{headertext}{time}
> >   \stopframed
> > }]
> > [{
> >   \startframed [headerframed]
> [align=flushright,foregroundstyle=\ssx]
> >Lycée LA SALLE\\
> >
>  
> \date[d=\getvariable{headertext}{day},m=\getvariable{headertext}{month},y=\getvariable{headertext}{year}]
> >   \stopframed
> > }]
> >
> >   \stopsetups
> >
> >
> > \setvariable{headertext}{set}{\directsetup{headertext}}
> > \setvariables
> >   [headertext]
> >   [title={Devoir surveillé de Mathématiques},
> >number={4},
> >day={27},
> >month={02},
> >year={2019},
> >location={T\high{\tfxx ale}~ES},
> >time={3 heures}]
> >
> > \starttext
> >   \input knuth
> > \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
> >
> ___
>
>
> ___
> 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
___


[NTG-context] Macro for a header does not work as well

2019-02-18 Thread Fabrice Couvreur
Hi,
Aditya offered me this macro some time ago for my header. I updated context
standalone, and the display of the date I want to do the evaluation
(different from the current date) is no longer the same.
Thank you.
Fabrice

\setupbackgrounds
   [header]
   [text]
   [frame=off,
topframe=off,
bottomframe=on,
framecolor=,
rulethickness=1pt]

\defineframed
   [headerframed]
   [frame=off,
height=fit,
width=fit]

\startsetups [headertext]

\setupheadertexts
   [{
 \startframed [headerframed] [foregroundstyle=bold]
 \getvariable{headertext}{title}
n\high{o}\,\getvariable{headertext}{number}
 \stopframed
   }]

\setupheadertexts
[{
  \startframed [headerframed] [align=flushleft,foregroundstyle=\ssx]
  \getvariable{headertext}{location}\\
  \getvariable{headertext}{time}
  \stopframed
}]
[{
  \startframed [headerframed]
[align=flushright,foregroundstyle=\ssx]
   Lycée LA SALLE\\

\date[d=\getvariable{headertext}{day},m=\getvariable{headertext}{month},y=\getvariable{headertext}{year}]
  \stopframed
}]

  \stopsetups


\setvariable{headertext}{set}{\directsetup{headertext}}
\setvariables
  [headertext]
  [title={Devoir surveillé de Mathématiques},
   number={4},
   day={27},
   month={02},
   year={2019},
   location={T\high{\tfxx ale}~ES},
   time={3 heures}]

\starttext
  \input knuth
\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] Issue with the latest beta of context standalone

2019-02-04 Thread Fabrice Couvreur
Hi,
I added the patch but the output is not that expected because I get  d = 4m
= 02 y = 2019 instead of "4 février 2019"
Thank you
Fabrice
 \mainlanguage[fr]

  \setupbackgrounds
[header]
[text]
[frame=off,
 topframe=off,
 bottomframe=on,
 framecolor=,
 rulethickness=1pt]

  \defineframed
   [headerframed]
   [frame=off,
height=fit,
width=fit]

   \startsetups [headertext]
\setupheadertexts
[{
\startframed [headerframed] [foregroundstyle=bold]
\getvariable{headertext}{title}
n\high{o}\,\getvariable{headertext}{number}
\stopframed
}]

\setupheadertexts
[{
\startframed [headerframed]
[align=flushleft,foregroundstyle=\ssx]
\getvariable{headertext}{location}\\
\getvariable{headertext}{time}
\stopframed
}]
[{
\startframed [headerframed]
[align=flushright,foregroundstyle=\ssx]
Lycée LA SALLE\\

\date[d=\getvariable{headertext}{day},m=\getvariable{headertext}{month},y=\getvariable{headertext}{year}]
\stopframed
}]

  \stopsetups

  \setvariable{headertext}{set}{\directsetup{headertext}}

  \setvariables
  [headertext]
  [title={Interrogation écrite},
   number={6},
   day={4},
   month={02},
   year={2019},
   location={Seconde GTE},
   time={55 minutes}]

   \starttext
 \input Knuth
   \stoptext



Le dim. 27 janv. 2019 à 17:54, Otared Kavian  a écrit :

> On 27 Jan 2019, at 17:30, Wolfgang Schuster <
> wolfgang.schuster.li...@gmail.com> wrote:
>
>
> […]
> 1. You don’t have to remake the format for patches in cont-new.mkiv
> because the file is loaded at runtime.
>
> 2. The patch works and I get “2019 januari 27” with your example.
>
>
> Hi Wolfgang,
>
> Thanks for the clarification about cont-new.mkiv.
> The corrected cont-new.mkiv begins with
>
> \unprotect
>
> \def\syst_converters_check_date
>  {\edef\temp{\systemparameter\c!d}\scratchcounterone
> \ifx\temp\empty\normalday  \else\temp\fi
>   \edef\temp{\systemparameter\c!m}\scratchcountertwo
> \ifx\temp\empty\normalmonth\else\temp\fi
> \edef\temp{\systemparameter\c!y}\scratchcounterthree\ifx\temp\empty\normalyear
> \else\temp\fi}
>
> \writestatus\m!system{beware: some patches loaded from cont-new.mkiv}
>
>
> However I still get the wrong date with the example I sent, and Fabrice's
> example with \mainlanguage[fr], as well as with \mainlanguage[nl], gives an
> incorrect result (even though the result is correct with \mainlanguage[en]).
>
> Best regards: OK
>
> ___
> 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] Show the letters of the alphabet with a loop (Metapost)

2019-02-04 Thread Fabrice Couvreur
Hi,
@ Henri Thank you
@ Alan How to use it in my code ?
Thank you
Fabrice

Le dim. 3 févr. 2019 à 21:26, Alan Braslau  a
écrit :

> On Mon, 4 Feb 2019 09:19:26 +1300
> Henri Menke  wrote:
>
> > Use the infont operator.
>
> Easier yet, the string can contain the font switch \bf:
>
> draw textext("\bf "(i)) ;
>
>
> ___
> 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] Show the letters of the alphabet with a loop (Metapost)

2019-02-03 Thread Fabrice Couvreur
Sorry Henri, but I still have a question : how to have the letters in bold
type ?
Thank you.
Fabrice

Le dim. 3 févr. 2019 à 10:12, Fabrice Couvreur 
a écrit :

> Hi Henry
> Thank you for everything.
> Fabrice
>
> Le sam. 2 févr. 2019 à 20:58, Henri Menke  a écrit :
>
>> On 2/2/19 11:49 PM, Fabrice Couvreur wrote:
>> > Hi Henri,
>> > Great ! I would also like these letters to be randomly colored.
>>
>> You should play with randomseed, the starting color (here white) and the
>> randomization amplitude (1,1,1).  You mileage may vary.
>>
>> \starttext
>>
>> \startMPcode
>>   for i=0 upto 3 :
>>   for j=0 upto 3 :
>>   draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
>>   endfor ;
>>   endfor ;
>>   for i=0 upto 4 :
>>   for j=0 upto 4 :
>>   label.llft(char(i*5+j+ASCII "A"), (4*i*cm,4*j*cm))
>>   withcolor white randomized (1,1,1) ;
>>   endfor ;
>>   endfor ;
>> \stopMPcode
>>
>> \stoptext
>>
>> > Thank you.
>> > Fabrice
>> >
>> > Le sam. 2 févr. 2019 à 11:16, Henri Menke  a
>> écrit :
>> >
>> >> On 2/2/19 10:47 PM, Fabrice Couvreur wrote:
>> >> > The idea is to display the first 25 letters of the alphabet. The code
>> >> below
>> >> > shows the letter a to show what I want to do.
>> >> > Thank you.
>> >> > Fabrice
>> >>
>> >> Use char and ASCII.
>> >>
>> >> \starttext
>> >>
>> >> \startMPcode
>> >>   for i=0 upto 3 :
>> >>   for j=0 upto 3 :
>> >>   draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
>> >>   endfor ;
>> >>   endfor ;
>> >>   for i=0 upto 4 :
>> >>   for j=0 upto 4 :
>> >>   label.llft(char(i*5+j+ASCII "A"), (4*i*cm,4*j*cm)) ;
>> >>   endfor ;
>> >>   endfor ;
>> >> \stopMPcode
>> >>
>> >> \stoptext
>> >>
>> >> >
>> >> > \starttext
>> >> >
>> >> > \startMPcode
>> >> >   for i=0 upto 3 :
>> >> >   for j=0 upto 3 :
>> >> >   draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
>> >> >   endfor ;
>> >> >   endfor ;
>> >> >   for i=0 upto 4 :
>> >> >   for j=0 upto 4 :
>> >> >   label.llft("A", (4*i*cm,4*j*cm)) ;
>> >> >   endfor ;
>> >> >   endfor ;
>> >> > \stopMPcode
>> >> >
>> >> > \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
>> >> >
>> >>
>> ___
>> >> >
>> >>
>> >>
>> >>
>> ___
>> >> 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
>> >
>> ___
>> >
>>
>>
>> ___
>> 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
___


[NTG-context] About the macro path intersectionpoint path with Metapost

2019-02-03 Thread Fabrice Couvreur
Hi,
I would like to reproduce the attached figure. My problem is to create the
points of intersection between the circles. It seems that my approach is
not the right one.
Thank you.
Fabrice

\starttext
\startMPcode
  path p, q, r, b ;
  p:= fullcircle scaled 6cm ;
  q:= fullcircle scaled 4cm shifted (2.5cm,2cm) ;
  r:= fullcircle scaled 4cm shifted (-2.5cm,2cm);
  b:= fullcircle scaled 2cm shifted (0,-3cm);
  pair A, B ;
  A:= p intersectionpoint r ;
  B:= p intersectionpoint r ;
  path u ;
  u:= A--B--cycle ;
  draw p ;
  draw q ;
  draw r ;
  draw b ;
  draw u numberstriped (.25,15,5) withcolor magenta ;
\stopMPcode
\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] Show the letters of the alphabet with a loop (Metapost)

2019-02-03 Thread Fabrice Couvreur
Hi Henry
Thank you for everything.
Fabrice

Le sam. 2 févr. 2019 à 20:58, Henri Menke  a écrit :

> On 2/2/19 11:49 PM, Fabrice Couvreur wrote:
> > Hi Henri,
> > Great ! I would also like these letters to be randomly colored.
>
> You should play with randomseed, the starting color (here white) and the
> randomization amplitude (1,1,1).  You mileage may vary.
>
> \starttext
>
> \startMPcode
>   for i=0 upto 3 :
>   for j=0 upto 3 :
>   draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
>   endfor ;
>   endfor ;
>   for i=0 upto 4 :
>   for j=0 upto 4 :
>   label.llft(char(i*5+j+ASCII "A"), (4*i*cm,4*j*cm))
>   withcolor white randomized (1,1,1) ;
>   endfor ;
>   endfor ;
> \stopMPcode
>
> \stoptext
>
> > Thank you.
> > Fabrice
> >
> > Le sam. 2 févr. 2019 à 11:16, Henri Menke  a
> écrit :
> >
> >> On 2/2/19 10:47 PM, Fabrice Couvreur wrote:
> >> > The idea is to display the first 25 letters of the alphabet. The code
> >> below
> >> > shows the letter a to show what I want to do.
> >> > Thank you.
> >> > Fabrice
> >>
> >> Use char and ASCII.
> >>
> >> \starttext
> >>
> >> \startMPcode
> >>   for i=0 upto 3 :
> >>   for j=0 upto 3 :
> >>   draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
> >>   endfor ;
> >>   endfor ;
> >>   for i=0 upto 4 :
> >>   for j=0 upto 4 :
> >>   label.llft(char(i*5+j+ASCII "A"), (4*i*cm,4*j*cm)) ;
> >>   endfor ;
> >>   endfor ;
> >> \stopMPcode
> >>
> >> \stoptext
> >>
> >> >
> >> > \starttext
> >> >
> >> > \startMPcode
> >> >   for i=0 upto 3 :
> >> >   for j=0 upto 3 :
> >> >   draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
> >> >   endfor ;
> >> >   endfor ;
> >> >   for i=0 upto 4 :
> >> >   for j=0 upto 4 :
> >> >   label.llft("A", (4*i*cm,4*j*cm)) ;
> >> >   endfor ;
> >> >   endfor ;
> >> > \stopMPcode
> >> >
> >> > \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
> >> >
> >>
> ___
> >> >
> >>
> >>
> >>
> ___
> >> 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
> >
> ___
> >
>
>
> ___
> 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] Show the letters of the alphabet with a loop (Metapost)

2019-02-02 Thread Fabrice Couvreur
Hi Henri,
Great ! I would also like these letters to be randomly colored.
Thank you.
Fabrice

Le sam. 2 févr. 2019 à 11:16, Henri Menke  a écrit :

> On 2/2/19 10:47 PM, Fabrice Couvreur wrote:
> > The idea is to display the first 25 letters of the alphabet. The code
> below
> > shows the letter a to show what I want to do.
> > Thank you.
> > Fabrice
>
> Use char and ASCII.
>
> \starttext
>
> \startMPcode
>   for i=0 upto 3 :
>   for j=0 upto 3 :
>   draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
>   endfor ;
>   endfor ;
>   for i=0 upto 4 :
>   for j=0 upto 4 :
>   label.llft(char(i*5+j+ASCII "A"), (4*i*cm,4*j*cm)) ;
>   endfor ;
>   endfor ;
> \stopMPcode
>
> \stoptext
>
> >
> > \starttext
> >
> > \startMPcode
> >   for i=0 upto 3 :
> >   for j=0 upto 3 :
> >   draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
> >   endfor ;
> >   endfor ;
> >   for i=0 upto 4 :
> >   for j=0 upto 4 :
> >   label.llft("A", (4*i*cm,4*j*cm)) ;
> >   endfor ;
> >   endfor ;
> > \stopMPcode
> >
> > \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
> >
> ___
> >
>
>
> ___
> 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
___


[NTG-context] Show the letters of the alphabet with a loop (Metapost)

2019-02-02 Thread Fabrice Couvreur
The idea is to display the first 25 letters of the alphabet. The code below
shows the letter a to show what I want to do.
Thank you.
Fabrice

\starttext

\startMPcode
  for i=0 upto 3 :
  for j=0 upto 3 :
  draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
  endfor ;
  endfor ;
  for i=0 upto 4 :
  for j=0 upto 4 :
  label.llft("A", (4*i*cm,4*j*cm)) ;
  endfor ;
  endfor ;
\stopMPcode

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


[NTG-context] Issue with the latest beta of context standalone

2019-01-27 Thread Fabrice Couvreur
Hi,
I just updated context standalone and if I compile the following file, the
date does not appear anymore.
Thank you
Fabrice

  \mainlanguage[fr]

  \setupbackgrounds
[header]
[text]
[frame=off,
 topframe=off,
 bottomframe=on,
 framecolor=,
 rulethickness=1pt]

  \defineframed
   [headerframed]
   [frame=off,
height=fit,
width=fit]

   \startsetups [headertext]
\setupheadertexts
[{
\startframed [headerframed] [foregroundstyle=bold]
\getvariable{headertext}{title}
n\high{o}\,\getvariable{headertext}{number}
\stopframed
}]

\setupheadertexts
[{
\startframed [headerframed]
[align=flushleft,foregroundstyle=\ssx]
\getvariable{headertext}{location}\\
\getvariable{headertext}{time}
\stopframed
}]
[{
\startframed [headerframed]
[align=flushright,foregroundstyle=\ssx]
Lycée LA SALLE\\

\date[d=\getvariable{headertext}{day},m=\getvariable{headertext}{month},y=\getvariable{headertext}{year}]
\stopframed
}]

  \stopsetups

  \setvariable{headertext}{set}{\directsetup{headertext}}

  \setvariables
  [headertext]
  [title={Interrogation écrite},
   number={6},
   day={29},
   month={01},
   year={2019},
   location={Seconde GTE},
   time={55 minutes}]

   \starttext
 \input Knuth
   \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
___

[NTG-context] How to pass a parameter with \definedescription[]

2019-01-27 Thread Fabrice Couvreur
Hi,
Hans and Wolfgang helped me to design this framed text. How to pass in text
parameter as we can for the length?
The text is set to "Note" and I would like it to be "Vocabulary" for the
second framed text.
Thank you
Fabrice

\definecolor[MyColorA][s=0.8784]
\definecolor[MyColorB][m=0.27,y=1]

\defineframed
   [FrameTitle]
   [frame=off,
foregroundstyle=\bfx\ss,
foregroundcolor=white,
background=color,
backgroundcolor=MyColorB,
location=depth]

\defineframedtext
   [FramedText]
   [offset=0.5em,
style=\ss,
toffset=.25\lineheight,
background=color,
backgroundcolor=MyColorA,
foregroundstyle={\switchtobodyfont[12pt]},
align={right, broad},
frame=off,
corner=round,
radius=1em,
width=10cm]

\definedescription
   [Info]
   [before=,
after=,
text=Note,
title=no,
width=fit,
distance=1em,
headcommand=\FrameTitle,
alternative=serried]

\starttext

\startFramedText[width=\textwidth]
  \startInfo
Cette suite d'appels sera notée Anissa--Boris--Gween et on dira qu'elle a
pour longueur 2.
  \stopInfo
\stopFramedText

\startFramedText[width=\textwidth]
  \startInfo
La matrice \m{M} est appelée {\bf matrice d'adjacence} du graphe.
  \stopInfo
\stopFramedText



\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] Color a column (xtable, lua)

2019-01-26 Thread Fabrice Couvreur
Hi Henry,
Thank you for your proposition. I tested both : the first work  but not the
second.
Fabrice

lua error   > lua error on line 13 in file /home/viserion/Ntg_7.tex:

...ext/tex/texmf-context/tex/context/base/mkiv/tabl-xtb.lua:1269: attempt
to index a nil value (upvalue 'data')

 3
 4 \startuseMPgraphic{tablebackground}{i,j}
 5 if (\MPvar{i} = 1) or (\MPvar{j} = 1):
 6   fill OverlayBox withcolor \MPcolor{fondpaille} ;
 7 fi;
 8 \stopuseMPgraphic
 9
10 \defineoverlay
11   [tablebackground]
12
13 >>
[\useMPgraphic{tablebackground}{i=\currentxtablerow,j=\currentxtablecolumn}]
14
15 \setupxtable[background=tablebackground]
16
17 \starttext
18 \startluacode
19 local letters_1 = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J"
}
20 local letters_2 = { "A", "0", "1", "1", "0", "", "", "", "", "" }
21 context.startxtable({"align={middle,lohi},
width=1.25cm,offset=0.8ex"})
22
23 context.startxrow()


?

Le dim. 27 janv. 2019 à 00:34, Henri Menke  a écrit :

> On 1/27/19 12:26 PM, Henri Menke wrote:
> > On 1/27/19 12:08 PM, Fabrice Couvreur wrote:
> >> Hi,
> >> How to color the first column as I did for the first line ?
> >
> > Stolen from Wolfgang's answer on TeX.SX.
> > https://tex.stackexchange.com/a/464771
> >
>
> You could also evaluate the conditional purely in MetaPost.  I don't
> know if that would be faster, but it's a bit more readable to me.
>
>
> \startuseMPgraphic{tablebackground}{i,j}
> if (\MPvar{i} = 1) or (\MPvar{j} = 1):
>   fill OverlayBox withcolor \MPcolor{fondpaille} ;
> fi;
> \stopuseMPgraphic
>
> \defineoverlay
>   [tablebackground]
>
>
> [\useMPgraphic{tablebackground}{i=\currentxtablerow,j=\currentxtablecolumn}]
>
> \setupxtable[background=tablebackground]
>
> >
> > \definecolor[fondpaille][c=0,m=0,y=0.2,k=0]
> >
> > \startuseMPgraphic {tablebackground}
> >   fill OverlayBox withcolor \MPcolor{fondpaille} ;
> > \stopuseMPgraphic
> >
> > \defineoverlay
> >   [tablebackground]
> >   [\ifnum\currentxtablerow=1
> >\useMPgraphic{tablebackground}%
> >\else\ifnum\currentxtablecolumn=1
> >\useMPgraphic{tablebackground}%
> >\fi\fi]
> >
> > \setupxtable[background=tablebackground]
> >
> > \starttext
> > \startluacode
> > local letters_1 = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" }
> > local letters_2 = { "A", "0", "1", "1", "0", "", "", "", "", "" }
> > context.startxtable({"align={middle,lohi}, width=1.25cm,offset=0.8ex"})
> >
> > context.startxrow()
> > context.startxcell({"background=color,backgroundcolor=white,frame=off"})
> > context("")
> > context.stopxcell()
> > for _, letter in ipairs(letters_1) do
> > context.startxcell()
> > context(letter) context.stopxcell()
> > end
> > context.stopxrow()
> >
> > context.startxrow()
> > for _, letter in ipairs(letters_2) do
> > context.startxcell() context(letter) context.stopxcell()
> > end
> > context.stopxrow()
> >
> > for i=2,10 do
> > context.startxrow()
> > context.startxcell()  context(converters.convert("A",i))
> > context.stopxcell()
> > context.stopxrow()
> > end
> >
> > context.stopxtable()
> > \stopluacode
> > \stoptext
> >
> >
> >> Thank you
> >> Fabrice
> >>
> >> \definecolor[fondpaille][c=0,m=0,y=0.2,k=0]
> >> \starttext
> >> \startluacode
> >> local letters_1 = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" }
> >> local letters_2 = { "A", "0", "1", "1", "0", "", "", "", "", "" }
> >> context.startxtable({"align={middle,lohi}, width=1.25cm,offset=0.8ex"})
> >> context.startxrow()
> >> context.startxcell({"background=color,backgroundcolor=white,frame=off"})
> >> context("") context.stopxcell()
> >> for _, letter in ipairs(letters_1) do
> >>  context.startxcell({"background=col

[NTG-context] Color a column (xtable, lua)

2019-01-26 Thread Fabrice Couvreur
Hi,
How to color the first column as I did for the first line ?
Thank you
Fabrice

\definecolor[fondpaille][c=0,m=0,y=0.2,k=0]
\starttext
\startluacode
local letters_1 = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" }
local letters_2 = { "A", "0", "1", "1", "0", "", "", "", "", "" }
context.startxtable({"align={middle,lohi}, width=1.25cm,offset=0.8ex"})
context.startxrow()
context.startxcell({"background=color,backgroundcolor=white,frame=off"})
context("") context.stopxcell()
for _, letter in ipairs(letters_1) do
 context.startxcell({"background=color,backgroundcolor=fondpaille"})
context(letter) context.stopxcell()
end
context.stopxrow()
context.startxrow()
for _, letter in ipairs(letters_2) do
 context.startxcell() context(letter) context.stopxcell()
end
context.stopxrow()
for i=2,10 do
 context.startxrow()
 context.startxcell()  context(converters.convert("A",i))
context.stopxcell()
 context.stopxrow()
end
context.stopxtable()
\stopluacode
\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] Equivalent of alignat of amsmath with context

2019-01-05 Thread Fabrice Couvreur
Hi Wolfgang and OK,

> What is the result you get with LaTeX?
>
>
>

> Is this what you are looking for?
>

This is the expected result, thank you.
Fabrice

Le sam. 5 janv. 2019 à 16:45, Otared Kavian  a écrit :

> Hi Fabrice,
>
> I think you have to use
>  \startalign[n=3,align={left,right}]
> and finish the alignment with
> \stopalign
>
> Is this what you are looking for?
>
> \starttext
> \startformula
>   \startalign[n=3,align={left,right}]
>\NC \qquad
> \NC\frac{\lvert\overline{AD}\rvert}{\lvert\overline{CD}\rvert} \NC
> =\frac{\lvert\overline{DC}\rvert}{\lvert\overline{CE'}\rvert}\NR
>\NC \iff \NC  \frac{1}{x}  \NC =\frac{x}{1-x} \NR
>\NC \iff \NC 1-x \NC =x^2 \NR
>\NC \iff \NC 0\NC =x^2+x-1 \NR
>   \stopalign
> \stopformula
> \stoptext
>
> Best regards: OK
>
> > On 5 Jan 2019, at 12:27, Fabrice Couvreur 
> wrote:
> >
> > Hi,
> > I'm trying to get the same result for this file compiled with latex.
> > Thanks.
> > Fabrice
> >
> > \documentclass{article}
> > \usepackage{amsmath}
> >
> >
> >
> > \begin{document}
> >
> >
> >
> > \begin{alignat*}{2}
> > &\qquad&
> >
> >
> > \frac{\lvert\overline{AD}\rvert}{\lvert\overline{CD}\rvert}
> >
> >
> > &=\frac{\lvert\overline{DC}\rvert}{\lvert\overline{CE'}\rvert}\\
> > \iff&& \frac{1}{x}&=\frac{x}{1-x}\\
> > \iff&& 1-x&=x^2\\
> > \iff&& 0&=
> > x^2+x-1
> >
> > \end{alignat*}
> >
> >
> >
> > \end{document}
> >
> > \starttext
> > \startformula
> >   \startmathalignment[n=3]
> >\NC \qquad
> \NC\frac{\lvert\overline{AD}\rvert}{\lvert\overline{CD}\rvert} \NC
> =\frac{\lvert\overline{DC}\rvert}{\lvert\overline{CE'}\rvert}\NR
> >\NC \iff \NC  \frac{1}{x}  \NC =\frac{x}{1-x} \NR
> >\NC \iff \NC 1-x \NC =x² \NR
> >\NC \iff \NC 0\NC =x²+x-1 \NR
> >   \stopmathalignment
> > \stopformula
> > \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
> >
> ___
>
>
> ___
> 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
___

[NTG-context] Equivalent of alignat of amsmath with context

2019-01-05 Thread Fabrice Couvreur
Hi,
I'm trying to get the same result for this file compiled with latex.
Thanks.
Fabrice

\documentclass{article}\usepackage{amsmath}
\begin{document}
\begin{alignat*}{2}&\qquad&
  \frac{\lvert\overline{AD}\rvert}{\lvert\overline{CD}\rvert}
&=\frac{\lvert\overline{DC}\rvert}{\lvert\overline{CE'}\rvert}\\\iff&&
\frac{1}{x}&=\frac{x}{1-x}\\\iff&& 1-x&=x^2\\\iff&&
0&=x^2+x-1\end{alignat*}
\end{document}

\starttext
\startformula
  \startmathalignment[n=3]
   \NC \qquad \NC\frac{\lvert\overline{AD}\rvert}{\lvert\overline{CD}\rvert}
\NC =\frac{\lvert\overline{DC}\rvert}{\lvert\overline{CE'}\rvert}\NR
   \NC \iff \NC  \frac{1}{x}  \NC =\frac{x}{1-x} \NR
   \NC \iff \NC 1-x \NC =x² \NR
   \NC \iff \NC 0\NC =x²+x-1 \NR
  \stopmathalignment
\stopformula
\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] ! Declared variable conflicts with previous vardef [Metapost]

2019-01-03 Thread Fabrice Couvreur
Hi,
It is true that Alan has already answered this question but I was misled
because the file that I compiled without problem is this one, even leaving
pair z[ ] (I can think that it is because of this instruction   z := point
3.6 of p ;)

\starttext
\startMPpage[offset=2pt]
 path p, q, r, b ; pair z ;
 p := unitsquare scaled 4cm ;
* z := point 3.6 of p ;*
 q := z--urcorner p ;
 r := z--urcorner p-- reverse bottomboundary p--cycle ;
 b := reverse bottomboundary p ;
 %r := q -- reverse bottomboundary p -- cycle ; definition of Hans
 draw b--q withpen pencircle scaled 1mm withcolor red ;
 draw p ;
 draw r numberstriped (.25,10,5) withcolor magenta ;
 label.llft("B", p) ;
 label.lrt("C", p) ;
 label.ulft("A", p) ;
 label.urt("D", p) ;
 label.lft("M", p) ;
\stopMPpage
\startMPpage[offset=2pt]
  defaultfont := "texgyrepagella-regular*default" ;
  defaultscale :=0.8 ;
  path p, q, r, b ;* pair z[];*
  p  := unitsquare xyscaled (9cm,5cm) ;
  z[0] = (2cm,0cm) ;
  z[1] = (2cm,2cm) ;
  z[2] = (0cm,2cm) ;
  q := llcorner p--z[0]--z[1]--z[2]--cycle ;
  r := unitsquare xyscaled (7cm,3cm) shifted(2cm,2cm) ;
  b := z[2]--z[1]--ulcorner r--urcorner p--lrcorner r--z[1]--z[0]--llcorner
p--cycle ;
  draw p ;
  draw b numberstriped (.25,15,5) withcolor magenta ;
  label.llft("A", p) ;
  label.lrt("D", p) ;
  label.ulft("C", p) ;
  label.urt("B", p) ;
  label.lft("M", z[2]) ;
  label.ulft("N", z[1]) ;
  label.bot("P", z[0]) ;
  label.top("J", ulcorner r) ;
  label.rt("I", lrcorner r) ;
  label.bot(btex $x$ etex,(llcorner p+z[0])/2);
  label.lft(btex $x$ etex,(llcorner p+z[2])/2);
\stopMPpage

\stoptext

Le jeu. 3 janv. 2019 à 07:12, Alan Braslau  a
écrit :

> On Thu, 3 Jan 2019 16:22:06 +1300 (UTC)
> Henri Menke  wrote:
>
> > z is a MetaPost intrinsic, something along the lines of
> >
> > vardef z@#=(x@#,y@#) enddef;
> >
> > so you can't use the same name for a pair.  Actually you can simply
> > delete the declaration
> >
> >pair z[];
>
> I had already told Fabrice this a couple of days ago...
>
> 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
>
> ___
___
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] ! Declared variable conflicts with previous vardef [Metapost]

2019-01-02 Thread Fabrice Couvreur
Hi,
I have a problem compiling this file.
Thanks.
Fabrice

## test file 
\starttext
\setupbodyfont [pagella,9pt]
\startMPpage[offset=2pt]
  path p, q, r, b ; pair z[];
  p  := unitsquare xyscaled (9cm,5cm) ;
  z[0] = (2cm,0cm) ;
  z[1] = (2cm,2cm) ;
  z[2] = (0cm,2cm) ;
  q := llcorner p--z[0]--z[1]--z[2]--cycle ;
  r := unitsquare xyscaled (7cm,3cm) shifted(2cm,2cm) ;
  b := z[2]--z[1]--ulcorner r--urcorner p--lrcorner r--z[1]--z[0]--llcorner
p--cycle ;
  draw p ;
  draw b numberstriped (.25,15,5) withcolor magenta ;
  label.llft("A", p) ;
  label.lrt("D", p) ;
  label.ulft("C", p) ;
  label.urt("B", p) ;
  label.lft("M", z[2]) ;
  label.ulft("N", z[1]) ;
  label.bot("P", z[0]) ;
  label.top("J", ulcorner r) ;
  label.rt("I", lrcorner r) ;
  label.bot(btex $x$ etex,(llcorner p+z[0])/2);
  label.lft(btex $x$ etex,(llcorner p+z[2])/2);
\stopMPpage

\stoptext
#
! Declared variable conflicts with previous vardef.

;
<*> path p, q, r, b ; pair z[] ;
z[0] = (2cm,0cm) ; z[1] = (2cm,2cm) ; z[2] ...
You can't use, e.g., `numeric foo[]' after `vardef foo'.
Proceed, and I'll ignore the illegal redeclaration.
___
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] Question about defining a path with Metapost

2018-12-20 Thread Fabrice Couvreur
Hi,
I need to make a figure with shaded areas and I found this code proposed by
Hans. Why does the definition of the r path that Hans proposed give the
same result as what I propose ?
Thank you.
Fabrice

\starttext
\startMPpage[offset=2pt]
 path p, q, r ; pair z ;
 p := unitsquare scaled 4cm ;
 z := point 3.6 of p ;
 q := z--urcorner p ;
 r := z--urcorner p--lrcorner p--llcorner p--cycle ;
  %r := q -- reverse bottomboundary p -- cycle ; definition of Hans
 draw p ;
 draw r numberstriped (.25,10,5) withcolor magenta ;
 draw thetextext.llft("B", llcorner p) ;
 draw thetextext.lrt ("C", lrcorner p) ;
 draw thetextext.ulft("A", ulcorner p) ;
 draw thetextext.urt ("D", urcorner p) ;
 draw thetextext.lft ("M", z) ;
\stopMPpage
\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
___

[NTG-context] Macro to write a vector with Metafun (again)

2018-12-04 Thread Fabrice Couvreur
Hello Hans,The macro to draw a vector does not work even with the
latest version of context standalone.
Thank you
Fabrice

\useMPlibrary[mat]

% will be in meta-imp-mat.mkiv

\startMPextensions
 vardef math_stacker_arrow_shape =
 image (
 drawarrow
 (OverlayWidth,OverlayOffset) -- (0,OverlayOffset)
 withcolor
 OverlayLineColor ;
 setbounds currentpicture to boundingbox currentpicture
bottomenlarged (OverlayOffset/2) topenlarged (OverlayOffset/2) ;
 )
 enddef ;
 vardef math_stacker_leftarrow_shape =
 math_stacker_arrow_shape
 enddef ;
 vardef math_stacker_rightarrow_shape =
 math_stacker_arrow_shape rotated 180
 enddef ;
\stopMPextensions

\startuniqueMPgraphic{math:stacker:\number"2190}
 math_stacker_draw(math_stacker_leftarrow_shape) ;
\stopuniqueMPgraphic

\startuniqueMPgraphic{math:stacker:\number"2192}
 math_stacker_draw(math_stacker_rightarrow_shape) ;
\stopuniqueMPgraphic

% so far

\setupmathstackers
   [both] % vfenced]
   [color=darkred,
alternative=mp]

\setupmathstackers
   [top]
   [color=darkred,
alternative=mp]

\setupmathstackers
   [bottom]
   [color=darkred,
alternative=mp]

\starttext

$\overbracket   {a+b+c+d} \quad \underbracket{a+b+c+d} \quad
\doublebracket{a+b+c+d}$ \blank
$\overparent{a+b+c+d} \quad \underparent {a+b+c+d} \quad
\doubleparent {a+b+c+d}$ \blank
$\overbrace {a+b+c+d} \quad \underbrace  {a+b+c+d} \quad
\doublebrace  {a+b+c+d}$ \blank
$\overbar   {a+b+c+d} \quad \underbar{a+b+c+d} \quad
\doublebar{a+b+c+d}$ \blank

$\overleftarrow  {a+b+c+d} \quad \overrightarrow  {a+b+c+d} $ \blank
$\underleftarrow {a+b+c+d} \quad \underrightarrow {a+b+c+d} $ \blank

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

[NTG-context] Replace dashed lines with a solid line

2018-12-01 Thread Fabrice Couvreur
Hello,
I would like to replace the dashed lines with a solid line much like with
the \hairline command
Thank you.
Fabrice

\definefiller[dots][left=\dontleavehmode,right=\hskip\zeropoint\par]

\starttext
\input knuth \dorecurse{5}{\filler[dots]}

\input knuth \dorecurse{5}{\hairline}
\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] Table, xtable and lua

2018-11-11 Thread Fabrice Couvreur
Hi Wolfgang and Henri,
Thank you so much.
What is the document that allows me to find more information about context
and lua ?
Fabrice

Le dim. 11 nov. 2018 à 09:57, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> a écrit :

>
>
> Henri Menke schrieb am 11.11.18 um 01:25:
> >
> > On 11/11/18 12:33 PM, Fabrice Couvreur wrote:
> >> Hi,
> >> I can not complete the first line of the table with the letters of the
> >> alphabet.
> >> Thank you.
> >> Fabrice
> >>
> >> \starttext
> >> \startlinecorrection[blank]
> >> \startmidaligned
> >> \startluacode
> >> context.startxtable({"align=middle, width=1.25cm"})
> >>  context.startxrow()
> >>  context.startxcell({"width=0.5cm"}) context("") context.stopxcell()
> >>  letter = {'A','B','C','D','E','F','G','H','I','J'}
> >>   for letter = 1,10 do
> >>   context.startxcell() context(print(letter))
> context.stopxcell()
> >>   end
> >  letters = {'A','B','C','D','E','F','G','H','I','J'}
> >  for _,letter in ipairs(letters) do
> >  context.startxcell() context(letter) context.stopxcell()
> >  end
>
> A few more alternatives (take a look at the number converter):
>
> \setupbodyfont[dejavu]
>
> \starttext
>
> \startluacode
>
> local letters = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" }
>
> for _, letter in ipairs(letters) do
>  context(letter)
> end
>
> context.par()
>
> for _, letter in next, letters do
>  context(letter)
> end
>
> context.par()
>
> for i=1,10 do
>  context(letters[i])
> end
>
> context.par()
>
> for i=1,10 do
>  context(converters.convert("A",i))
> end
>
> context.par()
>
> for i=1,10 do
>  context(converters.convert("A",i,"ru"))
> end
>
> \stopluacode
>
> \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
>
> ___
___
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] Table, xtable and lua

2018-11-10 Thread Fabrice Couvreur
Hi,
I can not complete the first line of the table with the letters of the
alphabet.
Thank you.
Fabrice

\starttext
\startlinecorrection[blank]
\startmidaligned
\startluacode
context.startxtable({"align=middle, width=1.25cm"})
context.startxrow()
context.startxcell({"width=0.5cm"}) context("") context.stopxcell()
letter = {'A','B','C','D','E','F','G','H','I','J'}
 for letter = 1,10 do
 context.startxcell() context(print(letter)) context.stopxcell()
 end
context.stopxrow()
context.startxrow({"background=color","backgroundcolor=gray"})

context.startxcell({"width=0.5cm","background=color","backgroundcolor=white"})
context("1") context.stopxcell()
context.startxcell({"width=2cm"}) context("Année") context.stopxcell()
 for y = 1998,2006 do
 context.startxcell() context(y) context.stopxcell()
 end
context.stopxrow()
context.startxrow()
context.startxcell({"width=0.5cm"}) context("2") context.stopxcell()

context.startxcell({"width=2cm","background=color","backgroundcolor=gray"})
context("Prix (kg)") context.stopxcell()
 local p = 1
 for y = 1,9 do
 context.startxcell() context("%0.3f",p) context.stopxcell()
 p = p*1.031
 end
context.stopxrow()
context.stopxtable()
\stopluacode
\stopmidaligned
\stoplinecorrection
\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] Strange behavior with the command \inframed{}

2018-10-23 Thread Fabrice Couvreur
Hi Aditya,
Sorry but with this file, there are some problems, especially with the last
item.
Thanks.
Fabrice

Le mar. 23 oct. 2018 à 09:46, Fabrice Couvreur 
a écrit :

> Hi Aditya,
> Thanks.
> Fabrice
>
> Le lun. 22 oct. 2018 à 12:45, Aditya Mahajan  a écrit :
>
>> On Mon, 22 Oct 2018, Fabrice Couvreur wrote:
>>
>> > Hi,
>> > When I use the \inframed{} command twice, they are not on the same
>> baseline.
>> > Thank you.
>> > Fabrice
>> >
>> > \starttext
>> Add \dontleavehmode
>> >\inframed{\m{I\times X=A^{-1}\times B}}  ; \inframed{\m{A^{-1}\times
>> A
>> > \times X=A^{-1}\times B}}
>> > \stoptext
>>
>> See
>>
>> https://wiki.contextgarden.net/Unexpected_behavior#Unsolicited_Vertical_Mode
>>
>> 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
>>
>> ___
>
>
 \definefloat
[recipe]
[figure]

  \setupfloat
[recipe]
[default={right,none}]

\define\ItemCommand
  {\hskip\zeropoint\relax\autoinsertnextspace}

  \setupitemgroup
[itemize]
[color=black,
 style=bold,
 distance=\zeropoint]

  \setupitemgroup
[itemize:1]
[option={n,packed,fit,intext},
command=\ItemCommand]

  \setupitemgroup
[itemize:2]
[lefttext=,
righttext=,
option={a,text}]
  
\starttext
  \placerecipe{}{
\startxtable[align={lohi,middle},bodyfont=9pt,offset=0.5ex]
  \startxrow
\startxcell[nx=5,frame=off,align={right}]
  Prénom : Marion
\stopxcell
  \stopxrow
  \startxrow
\startxcell
  \rotate[rotation=30,width=1.5cm]{\darkred Admise}
\stopxcell
\startxcell
  Anglais
\stopxcell
\startxcell
  Maths
\stopxcell
\startxcell[width=1.5cm]
  Culture générale
\stopxcell
\startxcell[width=2.25cm]
  Économie
\stopxcell
  \stopxrow
  \startxrow
\startxcell
  Note/20
\stopxcell
\startxcell
  12
\stopxcell
\startxcell
  14
\stopxcell
\startxcell
  8
\stopxcell
\startxcell
  11
\stopxcell
  \stopxrow
  \startxrow[frame=off]
\startxcell
  
\stopxcell
\startxcell
  
\stopxcell
\startxcell
  
\stopxcell
\startxcell
  
\stopxcell
\startxcell[frame=on]
  \bf Moyenne 11,8
\stopxcell
  \stopxrow
  \startxrow
\startxcell[nx=5,frame=off,align={right}]
  Prénom : Hichem
\stopxcell
  \stopxrow
  \startxrow
\startxcell
  \rotate[rotation=30,width=1.5cm]{\darkred Admis }
\stopxcell
\startxcell
  Anglais
\stopxcell
\startxcell
  Maths
\stopxcell
\startxcell
  Culture générale
\stopxcell
\startxcell[width=2cm]
  Économie
\stopxcell
  \stopxrow
  \startxrow
\startxcell
  Note/20
\stopxcell
\startxcell
  13
\stopxcell
\startxcell
  15
\stopxcell
\startxcell
  10
\stopxcell
\startxcell
  16
\stopxcell
  \stopxrow
  \startxrow[frame=off]
\startxcell
  
\stopxcell
\startxcell
  
\stopxcell
\startxcell
  
\stopxcell
\startxcell
  
\stopxcell
\startxcell[frame=on]
  \bf Moyenne 14,5
\stopxcell
  \stopxrow
  \startxrow
\startxcell[nx=5,frame=off,align={right}]
  Prénom : Lucas
\stopxcell
  \stopxrow
  \startxrow
\startxcell
  \rotate[rotation=30,width=1.5cm]{\darkred Refusé}
\stopxcell
\startxcell
  Anglais
\stopxcell
\startxcell
  Maths
\stopxcell
\startxcell
  Culture générale
\stopxcell
\startxcell[width=2cm]
  Économie
\stopxcell
  \stopxrow
  \startxrow
\startxcell
  Note/20
\stopxcell
\startxcell
  9
\stopxcell
\startxcell
  8
\stopxcell
   

Re: [NTG-context] Strange behavior with the command \inframed{}

2018-10-23 Thread Fabrice Couvreur
Hi Aditya,
Thanks.
Fabrice

Le lun. 22 oct. 2018 à 12:45, Aditya Mahajan  a écrit :

> On Mon, 22 Oct 2018, Fabrice Couvreur wrote:
>
> > Hi,
> > When I use the \inframed{} command twice, they are not on the same
> baseline.
> > Thank you.
> > Fabrice
> >
> > \starttext
> Add \dontleavehmode
> >\inframed{\m{I\times X=A^{-1}\times B}}  ; \inframed{\m{A^{-1}\times A
> > \times X=A^{-1}\times B}}
> > \stoptext
>
> See
>
> https://wiki.contextgarden.net/Unexpected_behavior#Unsolicited_Vertical_Mode
>
> 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
>
> ___
___
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] Strange behavior with the command \inframed{}

2018-10-22 Thread Fabrice Couvreur
Hi,
When I use the \inframed{} command twice, they are not on the same baseline.
Thank you.
Fabrice

\starttext
\inframed{\m{I\times X=A^{-1}\times B}}  ; \inframed{\m{A^{-1}\times A
\times X=A^{-1}\times B}}
\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
___

[NTG-context] Use \framedtext to write an algorithm (again)

2018-10-17 Thread Fabrice Couvreur
Hi Wolfgang,
You offered me the following code to write algorithms. It seems that this
does not function very well because the withdrawal of the text no longer
exists.
Thank you
Fabrice

\defineframedtext
   [algorithmframe]
   [width=fit,
background=color,
backgroundcolor=lightgray,
framecolor=darkred,
corner=round]

\definelines
   [algorithm]
   [space=on,
before=\startalgorithmframe,
after=\stopalgorithmframe]

\starttext

\startalgorithm
Variables \math{I} et \math{J} entiers
T tableau d'entiers
Début
Pour \math{I} allant de \math{1} à \math{3}
Pour \math{J} allant de \math{1} à \math{3}
  Si \math{J>I}
 Alors \math{T[I, J]=J-I}
 Sinon \math{T[I, J]=0}
  Fin Si
Fin Pour
Fin
\stopalgorithm

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

[NTG-context] Construct a matrice with Metafun and \MATRIX{}

2018-10-14 Thread Fabrice Couvreur
Hi,
I tried to use Metafun and \definemathmatrix [pmatrix] [matrix:
parentheses] [simplecommand = MATRIX] to create two matrices, but that does
not work.
Thank you.

http://image.noelshack.com/fichiers/2018/41/7/1539507927-matrice.jpg
___
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] Construct a matrix with Metafun

2018-10-14 Thread Fabrice Couvreur
Hi,
I tried to use Metafun and \definemathmatrix [pmatrix] [matrix:
parentheses] [simplecommand = MATRIX] to create two matrices, but that does
not work.
Thank you.
Fabrice

[image: matrice.jpg]
___
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] Text around a table (xtables)

2018-10-10 Thread Fabrice Couvreur
Hi Pablo,
Thank you, I thought that indicating width = 1.7cm, the size of the cells
would have been 1.7cm.
Fabrice

Le mer. 10 oct. 2018 à 19:46, Pablo Rodriguez  a écrit :

> On 10/10/18 7:26 PM, Fabrice Couvreur wrote:
> > Hello,
> > Why is the text wrapping around the board or far too far ?
>
> Hi Fabrice,
>
> replace the following command:
>
> \startxtable[align={middle,lohi}]
>
> It works now. It is rather weird that the total width for the table is
> 1.7cm and one of its cells is 3.5cm.
>
> I hope it helps,
>
> Pablo
>
>
> > Thank you.
> > Fabrice
> >
> > \definefloat
> > [recipe]
> > [figure]
> >
> >   \setupfloat
> > [recipe]
> > [default={right,none}]
> >
> >   \starttext
> > \placerecipe{}{%
> >   \startxtable[align={middle,lohi},width=1.7
> > cm]
> > \startxrow[background=color,backgroundcolor=gray]
> >   \startxcell[width=3.5cm,frame=off,align={middle,right},
> >   background=color,backgroundcolor=white]
> > Consommation pour la production de 1 UM
> > \hfill\startMPcode drawarrow
> > (0,0)--(0,0.35cm)--(0.35cm,0.35cm)withpen pencircle scaled 1bp;
> \stopMPcode
> >   \stopxcell
> >   \startxcell
> > Ind.
> >   \stopxcell
> >   \startxcell
> > Agri.
> >   \stopxcell
> > \stopxrow
> > \startxrow
> >   \startxcell[background=color,backgroundcolor=gray]
> > Ind.
> >   \stopxcell
> >   \startxcell
> > 0,5
> >   \stopxcell
> >   \startxcell
> > 0,2
> >   \stopxcell
> > \stopxrow
> > \startxrow
> >   \startxcell[background=color,backgroundcolor=gray]
> > Agri.
> >   \stopxcell
> >   \startxcell
> > 0,2
> >   \stopxcell
> >   \startxcell
> > 0,6
> >   \stopxcell
> > \stopxrow
> > \startxrow
> >   \startxcell[nx=3,frame=off,align={right}]
> >Lecture du tableau : pour la production d'un bien équivalent à 1
> > UM, l'industrie consomme l'équivalent de 0,5 UM de sa propre production
> > et l'équivalent de 0,2 UM de la production de l'agriculture.
> >   \stopxcell
> > \stopxrow
> >   \stopxtable
> > }
> > \dorecurse{10}{\input knuth}
> > \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
> >
> ___
> >
>
>
> --
> 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://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
___

[NTG-context] Text around a table (xtables)

2018-10-10 Thread Fabrice Couvreur
Hello,
Why is the text wrapping around the board or far too far ?
Thank you.
Fabrice

\definefloat
[recipe]
[figure]

  \setupfloat
[recipe]
[default={right,none}]

  \starttext
\placerecipe{}{%
  \startxtable[align={middle,lohi},width=1.7
cm]
\startxrow[background=color,backgroundcolor=gray]
  \startxcell[width=3.5cm,frame=off,align={middle,right},
  background=color,backgroundcolor=white]
Consommation pour la production de 1 UM
\hfill\startMPcode drawarrow
(0,0)--(0,0.35cm)--(0.35cm,0.35cm)withpen pencircle scaled 1bp; \stopMPcode
  \stopxcell
  \startxcell
Ind.
  \stopxcell
  \startxcell
Agri.
  \stopxcell
\stopxrow
\startxrow
  \startxcell[background=color,backgroundcolor=gray]
Ind.
  \stopxcell
  \startxcell
0,5
  \stopxcell
  \startxcell
0,2
  \stopxcell
\stopxrow
\startxrow
  \startxcell[background=color,backgroundcolor=gray]
Agri.
  \stopxcell
  \startxcell
0,2
  \stopxcell
  \startxcell
0,6
  \stopxcell
\stopxrow
\startxrow
  \startxcell[nx=3,frame=off,align={right}]
   Lecture du tableau : pour la production d'un bien équivalent à 1 UM,
l'industrie consomme l'équivalent de 0,5 UM de sa propre production et
l'équivalent de 0,2 UM de la production de l'agriculture.
  \stopxcell
\stopxrow
  \stopxtable
}
\dorecurse{10}{\input knuth}
\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] xtables with lua

2018-10-01 Thread Fabrice Couvreur
Hi,
Thank you Aditya for the link. I knew that with natural tables, but I hoped
it could be done with xtables too.
Fabrice

Le lun. 1 oct. 2018 à 05:50, Aditya Mahajan  a écrit :

> On Mon, 1 Oct 2018, Jeong Dal wrote:
>
> > What do you mean “does not typeset correctly as expected”?
>
> As I said, I fixed the post.
>
> > I copied and tested the last example and got the result without error.
> > One problem is that the vertical alignment is not centered as the
> example of Aditya’s.
> > Would you please tell me what I miss?
>
> The part in the beginning of the post:
>
> \setupTABLE[each][each][width=2em,height=2em,align={middle,middle}]
> \setupTABLE[r][1][background=color,backgroundcolor=gray]
> \setupTABLE[c][1][background=color,backgroundcolor=gray]
>
>
> 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
>
> ___
___
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] xtables with lua

2018-09-30 Thread Fabrice Couvreur
Hi,
Is it possible to fill columns A, B and C using a loop with lua ?
Thank you.
Fabrice

\starttext
  \startxtable[align={lohi,middle},bodyfont=8pt,width=0.8cm]
   \startxrow
 \startxcell

 \stopxcell
 \startxcell
   A
 \stopxcell
 \startxcell
   B
 \stopxcell
 \startxcell
   C
 \stopxcell
   \stopxrow
   \startxrow
 \startxcell
   1
 \stopxcell
 \startxcell
   \m{x}
 \stopxcell
 \startxcell
   \m{N}
 \stopxcell
 \startxcell
   \m{B}
 \stopxcell
   \stopxrow
   \startxrow
 \startxcell
   2
 \stopxcell
 \startxcell
   1
 \stopxcell
 \startxcell
   7
 \stopxcell
 \startxcell
   20
 \stopxcell
   \stopxrow
   \startxrow
 \startxcell
   3
 \stopxcell
 \startxcell
   2
 \stopxcell
 \startxcell
   14
 \stopxcell
 \startxcell
   24
 \stopxcell
   \stopxrow
   \startxrow
 \startxcell
   4
 \stopxcell
 \startxcell
   3
 \stopxcell
 \startxcell
   21
 \stopxcell
 \startxcell
   28
 \stopxcell
   \stopxrow
   \startxrow
 \startxcell
   5
 \stopxcell
 \startxcell
   4
 \stopxcell
 \startxcell
   28
 \stopxcell
 \startxcell
   32
 \stopxcell
   \stopxrow
   \startxrow
 \startxcell
   6
 \stopxcell
 \startxcell
   5
 \stopxcell
 \startxcell
   35
 \stopxcell
 \startxcell
   36
 \stopxcell
   \stopxrow
   \startxrow
 \startxcell
   7
 \stopxcell
 \startxcell
   6
 \stopxcell
 \startxcell
   42
 \stopxcell
 \startxcell
   40
 \stopxcell
   \stopxrow
   \startxrow
 \startxcell
   8
 \stopxcell
 \startxcell
   7
 \stopxcell
 \startxcell
   49
 \stopxcell
 \startxcell
   44
 \stopxcell
   \stopxrow
   \startxrow
 \startxcell
   9
 \stopxcell
 \startxcell
   8
 \stopxcell
 \startxcell
   56
 \stopxcell
 \startxcell
   48
 \stopxcell
   \stopxrow
   \startxrow
 \startxcell
   10
 \stopxcell
 \startxcell
   9
 \stopxcell
 \startxcell
   63
 \stopxcell
 \startxcell
   52
 \stopxcell
   \stopxrow
   \startxrow
 \startxcell
   11
 \stopxcell
 \startxcell
   10
 \stopxcell
 \startxcell
   70
 \stopxcell
 \startxcell
   56
 \stopxcell
   \stopxrow
   \startxrow
 \startxcell
   12
 \stopxcell
 \startxcell
   11
 \stopxcell
 \startxcell
   77
 \stopxcell
 \startxcell
   60
 \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] Notation of an arc

2018-09-27 Thread Fabrice Couvreur
I just tested both solutions and that of Alan does not work as expected.

\useMPlibrary[mat]

\definemathstackers
  [mp]
  [alternative=mp]

\definemathextensible [mp] [overparent] ["FE3DC]

\starttext
\m{\overparent{ AB}}
\stoptext



Le jeu. 27 sept. 2018 à 21:47, Fabrice Couvreur 
a écrit :

> Hi Henri and Alan,
> Thank you for your answers.
> Fabrice
>
> Le mer. 26 sept. 2018 à 23:52, Alan Braslau  a
> écrit :
>
>> On Thu, 27 Sep 2018 09:22:00 +1200
>> Henri Menke  wrote:
>>
>> > On 27/09/18 09:15, Fabrice Couvreur wrote:
>> > > Hello,
>> > > How to improve the notation of an arc ?
>> > > Thank you
>> > > Fabrice
>> > >
>> >
>> > Use the correct math fence
>> >
>> > \starttext
>> > \m{\overparent{\rm AB}}
>> > \stoptext
>> >
>> > > \starttext
>> > >  \m{\overset{\frown}{\rm AB}}
>> > > \stoptext
>>
>> And, if you prefer, you can use MetaPost (rather than the font
>> extensible):
>>
>> \useMPlibrary[mat]
>>
>> \definemathstackers
>>   [mp]
>>   [alternative=mp]
>>
>> \definemathextensible [mp] [overparent] ["FE3DC]
>>
>>
>> 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
>>
>> ___
>
>
___
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] Notation of an arc

2018-09-27 Thread Fabrice Couvreur
Hi Henri and Alan,
Thank you for your answers.
Fabrice

Le mer. 26 sept. 2018 à 23:52, Alan Braslau  a
écrit :

> On Thu, 27 Sep 2018 09:22:00 +1200
> Henri Menke  wrote:
>
> > On 27/09/18 09:15, Fabrice Couvreur wrote:
> > > Hello,
> > > How to improve the notation of an arc ?
> > > Thank you
> > > Fabrice
> > >
> >
> > Use the correct math fence
> >
> > \starttext
> > \m{\overparent{\rm AB}}
> > \stoptext
> >
> > > \starttext
> > >  \m{\overset{\frown}{\rm AB}}
> > > \stoptext
>
> And, if you prefer, you can use MetaPost (rather than the font extensible):
>
> \useMPlibrary[mat]
>
> \definemathstackers
>   [mp]
>   [alternative=mp]
>
> \definemathextensible [mp] [overparent] ["FE3DC]
>
>
> 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
>
> ___
___
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] Notation of an arc

2018-09-26 Thread Fabrice Couvreur
Hello,
How to improve the notation of an arc ?
Thank you
Fabrice

\starttext
 \m{\overset{\frown}{\rm AB}}
\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] Adjust the dimensions of a sub-table in an extreme table ?

2018-08-31 Thread Fabrice Couvreur
Hi Pablo,
Thank you for the solution.
Fabrice

Le jeu. 30 août 2018 à 22:49, Pablo Rodriguez  a écrit :

> On 08/30/2018 10:16 PM, Fabrice Couvreur wrote:
> > Hello,
> > In the main table there are three sub-tables. How to adapt the
> > dimensions of the second and third sub-tables to that of the first
> > sub-table ?
>
> Hi Fabrice,
>
> I guess that \startxtable[option=stretch] is what you might need for
> your second and third nested tables.
>
> I hope it helps,
>
> 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://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
___

[NTG-context] Draw an ink imprint with Metafun

2018-08-30 Thread Fabrice Couvreur
Hello,
The idea is to reproduce the ink mark of the figure below with Metafun
[image: IMG_0691.jpg]
Thank you
Fabrice
___
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] Adjust the dimensions of a sub-table in an extreme table ?

2018-08-30 Thread Fabrice Couvreur
Hello,
In the main table there are three sub-tables. How to adapt the dimensions
of the second and third sub-tables to that of the first sub-table ?
Thank you
Fabrice


\unexpanded\def\euros#1{#1\,€}

\setuplayout
  [height=middle,
   width=middle,
   backspace=2cm,
   topspace=10mm,
   bottomspace=10mm,
   header=10mm,
   footer=10mm,
   footerdistance=10mm,
   headerdistance=10mm]

\starttext
\startxtable
\startxrow
  \startxcell[width=0.6\textwidth]

  \stopxcell
  \startxcell[width=0.4\textwidth]
{\darkred Document 2 :} {\bf Ticket de caisse taché du 29/08/2015.}
\startxtable[align={lohi,middle}]
  \startxrow
\startxcell
  {\bf Qté}
\stopxcell
\startxcell
  {\bf Article}
\stopxcell
\startxcell
  {\bf Prix H.T (\euros{})}
\stopxcell
  \stopxrow
  \startxrow
\startxcell
  10
\stopxcell
\startxcell
  Bouteille eau minérale 33 cl
\stopxcell
\startxcell

\stopxcell
  \stopxrow
  \startxrow
\startxcell
  2
\stopxcell
\startxcell
  Sandwich (consommation sur place)
\stopxcell
\startxcell

\stopxcell
  \stopxrow
  \startxrow
\startxcell
  1
\stopxcell
\startxcell
  Tee-shirt
\stopxcell
\startxcell

\stopxcell
  \stopxrow
  \startxrow
\startxcell

\stopxcell
\startxcell[align=left]
  Total H.T.
\stopxcell
\startxcell
  {\bf 24,8}
\stopxcell
  \stopxrow
\stopxtable
\startxtable[align={lohi,middle}]
  \startxrow
\startxcell
  {\bf T.V.A}
\stopxcell
\startxcell

\stopxcell
\startxcell
  {\bf Taxe(\euros{})  }
\stopxcell
  \stopxrow
  \startxrow
\startxcell
  5,5\,\%
\stopxcell
\startxcell

\stopxcell
\startxcell

\stopxcell
  \stopxrow
  \startxrow
\startxcell
 10\,\%
\stopxcell
\startxcell

\stopxcell
\startxcell

\stopxcell
  \stopxrow
  \startxrow
\startxcell
  20\,\%
\stopxcell
\startxcell[align=left]
  Total T.V.A.
\stopxcell
\startxcell
  {\bf 2,8}
\stopxcell
  \stopxrow
\stopxtable
\startxtable[align={lohi,middle}]
  \startxrow
\startxcell
  {\bf Total}
\stopxcell
\startxcell

\stopxcell
\startxcell
  {\bf Prix T.T.C. (\euros{})}
\stopxcell
  \stopxrow
  \startxrow
\startxcell

\stopxcell
\startxcell[align=left]
  13 articles
\stopxcell
\startxcell
  {\bf 28,5}
\stopxcell
  \stopxrow
\stopxtable
  \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] Emacs + latest beta

2018-08-30 Thread Fabrice Couvreur
Hello Vladimir,

I suppose this is from within Emacs.
>

 File compiled with Emacs
.


I assumed that you installed auctex package, like
>
>   $ sudo pacman -S auctex
>
> and do
>
>   (load "auctex")
>

No with MELPA.


P.S. Why you install auctex as MELPA and don't use Archlinux package ?
>

I do not know !
What is the difference between both ?
If it's better to do it with Arch Linux, I do it !

Is it necessary to add this at the end of each file  ?


%%% Local Variables:
%%% mode: context
%%% TeX-master: t
%%% End:

Thanks,
Fabrice


Le mer. 29 août 2018 à 16:12, Vladimir Lomov  a écrit :

> Hello,
> ** Fabrice Couvreur [2018-08-29 12:01:46 +0200]:
>
> > Hello,
> > Here is the content of my file ~/.profile :
> >
> > export PATH=$HOME/context/tex/texmf-linux-64/bin:$PATH
> > export PATH=$HOME/texlive/2018/bin/x86_64-linux:$PATH
> > export PATH=$HOME/bin:$PATH
> >
> >> $ command -v context
> >
> >  [aragorn@fab ~]$  command -v context
> > /home/aragorn/texlive/2018/bin/x86_64-linux/context
> > [aragorn@fab ~]$
>
> And this means that when you run 'context' in shell (terminal) the
> context from TeX Live will be used. Note the above 'export' commands.
> The first prepend the path to ConTeXt Standalone binaries, the next on
> prepends TeX Live binaries, so TeX Live binaries will be used if you run
> 'context' in terminal/shell.
>
> > I then tested the vladimir.tex file
> >
> > \setupsynctex[state=start]
> >
> > \startusableMPgraphic{NumberHead}
> >   draw outlinetext.f
> >   ("\bf\namedheadnumber{chapter}")
> >   (withcolor "blue")
> >   ysized 50pt ;
> > \stopusableMPgraphic
> >
> > \unexpanded\def\processMPheadnumber#1%
> >   {\useMPgraphic{NumberHead}}
> >
> > \setuphead%
> > [chapter]%
> > [command=\HeadTitle,%
> >  headstyle=\ss,%
> >  numbercommand=\processMPheadnumber]
> >
> > \unexpanded\def\HeadTitle#1#2%
> > {\framed%
> >   [frame=off,%
> > bottomframe=on,%
> > width=broad,
> > align={broad,nothyphenated,left}]%
> > {#1\blank[nowhite]#2}}
> >
> > \starttext
> > \startchapter[title=First chapter]
> >   \input ward
> > \stopchapter
> > \stoptext
> > ~/
> >
> > % Local Variables:
> > % mode: context
> > % TeX-master: t
> > % End:
> >
> > Here is the output vladimir output
>
> I suppose this is from within Emacs.
>
> >
> > Running `ConTeXt' on `vladimir' with
> > ``PATH=/home/aragorn/context/tex/texmf-linux-64/bin:$PATH context
> > --purgeall vladimir''
> > resolvers   | trees | analyzing 'home:texmf'
> > mtx-context | warning: no (local) file './vladimir', proceeding
> > mtx-context | run 1: luatex
> >
> --fmt="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en"
> > --jobname="vladimir"
> >
> --lua="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui"
> > --no-parse-first-line --c:currentrun=1 --c:fulljobname="./vladimir"
> > --c:input="./vladimir" --c:kindofrun=1 --c:maxnofruns=9 --c:purgeall
> > "cont-yes.mkiv"
> >
> > This is LuaTeX, Version 1.08.0 (TeX Live 2018)
> >  system commands enabled.
> >
> > resolvers   > trees > analyzing 'home:texmf'
> > open source > level 1, order 1, name
> >
> '/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
> > system  >
> > system  > ConTeXt  ver: 2018.08.25 10:04 MKIV beta  fmt:
> 2018.8.25
> > int: english/english
> > system  >
> > system  > 'cont-new.mkiv' loaded
> > open source > level 2, order 2, name
> >
> '/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
> > system  > beware: some patches loaded from cont-new.mkiv
> > close source> level 2, order 2, name
> >
> '/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
> > system  > files > jobname 'vladimir', input './vladimir', result
> > 'vladimir'
> > fonts   > latin modern fonts are not preloaded
> > languages   > language 'en' is active
> > open source > level 2, order 3, name '/home/aragorn/vladimir.tex'
> > system  > synctex functionality is enabled, expect 5-10 pct
> runtime
> > overhead!
> > fonts   > preloading lat

Re: [NTG-context] Question on enabling/disabling modes

2018-08-30 Thread Fabrice Couvreur
Hello Mikael,
I read the documentation that I think I partly understood; I was really off
topic.
Fabrice

Le mar. 28 août 2018 à 12:58, Mikael P. Sundqvist  a
écrit :

> On Tue, Aug 28, 2018 at 11:59 AM Fabrice Couvreur <
> fabrice1.couvr...@gmail.com> wrote:
>
>> Hi Mikael,
>> I suppose the files test1 and test2 have a special structure ?
>>
>> %%% file.tex
>> \doifnotmode{test1}{\enablemode[test1,test2]}
>> \starttext
>> \startmode[test1,all]
>> We are in mode test1.
>> \stopmode
>> \startmode[test2,all]
>> We are in mode test2.
>> \stopmode
>> \stoptext
>> %%%
>>
>> %%% test1.tex
>> 
>> %%%
>>
>> %%% test2.tex
>> ???
>> %%%
>>
>> Fabrice
>>
>> Le mar. 28 août 2018 à 11:05, Mikael P. Sundqvist  a
>> écrit :
>>
>>> On Tue, Aug 28, 2018 at 10:54 AM Fabrice Couvreur <
>>> fabrice1.couvr...@gmail.com> wrote:
>>>
>>>> Hi Mikael,
>>>> I do not know this way yet. Can you attach a complete example ?
>>>> Regards,
>>>> Fabrice
>>>>
>>>> Le lun. 27 août 2018 à 20:47, Henning Hraban Ramm  a
>>>> écrit :
>>>>
>>>>> Am 2018-08-27 um 16:37 schrieb Mikael P. Sundqvist :
>>>>>
>>>>> > > On 27 Aug 2018, at 14:14, Mikael P. Sundqvist 
>>>>> wrote:
>>>>> > >
>>>>> > > Hi!
>>>>> > >
>>>>> > > I am writing notes for my teaching and would like to do the
>>>>> following with modes:
>>>>> > >
>>>>> > > * If the file is compiled with context file.tex then everything
>>>>> (i.e. the content in all modes) is typeset.
>>>>> > > * If the file is compiled with context --mode=test1 file.tex then
>>>>> only mode test1 is typeset.
>>>>> > >
>>>>> > > I do not see how to do this easily.
>>>>> >
>>>>> >
>>>>> > This is what I would do if the list of modes is small:
>>>>> >
>>>>> > \doifnotmode{test1}{\enablemode[test1,test2]}
>>>>> >
>>>>> > (and don’t use the \definemode lines)
>>>>> >
>>>>> > But if you need many of them, that could get problematic with
>>>>> > many nested \doifmodeelse statements.
>>>>> >
>>>>> > In that case, I would use a separate ‘all’ mode, and call the
>>>>> > context script with that as argument in the generic case.
>>>>> >
>>>>> >
>>>>> > %%% file.tex
>>>>> > \starttext
>>>>> > \startmode[test1,all]
>>>>> > We are in mode test1.
>>>>> > \stopmode
>>>>> > \startmode[test2,all]
>>>>> > We are in mode test2.
>>>>> > \stopmode
>>>>> > \stoptext
>>>>> > %%%
>>>>> >
>>>>> >
>>>>> ___
>>>>> >
>>>>> > Thank you, Taco!
>>>>> >
>>>>> > I have around 25 of them, and your solution with "all" works indeed
>>>>> well for me.
>>>>>
>>>>>
>>>>> There’s also
>>>>>
>>>>> \startnotmode[some]
>>>>> This is not typeset in "some" mode.
>>>>> \stopnotmode
>>>>>
>>>>>
>>>>> Greetlings, Hraban
>>>>> ---
>>>>> https://www.fiee.net
>>>>> http://wiki.contextgarden.net
>>>>> https://www.dreiviertelhaus.de
>>>>> GPG Key ID 1C9B22FD
>>>>>
>>>>>
>>>>> ___
>>>>> 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] Emacs + latest beta

2018-08-29 Thread Fabrice Couvreur
xt: maxstack: 1328, freed: 5, unreachable:
1323
mkiv lua stats  > cleaned up reserved nodes: 58 nodes, 9 lists of 455
mkiv lua stats  > node memory usage: 2 glue, 2 kern, 2 penalty, 14
attribute, 50 glue_spec, 4 attribute_list, 2 temp, 2 user_defined
mkiv lua stats  > node list callback tasks: 8 unique task lists, 6
instances (re)created, 55 calls
mkiv lua stats  > synctex tracing: 2 referenced files, 5 files ignored, 3
objects flushed, logfile: vladimir.synctex
mkiv lua stats  > used backend: pdf (backend for directly generating pdf
output)
mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.000 seconds loading
mkiv lua stats  > callbacks: internal: 177, file: 180, direct: 2, late: 2,
function 534, total: 895
mkiv lua stats  > randomizer: resumed with value 0.55005725985393
mkiv lua stats  > loaded patterns: en::2, load time: 0.000
mkiv lua stats  > result saved in file: vladimir.pdf, compresslevel 3,
objectcompresslevel 3
mkiv lua stats  > loaded fonts: 4 files: latinmodern-math.otf,
lmroman10-bold.otf, lmroman10-regular.otf, lmroman12-regular.otf
mkiv lua stats  > font engine: otf 3.104, afm 1.513, tfm 1.000, 9
instances, 3 shared in backend, 3 common vectors, 0 common hashes, load
time 0.221 seconds
mkiv lua stats  > metapost: 0.001 seconds, loading: 0.018, execution:
0.001, n: 1, average: 0.019, instances: 1, luacalls: 8, memory: 2.635 M
mkiv lua stats  > used platform: linux-64, type: unix, binary subtree:
texmf-linux-64
mkiv lua stats  > used engine: luatex version 1.08 with functionality level
6731, banner: this is luatex, version 1.08.0 (tex live 2018)
mkiv lua stats  > control sequences: 46536 of 65536 + 10
mkiv lua stats  > lua properties: engine: lua 5.3, used memory: 86 MB (ctx:
85 MB), hash type: lua, hash chars: min(64,40), symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 0.536 seconds, 1 processed pages, 1 shipped
pages, 1.866 pages/second
mtx-context | purged files: vladimir.log, vladimir.tuc
system  | total runtime: 2.525 seconds


TeX Output finished at Wed Aug 29 11:54:03

Could you show in full your ~/.emacs file? Do you use AUCTeX or bare
> Emacs
> ?
>

I use AUCTEX but I d not know bare Emacs

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(ConTeXt-Mark-version "IV")
 '(ConTeXt-engine "luatex")
 '(TeX-command-extra-options "-shell-escape")
 '(ansi-color-faces-vector
   [default default default italic underline success warning error])
 '(ansi-color-names-vector
   ["#242424" "#e5786d" "#95e454" "#cae682" "#8ac6f2" "#66" "#ccaa8f"
"#f6f3e8"])
 '(custom-enabled-themes (quote (leuven)))
 '(package-selected-packages
   (quote
(yasnippet-snippets auto-complete-auctex context-coloring nova-theme
auctex)))
 '(tab-width 4))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )

;; SERVER Download (MELPA):

(when (>= emacs-major-version 24)
  (require 'package)
  (add-to-list
   'package-archives
   '("melpa" . "http://melpa.org/packages/;)
   t))


(eval-after-load "context"
  '(setq TeX-command-list
   (cons '("ConTeXt"
"PATH=/home/aragorn/context/tex/texmf-linux-64/bin:$PATH context --purgeall
%s"
 TeX-run-command nil t :help "Run context (MarkIV)")
TeX-command-list))
)


;;(add-hook 'ConTeXt-mode-hook
  ;;(lambda()
  ;;  (setq TeX-command-default "ConTeXt Full")))

(setq-default cursor-type 'bar)

(set-cursor-color "#ff")


(setq TeX-view-program-list '(("Evince" "evince %o"))
  TeX-view-program-selection '((output-pdf "Evince")))

(setq make-backup-files nil) ; stop creating backup~ files
(setq auto-save-default nil) ; stop creating #autosave# files

;; auto close bracket insertion. New in emacs 24
(electric-pair-mode 1)

;; turn on highlight matching brackets when cursor is on one
(show-paren-mode 1)


(setq inhibit-startup-screen t)


(add-to-list 'load-path "/home/aragorn/texlive/2018/texmf-dist/asymptote")
(autoload 'asy-mode "asy-mode.el" "Asymptote major mode." t)
(autoload 'lasy-mode "asy-mode.el" "hybrid Asymptote/Latex major mode." t)
(autoload 'asy-insinuate-latex "asy-mode.el" "Asymptote insinuate LaTeX." t)
(add-to-list 'auto-mode-alist '("\\.asy$" . asy-mode))

(setq column-number-mode t)

(setq line-number-mode t)


(setq py-install-directory "~/.emacs.d/site-lisp/python-mode

Re: [NTG-context] Emacs + latest beta

2018-08-29 Thread Fabrice Couvreur
Hello,
Before considering modifications, here's what I get when I do which context
:

Setting "/home/aragorn/context/tex" as ConTeXt root.
[aragorn@fab ~]$ which context
/home/aragorn/context/tex/texmf-linux-64/bin/context
[aragorn@fab ~]$

$ pacman -Qs texlive
>

 [root@fab aragorn]# pacman -Qs texlive
[root@fab aragorn]#

$ pacman -Qs emacs
>

 [root@fab aragorn]# pacman -Qs emacs
local/emacs 26.1-2
The extensible, customizable, self-documenting real-time display editor
local/emacs-python-mode 6.2.3-1
Python mode for Emacs
[root@fab aragorn]#

you mentioned that commands run in terminal worked fine, but you
>   invoked them by full path;
>


To be able to test with the
texlive context binary and context standalone context binary
.


The next in the next message after restarting my PC ...

Fabrice


Le mer. 29 août 2018 à 04:58, Vladimir Lomov  a écrit :

> Hello,
> ** Fabrice Couvreur [2018-08-28 11:18:58 +0200]:
>
> > Hi Vladimir,
>
> > I do not use Arch Linux repositories to install  texlive 2018 packages
>
> Some texlive-* packages could be installed as dependencies of other
> packages. You may check if your system has any texlive package:
>
>   $ pacman -Qs texlive
>
> > but I installed texlive 2018 "scheme-full" with tlmgr -gui  in
> > /home/aragorn /texlive/2018.  I then make regular updates in the same
> > way. No texlive traces in the \usr\share\ directory or elsewhere.
>
> I prefer to rely on package manager.
>
> > Standalone Context is also installed in my home directory. However,
> > Emacs is installed from the Arch Linux repositories and is located in
> > /usr/share/emacs.
>
>   $ pacman -Qs emacs
>
> > So I have to add the path of texlive 2018 ?
> > Maybe you do not need to add the Context Standalone path ?
> > My ~/.profile file would be this :
> >
> > source /home/aragorn/context/tex/setuptex
> > export PATH = $ PATH: /home/aragorn/texlive/2018/bin/x86_64-linux
> > export PATH = $ PATH: /home/aragorn /bin
>
> This part is a bit strange:
> - in message
>   https://mailman.ntg.nl/pipermail/ntg-context/2018/092418.html
>   you mentioned that commands run in terminal worked fine, but you
>   invoked them by full path;
>
> - in the same message you set PATH in emacs as
>
> (setenv "PATH" "/home/aragorn/context/tex/texmf-linux-64/bin/:$PATH" t)
>
>   (I have to admit that I didn't know it is possible to use '$PATH' in
>   setenv), so it prepends path to context binary to PATH list. The above
>   lines do opposite: they append path to context binary to the end of
>   PATH list.
>
>   The first line, 'source ...', helps here because 'setuptex' in turns
>   prepend path to context binary to PATH.
>
> When you invoke 'context' in terminal (I assume it is bash shell) the
> shell searches program in current directory (depends on configuration)
> and then in PATH, the first wins. So to use context from ConTeXt
> standalone you may simply do
>
>   $ export PATH=$HOME/context/tex/texmf-linux-64/bin:$PATH
>
> either in terminal or in ~/.profile. You may always check if this is
> true by runnig
>
>   $ command -v context
>
> (for bash shell) or
>
>   $ which context
>
> Returning to your problem. I looked closely again in messages with
> output from context and I don't understand what may cause the error.
> Seems that Emacs uses correct context (according to loading files).
> Could you show in full your ~/.emacs file? Do you use AUCTeX or bare
> Emacs?
>
> > Regards,
> > Fabrice
> >
>
> [...]
>
> ---
> WBR, Vladimir Lomov
>
>
> --
> Uncontrolled power will turn even saints into savages.  And we can all
> be counted on to live down to our lowest impulses.
> -- Parmen, "Plato's Stepchildren", stardate 5784.3
>
> ___
> 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] Question on enabling/disabling modes

2018-08-28 Thread Fabrice Couvreur
Hi Mikael,
I suppose the files test1 and test2 have a special structure ?

%%% file.tex
\doifnotmode{test1}{\enablemode[test1,test2]}
\starttext
\startmode[test1,all]
We are in mode test1.
\stopmode
\startmode[test2,all]
We are in mode test2.
\stopmode
\stoptext
%%%

%%% test1.tex

%%%

%%% test2.tex
???
%%%

Fabrice

Le mar. 28 août 2018 à 11:05, Mikael P. Sundqvist  a
écrit :

> On Tue, Aug 28, 2018 at 10:54 AM Fabrice Couvreur <
> fabrice1.couvr...@gmail.com> wrote:
>
>> Hi Mikael,
>> I do not know this way yet. Can you attach a complete example ?
>> Regards,
>> Fabrice
>>
>> Le lun. 27 août 2018 à 20:47, Henning Hraban Ramm  a
>> écrit :
>>
>>> Am 2018-08-27 um 16:37 schrieb Mikael P. Sundqvist :
>>>
>>> > > On 27 Aug 2018, at 14:14, Mikael P. Sundqvist 
>>> wrote:
>>> > >
>>> > > Hi!
>>> > >
>>> > > I am writing notes for my teaching and would like to do the
>>> following with modes:
>>> > >
>>> > > * If the file is compiled with context file.tex then everything
>>> (i.e. the content in all modes) is typeset.
>>> > > * If the file is compiled with context --mode=test1 file.tex then
>>> only mode test1 is typeset.
>>> > >
>>> > > I do not see how to do this easily.
>>> >
>>> >
>>> > This is what I would do if the list of modes is small:
>>> >
>>> > \doifnotmode{test1}{\enablemode[test1,test2]}
>>> >
>>> > (and don’t use the \definemode lines)
>>> >
>>> > But if you need many of them, that could get problematic with
>>> > many nested \doifmodeelse statements.
>>> >
>>> > In that case, I would use a separate ‘all’ mode, and call the
>>> > context script with that as argument in the generic case.
>>> >
>>> >
>>> > %%% file.tex
>>> > \starttext
>>> > \startmode[test1,all]
>>> > We are in mode test1.
>>> > \stopmode
>>> > \startmode[test2,all]
>>> > We are in mode test2.
>>> > \stopmode
>>> > \stoptext
>>> > %%%
>>> >
>>> >
>>> ___
>>> >
>>> > Thank you, Taco!
>>> >
>>> > I have around 25 of them, and your solution with "all" works indeed
>>> well for me.
>>>
>>>
>>> There’s also
>>>
>>> \startnotmode[some]
>>> This is not typeset in "some" mode.
>>> \stopnotmode
>>>
>>>
>>> Greetlings, Hraban
>>> ---
>>> https://www.fiee.net
>>> http://wiki.contextgarden.net
>>> https://www.dreiviertelhaus.de
>>> GPG Key ID 1C9B22FD
>>>
>>>
>>> ___
>>> 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
>>
>> ___
>
>
> Fabrice,
>
> Taco's example is complete. Try
>
> context file.tex
> context --mode=test1 file.tex
> context --mode=all file.tex
>
> and you will get, in turn, nothing, the content in mode test1, everything.
>
> /Mikael
>
> ___
> 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] Emacs + latest beta

2018-08-28 Thread Fabrice Couvreur
Hi Vladimir,
I do not use Arch Linux repositories to install  texlive 2018 packages but
I installed texlive 2018 "scheme-full" with tlmgr -gui  in /home/aragorn
/texlive/2018.  I then make regular updates in the same way. No texlive
traces in the \usr\share\ directory or elsewhere. Standalone Context is
also installed in my home directory. However, Emacs is installed from the
Arch Linux repositories and is located in /usr/share/emacs.
So I have to add the path of texlive 2018 ?
Maybe you do not need to add the Context Standalone path ?
My ~/.profile file would be this :

source /home/aragorn/context/tex/setuptex
export PATH = $ PATH: /home/aragorn/texlive/2018/bin/x86_64-linux
export PATH = $ PATH: /home/aragorn /bin

Regards,
Fabrice

Le mar. 28 août 2018 à 07:57, Vladimir Lomov  a écrit :

> Hello,
> ** Fabrice Couvreur [2018-08-27 15:47:41 +0200]:
>
> > Le lun. 27 août 2018 à 11:51, Fabrice Couvreur <
> fabrice1.couvr...@gmail.com>
> > a écrit :
> >
> >> Hi Vladimir,
> >> I just made a new standalone context install and added this to my
> >> ~/.profile :  source /home/aragorn/context/tex/setuptex
> >> It finally seems to work !
>
> I'm glad it works for you though
>
> >> export PATH=$PATH:/home/aragorn/context/tex/texmf-linux-64/bin
> >> source /home/aragorn/context/tex/setuptex
> >> export PATH=$PATH:/home/aragorn/texlive/2018/bin/x86_64-linux
> >> export PATH=$PATH:/home/aragorn/bin
>
> don't understand how these lines help you. As you said you were able to
> typeset a sample document in terminal, so all settings in terminal (bash
> I presume) were fine, especially taking into account that 'setuptex'
> exports only PATH variable with correct path for Standalone ConTeXt.
> They might change environment from which Emacs is launched but again,
> you use full path to run context so they must be irrelevant here.
>
> In one of previous messages
> (https://www.mail-archive.com/ntg-context@ntg.nl/msg88742.html) you told
> that you use Archlinux, did you install texlive-* packages? Did you
> update your system? I use Archlinux and have not only ConTeXt
> standalone/suite and TeX Live (TUG) installed but also I have installed
> texlive-* packages from distribution repository and don't have any
> problem with the example either in terminal or Emacs(+AUCTeX), I suspect
> that your Emacs configuration might be the cause of the problem.
>
> > Hi Vladimir,
> > I just realized that does not work anymore
> > !
> >
> > (setq ConTeXt-mode-hook
> >   (lambda () (setq TeX-command-extra-options "--purgeall")))
>
> Why you insist on using hooks when you specify in full the custom
> target? Just add this option to the custom target:
>
> (eval-after-load "context"
>   '(setq TeX-command-list
>(cons '("ConTeXt"
> "PATH=/usr/local/opt/context/tex/texmf-linux-64/bin:$PATH context
> --purgeall %s"
>  TeX-run-command nil t :help "Run context (MarkIV)")
> TeX-command-list))
> )
>
> > Thanks
> > Fabrice
>
> [...]
>
> ---
> WBR, Vladimir Lomov
>
> --
> It is necessary for the welfare of society that genius should be privileged
> to utter sedition, to blaspheme, to outrage good taste, to corrupt the
> youthful mind, and generally to scandalize one's uncles.
> -- George Bernard Shaw
>
> ___
> 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
>
> ___


.emacs
Description: Binary data
___
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] Question on enabling/disabling modes

2018-08-28 Thread Fabrice Couvreur
Hi Mikael,
I do not know this way yet. Can you attach a complete example ?
Regards,
Fabrice

Le lun. 27 août 2018 à 20:47, Henning Hraban Ramm  a écrit :

> Am 2018-08-27 um 16:37 schrieb Mikael P. Sundqvist :
>
> > > On 27 Aug 2018, at 14:14, Mikael P. Sundqvist 
> wrote:
> > >
> > > Hi!
> > >
> > > I am writing notes for my teaching and would like to do the following
> with modes:
> > >
> > > * If the file is compiled with context file.tex then everything (i.e.
> the content in all modes) is typeset.
> > > * If the file is compiled with context --mode=test1 file.tex then only
> mode test1 is typeset.
> > >
> > > I do not see how to do this easily.
> >
> >
> > This is what I would do if the list of modes is small:
> >
> > \doifnotmode{test1}{\enablemode[test1,test2]}
> >
> > (and don’t use the \definemode lines)
> >
> > But if you need many of them, that could get problematic with
> > many nested \doifmodeelse statements.
> >
> > In that case, I would use a separate ‘all’ mode, and call the
> > context script with that as argument in the generic case.
> >
> >
> > %%% file.tex
> > \starttext
> > \startmode[test1,all]
> > We are in mode test1.
> > \stopmode
> > \startmode[test2,all]
> > We are in mode test2.
> > \stopmode
> > \stoptext
> > %%%
> >
> >
> ___
> >
> > Thank you, Taco!
> >
> > I have around 25 of them, and your solution with "all" works indeed well
> for me.
>
>
> There’s also
>
> \startnotmode[some]
> This is not typeset in "some" mode.
> \stopnotmode
>
>
> Greetlings, Hraban
> ---
> https://www.fiee.net
> http://wiki.contextgarden.net
> https://www.dreiviertelhaus.de
> GPG Key ID 1C9B22FD
>
>
> ___
> 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] Emacs + latest beta

2018-08-27 Thread Fabrice Couvreur
Hello,
I installed texlive 2018 and context standalone in my home directory. It
seems to me that I must therefore indicate the path where texlive is
located 2018, but maybe I'm wrong.

You can check this by running `which context` in a terminal.
>

 Setting "/home/aragorn/context/tex" as ConTeXt root.
[aragorn@fab ~]$ which context
/home/aragorn/context/tex/texmf-linux-64/bin/context
[aragorn@fab ~]$

Fabrice

Le lun. 27 août 2018 à 16:36, Aditya Mahajan  a écrit :

> On Mon, 27 Aug 2018, Fabrice Couvreur wrote:
>
> > I just made a new standalone context install and added this to my
> ~/.profile
> > :  source /home/aragorn/context/tex/setuptex
> > It finally seems to work !
> >
> > export PATH=$PATH:/home/aragorn/context/tex/texmf-linux-64/bin
> > source /home/aragorn/context/tex/setuptex
> > export PATH=$PATH:/home/aragorn/texlive/2018/bin/x86_64-linux
> > export PATH=$PATH:/home/aragorn/bin
>
> I haven't read the whole thread, but why are you adding BOTH
> context-minimal
> and texlive to path. The whole idea of `source ...setuptex` is to set the
> PATH
> so that `context` resolves to the script provided by context-minimals
> rather
> than texlive.
>
> You can check this by running `which context` in a terminal.
>
> 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
>
> ___
___
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] Emacs + latest beta

2018-08-27 Thread Fabrice Couvreur
Hi Vladimir,
I just realized that does not work anymore
!

(setq ConTeXt-mode-hook
  (lambda () (setq TeX-command-extra-options "--purgeall")))

Thanks
Fabrice


Le lun. 27 août 2018 à 11:51, Fabrice Couvreur 
a écrit :

> Hi Vladimir,
> I just made a new standalone context install and added this to my
> ~/.profile :  source /home/aragorn/context/tex/setuptex
> It finally seems to work !
>
> export PATH=$PATH:/home/aragorn/context/tex/texmf-linux-64/bin
> source /home/aragorn/context/tex/setuptex
> export PATH=$PATH:/home/aragorn/texlive/2018/bin/x86_64-linux
> export PATH=$PATH:/home/aragorn/bin
>
> Thanks
> Fabrice
>
>
> Le lun. 27 août 2018 à 06:07, Vladimir Lomov  a
> écrit :
>
>> Hello,
>> ** Fabrice Couvreur [2018-08-25 01:23:28 +0200]:
>>
>> > Hi Vladimir,
>> > I use ConTeXt Full following this question asked on the forum
>> > https://mailman.ntg.nl/pipermail/ntg-context/2017/089501.html
>> > Then, if I compile with ConTeXt, the problem is not solved and the file
>> > vladimir.log is empty !
>>
>> I don't know what trigger this error, in my configuration (even in
>> minimal one, see below) the sample document is typeset just fine.
>>
>> > This is the buffer vladimir.output with emacs
>> >
>> >  8<
>> >
>> --
>> > Running `ConTeXt' on `vladimir' with
>> > ``PATH=/home/aragorn/context/tex/texmf-linux-64/bin:$PATH context
>> vladimir''
>> > resolvers   | trees | analyzing 'home:texmf'
>> > mtx-context | warning: no (local) file './vladimir', proceeding
>> > mtx-context | run 1: luatex
>> >
>> --fmt="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en"
>> > --jobname="vladimir"
>> >
>> --lua="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui"
>> > --no-parse-first-line --c:currentrun=1 --c:fulljobname="./vladimir"
>> > --c:input="./vladimir" --c:kindofrun=1 --c:maxnofruns=9 "cont-yes.mkiv"
>> >
>> > This is LuaTeX, Version 1.08.0 (TeX Live 2018)
>> >  system commands enabled.
>> >
>> > resolvers   > trees > analyzing 'home:texmf'
>> > open source > level 1, order 1, name
>> >
>> '/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
>> > system  >
>> > system  > ConTeXt  ver: 2018.08.20 17:47 MKIV beta  fmt:
>> 2018.8.20
>> > int: english/english
>> > system  >
>> > system  > 'cont-new.mkiv' loaded
>> > open source > level 2, order 2, name
>> >
>> '/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
>> > system  > beware: some patches loaded from cont-new.mkiv
>> > close source> level 2, order 2, name
>> >
>> '/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
>> > system  > files > jobname 'vladimir', input './vladimir', result
>> > 'vladimir'
>> > fonts   > latin modern fonts are not preloaded
>> > languages   > language 'en' is active
>> > open source > level 2, order 3, name '/home/aragorn/vladimir.tex'
>> > system  > synctex functionality is enabled, expect 5-10 pct
>> runtime
>> > overhead!
>> > fonts   > preloading latin modern fonts (second stage)
>> > fonts   > 'fallback modern-designsize rm 12pt' is loaded
>> > structure   > sectioning > chapter @ level 2 : 0.1 -> First chapter
>> > metapost> initializing instance 'metafun:1' using format
>> 'metafun'
>> > and method 'default'
>> > metapost> loading 'metafun' as
>> >
>> '/home/aragorn/context/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv'
>> > using method 'default'
>> > metapost> initializing number mode 'scaled'
>> >
>> > lua error   > lua error on line 10 in file
>> /home/aragorn/vladimir.tex:
>> >
>> > ...ext/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:190:
>> attempt to
>> > call a nil value (global 'getid')
>> > stack traceback:
>> > ...ext/tex/

Re: [NTG-context] Emacs + latest beta

2018-08-27 Thread Fabrice Couvreur
Hi Vladimir,
I just made a new standalone context install and added this to my ~/.profile
:  source /home/aragorn/context/tex/setuptex
It finally seems to work !

export PATH=$PATH:/home/aragorn/context/tex/texmf-linux-64/bin
source /home/aragorn/context/tex/setuptex
export PATH=$PATH:/home/aragorn/texlive/2018/bin/x86_64-linux
export PATH=$PATH:/home/aragorn/bin

Thanks
Fabrice


Le lun. 27 août 2018 à 06:07, Vladimir Lomov  a écrit :

> Hello,
> ** Fabrice Couvreur [2018-08-25 01:23:28 +0200]:
>
> > Hi Vladimir,
> > I use ConTeXt Full following this question asked on the forum
> > https://mailman.ntg.nl/pipermail/ntg-context/2017/089501.html
> > Then, if I compile with ConTeXt, the problem is not solved and the file
> > vladimir.log is empty !
>
> I don't know what trigger this error, in my configuration (even in
> minimal one, see below) the sample document is typeset just fine.
>
> > This is the buffer vladimir.output with emacs
> >
> >  8<
> >
> --
> > Running `ConTeXt' on `vladimir' with
> > ``PATH=/home/aragorn/context/tex/texmf-linux-64/bin:$PATH context
> vladimir''
> > resolvers   | trees | analyzing 'home:texmf'
> > mtx-context | warning: no (local) file './vladimir', proceeding
> > mtx-context | run 1: luatex
> >
> --fmt="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en"
> > --jobname="vladimir"
> >
> --lua="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui"
> > --no-parse-first-line --c:currentrun=1 --c:fulljobname="./vladimir"
> > --c:input="./vladimir" --c:kindofrun=1 --c:maxnofruns=9 "cont-yes.mkiv"
> >
> > This is LuaTeX, Version 1.08.0 (TeX Live 2018)
> >  system commands enabled.
> >
> > resolvers   > trees > analyzing 'home:texmf'
> > open source > level 1, order 1, name
> >
> '/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
> > system  >
> > system  > ConTeXt  ver: 2018.08.20 17:47 MKIV beta  fmt:
> 2018.8.20
> > int: english/english
> > system  >
> > system  > 'cont-new.mkiv' loaded
> > open source > level 2, order 2, name
> >
> '/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
> > system  > beware: some patches loaded from cont-new.mkiv
> > close source> level 2, order 2, name
> >
> '/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
> > system  > files > jobname 'vladimir', input './vladimir', result
> > 'vladimir'
> > fonts   > latin modern fonts are not preloaded
> > languages   > language 'en' is active
> > open source > level 2, order 3, name '/home/aragorn/vladimir.tex'
> > system  > synctex functionality is enabled, expect 5-10 pct
> runtime
> > overhead!
> > fonts   > preloading latin modern fonts (second stage)
> > fonts   > 'fallback modern-designsize rm 12pt' is loaded
> > structure   > sectioning > chapter @ level 2 : 0.1 -> First chapter
> > metapost> initializing instance 'metafun:1' using format
> 'metafun'
> > and method 'default'
> > metapost> loading 'metafun' as
> >
> '/home/aragorn/context/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv'
> > using method 'default'
> > metapost> initializing number mode 'scaled'
> >
> > lua error   > lua error on line 10 in file
> /home/aragorn/vladimir.tex:
> >
> > ...ext/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:190: attempt
> to
> > call a nil value (global 'getid')
> > stack traceback:
> > ...ext/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:190: in
> > upvalue 'getexpansion'
> > ...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:343: in
> > function
> <...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:338>
> > ...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:437: in
> > local 'boxtomp'
> > ...ext/tex/texmf-context/tex/context/base/mkiv/mlib-pps.lua:1894: in
> > function
> <...ext/tex/texmf-context/tex/context/base/mkiv/mlib-pps.lua:1891>
> > (...tail calls...)
> >
> >  1
> >  2 \setupsyn

Re: [NTG-context] Some questions about an extreme table

2018-08-26 Thread Fabrice Couvreur
Hello,
Thank you for your suggestions.
Fabrice

Le dim. 26 août 2018 à 15:19, Aditya Mahajan  a écrit :

> On Sun, 26 Aug 2018, Wolfgang Schuster wrote:
>
> > The normal alignment of figures is with the bottom of the figure on the
> > baseline.
> >
> > You can control the vertical alignment with a few box commands but what
> you
> > should use depends on the context, in tables I would use 2 while in
> running
> > text 3 can be better. Which alignment you’re using is your choice.
> >
> >
> > \useMPlibrary[dum]
> >
> > \defineexternalfigure[dummy][width=4cm,height=3cm]
> >
> > \setuplayout[grid=yes]
> >
> > \showgrid
> >
> > \starttext
> >
> > Default: \externalfigure[dummy]
> >
> > %1: \bottomrightbox{\externalfigure[dummy]}\quad
> > 1: \aligned[bottom,right]{\externalfigure[dummy]}\quad
> > 2: \tbox{\externalfigure[dummy]}\quad
> > 3: \bbox{\externalfigure[dummy]}
> >
> > \stoptext
>
> Another option is to use the `location` key for `\externalfigure`:
>
>
> \useMPlibrary[dum]
> \defineexternalfigure[dummy][width=4cm,height=3cm]
> \setuplayout[grid=yes]
>
> \showgrid
>
> \starttext
>
> Default: \externalfigure[dummy]
>
> 1: \externalfigure[dummy][location=top]\quad
> 2: \tbox{\externalfigure[dummy]}
>
> \stoptext
>
>
> 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
>
> ___
___
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] Some questions about an extreme table

2018-08-25 Thread Fabrice Couvreur
Hello,
In the table, how to have a. b. c. in each line instead of a. a. a ?
Is the macro to place the figures on the baseline of the labels to be
improved ?
Thanks.
Fabrice

\useMPlibrary[dum]

\switchtobodyfont[pagella,12pt]

\unexpanded\def\Item#1{\framed[frame=off,location=hanging]{#1}}

\setuplayout
   [topspace=10mm,
header=10mm,
footer=10mm,
height=middle,
backspace=20mm,
width=middle]

\starttext
 \startxtable[frame=on,bodyfont=10pt]
\startxrow
  \startxcell[width=2cm]
Expression \\ \m{B'(x)}
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\m{B'(x)=-x²+24x-117}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\m{B'(x)=-3x²+48x-117}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\m{B'(x)=-3x²+48x-317}
  \stopitem
\stopitemize
  \stopxcell
\stopxrow
\startxrow
  \startxcell
Tableau de \\ signes de  \\ \m{B'(x)}
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{{\externalfigure[dummy]}}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{\externalfigure[dummy]}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{\externalfigure[dummy]}
  \stopitem
\stopitemize
  \stopxcell
\stopxrow
\startxrow
  \startxcell
Tableau de \\ variations\\de \m{B}
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{\externalfigure[dummy]}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{\externalfigure[dummy]}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{\externalfigure[dummy]}
  \stopitem
\stopitemize
  \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] Emacs + latest beta

2018-08-24 Thread Fabrice Couvreur
Hi Vladimir,
I use ConTeXt Full following this question asked on the forum
https://mailman.ntg.nl/pipermail/ntg-context/2017/089501.html
Then, if I compile with ConTeXt, the problem is not solved and the file
vladimir.log is empty !
This is the buffer vladimir.output with emacs

 8<
--
Running `ConTeXt' on `vladimir' with
``PATH=/home/aragorn/context/tex/texmf-linux-64/bin:$PATH context vladimir''
resolvers   | trees | analyzing 'home:texmf'
mtx-context | warning: no (local) file './vladimir', proceeding
mtx-context | run 1: luatex
--fmt="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en"
--jobname="vladimir"
--lua="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui"
--no-parse-first-line --c:currentrun=1 --c:fulljobname="./vladimir"
--c:input="./vladimir" --c:kindofrun=1 --c:maxnofruns=9 "cont-yes.mkiv"

This is LuaTeX, Version 1.08.0 (TeX Live 2018)
 system commands enabled.

resolvers   > trees > analyzing 'home:texmf'
open source > level 1, order 1, name
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
system  >
system  > ConTeXt  ver: 2018.08.20 17:47 MKIV beta  fmt: 2018.8.20
int: english/english
system  >
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 2, order 2, name
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > files > jobname 'vladimir', input './vladimir', result
'vladimir'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name '/home/aragorn/vladimir.tex'
system  > synctex functionality is enabled, expect 5-10 pct runtime
overhead!
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
structure   > sectioning > chapter @ level 2 : 0.1 -> First chapter
metapost> initializing instance 'metafun:1' using format 'metafun'
and method 'default'
metapost> loading 'metafun' as
'/home/aragorn/context/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv'
using method 'default'
metapost> initializing number mode 'scaled'

lua error   > lua error on line 10 in file /home/aragorn/vladimir.tex:

...ext/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:190: attempt to
call a nil value (global 'getid')
stack traceback:
...ext/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:190: in
upvalue 'getexpansion'
...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:343: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:338>
...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:437: in
local 'boxtomp'
...ext/tex/texmf-context/tex/context/base/mkiv/mlib-pps.lua:1894: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/mlib-pps.lua:1891>
(...tail calls...)

 1
 2 \setupsynctex[state=start]
 3
 4 \startusableMPgraphic{NumberHead}
 5   draw outlinetext.f
 6   ("\bf\namedheadnumber{chapter}")
 7   (withcolor "red")
 8   ysized 50pt ;
 9 \stopusableMPgraphic
10 >>
11 \unexpanded\def\processMPheadnumber#1%
12   {\useMPgraphic{NumberHead}}
13
14 \setuphead%
15 [chapter]%
16 [command=\HeadTitle,%
17  headstyle=\ss,%
18  numbercommand=\processMPheadnumber]
19
20 \unexpanded\def\HeadTitle#1#2%


?
 8<
-
But if I compile from a terminal without using emacs it works !

[aragorn@fab ~]$ /home/aragorn/context/tex/texmf-linux-64/bin/context
vladimir.tex

Are we sure it is context standalone that is used by emacs rather than
context texlive 2018 ?
When reading the file vladimir.log, I doubt a little ...
Thanks
Fabrice

PS : Here is the content of the file ~/.profile :

export PATH=$PATH:/home/aragorn/context/tex/texmf-linux-64/bin/context
export PATH=$PATH:/home/aragorn/texlive/2018/bin/x86_64-linux
export PATH=$PATH:/home/aragorn/bin

Le ven. 24 août 2018 à 15:48, Vladimir Lomov  a écrit :

> Hello,
> ** Fabrice Couvreur [2018-08-24 12:31:19 +0200]:
>
> > Hi Vladimir,
> > Thanks for everything, it seem

Re: [NTG-context] Emacs + latest beta

2018-08-24 Thread Fabrice Couvreur
Hi Vladimir,
Thanks for everything, it seems to work !
You are the only one who knew how to solve the problem.
Here is the content of my ~./emacs file that you probably need to improve :

 8<
-

(eval-after-load "context"
  '(setq TeX-command-list
 (cons '("ConTeXt"
"PATH=/home/aragorn/context/tex/texmf-linux-64/bin:$PATH context %s"
   TeX-run-command nil t :help "Run context (MarkIV)")
TeX-command-list))
)

(setq ConTeXt-mode-hook
  (lambda () (setq TeX-command-extra-options "--purgeall")))


(add-hook 'ConTeXt-mode-hook
  (lambda()
(setq TeX-command-default "ConTeXt Full")))


 8<
--

By cons if I add this :

 8<
-

(setenv "TEXMFCNF" nil)
(setenv "TEXROOT" "/home/aragorn/context/tex")
(setenv "TEXMFCACHE" (format "%s/.cache" (getenv "HOME")))


 8<
---


 the compilation returns a damaged pdf file that I can not open.

I installed texlive 2018 and context standalone in my home directory and
emacs in the /usr/share/emacs directory with Arch Linux ; can that explain
my problems ?

Fabrice


Le ven. 24 août 2018 à 04:21, Vladimir Lomov  a écrit :

> Hello,
> ** Fabrice Couvreur [2018-08-23 10:48:42 +0200]:
>
> > Hi,
> > Thanks for your help but ...
>
> I checked again and it is fine. May be I was too unspecific. First, I
> changed a bit your example to this one:
>
> [test.tex]
>  8< 
> \setupsynctex[state=start]
>
> \startusableMPgraphic{NumberHead}
>   draw outlinetext.f
>   ("\bf\namedheadnumber{chapter}")
>   (withcolor "lightgray")
>   ysized 50pt ;
> \stopusableMPgraphic
>
> \unexpanded\def\processMPheadnumber#1%
>   {\useMPgraphic{NumberHead}}
>
> \setuphead%
> [chapter]%
> [command=\HeadTitle,%
>  headstyle=\ss,%
>  numbercommand=\processMPheadnumber]
>
> \unexpanded\def\HeadTitle#1#2%
> {\framed%
>   [frame=off,%
> bottomframe=on,%
> width=broad,
> align={broad,nothyphenated,left}]%
> {#1\blank[nowhite]#2}}
>
> \starttext
> \startchapter[title=First chapter]
>   \input ward
> \stopchapter
> \stoptext
>
> %%% Local Variables:
> %%% mode: context
> %%% TeX-master: t
> %%% End:
>  8< 
>
> And second, I tweaked a bit my Emacs configuration:
>
>  8< 
> (setenv "TEXMFCNF" nil)
> (setenv "TEXROOT" "/usr/local/opt/context/tex")
> (setenv "TEXMFCACHE" (format "%s/.cache" (getenv "HOME")))
>  8< 
>
> (I have to do that because I have both TeX Live and ConTeXt
> Standalone/Suite in parallel, and use mainly LaTeX.)
>
> You should check your Emacs configuration.
>
> This is my Emacs configuration:
> https://bitbucket.org/vp1981/scripts/src/master/config/emacs/
> and I have
> Emacs:  27.0.50 (git)
> AUCTEX: 12.1 (git)
>
> [...]
>
> ---
> WBR, Vladimir Lomov
>
> --
> Come, you spirits
> That tend on mortal thoughts, unsex me here,
> And fill me, from the crown to the toe, top-full
> Of direst cruelty! make thick my blood,
> Stop up the access and passage to remorse
> That no compunctious visiting of nature
> Shake my fell purpose, not keep peace between
> The effect and it! Come to my woman's breasts,
> And take my milk for gall, you murdering ministers,
> Wherever in your sightless substances
> You wait on nature's mischief! Come, thick night,
> And pall the in the dunnest smoke of hell,
> That my keen knife see not the wound it makes,
> Nor heaven peep through the blanket of the dark,
> To cry `Hold, hold!'
> -- Lady MacBeth
>
> ___
> 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.aanhe

Re: [NTG-context] Emacs + latest beta

2018-08-23 Thread Fabrice Couvreur
Hi,
Thanks for your help but ...

Running `ConTeXt' on `vladimir' with
``PATH=/home/aragorn/context/tex/texmf-linux-64/bin:$PATH context vladimir''
resolvers   | trees | analyzing 'home:texmf'
mtx-context | warning: no (local) file './vladimir', proceeding
mtx-context | run 1: luatex
--fmt="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en"
--jobname="vladimir"
--lua="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui"
--no-parse-first-line --c:currentrun=1 --c:fulljobname="./vladimir"
--c:input="./vladimir" --c:kindofrun=1 --c:maxnofruns=9 "cont-yes.mkiv"

This is LuaTeX, Version 1.08.0 (TeX Live 2018)
 system commands enabled.

resolvers   > trees > analyzing 'home:texmf'
open source > level 1, order 1, name
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
system  >
system  > ConTeXt  ver: 2018.08.20 17:47 MKIV beta  fmt: 2018.8.20
int: english/english
system  >
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 2, order 2, name
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > files > jobname 'vladimir', input './vladimir', result
'vladimir'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name '/home/aragorn/vladimir.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
structure   > sectioning > chapter @ level 2 : 0.1 -> First chapter
metapost> initializing instance 'metafun:1' using format 'metafun'
and method 'default'
metapost> loading 'metafun' as
'/home/aragorn/context/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv'
using method 'default'
metapost> initializing number mode 'scaled'

lua error   > lua error on line 10 in file /home/aragorn/vladimir.tex:

...ext/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:190: attempt to
call a nil value (global 'getid')
stack traceback:
...ext/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:190: in
upvalue 'getexpansion'
...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:343: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:338>
...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:437: in
local 'boxtomp'
...ext/tex/texmf-context/tex/context/base/mkiv/mlib-pps.lua:1894: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/mlib-pps.lua:1891>
(...tail calls...)

 1 \startusableMPgraphic{NumberHead}
 2  draw outlinetext.f
 3  ("\bf\namedheadnumber{chapter}")
 4  (withcolor "lightgray")
 5   ysized 50pt ;
 6 \stopusableMPgraphic
 7
 8 \unexpanded\def\processMPheadnumber#1%
 9   {\useMPgraphic{NumberHead}}
10 >>
11 \setuphead
12[chapter]
13[command=\HeadTitle,
14 headstyle=\ss,
15 numbercommand=\processMPheadnumber,
16    ]
17
18
19 \unexpanded\def\HeadTitle#1#2%
20   {\framed


?
Fabrice

Le jeu. 23 août 2018 à 08:06, Vladimir Lomov  a écrit :

> Hello,
> ** Fabrice Couvreur [2018-08-22 13:05:31 +0200]:
>
> > Hello,
> > Sorry to insist, but could anyone help me understand the problem I'm
> having
> > in using Emacs with standalone context ?
>
> Check environment variables both in terminal and Emacs.
>
> > The following file compiles perfectly from a terminal :
> >
> > /home/aragorn/texlive/2018/bin/x86_64-linux/context  test.tex
> >
> > /home/aragorn/context/tex/texmf-linux-64/bin/context  test.tex (latest
> beta)
> >
> > With Emacs, it compiles perfectly if you use the 2018 texlive context
> > binary.
> >
> > If I want to use the latest beta context binary, I need to add this to my
> > ~/.emacs file :
> >
> > (setenv "PATH" "/home/aragorn/context/tex/texmf-linux-64/bin/:$PATH" t)
>
> Instead of this I use this (in my ~/.emacs):
>
> (eval-after-load "context"
>   '(setq TeX-command-list
>  (cons '("ConTeXt"
> "PATH=/usr/local/opt/context/tex/texmf-linux-64/bin:$PATH context %s"
>TeX-run-command nil t :help "Run context (MarkIV)")
> TeX-command-list))
> )
>
> > And there, I encounter a compilation problem :
>
> and I don't see any error

[NTG-context] Blocks in margin with overflow of text

2018-08-22 Thread Fabrice Couvreur
Hello,
The idea is to put all the examples of the course in the margin. I see that
the text is sometimes overflowing. How to improve the code ?
Thanks.
Fabrice

\definemeasure[Margin][3.5cm]


\setuplayout
  [
backspace=20mm,
width=120mm,
height=middle,
footer=\bodyfontsize,
header=3\bodyfontsize,
headerdistance=\bodyfontsize,
bottom=3\bodyfontsize,
location={middle},
margin=\measure{Margin},
rightmargin=4.5cm,
marking=on,
  ]

\definefloat
   [recipe]
   [figure]

\setupfloat
   [recipe]
   [default={margin,none}]

\defineconversionset [digit] [] [n]

\setupenumerations
  [before={\blank},
   after={\blank},
   alternative=serried,
   title=yes,
   distance=1em,
  %headcommand=\groupedcommand{}{~---~},
   distance=none,
   prefix=yes,
   prefixsegments=chapter,
   way=bychapter,
   prefixconversionset=digit,
   titlestyle=bold,
   width=broad]

\defineenumeration
   [example]
   [text=Exemple,
style=italic]


\showframe

\starttext
\startchapter[title=First chapter]
\placerecipe{}{
  \startexample
   \input ward
   \stopexample}
\stopchapter
\startchapter[title=Second chapter]
\placerecipe{}{
  \startexample
   \input ward
  \stopexample}
\stopchapter
\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
___

[NTG-context] Emacs + latest beta

2018-08-22 Thread Fabrice Couvreur
Hello,
Sorry to insist, but could anyone help me understand the problem I'm having
in using Emacs with standalone context ?
The following file compiles perfectly from a terminal :

/home/aragorn/texlive/2018/bin/x86_64-linux/context  test.tex

/home/aragorn/context/tex/texmf-linux-64/bin/context  test.tex (latest beta)

With Emacs, it compiles perfectly if you use the 2018 texlive context
binary.

If I want to use the latest beta context binary, I need to add this to my
~/.emacs file :

(setenv "PATH" "/home/aragorn/context/tex/texmf-linux-64/bin/:$PATH" t)

And there, I encounter a compilation problem :

Running `ConTeXt Full' on `pouf' with ``context --purgeall --nonstop
pouf.tex''resolvers   | trees | analyzing 'home:texmf'
mtx-context | run 1: luatex
--fmt="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en"
--interaction="nonstopmode" --jobname="pouf"
--lua="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui"
--no-parse-first-line --c:currentrun=1 --c:fulljobname="./pouf.tex"
--c:input="./pouf.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:nonstopmode
--c:purgeall "cont-yes.mkiv"

This is LuaTeX, Version 1.08.0 (TeX Live 2018)
 system commands enabled.

resolvers   > trees > analyzing 'home:texmf'
open source > level 1, order 1, name
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
job > passes > version mismatch: 1.3 <> 1.31
system  >
system  > ConTeXt  ver: 2018.08.20 17:47 MKIV beta  fmt: 2018.8.20
int: english/english
system  >
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 2, order 2, name
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'

system  > files > jobname 'pouf', input './pouf', result 'pouf'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name '/home/aragorn/pouf.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
structure   > sectioning > chapter @ level 2 : 0.1 -> First chapter
metapost> initializing instance 'metafun:1' using format 'metafun'
and method 'default'
metapost> loading 'metafun' as
'/home/aragorn/context/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv'
using method 'default'
metapost> initializing number mode 'scaled'

lua error   > lua error on line 10 in file /home/aragorn/pouf.tex:

...ext/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:190: attempt to
call a nil value (global 'getid')
stack traceback:
...ext/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:190: in
upvalue 'getexpansion'
...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:343: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:338>
...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:437: in
local 'boxtomp'
...ext/tex/texmf-context/tex/context/base/mkiv/mlib-pps.lua:1894: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/mlib-pps.lua:1891>
(...tail calls...)

 1
 2 \startusableMPgraphic{NumberHead}
 3  draw outlinetext.f
 4  ("\bf\namedheadnumber{chapter}")
 5  (withcolor "lightgray")
 6   ysized 50pt ;
 7 \stopusableMPgraphic
 8
 9 \unexpanded\def\processMPheadnumber#1%
10 >>{\useMPgraphic{NumberHead}}
11
12 \setuphead
13[chapter]
14[command=\HeadTitle,
15 headstyle=\ss,
16 numbercommand=\processMPheadnumber,
17]
18
19
20 \unexpanded\def\HeadTitle#1#2%


open source > level 3, order 4, name
'/home/aragorn/context/tex/texmf-context/tex/context/sample/common/ward.tex'
close source> level 3, order 4, name
'/home/aragorn/context/tex/texmf-context/tex/context/sample/common/ward.tex'
backend > xmp > using file
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
pages   > flushing realpage 1, userpage 1, subpage 1
close source> level 2, order 4, name '/home/aragorn/pouf.tex'
close source> level 1, order 4, name
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'

mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path:
/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.007 seconds, 1 scans with
scantime 0.000 seconds, 0 shared scans, 31 found files, scanned paths:
/home/aragorn/texmf
mkiv lua stats  > stored bytecode data: 437 modules (0.226 sec), 93 tables

Re: [NTG-context] Textadept with ConTeXt

2018-08-21 Thread Fabrice Couvreur
Hello,
Thanks for your help !

First, only edit the init.lua in your USER folder, on Win it's
> C:\Users\NAME\.textadept\init.lua. Don't edit the init.lua within TA's main
> folder. In fact, there is no reason to enter TA's main folder after
> extraction unless you want to read other config files like the ConTeXt
> lexer (see below).
>

Of course !



> Second, I am using Win10x64 with SumatraPDF as viewer, it's fast and you
> don't need to close documents to recompile. The biggest disadvantage is,
> that you can't use scripts with SumatraPDF (for forms etc.).
> Furthermore the following line I wrote into my init.lua:
>
> textadept.run.compile_commands.tex = 'mtxrun --autogenerate --script
> context --autopdf --purge "%f"'
>
> When I compile the PDF like this, Sumatra opens up as expected. On
> recompile it reloads the PDF. Maybe the spaces within your command are the
> reason:
> synctex = -1  ->synctex=-1
>

 Here is the content of my init.lua
:


textadept.run.compile_commands.tex = 'mtxrun --autogenerate --script
context --autopdf --purge "%f"'

textadept.file_types.extensions.tex = 'context'


buffer:set_theme('dark', {font = 'Monospace', fontsize = 14})



When I compile a file test.tex (Maj + Ctrl + R), I get the expected file
test.pdf in my home directory; file that I open with Evince. What I would
like, if possible, is an automatic opening of this file after
compilation. Here's
what I get in the messages tab :

mtx-context | pdfview methods: auto default okular pdfxcview sumatra,
current method: sumatra (directives_pdfview_method)
pdfview | command: wine "sumatrapdf.exe" -reuse-instance -bg-color 0xCC
"wolfgang-1.pdf" 1> / dev / null 2> / dev / null &
system | total runtime: 1.624 seconds

If I compile a second time, still no automatic output from the file
test.pdf.
 On the other hand, if I do Crtl + R test.tex, the file test.pdf opens with
xdg-open :

> exit status: 0
> xdg-open "wolfgang-1.pdf"
File name empty!
The specified Application package is not valid.
/ usr / bin / xdg-open: line 881: x-www-browser: command not found
> exit status: 0


Thanks
Fabrice


Le mar. 21 août 2018 à 02:00, Lars  a écrit :

> Hi there, thanks for your interest in Textadept. It's a great editor and I
> am sure that you won't regret testing it and using it in the future. Just
> have some patience.
>
> I suggest you take a look at my User talk at the wiki, there I explain a
> lot about TA and how to use it with ConTeXt. It's more detailed than the
> Textadept site on the wiki.
>
> http://wiki.contextgarden.net/User_talk:Koenich
> I have to say though that I wrote it with Windows in mind. But TA's config
> files are all written in Lua so the OS should not be a problem.
>
>
> Am 21/08/2018 um 00:55 schrieb Fabrice Couvreur:
>
> Hello,
> In order to use another editor than Emacs and after testing Scite, I
> installed Textadept and modified the init.lua file as follows :
>
> textadept.run.compile_commands.tex = 'mtxrun --autogenerate --script
> context --autopdf --purge --synctex = -1 "% f"'
>
>
> First, only edit the init.lua in your USER folder, on Win it's
> C:\Users\NAME\.textadept\init.lua. Don't edit the init.lua within TA's main
> folder. In fact, there is no reason to enter TA's main folder after
> extraction unless you want to read other config files like the ConTeXt
> lexer (see below).
>
> Second, I am using Win10x64 with SumatraPDF as viewer, it's fast and you
> don't need to close documents to recompile. The biggest disadvantage is,
> that you can't use scripts with SumatraPDF (for forms etc.).
> Furthermore the following line I wrote into my init.lua:
>
> textadept.run.compile_commands.tex = 'mtxrun --autogenerate --script
> context --autopdf --purge "%f"'
>
> When I compile the PDF like this, Sumatra opens up as expected. On
> recompile it reloads the PDF. Maybe the spaces within your command are the
> reason:
> synctex = -1  ->synctex=-1
>
> Third, is your ConTeXt folder within Search Path (I better ask)?
>
> *Fourth, did you bind extensions to the context.lua lexer?* In the
> init.lua it should look like this:
>
> textadept.file_types.extensions.tex = 'context'
> % If you're using LaTeX too, you should choose another extension.
> textadept.file_types.extensions.mkii = 'context'
> textadept.file_types.extensions.mkiv = 'context'
>
> *Fifth, is your context lexer loaded when you compile the file?* Check
> the status bar in the lower right corner. If it doesn't say "context" but
> "latex" or "text" or anything like that, then choose the context lexer via
> "Buffer" -> "Select lexer...".
>
> Si

[NTG-context] Latest beta

2018-08-20 Thread Fabrice Couvreur
Hello,
Compile error after context standalone update
Thanks
Fabrice

Running `ConTeXt' on `Test' with ``context --once --texutil --purgeall
--nonstop Test.tex''
resolvers   | trees | analyzing 'home:texmf'
mtx-context | run 1: luatex
--fmt="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en"
--interaction="nonstopmode" --jobname="Test"
--lua="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui"
--no-parse-first-line --c:currentrun=1 --c:fulljobname="./Test.tex"
--c:input="./Test.tex" --c:kindofrun=3 --c:maxnofruns=1 --c:nonstopmode
--c:once --c:purgeall --c:texutil "cont-yes.mkiv"

This is LuaTeX, Version 1.08.0 (TeX Live 2018)
 system commands enabled.

resolvers   > trees > analyzing 'home:texmf'
open source > level 1, order 1, name
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
job > passes > version mismatch: 1.3 <> 1.31
system  >
system  > ConTeXt  ver: 2018.08.20 17:47 MKIV beta  fmt: 2018.8.20
int: english/english
system  >
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 2, order 2, name
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'

system  > files > jobname 'Test', input './Test', result 'Test'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name '/home/aragorn/Test.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
structure   > sectioning > title @ level 2 : 0.0 -> Sommaire
backend > xmp > using file
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
pages   > flushing realpage 1, userpage 1, subpage 1
structure   > sectioning > chapter @ level 2 : 0.1 -> Espaces
probabilisés
metapost> initializing instance 'metafun:1' using format 'metafun'
and method 'default'
metapost> loading 'metafun' as
'/home/aragorn/context/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv'
using method 'default'
metapost> initializing number mode 'scaled'

lua error   > lua error on line 10 in file /home/aragorn/Test.tex:

...ext/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:190: attempt to
call a nil value (global 'getid')
stack traceback:
...ext/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:190: in
upvalue 'getexpansion'
...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:343: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:338>
...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:437: in
local 'boxtomp'
...ext/tex/texmf-context/tex/context/base/mkiv/mlib-pps.lua:1894: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/mlib-pps.lua:1891>
(...tail calls...)

 1 %macro=mkiv
 2
 3 \setuppagenumbering[location=footer]
 4
 5 \startusableMPgraphic{NumberHead}
 6  draw outlinetext.f
 7  ("\bf\namedheadnumber{chapter}")
 8  (withcolor "lightgray")
 9  ysized 50pt ;
10 >>  \stopusableMPgraphic
11
12 \unexpanded\def\processMPheadnumber#1%
13   {\useMPgraphic{NumberHead}}
14
15 \setuphead
16[chapter]
17[command=\HeadTitle,
18 headstyle=\ss,
19 numbercommand=\processMPheadnumber,
20]


structure   > sectioning > subsection @ level 4 : 0.1.0.1 -> Expérience
aléatoire et univers
structure   > sectioning > subsection @ level 4 : 0.1.0.2 -> Événements

lua error   > lua error on line 10 in file /home/aragorn/Test.tex:

...ext/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:190: attempt to
call a nil value (global 'getid')
stack traceback:
...ext/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:190: in
upvalue 'getexpansion'
...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:343: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:338>
...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:437: in
local 'boxtomp'
...ext/tex/texmf-context/tex/context/base/mkiv/mlib-pps.lua:1894: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/mlib-pps.lua:1891>
(...tail calls...)

 1 %macro=mkiv
 2
 3 \setuppagenumbering[location=footer]
 4
 5 \startusableMPgraphic{NumberHead}
 6  draw outlinetext.f
 7  ("\bf\namedheadnumber{chapter}")
 8  (withcolor "lightgray")
 9  ysized 50pt ;
10 >>  \stopusableMPgraphic
11
12 \unexpanded\def\processMPheadnumber#1%
13   {\useMPgraphic{NumberHead}}
14
15 \setuphead
16

[NTG-context] Textadept with ConTeXt

2018-08-20 Thread Fabrice Couvreur
Hello,
In order to use another editor than Emacs and after testing Scite, I
installed Textadept and modified the init.lua file as follows :

textadept.run.compile_commands.tex = 'mtxrun --autogenerate --script
context --autopdf --purge --synctex = -1 "% f"'

The compilation works but no automatic output in pdf at the end of the
process (as with Scite !)

What to do with files in /home /aragorn/context/tex
/texmf-context/context/data /textadept/ context/ ?

Thank you.
Fabrice
___
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] Change PDF viewer with Scite

2018-08-20 Thread Fabrice Couvreur
Hi Hans,
I made the following change but unfortunately without success :

if PLAT_GTK
name.context.console=rxvt
name.context.gsview=gv
name.context.acrobat=acroread
name.flag.pdfopen=--autopdf
name.flag.pdfopen=--autopdf=evince

Fabrice


Le lun. 20 août 2018 à 08:26, Hans Hagen  a écrit :

> On 8/20/2018 12:11 AM, Fabrice Couvreur wrote:
> > Hello,
> > The default viewer is GhostView. I would like to replace it with Evince.
> > In user mode, I edited the /usr/share/scite/scite-context.properties
> > file to replace the command.2 line. $ (File.patterns.context) = $
> > (name.context.gsview) $ (FileDir ) / $ (FileName) .pdf by command.2. $
> > (File.patterns.context) = $ (name.context.evince) $ (FileDir) / $
> > (FileName) .pdf
> search for "name.flag.pdfopen"
>
> -
>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
___

[NTG-context] Change PDF viewer with Scite

2018-08-19 Thread Fabrice Couvreur
Hello,
The default viewer is GhostView. I would like to replace it with Evince.
In user mode, I edited the /usr/share/scite/scite-context.properties file
to replace the command.2 line. $ (File.patterns.context) = $
(name.context.gsview) $ (FileDir ) / $ (FileName) .pdf by command.2. $
(File.patterns.context) = $ (name.context.evince) $ (FileDir) / $
(FileName) .pdf
It does not work .
Thank you.
Fabrice
___
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] Text wrapped with an ornement

2018-08-19 Thread Fabrice Couvreur
Hi Hans,
It's great and with alternative =serried, that's exactly what I'm trying to
do !
Thanks.
Fabrice

PS : @Pablo Thanks for your help.

Le dim. 19 août 2018 à 12:40, Hans Hagen  a écrit :

> On 8/19/2018 11:47 AM, Pablo Rodriguez wrote:
> > On 08/18/2018 11:51 PM, Fabrice Couvreur wrote:
> >> Hi Palbo,
> >> In fact I want the text '' Coming back ... '' to start on the same
> >> baseline as the title of the ornament as in the photo.
> >
> > Hi Fabrice,
> >
> > I’m afraid I don’t know how to do that (if that is possible with frames).
> \definecolor[MyColorA][s=0.8784]
> \definecolor[MyColorB][m=0.27,y=1]
>
> \defineframed
>[FrameTitle]
>[frame=off,
> foregroundstyle=\bfx\ss,
> foregroundcolor=white,
> background=color,
> backgroundcolor=MyColorB,
> location=depth]
>
> \defineframedtext
>[FramedText]
>[offset=0.6em,
> style=\ss,
> toffset=.25\lineheight,
> background=color,
> backgroundcolor=MyColorA,
> oregroundstyle={\switchtobodyfont[10pt]},
> align={right, broad},
> frame=off,
> corner=round,
> radius=1.5em,
> width=10cm]
>
> \definedescription
>[Info]
>[before=,
> after=,
> text=Info,
> title=no,
> width=fit,
> distance=1em,
> headcommand=\FrameTitle,
> alternative=hanging]
>
> \showframe
>
> \starttext
> \startFramedText
>\startInfo
>  \input zapf
>\stopInfo
>  \stopFramedText
> \stoptext
>
>
> -
>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] Text wrapped with an ornement

2018-08-18 Thread Fabrice Couvreur
Hi Palbo,
In fact I want the text '' Coming back ... '' to start on the same baseline
as the title of the ornament as in the photo.
Thanks.
Fabrice

Info  Coming back ...
blablablablabla

Le sam. 18 août 2018 à 13:26, Pablo Rodriguez  a écrit :

> On 08/18/2018 11:11 AM, Fabrice Couvreur wrote:
> > Hi Pablo,
> > These options are to be added to \defineframedtext [] [] ?
> > Without success at home !
>
> Hi Fabrice,
>
> your sample should read:
>
> \definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784]
> \definecolor[MyColorB][c=0.00,m=0.27,y=1.00,k=0.00]
>
> \defineornament
> [FrameTitle]
> [preset=lefttop]
> [
>   frame=off,
>   foregroundstyle=\bfx\ss,
>   foregroundcolor=white,
>   background=color,
>   backgroundcolor=MyColorB,
> ]
>
> \defineframedtext
>   [FramedText]
>   [
> offset=0.6em,
> style=\ss,
> toffset=\lineheight,
> background=color,
> backgroundcolor=MyColorA,
> foregroundstyle={\switchtobodyfont[10pt]},
> align={right, broad},
> frame=off,
> corner=round,
> radius=1.5em,
> width=10cm,
>   ]
>
> \showframe
>
> \starttext
>
>\FrameTitle{Info}{%
>\startFramedText%
>   \input zapf
> \stopFramedText}
>
> \stoptext
>
> The width option works now, because I didn’t realize that your sample
> had it right after the "\startFramedText" command.
>
> I hope it helps now. If anything is not working as you expect, please
> explain what should be different.
>
> 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://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] Text wrapped with an ornement

2018-08-18 Thread Fabrice Couvreur
Hi Pablo,
These options are to be added to \defineframedtext [] [] ?
Without success at home !
Fabrice

Le sam. 18 août 2018 à 10:17, Pablo Rodriguez  a écrit :

> On 08/18/2018 01:08 AM, Fabrice Couvreur wrote:
> > Hello,
> > That's true Wolfgang, I just checked right now, sorry!
> > What I would like to do is on the image below.
>
> Hi Fabrice,
>
> you should use the following commands:
>
>align={right, broad},
>radius=2em,
>
> And I don’t know why the width option doesn’t work here.
>
> 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://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] Text wrapped with an ornement

2018-08-17 Thread Fabrice Couvreur
Hello,
That's true Wolfgang, I just checked right now, sorry!
What I would like to do is on the image below.
Fabrice

[image: IMG_0690.JPG]

Le ven. 17 août 2018 à 17:31, Pablo Rodriguez  a écrit :

> On 08/17/2018 11:24 AM, Fabrice Couvreur wrote:
> > Hello,
> > Aditya offered me the following code to insert comments with an
> > ornament. I notice that the option alternative= serried does not seem to
> > work.
>
> Hi Fabrice,
>
> I think it is not clear what do you intend to do with the frame.
>
> If text inside isn’t broken in lines is because of the lack of spaces
> (use "\dorecurse{100}{blabla }" instead).
>
> If I miss your point, could you explain what you need?
>
> Just in case it might 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://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
___

[NTG-context] Text wrapped with an ornement

2018-08-17 Thread Fabrice Couvreur
Hello,
Aditya offered me the following code to insert comments with an ornament. I
notice that the option alternative= serried does not seem to work.
Thank you.
Fabrice

\definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784]
\definecolor[MyColorB][c=0.00,m=0.27,y=1.00,k=0.00]

\defineornament
[FrameTitle]
[preset=lefttop]
[
  frame=off,
  foregroundstyle=\bfx,
  foregroundcolor=white,
  background=color,
  backgroundcolor=MyColorB,
]


\defineframedtext
  [FramedText]
  [
offset=0.6em,
toffset=\lineheight,
background=color,
backgroundcolor=MyColorA,
foregroundstyle={\switchtobodyfont[10pt]},
align=verytolerant,
alternative=serried, % text wrapped
frame=off,
corner=round,
  ]

\showframe

\starttext

   \FrameTitle{Info}{\startFramedText[width=\textwidth]
  \dorecurse{100}{blabla}
\stopFramedText}

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

[NTG-context] The dimensions of the first page are not taken into account

2018-08-17 Thread Fabrice Couvreur
Hello,
I want to create a template with a header on the first page for student
testing. If the document contains text that is on more than one page, it
works perfectly. On the other hand, if the document has text on one page,
it does not work.
Thanks.
Fabrice

\setuppagenumbering[alternative=,location=]

  \showframe

  \definelayout
[firstpage]
[topspace=10mm,
 header=10mm,
 footer=10mm,
 height=middle,
 backspace=20mm,
 width=middle]

  \definelayout
[first]
[firstpage]

  \setuplayout
   [topspace=10mm,
header=\zeropoint,
footer=10mm,
height=middle,
backspace=20mm,
width=middle]

  \setupbackgrounds
   [header]
   [text]
   [frame=off,
topframe=on,
bottomframe=on,
framecolor=red,
rulethickness=1pt]

  \setupheadertexts
[First page]

  \starttext
  \dorecurse{8}{\input knuth}  % ok

%  \dorecurse{8}{\input knuth}  no ok
  \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
___

[NTG-context] The dimensions of the first page are not taken into account Hello, I want to create a template with a header on the first page for student testing. If the document contains text that is

2018-08-16 Thread Fabrice Couvreur
Hello,
I want to create a template with a header on the first page for student
testing. If the document contains text that is on more than one page, it
works perfectly. On the other hand, if the document has text on one page,
it does not work.
Thanks.
Fabrice

\setuppagenumbering[alternative=,location=]

  \showframe

  \definelayout
[firstpage]
[topspace=10mm,
 header=10mm,
 footer=10mm,
 height=middle,
 backspace=20mm,
 width=middle]

  \definelayout
[first]
[firstpage]

  \setuplayout
   [topspace=10mm,
header=\zeropoint,
footer=10mm,
height=middle,
backspace=20mm,
width=middle]

  \setupbackgrounds
   [header]
   [text]
   [frame=off,
topframe=on,
bottomframe=on,
framecolor=red,
rulethickness=1pt]

  \setupheadertexts
[First page]

  \starttext
  \dorecurse{8}{\input knuth}  % ok

%  \dorecurse{8}{\input knuth}  no ok
  \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] Logo in the margin at the bottom of the page

2018-08-16 Thread Fabrice Couvreur
Hi Henry,
Sorry for the late response. In fact, I want a margin of 20 mm around the
text box. In addition, playing with the options weight = and height = some
images are distorted, including the one that I join.
Thank you
Fabrice

\setuppagenumbering[alternative=doublesided,location=]

  \showframe

  \definelayout
[firstpage]
[topspace=10mm,
 header=10mm,
 footer=10mm,
 height=middle,
 backspace=20mm,
 width=middle]

  \definelayout
[first]
[firstpage]

  \setuplayout
   [topspace=10mm,
header=\zeropoint,
footer=10mm,
height=middle,
backspace=20mm,
width=middle]

  \setupbackgrounds
   [header]
   [text]
   [frame=off,
topframe=on,
bottomframe=on,
framecolor=,
rulethickness=1pt]

  \setupinteraction[state=start]

  \setupfooter[margin][strut=no]

  \setupfootertexts[{Page \pagenumber\ of \goto{\lastpagenumber}[lastpage]}]

  \setupfootertexts
[margin]
[]
[{\externalfigure[logo.png][height=]}]
[]
[{\externalfigure[logo.png][height=]}]

  \starttext
   \dorecurse{20}{\input knuth}
  \stoptext


[image: logo.png]

Le mer. 15 août 2018 à 06:10, Henri Menke  a écrit :

> You have to use the correct margin width, i.e. \rightmarginwidth in the
> right margin and vice versa in the left margin.  You should also scale
> the margins to fit in the backspace/cutspace because by default they
> don't and run off the paper.
>
> \showframe
> \useMPlibrary[dum]
> \setuplayout
>[height=middle,
> width=middle,
> backspace=2cm,
> topspace=10mm,
> bottomspace=10mm,
> header=10mm,
> footer=10mm,
> footerdistance=10mm,
> headerdistance=10mm,
>
>
> leftmargin=\dimexpr\layoutparameter{backspace}-\layoutparameter{leftmargindistance}\relax,
>
>
> cutspace=\dimexpr\layoutparameter{rightmargin}+\layoutparameter{rightmargindistance}\relax]
>
> \setupfooter[margin][strut=no]
>
> \setupfootertexts
>[margin]
>[]
>[{\externalfigure[dummy][width=\rightmarginwidth,height=\footerheight]}]
>[]
>[{\externalfigure[dummy][width=\leftmarginwidth,height=\footerheight]}]
>
> \starttext
> \dorecurse{10}{\page[dummy]}
> \stoptext
>
>
> On 14/08/18 22:50, Fabrice Couvreur wrote:
> > Hi Henri,
> > Thank you for your suggestion.
> > However, I believe that my way of doing should not be the best because
> > fixing width=\marginwidth the image is cropped.
> > Fabrice
> >
> >
> > \showframe
> > \useMPlibrary[dum]
> > \setuplayout
> >[height=middle,
> > width=middle,
> > backspace=2cm,
> > topspace=10mm,
> > bottomspace=10mm,
> > header=10mm,
> > footer=10mm,
> > footerdistance=10mm,
> > headerdistance=10mm]
> >
> > \setupfooter[margin][strut=no]
> >
> > \setupfootertexts
> >  [margin]
> >  []
> >  [{\externalfigure[dummy][width=,height=\footerheight]}]
> >  []
> >  [{\externalfigure[dummy][width=\marginwidth,height=\footerheight]}]
> >
> >  \starttext
> >  \dorecurse{10}{\page[dummy]}
> >  \stoptext
> >
> >
> > Le mar. 14 août 2018 à 12:18, Henri Menke  > <mailto:henrime...@gmail.com>> a écrit :
> >
> >
> >
> > On 14/08/18 22:13, Fabrice Couvreur wrote:
> >  > Hello,
> >  > I wish to place a small logo at the bottom of the page.
> >  > It works almost but it is not very well adjusted.
> >  > How to cure it ?
> >  > Thank you.
> >  > fabrice
> >  >
> >  > \showframe
> >  > \useMPlibrary[dum]
> >  > \setuplayout
> >  >[height=middle,
> >  > width=middle,
> >  > backspace=2cm,
> >  > topspace=10mm,
> >  > bottomspace=10mm,
> >  > header=10mm,
> >  > footer=10mm,
> >  > footerdistance=10mm,
> >  > headerdistance=10mm]
> >  >
> >
> > \setupfooter[margin][strut=no]
> >
> >  > \setupfootertexts
> >  >  [margin]
> >  >  []
> >  >
> > [{\externalfigure[dummy][width=\marginwidth,height=\footerheight]}]
> >  >  []
> >  >
> > [{\externalfigure[dummy][width=\marginwidth,height=\footerheight]}]
> >  >
> >  >  \starttext
> >  >  \dorecurse{10}{\page[dummy]}
> >  >  \stoptext
> >  >
> >  >
> >  >
> >
>  
> __

Re: [NTG-context] Logo in the margin at the bottom of the page

2018-08-14 Thread Fabrice Couvreur
Hi Hraban,
It seems a little more complicated but I have never used the layers.
Fabrice

Le mar. 14 août 2018 à 13:11, Henning Hraban Ramm  a écrit :

> Am 2018-08-14 um 12:13 schrieb Fabrice Couvreur <
> fabrice1.couvr...@gmail.com>:
>
> > Hello,
> > I wish to place a small logo at the bottom of the page.
> > It works almost but it is not very well adjusted.
> > How to cure it ?
>
> Salut,
> while the footer text approach may be viable, I’d use layers for exact
> placement.
> http://wiki.contextgarden.net/Layers
>
> Greetlings, Hraban
> ---
> https://www.fiee.net
> http://wiki.contextgarden.net
> https://www.dreiviertelhaus.de
> GPG Key ID 1C9B22FD
>
>
>
> ___
> 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] Logo in the margin at the bottom of the page

2018-08-14 Thread Fabrice Couvreur
Hi Henri,
Thank you for your suggestion.
However, I believe that my way of doing should not be the best because
fixing width=\marginwidth the image is cropped.
Fabrice


\showframe
\useMPlibrary[dum]
\setuplayout
  [height=middle,
   width=middle,
   backspace=2cm,
   topspace=10mm,
   bottomspace=10mm,
   header=10mm,
   footer=10mm,
   footerdistance=10mm,
   headerdistance=10mm]

\setupfooter[margin][strut=no]

\setupfootertexts
[margin]
[]
[{\externalfigure[dummy][width=,height=\footerheight]}]
[]
[{\externalfigure[dummy][width=\marginwidth,height=\footerheight]}]

\starttext
\dorecurse{10}{\page[dummy]}
\stoptext


Le mar. 14 août 2018 à 12:18, Henri Menke  a écrit :

>
>
> On 14/08/18 22:13, Fabrice Couvreur wrote:
> > Hello,
> > I wish to place a small logo at the bottom of the page.
> > It works almost but it is not very well adjusted.
> > How to cure it ?
> > Thank you.
> > fabrice
> >
> > \showframe
> > \useMPlibrary[dum]
> > \setuplayout
> >[height=middle,
> > width=middle,
> > backspace=2cm,
> > topspace=10mm,
> > bottomspace=10mm,
> > header=10mm,
> > footer=10mm,
> > footerdistance=10mm,
> > headerdistance=10mm]
> >
>
> \setupfooter[margin][strut=no]
>
> > \setupfootertexts
> >  [margin]
> >  []
> >  [{\externalfigure[dummy][width=\marginwidth,height=\footerheight]}]
> >  []
> >  [{\externalfigure[dummy][width=\marginwidth,height=\footerheight]}]
> >
> >  \starttext
> >  \dorecurse{10}{\page[dummy]}
> >  \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
> >
> ___
> >
>
> ___
> 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] Scite + ConTeXt

2018-08-14 Thread Fabrice Couvreur
Hi Ken,
In which file ?
Fabrice


Le mar. 14 août 2018 à 02:18, Ken Moffat  a écrit :

> On Tue, Aug 14, 2018 at 01:54:06AM +0200, Fabrice Couvreur wrote:
>
> > How to have evince as the default reader ?
> >
> perhaps
>
>  xdg-mime default evince.desktop application/pdf
>
> ĸen
> --
>Entropy not found, thump keyboard to continue
>
>
> ___
> 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
___

[NTG-context] Logo in the margin at the bottom of the page

2018-08-14 Thread Fabrice Couvreur
Hello,
I wish to place a small logo at the bottom of the page.
It works almost but it is not very well adjusted.
How to cure it ?
Thank you.
fabrice

\showframe
\useMPlibrary[dum]
\setuplayout
  [height=middle,
   width=middle,
   backspace=2cm,
   topspace=10mm,
   bottomspace=10mm,
   header=10mm,
   footer=10mm,
   footerdistance=10mm,
   headerdistance=10mm]

\setupfootertexts
[margin]
[]
[{\externalfigure[dummy][width=\marginwidth,height=\footerheight]}]
[]
[{\externalfigure[dummy][width=\marginwidth,height=\footerheight]}]

\starttext
\dorecurse{10}{\page[dummy]}
\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
___

[NTG-context] Scite + ConTeXt

2018-08-13 Thread Fabrice Couvreur
Hello,
As I am having some problems with Emacs, I will try to use Scite !

1. How to insert an environment ?
That is with AUCTEX + Emacs, I was doing C-c C-e but how do with Scite ?

2. To compile, I do Alt + F12 (Run with jit) and it works but how to have
the test.pdf output because F5 (go) gives me  > gv test.pdf then RET but
nothing ...
How to have evince as the default reader ?

3. How to have highlighting of context code with Scite ?

Thanks
Fabrice
___
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] Enumerations in an environment

2018-08-13 Thread Fabrice Couvreur
Hello,
How to have :

Démonstration --- 1.one
2.two
3.three

Thanks
Fabrice

\defineenumeration
  [proof]
  [text=Démonstration,
   alternative=serried,
   number=no,
   headcommand=\groupedcommand{}{~---~},
   headstyle=bolditalic,
   %headcommand=\groupedcommand{}{:\,},
   width=broad,
   closesymbol={\symbol[square]}]

\starttext

\startproof
   \startitemize[n]
   \item one
   \item two
   \item three
   \stopitemize
 \stopproof

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

[NTG-context] stix2-mathscr with ConTeXt

2018-08-09 Thread Fabrice Couvreur
Hello,
Is it possible to get this type of letter with ConTeXt ?
Thank you
Fabrice


[image: mathscr.png]
___
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] Define the dimensions of a layout

2018-08-08 Thread Fabrice Couvreur
Hello,
I want the text area to be surrounded by a margin of 20 mm (top, right,
left and bottom).
I have already done this to have a left and right margin of 20 mm.

\setuplayout
  [height=middle,
   backspace=20mm,
   width=middle]

I  think that I must now have :

topdistance + header + headerdistance = 20mm

footerdistance + footer + bottomdistance + bottom = 20 mm

How to do ?
Thanks
Fabrice
___
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] How to control the space between the bottom of the frame and the text?

2018-08-07 Thread Fabrice Couvreur
Hello,
I find that the text is near the bottom line of the frame, how to add a
little space ?
Thanks
Fabrice

\defineframed
  [ACFRAME]
  [frame=on,
   width=fit,
   align=flushleft,
   location=low,
   background=color,
   backgroundcolor=lightgray]

\defineenumeration
  [exercice]
  [text={Exercice},
   headstyle={\bf\feature[+][f:smallcaps]},
   headcommand=\ACFRAME,
   numberconversionset=ACCONVERSION,
   width=fit,
   stopper={.},
   alternative=serried]

\defineprocessor[ACPROCESSOR][color=red]

\defineconversionset[ACCONVERSION][][ACPROCESSOR->n]


\setupbodyfont[pagella]

\starttext
\startexercice
\input ward
\stopexercice
\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
___

[NTG-context] Fwd: Problem of compiling a file with Emacs

2018-08-01 Thread Fabrice Couvreur
-- Forwarded message --
From: Fabrice Couvreur 
Date: 2018-08-02 0:07 GMT+02:00
Subject: Re: [NTG-context] Problem of compiling a file with Emacs
To: Lizardo Reyna 


Hello,
I tried this :

\starttext

\startMPcode
 draw outlinetext.f
 ("\bf 1")
 (withcolor "lightgray")
 ysized 50pt ;
\stopMPcode

\startMPcode
 pickup pencircle scaled 1mm ;
path p ; p := fullcircle scaled 3cm ;
draw p withcolor .625yellow ;
vardef do (expr str) =
  save currentpicture ; picture currentpicture ;
  currentpicture := thelabel(str,origin) ;
  draw boundingbox currentpicture withpen pencircle scaled .5pt ;
  currentpicture
enddef ;
\stopMPcode

\stoptext

The first code does not compile; I get a small rectangle instead of the
number 1.
The second code compiles correctly.
We will have tried, thank you !
Fabrice

2018-08-01 16:27 GMT+02:00 Lizardo Reyna :

> The issue is very strange, the log file shows no errors. However, the
> metapost code is not showed in the pdf file when is complied from emacs
> (only in your computer).
>
> This happen with any metapost code?
>
> I can't find what is not working well.
>
>
>
> On 31/07/18 16:51, Fabrice Couvreur wrote:
> > Hi,
> > I do not think the installation is incorrect (I have nevertheless
> > reinstalled the latest version) because the compilation works perfectly
> > with this :
> >
> > [aragorn@fab ~]$ /home/aragorn/context/tex/texmf-linux-64/bin/context
> > Test.tex
> >
> > I compiled with Emacs using the standalone version by putting  (setenv
> > "PATH" "/home/aragorn/context/tex/texmf-linux-64/bin:$PATH" t) in my
> > ~/.emacs but still without success, it's still strange.
> >
> >
> > Running `ConTeXt' on `Test' with ``context --once --texutil  --nonstop
> > Test.tex''
> > resolvers   | trees | analyzing 'home:texmf'
> > mtx-context | run 1: luatex
> > --fmt="/home/aragorn/context/tex/texmf-cache/luatex-cache/co
> ntext/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en"
> > --interaction="nonstopmode" --jobname="Test"
> > --lua="/home/aragorn/context/tex/texmf-cache/luatex-cache/co
> ntext/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui"
> > --no-parse-first-line --c:currentrun=1 --c:fulljobname="./Test.tex"
> > --c:input="./Test.tex" --c:kindofrun=3 --c:maxnofruns=1 --c:nonstopmode
> > --c:once --c:texutil "cont-yes.mkiv"
> >
> > This is LuaTeX, Version 1.08.0 (TeX Live 2018)
> >  system commands enabled.
> >
> > resolvers   > trees > analyzing 'home:texmf'
> > open source > level 1, order 1, name
> > '/home/aragorn/context/tex/texmf-context/tex/context/base/
> mkiv/cont-yes.mkiv'
> > system  >
> > system  > ConTeXt  ver: 2018.07.27 19:12 MKIV beta  fmt:
> > 2018.7.30  int: english/english
> > system  >
> > system  > 'cont-new.mkiv' loaded
> > open source > level 2, order 2, name
> > '/home/aragorn/context/tex/texmf-context/tex/context/base/
> mkiv/cont-new.mkiv'
> > system  > beware: some patches loaded from cont-new.mkiv
> > close source> level 2, order 2, name
> > '/home/aragorn/context/tex/texmf-context/tex/context/base/
> mkiv/cont-new.mkiv'
> >
> > system  > files > jobname 'Test', input './Test', result 'Test'
> > fonts   > latin modern fonts are not preloaded
> > languages   > language 'en' is active
> > open source > level 2, order 3, name '/home/aragorn/Test.tex'
> > fonts   > preloading latin modern fonts (second stage)
> > fonts   > 'fallback modern-designsize rm 12pt' is loaded
> > structure   > sectioning > title @ level 2 : 0.0 -> Sommaire
> > backend > xmp > using file
> > '/home/aragorn/context/tex/texmf-context/tex/context/base/
> mkiv/lpdf-pdx.xml'
> > pages   > flushing realpage 1, userpage 1, subpage 1
> > structure   > sectioning > chapter @ level 2 : 0.1 -> Espaces
> > probabilisés
> > metapost> initializing instance 'metafun:1' using format
> > 'metafun' and method 'default'
> > metapost> loading 'metafun' as
> > '/home/aragorn/context/tex/texmf-context/metapost/context/
> base/mpiv/metafun.mpiv'
> > using method 'default'
> > metapost> initializing number mode 'scaled'
> > structure   > sectioning > subsection @ level 4 : 0.1.0.1 ->
> > Expérience aléatoire et univers
> > structure   > sectioning > subsection @ 

Re: [NTG-context] Problem with an enumeration

2018-08-01 Thread Fabrice Couvreur
Hi Wolfgang,
Thank you very much !
Fabrice

2018-08-01 21:21 GMT+02:00 Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com>:

> Hi Fabrice,
>
> I found the following example in my mail archive.
>
> %%
> \define\ItemCommand
>   {\hskip\zeropoint\relax\autoinsertnextspace}
>
> \setupitemgroup
>   [itemize]
>   [color=darkred,
>distance=0pt]
>
> \setupitemgroup
>   [itemize:1]
>   [option={n,packed,fit,intext},
>command=\ItemCommand]
>
> \setupitemgroup
>   [itemize:2]
>   [lefttext=,
>righttext=,
>option={a,text}]
>
> \starttext
>
> \startitemize
>
> \item We thrive in \unknown
>
> \item \startitemize
> \item \input tufte\par
> \item \input tufte
> \stopitemize
>
> \stopitemize
>
> \stoptext
> %%
>
> PS. If you want an answer from me you should add me to cc because I have
> problems getting mails from the list.
>
> Wolfgang
>
>
> Fabrice Couvreur schrieb am 31.07.18 um 23:58:
>
> Hi Pablo,
> That's not what I'm looking for but rather this:
>
> *1.a.* blablablabla
> blablablabla
> *b.* blablablabla
> blablablabla
> *c.* blablablabla
> blablablabla
>
> Which explains the use of the key intext
> Fabrice
>
> 2018-07-31 13:31 GMT+02:00 Pablo Rodriguez :
>
>> On 07/31/2018 12:18 PM, Fabrice Couvreur wrote:
>> > Hello,
>> > Wolfgang helped me to get this:
>> >
>> > 1.a.
>> > b.
>> > c.
>> > 2.a
>> > b.
>> > c.
>> >
>> > I have unfortunately lost the code he had proposed to me. I get this:
>> >
>> > 1.a.
>> > 1b
>> > 1 C
>> > 2.a
>> > 2.b
>> > 2.c
>>
>> Hi Fabrice,
>>
>> I don’t get your output. I had to remove the "intext" option and I guess
>> I got what you intend:
>>
>> \setupitemgroup
>>[itemize][1]
>>[color=darkred,
>> distance=\spaceamount,
>> option={packed,fit,n}]
>>
>> \setupitemgroup
>>[itemize][2]
>>[color=darkred,
>> distance=\spaceamount,
>> option={packed,fit,a}]
>>
>> \starttext
>> \startitemize
>> \item \startitemize
>> \item \input zapf
>>
>> \item \input knuth
>>
>> \item \input montgomery
>> \stopitemize
>> \item \startitemize
>> \item \input zapf
>>
>> \item \input knuth
>>
>> \item \input montgomery
>> \stopitemize
>> \stopitemize
>> \stoptext
>>
>> I hope it helps,
>>
>> 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/list
>> info/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
> ___
>
>
>
___
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] Problem with an enumeration

2018-07-31 Thread Fabrice Couvreur
Hi Pablo,
That's not what I'm looking for but rather this:

*1.a.* blablablabla
blablablabla
*b.* blablablabla
blablablabla
*c.* blablablabla
blablablabla

Which explains the use of the key intext
Fabrice

2018-07-31 13:31 GMT+02:00 Pablo Rodriguez :

> On 07/31/2018 12:18 PM, Fabrice Couvreur wrote:
> > Hello,
> > Wolfgang helped me to get this:
> >
> > 1.a.
> > b.
> > c.
> > 2.a
> > b.
> > c.
> >
> > I have unfortunately lost the code he had proposed to me. I get this:
> >
> > 1.a.
> > 1b
> > 1 C
> > 2.a
> > 2.b
> > 2.c
>
> Hi Fabrice,
>
> I don’t get your output. I had to remove the "intext" option and I guess
> I got what you intend:
>
> \setupitemgroup
>[itemize][1]
>[color=darkred,
> distance=\spaceamount,
> option={packed,fit,n}]
>
> \setupitemgroup
>[itemize][2]
>[color=darkred,
> distance=\spaceamount,
> option={packed,fit,a}]
>
> \starttext
> \startitemize
> \item \startitemize
> \item \input zapf
>
> \item \input knuth
>
> \item \input montgomery
> \stopitemize
> \item \startitemize
> \item \input zapf
>
> \item \input knuth
>
> \item \input montgomery
> \stopitemize
> \stopitemize
> \stoptext
>
> I hope it helps,
>
> 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://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
___

[NTG-context] Problem with an enumeration

2018-07-31 Thread Fabrice Couvreur
Hello,
Wolfgang helped me to get this:

1.a.
b.
c.
2.a
b.
c.

I have unfortunately lost the code he had proposed to me. I get this:

1.a.
1b
1 C
2.a
2.b
2.c

Thanks
Fabrice


\setupitemgroup
   [itemize][1]
   [color=darkred,
distance=\spaceamount,
option={packed,fit,intext,n}]

\setupitemgroup
   [itemize][2]
   [color=darkred,
distance=\spaceamount,
option={packed,fit,intext,a}]
___
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] Placement of a figure made with TiKz

2018-07-29 Thread Fabrice Couvreur
Hello,
I do not understand why figure 2 does not fit correctly like the other two.
Thank you
Fabrice


\useMPlibrary[dum]

\usemodule[tikz]

\usemodule[pgfplots]
\pgfplotsset{compat=newest}
\usetikzlibrary{positioning}
\usetikzlibrary{calc}

\setuplayout
  [height=middle,
   width=middle,
   backspace=2cm,
   topspace=10mm,
   bottomspace=10mm,
   header=10mm,
   footer=10mm,
   footerdistance=10mm,
   headerdistance=10mm]

\showframe

\starttext

\placefigure[right]{first}{\externalfigure[dummy]}

\placefigure[right]{second}{
  \hbox{
\starttikzpicture[thick]
\switchtobodyfont[9pt]
\startaxis[
x=3cm,y=3cm,
axis line style = thick,
major tick style=black,
xtick={0,0.25,...,1},ytick={0,0.25,...,1},
ymin=-0.25,ymax=1.25,xmin=-0.25,xmax=1.5,
axis on top=true,
axis lines=middle,
tickwidth=0.15cm,
minor tick num=3,
major tick style = {thick, black},
axis line style = thick,
yticklabels={,,},
xticklabels={,,},
major tick style=black,
extra x ticks={1.25},
extra x tick label={\null},
xlabel=$x$,ylabel=$y$,
every axis x label/.style=
  {
at={(ticklabel* cs:1)},
anchor=west
  },
  every axis y label/.style=
  {
at={(ticklabel* cs:1)},
anchor=south
  },
  >=stealth]

\coordinate [label=below left  : $A$](A) at (0,0);
\coordinate [label=below right : $B$](B) at (1,0);
\coordinate [label=below right : $C$](C) at (1,1);
\coordinate [label=above left  : $D$](D) at (0,1);
\coordinate (M) at (0.25,0);
\coordinate (N) at (1,0.25);
\coordinate (P) at (0.75,1);
\coordinate (Q) at (0,0.75);

\node[below left] at (M) {$M$};
\node[right] at (N) {$N$};
\node[above] at (P) {$P$};
\node[left]  at (Q) {$Q$};

\node[left] at (0,1){$1$};
\node[below] at (1,0){$1$};

\draw (A)--(B)--(C)--(D)--cycle ;
\draw [draw=red, fill=red!70](M)--(N)--(P)--(Q)--cycle ;

\stopaxis
\stoptikzpicture
  }
}


\placefigure[right]{third}{
  \hbox{
\starttikzpicture
  \draw[draw=red,fill=red!70] (0,0) rectangle (3,3);
\stoptikzpicture
  }
}
\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] Set up a theorem style

2018-07-26 Thread Fabrice Couvreur
Hello,
Perhaps the key proposed by Wolfgang is what I want to do : put a dash
between the numbering and the text

\setupenumerations[
   before={\blank},
   after={\blank},
   text=Théorème ,
   alternative=serried,
   headstyle={\sc},
   prefix=yes,
   prefixsegments=chapter,
   way=bysection,
   *numberstopper={. ---},*
   style=italic,

]

\defineenumeration[theorem]

Fabrice


2018-07-25 12:15 GMT+02:00 Fabrice Couvreur :

> Hello,
> I used LaTeX for a long time before converting (with difficulty !) to
> ConteXt. For example, to define my new theorems, I used the amsthm
> package and I did this :
>
> \newtheoremstyle{theoremdd}% name of the style to be used
>   {\topsep}% measure of space to leave above the theorem. E.g.: 3pt
>   {\topsep}% measure of space to leave below the theorem. E.g.: 3pt
>   {\itshape}% name of font to use in the body of the theorem
>   {0pt}% measure of space to indent
>   {\bfseries}% name of head font
>  * {. ---}% punctuation between head and body*
>   { }% space after theorem head; " " = normal interword space
>   {\thmname{#1}\thmnumber{ #2}\thmnote{ (#3)}}
>
> \theoremstyle{theoremdd}
> \newtheorem{thmd}{Theorem}[section]
>
>
>
> I'm trying to do the same thing with ConTeXt but I can not do it
> completely :
>
> \setupenumerations[
>before={\blank},
>after={\blank},
>text=Théorème,
>alternative=serried,
>title=no,
>prefix=yes,
>prefixsegments=chapter,
>way=bysection,
>right=.,
>titlestyle=bold,
>style=italic,
>width=broad,
>
> ]
>
> \defineenumeration[theorem]
>
>
> \starttext
>
> \startchapter[title={First Chapter}]
> \startsection[title={First Section}]
>   \dorecurse{2}{
> \starttheorem
>   \input ward
> \stoptheorem}
> \stopsection
> \stopchapter
>
> \startchapter[title={Second Chapter}]
> \startsection[title={Second Section}]
> \dorecurse{2}{
> \starttheorem
>   \input ward
> \stoptheorem}
> \stopsection
> \stopchapter
>
> \stoptext
>
> Thanks
> Fabrice
>
___
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
___

  1   2   3   4   5   >