Re: [NTG-context] Minimum METAPOST code produces problematic PDF

2020-07-11 Thread Gerben Wierda
> On 9 Jul 2020, at 08:37, Aditya Mahajan wrote: > > On Wed, 8 Jul 2020, Gerben Wierda wrote: > >> I found out this in the PDF spec: >> >> The minimum page size should be 3 by 3 units in default user space; the >> maximum should be 14,400 by 14,400 uni

Re: [NTG-context] Minimum METAPOST code produces problematic PDF

2020-07-09 Thread Gerben Wierda
0 9:08 AM, Taco Hoekwater wrote: >>> On 9 Jul 2020, at 08:32, Hans Hagen wrote: >>> >>> On 7/8/2020 8:14 PM, Gerben Wierda wrote: >>>> I found out this in the PDF spec: >>>> The minimum page size should be 3 by 3 units in default user space;

Re: [NTG-context] Minimum METAPOST code produces problematic PDF

2020-07-08 Thread Gerben Wierda
nux) open the PDF output without warnings nor issues. > > Jairo :) > > El mar., 7 de jul. de 2020 a la(s) 17:50, Gerben Wierda (gerben.wie...@rna.nl > <mailto:gerben.wie...@rna.nl>) escribió: > The following code: > > \startMPpage[instance=doublefun] > draw (0,

[NTG-context] Minimum METAPOST code produces problematic PDF

2020-07-07 Thread Gerben Wierda
The following code: \startMPpage[instance=doublefun] draw (0,0)--(100,0) dashed withdots; \stopMPpage When run through LuaMetaTeX produces a PDF about which Acrobat complains: The dimensions of this page are out-of-range. Page content might be truncated. and Adobe InDesign cannot

[NTG-context] Which lua XML library is embedded in LMTX?

2020-06-25 Thread Gerben Wierda
According to the XML manual: << 2.1 >> TEX versus LUA It will not come as a surprise that we can access xml files from TEX as well as from Lua. In fact there are two methods to deal with xml in Lua. First there are the low level xml functions in the xml namespace. On top of those functions

[NTG-context] METAPOST's uniformdeviate is not truly random (seed)

2020-06-23 Thread Gerben Wierda
I’m trying to get a real random number in METAPOST MWE: \startMPpage[instance=doublefun] show uniformdeviate 60; \stopMPpage Every time I run this, it shows the same result. I tried playing around with the randomseed, but for instance when I do two runs shortly after each other they still are

[NTG-context] How could I find the 'depth' of an element found with xml.first()?

2020-06-18 Thread Gerben Wierda
Given the following XML snippet OmaFoo

[NTG-context] accessing xml element attributes in lua, how, if you do not want to use the .at scheme?

2020-06-09 Thread Gerben Wierda
I’ve been trying to find out how I can access XML node properties/attributes in lua other than via the .at syntactic scheme but using the property/attribute name as a string. E.g., currently I do: someVar = someNode.at.someProperty but I would like to do something like someVar =

[NTG-context] LMTX lua xml interface: xml.tag()?

2020-06-02 Thread Gerben Wierda
According to the mkiv manual, there is a \xmltag which I think should translate to xml.tag() in lua. But while xml.name() works, xml.tag() fails: attempt to call a nil value (field 'tag') Should xml.tag() work?

Re: [NTG-context] Dangerous bend metafont/post code?

2020-05-28 Thread Gerben Wierda
I’ve used:\startMPpage[instance=doublefun]% Inspired by and largely copied from Donald Knuth's METAFONT dangerous bend glyphh=11;u=h/15;w=h*8.5/4.6;heavyline=2;y1=25/27h;x4=0;x1+x1=x1a+x1b=x4b+x2a=x4+x2=x4a+x2b=x3b+x3a=x3+x3=w;x4a=x4b=x4+u;

[NTG-context] 'debug' version of METAPOST draw?

2020-05-28 Thread Gerben Wierda
I would like to be able (during development) to draw paths where the points of the path (and maybe thing slike directions) are visualised. E.g. a path where each pair in teh path is also drawn as a dot and maybe teh directions drawn as small arrows. Does someone have such a beast lying around?

[NTG-context] Dangerous bend metafont/post code?

2020-05-27 Thread Gerben Wierda
To honour Donald Knuth, I’ve use his ‘dangerous bend’ (with attribution of course) in one of my publications. But I only had a low res image. Is the code of this symbol available somewhere so I can do it proper justice in a next edition? G

Re: [NTG-context] Change of Optima to Optima Nova: how to get Optima Nova working?

2020-05-24 Thread Gerben Wierda
, force=yes] \definefontfamily [archimate] [ss] [Optima nova LT Pro] [tf=style:Demi, bf=style:Heavy, it=style:Medium Italic, bi=style:Heavy Italic] \setupbodyfont[archimate] G > On 24 May 2020, at 13:50, Gerben Wierda wrote: > > > >> On 24

[NTG-context] Change of Optima to Optima Nova: fallback for cyrillc stops working

