Re: [NTG-context] Numbering in mathalignment not working

2022-05-24 Thread Mikael Sundqvist via ntg-context
On Wed, May 25, 2022 at 5:35 AM Luis Montgomery via ntg-context
 wrote:
>
> Same issue with
>
> \placeformula
> \startformula
> \startalign[number=auto]
> \NC A_1 x + B_1 y + C_1\NC = 0 \NR[+]
> \NC A_2 x + B_2 y + C_2\NC = 0 \NR[+]
> \stopalign
> \stopformula
>
>
> and with all the wiki examples on \startmathalignment 
> (https://wiki.contextgarden.net/Command/_startmathalignment).
>
> L. Montgomery
>
> El dom, 22 may 2022 a las 0:14, śrīrāma via ntg-context 
> () escribió:
>>
>> On 5/19/22 2:04 PM śrīrāma wrote:
>> > Hi,
>> >
>> > [I am on version 2022.05.11 11:36]
>> >
>> > I think either a bug might have crept into one of the recent uploads or
>> > there is some change in behaviour – numbering of statements inside
>> > mathalignment blocks is not working: only one statement is numbered even if
>> > multiple are requested.
>> >
>> > The following example does not produce the expected result
>> > both the equations should be numbered when only the first one is –
>> >
>> >   \starttext
>> >
>> >   \placeformula
>> >   \startformula
>> > \startmathalignment
>> >   \NC a \NC = b \NR[eq:one]
>> >   \NC c \NC = d \NR[eq:two]
>> > \stopmathalignment
>> >   \stopformula
>> >
>> >   \stoptext
>> >
>> > Also the [+] options and the second optional argument of \NR does not work
>> > as expected. Has its behaviour changed?
>> > [...]
>>
>> Hi,
>>
>> Sorry to bother you all during a weekend but I am wondering if anyone has any
>> workaround for the issue  I have asked about above: while updating LMTX I
>> unwittingly replaced my previous version without retaining a copy. Now I am
>> stuck with documents without equation numbers.
>>
>> As stated above the following MWE demonstrates the issue: only the first
>> equation is numbered (while both should be)
>>
>>   \placeformula
>>   \startformula
>> \startmathalignment
>>   \NC a \NC = b \NR[eq:one]
>>   \NC c \NC = d \NR[eq:two]
>> \stopmathalignment
>>   \stopformula
>> I tried to look into math-ini and math-ali but to no avail.
>>
>> Thanks,
>>   Sreeram
>>
>>   Sreeram
>>

It has been fixed, but we have to wait for the next upload.

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


Re: [NTG-context] Numbering in mathalignment not working

2022-05-24 Thread Luis Montgomery via ntg-context
Same issue with

\placeformula
\startformula
\startalign[number=auto]
\NC A_1 x + B_1 y + C_1\NC = 0 \NR[+]
\NC A_2 x + B_2 y + C_2\NC = 0 \NR[+]
\stopalign
\stopformula


and with all the wiki examples on \startmathalignment (
https://wiki.contextgarden.net/Command/_startmathalignment).

L. Montgomery

El dom, 22 may 2022 a las 0:14, śrīrāma via ntg-context ()
escribió:

> On 5/19/22 2:04 PM śrīrāma wrote:
> > Hi,
> >
> > [I am on version 2022.05.11 11:36]
> >
> > I think either a bug might have crept into one of the recent uploads or
>
> > there is some change in behaviour – numbering of statements inside
>
> > mathalignment blocks is not working: only one statement is numbered even
> if
> > multiple are requested.
> >
> > The following example does not produce the expected result
> > both the equations should be numbered when only the first one is –
> >
> >   \starttext
> >
> >   \placeformula
> >   \startformula
> > \startmathalignment
> >   \NC a \NC = b \NR[eq:one]
> >   \NC c \NC = d \NR[eq:two]
> > \stopmathalignment
> >   \stopformula
> >
> >   \stoptext
> >
> > Also the [+] options and the second optional argument of \NR does not
> work
> > as expected. Has its behaviour changed?
> > [...]
>
> Hi,
>
> Sorry to bother you all during a weekend but I am wondering if anyone has
> any
> workaround for the issue  I have asked about above: while updating LMTX I
> unwittingly replaced my previous version without retaining a copy. Now I
> am
> stuck with documents without equation numbers.
>
> As stated above the following MWE demonstrates the issue: only the first
> equation is numbered (while both should be)
>
>   \placeformula
>   \startformula
> \startmathalignment
>   \NC a \NC = b \NR[eq:one]
>   \NC c \NC = d \NR[eq:two]
> \stopmathalignment
>   \stopformula
> I tried to look into math-ini and math-ali but to no avail.
>
> Thanks,
>   Sreeram
>
>   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
>
> ___
>
___
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] font question re U+00336

2022-05-24 Thread jbf via ntg-context
I think I'll take comfort from your final comment - the output looks 
good enough! But I remain intrigued.


Julian

On 24/5/22 17:26, Henning Hraban Ramm via ntg-context wrote:
you can ignore a lot of warnings if the output looks good enough. 

___
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] Issue with interactive checkboxes[solved]

