Re: [NTG-context] ! Missing = inserted for \ifnum.

2014-01-01 Thread Fabrice Couvreur
Hello,
Thank you, the problem is solved.
Fabrice


2014/1/1 Wolfgang Schuster schuster.wolfg...@gmail.com


 Am 01.01.2014 um 01:28 schrieb Fabrice couvreur.fabr...@wanadoo.fr:

  Hello,
  I discovered ConTeXt gradually, so be indulgent please.
  With the following command :
 
  [parabole1.pdf][scale=0.8]
  [...]
 
  This comes from the option scale = 0.8, because without it, the code
 compiles without problem.

 Change this to “scale=800”.

 Wolfgang


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

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

 ___

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

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

Re: [NTG-context] Problem to install Garamond font with mathdesign

2014-01-01 Thread Fabrice Couvreur
Hello,
The fonts are already installed on my system since I compile my documents
with LuaLaTeX.
I'll try to install, and come back to you if it does not work.
Fabrice


2014/1/1 Wolfgang Schuster schuster.wolfg...@gmail.com


 Am 31.12.2013 um 21:27 schrieb Fabrice couvreur.fabr...@wanadoo.fr:

 
  Hello,
  The following code does not load the Garamond font:
 
 
  \loadtypescriptfile[mathdesign]
  \setupbodyfont[garamond]
 
  \starttext
 
  Some random text and \math{f(x)=x^2+2x+4}
 
  \stoptext

 This doesn’t work with the context version from TeXLive because there are
 no typescripts which combines the urn garamond and mathdesign fonts.

 With a recent version of context standalone distribution this won’t be a
 problem because typescript have been added a while ago but you have to
 install the fonts yourself.

 Wolfgang

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

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

 ___

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

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

Re: [NTG-context] Problem to install Garamond font with mathdesign

2014-01-01 Thread Fabrice Couvreur
Hi,
This seems to work.
=
\loadtypescriptfile[mathdesign]
\setupbodyfont[garamond]

\starttext

Some random text and \math{\alpha=\frac{-b}{2a}}

\stoptext

mtx-context | run 1: luatex
--fmt=/home/fab/texlive/2013/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex/cont-en
--jobname=demo5
--lua=/home/fab/texlive/2013/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex/cont-en.lui
--no-parse-first-line --c:currentrun=1 --c:fulljobname=./demo5.tex
--c:input=./demo5.tex --c:kindofrun=1 --c:maxnofruns=8 cont-yes.mkiv
This is LuaTeX, Version beta-0.76.0-2013061708 (rev 4627)
 \write18 enabled.
(/home/fab/texlive/2013/texmf-dist/tex/context/base/cont-yes.mkiv

ConTeXt  ver: 2013.05.28 00:36 MKIV current  fmt: 2013.12.31  int:
english/english

system   'cont-new.mkiv' loaded
(/home/fab/texlive/2013/texmf-dist/tex/context/base/cont-new.mkiv)
system   files  jobname 'demo5', input './demo5', result 'demo5'
fontslatin modern fonts are not preloaded
languageslanguage 'en' is active
(/home/fab/demo5.tex
(/home/fab/texlive/2013/texmf-dist/tex/context/base/type-imp-mathdesign.mkiv)
fontstypescripts  unknown library 'loc'
{/home/fab/texlive/2013/texmf-dist/fonts/map/dvips/mathdesign/mdugm.map}{/home/fab/texlive/2013/texmf-dist/fonts/map/pdftex/context/mkiv-base.map}
fontsvirtual math  the mapping is incomplete for 'mdugmrm' at
7pt
fontsvirtual math  the mapping is incomplete for 'mdugmbf' at
7pt
backend  xmp  using file
'/home/fab/texlive/2013/texmf-dist/tex/context/base/lpdf-pdx.xml'
pagesflushing realpage 1, userpage 1
 )
)/home/fab/texmf/fonts/type1/urw/garamond/ugmr8a.pfb{/home/fab/texlive/2013/texmf-dist/fonts/enc/dvips/ly1/texnansi.enc}/home/fab/texmf/fonts/type1/urw/garamond/ugmr8a.pfb/home/fab/texmf/fonts/type1/urw/garamond/ugmr8a.pfb/home/fab/texlive/2013/texmf-dist/fonts/type1/public/mathdesign/mdugm/md-gmr7y.pfb/home/fab/texlive/2013/texmf-dist/fonts/type1/public/mathdesign/mdugm/md-gmri7m.pfb/home/fab/texmf/fonts/type1/urw/garamond/ugmri8a.pfb

mkiv lua stats   used config file:
selfautoparent:/texmfcnf.lua;selfautoparent:/texmf-dist/web2c/texmfcnf.lua
mkiv lua stats   used cache path: readable+writable:
'/home/fab/texlive/2013/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9'
mkiv lua stats   resource resolver: loadtime 0.084 seconds, 2 scans with
scantime 0.012 seconds, 125 shared scans, 59 found files, scanned paths:
/home/fab/.texlive2013/texmf-config /home/fab/texmf
mkiv lua stats   stored bytecode data: 329 modules (0.170 sec), 69 tables
(0.010 sec), 398 chunks (0.180 sec)
mkiv lua stats   cleaned up reserved nodes: 41 nodes, 9 lists of 441
mkiv lua stats   node memory usage: 2 glue, 2 penalty, 9 attribute, 28
glue_spec, 3 attribute_list
mkiv lua stats   node list callback tasks: 6 unique task lists, 6
instances (re)created, 40 calls
mkiv lua stats   used backend: pdf (backend for directly generating pdf
output)
mkiv lua stats   loaded patterns: en::2, load time: 0.000
mkiv lua stats   jobdata time: 0.001 seconds saving, 0.000 seconds loading
mkiv lua stats   callbacks: 549 direct, 320 indirect, 869 total
mkiv lua stats   randomizer: resumed with value 0.77561070806142
mkiv lua stats   lxml preparation time: 0.000 seconds, 0 nodes, 15 lpath
calls, 0 cached calls
mkiv lua stats   result saved in file: demo5.pdf, compresslevel 3,
objectcompreslevel 3
mkiv lua stats   loaded fonts: 30 files: md-gmm7m.tfm, md-gmm7v.tfm,
md-gmm7y.tfm, md-gmm8y.tfm, md-gmmi7m.tfm, md-gmmi8y.tfm, md-gmmma.tfm,
md-gmmmb.tfm, md-gmr7m.tfm, md-gmr7v.tfm, md-gmr7y.tfm, md-gmr8y.tfm,
md-gmri7m.tfm, md-gmri8y.tfm, md-gmrma.tfm, md-gmrmb.tfm, mdugmm7m.tfm,
mdugmm7v.tfm, mdugmm7y.tfm, mdugmmi7m.tfm, mdugmmma.tfm, mdugmmmb.tfm,
mdugmr7m.tfm, mdugmr7v.tfm, mdugmr7y.tfm, mdugmri7m.tfm, mdugmrma.tfm,
mdugmrmb.tfm, ugmm8a.afm, ugmr8a.afm
mkiv lua stats   fonts load time: 0.185 seconds
mkiv lua stats   luatex banner: this is luatex, version
beta-0.76.0-2013061708  (tex live 2013) (rev 4627)
mkiv lua stats   control sequences: 37496 of 65536 + 10
mkiv lua stats   current memory usage: 73 MB (ctx: 73 MB)
mkiv lua stats   runtime: 0.539 seconds, 1 processed pages, 1 shipped
pages, 1.855 pages/second

system  | total runtime: 0.718
=


Thank you.


2014/1/2 Fabrice Couvreur fabrice1.couvr...@gmail.com

 Hello,
 The fonts are already installed on my system since I compile

[NTG-context] ConTeXt with Emacs

2014-01-10 Thread Fabrice Couvreur
Hello,
I use Emacs as an editor and I compile my files with LuaLaTeX by adding the
following lines to the end of the file:

%%% Local Variables:
%%% Mode: LaTeX
%%% LaTeX-command LuaLaTeX-shell-escape
%%% End:

I discovered ConTeXt, and I would like to know which lines to add to the
end of files.
Thank you.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] ConTeXt with Emacs

2014-01-10 Thread Fabrice Couvreur
Thank you for the answers.
If I summarize, we can not comment on the files at the end because
everything that comes after \stoptext is ignored.
I was already using the command line 'contest file.tex.
Or Set ConTeXt as my default TeX flavor in the AUCTEX settings.


2014/1/10 Willi Egger cont...@boede.nl

 in the simplest case a Context document consists of

 \starttext
 Your text
 \stoptext

 (commented) lines added after \stoptext are ignored.

 Willi
 On 10 jan. 2014, at 19:52, Fabrice Couvreur fabrice1.couvr...@gmail.com
 wrote:

 Hello,
 I use Emacs as an editor and I compile my files with LuaLaTeX by adding
 the following lines to the end of the file:

 %%% Local Variables:
 %%% Mode: LaTeX
 %%% LaTeX-command LuaLaTeX-shell-escape
 %%% End:

 I discovered ConTeXt, and I would like to know which lines to add to the
 end of files.
 Thank you.

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

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

 ___




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

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

 ___

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

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

Re: [NTG-context] ConTeXt with Emacs

2014-01-10 Thread Fabrice Couvreur
Thank you all,
C-c C-c displayed  'Command : (default ConTeXt)' then  RET, and the file is
compiled.
Only a second C-c C-c does not allow me to have  'Command : (default View)'.
How ?


2014/1/10 Mica Semrick paperdig...@gmail.com

 my .emacs looks like this:

 ;; Open in ConTeXt mode
 (add-hook 'LaTeX-mode-hook 'TeX-PDF-mode) ;; AucTeX turn on PDF mode by
 default
 (add-hook 'LaTeX-mode-hook (function turn-on-reftex)) ;; Turn on RefTeX
 when AucTeX loads
 (add-hook 'ConTeXt-mode-hook 'yas/minor-mode-on) ;; Turn on YaSnippet
 minor mode in ConTeXt-en-mode
 (add-hook 'ConTeXt-mode-hook (function turn-on-reftex)) ;; Turn on RefTeX
 when AucTeX loads
 (setq TeX-default-mode 'context-mode) ;; Make context-mode the default
 tex-mode
 (setq reftex-plug-into-AUCTeX t) ;; Turn on RefTeX when AucTeX loads
 (add-hook 'TeX-mode-hook '(lambda () (TeX-fold-mode 1)))

 ;; Add option for MKIV and make it the default for C-c C-c

 (add-hook 'ConTeXt-mode-hook (lambda()
 (add-to-list 'TeX-command-list '(ConTeXt MKIV context %t TeX-run-TeX
 nil (context-mode) ))
 (setq TeX-command-default ConTeXt MKIV)
 (setq TeX-save-query  nil )
 ))




 On Fri, Jan 10, 2014 at 1:37 PM, Peter Münster pmli...@free.fr wrote:

 On Fri, Jan 10 2014, Fabrice Couvreur wrote:

  %%% Local Variables:
  %%% Mode: LaTeX
  %%% LaTeX-command LuaLaTeX-shell-escape
  %%% End:

 %%% Local Variables:
 %%% Mode: context
 %%% End:

 For using context instead of texexec, put this in your init-file:

 (eval-after-load 'tex
   '(add-to-list
   'TeX-command-list
   '(ConTeXt context --nonstopmode %t
 TeX-run-TeX nil (context-mode) :help Run ConTeXt)))

 If you prefer to use context-mode by default for every file with .tex as
 suffix, then you can add this to your init-file:

 (add-to-list 'auto-mode-alist '(\\.tex\\' . context-mode))

 Then you won't need the Local Variables section at the end of each
 ConTeXt-file.

 --
Peter

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

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

 ___




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

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

 ___

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

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

Re: [NTG-context] ConTeXt with Emacs

2014-01-10 Thread Fabrice Couvreur
Sorry Peter, but I do not understand what you mean by So just pressing up.



2014/1/10 Peter Münster pmli...@free.fr

 On Fri, Jan 10 2014, Fabrice Couvreur wrote:

  Only a second C-c C-c does not allow me to have 'Command : (default
 View)'.
  How ?

 http://www.ntg.nl/pipermail/ntg-context/2013/075877.html

 --
Peter

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

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

 ___

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

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

Re: [NTG-context] ConTeXt with Emacs

2014-01-10 Thread Fabrice Couvreur
oops !
I just realized.
Sorry for this useless post.


2014/1/11 Fabrice Couvreur fabrice1.couvr...@gmail.com

 Sorry Peter, but I do not understand what you mean by So just pressing
 up.



 2014/1/10 Peter Münster pmli...@free.fr

 On Fri, Jan 10 2014, Fabrice Couvreur wrote:

  Only a second C-c C-c does not allow me to have 'Command : (default
 View)'.
  How ?

 http://www.ntg.nl/pipermail/ntg-context/2013/075877.html

 --
Peter

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

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

 ___



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

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

[NTG-context] New header

2014-01-18 Thread Fabrice Couvreur
Hi,
I use the following header to my statements made with tittlesec package.

\makeatletter

