[NTG-context] Wrong section space after placefigure with newcolumnsets

2018-04-05 Thread Charles Vejnar

Hi,

I am placing figures in a columnset. The next header (section, 
subsection...) following the figure has always missing vertical space.


See the normal space after "One subsection" and "Four subsection" but 
reduced space after "Two subsection" and "Three subsection" in the 
example below.


Tested with ConTeXt  ver: 2018.04.04 and LuaTeX, Version 1.07.0.

This seems to be the opposite problem as the one described recently in 
the thread "Bug in wrapped placefigure".


Any solution or fix?

Thank you very much for your help.

Charles



\setuppapersize[letter][letter]

\usemodule[newcolumnsets]
\setuplayout[grid=yes]
\definecolumnset[colset][n=2]

\starttext
\startcolumnset[colset]

\section{One section}

\subsection{One subsection}

\dorecurse{16}{\input ward \par}

\section{Two section}

\subsection{Two subsection}

\placefigure[bots]{Legend.}{\hbox{\externalfigure[dummy][width=\makeupwidth,height=12cm]}}

\dorecurse{5}{\input knuth \par}

\subsection{Three subsection}

\placefigure[bots]{Legend.}{\hbox{\externalfigure[dummy][width=\makeupwidth,height=12cm]}}

\dorecurse{2}{\input knuth \par}

\subsection{Four subsection}

\dorecurse{7}{\input knuth \par}

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

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

Re: [NTG-context] MetaFun: Rotate picture without rotating labels

2018-04-05 Thread Henri Menke
On Fri, 2018-04-06 at 11:05 +1200, Henri Menke wrote:
> Dear list,
> 
> In the MWE below I would like py to be px rotated by 90 degrees but the labels
> should not be rotated.  Is it possible?
> 
> Cheers, Henri
> 
> ---

I thought of using vardef but that is kind of verbose because I gave to repeat
"rotated angle" three times.

\startMPpage
  vardef orbital(expr angle) =
save p ;
path p ;
p := origin .. (2,1) .. (3,0) .. (2,-1) .. (-2,1) .. (-3,0) .. (-2,-1) .. 
cycle ;
image (
  draw p scaled 6 rotated angle;
  label("\strut$+$",(+10,0) rotated angle);
  label("\strut$-$",(-10,0) rotated angle);
)
  enddef ;

  picture px, py ;
  px := orbital ( 0) ;
  py := orbital (90) ;

  draw px ;
  draw py ;
\stopMPpage

> 
> \startMPpage
> 
>   path p ; p := origin .. (2,1) .. (3,0) .. (2,-1) .. (-2,1) .. (-3,0) .. (-
> 2,-1) .. cycle ;
>   picture px, py ;
>   px := image (
> draw p scaled 6 ;
> label("$+$",(+10,0));
> label("$-$",(-10,0));
>   ) ;
>   py := px rotated 90 ;
> 
>   draw px ;
>   draw py ; % meh :/
> 
> \stopMPpage
> 
___
If your question is of interest to others as well, please add an 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] MetaFun: Rotate picture without rotating labels

2018-04-05 Thread Henri Menke
Dear list,

In the MWE below I would like py to be px rotated by 90 degrees but the labels
should not be rotated.  Is it possible?

Cheers, Henri

---

\startMPpage

  path p ; p := origin .. (2,1) .. (3,0) .. (2,-1) .. (-2,1) .. (-3,0) .. 
(-2,-1) .. cycle ;
  picture px, py ;
  px := image (
draw p scaled 6 ;
label("$+$",(+10,0));
label("$-$",(-10,0));
  ) ;
  py := px rotated 90 ;

  draw px ;
  draw py ; % meh :/

\stopMPpage

___
If your question is of interest to others as well, please add an 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] Saving Metafun Graphic for use outside ConTeXt

2018-04-05 Thread Keith McKay

Thanks dr. Hans! It certainly will.

Best Wishes

Keith


On 05/04/2018 19:55, dr. Hans van der Meer wrote:

Maybe this script could help a bit too.


Use with following code scheme in ConTeXt:

\starttex
t\startMPpage
% Your Metapost/metafun code here
\stopMPpage
\stoptext

It will produce a standalone image in a pdf.


dr. Hans van der Meer


On 5 Apr 2018, at 18:45, Keith McKay > wrote:


Thanks Nicola and Alan. I'll look into that.

Best Wishes

Keith


On 05/04/2018 17:42, Nicola wrote:

On 05/04/2018 18:24, Alan Braslau wrote:

On Thu, 5 Apr 2018 15:28:34 +0100
Keith McKay  wrote:


I use a mac-mini and it seems that mupdf, of which mutools is part
off, does not have a macOS version, or I would have to build from
source. However it looks like I can use Inkscape with a wee bit
thought to do pretty much the same.


mupdf is available on MacPorts...


...also in Homebrew (mupdf formula, or mupdf-tools if you don't need
the viewer).

Nicola

___ 

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


maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context

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



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


maillist : ntg-context@ntg.nl  / 
http://www.ntg.nl/mailman/listinfo/ntg-context

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




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

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



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

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

Re: [NTG-context] Saving Metafun Graphic for use outside ConTeXt

2018-04-05 Thread dr. Hans van der Meer
Maybe this script could help a bit too. 

mpone
Description: Binary data
Use with following code scheme in ConTeXt:\starttext\startMPpage% Your Metapost/metafun code here\stopMPpage\stoptextIt will produce a standalone image in a pdf.
dr. Hans van der Meer

On 5 Apr 2018, at 18:45, Keith McKay  wrote:
  


  
  Thanks Nicola and Alan. I'll look into that.Best WishesKeith


On 05/04/2018 17:42, Nicola wrote:

On 05/04/2018
  18:24, Alan Braslau wrote:
  
  On Thu, 5
Apr 2018 15:28:34 +0100

Keith McKay  wrote:


I use a
  mac-mini and it seems that mupdf, of which mutools is part
  
  off, does not have a macOS version, or I would have to build
  from
  
  source. However it looks like I can use Inkscape with a wee
  bit
  
  thought to do pretty much the same.
  


mupdf is available on MacPorts...

  
  
  ...also in Homebrew (mupdf formula, or mupdf-tools if you don't
  need
  
  the viewer).
  
  
  Nicola
  
  
___
  
  If your question is of interest to others as well, please add an
  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-contextwebpage  : http://www.pragma-ade.nl / http://context.aanhet.netarchive  : 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] Saving Metafun Graphic for use outside ConTeXt

2018-04-05 Thread Keith McKay

Thanks Nicola and Alan. I'll look into that.

Best Wishes

Keith


On 05/04/2018 17:42, Nicola wrote:

On 05/04/2018 18:24, Alan Braslau wrote:

On Thu, 5 Apr 2018 15:28:34 +0100
Keith McKay  wrote:


I use a mac-mini and it seems that mupdf, of which mutools is part
off, does not have a macOS version, or I would have to build from
source. However it looks like I can use Inkscape with a wee bit
thought to do pretty much the same.


mupdf is available on MacPorts...


...also in Homebrew (mupdf formula, or mupdf-tools if you don't need
the viewer).

Nicola

___ 

If your question is of interest to others as well, please add an 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] Saving Metafun Graphic for use outside ConTeXt

2018-04-05 Thread Nicola

On 05/04/2018 18:24, Alan Braslau wrote:

On Thu, 5 Apr 2018 15:28:34 +0100
Keith McKay  wrote:


I use a mac-mini and it seems that mupdf, of which mutools is part
off, does not have a macOS version, or I would have to build from
source. However it looks like I can use Inkscape with a wee bit
thought to do pretty much the same.


mupdf is available on MacPorts...


...also in Homebrew (mupdf formula, or mupdf-tools if you don't need
the viewer).

Nicola

___
If your question is of interest to others as well, please add an 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] Saving Metafun Graphic for use outside ConTeXt

