ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* MP boxes: boxjoin not recognized?
@ 2021-07-21 10:29 Rudd, Kevin
  2021-07-21 14:26 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Rudd, Kevin @ 2021-07-21 10:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Rudd, Kevin


[-- Attachment #1.1: Type: text/plain, Size: 2839 bytes --]

Hi---

All of my figures that use MP boxes are now failing. It looks like "boxjoin" (from the MP "boxes" macros) is not being recognized. Also, apparently unrelated, I wonder if the comparison in "boxes.mp" is correct as it appears that lmtx loads "mp-xbox.mpiv" instead of "mp-xbox.mpxl". Here is some log output and a (mostly) MWE.

Thanks for any suggestions,
 ---K

% system          > ConTeXt  ver: 2021.07.16 22:03 LMTX  fmt: 2021.7.21  int: english/english

% metapost        > initializing instance 'metafun:1' using format 'metafun' and method 'default'
% metapost        > loading 'metafun' as 'metafun.mpxl' using method 'default'
% metapost        > initializing number mode 'scaled'
% metapost        > trace > This is MPLIB for LuaMetaTeX, version 3.11, running in scaled mode.
% metapost        > trace >
% metapost        > trace > loading metafun for lmtx, including the plain 1.004 base definitions
% metapost        > trace >
% metapost        > trace > >> 2
% metafun         > log >
% metafun         > log > error: Isolated expression
% metafun         > log >
% metapost        > trace > >> boxjoin
% metapost        > trace > <to be read again>
% metapost        > trace > <*> show metapostversion; boxjoin(
% metafun         > log >
% metafun         > log > I couldn't find an '=' or ':=' after the expression that is shown above this
% error message, so I guess I'll just ignore it and carry on.
% metafun         > log >
% metapost        > trace >                                ); boxit.a("a"); boxit.bb("bb"); boxit.ccc("ccc"); drawboxed(a,bb,ccc); ;
% metapost        > trace >

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\startMPdefinitions
    input boxes
\stopMPdefinitions

\starttext

hello

\startalignment[center]
    \startplacefigure
        \startMPcode%{aaa}
            show metapostversion;
                % boxes.mp: scantokens("input mp-xbox.mp" & (if metapostversion > 2 : "xl" else : "iv" fi)) ;
                %           => loads mp-xbox.mpiv in lmtx rather than mp-xbox.mpxl as i would have expected
            boxjoin();
            % boxjoin(a.se<http://a.se/>=b.sw; a.ne=b.nw);
            boxit.a("a");
            boxit.bb("bb");
            boxit.ccc("ccc");
            drawboxed(a,bb,ccc);
        \stopMPcode
    \stopplacefigure
\stopalignment

goodbye

\stoptext

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Kevin W. Rudd, Ph.D.
CAPT, USN (Ret)

Computer Architecture & Computer Engineering
Advanced Computing Systems (ACS) Research Program
Laboratory for Physical Sciences (LPS)

443-654-7878
kevin@lps.umd.edu<mailto:kevin@lps.umd.edu>

Visiting Research Professor
United States Naval Academy

rudd@usna.edu<mailto:rudd@usna.edu>



[-- Attachment #1.2: Type: text/html, Size: 7198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MP boxes: boxjoin not recognized?
  2021-07-21 10:29 MP boxes: boxjoin not recognized? Rudd, Kevin
@ 2021-07-21 14:26 ` Hans Hagen
  2021-07-23  4:38   ` Aditya Mahajan
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2021-07-21 14:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Rudd, Kevin

On 7/21/2021 12:29 PM, Rudd, Kevin wrote:
> Hi---
> 
> All of my figures that use MP boxes are now failing. It looks like 
> "boxjoin" (from the MP "boxes" macros) is not being recognized. Also, 
> apparently unrelated, I wonder if the comparison in "boxes.mp" is 
> correct as it appears that lmtx loads "mp-xbox.mpiv" instead of 
> "mp-xbox.mpxl". Here is some log output and a (mostly) MWE.

Indeed, I made that one an mp-* because it removes a dependency. The 
only real depency left now in a context install is a bunch of fonts.

> Thanks for any suggestions,

i'll add

def boxjoin(text t) =
     def boxes_prevbox = _ enddef;
     def boxes_dojoin(suffix a,b) = t enddef;
enddef;

for now you can just add it


>                  % boxes.mp: scantokens("input mp-xbox.mp" & (if 
> metapostversion > 2 : "xl" else : "iv" fi)) ;
>                  %           => loads mp-xbox.mpiv in lmtx rather than 
> mp-xbox.mpxl as i would have expected

hm, indeed, fixed; thanks for noticing,

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MP boxes: boxjoin not recognized?
  2021-07-21 14:26 ` Hans Hagen
@ 2021-07-23  4:38   ` Aditya Mahajan
  2021-07-23  7:14     ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Aditya Mahajan @ 2021-07-23  4:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users


On Wed, 21 Jul 2021, Hans Hagen wrote:

> On 7/21/2021 12:29 PM, Rudd, Kevin wrote:
> > Hi---
> > 
> > All of my figures that use MP boxes are now failing. It looks like 
> > "boxjoin" (from the MP "boxes" macros) is not being recognized. Also, 
> > apparently unrelated, I wonder if the comparison in "boxes.mp" is 
> > correct as it appears that lmtx loads "mp-xbox.mpiv" instead of 
> > "mp-xbox.mpxl". Here is some log output and a (mostly) MWE.
> 
> Indeed, I made that one an mp-* because it removes a dependency. 

Maybe we should also merge rboxes.mp with mp-xbox.* It is almost the same code as boxes.mp.

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MP boxes: boxjoin not recognized?
  2021-07-23  4:38   ` Aditya Mahajan
@ 2021-07-23  7:14     ` Hans Hagen
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2021-07-23  7:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Aditya Mahajan

On 7/23/2021 6:38 AM, Aditya Mahajan wrote:
> 
> On Wed, 21 Jul 2021, Hans Hagen wrote:
> 
>> On 7/21/2021 12:29 PM, Rudd, Kevin wrote:
>>> Hi---
>>>
>>> All of my figures that use MP boxes are now failing. It looks like
>>> "boxjoin" (from the MP "boxes" macros) is not being recognized. Also,
>>> apparently unrelated, I wonder if the comparison in "boxes.mp" is
>>> correct as it appears that lmtx loads "mp-xbox.mpiv" instead of
>>> "mp-xbox.mpxl". Here is some log output and a (mostly) MWE.
>>
>> Indeed, I made that one an mp-* because it removes a dependency.
> 
> Maybe we should also merge rboxes.mp with mp-xbox.* It is almost the same code as boxes.mp.

Never seen, where is it?

Btw, Alan's nodes module is also an alternative for connected stuff.

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-23  7:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21 10:29 MP boxes: boxjoin not recognized? Rudd, Kevin
2021-07-21 14:26 ` Hans Hagen
2021-07-23  4:38   ` Aditya Mahajan
2021-07-23  7:14     ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).