\newcommand{\@classe}[1]{}
\newcommand{\classe}[1]{\gdef\@classe{#1}}
\newcommand{\@typedevoir}[1]{}
\newcommand{\typedevoir}[1]{\gdef\@typedevoir{#1}}
\newcommand{\@numerodevoir}[1]{}
\newcommand{\numerodevoir}[1]{\gdef\@numerodevoir{#1}}
\AtBeginDocument{\section{\@typedevoir\space\no\@numerodevoir}}
\titleformat{\section}[frame]
  {\normalfont}
  {\footnotesize\enspace\itshape\@classe\enspace--\enspace Le
\@date\enspace}
  {10pt}
  {\Large\scshape\bfseries\filcenter}
  \makeatother

I want to gradually move to ConTeXt and I tried to create the same header.
But I do not yet know all the commands to do with ConTeXt.

\setuptextrules
[style=\it,location=top]
\define[6]\MyHeader{%

\textrule[top]{#1\space--\space\date[d=#2,m=#3,y=#4]}{\startlinealignment[middle]{\cap
\bf #5 \space n\high{{o}}\space {#6}}\stoplinealignment\blank\textrule}}

\starttext
\MyHeader{Seconde GTA}{11}{1}{2014}{Devoir de Mathématiques}{7}
\stoptext
Thank you.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] New header

2014-01-21 Thread Fabrice Couvreur
Hello,
Thank you for your reply. I do not understand all of the code, even if I use
MetaPost but with Asymptote.
I would also fit the dimensions of my papers as I used to do (\usepackage [
a4paper, hmargin = 1.5cm, vmargin =1.5cm] {geometry})
Thank you.


attachment.tex
Description: TeX document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] New header

2014-01-22 Thread Fabrice Couvreur
Hi Joshua,
To the right and left but not up and down. I would like margin to 1.5cm on
the right, left, up and down.
Thank you.


2014/1/21 Joshua Krämer joshua.krae...@gmail.com

 Am Tue, 21 Jan 2014 20:02:19 +0100
 schrieb Fabrice Couvreur fabrice1.couvr...@gmail.com:

  I would also fit the dimensions of my papers as I used to do
  (\usepackage [ a4paper, hmargin = 1.5cm, vmargin =1.5cm] {geometry})
  Thank you.

 There is a wiki page about setting up the page layout:
 http://wiki.contextgarden.net/Layout

 The following sets the space around the type area to 1.5cm:

 \setuplayout
 [
 backspace=1.5cm,
 width=middle,
 topspace=1.5cm,
 height=middle,
 ]
 \showframe % very useful when setting up the layout
 \starttext
 \input{knuth}
 \stoptext

 Kind regards,
 Joshua Krämer



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

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

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

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

Re: [NTG-context] New header

2014-01-22 Thread Fabrice Couvreur
Thank you Wolfgang.
With LuaLaTeX, for my header, I use the commands \footnotesize\itshape
and \Large\scshape.
Is there an equivalent with ConTeXt ?


2014/1/22 Wolfgang Schuster schuster.wolfg...@gmail.com

 You have to disable the header and footer by setting the values to 0pt.

 \setuplayout
   [backspace=15mm,
width=middle,
topspace=15mm,
height=middle,
header=0pt,
footer=0pt]

 \showframe

 \starttext
 \input knuth
 \stoptext

 You can also use the fullpage module when you equal margins for your
 document.

 \usemodule[fullpage][style={margin,empty},margin=15mm]

 \showframe

 \starttext
 \input knuth
 \stoptext

 Wolfgang


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

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

 ___

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

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

Re: [NTG-context] New header

2014-01-23 Thread Fabrice Couvreur
Hi,
I lacked precision in my post, I forgot to say that the header is an idea of
Hans with Metapost.
I would like to have:
p: = textext (\footnotesize \itshape \quad # where \space \endash \space \
time [# d = day, m = month #, # y = year] \quad and

  \ framed [
 width = \hsize,
 height = 5em,
 foregroundstyle = \Large \scshape \bf,
 background = whatever,
 frame = off,
 ]
Thank you.


2014/1/22 Aditya Mahajan adit...@umich.edu

 On Wed, 22 Jan 2014, Fabrice Couvreur wrote:

  Thank you Wolfgang.
 With LuaLaTeX, for my header, I use the commands \footnotesize\itshape
 and \Large\scshape.
 Is there an equivalent with ConTeXt ?


 \setupheader[style={\switchtobodyfont[small]\italic}]
 \setupfooter[style={\switchtobodyfont[big]\smallcaps}]

 You can also try

 style=\itx\setupinterlinespace (or \itxx)

 or

 style=\scb\setupinterlinespace (or \sca \scc etc.)

 See:

 http://wiki.contextgarden.net/Font_Switching
 http://wiki.contextgarden.net/Style_Alternatives


 Aditya

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

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



attachment.tex
Description: TeX document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Lucida fonts with ConTeXt

2014-01-29 Thread Fabrice Couvreur
Hi,
I want to use the Lucida fonts. I understand that these are commercial
fonts that
I must buy. What should buy and where ?
In the meantime, I tried to test the following file :

\setuppapersize[A4]
\setuplayout
  [backspace=15mm,
   width=middle,
   topspace=15mm,
   height=middle,
   header=0pt,
   footer=0pt]
\setuppagenumbering[location=]
\mainlanguage[fr]
\loadtypescriptfile[lucida-typeone]
\setupbodyfont[lucida,12pt]
\setupTABLE[each][each][width=1cm,height=1cm,align={middle,lohi}]
\starttext
\startluacode
context.bTABLE()
  context.bTR()
  context.bTD() context.math(x) context.eTD()
  context.bTD() context.math(f(x)) context.eTD()
  for i=-1,5 do
context.bTR()
context.bTD() context(i) context.eTD()
context.bTD() context(-i^2+5*i-8) context.eTD()
context.eTR()
  end
  context.eTR()
context.eTABLE()
\stopluacode
\stoptext

fab@debian:~$ source context/tex/setuptex
Setting /home/fab/context/tex as ConTeXt root.
fab@debian:~$ context demo10.tex

mtx-context | run 1: luatex
--fmt=/home/fab/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en
--jobname=demo10
--lua=/home/fab/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui
--no-parse-first-line --c:currentrun=1 --c:fulljobname=./demo10.tex
--c:input=./demo10.tex --c:kindofrun=1 --c:maxnofruns=8 cont-yes.mkiv
This is LuaTeX, Version beta-0.78.2 (TeX Live 2014/dev) (rev 4746)
 \write18 enabled.
(/home/fab/context/tex/texmf-context/tex/context/base/cont-yes.mkiv
job  passes  version mismatch: 1.22  1.24

ConTeXt  ver: 2014.01.26 16:07 MKIV beta  fmt: 2014.1.27  int:
english/english

system   'cont-new.mkiv' loaded
(/home/fab/context/tex/texmf-context/tex/context/base/cont-new.mkiv)
system   files  jobname 'demo10', input './demo10', result
'demo10'
fontslatin modern fonts are not preloaded
languageslanguage 'en' is active
(/home/fab/demo10.tex
(/home/fab/context/tex/texmf-context/tex/context/base/type-imp-lucida-typeone.mkiv){/home/fab/texmf/fonts/type1/bh/lucida/fonts/map/dvips/lucida.map}
fontsdefining  font with asked name 'LucidaBright' is not
found using lookup 'name'
fontsdefining  unknown font 'LucidaBright', loading aborted
fontsdefining  unable to define 'LucidaBright' as
'lucida-12pt-rm-tf-0--0'
{/home/fab/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
backend  xmp  using file
'/home/fab/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
pagesflushing realpage 1, userpage 1
 )
)/home/fab/texmf/fonts/type1/bh/lucida/fonts/afm/bh/lucida/lbr.afmType1:
Could not understand Type1 font:
/home/fab/texmf/fonts/type1/bh/lucida/fonts/afm/bh/lucida/lbr.afm
mtx-context | fatal error: return code: 1fab@debian:~$

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

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

Re: [NTG-context] Lucida fonts with ConTeXt

2014-01-29 Thread Fabrice Couvreur
If you have the type1 fonts

How do we know ?
Sorry, but I'm not at all an expert font !


2014-01-29 Aditya Mahajan adit...@umich.edu

 On Wed, 29 Jan 2014, Fabrice Couvreur wrote:

  Hi,
 I want to use the Lucida fonts. I understand that these are commercial
 fonts that
 I must buy. What should buy and where ?
 In the meantime, I tried to test the following file :

  

 \loadtypescriptfile[lucida-typeone]
 \setupbodyfont[lucida,12pt]


 ...

  )/home/fab/texmf/fonts/type1/bh/lucida/fonts/afm/bh/lucida/lbr.afmType1:
 Could not understand Type1 font:
 /home/fab/texmf/fonts/type1/bh/lucida/fonts/afm/bh/lucida/lbr.afm


 If you don't have the fonts, but the opentype version of the font rather
 than the type1 version. If you have the type1 fonts, it should be possible
 to use them with ConTeXt.

 Aditya

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

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

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

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

Re: [NTG-context] Lucida fonts with ConTeXt

2014-01-30 Thread Fabrice Couvreur
Hi,
Thank you to you for your answers. As I have to write text with math
formulas, I'll probably buy them.
Fabrice


2014-01-30 Hans Hagen pra...@wxs.nl

 On 1/29/2014 10:23 PM, Fabrice wrote:

 If you have the type1 fonts

 How do we know?
 Sorry, but I'm not at all an expert font !


 just buy the open type versions from tug ... less hassle and more complete

 Hans


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

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

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

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

[NTG-context] Hat with \widehat is not satisfactory

2014-02-05 Thread Fabrice Couvreur
Dear list,
I think the symbol of the angles is too close to the letters.
Is it possible to change this ?

\enablemode[pxmath]
\setupbodyfont[palatino,12pt]
\starttext
\startformula
\sin\widehat{PAM}
=\frac{AM}{PA}=\frac{\frac{\sqrt{2}}{4}}{\frac{\sqrt{6}}{2}}=\frac{\sqrt{2}}{4}\times\frac{2}{\sqrt{6}}=\frac{\sqrt{2}}{2}\times\frac{1}{\sqrt{6}}=\frac{\sqrt{3}}{2}.
\stopformula
\stoptext

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

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

Re: [NTG-context] OT: Reflections on usability ConTeXt for typesetting of mathematics

2014-02-10 Thread Fabrice Couvreur
Hi,
I begin to migrate slowly to ConTeXt, and I think it works very well for
writing mathematics.
I have a question : what is the most complete Math Font to write mathematics
with ConteXt course ?
thank you,
Fabrice


2014-02-10 9:45 GMT+01:00 Keith J. Schultz schul...@uni-trier.de:

 Hi Jaroslav,

 Math support in ConTeXt is quite good.

 For beginners there are pages in the Wiki.
 http://wiki.contextgarden.net/Math

 I have to admit some pages are dated, but still give valid examples.

 The Wiki is a good starting point and have links to external example
 pages.

 regards
 Keith.


 Am 09.02.2014 um 20:09 schrieb Jaroslav Hajtmar hajt...@gyza.cz:

  Hello ConTeXist.
  I am very sorry for this OFF TOPIC contribution.
 
  For writing of this text led me several hours of searching on internet.
 I was looking for ways to typing of non-elementary math in ConTeXt
 
  Already a long time I use ConTeXt typesetting lot of different things
 and I am very satisfied. In the many things, of which I typed, was maths
 represented only marginally and minimally. Now I need to type some
 mathematics (at secondary school level) and I found that I came across
 borders of my knowledge of ConTeXt, or on possibilities of ConTeXt for
 typesetting of mathematics.
  I do not in any way call into question the ability of ConTeXt
 typesetting mathematics, although I think that who wants to type
 mathematics then use LaTeX.
  I want find experience of users of ConTeXt for real using of ConTeXt for
 typesetting of mathematics. I wonder how users use possible math modules
 (exist anything?) to be usable results.
 
  I have a few questions:
 
  0. Do you think that this is only a problem for beginners of ConText or
 it is a general problem of ConTeXt?
  1. How many of ConTeXt users use this tool for typesetting of
 non-elementary mathematics?
  2. Are you satisfied with the results, which produces ConTeXt (thinking
 in the field of mathematics rate)?
  3. What things do you need to have in ConTeXt study that one could bet
 mathematics at a reasonable level?
  4. Is ConTeXt able to substitute LaTeX to typesetting of math (e.g. in
 the future)?
  5. Can you think of any more questions that should be here?
 
 
  I hope that my question will help other beginners who would like to
 typing of mathematics use ConText - this unique and useful tool.
 
  Thanks for all the answers.
 
  Jaroslav Hajtmar
 
 
 
 ___
  If your question is of interest to others as well, please add an entry
 to the Wiki!
 
  maillist : ntg-context@ntg.nl /
 http://www.ntg.nl/mailman/listinfo/ntg-context
  webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
  archive  : http://foundry.supelec.fr/projects/contextrev/
  wiki : http://contextgarden.net
 
 ___


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

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

 ___

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

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

Re: [NTG-context] OT: Reflections on usability ConTeXt for typesetting of mathematics

2014-02-11 Thread Fabrice Couvreur
Hi,
Unless I am mistaken, Cambria is a font available for Windows. I'm using
Linux, is it possible to install ? Is it free ? If yes, where can I download
it ?

Xits, I do not know.

Is it possible to put the uppercase = right  in math mode with Pagella ?
thank you,
Fabrice


2014-02-11 9:57 GMT+01:00 Mikael P. Sundqvist mic...@gmail.com:

 On Mon, Feb 10, 2014 at 6:57 PM, Hans Hagen pra...@wxs.nl wrote:

 On 2/10/2014 9:24 AM, Mikael P. Sundqvist wrote:

 Hi,

 I used ConTeXt (mkii) to write my PhD thesis in Mathematics in 2008. It
 worked just fine.

 At the moment I write some exams and hand-outs using ConTeXt, but
 research using LaTeX (since the journals do not really accept ConTeXt
 and my collaborators dont know ConTeXt).

 It certainly works OK to write math in ConTeXt, but I have a feeling
 that there are some things that are somewhat broken or not finetuned to
 output what mathematicians expect. Look at the attached pdf files [1]
 l.pdf (from LaTeX) and c.pdf (from latest standalone ConTeXt), with
 source l.tex and c.tex for some examples.


 In mkiv we follow some alternative approaches compared to mkii (and
 probably other tex macro packages) and some aspects indeed might need
 tuning (or more configuration options) .. I try hard to get away from
 hackery solutions (for several reasons).


 I agree it is good to avoid hackery as long as possible, and I for sure is
 ready to relearn how to write some things. With the examples I gave in the
 previous email in mind:

 * How am I supposed to write first derivative (f') and second derivative
 (f'') in such a way that they have the same type of prime (the prime in the
 first derivative is the one I prefer)?
 * How am I supposed to write f_xx'' to get the output as in the LaTeX
 example (i.e. so that the primes are over the xx)?
 * Could the default placement of limits in integrals be changed
 (integral=nolimits)? This is how it is done in almost all math books).
 * What about the size and finetuning of placement of indices in integrals
 and sums (and probably products, unions, ...)?
 * I remember I suggested that \| should be double bars in a previous
 thread on this list. Is there any drawback in giving double bars for \|? Of
 course I can relearn and use \lVert and \rVert, but I have a feeling that
 if we want people moving from LaTeX to ConTeXt, then this is the kind of
 things that should just work as expected...

 Best regards, Mikael




  When it comes to math environments, I think that thanks to the
 environments in http://dl.contextgarden.net/myway/mathalign.pdf
 http://dl.contextgarden..net/myway/mathalign.pdf we are OK. I

 sometimes miss the multline(d) environment from LaTeX.

 Best regards, Mikael

 [1]
 The attachments were too big, so I decided to put the pdf files on
 http://www.maths.lth.se/~mickep/l.pdf
 and
 http://www.maths.lth.se/~mickep/c.pdf




 On Sun, Feb 9, 2014 at 8:09 PM, Jaroslav Hajtmar hajt...@gyza.cz
 mailto:hajt...@gyza.cz wrote:

 Hello ConTeXist.
 I am very sorry for this OFF TOPIC contribution.

 For writing of this text led me several hours of searching on
 internet. I was looking for ways to typing of non-elementary math in
 ConTeXt

 Already a long time I use ConTeXt typesetting lot of different
 things and I am very satisfied. In the many things, of which I
 typed, was maths represented only marginally and minimally. Now I
 need to type some mathematics (at secondary school level) and I
 found that I came across borders of my knowledge of ConTeXt, or on
 possibilities of ConTeXt for typesetting of mathematics.
 I do not in any way call into question the ability of ConTeXt
 typesetting mathematics, although I think that who wants to type
 mathematics then use LaTeX.
 I want find experience of users of ConTeXt for real using of ConTeXt
 for typesetting of mathematics. I wonder how users use possible math
 modules (exist anything?) to be usable results.

 I have a few questions:

 0. Do you think that this is only a problem for beginners of ConText
 or it is a general problem of ConTeXt?
 1. How many of ConTeXt users use this tool for typesetting of
 non-elementary mathematics?
 2. Are you satisfied with the results, which produces ConTeXt
 (thinking in the field of mathematics rate)?
 3. What things do you need to have in ConTeXt study that one could
 bet mathematics at a reasonable level?
 4. Is ConTeXt able to substitute LaTeX to typesetting of math (e.g.
 in the future)?
 5. Can you think of any more questions that should be here?


 I hope that my question will help other beginners who would like to
 typing of mathematics use ConText - this unique and useful tool.

 Thanks for all the answers.

 Jaroslav Hajtmar


 
 ___

 If your question is of interest to others as well, please add an
 

Re: [NTG-context] OT: Reflections on usability ConTeXt for typesetting of mathematics

2014-02-11 Thread Fabrice Couvreur
Hi Martin,
Sorry, but I do not find fonts cambria and cambria math to install with
Debian.
thank you,
Fabrice


2014-02-11 14:18 GMT+01:00 Mikael P. Sundqvist mic...@gmail.com:

 On Tue, Feb 11, 2014 at 11:33 AM, Keith J. Schultz 
 schul...@uni-trier.dewrote:


 Am 11.02.2014 um 09:57 schrieb Mikael P. Sundqvist mic...@gmail.com:

 On Mon, Feb 10, 2014 at 6:57 PM, Hans Hagen pra...@wxs.nl wrote:

 On 2/10/2014 9:24 AM, Mikael P. Sundqvist wrote:

 Hi,

 I used ConTeXt (mkii) to write my PhD thesis in Mathematics in 2008. It
 worked just fine.

 At the moment I write some exams and hand-outs using ConTeXt, but
 research using LaTeX (since the journals do not really accept ConTeXt
 and my collaborators dont know ConTeXt).

 It certainly works OK to write math in ConTeXt, but I have a feeling
 that there are some things that are somewhat broken or not finetuned to
 output what mathematicians expect. Look at the attached pdf files [1]
 l.pdf (from LaTeX) and c.pdf (from latest standalone ConTeXt), with
 source l.tex and c.tex for some examples.


 In mkiv we follow some alternative approaches compared to mkii (and
 probably other tex macro packages) and some aspects indeed might need
 tuning (or more configuration options) .. I try hard to get away from
 hackery solutions (for several reasons).


 I agree it is good to avoid hackery as long as possible, and I for sure
 is ready to relearn how to write some things. With the examples I gave in
 the previous email in mind:

  * How am I supposed to write first derivative (f') and second derivative
 (f'') in such a way that they have the same type of prime (the prime in the
 first derivative is the one I prefer)?

 No sure if to call this a bug! It seems that a single prime is always
 larger than multiple ones!
 You can always change its size!


 I think the user should not have to change its size. All primes should
 have the same size, independent if they are one or several.



 * How am I supposed to write f_xx'' to get the output as in the LaTeX
 example (i.e. so that the primes are over the xx)?

 have to switch things around: f''_xx or f''_{xx}  depending on the actual
 result you want.


 I know about the grouping. Please have a look at my example files in my
 earlier post in this thread.




 * Could the default placement of limits in integrals be changed
 (integral=nolimits)? This is how it is done in almost all math books).

  Not sure what you want here! example? can be LateX


 As above, I gave examples...

 Best regards, Mikael



 * What about the size and finetuning of placement of indices in integrals
 and sums (and probably products, unions, ...)?
 * I remember I suggested that \| should be double bars in a previous
 thread on this list. Is there any drawback in giving double bars for \|? Of
 course I can relearn and use \lVert and \rVert, but I have a feeling that
 if we want people moving from LaTeX to ConTeXt, then this is the kind of
 things that should just work as expected...

 Best regards, Mikael


 regards
 Keith


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

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

 ___




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

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

 ___

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

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

[NTG-context] Too much space between the text and the beginning of the paragraph with the command \defineenumeration

2014-02-25 Thread Fabrice Couvreur
Hi,
I find that there is too much space between the text and the beginning of
the paragraph.

\defineenumeration[ex]
[text={\sc\bf Exercice},
location=left,
stopper={\bf.}]

For example, I use the \topset with LuaLaTeX order.
Thank you.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Too much space between the text and the beginning of the paragraph with the command \defineenumeration

2014-02-25 Thread Fabrice Couvreur
Sorry, but my question is unclear.
In fact, I created a new environment with the package amsthm in LuaLaTeX like
this :

\newtheoremstyle{exa}
  {\topsep}{\topsep}
  {}
  {0pt}
  {\strut\bfseries}
  {}
  {\newline}
  {\rule[0pt]{1mm}{1mm} \thmname{#1}\thmnumber{ \textup
  {#2}}\thmnote{ \textnormal{(#3)}}}
\theoremstyle{exa}
\newtheorem{ex}{Exercice}

I try to do the same with ConteXt.


 
correctiondm7_seconde.pdfhttps://docs.google.com/file/d/0B-mkD83s36jbYTJhVFpUdGw3SjQ/edit?usp=drive_web

@Wolfgang The paragraph should find the following line, and not on the
same line
of text.

@Peter I do not see what changes adding inbetween = .

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

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

[NTG-context] Too much space between the text and the beginning of the paragraph with the command \defineenumeration

2014-02-25 Thread Fabrice Couvreur
Because I'm really starting with ConteXt, and if I compile with location =
left or not, the result is the same (with minimal ConteXt).
For cons, I understand better the role of the option alternative = left,
right or top.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Problem with Module Units

2014-02-27 Thread Fabrice Couvreur
Hi,
I see that there is no space between the words pourand km.
Regards,
Fabrice


\usemodule[units]

\definetypeface [me] [rm] [serif] [pagella] [default]
\definetypeface [me] [ss] [sans]  [dejavu]  [default]
\definetypeface [me] [mm] [math]  [xits][default]
\setupbodyfont[me,12pt]

\starttext
Zeus désire se désaltérer avec un jus de planète pressée. La planète qu'il
va choisir dans le système solaire doit suffire à remplir à ras bord ses
deux verres de forme conique. Le premier verre a un rayon de base de 6000
\Unit \Kilo \Meter  pour une hauteur égale au rayon de la planète. Le
deuxième verre a un rayon de base égal à celui de la planète pour une
hauteur de 2000  \Unit \Kilo \Meter.

Le but de l'exercice est de trouver quelle planète sera sacrifiée.
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Symbol euro

2014-02-27 Thread Fabrice Couvreur
Hi,
I try to define the EURO symbol with :
\definesymbol [euro] [\ getglyph{Euro} {\ char160}], but it does not work.
Regards,
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Presentation template

2014-03-03 Thread Fabrice Couvreur
Hi,
I will try to rewrite some of my classes with ConTeXt. I would like to draw
inspiration from this model
http://www.pragma-ade.com/general/manuals/cont-eni.pdf
How to start ?
Is it possible to have the source code to understand ?
Thank you.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Problem with an environment

2014-03-06 Thread Fabrice Couvreur
I'm trying to built a template for evaluations of my students.
I have a problem with the head environment that does not take into account
the selected font and size.
Regards,
Fabrice


\environment environ-2

\environment environ-3

\environment header

\starttext

\MyOtherHeader{Seconde GTA}{20}{3}{2014}{{\ss \tfd \bf Correction du devoir
maison de Mathématiques} }{{\ss \bf \tfd 9}}

\startex
 \input knuth
 \stopex
\stoptext

##

\startenvironment environ-2

\loadtypescriptfile[mathdesign]

\definetypeface [mainface] [rm] [serif] [palatino] [default]

\definetypeface [mainface] [tt] [mono]  [modern] [default] [rscale=0.9]

\definetypeface [mainface] [mm] [math]  [xits] [default]

\setupbodyfont[mainface,11pt]

\setuppagenumbering[location=]

\setupexternalfigures[location={local,global,default}]

\setupexternalfigures[directory=/home/fab/Seconde/2013_2014/Figures/]

\mainlanguage[fr]

\stopenvironment


Thanks Hans for this header


% macros=mkvi

\startenvironment header

\environment environ-2

\starttexdefinition MyOtherHeader #where #day #month #year #title #number

\defineoverlay[whatever][\useMPgraphic{whatever}]

\startuseMPgraphic{whatever}
 path p;
 p:=fullsquare xyscaled (\overlaywidth,\overlayheight) squeezed 1pt;
 fill p withcolor white ;
 draw p withpen pencircle scaled 2pt withcolor 0.625white ;
 picture d ;
 d :=
textext(\quad#where\space\endash\space\date[d=#day,m=#month,y=#year]\quad)
 shifted .5[ulcorner p,urcorner p];
 fill boundingbox d withcolor white ; draw d ;
setbounds currentpicture to p ;
\stopuseMPgraphic

\framed [
width=\hsize,
height=5em,
foregroundstyle=\itxx,
background=whatever,
frame=off,
]
   {#title
\space
{\ss\tfc\bf n \high{\tfa \bf o}}
\space
#number
}

\stoptexdefinition

\stopenvironment


Thanks Wolfgang for this environment

#
\startenvironment environ-3

\defineenumeration
  [ex]
  [text={Exercice},
   headstyle={\bf\feature[+][f:smallcaps]},
   inbetween={\blank[small]},
   stopper={.}]



\stopenvironment

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

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

[NTG-context] PSTricks with ConTeXT

2014-03-20 Thread Fabrice Couvreur
Hi,
After searching, it seems it is not possible to compile a file containing a
PSTricks environment ?
Is that correct ?
Regards,
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Index notation in math mode

2014-03-24 Thread Fabrice Couvreur
Hi,
I would like the  f  in \math{\cal C_f} is identical to that obtained
with \math{f}.
Regards,
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Table next to a text in an environment of type list

2014-03-29 Thread Fabrice Couvreur
Hi,
How to improve this code to make the table to the right of the text in the
environment list ?

\midaligned{\tfb Cadres en entreprise}
\blank
On compte 67 femmes dans une entreprise de 160 personnes.

Parmi les personnes de cette entreprise, il y a 32 cadres dont 15 femmes.
\startitemize[n][stopper=),style=bold]
\item Recopier le tableau ci-contre.

\startitemize[n][stopper=),style=bold]
\setuphanging[location=right]
\starthanging{%
\bTABLE[align={middle,lohi}]
\bTR\bTD {} \eTD \bTD {\bf Femmes} \eTD \bTD {\bf Hommes} \eTD \bTD {\bf
Total} \eTD \eTR
\bTR \bTD {\bf Cadres} \eTD  \bTD {15} \eTD \bTD {} \eTD \bTD {32} \eTD
\bTR  \bTD {\bf Autres employés} \eTD \bTD {} \eTD \bTD {} \eTD \bTD {}
\eTD  \eTR
\bTR  \bTD {\bf Total} \eTD \bTD {67} \eTD \bTD {} \eTD \bTD 160{} \eTD
\eTR
\eTABLE}
\stophanging
\item Parmi les 160 personnes de cette entreprise, on en choisit une au
hasard.

On considère les événements suivants :
\startitemize[2]
\item F : \quotation{la personne choisie est une femme} ;
\item C : \quotation{la personne choisie est un cadre}.
\stopitemize
\startitemize[a][stopper=),style=bold]
\item Définir par une phrase les événements \math{\overline{C}}, \math{F
\cap C} et \math{F\cap\overline{C}}.
\item Calculer les probabilités \math{P(F)}, \math{P(C)},
\math{P(\overline{C})}, \math{P(F \cap C)} et \math{P(F \cap
\overline{C})}.
\stopitemize
\item \startitemize[a][stopper=),style=bold]
\item La personne choisie est un cadre de l'entreprise. Quelle est la
probabilité que ce soit une femme ?

{\it On note \math{P_{C}(F)} cette probabilité.}
\item Calculer \math{\dfrac{P(F \cap C)}{P(C)}}. Que constate-t-on ?
\stopitemize
\item \startitemize[a][stopper=),style=bold]
\item On choisit une femme parmi les personnes de l'entreprise. Quelle est
la probabilité qu'elle soit cadre ?

{\it On note \math{P_{F}(C)} cette probabilité.}
\item Exmpliquer pourquoi on obtient le résultat de la question précédente
en calculant  \math{\dfrac{P(C \cap F)}{P(F)}}.
\stopitemize
\item Que représentent en termes de probabilités les quotients
\math{\dfrac{52}{67}} et \math{\dfrac{52}{128}} ?
\stopitemize

\stoptext

Regards,
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Two figures are side by side

2014-04-16 Thread Fabrice Couvreur
Hi,
How do the two figures are side by side ?

\setupTABLE[row][1,2][width=1.5cm,align={middle,lohi}]
\setupTABLE[c][1][width=3cm,align={middle,lohi}]
\starttext
\startcombination[2*1]
{%
\bTABLE[align={middle,lohi}]
\bTR\bTD{}\eTD\bTD{$A$}\eTD\bTD{$\overline{A}$}\eTD\bTD{Total}\eTD\eTR
\bTR\bTD{$B$}\eTD\bTD{}\eTD\bTD{}\eTD\bTD{}\eTD\eTR
\bTR\bTD{$\overline{B}$}\eTD\bTD{}\eTD\bTD{}\eTD\bTD{}\eTD\eTR
\bTR\bTD{Total}\eTD\bTD{}\eTD\bTD{}\eTD\bTD{1}\eTD\eTR
\eTABLE
}
{%
{\externalfigure[denombrement.pdf]}
}
\stopcombination
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Text and figure side by side

2014-04-24 Thread Fabrice Couvreur
Hi,
Is it possible to put side by side text and a figure created in a TikZ
environment
?
Thank you,
Fabrice

\usemodule[tikz]
\usetikzlibrary[calc]
\starttext
\def\smiley{%
\starttikzpicture[baseline=-0.75ex,black]
\filldraw[fill=orange] circle (2mm);
\node[fill,circle,inner sep=0.5pt] (left eye) at (135:0.8mm) {};
\node[fill,circle,inner sep=0.5pt] (right eye) at (45:0.8mm) {};
\draw (-145:0.9mm) arc (-120:-60:1.5mm);
\stoptikzpicture}
\placefigure[right,none]{}{
\starttikzpicture
\coordinate (c1) at (0,0);
\draw[thick,fill=darkgreen] ($(c1) + (0:30mm)$) arc (0:360:30mm)
($(c1) + (360:35mm)$) arc (360:0:35mm);
\draw[thick,fill=gray] ($(c1) + (0:3mm)$) arc (0:360:3mm);
\foreach \x in {0,36,...,180}
\draw[fill=red, draw=black](c1)--(\x:30mm) arc (\x:\x+36:30mm)--(c1);
\foreach \x in {216,252,...,324}
\draw[fill=blue, draw=black](c1)--(\x:30mm) arc (\x:\x+36:30mm)--(c1);
\foreach \x in {3,12,...,360}
\draw[fill=lightgray] (\x:28mm) circle (2pt);
\draw[thick,fill=white!30] ($(c1) + (0:3mm)$) arc (0:360:3mm)
($(c1) + (360:4mm)$) arc (360:0:4mm);
\draw[thick,fill=darkgray] ($(c1) + (0:3mm)$) arc (0:360:3mm);
\foreach \x in {18,54,...,198}
\node [white,rotate=\x] at (\x:17.5mm){\small \bf PERDU};
\foreach \x in {234,270,306,342}
\node [] at (\x:17.5mm) {\smiley};
\draw[darkgray,-latex,line width=4pt, line cap=round] (90:37mm) --
(90:26mm);
\stoptikzpicture}
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] The spacing of the float interferes with the spacing of the itemgroup

2014-04-24 Thread Fabrice Couvreur
Why the vertical spacing is not observed between item 2 and item 3 ?
Thank you,
Fabrice

\starttext
\startitemize[n][stopper=),style=bold]
\item \input knuth
\item \input knuth
\placefigure[right,none]{}{%
\setupTABLE[c][1] [width=2.25cm]
\setupTABLE[row][1,2][width=1.5cm]
\bTABLE[align={middle,lohi}]
\bTR\bTD {\math{k}} \eTD \bTD {0} \eTD \bTD {1} \eTD \bTD {2} \eTD \bTD {3}
\eTD\eTR
\bTR\bTD {\math{P\left(X=k\right)}} \eTD \bTD {} \eTD \bTD {} \eTD \bTD {}
\eTD \bTD {} \eTD  \eTR
\eTABLE
}
\item \input knuth
\item \input knuth


\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Problem with \starthanging ...\ stophanging

2014-04-24 Thread Fabrice Couvreur
Hello,
I can not run text around the figure.
thank you,
Fabrice

\starttext
\starthanging[location=right]
{\externalfigure[image.pdf][width=8cm]}
\input knuth

\input knuth
\stophanging
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Numbering in a frame with a new environment

2014-04-27 Thread Fabrice Couvreur
Hello,
How to make the numbering is in the frame and red ?

\defineenumeration
  [ac]
  [text={
 \inframed[frame=off,
 width=fit,
 align={right},
 background=color,
 backgroundcolor=lightgray]{Activité}},
 headstyle={\bf\feature[+][f:smallcaps]},
 width=fit,
 stopper={.},
 alternative=left,
   ]
\starttext
\startac
Tirage dans une urne
\stopac
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Subsection number independant of section

2014-05-02 Thread Fabrice Couvreur
Hi,
I would get a dial like this :

A. Section one
1. Subsection one

With the code below, I get :

A. Section one
A. A. Subsection one

\setupsection
  [section]
  [conversion=Character]


\setuplabeltext
  [section={{},{.}},
   subsection={{},{.}}]


\setupsection
  [subsection]
  [previousnumber=no]

\setupbodyfont[pagella,11pt]

\starttext
\section{Définitions}
\subsection{Approche de la loi binomiale}
\stoptext

Why ?
Regards,
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Some problems with a new style for the sections

2014-05-04 Thread Fabrice Couvreur
Hi,
I encounter two problems :
- Section numbers are not red ;
- Calling the second section does not cause the creation of a new paragraph.
Regards,
Fabrice

\setupcolors[state=start]
\def\MySectionCommand#1#2%
  {\framed
 [frame=off,
  width=\textwidth,
  align={right},
  background=color,
  backgroundcolor=lightgray]
 {#1\quad#2}}

\setuphead[section][command=\MySectionCommand,numbercolor=red]

\setupbodyfont[palatino,12pt]

\starttext

\MySectionCommand{A.}{Définitions}
\input knuth
\MySectionCommand{1.}{Propriétés}
\input knuth
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Bug with TikZ module ?

2014-05-15 Thread Fabrice Couvreur
Hi,
Why the three words are not aligned on the baseline ?
Regards,
Fabrice

\usemodule[tikz]
\starttext
\starttikzpicture[level/.style={sibling distance=10mm}]
\node{}[grow=right]
child{node{J}}
child{node{R}}
child{node{B}
child{node{J}}
child{node{R}}
child{node{B}
child{node{J}}
child{node{R}}
child{node{B}}}
};
\node at (3,-0.75) {$\vdots$};
\node at (4.5,0.25) {$\vdots$};
\node at (1.5,-2.5) {toit};
\node at (3,-2.5) {fenêtre};
\node at (4.5,-2.5) {porte};
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Define a new command from the command \periods[n]

2014-05-20 Thread Fabrice Couvreur
Hi,
Is it possible to redefine the command \periods[n] to have a line that goes
from the end of the word to the edge of the page without having to play on
the number n ?
Regards,
Fabrice

\starttext
\startitemize[a][stopper=),style=bold]
\item $x\mapsto -x^2+x+1$ : \periods[66]
\item $x\mapsto 2x^3+4x-7$ : \periods[65]
\item $x\mapsto x^2-3$ : \periods[70]
\item $x\mapsto \frac{x^2+x}2$ : \periods[72]
\item $x\mapsto (x-2)^2$ : \periods[69]
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Metapost and Metafun

2014-05-21 Thread Fabrice Couvreur
Hi,
As PSTricks (which I prefer) is not yet well integrated, I decided to learn
Metapost starting with a simple code.

\starttext
\startMPcode
numeric xmin, xmax, ymin, ymax;
xmin := -2.5; xmax := 2.5; ymax :=2.5 ;ymin:=-2.5; u := 2cm;
vardef f(expr x) = -x*x+1 enddef;
xinc := 0.001;
path pts_f;
pts_f := (xmin,f(xmin))*u
for x=xmin+xinc step xinc until xmax+xinc:
.. (x,f(x))*u
endfor;
path axe_x,axe_y;
path screen;
screen=(xmin,ymin)*u--(xmax,ymin)*u--(xmax,ymax)*u--(xmin,ymax)*u--cycle;
axe_x = (xmin,0)*u -- (xmax,0)*u;
axe_y = (0,ymin)*u -- (0,ymax)*u;
drawarrow axe_x;
drawarrow axe_y;
draw pts_f withpen pencircle scaled 1;
clip currentpicture to screen;
\stopMPcode
\stoptext

Are there any routines with Metafun to improve this code?
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Edit the arrows default Metapost

2014-05-22 Thread Fabrice Couvreur
Hello,
Is it possible to change the appearance Metafun arrows default to make them
resemble those of PSTricks that I find most beautiful.
Regards,
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Strange behavior with Metapost

2014-05-27 Thread Fabrice Couvreur
Hello,
Why curve drawn is not that expected ?
Fabrice

\starttext
\startMPcode
 input hvdm;
 l:=2.8mm; r:=0.6; alfa:=45; beta:=0; gamma:=0;
 defineDefaultArrow (l, r, alfa, beta, gamma);
 numeric xmin, xmax, ymin, ymax;
 xmin :=-2; xmax := 4; ymax :=5 ;ymin:=-1; u := 1cm;
 pickup pencircle scaled 1pt ;
 drawarrow ((xmin,0) -- (xmax,0)) scaled u;
 drawarrow ((0,ymin) -- (0,ymax)) scaled u;
 draw tightfunction (x, 2*(x-1)*(x-1)+2, xmin, xmax,
(xmax-xmin)/10)
 scaled u;
 setbounds currentpicture to boundingbox (((xmin,ymin) --
 (xmax,ymax)) scaled u);
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Itemize and framed

2014-08-29 Thread Fabrice Couvreur
Hi,
Is this the best way to insert a list in a frame ?
thank you,
Fabrice

\setupcolors[state=start]
\definecolor[H1prime][c=0.50, m=0.00, y=1.00, k=0.00]
\definecolor[H4][c=0.07, m=0.00, y=0.15, k=0.00]
\starttext
\framed[corner=06,frame=on,framecolor=H1prime,location=middle,background=color,backgroundcolor=H4]{%
\rbox{
\startitemize[1]
 \item planter le piquet 1 à côté de l'arbre 1 ;
 \item aligner le piquet 1, le piquet 2 et les deux arbres puis fixer les
piquets 3 et 4 ;
\item se placer de manière à être aligné avec l'arbre 2 et le piquet 3
d'une part ;

 et avec l'arbre 1 et le piquet 4 d'autre part.
\item mesurer sa distance à l'arbre 1 ;
\item rechercher, dans le tableau, la distance correspondante entre les
deux arbres.
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Strange behavior in a table.

2014-08-29 Thread Fabrice Couvreur
Everything is in the title, thank you.

\starttext
\`A l'aide du graphique, compléter les tableaux de correspondance suivants.
\blank[small]
{\setupTABLE[row][even][height=0.6cm]
\setupTABLE[row][odd][height=0.6cm]
\setupTABLE[1][1,2][width=3.2cm]
\setupTABLE[column][2,3,4,5,6,7][width=0.14\textwidth]
\bTABLE[align={middle,lohi}]
\bTR
\bTH {Hauteur en dm} \eTH
\bTD {0} \eTD
\bTD {0,5} \eTD
\bTD {1} \eTD
\bTD {1,5} \eTD
\bTD {2} \eTD
\bTD {2,5} \eTD
\eTR
\bTR
\bTH {Volume d'eau en L} \eTH
\bTD {} \eTD
\bTD {}  \eTD
\bTD {}  \eTD
\bTD {}  \eTD
\bTD {}  \eTD
\bTD {} \eTD
\eTR
\eTABLE
\blank[small]
\bTABLE[align={middle,lohi}]
\bTR
\bTH {Volume d'eau en L} \eTH
\bTD {1} \eTD
\bTD {2} \eTD
\bTD {3} \eTD
\bTD {4} \eTD
\bTD {5} \eTD
\bTD {10} \eTD
\eTR
\bTR
\bTH {Hauteur en dm} \eTH
\bTD {} \eTD
\bTD {}  \eTD
\bTD {}  \eTD
\bTD {}  \eTD
\bTD {}  \eTD
\bTD {} \eTD
\eTR
\eTABLE}

Les graduations obtenues n'étant pas assez fines, Pascal demande à son
gendre de préciser ses calculs. La suite de l'histoire ...plus tard.
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Problem with embedding code TikZ code

2014-08-29 Thread Fabrice Couvreur
In the code below, I do not understand why the label Arbre 2 does not
have the color you want, that is to say the same as the label Arbre 1.
Thank you.

\usemodule[tikz]
\usetikzlibrary[calc]

\definecolor[A2][c=0.60, m=0.00, y=0.00, k=0.10]
\definecolor[H1prime][c=0.50, m=0.00, y=1.00, k=0.00]

\starttext
\starttikzpicture[line width=0.3mm, =stealth, x=1cm, y=1cm,line cap=round,
line join=round]
\tikzstyle{epais}=[line width=0.5mm, line cap=butt]
\tikzstyle{tres epais}=[line width=0.8mm, line cap=butt]
\draw [tres epais] (6.02,3.63)-- (8.88,3.64);
\draw (6.02,3.63)-- (6.03,0.77);
\draw [tres epais] (6.03,0.77)-- (6.02,3.63);
\draw [tres epais] (8.88,3.64)-- (8.89,0.78);
\draw [dashed] (-3.38,3.6)-- (8.89,-0.09);
\draw [dashed] (8.89,-0.09)-- (8.89,0.78);
\draw [dashed] (-3.38,3.6)-- (6.02,3.63);
\draw [A2,epais,domain=-1:2] plot(\x,{(-8.9-4.4*\x)/-3});
\draw [A2,epais,domain=1.5:4.5] plot(\x,{(--1.58-5.12*\x)/-4.72});
\draw (8.84,4.4) node {\color[H1prime]{\bf Arbre 1}};
\draw (-2.96,4.4) node {\color[H1prime]{\bf Arbre 2}};
\node at (8.14,0.8)  {\small piquet 4};
\draw [A1](8.84,-0.3) node {\bf Georges};
\node[rotate=45] at (0.28,1.88)  {\color[A2]{\bf Ravin}};
\node[rotate=90] at (9.4,1.74)  {\color[B1prime]{\bf longueur mesurée}};
\draw (2.46,4) node {\color[B1prime]{\bf longueur inconnue à estimer}};
\draw[B1prime,-] (9.05,3.62)-- (9.05,-0.09);
\draw[B1prime,-] (-3.38,3.8)-- (8.9,3.8);
\node at (8.84,4.0)  {\small piquet 1};
\node[rotate=30] at (6.22,4)  {\small piquet 2};
\node[rotate=30] at (6.22,0.5)  {\small piquet 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Placement of a figure

2014-09-02 Thread Fabrice Couvreur
Hi,
In this code, the figure is placed on the base line. How to make the
numbering at the top of the figure ?

\starttext
\startitemize[n][stopper=),style=bf]
\item \midaligned{\externalfigure[figure1_reperage.pdf]}
\startitemize[a][stopper=),style=bf]
  \item Donner les coordonnées des points $A$ et $B$ dans le repère
$\left(O,\, I,\, J\right)$.
  \item Compléter les phrases suivantes :

les abscisses des points $A$ et $B$ sont $\ldots$ ;

les ordonnées des points $A$ et $B$ sont $\dots\;$.
\item Placer les points $C$ et $D$ de coordonnées respectives
$\left(-2\,;3\right)$ et  $\left(4\,;0\right)$.
\item Placer le point $E$ de même abscisse que $C$ et d'ordonnée $-1$.
\stopitemize
\stoptext

With LaTeX, I did this : \raisebox{-\height+1em}{\includegraphics{}}

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

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

[NTG-context] Change linewidth of a table

2014-09-17 Thread Fabrice Couvreur
Hi,
How to complete the grid ?
Thank you.
Fabrice

\setuppapersize[A4]
\setuplayout[
backspace=5mm,
width=middle,
topspace=5mm,
height=middle,
header=0pt,
footer=0pt,
]

\definetypeface [me] [rm] [serif] [pagella] [default]
\definetypeface [me] [ss] [sans]  [dejavu]  [default]
\definetypeface [me] [mm] [math]  [xits][default]

\setupbodyfont[me,12pt]


\startsetups[table:initialize]
  \setupTABLE[height=2.25cm,width=2.25cm]
  \setupTABLE[column][1,4,7][frame=off,rulethickness=1.2pt,leftframe=on]
  \setupTABLE[column][9][frame=off,rulethickness=1.2pt,rightframe=on]
  \setupTABLE[row][9][frame=off,rulethickness=1.2pt,bottomframe=on]
  \setupTABLE[row][1,4,7][frame=off,rulethickness=1.2pt,topframe=on]
  \setupTABLE[start][align={middle,lohi}]
\stopsetups
\starttext
\startmidaligned
\switchtobodyfont[small]
\bTABLE[setups=table:initialize]
\bTR
\bTD  \eTD
\bTD $\sqrt{25}$ \eTD
\bTD  \eTD
\bTD Partie entière de $\pi$ \eTD
\bTD  \eTD
\bTD $\frac{48}{8}$ \eTD
\bTD  \eTD
\bTD  \eTD
\bTD 5 augmenté de 40\,\% \eTD
\eTR
\bTR
\bTD  \eTD
\bTD  \eTD
\bTD  \eTD
\bTD  \eTD
\bTD $4\sqrt{4}$ \eTD
\bTD  Le double de $\frac{15^3 \times 2^2}{5^2 \times 6^3}$\eTD
\bTD  \eTD
\bTD Nombre premier pair \eTD
\bTD Nombre de faces d'une pyramide à base triangulaire
\eTD
\eTR
\bTR
\bTD  \eTD
\bTD 30\,\% de 30  \eTD
\bTD $2^3$ \eTD
\bTD  Opposé de $(5-9)$\eTD
\bTD Nombre d'axes de symétrie d'un rectangle \eTD
\bTD \eTD
\bTD Nombre de faces d'un cube \eTD
\bTD  \eTD
\bTD \eTD
\eTR
\bTR
\bTD$\frac{\sqrt{324}}{2}$  \eTD
\bTD  \eTD
\bTD $27^0$ \eTD
\bTD \eTD
\bTD  \eTD
\bTD Numérateur de la fraction irréductible égale à
$\frac{9\,261}{33\,957}$ \eTD
\bTD L'inverse de $\sin{\unit{30 degree}}$\eTD
\bTD\eTD
\bTD PGCD de 11\,760 et de 2\,574\eTD
\eTR
\bTR
\bTD \eTD
\bTD $\sqrt{25-9}$ \eTD
\bTD \eTD
\bTD \eTD
\bTD  \eTD
\bTD  \eTD
\bTD \eTD
\bTD $\frac{10^{-2}}{0.01}$\eTD
\bTD\eTD
\eTR
\bTR
\bTD$\frac{125}{25}$ \eTD
\bTD \eTD
\bTD Quatrième nombre premier \eTD
\bTD $\sqrt{1}\times \sqrt{4}$\eTD
\bTD Nombre de diviseurs de 20 \eTD
\bTD  \eTD
\bTD Numérateur de
$\frac{7}{4}-\frac{1}{2}+\frac{5}{8}-\frac{3}{4}$\eTD
\bTD \eTD
\bTD $\left(2\sqrt{2}\right)^2$ \eTD
\eTR
\bTR
\bTD Le quart du seizième de $256$\eTD
\bTD \eTD
\bTD Nombre de côtés d'un pentagone\eTD
\bTD \eTD
\bTD L'opposé de la différence du tiers de $21$ et du carré
de $4$ \eTD
\bTD  \eTD
\bTD Nombre d'axes de symétrie d'un triangle équilatéral\eTD
\bTD Nombre de sommets d'un cube\eTD
\bTD\eTD
\eTR
\bTR
\bTD \eTD
\bTD $\frac{\left(2\sqrt{3}\right)^2}{12}$\eTD
\bTD \eTD
\dontleavehmode \bTD
\startMPcode
defaultscale:=0.8;
angle_radius:=4pt;
def mark_rt_angle(expr a, b, c)=
draw((1,0)--(1,1)--(0,1))
zscaled (angle_radius*unitvector(a-b))
shifted b
enddef;
def midpoint(expr a, b) = (.5[a,b]) enddef;
u:=0.4cm;
path p;
z0=(0,0);
z1=(4u,0);
z2=(0,3u);
z3=(2u,0);
z4=(0,1.5u);
z5=midpoint(z1,z2);
draw z0--z1--z2--cycle;
mark_rt_angle(z1,z0,z2);
label.bot(4,z3);
label.lft(3,z4);
label.urt(?,z5);
\stopMPcode
\eTD\bTD Solution de l'équation $4x-5=2x+9$ \eTD
\bTD  \eTD
\bTD  \eTD
\bTD  \eTD
\bTD$\left(\frac{2}{\sqrt{2}}\right)^2$\eTD
\eTR
\bTR
\bTD$\frac{\sqrt{192}-\sqrt{128}}{\sqrt{3}-\sqrt{2}}$ \eTD
\bTD \eTD
\bTD \eTD
\bTD $2^{\rm ?}=2$ \eTD
\bTD  \eTD
\bTD Nombre d'axes de symétrie d'un carré \eTD
\bTD \eTD
\bTD $\sqrt{81}-\sqrt{4}$\eTD
\bTD\eTD
\eTR
\eTABLE
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Using \startframedtext with \startcombination

2014-09-29 Thread Fabrice Couvreur
Hi,
Why the second frame is not displayed ?
Best regards,
Fabrice

\definecolor[H1prime][c=0.50, m=0.00, y=1.00, k=0.00]
\starttext
\startcombination[2*1]
{%
\startframedtext[
width=0.45\textwidth,
frame=on,
framecolor=H1prime,
location=left,
background=color,
backgroundcolor=lightgray]
{\bf Algorithme A}
\startitemize[2]
\item Choisir un nombre
\item Élever au carré
\item Multiplier par 4
\item Ajouter le produit du nombre choisi au départ par 28
\item Donner le résultat
\stopitemize
\stopframedtext
}{}
{%
\startframedtext[
width=0.45\textwidth,
frame=on,
framecolor=H1prime,
location=right,
background=color,
backgroundcolor=H4]
\startitemize[2]
{\bf Algorithme B}
 \item Choisir un nombre
\item Prendre son double
\item Ajouter 7
\item Prendre le carré du résultat
\item Retrancher 49
\item Donner le résultat
\stopitemize
\stopframedtext
}{}
\stopcombination
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] (no subject)

2014-10-13 Thread Fabrice Couvreur
hi,
In the following code, the default stopper is the point.

\starttext
\startitemize[columns,a,joinedup]
\item $f(0)$
\item $g(0,3)$
\item $f(\sqrt 2)$
\item $g(-4)$
\stopitemize
\stoptext

How to have a break ?
Best regards,
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Stopper and itemize

2014-10-13 Thread Fabrice Couvreur
hi,
In the following code, the default stopper is the point.

\starttext
\startitemize[columns,a,joinedup]
\item $f(0)$
\item $g(0,3)$
\item $f(\sqrt 2)$
\item $g(-4)$
\stopitemize
\stoptext

How to have a break ?
Best regards,
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Module algorithmic

2014-10-18 Thread Fabrice Couvreur
Hi Wolfgang,
How to reduce the size of the float ?
Best regards,
Fabrice

\usemodule[algorithmic]
\definefloat[algorithm][algorithms]


\definecolor[H1prime][c=0.50, m=0.00, y=1.00, k=0.00]
\definecolor[H4][c=0.07, m=0.00, y=0.15, k=0.00]

\setupfloat
  [algorithm]
  [background=color,
   frame=on,
   framecolor=H1prime,
   backgroundcolor=H4,
   width=0.5\textwidth]

\starttext
\placealgorithm[none][]{}
  {\startalgorithmic\black
   \STATE{\bf Variables :}
   \STATE  $N$ et $P$ sont deux entiers naturels
   \STATE  $A$ est un nombre réel
\STATE{\bf Entrée :}
   \STATE Demander à l'utilisateur la valeur de $N$
   \STATE{\bf Initialisation :}
   \STATE Affecter à $A$ la valeur $92\,000$
   \STATE{\bf Traitement :}
   \STATE Affecter à $P$ la valeur $N-1$
   \FOR{$I=1$ to $P$}
   \STATE Affecter à $A$ la valeur $1,163 \times A$
   \STATE Afficher A
   \ENDFOR
   \stopalgorithmic}
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Extra line in a list

2014-10-21 Thread Fabrice Couvreur
Hi,
In the code below, why is there an extra line in the first item ?
Best regards,
Fabrice

\usesymbols[mvs]
\setupsymbolset[europe]

\starttext

\startitemize[n][stopper={.},style=bold]
\item
\startitemize[a][stopper={.},style=bold]
\item On pose $P_A=9$ et $P_B=7$.

On a alors $\frac{1}{2}P_A+\frac{1}{2}P_B=4,5+3,5=8$.

Le prix du kilogramme de mélange $M_1$ dont la moitié est de variété A est
donc de 8 \symbol[EUR].
\item $\frac{1}{4}P_A+\frac{3}{4}P_B=2,25+5,25=7,5$.

Le prix du kilogramme de mélange $M_2$ contenant $\frac{1}{4}$ de variété A
est donc de 7,5 \symbol[EUR].
\item $\frac{3}{5}P_A+\frac{2}{5}P_B=5,4+2,8=8,2$.

Le prix du kilogramme de mélange $M_3$ contenant $\frac{2}{5}$ de variété B
est donc de 8,2 \symbol[EUR].
\stopitemize
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Package {tikz-cd} with ConTeXt

2014-10-28 Thread Fabrice Couvreur
Hi,
The following code compiles with pdflatex :

\documentclass{article}
\usepackage{tikz}
\usepackage{tikz-cd}
\usetikzlibrary{3d,shapes}

\begin{document}
\tikzset{xzplane/.style={canvas is xz plane at y=#1,
thick,shading=ball,ball color=red,draw=black}}
\tikzset{yzplane/.style={canvas is yz plane at x=#1,thick,shading=ball,
ball color=red,draw=black}}
\tikzset{xyplane/.style={canvas is xy plane at z=#1,thick,shading=ball,ball
color=red,draw=black}}
\tikzcdset{
arrow style=tikz,
diagrams={=stealth}}
\[\begin{tikzcd}
\tikz{\draw[xzplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[yzplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[xyplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[xyplane=2] node[white] at (1,1){\Large 7};
\draw[xyplane=2] node[below=0.25cm] at (1,0){\Large X};}
\arrow[thick, bend left, start anchor = north, end anchor = north, shorten
=1mm]{r}[scale=2]{\times 2}
\tikz{\draw[xzplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[yzplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[xyplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[xyplane=2] node[white] at (1,1){\Large 14};
\draw[xyplane=2] node[below=0.25cm] at (1,0) {\Large X};}
\arrow[thick, bend left, start anchor = north, end anchor = north, shorten
= 1mm]{r}[scale=2]{+ 3}
\tikz{\draw[xzplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[yzplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[xyplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[xyplane=2] node[white] at (1,1){\Large 17};
\draw[xyplane=2] node[below=0.25cm] at (1,0){\Large X};}
\end{tikzcd}\]

\begin{tikzpicture}
  \tikzstyle {bulle}=[circle,draw,thick]
  \tikzstyle{fleche}=[thick,=stealth,-]
  \node(debut1) at (0,0) {$7$};
  \node(debut3) at (4,0) {$14$};
  \draw [fleche](debut1.north) to [bend left] (debut3.north);
  \node [bulle,fill=white] (debut6) at (2,0.75) {$\times 2$};
\end{tikzpicture}
\end{document}

I tried with Context, but it does not work :

\usemodule[tikz]
\usetikzlibrary[calc]
\usetikzlibrary[cd]
\usetikzlibrary[3d]
\usetikzlibrary[arrows]
\usetikzlibrary[positioning]
\starttext
\tikzset{xzplane/.style={canvas is xz plane at y=#1,
thick,shading=ball,ball color=red,draw=black}}
\tikzset{yzplane/.style={canvas is yz plane at x=#1,thick,shading=ball,
ball color=red,draw=black}}
\tikzset{xyplane/.style={canvas is xy plane at z=#1,thick,shading=ball,ball
color=red,draw=black}}
\tikzcdset{
arrow style=tikz,
diagrams={=stealth}}
\starttikzcd
\tikz{\draw[xzplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[yzplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[xyplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[xyplane=2] node[white] at (1,1){ 7};
\draw[xyplane=2] node[below=0.25cm] at (1,0){X};}
\arrow[thick, bend left, start anchor = north, end anchor = north, shorten
=1mm]{r}[scale=2]{$\times 2$}
\tikz{\draw[xzplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[yzplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[xyplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[xyplane=2] node[white] at (1,1){ 14};
\draw[xyplane=2] node[below=0.25cm] at (1,0) {X};}
\arrow[thick, bend left, start anchor = north, end anchor = north, shorten
= 1mm]{r}[scale=2]{+ 3}
\tikz{\draw[xzplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[yzplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[xyplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[xyplane=2] node[white] at (1,1){ 17};
\draw[xyplane=2] node[below=0.25cm] at (1,0){X};}
\stoptikzcd
\stoptext

Best regards,
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Strange behavior with the command \color[]{}

2014-11-02 Thread Fabrice Couvreur
Hi,
In the code below, if I comment the two lines, it's okay, but if I
uncomment those
two lines, the number of faces of the cubes is not white but black, and there
are pieces of text green.
Best regards,
Fabrice

\usemodule[tikz]
\usetikzlibrary[calc]
\usetikzlibrary[cd]
\usetikzlibrary[3d]
\usetikzlibrary[arrows.meta]
\usetikzlibrary[positioning]
%\definecolor[H1prime][c=0.50, m=0.00, y=1.00, k=0.00]
%\definecolor[H4][c=0.07, m=0.00, y=0.15, k=0.00]
\starttext

\startsetups[table:initialize]
  \setupTABLE[height=2.5cm,align={middle,lohi}]
  \setupTABLE[column][2][[width=3cm,align={right,lohi},frame=off]
  \setupTABLE[column][3][[width=8cm,align={right,lohi},frame=off]
  \setupTABLE[1][1][[width=5cm,align={right,lohi},frame=off]
  \setupTABLE[1][2,3][bottomframe=off]
  \setupTABLE[1][3,4][topframe=off]
\stopsetups
\bTABLE[setups=table:initialize]
\switchtobodyfont[11pt]
\bTR \bTD \color[orange]{\tfa Suite d'instructions correspondant au
programme de calcul :} \eTD \bTD \eTD \bTD \color[orange]{\tfa Valeur de la
variable $X$ après l'exécution de chaque instruction :} \eTD \eTR
\bTR
\bTD $X$ prend la valeur $7$ \eTD \bTD \dontleavehmode \startMPcode
input hvdm;
l:=2.8mm; r:=0.6; alfa:=45; beta:=0; gamma:=0;
defineDefaultArrow (l, r, alfa, beta, gamma); pickup pencircle scaled
0.4mm; arrowline (0cm,0cm)--(3cm,0cm) withcolor blue  ;\stopMPcode \eTD
\bTD On affecte à $X$ la valeur $7$ : la valeur de $X$ est
\color[green]{$7$}. \eTD
\eTR
\bTR
\bTD $X$ prend la valeur $2X$ \eTD \bTD \dontleavehmode
\startMPcode input hvdm;
l:=2.8mm; r:=0.6; alfa:=45; beta:=0; gamma:=0;
defineDefaultArrow (l, r, alfa, beta, gamma); pickup pencircle scaled
0.4mm; arrowline (0cm,0cm)--(3cm,0cm) withcolor red  ;\stopMPcode\eTD
\bTD On affecte à $X$ la valeur $2X$.\\Comme la valeur de $X$ est
\color[green]{$7$}, la nouvelle valeur de $X$ est :
$2\times\color[green]{7}$.\\La valeur de $X$ est maintenant
\color[green]{$14$}.
 \eTD
\eTR
\bTR
\bTD $X$ prend la valeur $X+3$ \eTD \bTD \dontleavehmode
\startMPcode input hvdm;
l:=2.8mm; r:=0.6; alfa:=45; beta:=0; gamma:=0;
defineDefaultArrow (l, r, alfa, beta, gamma); pickup pencircle scaled
0.4mm; arrowline (0cm,0cm)--(3cm,0cm) withcolor green  ;\stopMPcode\eTD
\eTR
\bTD On affecte à $X$ la valeur $X+3$.\\Comme la valeur de $X$ est
\color[green]{$14$}, la nouvelle valeur de $X$ est :
$\color[green]{14}+3$.\\La valeur de $X$ est maintenant \color[green]{$17$}.
 \eTD
\eTABLE{}

\startsetups[table:initialize]
  \setupTABLE[height=2cm,align={middle,lohi}]
  \setupTABLE[column][1][[width=4cm,align={right,lohi},frame=on,
framecolor=H1prime]
  \setupTABLE[column][2][[width=5cm,align={middle,lohi},frame=off]
  \setupTABLE[column][3][[width=1cm,align={middle,lohi},frame=off]
  \setupTABLE[column][4][[width=9cm,align={right,lohi},frame=off]
  \setupTABLE[1][1][frame=off]
  \setupTABLE[1][2,3][bottomframe=off]
  \setupTABLE[1][3,4][topframe=off]
\stopsetups
\bTABLE[setups=table:initialize]
\switchtobodyfont[10pt]
\bTR
\bTD \color[red]{ Suite d'instructions :} \eTD
\bTD \eTD
\bTD \eTD
 \bTD \color[orange]{ Valeur de la variable $A$  et valeur de la variable
$B$ après l'exécution de chaque instruction :}\eTD
\eTR
\bTR
\bTD $A$ prend la valeur $3$ \eTD
\bTD
\tikzset{%
  cube join/.style={
thick, -{Stealth},
  },
  cube face/.style={
minimum size=1cm, outer sep=0pt,
draw=white, thick, line join=round,
shading=ball,
text=white,
  },
  face color/.style={cube face/.append style={ball color=#1}},
  pics/cube/.style args={#1 with #2}{
  code={
\node [cube face, label={[name=-label]below:#2}] (-front) {#1};
\node [cube face] (-top)  at (-front.north west) [anchor=south west,
xslant=1, yscale=1/3] {};
\node [cube face] (-side) at (-front.south east) [anchor=south west,
yslant=1, xscale=1/3] {};
   }}
}
\starttikzpicture
\pic [cube face/.append style={ball color=green}] at (-1, 1) {cube=3  with
$A$};\pic [cube face/.append style={ball color=red}] at ( 1, 1) {cube={}
with $B$};

\stoptikzpicture
 \eTD
\bTD
\dontleavehmode \startMPcode input hvdm;
l:=2.8mm; r:=0.6; alfa:=45; beta:=0; gamma:=0;
defineDefaultArrow (l, r, alfa, beta, gamma); pickup pencircle scaled
0.4mm; arrowline (1cm,0cm)--(0cm,0cm)  ;\stopMPcode
\eTD
\bTD La valeur de $A$ est \color[green]{3} et $B$  n'a pas encore de valeur
\eTD
\eTR
\bTR
\bTD $B$ prend la valeur $A+1$ \eTD
\bTD
\tikzset{%
  cube join/.style={
thick, -{Stealth},
  },
  cube face/.style={
minimum size=1cm, outer sep=0pt,
draw=white, thick, line join=round,
shading=ball,
text=white, font=\bfseries
  },
 face color/.style={cube face/.append style={ball color=#1}},
  pics/cube/.style args={#1 with #2}{
  code={
\node [cube face, label={[name=-label]below:#2}] (-front) {#1};
\node [cube face] (-top)  at (-front.north west) [anchor=south west,
xslant=1, yscale=1/3] {};
\node [cube face] (-side) at (-front.south east) [anchor=south west,
yslant=1, 

[NTG-context] Numbering in a Table

2014-11-07 Thread Fabrice Couvreur
Hi,
Is it possible to use an itemize environment in a table ?
Best regards,
Fabrice

\starttext
\startsetups[table:initialize]
  \setupTABLE[height=0.8cm,align={middle,lohi}]
  \setupTABLE[row][1][background=color,backgroundcolor=cyan]
  \setupTABLE[1][1][background=color,backgroundcolor=white]
  \setupTABLE[column][1][width=10cm,align={right,lohi}]
  \setupTABLE[column][2,3,4][width=2.5cm,align={middle,lohi}]
  \setupTABLE[1][1][frame=off]
\stopsetups
\bTABLE[setups=table:initialize]
\bTR
\bTD \eTD
\bTD Vrai \eTD
\bTD Faux \eTD
\bTD Peut-être \eTD
\eTR
\bTR
\bTD \color[red]{a.} Les droites (IJ) et (AB) sont parallèles.\eTD
\bTD \eTD
\bTD \eTD
\bTD \eTD
\eTR
\bTR
\bTD \color[red]{b.} Les droites (JK) et  (BC) sont parallèles. \eTD
\bTD \eTD
\bTD \eTD
\bTD \eTD
\eTR
\eTABLE{}
\stopmidaligned
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Create an item marker with a counter with Metapost

2014-11-10 Thread Fabrice Couvreur
Hi,
With the book Metafun I created a marker with metapost. How to add a counter
?
Best regards,
Fabrice

\startuseMPgraphic{itemize:fuzzy}
numeric u;
u:=0.5cm;
save p; path p;
p := fullcircle xyscaled (u,u) randomized 2pt;
pickup pencircle scaled 1pt;
fill p withcolor green;
draw p withcolor blue;
\stopuseMPgraphic
\definesymbol[itemize:fuzzy][\useMPgraphic{itemize:fuzzy}]
\setupitemize[1][symbol=itemize:fuzzy]
\starttext
\startitemize
\item \input knuth
\item \input knuth
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Strange behavior of a macro with ConTeXt ver : 2014.11.12 9:46 p.m. MKIV beta

2014-11-15 Thread Fabrice Couvreur
Hi,
Macro written by Hans does not work.
Best regards,
Fabrice

% macros=mkvi
\starttext

\starttexdefinition MyOtherHeader #where #day #month #year #title

\defineoverlay[whatever][\useMPgraphic{whatever}]

\startuseMPgraphic{whatever}
 path p;
 p:=fullsquare xyscaled (\overlaywidth,\overlayheight) squeezed 1pt;
 fill p withcolor white ;
 draw p withpen pencircle scaled 2pt withcolor 0.625white ;
 picture d ;
 d :=
textext(\quad#where\space\endash\space\date[d=#day,m=#month,y=#year]\quad)
 shifted .5[ulcorner p,urcorner p];
 fill boundingbox d withcolor white ; draw d ;
setbounds currentpicture to p ;
\stopuseMPgraphic

\framed [
width=\hsize,
height=5em,
foregroundstyle=\itx,
Background=whatever,
frame=off,
]
   {#title
}

\stoptexdefinition

\MyOtherHeader{Premières STMGB-STMGD}{17}{11}{2014}{{\ss \tfb \bf Second
degré : résolution d'une équation du second degré}}

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

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

[NTG-context] Space around a figure in a table

2014-11-28 Thread Fabrice Couvreur
 Hi,
Why up space and down space is not the same around each figure ?
Best regards,
Fabrice

\definecolor[FondTableaux][c=0.00, m=0.00, y=0.20, k=0.00]
\startsetups[table:initialize]
  \setupTABLE[column][1,2][offset=1ex,width=2cm]
  \setupTABLE[column][3][offset=1ex,width=10cm]
  \setupTABLE[row][first][background=color,backgroundcolor=FondTableaux]
  \setupTABLE[start][align={middle,lohi}]
\stopsetups
\starttext
\blank[big]
\startmidaligned
\bTABLE[setups=table:initialize]
\bTR
 \bTH  $a$ \eTH
 \bTH $\Delta$ \eTH
 \bTH Signe de $f(x)$ \eTH
\eTR
\bTR
 \bTD 1 \eTD
 \bTD   \eTD
 \bTD \dontleavehmode\externalfigure[cow.pdf]\eTD
\eTR
\bTR
 \bTD 2 \eTD
 \bTD   \eTD
 \bTD \dontleavehmode\externalfigure[cow.pdff]  \eTD
\eTR
\bTR
 \bTD 4 \eTD
 \bTD   \eTD
 \bTD  \dontleavehmode\externalfigure[cow.pdf] \eTD
\eTR
\bTR
 \bTD 6 \eTD
 \bTD   \eTD
 \bTD  \dontleavehmode\externalfigure[cow.pdf] \eTD
\eTR
\eTABLE
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Table and framedtext

2014-12-05 Thread Fabrice Couvreur
Hi,
In the following code, I would like columns that contain the figures have a
white background.
Best regards,
Fabrice

\definecolor[mycolor][c=0.1, m=0.00, y=0.00, k=0.00]
\setupcaptions[number=no]
\starttext
\startframedtext[
width=\textwidth,
frame=on,
location=middle,
background=color,
backgroundcolor=mycolor]
\leftaligned{\color[red]{PROPRIÉTÉ}}
\blank[big]
Deux plans ${\cal P}_1$ et ${\cal P}_2$ de l'espace sont soit sécants, soit
parallèles.
\blank[big]
\bTABLE[align={middle,lohi}]
\setupTABLE[column][first][width=0.3\textwidth]
\setupTABLE[column][two][width=0.7\textwidth]
\setupTABLE[row][first][background=color,backgroundcolor=mycolor]
\bTR
\bTD
${\cal P}_1$ et ${\cal P}_2$ sont {\bf sécants}.
\eTD
\bTD[nc=2]
${\cal P_1}$ et ${\cal P_2}$ sont {\bf parallèles}.
\eTD
\eTR
\bTR
\bTD
\dontleavehmode\placefigure[] {${\cal P}_1$ et ${\cal P}_2$ sont {\bf
sécants} suivant une droite $d$.} {\externalfigure[cow.pdf][width=4cm]}
\eTD
\bTD
\dontleavehmode\placefigure[] {${\cal P}_1$ et ${\cal P}_2$ sont {\bf
strictement parallèles}.} {\externalfigure[cow.pdf][width=4cm]}
\eTD
\bTD
\dontleavehmode\placefigure[] {${\cal P}_1$ et ${\cal P}_2$ sont {\bf
confondus}.} {\externalfigure[cow.pdf][width=4cm]}
\eTD
\eTR
\eTABLE
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Strange behavior with itemize

2014-12-06 Thread Fabrice Couvreur
 Hi,
Why the first two items are not there ?
Best regards,
Fabrice

\starttext
\startitemize[n][stopper={.},style=bold]
\item \startitemize[a][stopper={.},style=bold]
\item Étudier le signe de $B^{\prime}(x)$ sur l'intervalle
$\left[0\,;40\right]$.
\item Dresser le tableau de variation de la fonction $B$ sur l'intervalle
$\left[0\,;40\right]$.
\item En déduire combien de matelas l'entreprise doit produire et vendre
chaque jour pour que le bénéfice réalisé soit maximal. Que vaut alors ce
bénéfice maximal ?
\item Expliquer comment retrouver graphiquement ce résultat. Faire
apparaître les traits de constructions utiles à la lecture graphique.
\stopitemize
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Parameters of a table that interfere on another table

2014-12-09 Thread Fabrice Couvreur
Hi,
I do not understand why the parameters of the first table apply to the
second table.
Best regards,
Fabrice

\setuppapersize[A4][A4]

\setuplayout[
backspace=15mm,
width=middle,
topspace=15mm,
height=middle,
header=0pt,
footer=0pt,
]
\definelabel[TableRow][text=,headcolor=red,numberconversion=characters,numberstopper=.]

\starttext
\starmidaligned
\blank[big]
\setupTABLE[row][first][align={right}]
\setupTABLE[row][first][align={right,lohi},
topframe=off,leftframe=off,rightframe=off]
\bTABLE[width=0.25\textwidth,offset=1ex]
   \bTR[nc=4]
   \bTD text \eTD
   \eTR
   \bTR
\bTD \TableRow \ text  \eTD
\bTD \TableRow \ text  \eTD
\bTD \TableRow \ text  \eTD
\bTD \TableRow \ text  \eTD
   \eTR
\bTR
\bTD
\eTD
\bTD
\eTD
\eTR
\eTABLE
\stopmidaligned

\blank[big]
\startmidaligned
\bTABLE[align={middle,lohi}]
\setupTABLE[column][first][width=0.3\textwidth]
\setupTABLE[column][two][width=0.7\textwidth]
\bTR
\bTD[nc=3]
text
\eTD
\bTD[nr=2]
\eTD
\eTR
\bTR
\bTD
text
\eTD
\bTD[nc=2]
text
\eTD
\eTR
\eTABLE
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Define a new type section with metafun

2014-12-26 Thread Fabrice Couvreur
Hi,
I wish red separation is exactly in the middle of the dial and the title of the
section. Then, the line is too long, it should not exceed the boundary of
the ellipse.
Best regards,
Fabrice

% macros=mkvi
\setuppapersize[A4][A4]

\setupcolors[state=start,cmyk=yes,mpcmyk=yes]
\definecolor[mycolor][c=0.45,m=0.00,y=0.1,k=0.00]
\definecolor[colortext][c=1,m=0.00,y=0.3,k=0.3]

\starttext

\startuniqueMPgraphic{funny}
path p ;
numeric h ;
h := OverlayHeight ;
p:=unitsquare xscaled \overlaywidth yscaled \overlayheight superellipsed
0.9 ;
pickup pencircle scaled \overlaylinewidth ;
fill p withcolor \MPcolor{\overlaycolor} ;
draw p withcolor \MPcolor{\overlaylinecolor} ;
draw (20,0)--(20,h) withcolor red ;
\stopuniqueMPgraphic

\defineoverlay[funny][\uniqueMPgraphic{funny}]

\define[2]\MySectionCommand
   {\framed
  [background=funny,
   frame=off,
   width=0.5\textwidth,
   align={right},
   framecolor=mycolor,
   rulethickness=1.5pt,
   backgroundcolor=white,
   offset=4pt]
  {\tfb #1\space\colortext#2}}

\setuphead[section][command=\MySectionCommand,ownnumber=yes,numbercolor=colortext]

\section{A}{PLAN DE L'ESPACE}
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Title and defineenumeration

2014-12-31 Thread Fabrice Couvreur
Dear list,
Is it possible to remove the parentheses of the title ?
Best regards,
Fabrice

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

\defineenumeration
  [ac]
  [text={Activité},
   headstyle={\bf\feature[+][f:smallcaps]},
   headcommand=\ACFRAME,
   numberconversionset=ACCONVERSION,
   width=fit,
   alternative=top,
   title=yes,
   ]

\defineprocessor[ACPROCESSOR][color=red,command=\groupedcommand{}{.}]

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

\starttext
\startac{En Bretagne, il fait beau\unknown plusieurs fois par jour !}
\stopac
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Positioning an arrow between two values (Metapost)

2015-01-17 Thread Fabrice Couvreur
Hi,
I went from PSTricks to Metapost (Metafun) gradually. For positioning arrows
between two values in an array of variations, I used a command like this \
ncline {A}{B}, which avoids fumbling.
Can we do the same with Metapost ?
The idea would be to convert the value into a path or an image, much like in
the code below.

\starttext
\startMPcode
u:=1cm ;
path p, q ;
p=fullsquare scaled u ;
q=fullsquare scaled u shifted (4u,-2u) ;
draw p ;
draw q ;
drawarrow center p--center q ;
label(btex $5$ etex,center p) ;
label(btex $-2 $ etex,center q) ;
\stopMPcode
\stoptext

Best regards,
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Bug with macro tightfunction (Metafun)

2015-02-16 Thread Fabrice Couvreur
 Hi,
This code generates an error while it was working fine a month ago.
Best regards,
Fabrice

\definecolor[mycolor][c=.4,m=0,y=0,k=0]

\starttext
\start
\switchtobodyfont[small]
\startMPcode
 input hvdm;
 input tex;
 l:=3mm; r:=0.6; alfa:=45; beta:=0; gamma:=0;
 defineDefaultArrow (l, r, alfa, beta, gamma);
 numeric xmin, xmax, ymin, ymax;
 xmin := 0; xmax := 110; ymax :=8000 ;ymin:=0; u := 0.1cm; v:= 0.002cm;
 color mycolor; mycolor:=(0.4,0,0);
 drawoptions(withpen pencircle scaled 0.3pt withcolor
\MPcolor{mycolor});
 draw hlingrid(ymin,ymax,1000,16cm,11cm);
 draw vlingrid(xmin,xmax,10,11cm,16cm);
 pickup pencircle scaled 1pt ;
 arrowline ((xmin,0) -- (xmax,0)) scaled u;
 arrowline ((0,ymin) -- (0,ymax)) scaled v;
 drawoptions(withpen pencircle scaled 1pt);
 draw tightfunction (x, x*x-84*x+5000, 0, 100, 0.01) xyscaled (u,v);
 for i=0 step 10 until 100:
 label.bot(TEX($decimal(i)$),(i*u,0));
 endfor;
 for i=0 step 1000 until 7000:
 label.lft(TEX($decimal(i)$),(0,i*v));
  endfor;
   label.top(Nombre de lots,(90u,50v));
   label.lrt(btex $f(x)$ (en euros) etex,(0,7800v));
\stopMPcode
\stop
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] How to place text to the right of a brace

2015-02-01 Thread Fabrice Couvreur
Hi,
Wolfgang wrote, there was some time already, a nice macro to draw a brace.
In the code below, how to have the arrow and the text to the right of the
brace ?
Best regards,
Fabrice

\startuseMPgraphic{accolade}
z1  = (-233,0) ;
z2  = (-220,22) ;
z3  = (-155,211) ;
z4  = (-200,690) ;
z5  = (-142,1033) ;
z6  = (-97,1106) ;
z7  = (-71,1125) ;
z8  = (-61,1104) ;
z9  = (-80,1077) ;
z10 = (-108,1002) ;
z11 = (-129,666) ;
z12 = (-117,207) ;
z13 = (-197,19) ;
z14 = (-208,0) ;
z15 = (-197,-19) ;
z16 = (-117,-207) ;
z17 = (-129,-666) ;
z18 = (-108,-1026) ;
z19 = (-80,-1077) ;
z20 = (-61,-1104) ;
z21 = (-71,-1125) ;
z22 = (-97,-1106) ;
z23 = (-143,-1031) ;
z24 = (-199,-673) ;
z25 = (-155,-211) ;
z26 = (-220,-22) ;
fill z1 for i=2 upto 14: .. z[i] endfor  z14 for j=15 upto 26: .. z[j]
endfor .. z1  cycle  withcolor red ;
\stopuseMPgraphic

\defineoverlay[leftbrace] [\leftaligned
{\scale[height=\overlayheight]{\useMPgraphic{accolade}}}]
\defineoverlay[rightbrace][\rightaligned{\mirror{\scale[height=\overlayheight]{\useMPgraphic{accolade]



\starttext

\framedtext[frame=off,loffset=1em,roffset=1em,background={rightbrace}]{
  La longueur est \unit{4 centimeter} ; on donne à $L$ la valeur $4$.

  La largeur est \unit{3 centimeter} ; on donne à  $l$ la valeur $3$.
}
\dontleavehmode\startMPcode drawarrow (0,0)--(2cm,0) withpen pencircle
scaled 1pt withcolor red ; \stopMPcode\hskip 1cm \color[red]{Initialisation}

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

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

[NTG-context] About the macro ulcircle

2015-01-09 Thread Fabrice Couvreur
Hi,
I discovered some macro Metafun particular.
I then wanted to outline, but it does not fit with the boundary of the
quadrant.
Can I have some explanation ?
Best regards,
Fabrice

\starttext
\startMPcode
u:=1cm ;
pickup pencircle scaled 1pt ;
fill ulcircle scaled 8u withcolor lightgray ;
fill llcircle scaled 2u shifted (1u,0) withcolor lightgray ;
fill lrcircle scaled 4u shifted (1u,1u) withcolor lightgray ;
fill urcircle scaled 6u shifted (0,1u) withcolor lightgray ;
label.lft(btex $x$ etex, (0,0.5u)) ;
fill unitsquare scaled 1u withcolor lightgray ;
draw unitsquare scaled 1u ;
draw (-4u,0)--(0,0) dashed evenly ;
draw (0,1u)--(0,4u) dashed evenly ;
draw (1u,1u)--(3u,1u) dashed evenly ;
draw (1u,0)--(1u,-1u) dashed evenly ;
draw (-4u,0){up}..(0,4u)..(3u,1u){down} ;
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Center horizontally and vertically a table with a graphic in a paragraph environment

2015-01-09 Thread Fabrice Couvreur
Hi,
Is it possible to center horizontally and vertically the table with the
graphics ?
Best regards,
Fabrice

\defineparagraphs[TwoColumns][n=2]
\setupparagraphs[TwoColumns][1][width=0.45\textwidth]

\startsetups[table:initialize]

\setupTABLE[start][align={middle,lohi},width=1.5cm,offset=0.5ex,style=small]
  \setupTABLE[row][first][background=color,backgroundcolor=lightgray]
\stopsetups

\usemodule[graph]
\definecolor[mycolor][c=.4,m=0,y=0,k=0]
\starttext
\startTwoColumns
\start
\switchtobodyfont[small]
\startMPpage[instance=graph]
drawoptions(withpen pencircle scaled 1pt);
w := 10cm; h := 8cm;
ahlength := .25cm;
draw begingraph (w,h)
numeric xmin, xmax, ymin, ymax;
xmin := 0; xmax :=100; ymax :=8000 ;ymin:=0;
setrange((xmin,ymin),(xmax,ymax));
for x=xmin step 10 until xmax:
grid.bot(format(@g,x),x) withcolor \MPcolor{mycolor}
withpen pencircle scaled .3pt;
endfor
for y=ymin step 1000 until ymax:
grid.lft(format(@g,y),y) withcolor \MPcolor{mycolor}
withpen pencircle scaled .3pt;
endfor
glabel.bot(textext(Nombre de chaises),OUT);
glabel.lft(textext(Euros) rotated 90,OUT);
glabel.bot(${\cal C}$,(5,3000));
glabel.top(${\cal R}$,(15,500));
save a; numeric a[];
a0 := 2000 ; a1 := 50 ; a2 := -0.2 ;
gdraw makefunctionpath(xmin,90,1000,polynomial_function(a,2,x));
b0 := 0 ; b1 := 80 ;
gdraw makefunctionpath(xmin,90,1000,polynomial_function(b,1,x));
endgraph ;
\stopMPpage
\stop
\TwoColumns
\framed[frame=off,width=local,align={lohi,middle},location=middle]{%
\bTABLE[setups=table:initialize]
\bTR
\bTD Jours \eTD
\bTD Entrées \eTD
\eTR
\bTR
\bTD 1 \eTD
\bTD \unknown \eTD
\eTR
\bTR
\bTD 2 \eTD
\bTD \unknown \eTD
\eTR
\bTR
\bTD 3 \eTD
\bTD \unknown \eTD
\eTR
\bTR
\bTD 4 \eTD
\bTD \unknown \eTD
\eTR
\bTR
\bTD 5 \eTD
\bTD 870 \eTD
\eTR
\bTR
\bTD 6 \eTD
\bTD 910 \eTD
\eTR
\bTR
\bTD 7 \eTD
\bTD 1\,000 \eTD
\eTR
\eTABLE
}
\stopTwoColumns
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Hatch an area with Metapost (Metafun)

2015-02-09 Thread Fabrice Couvreur
Hi,
How hatched trapezoid MBCD ?
Best regards,
Fabrice

\starttext
\startMPcode
path p ;
p=unitsquare scaled 4cm ;
draw p ;
pair z ;
z=point 3.6 of p ;
draw z--urcorner p ;
label.llft(btex B etex,llcorner p) ;
label.lrt(btex C etex,lrcorner p) ;
label.ulft(btex A etex,ulcorner p) ;
label.urt(btex  D etex, urcorner p) ;
label.lft(btex M etex, z) ;
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Alignment on the baseline in a itemize environment with \dfrac{}{}

2015-03-22 Thread Fabrice Couvreur
The alignment of the second item on the baseline is not correct if I use the
command \dfrac{}{}.
How to solve this problem without using the command \framed ?
Best regards,
Fabrice

\starttext
\startitemize[columns,A,joinedup,three][stopper={)},style=bold]
\item  $f^{\prime}(x) = \dfrac{- 1}{(x + 1)^2}$
\item  $f^{\prime}(x) = 1$
\item  $f^{\prime}(x) = \dfrac{1}{x + 1}$
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Add labels to a grid (Metafun)

2015-03-06 Thread Fabrice Couvreur
To add labels to a grid, Hans wrote a macro hlintext (Min, Max, Step, Lenght
, Format). I do not know what to put in Format.
Best regards,
Fabrice

\definecolor[mycolor][c=.4,m=0,y=0,k=0]
\starttext
\start
\switchtobodyfont[small]
\startMPcode
 input tex;
 numeric xmin, xmax, ymin, ymax;
 xmin := 0; xmax := 22; ymax :=460 ;ymin:=0; u := 0.5cm; v:= 0.025cm;
 drawoptions(withpen pencircle scaled 0.5pt withcolor
\MPcolor{mycolor});
 draw hlingrid(ymin,ymax,20,11.5cm,11cm);
 draw vlingrid(xmin,xmax,2,11cm,11.5cm);
 drawoptions(withpen pencircle scaled 1pt) ;
 drawarrow (0,0)--(22,0) scaled u ;
 drawarrow (0,0)--(0,460) scaled v ;
 for i=0 step 2 until 20 :
label.bot(TEX($decimal(i)$),(i,0)*u);
 endfor;
 for i=0 step 20 until 440:
label.lft(TEX($decimal(i)$),(0,i)*v);
  endfor;
 label.bot( $x$,(10.8cm,-0.1cm)) ;
 label.rt( $y$,(0.1cm,11.3cm)) ;

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

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

[NTG-context] Change the dots of the macro \periods[n]

2015-03-06 Thread Fabrice Couvreur
Hi,
Is it possible to change the shape of the dots of  macro \periods[n] to be like
the dots of  macro \definefiller[dots][left=\dontleavehmode, right=\hskip\
ZeroPoint\par] ?
Best regards,
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Problem in using vlingrid() and hlingrid() macros (Metafun)

2015-03-14 Thread Fabrice Couvreur
Hi,
I encounter some problems in the use of vlingrid() and hlingrid() macros. In
the code below, we see that the grid is not correct.
Does the code can be improved ?
thank you,
Fabrice

\starttext
\startMPcode
 path p ;
 u := 2cm ; v:= 1cm ;
 p := (-u,-5v)--(3u,-5v)--(3u,4v)--(-u,4v)--cycle ;
 drawoptions(withpen pencircle scaled 0.5pt withcolor
\MPcolor{mycolor});
 draw vlingrid(-u,3u,u,4u,9v) shifted (0,-5v) ;
 draw hlingrid(-5v,4v,v,9v,4u)  shifted (-u,0)  ;
 drawoptions(withpen pencircle scaled 1pt) ;
 drawarrow (-u,0)--(3u,0) ;
 drawarrow (0,-5v)--(0,4v) ;
   draw curvedfunction (x, 3*x*x-5*x+1, -1, 3, 0.01) xyscaled (u,v)
withcolor red ;
 draw curvedfunction (x, -5*x+1, -1, 3, 0.01) xyscaled (u,v)
withcolor blue ;
 draw curvedfunction (x, 7*x-11, -1, 3, 0.01) xyscaled (u,v)
withcolor green ;
 label.bot(btex $x$ etex,(2.97u,-0.1v)) ;
 label.rt(btex $y$ etex,(0.01u,3.9v)) ;
 label.llft(0,(0,0)) ;
 dotlabel.urt(A,(0,v)) ;
 dotlabel(,(u,-4v)) ;
 label.rt(C,(1.02u,-4v)) ;
 dotlabel.lrt(B,(2u,3v)) ;
 label.bot(1,(u,0)) ;
 label.lft(1,(0,v)) ;
 clip currentpicture to p ;
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Problem after updating TeXlive 2014

2015-03-27 Thread Fabrice Couvreur
 Hi,
Following an update TeXlive 2014, the compilation of my old files causes the
same error :

loading : ConTeXt File Macros / Helpers
! LuaTeX error
...ab/texlive/2014/texmf-dist/tex/context/base/file-ini.lua:49: attempt to
call local 'implement' (a nil value)
stack traceback:
...ab/texlive/2014/texmf-dist/tex/context/base/file-ini.lua:49: in
function 'code'
...ab/texlive/2014/texmf-dist/tex/context/base/util-lua.lua:84: in
function 'loadedluacode'
...ab/texlive/2014/texmf-dist/tex/context/base/luat-env.lua:104: in
function 'luafilechunk'
...ab/texlive/2014/texmf-dist/tex/context/base/luat-cod.lua:45: in
function 'registercode'
[\directlua]:1: in main chunk.
\registerctxluafile ...ua.registercode(#1,#2)}

l.31 \registerctxluafile{file-ini}{1.001}

?

Best regards,
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Color in an environment

2015-03-29 Thread Fabrice Couvreur
Hi,

1. In the following code, the color is not included in the \startframedtext
\stopframedtext environment

2. How can the height of the red square adapts to the height of the text ?

3. Can we improve the code ?


Best regards,
Fabrice

\setupcolors[state=start]
\definecolor[mycolor][c=0.00, m=0.10, y=0.20, k=0.00]

\defineenumeration
  [definition]
  [text={\blue DÉFINITION : },
   headstyle={\bf\feature[+][f:smallcaps]},
   headcommand={
   \startMPcode
   u:=0.3cm;
   filldraw (0,0)--(1u,0)--(1u,1u)--(0,1u)--cycle withcolor red ;
   \stopMPcode},
   width=fit,
   alternative=top,
   title=yes,
   titleright=,
   titleleft=,

before={\startframedtext[width=\textwidth,frame=off,background=color,backgroundcolor=\MPcolor{mycolor}]},
   after={\stopframedtext}]

\starttext
\startdefinition{\red Expérience aléatoire}
Une {\bf expérience aléatoire} est une expérience renouvelable dont les
résultats possibles sont connus sans qu'on puisse déterminer lequel sera
réalisé.
\stopdefinition
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Frame and rulethickness

2015-03-28 Thread Fabrice Couvreur
Hi,
Is it possible to have a different line thickness right and bottom ?
Best regards,
Fabrice


\defineframed
  [ACFRAME]
  [topframe=off,
   bottomframe=on,
   rightframe=off,
   leftframe=on,
   framecolor=green,
   rulethickness=2pt,
   width=fit,
   align=flushleft,
   location=low,
   background=color,
   backgroundcolor=lightgray]

\defineenumeration
  [exemple]
  [text={Exemple},
   headstyle={\bf\feature[+][f:smallcaps]},
   headcommand=\ACFRAME,
   numberconversionset=ACCONVERSION,
   inbetween={\blank[big]},
   ]

\starttext
\startexemple
\dorecurse{10}{blabla}
\stopexemple
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Center two frames

2015-01-13 Thread Fabrice Couvreur
Hi,
I wish the second frame is centered with the first frame. I guess this is
the figure that prevents this. However, even by reducing the value of u, it
does not work.
Best regards,
Fabrice

\definecolor[Border][c=0.00, m=0.00, y=0.00, k=0.25]

\defineframed
   [Myframed]
   [width=0.6\textwidth,
foregroundstyle={\switchtobodyfont[10pt]},
align={high,flushleft},
frame=off,
framecolor=0.625white,
background=borderline,
]

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

\startsetups[table:initialize]
  \setupTABLE[start]
 [align={lohi,right}
 offset=1ex,
 frame=off,
 ]
  \setupTABLE[column][first][width=0.25\textwidth]
  \setupTABLE[column][2][width=0.35\textwidth]
\stopsetups

\starttext

\startuniqueMPgraphic{borderline}
path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
draw p withcolor \MPcolor{Border} dashed evenly withpen pencircle scaled
1.2pt ;
\stopuniqueMPgraphic

\defineoverlay[borderline][\uniqueMPgraphic{borderline}]

\placefigure[right,none]{}{
\start
\switchtobodyfont[7pt]
\startMPcode
numeric u;
u=0.7cm;
z0=(0,0) ;
z1=(2.5u,0) ;
z2=(2.5u,2.5u) ;
z3=(0,2.5u) ;
z4=(-0.2u,0) ;
z5=(-0.2u,2.5u) ;
z6=(0,2.7u) ;
z7=(2.5u,2.7u) ;
z8=(1.25u,1.25u) ;
drawdblarrow z4--z5 ;
drawdblarrow z6--z7 ;
fill z0--z1--z2--z3--cycle withcolor green ;
draw z0--z1--z2--z3--cycle ;
label.top(\unit{100 meter},0.5[z6,z7]) ;
label.lft(\unit{100 meter},0.5[z4,z5]) ;
\stopMPcode
\stop}
Compléter chacun des algorithmes ci-dessous afin qu'ils affichent en
\unit{square meter}, puis en hectares, la superficie d'un terrain
rectangulaire de longueur $L$ mètres et de largeur $l$ mètres, saisies en
entrée.

\startbuffer
\input knuth
\stopbuffer

\blank[big]
\startmidaligned
\Myframed{\getbuffer}
\stopmidaligned

\startbuffer
\input ward
\stopbuffer

\blank[big]
\startmidaligned
\Myframed{\getbuffer}
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Indentation inside environment

2015-01-30 Thread Fabrice Couvreur
Hi,
I would have no indentation for the text (ward)
thank you,
Fabrice

\starttext
\startitemize[A][stopper={.},style=bold]
\iem
\blank[big]
\input ward
\startitemize[n][stopper={.},style=bold]
\item
\item
\item
\stopitemize
\item
\blank[big]
\input ward
\startitemize[n][stopper={.},style=bold]
\item
\item
\item
\stopitemize
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Latest beta : command that no longer works

2015-04-03 Thread Fabrice Couvreur
With the latest version of Context Standalone, this command \filler[dots] no
longer works.
Best regards,
Fabrice

\definefiller[dots][left=\dontleavehmode, right=\hskip\ZeroPoint\par]
\starttext
\dorecurse{4}{\filler[dots]}
\stoptext

fab@debian:~$ source context/tex/setuptex
Setting /home/fab/context/tex as ConTeXt root.
fab@debian:~$ context ntg19.tex

resolvers   | trees | analyzing 'home:texmf'
mtx-context | run 1: luatex
--fmt=/home/fab/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en
--jobname=ntg19
--lua=/home/fab/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui
--no-parse-first-line --c:currentrun=1 --c:fulljobname=./ntg19.tex
--c:input=./ntg19.tex --c:kindofrun=1 --c:maxnofruns=8 cont-yes.mkiv
This is LuaTeX, Version beta-0.80.0 (TeX Live 2015/dev) (rev 5195)
 \write18 enabled.

resolverstrees  analyzing 'home:texmf'
open source  1  1 
/home/fab/context/tex/texmf-context/tex/context/base/cont-yes.mkiv

ConTeXt  ver: 2015.04.01 12:00 MKIV beta  fmt: 2015.4.3  int:
english/english

system   'cont-new.mkiv' loaded
open source  2  2 
/home/fab/context/tex/texmf-context/tex/context/base/cont-new.mkiv
close source 2  2 
/home/fab/context/tex/texmf-context/tex/context/base/cont-new.mkiv
system   files  jobname 'ntg19', input './ntg19', result 'ntg19'
fontslatin modern fonts are not preloaded
languageslanguage 'en' is active
open source  2  3  /home/fab/ntg19.tex
fontspreloading latin modern fonts (second stage)
fonts'fallback modern-designsize rm 12pt' is loaded

tex errorerror on line 3 in file /home/fab/ntg19.tex: ! Undefined
control sequence


\166dots:right -\hskip \ZeroPoint
\par
\spac_fillers_indeed ...\fillerparameter \c!right
  \relax \scratchdimen
\fill...
\syst_helpers_recurse_indeed_yes ...curse_content

\syst_helpers_recurse_indeed
to be read again
{
inserted text
2
\syst_helpers_recurse_indeed ...the \innerrecurse
  }{#2}
l.3 \dorecurse{4}{\filler[dots]}


1 \definefiller[dots][left=\dontleavehmode, right=\hskip\ZeroPoint\par]
2 \starttext
3   \dorecurse{4}{\filler[dots]}
4 \stoptext
5 %%% Local Variables:
6 %%% Mode: context
7 %%% End:
8


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

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

[NTG-context] Environment \starttikzpicture \stoptikzpicture like float

2015-05-24 Thread Fabrice Couvreur
Hi,
Why the command \placerecipe{}{} does not with an environment \
starttikzpicture
\stoptikzpicture ?
Fabrice

\setupexternalfigures[location={local,global,default}]

\setuppagenumbering[location=]

\usemodule[tikz]
\usemodule[pgfplots]
\pgfplotsset{compat=1.8}

\definefloat
   [recipe]
   [figure]

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

\starttext
\startitemize[n][stopper={.},style=bold]
\placerecipe
   {}
{\externalfigure[cow.pdf][width=4cm]}
\item \input knuth
\placerecipe
   {}
{
\starttikzpicture[level 1/.style={level distance=35mm,sibling
distance=40mm},level 2/.style={level distance=25mm,sibling
distance=15mm},cadre/.style={rectangle,draw}]
\node{}[grow=right]
child{node{$\overline{R}$}
child{node{$\overline{M}$}
edge from parent node [below=0.2cm,midway] {\unknown}}
child{node{$M$}
edge from parent node [above=0.2cm,midway] {\unknown}}
edge from parent node [below=0.2cm,midway] {\unknown}
}
child{node{$R$}
child{node{$\overline{M}$}
edge from parent node [below=0.2cm,midway] {\unknown}}
child{node{$M$}
edge from parent node [above=0.2cm,midway] {\unknown}}
edge from parent node [above=0.2cm,scale=0.75] {\unknown}
};
\stoptikzpicture
}
\item \input knuth
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Title of the section that begins

2015-08-12 Thread Fabrice Couvreur
Hi,
The first section begins, so the title appears footer on each page as the
second section does not start. Then the second section starts and was the
title of the second section as the third section does not start and so on.
Thanks,
Fabrice

\setuppagenumbering
  [alternative=doublesided]

\setupfootertexts[margin][][{\getmarking[chapter]}]

\starttext

\chapter{First}

\section{one}

\section{two}

\chapter{Second}

\section{one}

\section{two}

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

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

Re: [NTG-context] Title of the section that begins

2015-08-12 Thread Fabrice Couvreur
Hi Wolfgang,
There is no question, I'm confused !
I will try to be clearer. At the bottom, I wish the title of the current
chapter and title of the current section much like in the document Metafun.
Fabrice

2015-08-12 18:15 GMT+02:00 Wolfgang Schuster schuster.wolfg...@gmail.com:

 Fabrice Couvreur fabrice1.couvr...@gmail.com
 12. August 2015 17:09
 Hi,
 The first section begins, so the title appears footer on each page as the
 second section does not start. Then the second section starts and was the
 title of the second section as the third section does not start and so on.

 What is your question?

 Should the footer on the second page be empty or do you expect ConText to
 print the title of the second chapter on the footer on the fourth page.

 Wolfgang


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

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

 ___

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

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

Re: [NTG-context] Text around a figure in a framedtext

2015-08-13 Thread Fabrice Couvreur
Hi,
Sorry to revive this discussion (which I initiated), but the text in the
following code does not wrapped around the figure.
Why ?
Fabrice


\setupcolors
  [state=start]

\definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
\definecolor[MyColorA][.75(MyColorB,white)]

\defineframedtext
  [MyText]
  [frame=off,
   background=MyFrame,
   width=\textwidth,
   height=fit,
   location=left,
   style=italic]

\defineoverlay
  [MyFrame]
  [\useMPgraphic{MyFrame}]

\definelabel
  [Définition]
  [headstyle=\bf\smallcaps]

\startuseMPgraphic{MyFrame}
path b ;
picture p ;
p := textext.rt(\white\Définition) ;
p := p shifted (2BodyFontSize,OverlayHeight-ypart center p+.25ExHeight)
;
b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ;
fill OverlayBox withcolor \MPcolor{MyColorA} ;
fill b withcolor \MPcolor{MyColorB} ;
draw p ;
\stopuseMPgraphic

\starttext

\startMyText

\starthanging[location=right]
{\startMPcode
  path p ;
  p := fullcircle xscaled 4cm yscaled 2cm ;
  fill p withcolor  cmyk(0,0.62,1,0) ;
  path q ; q := fullcircle scaled 1cm shifted (1cm, ypart center p)
;
  fill q withcolor blue ;
  picture r ;
  r := textext(\white E)shifted (-0.75cm,ypart center p) ;
  picture s ;
  s := textext(\white A)shifted (1cm, ypart center p) ;
  draw r ;
  draw s ;
  draw p ;
  draw q ;
 \stopMPcode}
Soit A une partie d'un ensemble E.

Si $n_E$ et $n_A$ sont respectivement les nombres d'éléments de E et de A,
la {\bi proportion} des éléments de A dans E est le quotient
$p=\frac{n_A}{n_E}$.
\stophanging

\stopMyText


2015-08-10 1:11 GMT+02:00 Jeong Dal hak...@me.com:

 Dear Otared and Wolfgang,

 It works fine after replacing the text itself.
 Thank you for the info.

 Best regards,

 Dalyoung


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

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

 ___

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

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

[NTG-context] Structure : problem with an environment

2015-07-30 Thread Fabrice Couvreur
Hi,
In my project, there is an env-03.tex file that contains this :


\startenvironment env-03

\defineenumeration
  [def]
  [text={Définition},
   headstyle={\bf\feature[+][f:smallcaps]},
   width=fit,
   alternative=left,
   stopper={.}]

\stopenvironment



If I compile, I get this :

open source  4  119  env-03.tex

tex errortex error on line 10 in file env-03.tex: ! You can't use
a prefix with `\begingroup'

to be read again
\begingroup
\strc_enumerations_command #1-\begingroup
   \strc_constructions_initialize
{#...
to be read again
\201
\dostepwiserecurse ...on \recursedepth \endcsname
  ##1##2{#4}\global
\expanda...
inserted text ...numerationsub {\v!sub \currentenumerationsub }}
  \else \let
\currentenumera...
\define_enumeration ...he \everydefineenumeration
  \let \currentenumeration
\...
...
l.10


 1 \startenvironment env-03
 2
 3 \defineenumeration
 4   [def]
 5   [text={Définition},
 6headstyle={\bf\feature[+][f:smallcaps]},
 7width=fit,
 8alternative=left,
 9stopper={.}]
10 
11 \stopenvironment
12

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Some questions about an environment (Metafun)

2015-08-04 Thread Fabrice Couvreur
 Hi,
How to have Definition 1, Definition 2, Definition 3 ... ?

Is it possible to translate the image p until the left edge of the text area
?

Thank you,
Fabrice

\showframe

\setupcolors[state=start,cmyk=yes]

\definecolor[MyColor][c=0.00, m=0.10, y=0.20, k=0.00]
\definecolor[myColor][c=0.00, m=0.62, y=1.00, k=0.00]

\setupbodyfont[11pt]
\defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

\defineframedtext
   [MyText]
   [frame=off,
background=MyFrame,
width=0.9\textwidth,
location=right]

\defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

\def\StartFrame{\startMyText}
\def\StopFrame{\startMyText}

\setMPtext{MyFrame}{\hbox spread 1em {\hss\strut
{\bf\feature[+][f:smallcaps]  Définition 1 }\hss}}}

\startuseMPgraphic{MyFrame}

path a ;
path b ;
picture p ;
o := BodyFontSize ;
p :=textext.rt(\MPstring{MyFrame}) ;
p := p shifted (0,OverlayHeight-ypart center p) ;
a := unitsquare xyscaled(OverlayWidth,OverlayHeight) ;
fill a withcolor \MPcolor{MyColor} ;
b := boundingbox p ;
fill b withcolor \MPcolor{myColor} ;
draw p withcolor white ;

\stopuseMPgraphic

\starttext
\startlinecorrection[blank]
\startMyText
\input knuth
\stopMyText
\stoplinecorrection

\startlinecorrection[blank]
\startMyText
\input knuth
\stopMyText
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Questions around my page design

2015-08-03 Thread Fabrice Couvreur
Hi,
I wish the numérotion pages is reversed at each new page: right left right
...
I wish the bottom of the title page of each section of the current page.
Thanks for your help,
Fabrice


\setuppagenumbering
  [location=]

\setupheadertexts
  [margin]
  [][\hfill\pagenumber\hfill]

\setupheadertexts[{\getmarking[chapter]}]

\setupfootertexts[{\getmarking[section]}]


\starttext

\startchapter
  [title=First]

\startsection
  [title=One]
\dorecurse{5}{\input ward}
\stopsection

\stopchapter

\startchapter
  [title=Second]

\startsection
  [title=One]
\dorecurse{5}{\input ward}
\stopsection

\startsection
  [title=Two]
\dorecurse{5}{\input ward}
\stopsection

\stopchapter


\startchapter
  [title=Third]

\startsection
  [title=One]
\dorecurse{5}{\input ward}
\stopsection

\startsection
  [title=Two]
\dorecurse{5}{\input ward}
\stopsection

\startsection
  [title=Three]
\dorecurse{5}{\input ward}
\stopsection

\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Floating dimensions that adapts automaticall

2015-08-03 Thread Fabrice Couvreur
 Hi,
In the code below, we can see that the table overflows.
Of course, one can play on the table dimensions to adjust its position.
However it is possible to define a floating whose dimensions automatically
adapt to the available space ?
Thank you,
Fabrice

\definefloat
   [MyFloat]
   [figure]

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

\startsetups[table:initialize]
  \setupTABLE[start][align={middle,lohi},width=2cm,offset=1ex]
  \setupTABLE[column][first][width=4cm]
  \setupTABLE[row][first][background=color,backgroundcolor=lightgray]
\stopsetups

\showframe

\starttext
\placeMyFloat{}{\externalfigure[louvre.jpg][width=5cm]}
Le tableau ci-dessous indique le nombre d'entrées (en milliers) au musée du
Louvre :
\blank[medium]
\startmidaligned
\placeMyFloat{}{
\bTABLE[setups=table:initialize]
\bTR
\bTH  \eTH
\bTD  \eTD
\bTD  \eTD
\bTD  \eTD
\bTD  \eTD
\eTR
\bTR
\bTH  \eTH
\bTD  \eTD
\bTD  \eTD
\bTD  \eTD
\bTD  \eTD
\eTR
\eTABLE
\stopmidaligned}
\blank[medium]
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Numbered page template

2015-07-30 Thread Fabrice Couvreur
In this manual, I like the numbered pages indicating each chapter. I
suppose they are made with Metafun. Is it possible to have an explanation ?
Thank You,
Fabrice

http://www.pragma-ade.nl/general/manuals/cont-enp.pdf
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Small problems with my columns

2015-07-30 Thread Fabrice Couvreur
Hi,
In the code below, how to make the line hyphenation is in the first column and
not in the second.
Thank You.
Fabrice

\setupcolors[state=start]
\definemixedcolumns
  [mycolumn]
  [
n=2,
separator=rule,
rulecolor=gray,
rulethickness=1pt,
balance=yes,
  ]
\setuppapersize[A4][A4]

\setuplayout[
backspace=15mm,
width=middle,
topspace=15mm,
height=middle,
header=0pt,
footer=0pt,
]
\loadtypescriptfile[mathdesign]

\definetypeface [mainface] [rm] [serif] [palatino] [default]
\definetypeface [mainface] [tt] [mono]  [modern] [default] [rscale=0.9]
\definetypeface [mainface] [mm] [math]  [xits] [default]

\setupbodyfont[mainface,11pt]

\starttext
\startmycolumn
\startitemize[n][stopper={)},style=bold]
\item
\startitemize[a][stopper={)},style=bold]
\item
\item
\item \'Emettre une conjecture sur la nature de la transformation
correspondant à l'enchaînement de ces deux translations.
\startframedtext[frame=on,background=color,backgroundcolor=lightgray,width=local]
On notera $\vec{u} + \vec{v}$ les caractéristiques de cette nouvelle
transformation.
\stopframedtext
\stopitemize
\column
\item
\startitemize[a][stopper={)},style=bold]
\item
\item
\item
\stopitemize
\item
\startitemize[a][stopper={)},style=bold]
\item
\item
\item
\stopitemize
\stopitemize
\stopmycolumn
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Text around a figure in a framedtext

2015-08-07 Thread Fabrice Couvreur
Hi,
Why the text does not move in the first framedtext like the second
framedtext ?
Thank you.
Fabrice

\definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
\definecolor[MyColorA][.75(MyColorB,white)]

\defineframedtext
  [MyText]
  [frame=off,
   background=MyFrame,
   width=\textwidth,
   location=right]

\defineoverlay
  [MyFrame]
  [\useMPgraphic{MyFrame}]

\definelabel
  [Définition]
  [headstyle=\bf\smallcaps]

\startuseMPgraphic{MyFrame}
path b ;
picture p ;
p := textext.rt(\white\Définition) ;
p := p shifted (2BodyFontSize,OverlayHeight-ypart center p+.25ExHeight)
;
b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ;
fill OverlayBox withcolor \MPcolor{MyColorA} ;
fill b withcolor \MPcolor{MyColorB} ;
draw p ;
\stopuseMPgraphic

\starttext
\startMyText
\placefigure[right,none]{}{%
 \startMPcode
  draw unitsquare scaled 2cm ;
  \stopMPcode}
\input knuth
\stopMyText

\startframedtext{
\placefigure[right,none]{}{%
 \startMPcode
  draw unitsquare scaled 2cm ;
  \stopMPcode}
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Command that does not give the expected result (Metafun)

2015-08-11 Thread Fabrice Couvreur
Hi Wolfgang,
I will follow your advice but I will try to understand, when I have the time
, the difference between
\unexpanded\def\ChapterCommand#1#2% et \def\ChapterCommand#1#2%.
Fabrice

2015-08-10 22:38 GMT+02:00 Wolfgang Schuster schuster.wolfg...@gmail.com:

 Fabrice Couvreur fabrice1.couvr...@gmail.com
 10. August 2015 09:13
 Dear Hans,
 I tested without understanding what \unexpanded, and of course it works !

 You can use ConTeXt’s \define command where you don’t have to think about
 \unexpanded etc., e.g.

 \define[2]\ChapterCommand
   {\setbox\scratchbox\hbox to \leftmarginwidth{#1\hss}%
\hskip-\dimexpr\leftmarginwidth+\leftmargindistance\relax
\framed
  [background=titled,frame=off,offset=0pt]
  {\box\scratchbox
   \hskip\leftmargindistance
   #2}}

 Wolfgang


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

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

 ___

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

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

[NTG-context] Command that does not give the expected result (Metafun)

2015-08-09 Thread Fabrice Couvreur
Hi Hans,
In the document Metafun, you use commands that I like, and I try to
understand the definition and operation, which is not always easy with TeX
commands.
Also, in the following code, this does not give the expected result.
Thank you.
Fabrice

\showframe

\setupcolors
  [state=start]

\setuppagenumbering[location=,alternative]

\startuniqueMPgraphic{titled}
path p ;
p := unitsquare xscaled OverlayWidth yscaled OverlayHeight ;
pickup pencircle scaled 1mm ;
drawoptions(withcolor .625yellow) ;
draw llcorner p--lrcorner p ;
setbounds currentpicture to p ;
\stopuniqueMPgraphic

\defineoverlay[titled][\uniqueMPgraphic{titled}]

\def\ChapterCommand#1#2%
  {\setbox0=\hbox to \leftmarginwidth{#1\hss}%
   \hskip-\leftmarginwidth
   \hskip-\leftmargindistance
   \framed
 [background=titled,frame=off,offset=0pt]
 {\box0
  \hskip\leftmargindistance
  #2}}

\setuphead
  [chapter,section,subsection]
  [command=\ChapterCommand,
   color=darkred]

\starttext
\chapter{First}
\section{First}
\subsection{First}
\stoptext


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

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

[NTG-context] Strange behavior (TikZ)

2015-08-11 Thread Fabrice Couvreur
Hi,
Strange behavior: why is the colored text ?
Thanks,
Fabrice

\usemodule[tikz]

\startuniqueMPgraphic{titled}
path p ;
p := unitsquare xscaled OverlayWidth yscaled OverlayHeight ;
pickup pencircle scaled 1mm ;
drawoptions(withcolor .625yellow) ;
draw llcorner p--lrcorner p ;
setbounds currentpicture to p ;
\stopuniqueMPgraphic

\defineoverlay[titled][\uniqueMPgraphic{titled}]

\define[2]\ChapterCommand
  {\setbox\scratchbox\hbox to \leftmarginwidth{#1\hss}%
   \hskip-\dimexpr\leftmarginwidth+\leftmargindistance\relax
   \framed
 [background=titled,frame=off,offset=0pt]
 {\box\scratchbox
  \hskip\leftmargindistance
  #2}}

\setuphead
  [chapter]
  [command=\ChapterCommand,
   textstyle=\ss,
   color=darkred,
   conversion=Characters]

\setuphead
  [section]
  [command=\ChapterCommand,
   textstyle=\ss,
   color=darkred,
   sectionsegments=section:section]

\starttext

\startchapter
  [title={Activités d'approche}]

\startsection
  [title={Sans carreaux}]

\placefigure[right,none]{}
{
\hbox{
\starttikzpicture[=stealth,scale=0.8]
\draw [-,color=blue,ultra thick] (0,0)--(5,2);
\draw [-,color=green,ultra thick] (6,1.5)--(5,0);
\draw [-,color=red,ultra thick] (4,-0.8)--(2,-0.1);
\draw [color=blue](2.5,1) node[above] {$\vec{u}$};
\draw [color=green](5.5,0.75) node[right] {$\vec{v}$};
\draw [,color=red](3,-0.45)   node[above] {$\vec{w}$};
\node (A) at (0.5,-0.5) {A};
\node [above right] at (A) {$\times$};
\stoptikzpicture}}
\startitemize[n][stopper={)},style=bold]
On a tracé trois vecteurs et placé un point A sur la figure ci-contre.
\startitemize[a][stopper={)},style=bold]
\item Construire le point C tel que $\vec{\rm{AC}}=\vec{u} + \vec{v}$.
\item Construire le point B tel que  $\vec{\rm{AB}}=\vec{u} + \vec{v} +
\vec{w} $.
\stopitemize
\stopitemize

\stopsection

\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Some questions about an environment (Metafun)

2015-08-06 Thread Fabrice Couvreur
Hi,
The following code (Metafun documentation, thanks again Hans !) is fully
understood and works very well. Sorry if I insist, but can we create a
counter to avoid writing \FrameTitle{Définition 1},
\FrameTitle{Définition 2}... ?
Thus, the only invocation \startMyText ... \stopMyText,  \startMyText ... \
stopMyText ... this return Définition 1, Définition 2 ...
Thank you,
Fabrice


\setupbodyfont [palatino,11pt]

\setupcolors[state=start,cmyk=yes]

\definecolor[MyColor][c=0.00, m=0.10, y=0.20, k=0.00]
\definecolor[myColor][c=0.00, m=0.62, y=1.00, k=0.00]

\defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

\defineframedtext
   [MyText]
   [frame=off,
background=MyFrame,
width=\textwidth,
location=right]

\defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

\def\StartFrame{\startMyText}
\def\StopFrame{\startMyText}

\def\FrameTitle#1{\setMPtext{MyFrame}{\hbox spread
1em{\hss\strut{\bf\feature[+][f:smallcaps]}#1\hss}}}

\setMPtext{MyFrame}{}

\startuseMPgraphic{MyFrame}
path a ;
path b ;
picture p ;
o := BodyFontSize ;
p :=textext.rt(\MPstring{MyFrame}) ;
p := p shifted (2o,OverlayHeight-ypart center p) ;
a := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
fill a withcolor \MPcolor{MyColor} ;
b := boundingbox p ;
fill b withcolor \MPcolor{myColor} ;
draw p withcolor white ;
\stopuseMPgraphic
\starttext
\FrameTitle{Définition 1}
\startMyText
\input knuth
\stopMyText
\FrameTitle{Définition 2}
\startMyText
\input knuth
\stopMyText
\stoptext


2015-08-04 21:30 GMT+02:00 Fabrice Couvreur fabrice1.couvr...@gmail.com:

 Hi Aditya,
 Thank you, I have already thought of this solution, but I do not know to
 use with the environment that I created.
 Fabrice

 2015-08-04 18:02 GMT+02:00 Aditya Mahajan adit...@umich.edu:

 On Tue, 4 Aug 2015, Fabrice Couvreur wrote:

 How to have Definition 1, Definition 2, Definition 3 ... ?


 \defineenumeration[definition][text=Definition]

 Aditya

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

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

 ___



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

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

Re: [NTG-context] Some questions about an environment (Metafun)

2015-08-04 Thread Fabrice Couvreur
Hi Hans,
Thank you for your suggestion, but it's not what I want, but I probably
misstated my request. For me, the image p contains the text Définition 1, and
this is what I want orange rectangle translate to the left edge of the text
area.
Am I more clearly ?
Fabrice

2015-08-04 20:08 GMT+02:00 Hans Hagen pra...@wxs.nl:

 On 8/4/2015 5:04 PM, Fabrice Couvreur wrote:

 Hi,
 How to have Definition 1, Definition 2, Definition 3 ...?

 Is it possible to translate the image p until the left edge of the text
 area ?



 \startuseMPgraphic{MyFrame}
 picture p ;
 p := textext.rt(\MPstring{MyFrame}) ;
 p := p shifted (0,OverlayHeight-ypart center p) ;
 fill OverlayBox leftenlarged .1TextWidth withcolor \MPcolor{MyColor} ;
 fill boundingbox p withcolor \MPcolor{myColor} ;
 draw p withcolor white ;
 setbounds currentpicture to OverlayBox ;
 \stopuseMPgraphic



 Thank you,
 Fabrice

 \showframe

 \setupcolors[state=start,cmyk=yes]

 \definecolor[MyColor][c=0.00, m=0.10, y=0.20, k=0.00]
 \definecolor[myColor][c=0.00, m=0.62, y=1.00, k=0.00]

 \setupbodyfont[11pt]
 \defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

 \defineframedtext
 [MyText]
 [frame=off,
  background=MyFrame,
  width=0.9\textwidth,
  location=right]

 \defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

 \def\StartFrame{\startMyText}
 \def\StopFrame{\startMyText}

 \setMPtext{MyFrame}{\hbox spread 1em {\hss\strut
 {\bf\feature[+][f:smallcaps]  Définition 1 }\hss}}}

 \startuseMPgraphic{MyFrame}

 path a ;
 path b ;
 picture p ;
 o := BodyFontSize ;
 p :=textext.rt(\MPstring{MyFrame}) ;
 p := p shifted (0,OverlayHeight-ypart center p) ;
 a := unitsquare xyscaled(OverlayWidth,OverlayHeight) ;
 fill a withcolor \MPcolor{MyColor} ;
 b := boundingbox p ;
 fill b withcolor \MPcolor{myColor} ;
 draw p withcolor white ;

 \stopuseMPgraphic

 \starttext
 \startlinecorrection[blank]
 \startMyText
 \input knuth
 \stopMyText
 \stoplinecorrection

 \startlinecorrection[blank]
 \startMyText
 \input knuth
 \stopMyText
 \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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net

 ___



 --

 -
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
  | www.pragma-pod.nl
 -


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

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

 ___

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

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

Re: [NTG-context] Some questions about an environment (Metafun)

2015-08-07 Thread Fabrice Couvreur
Hi Hans,
Thank you for responding to my request, it's really nice. By cons I do not
understand what you mean 
some day textext might handle it okay
Fabrice

2015-08-07 14:26 GMT+02:00 Hans Hagen pra...@wxs.nl:

 On 8/6/2015 11:38 PM, Fabrice Couvreur wrote:

 Hi,
 The following code (Metafun documentation, thanks again Hans !) is fully
 understood and works very well. Sorry if I insist, but can we create a
 counter to avoid writing \FrameTitle{Définition 1},
 \FrameTitle{Définition 2}... ?
 Thus, the only invocation \startMyText ... \stopMyText, \startMyText ...
 \stopMyText... this return Définition 1, Définition 2 ...

 Thank you,
 Fabrice


 \setupbodyfont [palatino,11pt]

 \setupcolors[state=start,cmyk=yes]

 \definecolor[MyColor][c=0.00, m=0.10, y=0.20, k=0.00]
 \definecolor[myColor][c=0.00, m=0.62, y=1.00, k=0.00]

 \defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

 \defineframedtext
 [MyText]
 [frame=off,
  background=MyFrame,
  width=\textwidth,
  location=right]

 \defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

 \def\StartFrame{\startMyText}
 \def\StopFrame{\startMyText}

 \def\FrameTitle#1{\setMPtext{MyFrame}{\hbox spread
 1em{\hss\strut{\bf\feature[+][f:smallcaps]}#1\hss}}}

 \setMPtext{MyFrame}{}

 \startuseMPgraphic{MyFrame}
 path a ;
 path b ;
 picture p ;
 o := BodyFontSize ;
 p :=textext.rt(\MPstring{MyFrame}) ;
 p := p shifted (2o,OverlayHeight-ypart center p) ;
 a := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
 fill a withcolor \MPcolor{MyColor} ;
 b := boundingbox p ;
 fill b withcolor \MPcolor{myColor} ;
 draw p withcolor white ;
 \stopuseMPgraphic
 \starttext
 \FrameTitle{Définition 1}
 \startMyText
 \input knuth
 \stopMyText
 \FrameTitle{Définition 2}
 \startMyText
 \input knuth
 \stopMyText
 \stoptext


 \setupbodyfont [palatino,11pt]

 \definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
 \definecolor[MyColorA][.75(MyColorB,white)]  %c=0.00, m=0.10, y=0.20,
 k=0.00]

 \defineframedtext
   [MyText]
   [frame=off,
background=MyFrame,
width=\textwidth,
location=right]

 \defineoverlay
   [MyFrame]
   [\useMPgraphic{MyFrame}]

 \definelabel
   [Définition]
   [headstyle=\bf\smallcaps]

 \startuseMPgraphic{MyFrame}
 path b ;
 picture p ;
 p := textext.rt(\white\Définition) ; % some day textext might handle
 it okay
 p := p shifted (2BodyFontSize,OverlayHeight-ypart center
 p+.25ExHeight) ;
 b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ;
 fill OverlayBox withcolor \MPcolor{MyColorA} ;
 fill b withcolor \MPcolor{MyColorB} ;
 draw p ;
 \stopuseMPgraphic

 \starttext

 \startMyText
 \input knuth
 \stopMyText

 \startMyText
 \input knuth
 \stopMyText

 \stoptext

 2015-08-04 21:30 GMT+02:00 Fabrice Couvreur fabrice1.couvr...@gmail.com
 mailto:fabrice1.couvr...@gmail.com:

 Hi Aditya,
 Thank you, I have already thought of this solution, but I do not
 know to use with the environment that I created.
 Fabrice

 2015-08-04 18:02 GMT+02:00 Aditya Mahajan adit...@umich.edu
 mailto:adit...@umich.edu:

 On Tue, 4 Aug 2015, Fabrice Couvreur wrote:

 How to have Definition 1, Definition 2, Definition 3 ... ?


 \defineenumeration[definition][text=Definition]

 Aditya

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

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

 ___






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

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

 ___



 --

 -
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
  | www.pragma-pod.nl
 -

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

 maillist : ntg-context@ntg.nl /
 http

Re: [NTG-context] Text around a figure in a framedtext

2015-08-08 Thread Fabrice Couvreur
Hi Otared,
A small mistake on your part : do not write \input knuth.tex but \input
knuth.
Then I want the text in the first framedtext wrapped around the figure as in
the second.
Fabrice

2015-08-08 6:18 GMT+02:00 Otared Kavian ota...@gmail.com:

 Hi,

 You should use the same width if you want to obtain the same result (by
 the way, you have to say also \stopframedtext in your source file):

 \startframedtext[width=\textwidth]{
 \placefigure[right,none]{}{%
  \startMPcode
   draw unitsquare scaled 2cm ;
   \stopMPcode}
 \input knuth.tex }
 \stopframedtext

 Best regards: OK

  On 08 Aug 2015, at 00:49, Fabrice Couvreur fabrice1.couvr...@gmail.com
 wrote:
 
  Hi,
  Why the text does not move in the first framedtext like the second
 framedtext ?
  Thank you.
  Fabrice
 
  \definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
  \definecolor[MyColorA][.75(MyColorB,white)]
 
  \defineframedtext
[MyText]
[frame=off,
 background=MyFrame,
 width=\textwidth,
 location=right]
 
  \defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
 
  \definelabel
[Définition]
[headstyle=\bf\smallcaps]
 
  \startuseMPgraphic{MyFrame}
  path b ;
  picture p ;
  p := textext.rt(\white\Définition) ;
  p := p shifted (2BodyFontSize,OverlayHeight-ypart center
 p+.25ExHeight) ;
  b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ;
  fill OverlayBox withcolor \MPcolor{MyColorA} ;
  fill b withcolor \MPcolor{MyColorB} ;
  draw p ;
  \stopuseMPgraphic
 
  \starttext
  \startMyText
  \placefigure[right,none]{}{%
   \startMPcode
draw unitsquare scaled 2cm ;
\stopMPcode}
  \input knuth
  \stopMyText
 
  \startframedtext{
  \placefigure[right,none]{}{%
   \startMPcode
draw unitsquare scaled 2cm ;
\stopMPcode}
  \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://tex.aanhet.net
  archive  : http://foundry.supelec.fr/projects/contextrev/
  wiki : http://contextgarden.net
 
 ___


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

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

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

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

Re: [NTG-context] Text around a figure in a framedtext

2015-08-09 Thread Fabrice Couvreur
Hi Wolfgang,
Thank you for all these explanations that make me progress in the use of
Context.
Fabrice

2015-08-08 10:40 GMT+02:00 Wolfgang Schuster schuster.wolfg...@gmail.com:

 Fabrice Couvreur fabrice1.couvr...@gmail.com
 8. August 2015 00:49
 Hi,
 Why the text does not move in the first framedtext like the second
 framedtext ?

 You have to use \starthanging instead of \placefgure when you’re in a
 frame.

 \starttext

 \startframedtext[width=max]
 \starthanging[location=right]
 {\startMPcode
  draw unitsquare scaled 2cm ;
  \stopMPcode}
 \input tufte
 \stophanging
 \stopframedtext

 \stoptext

 Wolfgang


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

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

 ___

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

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

Re: [NTG-context] Title of the section that begins

2015-08-13 Thread Fabrice Couvreur
\setupfootertexts[text][{\getmarking[section]}][{\getmarking[chapter]}]



2015-08-12 23:10 GMT+02:00 Fabrice Couvreur fabrice1.couvr...@gmail.com:

 Hi Wolfgang,
 There is no question, I'm confused !
 I will try to be clearer. At the bottom, I wish the title of the current
 chapter and title of the current section much like in the document Metafun
 .
 Fabrice

 2015-08-12 18:15 GMT+02:00 Wolfgang Schuster schuster.wolfg...@gmail.com
 :

 Fabrice Couvreur fabrice1.couvr...@gmail.com
 12. August 2015 17:09
 Hi,
 The first section begins, so the title appears footer on each page as the
 second section does not start. Then the second section starts and was the
 title of the second section as the third section does not start and so
 on.

 What is your question?

 Should the footer on the second page be empty or do you expect ConText to
 print the title of the second chapter on the footer on the fourth page.

 Wolfgang


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

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

 ___



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

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

Re: [NTG-context] Text around a figure in a framedtext

2015-08-13 Thread Fabrice Couvreur
Hi,
Well, I think I have solved the problem : it is because of the blank line.
Why ?
Fabrice

2015-08-13 17:19 GMT+02:00 Fabrice Couvreur fabrice1.couvr...@gmail.com:

 Hi,
 Sorry to revive this discussion (which I initiated), but the text in the
 following code does not wrapped around the figure.
 Why ?
 Fabrice


 \setupcolors
   [state=start]

 \definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
 \definecolor[MyColorA][.75(MyColorB,white)]

 \defineframedtext
   [MyText]
   [frame=off,
background=MyFrame,
width=\textwidth,
height=fit,
location=left,
style=italic]

 \defineoverlay
   [MyFrame]
   [\useMPgraphic{MyFrame}]

 \definelabel
   [Définition]
   [headstyle=\bf\smallcaps]

 \startuseMPgraphic{MyFrame}
 path b ;
 picture p ;
 p := textext.rt(\white\Définition) ;
 p := p shifted (2BodyFontSize,OverlayHeight-ypart center
 p+.25ExHeight) ;
 b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ;
 fill OverlayBox withcolor \MPcolor{MyColorA} ;
 fill b withcolor \MPcolor{MyColorB} ;
 draw p ;
 \stopuseMPgraphic

 \starttext

 \startMyText

 \starthanging[location=right]
 {\startMPcode
   path p ;
   p := fullcircle xscaled 4cm yscaled 2cm ;
   fill p withcolor  cmyk(0,0.62,1,0) ;
   path q ; q := fullcircle scaled 1cm shifted (1cm, ypart center
 p) ;
   fill q withcolor blue ;
   picture r ;
   r := textext(\white E)shifted (-0.75cm,ypart center p) ;
   picture s ;
   s := textext(\white A)shifted (1cm, ypart center p) ;
   draw r ;
   draw s ;
   draw p ;
   draw q ;
  \stopMPcode}
 Soit A une partie d'un ensemble E.

 Si $n_E$ et $n_A$ sont respectivement les nombres d'éléments de E et de A,
 la {\bi proportion} des éléments de A dans E est le quotient
 $p=\frac{n_A}{n_E}$.
 \stophanging

 \stopMyText


 2015-08-10 1:11 GMT+02:00 Jeong Dal hak...@me.com:

 Dear Otared and Wolfgang,

 It works fine after replacing the text itself.
 Thank you for the info.

 Best regards,

 Dalyoung


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

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

 ___



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

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

  1   2   3   4   5   6   7   8   >