2022-05-24 Thread Jan-Erik Hägglöf via ntg-context
I’ve tested on my Mac OS Monterey 12.3.1 and the same phenomena as firefox it 
also is on google chrome.



> 24 maj 2022 kl. 10:18 skrev Jan-Erik Hägglöf :
> 
> HI Again!
> 
> I discovered what went wrong, such a silly syntax error, here comes a working 
> code:
> 
> \setupinteraction[state=start]
> 
> \definesymbol[yes][{\externalfigure[check-mark-svgrepo-com.svg][conversion=mp]}]
> \definesymbol[no][]
> 
> \newcount\chk
> \def\checkmark{%
> \global\advance\chk by 1
> \setupfield[setup1][width=0.5cm, height=0.5cm,rulethickness=1pt, 
> corner=round, framecolor=red]%
> \definefield[checkme\the\chk][check][setup1][yes,no][no]%
> \field[checkme\the\chk]%
> }
> 
> \starttext
> 
> \checkmark\
> 
> \checkmark\
> 
> \checkmark\
> 
> \stoptext
> 
> Sorry to bother the list but maybe it is helpful for someone.
> 
> Regards
> 
> /Jan-Erik
> 
>> 24 maj 2022 kl. 08:08 skrev Jan-Erik Hägglöf > >:
>> 
>> I’ve tried this
>> 
>> \setupinteraction[state=start]
>> 
>> \definesymbol[yes][{\externalfigure[check-mark-svgrepo-com.svg][conversion=mp]}]
>> \definesymbol[no][]
>> 
>> \newcount\chk
>> \def\chk{%
>> \global \advance \chk by 1
>> \setupfield[setup1][width=0.5cm, height=0.5cm,rulethickness=1pt, 
>> corner=round, framecolor=red]%
>> \definefield[checkme\the\chk][check][setup1][yes,no][no]%
>> \field[checkme\the\chk]%
>> }
>> 
>> \starttext
>> 
>> \chk
>> 
>> \chk
>> 
>> \chk
>> 
>> \stoptext
>> 
>> But it gives the error ” You can’t use \global after \advance”
>> 
>> But this example works fine
>> 
>> \setupinteraction[state=start]
>> 
>> \newcount\clozecount
>> \def\mycloze{%
>>   \global \advance \clozecount by 1
>>   \definefield[uniqcloze\the\clozecount][line]%
>>   \field[uniqcloze\the\clozecount]%
>> }
>> 
>> \starttext
>> 
>> Frogs have four \mycloze\ and two eyes.
>> Frogs have four \mycloze\ and two eyes.
>> Frogs have four \mycloze\ and two eyes.
>> Frogs have four \mycloze\ and two eyes.
>> 
>> \stoptext
>> 
>> From 
>> 
>> https://tex.stackexchange.com/questions/560042/how-to-create-unique-clozes-in-context-in-a-pdf-that-users-can-type-in
>>  
>> 
>> 
>>> 24 maj 2022 kl. 07:44 skrev Jan-Erik Hägglöf >> >:
>>> 
>>> Thank you, unfortunately it has no effect. Even if I make a macro, still it 
>>> is the same field.
>>> 
 23 maj 2022 kl. 21:59 skrev Pablo Rodriguez via ntg-context 
 mailto:ntg-context@ntg.nl>>:
 
 On 5/23/22 13:11, Jan-Erik Hägglöf via ntg-context wrote:
> HI!
> 
> Tried to make a checklist in an interactive document.
> 
> The problem seems to be that all checks/uncecks in same click, not each
> individually.
> 
> Is there something wrong with my code?
 
 Hi Jan-Erik,
 
 you basically put the same field twice.
 
 Add something like:
 
 \definefield [check-you] [check] [setup 3] [yes,no] [no]
 
 \define\chka{\field[check-you]}
 
 \chka
 
 Checks will be different then.
 
 I hope it helps,
 
 Pablo
 ___
 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] Problems with column sets?

2022-05-24 Thread T. Kurt Bond via ntg-context
Sigh.  I should have mentioned that that I reinstalled LMTX from scratch on
both machines, and that my mac is running macOS Monterey 12.3.1.

On Tue, May 24, 2022 at 3:40 PM T. Kurt Bond  wrote:

> Huh.  I tried it on a Linux box, and that worked.  But on my main machine,
> a Intel 64 bit mac, I get the original result.  Oh, I changed to use this
> input:
>
> \definecolumnset[TwoColumns][n=2]
> \startcolumnset [TwoColumns]
>   \input knuth
> \stopcolumnset
>
>
> On Tue, May 24, 2022 at 3:09 PM Henning Hraban Ramm via ntg-context <
> ntg-context@ntg.nl> wrote:
>
>> Am 24.05.22 um 20:43 schrieb T. Kurt Bond via ntg-context:
>> > Given the following file that uses definecolumnset and
>> > startcolumnset/stopcolumnset (largely from the wiki
>> > ) for input:
>> >
>> >
>>  
>> 
>> > \setuppapersize[letter]
>> > \definecolumnset[TwoColumns][n=2]
>> > \startcolumnset [TwoColumns]
>> >\title{Test page}
>> >\framed
>> >  [frame=off,
>> >   bottomframe=on,
>> >   width=\textwidth,
>> >   frameoffset=1mm,
>> >   foregroundstyle=small,
>> >  ]{\copyright\ \date[][year] Donald E. Knuth}
>> >\input knuth
>> > \stopcolumnset
>> >
>>  
>> 
>>
>> That’s not a minimal example, but it works for me (even if the text
>> starts only on the second page):
>>
>> \definecolumnset[TwoColumns][n=2]
>>
>> \starttext
>> \startcolumnset [TwoColumns]
>>\title{Test page}
>>\framed
>>  [frame=off,
>>   bottomframe=on,
>>   width=\textwidth,
>>   frameoffset=1mm,
>>   foregroundstyle=small,
>>  ]{\copyright\ \date[][year] Donald E. Knuth}
>>\samplefile{knuth}
>> \stopcolumnset
>> \stoptext
>>
>> Hraban
>>
>> ___
>> 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
>>
>> ___
>>
>
>
> --
> T. Kurt Bond, tkurtb...@gmail.com, https://tkurtbond.github.io
>


-- 
T. Kurt Bond, tkurtb...@gmail.com, https://tkurtbond.github.io
___
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] Problems with column sets?

2022-05-24 Thread T. Kurt Bond via ntg-context
Huh.  I tried it on a Linux box, and that worked.  But on my main machine,
a Intel 64 bit mac, I get the original result.  Oh, I changed to use this
input:

\definecolumnset[TwoColumns][n=2]
\startcolumnset [TwoColumns]
  \input knuth
\stopcolumnset


On Tue, May 24, 2022 at 3:09 PM Henning Hraban Ramm via ntg-context <
ntg-context@ntg.nl> wrote:

> Am 24.05.22 um 20:43 schrieb T. Kurt Bond via ntg-context:
> > Given the following file that uses definecolumnset and
> > startcolumnset/stopcolumnset (largely from the wiki
> > ) for input:
> >
> >
>  
> 
> > \setuppapersize[letter]
> > \definecolumnset[TwoColumns][n=2]
> > \startcolumnset [TwoColumns]
> >\title{Test page}
> >\framed
> >  [frame=off,
> >   bottomframe=on,
> >   width=\textwidth,
> >   frameoffset=1mm,
> >   foregroundstyle=small,
> >  ]{\copyright\ \date[][year] Donald E. Knuth}
> >\input knuth
> > \stopcolumnset
> >
>  
> 
>
> That’s not a minimal example, but it works for me (even if the text
> starts only on the second page):
>
> \definecolumnset[TwoColumns][n=2]
>
> \starttext
> \startcolumnset [TwoColumns]
>\title{Test page}
>\framed
>  [frame=off,
>   bottomframe=on,
>   width=\textwidth,
>   frameoffset=1mm,
>   foregroundstyle=small,
>  ]{\copyright\ \date[][year] Donald E. Knuth}
>\samplefile{knuth}
> \stopcolumnset
> \stoptext
>
> Hraban
>
> ___
> 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
>
> ___
>


