Re: [NTG-context] Math functions not typeset inside MetaPost

2022-04-19 Thread śrīrāma via ntg-context
On 4/19/22 8:22 PM Mikael Sundqvist via ntg-context wrote:
> Thanks, this will be fixed in the next upload (that will take place
> soon as far as I've heard).

Thanks very much for the quick reply. Yes: it is fixed in the latest upload 
just now.

Thanks,
  Sreeram


___
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] new upload

2022-04-19 Thread śrīrāma via ntg-context
On 4/19/22 11:53 PM Hans Hagen via ntg-context wrote:
> I uploaded a new lmtx. Some more adaptive magic ... I'm not sure how
> usefull it is but users always find ways to apply such things. I
> attached a test file.

Hi Hans,

Thanks very much for the upload and the tutorial on 'adaptive'. It seems very 
impressive and right away, one application which I could think of in my case 
is its use in denoting prosodic elements in verses (of poems). For this 
purpose I was using \definebar, \setupbar so far to indicate certain types of 
elements of verses; now I think this being far more advanced might be more 
applicable.

Thanks,
  Sreeram


___
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] new upload

2022-04-19 Thread Jeong Dal via ntg-context
Dear Hans,

I can use "\blank[9cm]” in column mode but I have to adjust the value to make 
space evenly.
Since it was working well last December, I guess that there is something 
changed in \startcolumns … \stopcolumns after last December.

Thank you. 

Best regards,

Dalyoung

