[NTG-context] Framedtext in a float

2016-10-31 Thread Fabrice Couvreur
Hello,
How to make the width of framedtext automatically adapts to its contents.
Fabrice

\definefloat
   [recipe]
   [figure]

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

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


\defineframedtext
  [MyFrame]
  [before={\blank},
   after={\blank},
   frame=off,
   background=MyFrame,
   width=6cm,
   height=fit]

\startuseMPgraphic{MyFrame}
 path b;
 picture p;
 p := textext.rt("\tfx\white\framedtextparameter{Title}");
 p := p shifted (2BodyFontSize,OverlayHeight-ypart center p+.25ExHeight);
 b := boundingbox p enlarged .3EmWidth ;
 fill OverlayBox withcolor \MPcolor{MyColorA};
 fill b withcolor \MPcolor{MyColorB} ;
 draw p ;
 setbounds currentpicture to boundingbox currentpicture enlarged 2mm ;
\stopuseMPgraphic

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

  \starttext

  \placerecipe{}{
  \startMyFrame[Title=Info]
  L'histogramme est constitué de rectangles dont les bases correspondent
aux classes et dont les aires sont proportionnelles aux effectifs ou
fréquences des classes.
  \stopMyFrame}

  \input Knuth

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] ConTeXt and duotone graphics

2016-10-31 Thread Piotr Kopszak
Hello list,

I have just came across this little script which allows to create
duotone pdfs with DeviceN channel. The script takes two grayscale tifs
as arguments and returns a pdf duotone. I guess it shouldn't be too
difficult to include it in the ConTeXt processing chain. Probably one
could include a command in a source file which would reference both
files used for  creation of a duotone image and the resulting image
would be used in the final pdf. How would you go about implementing
such a coupling?

Here is the link to the script

http://stdin.fr/Bazar/SpotColorImages

Best

Piotr


-- 
http://okle.pl
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Emacs24 + AucTeX + ConTeXt

2016-10-31 Thread Fabrice Couvreur
Hi Peter,
Thank you very much.

2016-10-31 15:22 GMT+01:00 Peter Münster :

> On Mon, Oct 31 2016, Fabrice Couvreur wrote:
>
> > how to add the option -- purgeall ?
>
> (setq ConTeXt-mode-hook
>   (lambda () (setq TeX-command-extra-options "--purgeall")))
>
> --
>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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> 
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Use \unit for value and uncertainty

2016-10-31 Thread Florian Leupold
Hello!

There does not seem to be a simple solution to using \unit with uncertainties, 
see below.

Could someone maybe point me to the relevant source code for the parser for 
\unit in MKIV? Then I would try to modify/improve the code myself.

Thanks a lot and best regards,
Florian


> On 25.09.16, at 20:11, Florian Leupold  wrote:
> 
> Dear list
> 
> Is it possible to use the units module (in MKIV) for value plusminus 
> uncertainty in a way similar to the \SI command in LaTeX, like
>  \unit{(1.59\pm2)e-19 coulomb} or
>  \unit{1.59(2)e-19 coulomb}?
> 
> Thanks and best regards,
> Florian
> ___
> If your question is of interest to others as well, please add an 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Emacs24 + AucTeX + ConTeXt

2016-10-31 Thread Peter Münster
On Mon, Oct 31 2016, Fabrice Couvreur wrote:

> how to add the option -- purgeall ?

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

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

Re: [NTG-context] Emacs24 + AucTeX + ConTeXt

2016-10-31 Thread Fabrice Couvreur
Sorry, but I have one question: how to add the option -- purgeall ?
Fabrice

2016-10-31 14:16 GMT+01:00 Fabrice Couvreur :

> Hi Peter,
> It seems to work !
> Thank you to Peter, Tobias, Michael and Mica for your help
> Fabrice
>
> 2016-10-31 11:59 GMT+01:00 Peter Münster :
>
>> On Mon, Oct 31 2016, Fabrice Couvreur wrote:
>>
>> > /home/fab/context/tex/texmf-linux-64/bin/context:...
>>
>> Please replace this with /home/fab/context/tex/texmf-linux-64/bin:...
>>
>> --
>>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/list
>> info/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : http://contextgarden.net
>> 
>> ___
>>
>
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Emacs24 + AucTeX + ConTeXt

2016-10-31 Thread Fabrice Couvreur
Hi Peter,
It seems to work !
Thank you to Peter, Tobias, Michael and Mica for your help
Fabrice

2016-10-31 11:59 GMT+01:00 Peter Münster :

> On Mon, Oct 31 2016, Fabrice Couvreur wrote:
>
> > /home/fab/context/tex/texmf-linux-64/bin/context:...
>
> Please replace this with /home/fab/context/tex/texmf-linux-64/bin:...
>
> --
>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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> 
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Emacs24 + AucTeX + ConTeXt

2016-10-31 Thread Peter Münster
On Mon, Oct 31 2016, Fabrice Couvreur wrote:

> /home/fab/context/tex/texmf-linux-64/bin/context:...

Please replace this with /home/fab/context/tex/texmf-linux-64/bin:...

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

Re: [NTG-context] Emacs24 + AucTeX + ConTeXt

2016-10-31 Thread Fabrice Couvreur
/home/fab/context/tex/texmf-linux-64/bin/context:/home/fab/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/texmf/tex/latex/tex4ebook-master/tex4ebook:/home/fab/texlive/2016/bin/x86_64-linux

2016-10-31 10:18 GMT+01:00 Peter Münster :

> On Mon, Oct 31 2016, Fabrice Couvreur wrote:
>
> > it's always texlive context and not standalone.
>
> What is the output of M-x getenv RET PATH RET ?
>
> --
>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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> 
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Emacs24 + AucTeX + ConTeXt