-- 
T. Kurt Bond, tkurtb...@gmail.com, https://tkurtbond.github.io
___
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] Problems with column sets?

2022-05-24 Thread Henning Hraban Ramm via ntg-context

Am 24.05.22 um 20:43 schrieb T. Kurt Bond via ntg-context:
Given the following file that uses definecolumnset and 
startcolumnset/stopcolumnset (largely from the wiki 
) for input:




\setuppapersize[letter]
\definecolumnset[TwoColumns][n=2]
\startcolumnset [TwoColumns]
   \title{Test page}
   \framed
     [frame=off,
      bottomframe=on,
      width=\textwidth,
      frameoffset=1mm,
      foregroundstyle=small,
     ]{\copyright\ \date[][year] Donald E. Knuth}
   \input knuth
\stopcolumnset




That’s not a minimal example, but it works for me (even if the text 
starts only on the second page):


\definecolumnset[TwoColumns][n=2]

\starttext
\startcolumnset [TwoColumns]
  \title{Test page}
  \framed
[frame=off,
 bottomframe=on,
 width=\textwidth,
 frameoffset=1mm,
 foregroundstyle=small,
]{\copyright\ \date[][year] Donald E. Knuth}
  \samplefile{knuth}
\stopcolumnset
\stoptext

Hraban
___
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] Problems with column sets?

2022-05-24 Thread T. Kurt Bond via ntg-context
Given the following file that uses definecolumnset and
startcolumnset/stopcolumnset (largely from the wiki
) for input:


\setuppapersize[letter]
\definecolumnset[TwoColumns][n=2]
\startcolumnset [TwoColumns]
  \title{Test page}
  \framed
[frame=off,
 bottomframe=on,
 width=\textwidth,
 frameoffset=1mm,
 foregroundstyle=small,
]{\copyright\ \date[][year] Donald E. Knuth}
  \input knuth
\stopcolumnset


Why does context fail, producing an empty .log and .pdf, with the following
information to the terminal:

resolvers   | formats | executing runner 'run luametatex format':
/usr/local/sw/versions/context-osx-64/tex/texmf-osx-64/bin/luametatex
--jobname="./x.ctx"
--fmt=/usr/local/sw/versions/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
--lua=/usr/local/sw/versions/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
 --c:currentrun=1 --c:fulljobname="./x.ctx" --c:input="./x.ctx"
--c:kindofrun=1 --c:maxnofruns=9
--c:texmfbinpath="/usr/local/sw/versions/context-osx-64/tex/texmf-osx-64/bin"
system  >
system  > ConTeXt  ver: 2022.05.11 11:36 LMTX  fmt: 2022.5.24  int:
english/english
system  >
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name
'/usr/local/sw/versions/context-osx-64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 1, order 1, name
'/usr/local/sw/versions/context-osx-64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname './x', input './x.ctx', result './x'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 1, order 2, name './x.ctx'
mtx-context | fatal error: return code: 1

-- 
T. Kurt Bond, tkurtb...@gmail.com, https://tkurtbond.github.io
___
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] Issue with interactive checkboxes[solved]

2022-05-24 Thread Henning Hraban Ramm via ntg-context

Am 24.05.22 um 18:43 schrieb Pablo Rodriguez via ntg-context:

But what I experienced in Acrobat Reader DC (on a borrowed computer) is
that you get the standard image (only when field is enabled) when you
click elsewhere in the document.

I guess that this may be related to a missing implementation, but first
I would like to confirm you are experiencing the same.


Custom checkboxes and radiobuttons used to work many years ago, but 
they’re broken for years – Hans blames Adobe for that.


