Re: [NTG-context] Asymptote or Metapost and ConTeXt parameters.

2016-12-19 Thread Aditya Mahajan

On Mon, 19 Dec 2016, Jaroslav Hajtmar wrote:

There is a similar possibility, at least in Metapost? For simpler 
pictures it would probably suffice 


The ability to pass parameters to metapost has been around since the 
beginning. See the metafun manual for details (search for MPvar). For 
simple images, you can also do:


\define[1]\Circle{\startMPcode draw fullcircle scaled #1*cm; \stopMPcode}

\Circle{1} \Circle{2} \Circle{3}

Is there a way to pass the ConTeXt parameter which influenced the 
creation of the Asymptote image? My point eg. the ability to define 
macros, which gave its parameters to Asymptote procedure or function and 
depending on these parameters, the image created by Asymptote looked 
differently.


In principle, something similar to \MPvar can work for asymptote as well 
(or one could do parse the content in Lua rather than expand variables in 
TeX).


Before starting work on an illustrative example I am asking, whether it 
makes sense to deal with such a thing ... I suppose the impossibility of 
combining asymptote code and such Lua code (or not?).


ConTeXt and Metapost are very well integrated, even in MkII. The same 
ideas could work with other graphic backends as well (Asymptote, tikz, and 
others). But it does require a good knowledge of the graphics package.


I am willing to write the code at the context end, if someone who knows 
asymptote can tell me what needs to be done at the asymptote end.


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

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

[NTG-context] \setupfooter[color=red]: red color spills with float over next page

2016-12-19 Thread Benjamin Buchmuller
Hi Hans,

the patch solves the issue. Thank you for the fast reply.

With regard to Pablo’s question: When I would not use crop in the MWE, 
apparently I would get the desired output indeed. However, in the situation I 
was using the command to produce a document, I would need to crop some parts of 
a figure. I should have been a little bit more clear on this, I guess.

Thanks again,


Benjamin
___
If your question is of interest to others as well, please add an 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] Different column modes and NAW

2016-12-19 Thread Mikael P. Sundqvist
On Sun, Dec 18, 2016 at 9:19 PM, Mikael P. Sundqvist  wrote:
> Dear list,
>
> I just realized that the very nice articles in "Nieuw archief voor
> Wiskunde" (see 
> http://www.nieuwarchief.nl/serie5/index.php?deel=17=4=1
> ) are typeset with ConTeXt (at least it says so at
> http://www.nieuwarchief.nl/homeitems.php?onderwerp=2=1).
>
> I get curious. Does anyone here know what column mode (i.e.
> \startcolumn \stopcolumn, \startmixedcolumn\stopmixedcolumn,
> columnsets or even the new module newcolumnsets?) they use, and how
> they get mathematics to play with it without breaking the grid?
>
> Also, if I start to write a new document with two columns today (it
> will contain lots of images and lots of formulas and enumerations),
> which column mode is the preferred one? Is there any documentation
> (except the source) for the newcolumnsets? I want to be able to have
> images span both columns and it would be nice if it played well with
> sections as well.
>
> Best regards, Mikael

Dear list,

(I got some information offlist from Hans regarding NAW, it seems they
used an old pdftex-based hacked version)

I gave no example. I decided now that I would like to try the new
pagegrid out (loaded via newcolumnsets module now). But I somehow fail
even with a simple(?) example: Could someone point out what I do
wrong? If you have a small snippet of working code (even with
columnsetspans, I left them out since I think this simpler document
must work first) I'm very happy to look at it.

Also, the placement options for \placefigure seem to be ignored (try
for example bottom). Are they not implemented yet?

Best regards, Mikael

% start of example
\usemodule[newcolumnsets]

\setupbodyfont[9pt]

\definecolumnset[example][n=2]

\starttext

\startcolumnset[example]
\section{Test}
\input tufte
\startformula
f(x)=f(0)+\int_0^x f'(t)\,dt
\stopformula
\input knuth
\placefigure{Caption}{\blackrule[width=4cm,height=3cm]}
\dorecurse{6}{\input knuth \par}
\stopcolumnset

\stoptext
% end of example


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

Re: [NTG-context] \itemize unpacked?

2016-12-19 Thread Ulrike Fischer
Am Mon, 19 Dec 2016 14:26:12 +0100 schrieb Procházka Lukáš Ing.:

> Hello,
> 
> yes, that's right; but I thought there is an option to "override" the 
> default/set-up setting -
> 
> - what should "unpacked" do otherwise?

Imho while you can use packed locally unpacked is only for global
settings. At least it isn't mentioned as argument here
http://wiki.contextgarden.net/Enumerations

It works if you use unpacked in another \setupitemize:

\setupitemize[each][unpacked]



-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
If your question is of interest to others as well, please add an 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] \itemize unpacked?