> 2022. 4. 20. 오전 4:18, Jeong Dal via ntg-context  작성:
> 
> Dear Hans,
> 
> A new upload solves the math font problem in MetaFun. The code
>   label(textext("$\sin\theta$”),origin);
> is working well.
> Also, your sample file adaptive-001.tex is also working without error which 
> is not compiled before.
> However, \vfill is not working in column mode while it provides the same 
> vertical spaces properly not in column mode. 
> The following code is compiled well but no vertical spaces between items. If 
> I comment out \startcolumns … \column … \stopcolumns, it provides the same 
> vertical spaces for each items.
>   \starttext
>   \startcolumns
>   \startitemize[n]
>   \item 
>   \vfill
>   \item
>   \vfill
>   \column
>   \item 
>   \vfill
>   \item
>   \vfill
>   \stopitemize
>   \stopcolumns
>   \stoptext
> 
> This code was working in last December. 
> 
> Thank you for your fix.
> 
> Best regards,
> 
> Dalyoung
> 
> 
>> 2022. 4. 20. 오전 3:23, Hans Hagen via ntg-context > > 작성:
>> 
>> Hi,
>> 
>> I uploaded a new lmtx. Some more adaptive magic ... I'm not sure how usefull 
>> it is but users always find ways to apply such things. I attached a test 
>> file.
>> 
>> 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 
>> ___
> 
> ___
> 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] new upload

2022-04-19 Thread Jeong Dal via ntg-context
Dear Hans,

A new upload solves the math font problem in MetaFun. The code
label(textext("$\sin\theta$”),origin);
is working well.
Also, your sample file adaptive-001.tex is also working without error which is 
not compiled before.
However, \vfill is not working in column mode while it provides the same 
vertical spaces properly not in column mode. 
The following code is compiled well but no vertical spaces between items. If I 
comment out \startcolumns … \column … \stopcolumns, it provides the same 
vertical spaces for each items.
\starttext
\startcolumns
\startitemize[n]
\item 
\vfill
\item
\vfill
\column
\item 
\vfill
\item
\vfill
\stopitemize
\stopcolumns
\stoptext

This code was working in last December. 

Thank you for your fix.

Best regards,

Dalyoung


> 2022. 4. 20. 오전 3:23, Hans Hagen via ntg-context  작성:
> 
> Hi,
> 
> I uploaded a new lmtx. Some more adaptive magic ... I'm not sure how usefull 
> it is but users always find ways to apply such things. I attached a test file.
> 
> 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
> ___

___
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] new upload

2022-04-19 Thread Hans Hagen via ntg-context

Hi,

I uploaded a new lmtx. Some more adaptive magic ... I'm not sure how 
usefull it is but users always find ways to apply such things. I 
attached a test file.


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
-\starttext

\setupexternalfigures
  [location={default,global}]

\startMPdefinitions
def TickTock =
interim linecap := squared;
save p ; path p ; p := fullsquare 
xysized(AdaptiveWidth,.9(AdaptiveHeight+AdaptiveDepth)) ;
fill p withcolor AdaptiveColor ;
draw bottomboundary (p enlarged (-AdaptiveThickness) )
withdashes (3*AdaptiveThickness)
withpen pencircle scaled AdaptiveThickness
withcolor white ;
enddef ;
\stopMPdefinitions

\startsetups adaptive:test
\setbox\usedadaptivebox\hbox to \usedadaptivewidth yoffset 
-.9\usedadaptivedepth \bgroup
\hss
\startMPcode
TickTock ;
\stopMPcode
\hss
   \egroup
\stopsetups

\definecolor[adaptive:tick][.25(blue,green)]
\definecolor[adaptive:tock][.75(blue,green)]

\defineadaptive
  [tick]
  [setups=adaptive:test,
   color=adaptive:tick,
   foregroundcolor=white,
   foregroundstyle=\infofont,
   strut=yes]

\defineadaptive
  [tock]
  [tick]
  [color=adaptive:tock]

\dorecurse{5}{
\dostepwiserecurse{1}{150}{1}{%
this~#1.##1 is~#1.##1 test~#1.##1
\ifodd##1\relax
\adaptivebox[tick]{\hss tick #1.##1\hss}
\else
\adaptivebox[tock]{\hss tock #1.##1\hss}
\fi
}
\blank
}

\startsetups adaptive:test
\setbox\usedadaptivebox\hbox to \usedadaptivewidth yoffset 
-\usedadaptivedepth \bgroup
\externalfigure
  [cow.pdf]
  [width=\usedadaptivewidth,
   height=\dimexpr\usedadaptiveheight+\usedadaptivedepth\relax]%
   \egroup
\stopsetups

\dorecurse{5}{
\dostepwiserecurse{1}{150}{1}{%
this~#1.##1 is~#1.##1 test~#1.##1
{\adaptivebox[strut=yes,setups=adaptive:test]{}}
}
\blank
}

\page

\startsetups adaptive:test
\setbox\usedadaptivebox\vbox to \usedadaptivetotal \bgroup
\externalfigure
  [cow.pdf]
  [width=\usedadaptivewidth,
   height=\usedadaptivetotal]%
   \egroup
\stopsetups

\ruledvbox to \textheight {
\par \begstrut \samplefile{tufte} \endstrut \par
\adaptivevbox[strut=yes,setups=adaptive:test]{\hsize\textwidth\hss}
\par \begstrut \samplefile{tufte} \endstrut
}

\page

\startsetups adaptive:test:a
\setbox\usedadaptivebox\vbox to \usedadaptivetotal \bgroup
\externalfigure
  [cow.pdf]
  [width=\framedmaxwidth,
   frame=on,
   height=\usedadaptivetotal]%
   \egroup
\stopsetups

\startsetups adaptive:test:b
\setbox\usedadaptivebox\vbox to \usedadaptivetotal \bgroup
\externalfigure
  [cow.pdf]
  [width=\usedadaptivewidth,
   frame=on,
   height=\usedadaptivetotal]%
   \egroup
\stopsetups

\showframe

\framed[height=18cm,align=middle,adaptive=yes,top=,bottom=] {%
\begstrut \samplefile{tufte} \endstrut
\par
\adaptivevbox
  [strut=yes,setups=adaptive:test:a]
  {\showstruts\strut\hsize5cm\hss}%
\par
\adaptivevbox
  [strut=yes,setups=adaptive:test:b]
  {\showstruts\strut\hsize5cm\hss}%
\par
\begstrut \samplefile{tufte} \endstrut
}

\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] embed source-file in pdf

2022-04-19 Thread Rik Kabel via ntg-context


On 2022-04-19 10:47, Heinrich Paeßens via ntg-context wrote:

Hi there

just a quick question:

Is there a command or package to embed the source-file (*.tex) into 
the resulting pdf-file, just like in LaTeX using package »embedall« 
?


Many thanks and kind regards

Heinrich




You are looking for attachment 
.


Note that the resulting pdf will not pass PDF/A validation, or at least, 
it did not at the last time I tested it a year ago.


--
Rik
___
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] embed source-file in pdf

2022-04-19 Thread Heinrich Paeßens via ntg-context
Hi there

just a quick question: 

Is there a command or package to embed the source-file (*.tex) into the 
resulting pdf-file, just like in LaTeX using package »embedall« 
?

Many thanks and kind regards

Heinrich___
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] Math functions not typeset inside MetaPost

2022-04-19 Thread Mikael Sundqvist via ntg-context
On Tue, Apr 19, 2022 at 3:59 PM śrīrāma via ntg-context
 wrote:
>
> Hi Hans,
>
> [I am sending this again since the previous mails regarding were sent during
> the weekend].
>
> I am on the most recent upload of LMTX [2022.04.15 20:20]. However, when I try
> to use math functions inside MetaPost strings, the function is not typeset
> correctly. Please consider the following MWE:
>
>   \starttext
> \startMPcode
> draw textext("\m{\max_i x_i}");
> \stopMPcode
>   \stoptext
>
> which produces the output attached here as an image. Instead of the mfunction
> maxᵢ xᵢ
> some form of the string mathfunctionhandlelabel is typeset.
>
> I tried to inspect \math_function_handle_label [math-ini] and also mp-mlib and
> mlib-pps but could not figure out what is going wrong. I wonder if there is a
> backslash missing somewhere. I am a little worried since I use MetaFun in
> conjunction with maths and could not figure out what the issue is.
>
> Please see the original post by Dalyoung here:
>   https://mailman.ntg.nl/pipermail/ntg-context/2022/105462.html
>
> Please advise.
>
> Thank you,
>   
> Sreeram___

Thanks, this will be fixed in the next upload (that will take place
soon as far as I've heard).

Best regards, Mikael
___
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] Math functions not typeset inside MetaPost

2022-04-19 Thread śrīrāma via ntg-context
Hi Hans,

[I am sending this again since the previous mails regarding were sent during 
the weekend].

I am on the most recent upload of LMTX [2022.04.15 20:20]. However, when I try 
to use math functions inside MetaPost strings, the function is not typeset 
correctly. Please consider the following MWE:

  \starttext
\startMPcode
draw textext("\m{\max_i x_i}");
\stopMPcode
  \stoptext

which produces the output attached here as an image. Instead of the mfunction 
maxᵢ xᵢ 
some form of the string mathfunctionhandlelabel is typeset.

I tried to inspect \math_function_handle_label [math-ini] and also mp-mlib and 
mlib-pps but could not figure out what is going wrong. I wonder if there is a 
backslash missing somewhere. I am a little worried since I use MetaFun in 
conjunction with maths and could not figure out what the issue is.

Please see the original post by Dalyoung here:
  https://mailman.ntg.nl/pipermail/ntg-context/2022/105462.html

Please advise.

Thank you,
  Sreeram___
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
___