2016-10-31 Thread Peter Münster
On Mon, Oct 31 2016, Fabrice Couvreur wrote:

> it's always texlive context and not standalone.

What is the output of M-x getenv RET PATH RET ?

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

Re: [NTG-context] Emacs24 + AucTeX + ConTeXt

2016-10-31 Thread Fabrice Couvreur
Hi Tobber,
First of all thank you for your help. Everything worked except for the
compilation where it's always texlive context and not standalone.

Running `ConTeXt' on `ntg62' with ``context --once --texutil  --nonstop
ntg62.tex''

resolvers   | trees | analyzing 'home:texmf'
mtx-context | run 1: luatex
--fmt="/home/fab/texlive/2016/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex/cont-en"
--interaction="nonstopmode" --jobname="ntg62"
--lua="/home/fab/texlive/2016/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex/cont-en.lui"
--no-parse-first-line --c:currentrun=1 --c:fulljobname="./ntg62.tex"
--c:input="./ntg62.tex" --c:kindofrun=3 --c:maxnofruns=1 --c:nonstopmode
--c:once --c:texutil "cont-yes.mkiv"
This is LuaTeX, Version 0.95.0 (TeX Live 2016)
 system commands enabled.

resolvers   > trees > analyzing 'home:texmf'
open source > 1 > 1 >
/home/fab/texlive/2016/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv

ConTeXt  ver: 2016.05.17 19:20 MKIV current  fmt: 2016.10.29  int:
english/english

system  > 'cont-new.mkiv' loaded
open source > 2 > 2 >
/home/fab/texlive/2016/texmf-dist/tex/context/base/mkiv/cont-new.mkiv
close source> 2 > 2 >
/home/fab/texlive/2016/texmf-dist/tex/context/base/mkiv/cont-new.mkiv

system  > files > jobname 'ntg62', input './ntg62', result 'ntg62'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > 2 > 3 > /home/fab/ntg62.tex
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
backend > xmp > using file
'/home/fab/texlive/2016/texmf-dist/tex/context/base/mkiv/lpdf-pdx.xml'
pages   > flushing realpage 1, userpage 1
close source> 2 > 3 > /home/fab/ntg62.tex
close source> 1 > 3 >
/home/fab/texlive/2016/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv

mkiv lua stats  > used config file:
selfautoparent:/texmfcnf.lua;selfautoparent:/texmf-dist/web2c/texmfcnf.lua
mkiv lua stats  > used cache path:
/home/fab/texlive/2016/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9
mkiv lua stats  > resource resolver: loadtime 0.115 seconds, 1 scans with
scantime 0.021 seconds, 0 shared scans, 9 found files, scanned paths:
/home/fab/texmf
mkiv lua stats  > stored bytecode data: 387 modules (0.337 sec), 82 tables
(0.011 sec), 469 chunks (0.348 sec)
mkiv lua stats  > traced context: maxstack: 1175, freed: 0, unreachable:
1175
mkiv lua stats  > cleaned up reserved nodes: 47 nodes, 9 lists of 444
mkiv lua stats  > node memory usage: 11 glue, 2 penalty, 22 attribute, 38
glue_spec, 8 attribute_list, 2 temp
mkiv lua stats  > node list callback tasks: 6 unique task lists, 5
instances (re)created, 32 calls
mkiv lua stats  > used backend: pdf (backend for directly generating pdf
output)mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.000 seconds
loading
mkiv lua stats  > callbacks: 136 direct, 244 indirect, 380 total
mkiv lua stats  > randomizer: initialized with value 0.1895933152128
mkiv lua stats  > loaded patterns: en::2, load time: 0.000
mkiv lua stats  > result saved in file: ntg62.pdf, compresslevel 3,
objectcompresslevel 3
mkiv lua stats  > loaded fonts: 2 files: latinmodern-math.otf,
lmroman12-regular.otf
mkiv lua stats  > font engine: otf 3.020, afm 1.512, tfm 1.000, 4
instances, load time 0.209 seconds
mkiv lua stats  > used platform: linux-64, type: unix, binary subtree: bin
mkiv lua stats  > luatex banner: this is luatex, version 0.95.0 (tex live
2016)mkiv lua stats  > control sequences: 43813 of 65536 + 10
mkiv lua stats  > lua properties: engine: lua, used memory: 72 MB (ctx: 71
MB), hash type: lua, hash chars: min(64,40), symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 0.608 seconds, 1 processed pages, 1 shipped
pages, 1.645 pages/second

system  | total runtime: 0.849 seconds

TeX Output finished at Mon Oct 31 09:57:37

2016-10-30 14:38 GMT+01:00 Tobias Berndt :

> Ok, your problem is more auctex than ConTeXt. So, try this:
>
> (1) Add to .emacs:
>
> ;; SERVER Download (MELPA):
> (when (>= emacs-major-version 24)
>   (require 'package)
>   (add-to-list
>'package-archives
>'("melpa" . "http://melpa.org/packages/;)
>t)
>   (package-initialize))
>
> to get connection to MELPA server.
>
> (2) Save .emacs and start Emacs again
> (3) Open OPTIONS—MANAGE EMACS PACKAGES
> (4) Install current auctex version
> (5) Restart Emacs
> (6) Get into context-mode (M-x context-mode)
> (7) Type M-x customize-variable RET ConTeXt-Mark-version RET
>
> +++
> If Emacs responds: Wrong type argument: symbolp, „string“ (that’s the bug)
> open context.el (somewhere in .emacs.d/(m)elpa/auctex-11.89.X) and
> replace line 501 (or nearby)
>
> :type "string"
>
> with
>
> :type 'string
>
> and recompile the file with `M-x byte-compile file RET RET’.
> +++
>
> (8) Switch from Mark II to Mark IV
>
>