2020-05-24 Thread Gerben Wierda
I’ve decided to buy the Optima Nova font. But now that I use it, I run into the problem that suddenly my fallback for Cyrillic has stopped working. \definefallbackfamily [archimate] [ss] [Helvetica] [preset=range:cyrillic, tf=style:light, it=style:lightoblique, bf=style:regular,

Re: [NTG-context] Change of Optima to Optima Nova: how to get Optima Nova working?

2020-05-24 Thread Gerben Wierda
> On 24 May 2020, at 12:40, Gerben Wierda wrote: > > > >> On 24 May 2020, at 12:26, Gerben Wierda > <mailto:gerben.wie...@rna.nl>> wrote: >> >> >> >>> On 24 May 2020, at 12:16, Gerben Wierda >> <mailto:gerben.wie...

Re: [NTG-context] Change of Optima to Optima Nova: how to get Optima Nova working?

2020-05-24 Thread Gerben Wierda
> On 24 May 2020, at 12:26, Gerben Wierda wrote: > > > >> On 24 May 2020, at 12:16, Gerben Wierda > <mailto:gerben.wie...@rna.nl>> wrote: >> >> I’ve decided to buy the Optima Nova font. But now that I use it, I run into >> the problem th

Re: [NTG-context] Change of Optima to Optima Nova: how to get Optima Nova working?

2020-05-24 Thread Gerben Wierda
> On 24 May 2020, at 12:16, Gerben Wierda wrote: > > I’ve decided to buy the Optima Nova font. But now that I use it, I run into > the problem that suddenly my fallback for Cyrillic has stopped working. > > \definefallbackfamily > [archimate] > [ss] >

Re: [NTG-context] How to define a font with an effect as a font with \definefont

2020-05-23 Thread Gerben Wierda
> On 23 May 2020, at 20:06, Wolfgang Schuster > wrote: > > Pablo Rodriguez schrieb am 23.05.2020 um 20:02: >> On 5/23/20 11:52 AM, Gerben Wierda wrote: >>> [] >>> Actually, my setup is Optima with Helvetica used for Cyrillic: >>> >>

[NTG-context] How to define a font with an effect as a font with \definefont

2020-05-23 Thread Gerben Wierda
Wityh this working example: \starttext The quick brown fox jumped over the lazy dog \definefontfeature [effect-widen] [effect={width=.2,delta=0.3}] \definedfont[Sans*widen,effect-widen] The quick brown fox jumped over the lazy dog \stoptext I am puzzling to turn my working \definedfont into

Re: [NTG-context] output file name query

2020-05-23 Thread Gerben Wierda
> On 23 May 2020, at 14:46, Wolfgang Schuster > wrote: > > Henning Hraban Ramm schrieb am 22.05.2020 um 17:39: Am 22.05.2020 um 15:09 schrieb Wolfgang Schuster : >>> >>> Alan Bowen schrieb am 22.05.2020 um 14:33: In my project, I process a single product file by enabling

Re: [NTG-context] Getting width of text to be typeset

2020-05-23 Thread Gerben Wierda
> On 23 May 2020, at 01:49, Rik Kabel wrote: > > If the OP simply wants the width of a string, one can use \setwidthof#1\to#2. > > \define\String{pqrs} > \setwidthof{\String}\to\Wdth > \String\ is \Wdth\ wide. > > \setwidthof{{\tfb\em\String}}\to\Wdth > {\tfb\em\String} is \Wdth\ wide. > >

Re: [NTG-context] Proposal to update the "Manuals" wiki page

2020-05-20 Thread Gerben Wierda
> On 19 May 2020, at 15:22, Garulfo wrote: > > Hi, > > I hope you're all doing well. > > Please, you will find a proposal to update the Manuals page on the wiki: > https://wiki.contextgarden.net/ManualsGallery > > 2 objectives: > 1/ to make something more visual, to help the user identify

Re: [NTG-context] \pagewidth undefined?

2020-05-19 Thread Gerben Wierda
> On 19 May 2020, at 20:11, Hans Hagen wrote: > > On 5/19/2020 5:37 PM, Wolfgang Schuster wrote: >> Gerben Wierda schrieb am 19.05.2020 um 13:42: >>> OK. I just noticed in lmtx documentation that \paperheight and \paperwidth >>> primitives have been removed,

[NTG-context] \pagewidth undefined?

2020-05-19 Thread Gerben Wierda
Why doesn't \starttext \externalfigure[foo.pdf][width=\pagewidth] \stoptext work? Without [width=\pagewidth] it works. ___ If your question is of interest to others as well, please add an entry to the Wiki!

Re: [NTG-context] \pagewidth undefined?

2020-05-19 Thread Gerben Wierda
the page width and page height dimens for use in my macros. G > On 19 May 2020, at 11:58, Gerben Wierda wrote: > > Why doesn't > > \starttext > \externalfigure[foo.pdf][width=\pagewidth] > \stoptext > > work? Without

[NTG-context] Can someone explain the \startuseMPgraphic interface to me?

2020-05-19 Thread Gerben Wierda
In details.pdf, I encounter \startuseMPgraphic{mpos:par:columnset:shade} numeric h ; for i=1 upto nofmultipars : h := bbheight(p) ; if multikind[i] = "single" : fill multipars[i] topenlarged -.5h When I encounter that, I wonder: - where do nofmultipars, p,

[NTG-context] Looking for a way to use lua to output console/debug messages from MetaPost instead of 'show'

2020-05-18 Thread Gerben Wierda
I often need some debugging info to find out what is going on in my METAPOST code (as I often do not have exact knowledge of what some things do). MetaPost’s ‘show’ command has limited formatting functionality (e.g. I would like to add a number as a string to a show message instead of putting

[NTG-context] What is required to make \setuplayout work?

2020-05-17 Thread Gerben Wierda
I’ve been trying to define a layout that just has a 5mm no-printing edge around the paper and has all the rest for \textwidth and \textheight. No header, footer, pagenumber, etc. Just as much space as I can get out of a standard A4. But the following (following the manual and ConTeXtgarden):

[NTG-context] Building a page based on exact location of graphical elements (PDF)

2020-05-17 Thread Gerben Wierda
What is the simplest way to build a page based on positioning of external images? Some of these images are page-sized (so take up an entire page, though I might want to overlay some other text boxes and MP graphics). I’ve been trying to find a good explanation/introduction into layers (which I

[NTG-context] \goto not working from within \textext()

2020-05-16 Thread Gerben Wierda
This does give me ythe look of a link, but not a working link. Outside of textext() it works. Is there a way to get a working link in a MetaFun picture? Thx, G \setupinteraction [state=start, color=blue, style=bold] \starttext

Re: [NTG-context] Using transparency in METAPOST within textext()

2020-05-14 Thread Gerben Wierda
Thank you. That works. > On 14 May 2020, at 17:13, Wolfgang Schuster > wrote: > > Gerben Wierda schrieb am 14.05.2020 um 11:47: >> Is it possible to get a transparent background in a textext()? The following >> minimal example doesn’t work. >> \starttext >>

[NTG-context] Using transparency in METAPOST within textext()

2020-05-14 Thread Gerben Wierda
Is it possible to get a transparent background in a textext()? The following minimal example doesn’t work. \starttext \setupMPpage [background=color, backgroundcolor=gray] \startMPpage draw

[NTG-context] Is it possible to make xml.load a bit more 'verbose' when it encounters errors?

2020-05-13 Thread Gerben Wierda
I am loading an xml.file. I sometimes make mistakes editing that file and then xml.load creates a string that contains invalid xml file - parsed text At that point I check my file and sometimes (like now) I cannot find the error. Is there a way to make xml.load somewhat more verbose about

[NTG-context] \goto works but links don't when passed via textext() in METAPOST

2020-05-10 Thread Gerben Wierda
I am trying to get an URL link in a textext() via METAPOST. I’ve got this before \starttext (or after, tried both): \setupinteraction [state=start, color=blue, style=bold] The intended link shows up in blue and bold, but it is not clickable. I’ve turned ConTeXt tracing on and see

[NTG-context] Would it be possible in LMTX to do something like variable font/lineheight to fit a fixed frame?

2020-05-10 Thread Gerben Wierda
Suppose I have a fixed sized frame, say 3 y 4 cm. And I have a variable-length text. Would it be possible to write a macro that scaled the font and line height such that the text will fit in the frame? What I have now is very basic: Fixed width Typeset (METAPOST textext())

Re: [NTG-context] METAPOST subpath rounding issue

2020-05-10 Thread Gerben Wierda
> On 10 May 2020, at 00:01, Bruce Horrocks wrote: > >> You can save extracting the xparts and yparts by using direct subtraction of >> pairs and comparing with (0,0) like this: > > Aaaargh, no, ignore that, it's nonsense. It's amazing how you can stare at > something for minutes but only see

Re: [NTG-context] METAPOST subpath rounding issue

2020-05-08 Thread Gerben Wierda
> On 8 May 2020, at 00:46, n...@scorecrow.com wrote: > > > >> On 7 May 2020, at 20:28, Gerben Wierda wrote: >> >> I have a METAPOST algorithm that splits a path at a certain time in two, >> does something with both ends (not the ends where they w

[NTG-context] METAPOST subpath rounding issue

2020-05-07 Thread Gerben Wierda
I have a METAPOST algorithm that splits a path at a certain time in two, does something with both ends (not the ends where they were split) and then rejoins them. In very rare cases this crashes, because the subpath doesn’t work as expected. firstPart := subpath (0,halfWayTime) of

Re: [NTG-context] How do I add cyrillic to my typescript/document?

2020-05-04 Thread Gerben Wierda
On 4 May 2020, at 12:13, Pablo Rodriguez wrote: > > On 5/4/20 12:36 AM, Gerben Wierda wrote: >> [...] >> It could help if I would understand ConTeXt better. The link gives me a >> grammar for a command, but doesn’t tell me what to put in. >> >> I tried many,

Re: [NTG-context] lmt_followtext crashes while standard followtext itself works

2020-05-04 Thread Gerben Wierda
> we can patch this > >if ad <> origin : rotated(angle(ad)) fi > > in mp-blob.mpiv but I expect you to test if all still works then Applied and tested, it works fine. And it also provided me with an insight about if:else:fi that was slow in coming but now that I see it, I

Re: [NTG-context] How do I add cyrillic to my typescript/document?

2020-05-03 Thread Gerben Wierda
On 3 May 2020, at 15:55, Pablo Rodriguez wrote: > > On 5/3/20 2:56 PM, Gerben Wierda wrote: >> ConTeXtgarden had theanswer when I searched again: >> >> \setupbodyfont[dejavu] >> \mainlanguage[russian] > > Hi Gerben, > > I’m afraid they may be differ

[NTG-context] lmt_followtext crashes while standard followtext itself works

2020-05-03 Thread Gerben Wierda
The following example has been extracted from my automatically generated MP code. \starttext \startMPpage string texstring; texstring := "{\colored [r=0.00, g=0.00, b=0.00]{\definebodyfont [9.0pt][rm][default=Regular at 9.0pt]\switchtobodyfont [9.0pt]\setupinterlinespace [9.9pt]\tf E.g.

Re: [NTG-context] followtext, lmt_followtext and an offset of the glyphs typeset along the path (suggestion works)

2020-05-03 Thread Gerben Wierda
> On 3 May 2020, at 15:01, Gerben Wierda wrote: > >>>>> Am 01.05.2020 um 10:26 schrieb Gerben Wierda >>>> <mailto:gerben.wie...@rna.nl>>: >>>>> >>>>> I have been looking at lmt_followtext and followtext to get typesett

Re: [NTG-context] followtext, lmt_followtext and an offset of the glyphs typeset along the path

2020-05-03 Thread Gerben Wierda
>>>> Am 01.05.2020 um 10:26 schrieb Gerben Wierda : >>>> >>>> I have been looking at lmt_followtext and followtext to get typesetting >>>> done along a path. That works fine, except that in my case, I need the >>>> text to not be

[NTG-context] How do I add cyrillic to my typescript/document?

2020-05-03 Thread Gerben Wierda
I am looking for a way to amend a typescript for the additional use of cyrillic characters. I currently use: \starttypescript [sans] [optima] \setups[font:fallback:sans] \definefontsynonym [Sans] [file:Optima.ttc(Optima Regular)] [features=default] \definefontsynonym

Re: [NTG-context] How do I add cyrillic to my typescript/document?

2020-05-03 Thread Gerben Wierda
ConTeXtgarden had theanswer when I searched again: \setupbodyfont[dejavu] \mainlanguage[russian] G > On 3 May 2020, at 13:34, Gerben Wierda wrote: > > I am looking for a way to amend a typescript for the additional use of > cyrillic characters. > > I currently use: >

Re: [NTG-context] module article-basic interferes with \definebodyfont?

2020-05-01 Thread Gerben Wierda
> use pagella math with optima, not modern > Zo? \definetypeface [optima] [mm] [math] [pagella] [default] Ik gok, want documentatie die dat helder maakt heb ik niet. Er is geen uitleg in de manuals die bij de standalone context komen en op ContextGarden vond ik vooral mkii zaken die niet meer

Re: [NTG-context] module article-basic interferes with \definebodyfont?

2020-05-01 Thread Gerben Wierda
On 1 May 2020, at 16:02, Wolfgang Schuster wrote: > > Gerben Wierda schrieb am 01.05.2020 um 13:58: >> \definetypeface [optima] [ss] [sans] [optima] [default] >> \definetypeface [optima] [rm] [serif] [optima] [default] >> \definetypeface [optima] [tt]

Re: [NTG-context] followtext, lmt_followtext and an offset of the glyphs typeset along the path

2020-05-01 Thread Gerben Wierda
> On 1 May 2020, at 17:10, Henning Hraban Ramm wrote: > > > >> Am 01.05.2020 um 10:26 schrieb Gerben Wierda : >> >> I have been looking at lmt_followtext and followtext to get typesetting done >> along a path. That works fine, except that in my case, I

Re: [NTG-context] Reverse traversing of xml.collected()?

2020-05-01 Thread Gerben Wierda
> On 1 May 2020, at 13:30, Hans Hagen wrote: > > On 5/1/2020 11:31 AM, Gerben Wierda wrote: >> I’d like to travese the contents of an xml.collected() in a reverse order. I >> have >> for connectionFromXML in xml.collected(viewFromXML,"/connection&

Re: [NTG-context] module article-basic interferes with \definebodyfont?

2020-05-01 Thread Gerben Wierda
> On 1 May 2020, at 13:22, Wolfgang Schuster > wrote: > > Gerben Wierda schrieb am 01.05.2020 um 13:15: >> The following code: >> \enabletrackers[context.trace] >> %\usemodule[article-basic] >> \starttypescript [sans] [optima] >>\setups[font:fal

Re: [NTG-context] How do I get an empty line in a \framed[align=flushleft]{} item?

2020-05-01 Thread Gerben Wierda
> On 1 May 2020, at 13:28, Hans Hagen wrote: > > On 5/1/2020 10:21 AM, Gerben Wierda wrote: >> code it back to a \ ? E.g. something like >>{ ‘\U{XXX}', '\' }, > \utfchar{100} > \Uchar 100 Yes, but the question was: how do I code this in the XML and get it t

[NTG-context] module article-basic interferes with \definebodyfont?

2020-05-01 Thread Gerben Wierda
The following code: \enabletrackers[context.trace] %\usemodule[article-basic] \starttypescript [sans] [optima] \setups[font:fallback:sans] \definefontsynonym [Sans] [file:Optima.ttc(Optima Regular)] [features=default] \definefontsynonym [SansBold]

Re: [NTG-context] How do I get an empty line in a \framed[align=flushleft]{} item?

2020-05-01 Thread Gerben Wierda
> On 1 May 2020, at 09:38, Hans Hagen wrote: > > On 5/1/2020 1:44 AM, Gerben Wierda wrote: >>{ ‘\n', ‘\\strut' }, > often a \zwj or \zwno also works ok (has zero dimensions, contraty to strut; > you could also try \crlf I tried \crlf{} and that worked too (

[NTG-context] Reverse traversing of xml.collected()?

2020-05-01 Thread Gerben Wierda
I’d like to travese the contents of an xml.collected() in a reverse order. I have for connectionFromXML in xml.collected(viewFromXML,"/connection") do parseXMLConnection( rootFromXML, connectionFromXML, viewFromXML, rootFromOverrideXML) end I tried: local relationTable =

[NTG-context] followtext, lmt_followtext and an offset of the glyphs typeset along the path

2020-05-01 Thread Gerben Wierda
I have been looking at lmt_followtext and followtext to get typesetting done along a path. That works fine, except that in my case, I need the text to not be exactly on that path, I need it to hover slightly above tor below he path. Given that the path may have an unpredictable form, that means

Re: [NTG-context] How do I get an empty line in a \framed[align=flushleft]{} item?

2020-04-30 Thread Gerben Wierda
> On 30 Apr 2020, at 22:54, Wolfgang Schuster > wrote: > > Gerben Wierda schrieb am 30.04.2020 um 22:47: >> In normal TeX, when I type >> AapAap >> I get something like >> Aap >> Aap >> But inside a \framed[align=]{} the empty line disappea

Re: [NTG-context] How do I get an empty line in a \framed[align=flushleft]{} item?

2020-04-30 Thread Gerben Wierda
> On 30 Apr 2020, at 22:51, Henning Hraban Ramm wrote: > > > >> Am 30.04.2020 um 22:47 schrieb Gerben Wierda : >> >> In normal TeX, when I type >> >> AapAap >> >> I get something like >> >> Aap >> >> Aap

Re: [NTG-context] How do I get an empty line in a \framed[align=flushleft]{} item?

2020-04-30 Thread Gerben Wierda
Brilliant! Thank you! > On 30 Apr 2020, at 22:54, Wolfgang Schuster > wrote: > > Gerben Wierda schrieb am 30.04.2020 um 22:47: >> In normal TeX, when I type >> AapAap >> I get something like >> Aap >> Aap >> But inside a \framed[align=]{} the

[NTG-context] How do I get an empty line in a \framed[align=flushleft]{} item?

2020-04-30 Thread Gerben Wierda
In normal TeX, when I type AapAap I get something like Aap Aap But inside a \framed[align=]{} the empty line disappears. How do I get it back? Minimal example: \starttext TestingTesting \page \framed[align=flushleft]{TestingTesting}

[NTG-context] Is this a MetaFun bug or intended behaviour?

2020-04-30 Thread Gerben Wierda
I wanted to use the macro simplified to remove duplicate points from a path, but it removes more than that: metapost log> (127,-107)..controls (117,-107) and (107,-107) metapost log> ..(97,-107)..controls (97,-130.34) and (97,-153.66) metapost log>

[NTG-context] Using \startuseMPgraphic inside a textext() in METAPOST?

2020-04-27 Thread Gerben Wierda
I am in METAPOST which is inside TeX and I’d like (in METAPOST, not in TeX) to let a string follow a path. Adapting from the MetaFun manual around page 250, I tried this: \starttext \startMPpage[instance=doublefun] pic p; p := textext("\startuseMPgraphic[instance=doublefun]{followtokens}path

[NTG-context] \framed[align=] with a 'maxwidth' instead of a width? Or get the size of a \frame returned to lua without typesetting it in a document?

2020-04-26 Thread Gerben Wierda
Setup: TeX file Contains ctxlua{} call lua function reads XML file and calls context() statements, it puts out a \startMPpage METAPOST statements Of which some are textext(\framed[align, so

Re: [NTG-context] Solution: METAPOST textext() eats my \pars. Was: Setting vertical spacing of lines inside a \framed[align=]

2020-04-25 Thread Gerben Wierda
}\par}"); draw (textext("\framed[align=flushright,frame=on,offset=none,width=106.400bp]{\colored[r=0.000, g=0.000, b=0.000]{\switchtobodyfont[11.0pt]\setupinterlinespace[11.5pt] \rm [My]\\Application\\(Component)\\}}") shifted (200,0)); \stopMPpage \stoptext G > On 25 Apr 2020,

[NTG-context] METAPOST textext() eats my \pars. Was: Setting vertical spacing of lines inside a \framed[align=]

2020-04-24 Thread Gerben Wierda
> On 24 Apr 2020, at 18:40, Thomas A. Schmitz <mailto:thomas.schm...@uni-bonn.de>> wrote: > > > >> On 24. Apr 2020, at 18:19, Gerben Wierda > <mailto:gerben.wie...@rna.nl>> wrote: >> >> \starttext >> >> \framed[align=flushrigh

[NTG-context] METAPOST textext() eats my \pars. Was: Setting vertical spacing of lines inside a \framed[align=]

2020-04-24 Thread Gerben Wierda
> On 24 Apr 2020, at 18:40, Thomas A. Schmitz <mailto:thomas.schm...@uni-bonn.de>> wrote: > > > >> On 24. Apr 2020, at 18:19, Gerben Wierda > <mailto:gerben.wie...@rna.nl>> wrote: >> >> \starttext >> >> \framed[align=flushrigh

Re: [NTG-context] Setting vertical spacing of lines inside a \framed[align=]

2020-04-24 Thread Gerben Wierda
Not possible in my case, unless I redefine them for each use (my code is generated from data with unpredictable colors), hut thanks anyway Gerben Wierda Chess and the Art of Enterprise Architecture Mastering ArchiMate Architecture for Real Enterprises at InfoWorld On Slippery Ice at EAPJ

Re: [NTG-context] Setting vertical spacing of lines inside a \framed[align=]

2020-04-24 Thread Gerben Wierda
of those, so I need a solution that works in the above setting. Gerben Wierda Chess and the Art of Enterprise Architecture <https://ea.rna.nl/the-book/> Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/> Architecture for Real Enterprises <https://www.infoworld.com/bl

[NTG-context] Setting vertical spacing of lines inside a \framed[align=]

2020-04-24 Thread Gerben Wierda
question like this. I must be doing something wrong and looking in the wrong place) Gerben Wierda Chess and the Art of Enterprise Architecture <https://ea.rna.nl/the-book/> Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/> Architecture for Real Enterprises <https://www.inf

Re: [NTG-context] Basic font question (Optima, but no bold, no italics). Standalone ConTeXt does not work. TeX Live 2019 works

2020-04-24 Thread Gerben Wierda
> On 24 Apr 2020, at 11:56, Taco Hoekwater wrote: > > Hi, > > FYI, my "context mkiv” standalone seems to be fine (latest download). > “lmtx” standalone (also latest download) not so much (same problems). Thx. How do I get/install a ‘context mkiv’ standalone? The standalone on

[NTG-context] ConTeXt beta issue? Was: Basic font question (Optima, but no bold, no italics). Standalone ConTeXt (beta) does not work. TeX Live 2019 works

2020-04-24 Thread Gerben Wierda
recall I installed that because Hans patched something, but I am uncertain. Hans? G > On 24 Apr 2020, at 08:54, Henning Hraban Ramm wrote: > > > >> Am 24.04.2020 um 08:48 schrieb Gerben Wierda : >> >> Then I thought, let’s test some other things. I logged in as anoth

Re: [NTG-context] Basic font question (Optima, but no bold, no italics). Standalone ConTeXt does not work. TeX Live 2019 works

2020-04-24 Thread Gerben Wierda
> On 24 Apr 2020, at 08:53, Wolfgang Schuster > wrote: > > Can you try this: > > \definefontfamily [mainface] [rm] [Optima] > [it=optimaitalic, >bf=optimabold, >bi=optimabolditalic] I altready did that earlier as per the Wiki information (did not report it) and just tried again.

Re: [NTG-context] Basic font question (Optima, but no bold, no italics). Standalone ConTeXt does not work. TeX Live 2019 works

2020-04-24 Thread Gerben Wierda
With Arial: \definefontfamily[mainface][rm][Arial] \setupbodyfont[mainface,10pt] with Optima: \definefontfamily[mainface][rm][Optima] \setupbodyfont[mainface,10pt] It doesn’t matter if the font statements are before or after \starttext Then I thought, let’s test some other things. I logged

Re: [NTG-context] Basic font question (Optima, but no bold, no italics)

2020-04-23 Thread Gerben Wierda
> On 23 Apr 2020, at 19:18, Henning Hraban Ramm wrote: > >> >> Am 23.04.2020 um 16:42 schrieb Gerben Wierda : >> >>> >>> On 23 Apr 2020, at 16:34, Henning Hraban Ramm wrote: >>> >>>> >>>> Am 23.04.2020 um 16:

Re: [NTG-context] Is there a 'sized' command equivalent to \colored?

2020-04-23 Thread Gerben Wierda
Answering my own question: \switchtobodyfont > On 23 Apr 2020, at 16:45, Gerben Wierda wrote: > > I can directly colour a text in rgb by doing > \colored[r=0.8,b=0.6,c=0.4]{Text}. Suppose I want to hard code a piece of > text as 12.8pt, is there a simple way to do tha

[NTG-context] Is there a 'sized' command equivalent to \colored?

2020-04-23 Thread Gerben Wierda
I can directly colour a text in rgb by doing \colored[r=0.8,b=0.6,c=0.4]{Text}. Suppose I want to hard code a piece of text as 12.8pt, is there a simple way to do that directly like with \colored for colour? G ___

Re: [NTG-context] Basic font question

2020-04-23 Thread Gerben Wierda
> On 23 Apr 2020, at 16:34, Henning Hraban Ramm wrote: > >> >> Am 23.04.2020 um 16:22 schrieb Gerben Wierda : >> >> >> >>> On 23 Apr 2020, at 16:16, Vladimir Lomov wrote: >>> >>> Hello, >>> ** Gerb

Re: [NTG-context] Basic font question

2020-04-23 Thread Gerben Wierda
> On 23 Apr 2020, at 16:16, Vladimir Lomov wrote: > > Hello, > ** Gerben Wierda [2020-04-23 16:00:34 +0200]: > >> On my Mac, I am trying: > >> \definefontfamily[mainface][rm][Optima] >> \setupbodyfont[mainface,10pt] > >> {\bf Bold} and {\

[NTG-context] Basic font question

2020-04-23 Thread Gerben Wierda
On my Mac, I am trying: \definefontfamily[mainface][rm][Optima] \setupbodyfont[mainface,10pt] {\bf Bold} and {\it Italic} and {\rm Regular} text. What do I need to do to get actual bold and italics in my output? Thx,

Re: [NTG-context] METAPOST: How do I get this 'max' cutafter to work?

2020-04-22 Thread Gerben Wierda
> On 22 Apr 2020, at 09:30, Taco Hoekwater wrote: > > Hi, > >> On 21 Apr 2020, at 17:52, Gerben Wierda wrote: >> >>> pair a ; a := arrowHead intersection_point connection ; > > Hans’ example also works with “intersectionpoint”: the d

Re: [NTG-context] METAPOST: How do I get this 'max' cutafter to work?

2020-04-21 Thread Gerben Wierda
> On 21 Apr 2020, at 14:41, Hans Hagen wrote: > > On 4/21/2020 1:29 PM, Gerben Wierda wrote: [snip] > > \startMPpage[instance=doublefun] > > path arrowHead; > arrowHead := >(542,-77.000186920166016)..controls > (545.37,-77.000186920166016

[NTG-context] METAPOST: How do I get this 'max' cutafter to work?

2020-04-21 Thread Gerben Wierda
I have these two paths, but cutting doesn’t work because the path to be cut takes the wrong intersection regardless of how I direct the path to be cut after (reverse or not). The path to cut after is a triangle with the base horizontal and the path to cut is a vertical line. The top of the

Re: [NTG-context] Using command line values in a TeX document; writing a script?

2020-04-15 Thread Gerben Wierda
> On 15 Apr 2020, at 13:54, Wolfgang Schuster > wrote: > > Gerben Wierda schrieb am 15.04.2020 um 12:19: >>> On 14 Apr 2020, at 11:52, Taco Hoekwater wrote: >>>> On 14 Apr 2020, at 11:25, Gerben Wierda wrote: >>>> >>>> This helps f

Re: [NTG-context] Using command line values in a TeX document; writing a script?

2020-04-15 Thread Gerben Wierda
> On 14 Apr 2020, at 11:52, Taco Hoekwater wrote: > > > >> On 14 Apr 2020, at 11:25, Gerben Wierda wrote: >> >> This helps for adding information to my processing. >> >> What I was also looking for is that I don’t have a test.tex anymore, just

Re: [NTG-context] Using command line values in a TeX document; writing a script?

2020-04-14 Thread Gerben Wierda
This helps for adding information to my processing. What I was also looking for is that I don’t have a test.tex anymore, just the XML file I am parsing and a command line action. So, I use mtxrun, give it the name of an XML. lua code (using a ’script’ somewhere?) reads the XML, extracts a

[NTG-context] Using command line values in a TeX document; writing a script?

2020-04-13 Thread Gerben Wierda
Currently, I process a file like this: mtxrun --autogenerate --script context test12.tex and in the file test12.tex one sees something like this: \input archimate-mp \ctxlua{moduledata.archimate(“myarchimatefile.xml")} The latter parses the xml file and produces a PDF using generated MP code.

Re: [NTG-context] METAPOST/MetaFun withtransparency doesn't accept my pair primary argument, what am I doing wrong?

2020-04-10 Thread Gerben Wierda
e pic; pic := Foo( 150, 50, (0.686,1.000,1.000), 0.5); draw pic; \stopMPpage \stoptext > On 9 Apr 2020, at 18:06, Hans Hagen wrote: > > On 4/9/2020 4:58 PM, Gerben Wierda wrote: >> \starttext >> \startMPpage[instance=doublefun] >> vardef Foo( expr w, h, fillColor, fillT

[NTG-context] METAPOST/MetaFun withtransparency doesn't accept my pair primary argument, what am I doing wrong?

2020-04-09 Thread Gerben Wierda
I have refactored my code to use withtransparency and separate parameters for colors, sizes, transparency, etc. But I’m running into a problem. The fillTransparency parameter is a pair primary (as can be seen from the show command) Here is a pretty minimum example (in reality there are

Re: [NTG-context] Why does this example from the MetaFun manual not work?

2020-04-09 Thread Gerben Wierda
(r,g,b,t) as one parameter. G > > Taco > > >> On 9 Apr 2020, at 09:04, Gerben Wierda wrote: >> >> Nobody? >> >>> On 8 Apr 2020, at 12:20, Gerben Wierda wrote: >>> >>> I would like to use the result of transparent() straight in

Re: [NTG-context] Why does this example from the MetaFun manual not work?

2020-04-09 Thread Gerben Wierda
Nobody? > On 8 Apr 2020, at 12:20, Gerben Wierda wrote: > > I would like to use the result of transparent() straight in my macros, so I > can pass the colors with transparency using a single parameter. That should > be possible if I understand the MetaFun manual (where I

[NTG-context] Why does this example from the MetaFun manual not work?

2020-04-08 Thread Gerben Wierda
I would like to use the result of transparent() straight in my macros, so I can pass the colors with transparency using a single parameter. That should be possible if I understand the MetaFun manual (where I’ve copy-pasted this example from): \starttext \startMPpage[instance=doublefun] vardef

Re: [NTG-context] Trying to understand this ctxlua error

2020-04-06 Thread Gerben Wierda
On 6 Apr 2020, at 02:54, Wolfgang Schuster wrote: > > Gerben Wierda schrieb am 06.04.2020 um 00:41: >> I got this error after I had changed some lua code: >> tex error > tex error on line 272 in file archimate-lua.new: ! >> Undefined control sequence >>

[NTG-context] Trying to understand this ctxlua error

2020-04-05 Thread Gerben Wierda
I got this error after I had changed some lua code: tex error > tex error on line 272 in file archimate-lua.new: ! Undefined control sequence warnIfVerbose( "Breaking off the processing of node %s\nNo l...eak

Re: [NTG-context] Bounding box of picture returned by textext() in METAPOST

2020-04-05 Thread Gerben Wierda
Nobody? > On 4 Apr 2020, at 22:58, Gerben Wierda wrote: > > I have this METAPOST macro: > > vardef makeTeXLabel( expr w, h, name) = > if debugProgram or debugLabels: show "NAME makeTeXLabel:", name, tostring > 0.8w, tostring 0.8h; fi > s

[NTG-context] Is there a robust way to find the first (or last intersection) of path p with path q?

2020-04-05 Thread Gerben Wierda
Intersecting path p and q will give you more or less randomly (actually, there is an algorithm, but not a very useful one for METAPOST) an intersection (time on p, time on q) I am trying to find out if anybody as already created a macro that gives you the intersection with the smallest (or

Re: [NTG-context] What was that 'rounding paths' metafun(?) function again?

2020-04-05 Thread Gerben Wierda
civilised. I had looked at 2.5 and 2.6 but this was not required (nor of any use). G > > Keith > > On 05/04/2020 11:31, Gerben Wierda wrote: >> I think I saw a function in MetaFun somehwre that you could give a ‘hard’ >> path, i.e. (0,0) -- (0,1) — (1,1) and it woul

Re: [NTG-context] What was that 'rounding paths' metafun(?) function again?

2020-04-05 Thread Gerben Wierda
:= direction (arctime (rounding) of subTwo) of subTwo; softPath := softPath -- pointOne{dirOne} .. {dirTwo}pointTwo; fi endfor; softPath enddef; Fixed rounding of 5bp, but that is easy to change. > On 5 Apr 2020, at 12:37, Wolfgang Schuster > wrote: > > Gerben Wierda schrieb am 0

[NTG-context] What was that 'rounding paths' metafun(?) function again?

2020-04-05 Thread Gerben Wierda
I think I saw a function in MetaFun somehwre that you could give a ‘hard’ path, i.e. (0,0) -- (0,1) — (1,1) and it would become a path with nicely rounded (part of a circle) corners (still straight lines), but I can’t find it anymore. I wrote my own, but it is giving me headaches so I’d like to

Re: [NTG-context] startMPpage..stopMPpage written to a separate PDF?

2020-04-05 Thread Gerben Wierda
> On 5 Apr 2020, at 11:34, Hans Hagen wrote: > > On 4/5/2020 12:29 AM, Gerben Wierda wrote: >> I have a series of startMPpage—stopMPpage pairs (with MP code inbetween). >> These now become separate pages in a single PDF. But I need them to become >> separate PDF’s

[NTG-context] startMPpage..stopMPpage written to a separate PDF?

2020-04-04 Thread Gerben Wierda
I have a series of startMPpage—stopMPpage pairs (with MP code inbetween). These now become separate pages in a single PDF. But I need them to become separate PDF’s each during my ConTeXt run, with a name of my own choosing. Is this possible? I guess this will be problematic, but one can hope

  1   2   3   4   5   >