Your example works well in Apple Preview, Acrobat Pro 9 (2010), Skim, 
TeXshop, Safari, File Viewer. All of these use Apple’s PDF library, 
except the old Acrobat.


Foxit Reader, Master PDF Editor, Opera, Firefox never show the custom 
icons but the default checkmark (Firefox a cross).

PDF Studio 2019 doesn’t even that but shows a "4".
PDF.js in Atom doesn’t support forms (but show the red icon).

(I tested on MacOS 10.14.)

Hraban
___
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] Issue with interactive checkboxes[solved]

2022-05-24 Thread Pablo Rodriguez via ntg-context
On 5/24/22 10:18, Jan-Erik Hägglöf via ntg-context wrote:
> HI Again!
>
> I discovered what went wrong, such a silly syntax error, here comes a
> working code:

Hi Jan-Erik,

this will also make it:

  \setupinteraction[state=start]
  \definesymbol [yes] [{\externalfigure[on.svg][conversion=mp]}]
  \definesymbol [no] [{\externalfigure[off.svg][conversion=mp]}]

  \setupfield[setup3][width=2ex, height=2ex]

  \dorecurse{3}
  {\definefield [check-\recurselevel] [check] [setup3] [yes,no] [no]}

  \setupbodyfont[sans, 30pt]

  \starttext
  \startTEXpage[offset=1em, foregroundstyle=\ssbf]

  \dorecurse{3}
{\field[check-\recurselevel]\
  option \recurselevel\blank[1ex]}
  \stopTEXpage
  \stoptext

But what I experienced in Acrobat Reader DC (on a borrowed computer) is
that you get the standard image (only when field is enabled) when you
click elsewhere in the document.

I guess that this may be related to a missing implementation, but first
I would like to confirm you are experiencing the same.

Best,

Pablo
___
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] How to add margin around standalone MetaPost?

2022-05-24 Thread Vincent Hennebert via ntg-context
On Sat, 2022-05-21 at 07:39 +0530, śrīrāma wrote:
> On 5/20/22 10:26 PM Vincent Hennebert via ntg-context wrote:
> > Take the following MetaPost file:
> > 
> > beginfig(0)
> >   ahlength := 20;
> >   linejoin := mitered;
> >   drawarrow origin--(40,0) withpen pencircle scaled 5;
> > endfig;
> > 
> > Render it into PDF with ConTeXt. Witness the cut out ends of the
> > arrow.
> > How to fix that?
> > 
> > Being able to add some margin would be a solution, which may be
> > desirable anyway in some cases. Is that possible?
> 
> Enlarge the bounds of your picture – 
> 
>   beginfig(0);
>     ahlength := 20;
>     linejoin := mitered;
>     drawarrow origin--(40,0) withpen pencircle scaled 5;
> 
>     setbounds currentpicture to boundingbox currentpicture enlarged
> 5mm;
>   endfig;

Exactly what I was looking for. Thanks!

(I did find out about \startMPpage[offset=3pt], but that requires me to
include my MetaPost file into an additional, somewhat superfluous TeX
file. And for better editor support I prefer to edit the MetaPost in a
.mp file, rather than embedded in a .tex.)


Vincent
___
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] XML Namespaces and XML Setups

2022-05-24 Thread Bruce Horrocks via ntg-context
I haven't seen it explicitly documented - my cue to add it to the Wiki I guess!

I work with XML a fair bit and, IMHO, the WWW consortium docs do a very poor 
job of explaining namespaces because they make them seem much more complicated 
than they are. Essentially, a tag with a namespace identifier is just another 
tag i.e. treat all the characters, including the colon, as the tag name. Armed 
with that knowledge I just created a second tag definition in the sample code 
you posted.