2018-04-05 Thread Alan Braslau
On Thu, 5 Apr 2018 15:28:34 +0100
Keith McKay  wrote:

> I use a mac-mini and it seems that mupdf, of which mutools is part
> off, does not have a macOS version, or I would have to build from
> source. However it looks like I can use Inkscape with a wee bit
> thought to do pretty much the same.

mupdf is available on MacPorts...

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

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

Re: [NTG-context] Saving Metafun Graphic for use outside ConTeXt

2018-04-05 Thread Keith McKay

Thanks Hans for the advice.

I use a mac-mini and it seems that mupdf, of which mutools is part off, 
does not have a macOS version, or I would have to build from source. 
However it looks like I can use Inkscape with a wee bit thought to do 
pretty much the same.


Thanks again for your help.

Keith


On 05/04/2018 13:39, Hans Hagen wrote:

On 4/5/2018 1:10 PM, Keith McKay wrote:

Dear Readers,

I have been playing about with METAFUN over the last few days trying 
to get a feel for it. I was wondering if it is possible to save the 
graphics produced in a context document for use outside. On looking 
at the Metapost manual I see you can using the following commands 
save a graphic as an svg file.


forget about producing svg this way ... (1) it would not work with 
fonts, and (2) mplib in luatex has svg and png output disabled.


% file: mpsvg.tex

\startMPpage

    draw textext("Does it work?") ;

    draw boundingbox currentpicture enlarged 2mm withcolor "darkred" ;

\stopMPpage

% process

context mpsvg

mutool convert -o mpsvg.svg mpsvg.pdf

Hans

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



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

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

Re: [NTG-context] Saving Metafun Graphic for use outside ConTeXt

2018-04-05 Thread Hans Hagen

On 4/5/2018 1:10 PM, Keith McKay wrote:

Dear Readers,

I have been playing about with METAFUN over the last few days trying to 
get a feel for it. I was wondering if it is possible to save the 
graphics produced in a context document for use outside. On looking at 
the Metapost manual I see you can using the following commands save a 
graphic as an svg file.


forget about producing svg this way ... (1) it would not work with 
fonts, and (2) mplib in luatex has svg and png output disabled.


% file: mpsvg.tex

\startMPpage

draw textext("Does it work?") ;

draw boundingbox currentpicture enlarged 2mm withcolor "darkred" ;

\stopMPpage

% process

context mpsvg

mutool convert -o mpsvg.svg mpsvg.pdf

Hans

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

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

[NTG-context] Saving Metafun Graphic for use outside ConTeXt

2018-04-05 Thread Keith McKay

Dear Readers,

I have been playing about with METAFUN over the last few days trying to 
get a feel for it. I was wondering if it is possible to save the 
graphics produced in a context document for use outside. On looking at 
the Metapost manual I see you can using the following commands save a 
graphic as an svg file.


/outputformat := "svg"; /

/outputtemplate := "test.svg";/

//

I have tried adding this to some MPcode in a ConteXt document but these 
lines seem to be ignored since no svg file is produced apart from the 
usual ConTeXt files. Is this expected behaviour? I have been able to get 
svg files using mpost on the command line.


Here is a minimum working example (which I'm sure could be coded more 
elegantly):


/\starttext/

//

/\startMPcode/

//

/outputformat := "svg";/

//

/outputtemplate := "test.svg";/

//

/beginfig(1)/

//

/randomseed:= uniformdeviate infinity;/

//

/path pat;/

//

/x:=uniformdeviate(5);/

//

/y:=uniformdeviate(5);/

//

/pat:=(x,y);/

//

/for i = 1 upto 5:/

//

/a:=uniformdeviate(5);/

//

/b:=uniformdeviate(5);/

//

/pat := pat...(a,b);/

//

/endfor;/

//

/pat:=pat..(0,5);/

//

/draw pat scaled 10pt;/

//

/picture pic;/

//

/pic:=currentpicture;/

//

/endfig;/

//

/\stopMPcode/

//

/\stoptext/

Best Wishes

Keith

//

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

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