[NTG-context] Fwd: Meptapost Drawing not showing-up in Context Letter Style

2019-03-12 Thread Jeroen
Eventually, these two options worked. Firstly changing \setupbackgrounds

% BEGIN MP LOGO SETUP

\startuseMPgraphic{mpglogo}
  path p;
  p := (0,0)--(100,0)--(100,100)--(0,100)--cycle;

  path q;
  q := p cornered 30pt;
  draw q withcolor black withpen pencircle scaled 7pt;
\stopuseMPgraphic

\definelayer
  [logo]
  [repeat=no]

\setlayer
  [logo]
  [hoffset=160mm,voffset=17mm]
  {\scale[width=25mm,height=25mm]{\useMPgraphic{mpglogo}}}

\setupbackgrounds[paper][background=logo]

% END MP LOGO SETUP, BEGIN LETTER SETUP

\usemodule
  [letter]
  [style=dinb]

\setupletterlayer
  [reference]
  [list={name,phone,email,date}]

\setupletterlayer
  [address]
  [y=55mm]

\setupletterdescription
  [enclosure]
  [location=top,
  leftmargin=0.5em,
  symbol=#1,]

\usesymbols
  [mvs]

\definesymbol
  [1]
  [{\symbol[martinvogel 2][PointingHand]}]

\setupletter
  [toname={John Doe},
   toaddress={201, Main Street\\23124 London\\United Kingdom},
   fromname={Jansen NV},
   fromaddress={Waalhaven 2200\\2842 KL Rotterdam},
   name={Piet jansen},
   phone={+31(010)4234 4232},
   email={peter.jan...@gmail.com},
   date={\currentdate},
   signature={Pete},]

% END LETTER SETUP, START LETTER

\startletter
  [subject={Outstanding Invoices},
   opening={Dear Sir,},
   closing={Kind Regards,},
   enclosure={list:Commercial Invoice,Accounts Statement},]

\dorecurse{3}{\input knuth \par}

\stopletter


Alternatively, adjusting \setupletterlayer


\usemodule
  [letter]
  [style=dinb]

% BEGIN MP LOGO SETUP

\startuseMPgraphic{mpglogo}
  path p;
  p := (0,0)--(100,0)--(100,100)--(0,100)--cycle;

  path q;
  q := p cornered 30pt;
  draw q withcolor black withpen pencircle scaled 7pt;
\stopuseMPgraphic

\startsetups[letter:layer:lettermain]
  \scale
[width=25mm,height=25mm]
{\useMPgraphic{mpglogo}}
\stopsetups

\setupletterlayer
  [lettermain]
  [alternative=setups,
   x=160mm,
   y=17mm]

% END MP LOGO SETUP, BEGIN LETTER SETUP

\setupletterlayer
  [reference]
  [list={name,phone,email,date}]

\setupletterlayer
  [address]
  [y=55mm]

\setupletterdescription
  [enclosure]
  [location=top,
   leftmargin=0.5em,
   symbol=#1,]

\usesymbols
  [mvs]
\definesymbol

  [1]
  [{\symbol[martinvogel 2][PointingHand]}]

\setupletter
  [toname={John Doe},
   toaddress={201, Main Street\\23124 London\\United Kingdom},
   fromname={Jansen NV},
   fromaddress={Waalhaven 2200\\2842 KL Rotterdam},
   name={Piet jansen},
   phone={+31(010)4234 4232},
   email={peter.jan...@gmail.com},
   date={\currentdate},
   signature={Pete},]

% END LETTER SETUP, START LETTER

\startletter
  [subject={Outstanding Invoices},
   opening={Dear Sir,},
   closing={Kind Regards,},
   enclosure={list:Commercial Invoice,Accounts Statement},]

\dorecurse
  {3}
  {\input knuth \par}

\stopletter

-- Forwarded message -
From: Wolfgang Schuster 
Date: ma 11 mrt. 2019 om 20:55
Subject: Re: [NTG-context] Meptapost Drawing not showing-up in Context
Letter Style
To: mailing list for ConTeXt users , Context NTG <
context...@gmail.com>


Context NTG schrieb am 10.03.19 um 16:59:
> I am trying to get a metapost drawing as logo added to right upper
> corner of a DIN B style letterhead, but it does not show up, just the
> letter itself. Is there anything to change to the layers for the MP toe
> reveal itself?

The letter module uses local settings for the page background to place
all the layer for the header, footer etc. and your own background setup
is overloaded by the module.


What you can do in this case is to use the predefined but unused
lettermain layer to place your logo in the background.


\usemodule[letter][style=dinb]

\startuseMPgraphic{mpglogo}
   path p;
   p := (0,0)--(100,0)--(100,100)--(0,100)--cycle ;
   path q;
   q := p cornered 30pt;
   draw q withcolor black withpen pencircle scaled 7pt ;
\stopuseMPgraphic

\startsetups[letter:layer:lettermain]
   \scale[width=25mm,height=25mm]{\useMPgraphic{mpglogo}}
\stopsetups

\setupletterlayer
   [lettermain]
   [alternative=setups,
x=160mm,
y=17mm]

\startletter
\dorecurse{3}{\input knuth \par}
\stopletter


Another way to place content in the background is to use the “paper” (or
“text”) background which isn’t used by the letter module and your
settings won’t be overloaded.

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

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


Re: [NTG-context] Printing 3 din lang pages on one dina4 page

2019-03-12 Thread Jan U. Hasecke
Am 12.03.19 um 17:25 schrieb Wolfgang Schuster:
> \definepapersize [A4/3] [width=99mm,height=210mm]
> 
> \setuppapersize [A4/3] [A4,landscape]
> 
> \setuppaper [nx=3,ny=1]
> 
> \setuparranging [XY]
> 
> \setupbodyfont [10pt]
> 
> \showframe[page]
> 
> \starttext
> \dorecurse{10}{\samplefile{tufte}}
> \stoptext

Thanks a lot, Wolfgang.

juh

-- 
Soziale Plastik. Die Kunst der Allmende
Essay zum 30. Todestag von Joseph Beuys
http://www.amazon.de/dp/1523458763/
Taschenbuch, 130 Seiten, EUR 9,90
___
If your question is of interest to others as well, please add an 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] single command for \ctxlua{context(...)}

2019-03-12 Thread Pablo Rodriguez
On 3/11/19 10:36 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 11.03.19 um 22:23:
>> [...]
>> Is there a single command for \ctxlua{context(...)}?
> 
> \cldcontext{...}

Many thanks for your fast reply, Wolfgang.

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

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


Re: [NTG-context] Question and Answer Iteration

2019-03-12 Thread Wolfgang Schuster

Jeroen schrieb am 12.03.19 um 18:16:

Dear list

The configuration below is what I found for a question and answer 
section. If would like the text to start immediately after "question 
1", "question2", etc. and not below it and the same for the answers. 
Is there an easy way to achieve this?


Regards, Jeroen


\setupinteraction[state=start]

\define[1]\QuestionTextCommand
{\doglobal\increment\QuestionCounter
\pagereference[question:\QuestionCounter]%
\doifreferencefoundelse{answer:\QuestionCounter}
{\goto{#1}[answer:\QuestionCounter]}
  {#1}}

\define[1]\AnswerTextCommand
{\doglobal\increment\AnswerCounter
\pagereference[answer:\AnswerCounter]%
\doifreferencefoundelse{question:\AnswerCounter}
{\goto{#1}[question:\AnswerCounter]}
  {#1}}

\defineenumeration
[question]
   [text=Question,

alternative=serried,

    headcommand=\QuestionTextCommand]

\defineenumeration
[answer]
   [text=Answer,

alternative=serried,

    headcommand=\AnswerTextCommand]

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

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


[NTG-context] Question and Answer Iteration

2019-03-12 Thread Jeroen
Dear list

The configuration below is what I found for a question and answer section.
If would like the text to start immediately after "question 1",
"question2", etc. and not below it and the same for the answers. Is there
an easy way to achieve this?

Regards, Jeroen


\setupinteraction[state=start]

\define[1]\QuestionTextCommand
   {\doglobal\increment\QuestionCounter
\pagereference[question:\QuestionCounter]%
\doifreferencefoundelse{answer:\QuestionCounter}
  {\goto{#1}[answer:\QuestionCounter]}
  {#1}}

\define[1]\AnswerTextCommand
   {\doglobal\increment\AnswerCounter
\pagereference[answer:\AnswerCounter]%
\doifreferencefoundelse{question:\AnswerCounter}
  {\goto{#1}[question:\AnswerCounter]}
  {#1}}

\defineenumeration
   [question]
   [text=Question,
headcommand=\QuestionTextCommand]

\defineenumeration
   [answer]
   [text=Answer,
headcommand=\AnswerTextCommand]

\defineblock[answer]

\startbuffer
 %
 \startquestion
 \input knuth
 \stopquestion
 %
 \beginanswer
 \startanswer
 \input knuth
 \stopanswer
 \endanswer
 %
\stopbuffer

\starttext
\dorecurse{10}{\getbuffer}

\page

\useblocks[answer]

\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] Printing 3 din lang pages on one dina4 page

2019-03-12 Thread Wolfgang Schuster

Jan U. Hasecke schrieb am 12.03.19 um 13:04:

Hi,

I managed to print din long flyers (100mmx210mm with 97mmx210mm fold
page) with 6 pages using a lot of pageshifts etc.

But how can I print one simple din long page (99mmx210mm) three times on
a din a4 page so that I can cut it myself?

The following does not work.

\definepapersize
[flyer]
[width=99mm,height=210mm]

\setuppapersize [flyer] [a4]

\setuparranging[1*3]

The option [1*3] does not exist for \setuparranging.
But I thought this could be what I want one sheet three pages.


Use the XY arrangement method and set the number of columns with the 
nx-key of \setuppaper.



\definepapersize [A4/3] [width=99mm,height=210mm]

\setuppapersize [A4/3] [A4,landscape]

\setuppaper [nx=3,ny=1]

\setuparranging [XY]

\setupbodyfont [10pt]

\showframe[page]

\starttext
\dorecurse{10}{\samplefile{tufte}}
\stoptext

Wolfgang

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

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


Re: [NTG-context] IBM Wordcloud with the Filter Module

2019-03-12 Thread Aditya Mahajan

On Mon, 11 Mar 2019, Jeroen wrote:


Yes, there is a batch file for testing purposes, and that one works fine


Two things to try:

1. Add \traceexternalfilters and see if the log shows any error from the 
java file.


2. Are you able to run other filters?

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] Printing 3 din lang pages on one dina4 page

2019-03-12 Thread Jan U. Hasecke
Hi,

I managed to print din long flyers (100mmx210mm with 97mmx210mm fold
page) with 6 pages using a lot of pageshifts etc.

But how can I print one simple din long page (99mmx210mm) three times on
a din a4 page so that I can cut it myself?

The following does not work.

\definepapersize
[flyer]
[width=99mm,height=210mm]

\setuppapersize [flyer] [a4]

\setuparranging[1*3]

The option [1*3] does not exist for \setuparranging.
But I thought this could be what I want one sheet three pages.

TIA
juh

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