> On 24 May 2022, at 09:50, Duncan Hothersall  wrote:
> 
> Yes, it does! Thanks Bruce. Is this documented somewhere already and I missed 
> it?
> 
> Cheers.
> 
> Duncan
> 
> On Mon, 23 May 2022 at 21:14, Bruce Horrocks  wrote:
> Does this help?
> 
> \startxmlsetups xml:demo:base
>   \xmlsetsetup{#1}{tag}{xml:demo:tag}
>   \xmlsetsetup{#1}{o:tag}{xml:demo:otag} %% <---
> \stopxmlsetups
> \xmlregisterdocumentsetup{demo}{xml:demo:base}
> \startxmlsetups xml:demo:tag
>   \xmlflush{#1}
> \stopxmlsetups
> \startxmlsetups xml:demo:otag   %% <---
>   {\bf \xmlflush{#1}}
> \stopxmlsetups
> \starttext
> \startbuffer[test]
> 
>xmlns:o="NameSpaceO">
>   text text
> 
> \stopbuffer
> \xmlprocessbuffer{demo}{test}{}
> \stoptext
> 
> > On 23 May 2022, at 09:07, Duncan Hothersall via ntg-context 
> >  wrote:
> > 
> > I found this unanswered question on the list from November 2020 and find 
> > today that I have the same question. How can one handle elements with the 
> > same name but in different namespaces? How should the different 
> > \startxmlsetups commands be written?
> > 
> > Thanks.
> > 
> > Duncan
> > 
> > On Mon, 16 Nov 2020 at 13:37, Christoph Reller  
> > wrote:
> > Dear List,
> > 
> > Consider the following MWE:
> > 
> > \startxmlsetups xml:demo:base
> >   \xmlsetsetup{#1}{tag}{xml:demo:tag}
> > \stopxmlsetups
> > \xmlregisterdocumentsetup{demo}{xml:demo:base}
> > \startxmlsetups xml:demo:tag
> >   %\doif{\xmlnamespace{#1}}{o}{NameSpaceO:}
> >   \xmlflush{#1}
> > \stopxmlsetups
> > \starttext
> > \startbuffer[test]
> > 
> >  >   xmlns:o="NameSpaceO">
> >   text text
> > 
> > \stopbuffer
> > \xmlprocessbuffer{demo}{test}{}
> > \stoptext
> > 
> > My questions:
> > - Is there a good way to have a separate XML setup for each XML namespace?
> > - Alternatively, one has to do the distinction within the same XML setup. 
> > In this case, how do we get the complete namespace? (In this example: 
> > "NameSpaceA" and "NameSpaceO")
> > 
> > Thanks in advance for your help!
> > 
> > Cheers, Christoph

—
Bruce Horrocks
Hampshire, UK

___
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] XML Namespaces and XML Setups

2022-05-24 Thread Duncan Hothersall via ntg-context
Yes, it does! Thanks Bruce. Is this documented somewhere already and I
missed it?

Cheers.

Duncan

On Mon, 23 May 2022 at 21:14, Bruce Horrocks  wrote:

> Does this help?
>
> \startxmlsetups xml:demo:base
>   \xmlsetsetup{#1}{tag}{xml:demo:tag}
>   \xmlsetsetup{#1}{o:tag}{xml:demo:otag} %% <---
> \stopxmlsetups
> \xmlregisterdocumentsetup{demo}{xml:demo:base}
> \startxmlsetups xml:demo:tag
>   \xmlflush{#1}
> \stopxmlsetups
> \startxmlsetups xml:demo:otag   %% <---
>   {\bf \xmlflush{#1}}
> \stopxmlsetups
> \starttext
> \startbuffer[test]
> 
>xmlns:o="NameSpaceO">
>   text text
> 
> \stopbuffer
> \xmlprocessbuffer{demo}{test}{}
> \stoptext
>
> > On 23 May 2022, at 09:07, Duncan Hothersall via ntg-context <
> ntg-context@ntg.nl> wrote:
> >
> > I found this unanswered question on the list from November 2020 and find
> today that I have the same question. How can one handle elements with the
> same name but in different namespaces? How should the different
> \startxmlsetups commands be written?
> >
> > Thanks.
> >
> > Duncan
> >
> > On Mon, 16 Nov 2020 at 13:37, Christoph Reller <
> christoph.rel...@gmail.com> wrote:
> > Dear List,
> >
> > Consider the following MWE:
> >
> > \startxmlsetups xml:demo:base
> >   \xmlsetsetup{#1}{tag}{xml:demo:tag}
> > \stopxmlsetups
> > \xmlregisterdocumentsetup{demo}{xml:demo:base}
> > \startxmlsetups xml:demo:tag
> >   %\doif{\xmlnamespace{#1}}{o}{NameSpaceO:}
> >   \xmlflush{#1}
> > \stopxmlsetups
> > \starttext
> > \startbuffer[test]
> > 
> >  >   xmlns:o="NameSpaceO">
> >   text text
> > 
> > \stopbuffer
> > \xmlprocessbuffer{demo}{test}{}
> > \stoptext
> >
> > My questions:
> > - Is there a good way to have a separate XML setup for each XML
> namespace?
> > - Alternatively, one has to do the distinction within the same XML
> setup. In this case, how do we get the complete namespace? (In this
> example: "NameSpaceA" and "NameSpaceO")
> >
> > Thanks in advance for your help!
> >
> > Cheers, Christoph
> >
> ___
> > 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
> >
> ___
>
> —
> Bruce Horrocks
> Hampshire, UK
>
>
___
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] Issue with interactive checkboxes[solved]

2022-05-24 Thread Jan-Erik Hägglöf via ntg-context
HI Again!

I discovered what went wrong, such a silly syntax error, here comes a working 
code:

\setupinteraction[state=start]

\definesymbol[yes][{\externalfigure[check-mark-svgrepo-com.svg][conversion=mp]}]
\definesymbol[no][]

\newcount\chk
\def\checkmark{%
\global\advance\chk by 1
\setupfield[setup1][width=0.5cm, height=0.5cm,rulethickness=1pt, corner=round, 
framecolor=red]%
\definefield[checkme\the\chk][check][setup1][yes,no][no]%
\field[checkme\the\chk]%
}

\starttext

\checkmark\

\checkmark\

\checkmark\

\stoptext

Sorry to bother the list but maybe it is helpful for someone.

Regards

/Jan-Erik

> 24 maj 2022 kl. 08:08 skrev Jan-Erik Hägglöf :
> 
> I’ve tried this
> 
> \setupinteraction[state=start]
> 
> \definesymbol[yes][{\externalfigure[check-mark-svgrepo-com.svg][conversion=mp]}]
> \definesymbol[no][]
> 
> \newcount\chk
> \def\chk{%
> \global \advance \chk by 1
> \setupfield[setup1][width=0.5cm, height=0.5cm,rulethickness=1pt, 
> corner=round, framecolor=red]%
> \definefield[checkme\the\chk][check][setup1][yes,no][no]%
> \field[checkme\the\chk]%
> }
> 
> \starttext
> 
> \chk
> 
> \chk
> 
> \chk
> 
> \stoptext
> 
> But it gives the error ” You can’t use \global after \advance”
> 
> But this example works fine
> 
> \setupinteraction[state=start]
> 
> \newcount\clozecount
> \def\mycloze{%
>   \global \advance \clozecount by 1
>   \definefield[uniqcloze\the\clozecount][line]%
>   \field[uniqcloze\the\clozecount]%
> }
> 
> \starttext
> 
> Frogs have four \mycloze\ and two eyes.
> Frogs have four \mycloze\ and two eyes.
> Frogs have four \mycloze\ and two eyes.
> Frogs have four \mycloze\ and two eyes.
> 
> \stoptext
> 
> From 
> 
> https://tex.stackexchange.com/questions/560042/how-to-create-unique-clozes-in-context-in-a-pdf-that-users-can-type-in
>  
> 
> 
>> 24 maj 2022 kl. 07:44 skrev Jan-Erik Hägglöf > >:
>> 
>> Thank you, unfortunately it has no effect. Even if I make a macro, still it 
>> is the same field.
>> 
>>> 23 maj 2022 kl. 21:59 skrev Pablo Rodriguez via ntg-context 
>>> mailto:ntg-context@ntg.nl>>:
>>> 
>>> On 5/23/22 13:11, Jan-Erik Hägglöf via ntg-context wrote:
 HI!
 
 Tried to make a checklist in an interactive document.
 
 The problem seems to be that all checks/uncecks in same click, not each
 individually.
 
 Is there something wrong with my code?
>>> 
>>> Hi Jan-Erik,
>>> 
>>> you basically put the same field twice.
>>> 
>>> Add something like:
>>> 
>>> \definefield [check-you] [check] [setup 3] [yes,no] [no]
>>> 
>>> \define\chka{\field[check-you]}
>>> 
>>> \chka
>>> 
>>> Checks will be different then.
>>> 
>>> I hope it helps,
>>> 
>>> Pablo
>>> ___
>>> 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] font question re U+00336

2022-05-24 Thread Henning Hraban Ramm via ntg-context

Hi Julian,

Am 24.05.22 um 02:30 schrieb jbf via ntg-context:

I wonder if someone can help me interpret this message in the log file

fonts   > start missing characters: 
/home/jbf/bin/context/tex/texmf/fonts/opentype/public/tex-gyre/texgyrepagella-regular.otf 


fonts   >   88  U+00336  ̶  COMBINING LONG STROKE OVERLAY
fonts   > stop missing characters

My questions are as follows:

1. What does 88 mean here? 88 instances of this missing glyph? Page 88? 
Or something else? or in other words, how might I discover where 
something is missing from the original text?


Don’t know. In a different context (haha) I’d say a nazi greeting.

2. Tex Gyre Pagella is normally a pretty handy typeface to use for me 
because it has pretty much all the glyphs I normally need... except this 
one obviously! Isn't it really just an en rule (or very similar to 
such)? Or in other words, how do I best overcome the problem of this 
missing character?


"combining" means a combining accent.

In case you’re on MacOS and copied the text from e.g. a PDF, MacOS 
decomposes many (all?) accented vowels, like u + combining trema instead 
of a proper ü umlaut glyph, and that can cause missing or displaced 
accents, depending on the font.


Similar with additional space “glyphs” that are often missing in fonts 
and cause warnings like this.


Are you missing any characters where this long stroke should appear?

3. And perhaps connected with the above question: is there good fallback 
solution one can use? Do I need to \definefontfallback something or is 
there an automatic one already happening?


I've started to examine the log files a bit more carefully for various 
items and it is showing up my ignorance!!


I wouldn’t call that ignorance – you can ignore a lot of warnings if the 
output looks good enough.


Hraban
___
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] Issue with interactive checkboxes

2022-05-24 Thread Jan-Erik Hägglöf via ntg-context
I’ve tried this

\setupinteraction[state=start]

\definesymbol[yes][{\externalfigure[check-mark-svgrepo-com.svg][conversion=mp]}]
\definesymbol[no][]

\newcount\chk
\def\chk{%
\global \advance \chk by 1
\setupfield[setup1][width=0.5cm, height=0.5cm,rulethickness=1pt, corner=round, 
framecolor=red]%
\definefield[checkme\the\chk][check][setup1][yes,no][no]%
\field[checkme\the\chk]%
}

\starttext

\chk

\chk

\chk

\stoptext

But it gives the error ” You can’t use \global after \advance”

But this example works fine

\setupinteraction[state=start]

\newcount\clozecount
\def\mycloze{%
  \global \advance \clozecount by 1
  \definefield[uniqcloze\the\clozecount][line]%
  \field[uniqcloze\the\clozecount]%
}

\starttext

Frogs have four \mycloze\ and two eyes.
Frogs have four \mycloze\ and two eyes.
Frogs have four \mycloze\ and two eyes.
Frogs have four \mycloze\ and two eyes.

\stoptext

From 

https://tex.stackexchange.com/questions/560042/how-to-create-unique-clozes-in-context-in-a-pdf-that-users-can-type-in

> 24 maj 2022 kl. 07:44 skrev Jan-Erik Hägglöf :
> 
> Thank you, unfortunately it has no effect. Even if I make a macro, still it 
> is the same field.
> 
>> 23 maj 2022 kl. 21:59 skrev Pablo Rodriguez via ntg-context 
>> :
>> 
>> On 5/23/22 13:11, Jan-Erik Hägglöf via ntg-context wrote:
>>> HI!
>>> 
>>> Tried to make a checklist in an interactive document.
>>> 
>>> The problem seems to be that all checks/uncecks in same click, not each
>>> individually.
>>> 
>>> Is there something wrong with my code?
>> 
>> Hi Jan-Erik,
>> 
>> you basically put the same field twice.
>> 
>> Add something like:
>> 
>> \definefield [check-you] [check] [setup 3] [yes,no] [no]
>> 
>> \define\chka{\field[check-you]}
>> 
>> \chka
>> 
>> Checks will be different then.
>> 
>> I hope it helps,
>> 
>> Pablo
>> ___
>> 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
___