2016-12-19 Thread Thomas A. Schmitz

On 12/19/2016 02:26 PM, Procházka Lukáš Ing. wrote:

Also, in my case, there are more \itemize to be packed; and some of them
(in the middle of the document) should be "unpacked"; so grouping
itemize setting is not very comfortable here.


Then the cleanest (and most ConTeXt-like) solution would be to define 
several instances of itemize in the preamble and use those instead of 
applying the settings on the fly. 
(http://wiki.contextgarden.net/Command/defineitemgroup , but I guess you 
know about that.)


Thomas
___
If your question is of interest to others as well, please add an 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] \itemize unpacked?

2016-12-19 Thread Procházka Lukáš Ing .

Hello,

yes, that's right; but I thought there is an option to "override" the 
default/set-up setting -

- what should "unpacked" do otherwise?

Also, in my case, there are more \itemize to be packed; and some of them (in the middle 
of the document) should be "unpacked"; so grouping itemize setting is not very 
comfortable here.

Best regards,

Lukas


On Mon, 19 Dec 2016 13:40:30 +0100, Herbert Voss  
wrote:


Am 19.12.2016 um 13:26 schrieb Procházka Lukáš Ing.:

Hello,

I have code that setups \itemize packed.

Is it possible to force "unpacked" option back (mentioned here:
http://wiki.contextgarden.net/Command/setupitemgroup)?


\starttext

  \startitemize[][]
\item 1a
\item 1b
  \stopitemize

  \setupitemize[each][packed,joinedup] % <--- Itemize to be 'packed'
from here on

  \startitemize[][]
\item 2a
\item 2b
  \stopitemize



you can make it a local setting:

{%
\setupitemize[each][packed,joinedup] % <--- Itemize to be 'packed' from
here on

\startitemize[][]
\item 2a
\item 2b
\stopitemize
}

Herbert



  \startitemize[unpacked][] % <--- Itemize still packed! - How to
disable it?
\item 3a
\item 3b
  \stopitemize

\stoptext


Best regards,

Lukas




___
If your question is of interest to others as well, please add an 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
___



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751 (+420 720 951 172)
Fax: +420 244 461 038

___
If your question is of interest to others as well, please add an 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] \itemize unpacked?

2016-12-19 Thread Herbert Voss

Am 19.12.2016 um 13:26 schrieb Procházka Lukáš Ing.:

Hello,

I have code that setups \itemize packed.

Is it possible to force "unpacked" option back (mentioned here:
http://wiki.contextgarden.net/Command/setupitemgroup)?


\starttext

  \startitemize[][]
\item 1a
\item 1b
  \stopitemize

  \setupitemize[each][packed,joinedup] % <--- Itemize to be 'packed'
from here on

  \startitemize[][]
\item 2a
\item 2b
  \stopitemize



you can make it a local setting:

{%
\setupitemize[each][packed,joinedup] % <--- Itemize to be 'packed' from 
here on


\startitemize[][]
\item 2a
\item 2b
\stopitemize
}

Herbert



  \startitemize[unpacked][] % <--- Itemize still packed! - How to
disable it?
\item 3a
\item 3b
  \stopitemize

\stoptext


Best regards,

Lukas




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

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



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

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

[NTG-context] \itemize unpacked?

2016-12-19 Thread Procházka Lukáš Ing .

Hello,

I have code that setups \itemize packed.

Is it possible to force "unpacked" option back (mentioned here: 
http://wiki.contextgarden.net/Command/setupitemgroup)?


\starttext

  \startitemize[][]
\item 1a
\item 1b
  \stopitemize

  \setupitemize[each][packed,joinedup] % <--- Itemize to be 'packed' from here 
on

  \startitemize[][]
\item 2a
\item 2b
  \stopitemize

  \startitemize[unpacked][] % <--- Itemize still packed! - How to disable it?
\item 3a
\item 3b
  \stopitemize

\stoptext


Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751 (+420 720 951 172)
Fax: +420 244 461 038

UnpItem.mkiv
Description: Binary data


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

[NTG-context] TABLE breaking is weird

2016-12-19 Thread Henri Menke
Dear list,

the problem is hard to describe but TABLE breaking behaves in a weird way.  
Please try out the MWE below.  It is reproducible on TL2016 and latest beta.

Cheers, Henri

--- MWE ---

\starttext

\dorecurse{10}{\input lorem}

\startplacetable
  [
title={Landscape table},
%location={page,split,90},
location={split,90},
  ]
  \startTABLE[split=repeat,option=stretch,textwidth=\textheight]

\startTABLEhead
  \NC[nx=6,align=center] Beschriftung \NC\NR
\stopTABLEhead

\startTABLEnext
  \NC[nx=6,align=center] Beschriftung (Fortsetzung) \NC\NR
\stopTABLEnext

\startTABLEbody
  \dorecurse{50}{
\NC Merkmal \NC Daten \NC Daten \NC Daten \NC Daten \NC Daten \NC\NR
  }
\stopTABLEbody

  \stopTABLE
\stopplacetable

\dorecurse{10}{\input lorem}

\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] Asymptote or Metapost and ConTeXt parameters.

2016-12-19 Thread Hans Hagen

On 12/19/2016 10:10 AM, Fabrice Couvreur wrote:

Hello,
I do not answer the question, but I'm interested because I also use
Asymptote. The following code works with context in texlive 2016 but
does not work with standalone context.
thank you,


it probably depends on what you want to pass as info (i don't have 
asymptote installed nor time to check it) but if the code you pass gets 
expanded then you can add expandable macros or \the\foo kind of code to it


Hans


Fabrice
% macros=mkvi

\usemodule[filter]

\defineexternalfilter
   [ASY]
   [
 filter={asy -tex "context" -outformat pdf
 -outname \externalfilteroutputfile},
 output=\externalfilterbasefile.pdf,
 cache=yes,
 readcommand=\ReadImage,
   ]

\define[1]\ReadImage{\externalfigure[#1]}

\starttext
   Testing if we can include an asymptote image
   \startplacefigure[location={here}, title={An Asymptote figure}]
 \startASY
   import three;
size(8cm,0);
currentlight.background=black;

material White(real x, real y){
   return material(diffusepen=gray(.05+.1x+.3y),
   emissivepen=gray(.05+.1x+.3y));
}

for(int y=0; y<=2; ++y)
for(int x=0; x<3; ++x)
draw(shift(2x,2y,0)*unitsphere,White(x,y));
 \stopASY
   \stopplacefigure
\stoptext


2016-12-19 8:41 GMT+01:00 Jaroslav Hajtmar >:

Hello ConTeXtist,

I saw the opportunity to insert an Asymptote picture into Context
source code (due filter).

For example here:
https://mailman.ntg.nl/pipermail/ntg-context/2015/080581.html


__ __

Is there a way to pass the ConTeXt parameter which influenced the
creation of the Asymptote image? My point eg. the ability to define
macros, which gave its parameters to Asymptote procedure or function
and depending on these parameters, the image created by Asymptote
looked differently.

__ __

Before starting work on an illustrative example I am asking, whether
it makes sense to deal with such a thing ... I suppose the
impossibility of combining asymptote code and such Lua code (or
not?).

__ __

There is a similar possibility, at least in Metapost? For simpler
pictures it would probably suffice 

__ __

Thanx 

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://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
___




--

-
  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] \setupfooter[color=red]: red color spills with float over next page

2016-12-19 Thread Hans Hagen

On 12/18/2016 11:00 PM, Benjamin Buchmuller wrote:

Hi Hans,

I finally managed to make a MWE. The issue is related to me using \clip{…} onto 
external figures I would like to crop in conjunction with a colored footer 
set-up:

\starttext

\setupfooter[color=red]

\setupfootertexts
[]
[]
[any text] % issue related to put something in footer ...
[]

\input knuth

\input knuth

\input knuth

% … and moving to the top of the next page

\startplacefigure
[
width=fit,
title={
\input bryson
},
]
\clip[height=7.0cm]{ % issue related to clip
\externalfigure[fig_4.jpg][height=7.0cm, width=\textwidth]
}
\stopplacefigure

\stoptext


in back-pdf.mkiv you can patch this:

\unexpanded\def\dostartclipping#1#2#3%
  {\forcecolorhack % add this
   \PointsToBigPoints{#2}\width
   \PointsToBigPoints{#3}\height

and run

context --make


Thank you for your help.


Benjamin
___
If your question is of interest to others as well, please add an 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
___




--

-
  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] Asymptote or Metapost and ConTeXt parameters.

2016-12-19 Thread Fabrice Couvreur
Hello,
I do not answer the question, but I'm interested because I also use
Asymptote. The following code works with context in texlive 2016 but does
not work with standalone context.
thank you,
Fabrice
% macros=mkvi

\usemodule[filter]

\defineexternalfilter
   [ASY]
   [
 filter={asy -tex "context" -outformat pdf
 -outname \externalfilteroutputfile},
 output=\externalfilterbasefile.pdf,
 cache=yes,
 readcommand=\ReadImage,
   ]

\define[1]\ReadImage{\externalfigure[#1]}

\starttext
   Testing if we can include an asymptote image
   \startplacefigure[location={here}, title={An Asymptote figure}]
 \startASY
   import three;
size(8cm,0);
currentlight.background=black;

material White(real x, real y){
   return material(diffusepen=gray(.05+.1x+.3y),
   emissivepen=gray(.05+.1x+.3y));
}

for(int y=0; y<=2; ++y)
for(int x=0; x<3; ++x)
draw(shift(2x,2y,0)*unitsphere,White(x,y));
 \stopASY
   \stopplacefigure
\stoptext


2016-12-19 8:41 GMT+01:00 Jaroslav Hajtmar :

> Hello ConTeXtist,
>
> I saw the opportunity to insert an Asymptote picture into Context source
> code (due filter).
>
> For example here: https://mailman.ntg.nl/pipermail/ntg-context/2015/
> 080581.html
>
>
>
> Is there a way to pass the ConTeXt parameter which influenced the creation
> of the Asymptote image? My point eg. the ability to define macros, which
> gave its parameters to Asymptote procedure or function and depending on
> these parameters, the image created by Asymptote looked differently.
>
>
>
> Before starting work on an illustrative example I am asking, whether it
> makes sense to deal with such a thing ... I suppose the impossibility of
> combining asymptote code and such Lua code (or not?).
>
>
>
> There is a similar possibility, at least in Metapost? For simpler pictures
> it would probably suffice 
>
>
>
> Thanx
>
> 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://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
___