[NTG-context] prefixstarter in captions

2021-08-28 Thread Adam Reviczky via ntg-context
Hi,

There was a question on the list before on prepending to the numberpart of
a caption with the 'numberstarter' command, which works just fine (
https://mailman.ntg.nl/pipermail/ntg-context/2017/089142.html).

I wanted to try the same but for prepending to the entire prefix (not just
the number part) when prefixsegments are used, however using
'prefixstarter' does not seem to make a difference.

For the sake of the example I have added the numberstarter in as well, just
for comparison.

Caption with the example reads "Figure 1.S.1" whereas I was expecting
"Figure C.1.S.1".

MWE:

\setupfloatcaption[figure][number=yes,way=bytext,prefix=yes,prefixstarter={C.},numberstarter={S.}]
\starttext
\startchapter[title={Cow}]
\startplacefigure[title={Custom caption}]
\externalfigure[cow]
\stopplacefigure
\stopchapter
\stoptext

Not sure whether prefixstarter is the intended command to use, but the wiki
of setupcation (https://wiki.contextgarden.net/Command/setupcaption) says
it inherits from setupcounter which has both numberstarter and
prefixstarter defined in the same way.

Adam
___
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] MKIV ansi/ansilog

2021-08-25 Thread Adam Reviczky via ntg-context
Hi,

I have been using the ansi and ansilog flags in the past and they work fine
with lmtx, but do not seem to make a difference with luatex/mkiv. (There
was a thread back in 2019:
https://mailman.ntg.nl/pipermail/ntg-context/2019/095666.html)

I am trying just a simple hello world:

\starttext
Hello World!
\stoptext

>From the latest lmtx install (2021.08.24 22:16) on an ubuntu 64bit live
system:

These give the desired color output for lmtx
context --ansi test.tex
context --ansilog test.tex

But with luatex, these make no difference in the stdout (no ansi colors)
context --luatex --ansi test.tex
context --luatex --ansilog test.tex

Adam
___
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] TOC labeltext and no partlabel

2021-08-25 Thread Adam Reviczky via ntg-context
Thank you very much Wolfgang for the explanation,

Both solutions make sense now and work great.

Regards,
Adam

On Wed, Aug 25, 2021 at 11:46 AM Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Adam Reviczky via ntg-context schrieb am 25.08.2021 um 02:02:
> > Hi,
> >
> > I have asked this question before, but now I cannot get it working again.
> >
> https://ntg-context.ntg.narkive.com/lvvdNOQz/the-appendices-envrionment-and-title-in-toc
> >
> > I want to set partlabels in my TOC but not in the document itself.
> >
> > The desired output would be:
> > ---
> > Contents
> > Chapter 1 Bodypart
> > Appendix A Appendix
> >
> > 1 Bodypart
> > A Appendix
> > ---
> >
> > [...]
> >
> > But that does not show the labels in the TOC (trying it with LMTX and
> MKIV).
>
> The easy way is to create a new heading for the appendices (e.g.
> \extrachapter) and set the label you want to use in the list.
>
> \setuplist [chapter]  [label=chapter]
> \setuplist [extrachapter] [label=appendix]
>
>
> A complexer solution where you can keep \chapter in the appendices can
> be achieved with a customized number type and the use of the processor
> mechanism to set the labels in the list entries.
>
> \setuplist
>[chapter]
>[width=fit,
> distance=\spaceamount]
>
> \defineconversionset [bodypart:chapternumber] [] [bodypartnumber->n]
> \defineconversionset [appendix:chapternumber] [] [appendixnumber->A]
>
> \setuphead
>[chapter]
>[sectionconversionset=chapternumber]
>
> \startsectionblockenvironment [frontpart]
>
>  \defineprocessor [bodypartnumber] [left=Chapter~]
>  \defineprocessor [appendixnumber] [left=Appendix~]
>
> \stopsectionblockenvironment
>
> \starttext
>
> \startfrontmatter
> \completecontent
> \stopfrontmatter
>
> \startbodymatter
> \chapter{Bodypart}
> \stopbodymatter
>
> \startappendices
> \chapter{Appendix}
> \stopappendices
>
> \stoptext
>
> Wolfgang
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] TOC labeltext and no partlabel

2021-08-24 Thread Adam Reviczky via ntg-context
Hi,

I have asked this question before, but now I cannot get it working again.
https://ntg-context.ntg.narkive.com/lvvdNOQz/the-appendices-envrionment-and-title-in-toc

I want to set partlabels in my TOC but not in the document itself.

The desired output would be:
---
Contents
Chapter 1 Bodypart
Appendix A Appendix

1 Bodypart
A Appendix
---

Based on Wolfgang's example, I am trying this MWE:

\setuplabeltext[en][chapter=Chapter~]
\setuplabeltext[en][appendix=Appendix~]

\setuplist[chapter][label=yes,width=fit,stopper=~]
\setuphead[chapter][bodypartlabel=,appendixlabel=]

\starttext

\startfrontmatter
\completecontent[label=section]
\stopfrontmatter

\startbodymatter
\chapter{Bodypart}
\stopbodymatter

\startappendices
\chapter{Appendix}
\stopappendices

\stoptext

But that does not show the labels in the TOC (trying it with LMTX and MKIV).

I must be doing something wrong.
Any hints?

Thanks,
Adam
___
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] footnote interaction in titles

2021-08-09 Thread Adam Reviczky via ntg-context
Hi,

I probably shouldn't use footnotes within titles, but I am misusing the
title elements for a quick interview style document (I use them in the ToC).

One thing I have noticed is that interaction style (color and styles) are
not applied in the footnote and footnote numbering.
Is that a side effect or intended like that?

A half-workaround is to apply the styles directly, but not sure how I can
force the numbering style (same-page reference).

See MWE:

\setupinteraction[state=start]
\starttext
\startchapter[title={Long question with footnote \footnote{see: \goto{
https://wiki.contextgarden.net}[url(https://wiki.contextgarden.net)]}
and with a workaround \footnote{see: \goto{\bf\startcolor[darkgreen]
https://wiki.contextgarden.net\stopcolor}[url(https://wiki.contextgarden.net
)]}?}]
\input knuth
\footnote{see: \goto{https://wiki.contextgarden.net}[url(
https://wiki.contextgarden.net)]}
\stopchapter
\stoptext

It is not crucial, and if the behaviour is intended as such because of the
title element, that is fine, I am just curious.

Thanks,
Adam
___
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] Trying to make all links in my document blue instead of red or green

2021-06-21 Thread Adam Reviczky
Hi Kurt,

It is because of the spaces after the last line in contrastcolor.

Use any of the following instead:

\setupinteraction
  [state=start,
  color=blue,
  contrastcolor=blue,
  ]


\setupinteraction
  [state=start,
  color=blue,
  contrastcolor=blue%
  ]


\setupinteraction
  [state=start,
  color=blue,
  contrastcolor=blue]


Adam


On Mon, Jun 21, 2021 at 4:10 PM T. Kurt Bond  wrote:

> I'm trying to make all the hyperlinks in my document blue.  Here's my
> example:
>
> \setupinteraction
>   [state=start,
>   color=blue,
>   contrastcolor=blue
>   ]
>
>
> \starttext
> \completecontent
> \section{Section A}
> \subsection{SubSection A.A}
> \pagebreak[yes]
> \section {Section B — on another page}
> \subsection {SubSection B.A — on another page}
> \stoptext
>
> When I format it with ConTeXt (ConTeXt  ver: 2021.06.18 23:37 LMTX  fmt:
> 2021.6.19  int: english/english) links to destinations on the same page
> come out black while links to destinations on another page come out blue,
> as I'd intended.  Here is a screen shot:
> [image: image.png]
> Notice that the Contents lines with Section A and SubSection A.A are
> black?  I'd expected them to be blue.
> --
> 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
>
> ___
>
___
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] PDF forms not creating proper children

2021-06-08 Thread Adam Reviczky
Not sure how good it is, but in the poppler discussion this site was
mentioned to verify the signature details: https://validator.docusign.com/

I have tried using with poppler's pdfsig and Okular.

Adam

On Tue, Jun 8, 2021 at 10:14 PM Leonard Janis Robert König 
wrote:

> On Tue, 2021-06-08 at 17:41 +0200, Pablo Rodriguez wrote:
> > On 6/7/21 10:43 PM, Leonard Janis Robert König wrote:
> > > Hi Adam, Hi Pablo,
> > >
> > > I just noticed your replies, sorry for the late answer!
> > >
> > > I could sign forms with both okular as well as mupdf just fine,
> > > although the behavior is different.  The former assumes that the
> > > field
> > > is already an existing signature and segfaults when you look at the
> > > properties, but cann successfully add another signature using the
> > > "Tools" menu.
> >
>
> Hi Pablo,
>
> > I’m afraid that I don’t use Okular.
> >
> > >  With the latter you can click on the form field to
> > > trigger a menu to select the signature you want to sign with, and
> > > it
> > > "replaces" the "empty" signature generated by ConTeXt.  Both work
> > > fine,
> > > even with my newer ConTeXt.
> >
> > mupdf-gl signs the document, but in a way that only mupdf-gl
> > understands it.
> >
> > Try to open a PDF document signed with mupdf-gl in Acrobat (Reader or
> > not). You will see that the signature is wrong.
>
> Hm, I tested with Okular, Firefox and MasterPDF as I don't have Acrobat
> on Linux, and both understand the signature, which is why I thought
> it'd be correct.
>
> >
> > > > On Sun, May 2, 2021 at 5:50 PM Pablo Rodriguez 
> > > > wrote:
> > > > > [...]
> > > > > From my experience, only Acrobat deals with child objects in
> > > > > signatures
> > > > > generating a valid signature (and rewriting the two objects
> > > > > into a
> > > > > single one).
> > >
> > > As mentioned above, it seems that mupdf (now?) actually rewrites
> > > "both"
> > > signatures into one, however Okular doesn't.
> >
> > Sorry, objects is a very special term in PDF parlance. It has nothing
> > to
> > do with signatures.
> >
> > Just in case it might help,
>
> Ah, I see.  I'm still a bit unsure what to make of the "fields nested
> in TABLEs" issue, but maybe further debugging will show at some point.
>
> ~ Leo
>
>
> ___
> 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] chapter number sought

2021-05-30 Thread Adam Reviczky
Hi Hans,

Does this help:
https://tex.stackexchange.com/questions/134474/context-part-chapter-section-and-subsection-names
?

\starttext
\startchapter[title={First chapter}]
\structurenumber\ - \structuretitle
\stopchapter
\stoptext

Although getmarking is probably what you're really after:
\getmarking[chapternumber] and \getmarking[chapter].

\starttext
\startchapter[title={First chapter}]
\getmarking[chapternumber][current]\ - \getmarking[chapter][current]
\stopchapter
\stoptext

Adam

On Sun, May 30, 2021 at 11:12 AM Hans van der Meer 
wrote:

> With \pagenumber I can call up the current pagenumber and typeset it.
> But \chapternumber is not defined.
> How can I typeset the current chapternumber or even the current
> chapternumber.sectionnumber.subsectionnumber, for example?
>
> dr. Hans van der Meer
>
>
>
> ___
> 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] ctxlua percentage format escape

2021-05-29 Thread Adam Reviczky
Thank you Jairo!

I have tried playing around with letterpercent/catcodes as well, not sure
what I did wrong, but your examples work just fine, so thanks again.

Adam

On Sat, May 29, 2021 at 2:04 PM Jairo A. del Rio 
wrote:

> Hi, Adam. There are some ways to do it. I'm sure there are many more, but
> I don't remember them right now. Hi, Hans. There's a bug (?) in
> syst-lua.lua related to \expression in MkIV (xmath and xcomplex aren't
> defined). Please fix that
>
>
> %Temporary hack for MkIV
>
> %Only use it in case \expression ... \relax doesn't work
>
> \startmkivmode
>
> \startluacode
>
> xmath = xmath or math
>
> xcomplex = xcomplex or {} --maybe math too???
>
> \stopluacode
>
> \stopmkivmode
>
> \starttext
>
> $\pi = \ctxlua{context("\letterpercent.6f", math.pi)}$
>
>
> $\pi = \expression string.format("\letterpercent.6f", pi)\relax$
>
>
> %Changing catcodes so $ and % are letter characters
>
> \startasciimode
>
> \m{\pi = \expression ("%.6f"):format(pi) \relax}
>
>
> \m{\pi = \ctxlua{context("%.6f", math.pi)}}
>
> \stopasciimode
>
> \stoptext
>
> Regards,
>
>
> Jairo
>
> El sáb, 29 de may. de 2021 a la(s) 07:32, Adam Reviczky (
> revic...@gmail.com) escribió:
>
>> Hi,
>>
>> I was trying to use a quick calculation like the new mathfun in lmtx for
>> an older mkiv document.
>>
>> MWE from the wiki:
>> https://wiki.contextgarden.net/Programming_in_LuaTeX#Examples
>>
>> \starttext
>> $\pi = \ctxlua{context("\%.6f", math.pi)}$
>> \stoptext
>>
>> But that gives an error (actually for both lmtx and mkiv): token call,
>> syntax: [ctxlua]:1: invalid escape sequence near '"\%'
>>
>> Whereas
>>
>> \starttext
>> $\pi = \startluacode context("%.6f", math.pi) \stopluacode$
>> \stoptext
>>
>> Works fine as expected.
>>
>> Is there a way to escape the percentage sign in ctxlua as a format value?
>>
>> Adam
>>
>> ___
>> 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
___


[NTG-context] ctxlua percentage format escape

2021-05-29 Thread Adam Reviczky
Hi,

I was trying to use a quick calculation like the new mathfun in lmtx for an
older mkiv document.

MWE from the wiki:
https://wiki.contextgarden.net/Programming_in_LuaTeX#Examples

\starttext
$\pi = \ctxlua{context("\%.6f", math.pi)}$
\stoptext

But that gives an error (actually for both lmtx and mkiv): token call,
syntax: [ctxlua]:1: invalid escape sequence near '"\%'

Whereas

\starttext
$\pi = \startluacode context("%.6f", math.pi) \stopluacode$
\stoptext

Works fine as expected.

Is there a way to escape the percentage sign in ctxlua as a format value?

Adam
___
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] xtable in def or setups

2021-05-18 Thread Adam Reviczky
Hi Werner,

Did you try startembeddedxtable ?

See Section 5 in the manual (
https://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf).

Adam

On Tue, May 18, 2021 at 6:38 PM Werner Hennrich  wrote:

> Hello everyone,
>
> I'm trying to create an xtable from within a \def (or within a \setups)
> but always run into "runaway error: end of file encountered"
> whenever the xtable-commands are in there.
>
> \definextable[icbtable]
> \setupxtable[icbtable]
> [frame=off,
> top=\vskip7mm]
> \long\def\iconblock[#1]#2{%
> \ignorespaces
> \startxtable[icbtable]
> \startxrow
> \startxcell[width=17mm]
> \externalfigure[img/#1.svg][height=15mm,width=15mm]
> \stopxcell
> \startxcell #2 \stopxcell
> \stopxrow
> \stopxtable
> \removeunwantedspaces
> }
>
> Is this simply not possible or am I doing something wrong there?
>
> system  > ConTeXt  ver: 2021.05.15 22:45 LMTX  fmt: 2021.5.18
> int: english/english
>
> Thank you,
> Werner
>
> ___
> 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] NotoColorEmoji - loca table not found

2021-05-14 Thread Adam Reviczky
Hi Hans,

Yes, sorry about the error :).

Thanks for the explanation, will use lmtx for that, though probably best
just using another font (some mentioned on the list
https://www.mail-archive.com/ntg-context@ntg.nl/msg92800.html and
https://mailman.ntg.nl/pipermail/ntg-context/2020/098136.html) or svg or
metapost as I do not need it in colour.

I thought it would be easier via fonts but backtracking on the idea now and
maybe using something like this instead:
https://thenounproject.com/term/handshake/153516/.

Thank you,
Adam

On Fri, May 14, 2021 at 4:33 PM Hans Hagen  wrote:

> On 5/14/2021 3:21 AM, Jairo A. del Rio wrote:
> >
> >
> > El jue, 13 de may. de 2021 a la(s) 19:52, Adam Reviczky
> > (revic...@gmail.com <mailto:revic...@gmail.com>) escribió:
> >
> > Thanks Jairo,
> >
> > That indeed works, should've read that it is bitmap only.
> >
> > I do get a white background though (MKIV), is that how the bitmap is
> > stored?
> >
> >
> > In LuaLaTeX with Harfbuzz shaper as well as ConTeXt LMTX, transparency
> > is properly handled, so I suppose ConTeXt MkIV is to blame in this case.
> > In case you understand how does ConTeXt handle with bitmap fonts,
> > relevant files are under
> >
> /home/coragyps/lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/
> >
> > \definefontfeature[Emoji][default][sbix=yes]
> >
> > \starttext
> >
> >
>  
> \framed[background=color,background=black]{\definedfont[file:NotoColorEmoji.ttf*Emoji]\char"1F91D}
>
> took me quite a while to realize that there is an error in that line
>
> > \stoptext
> >
> >
> > In Hans' example for applecoloremoji there is no white background
> > (page 5, bachotex-2017-emoji.pdf).
> >
> > I also do not get a white background with LibreOfiice.
> >
> >
> >
> > I'd wait for Hans to fix it, as I don't really understand font
> > management in ConTeXt...
> in lmtx we use a different method
>
> in mkiv we can actually switch to a variant that was on hold till
> texlive release (i.e. luatex 1.13, i forgot about that)
>
> even then, because we cache the problem in mkiv is more with the
> conversion tools that drop masks ..
>
> 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
___


Re: [NTG-context] NotoColorEmoji - loca table not found

2021-05-13 Thread Adam Reviczky
Thanks Jairo,

That indeed works, should've read that it is bitmap only.

I do get a white background though (MKIV), is that how the bitmap is stored?

\definefontfeature[Emoji][default][sbix=yes]

\starttext

\framed[background=color,background=black]{\definedfont[file:NotoColorEmoji.ttf*Emoji]\char"1F91D}

\stoptext


In Hans' example for applecoloremoji there is no white background (page 5,
bachotex-2017-emoji.pdf).

I also do not get a white background with LibreOfiice.


Adam

On Fri, May 14, 2021 at 12:51 AM Jairo A. del Rio 
wrote:

> In ConTeXt LMTX this works just fine (try mtxrun --generate and context
> --make first):
>
> \definefontfeature[Emoji][default][sbix=yes]
>
> \starttext
>
> \definedfont[file:NotoColorEmoji.ttf*Emoji]\char"1F91D
>
> \stoptext
>
> However, when one tries to convert it with ImageMagick the following
> happens:
>
> Error reading a content stream. The page may be incomplete.
>Output may be incorrect.
> Error: Ignoring spurious ET operator.
>Output may be incorrect.
> Error: File did not complete the page properly and may be damaged.
>Output may be incorrect.
>
>
> Only SVG fonts don't trigger this error in LMTX.
>
>
> I confirm ConTeXt MkIV is having issues with emoji fonts. It seems that
> GraphicsMagick is not properly generating images as it complains about an
> improper header.
>
> Jairo
>
> El jue, 13 de may. de 2021 a la(s) 18:26, Adam Reviczky (
> revic...@gmail.com) escribió:
>
>> Hi,
>>
>> I am trying to use the 'handshake' character (
>> https://www.fileformat.info/info/unicode/char/1f91d/fontsupport.htm)
>> from the Noto Color Emoji font (
>> https://github.com/googlefonts/noto-emoji/blob/main/fonts/NotoColorEmoji.ttf
>> ).
>>
>> The following MWE gives an error:
>>
>> \starttext
>>
>> \definedfont[file:NotoColorEmoji.ttf] \char"1F91D
>>
>> \stoptext
>>
>> fonts   > otf loading > loading 'NotoColorEmoji.ttf', hash
>> 'notocoloremoji'
>> system  > lua > compiling
>> '/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/png/notocoloremoji.tma'
>> into
>> '/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/png/notocoloremoji.tmc'
>> system  > lua > dumping
>> '/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/png/notocoloremoji.tma'
>> into
>> '/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/png/notocoloremoji.tmc'
>> stripped
>> fonts   > otf loading > loading done
>> fonts   > otf loading > saving 'NotoColorEmoji.ttf' in cache
>> system  > lua > compiling
>> '/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/otl/notocoloremoji.tma'
>> into
>> '/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/otl/notocoloremoji.tmc'
>> system  > lua > dumping
>> '/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/otl/notocoloremoji.tma'
>> into
>> '/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/otl/notocoloremoji.tmc'
>> stripped
>> fonts   > otf loading > loading, optimizing, packing and caching
>> time 2.557
>> pages   > flushing realpage 1, userpage 1, subpage 1
>> close source> level 2, order 3, name '/tmp/MWE.tex'
>> close source> level 1, order 3, name
>> '/usr/share/texmf/tex/context/base/mkiv/cont-yes.mkiv'
>> ! error:  (file NotoColorEmoji.ttf) (ttf): loca table not
>> foundmtx-context | fatal error: return code: 256
>>
>> Any idea what is wrong?
>>
>> Adam
>>
>>
>> ___
>> 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 intere

[NTG-context] NotoColorEmoji - loca table not found

2021-05-13 Thread Adam Reviczky
Hi,

I am trying to use the 'handshake' character (
https://www.fileformat.info/info/unicode/char/1f91d/fontsupport.htm) from
the Noto Color Emoji font (
https://github.com/googlefonts/noto-emoji/blob/main/fonts/NotoColorEmoji.ttf
).

The following MWE gives an error:

\starttext

\definedfont[file:NotoColorEmoji.ttf] \char"1F91D

\stoptext

fonts   > otf loading > loading 'NotoColorEmoji.ttf', hash
'notocoloremoji'
system  > lua > compiling
'/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/png/notocoloremoji.tma'
into
'/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/png/notocoloremoji.tmc'
system  > lua > dumping
'/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/png/notocoloremoji.tma'
into
'/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/png/notocoloremoji.tmc'
stripped
fonts   > otf loading > loading done
fonts   > otf loading > saving 'NotoColorEmoji.ttf' in cache
system  > lua > compiling
'/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/otl/notocoloremoji.tma'
into
'/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/otl/notocoloremoji.tmc'
system  > lua > dumping
'/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/otl/notocoloremoji.tma'
into
'/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/otl/notocoloremoji.tmc'
stripped
fonts   > otf loading > loading, optimizing, packing and caching
time 2.557
pages   > flushing realpage 1, userpage 1, subpage 1
close source> level 2, order 3, name '/tmp/MWE.tex'
close source> level 1, order 3, name
'/usr/share/texmf/tex/context/base/mkiv/cont-yes.mkiv'
! error:  (file NotoColorEmoji.ttf) (ttf): loca table not foundmtx-context
| fatal error: return code: 256

Any idea what is wrong?

Adam
___
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] simpleslides gives 'input stack overflow'

2021-05-09 Thread Adam Reviczky
Hi,

Looks like it is a problem with "StartPage" and "StopPage" in metapost.

I get the same error with any MP graphic using those commands.

More minimal example (without simpleslides) as per the wiki:
https://wiki.contextgarden.net/Cover_Pages

colors  > 'rgb' color space is supported
colors  > 'cmyk' color space is supported
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
metapost> initializing instance 'metafun:1' using format 'metafun'
and method 'default'
metapost> loading 'metafun' as
'/usr/share/texmf/metapost/context/base/mpiv/metafun.mpiv' using method
'default'
metapost> initializing number mode 'scaled'
input stack overflow
mtx-context | fatal error: return code: 256

Commenting out "StartPage" and "StopPage" compiles.

mtx-context | current version: 2021.05.09 17:14
This is LuaTeX, Version 1.14.0
Development id: 7438

Adam

On Sun, May 9, 2021 at 9:57 PM Adam Reviczky  wrote:

> Hi,
>
> With the latest luatex change from
> https://github.com/TeX-Live/luatex/commit/1566b63b338abbe38ed839fac9f2022ebbfa7d59
> (and MKIV 2021-05-09 17:14:00) I get an input stack overflow:
>
> simpleslides> loading style Boxed
> system  > command '\NormalHeight' is already defined
> system  > command '\NormalWidth' is already defined
> system  > command '\PictureFrameHeight' is already defined
> system  > command '\PictureFrameWidth' is already defined
> close source> level 4, order 8, name
> '/usr/share/texmf/tex/context/third/simpleslides/s-simpleslides-Boxed.tex'
> close source> level 3, order 8, name
> '/usr/share/texmf/tex/context/third/simpleslides/t-simpleslides.mkiv'
> fonts   > bodyfont '24.0414pt' is defined (can better be done
> global)
> metapost> initializing instance 'metafun:1' using format 'metafun'
> and method 'default'
> metapost> loading 'metafun' as
> '/usr/share/texmf/metapost/context/base/mpiv/metafun.mpiv' using method
> 'default'
> metapost> initializing number mode 'scaled'
> input stack overflow
> mtx-context | fatal error: return code: 256
>
> MWE from the documentation:
> \usemodule[simpleslides][style=Boxed]
> \setupTitle[title={Title of the presentation},author={Name of
> authors},date={Date of presentation}]
> \starttext
> \placeTitle
> \SlideTitle{The first slide}
> Write whatever you want.
> \SlideTitle{The second slide}
> Continue writing.
> \stoptext
>
> Does that mean the simpleslides module has some recursion problems?
> I have tried a couple of themes but getting the same error.
>
> Adam
>
>
___
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] simpleslides gives 'input stack overflow'

2021-05-09 Thread Adam Reviczky
Hi,

With the latest luatex change from
https://github.com/TeX-Live/luatex/commit/1566b63b338abbe38ed839fac9f2022ebbfa7d59
(and MKIV 2021-05-09 17:14:00) I get an input stack overflow:

simpleslides> loading style Boxed
system  > command '\NormalHeight' is already defined
system  > command '\NormalWidth' is already defined
system  > command '\PictureFrameHeight' is already defined
system  > command '\PictureFrameWidth' is already defined
close source> level 4, order 8, name
'/usr/share/texmf/tex/context/third/simpleslides/s-simpleslides-Boxed.tex'
close source> level 3, order 8, name
'/usr/share/texmf/tex/context/third/simpleslides/t-simpleslides.mkiv'
fonts   > bodyfont '24.0414pt' is defined (can better be done
global)
metapost> initializing instance 'metafun:1' using format 'metafun'
and method 'default'
metapost> loading 'metafun' as
'/usr/share/texmf/metapost/context/base/mpiv/metafun.mpiv' using method
'default'
metapost> initializing number mode 'scaled'
input stack overflow
mtx-context | fatal error: return code: 256

MWE from the documentation:
\usemodule[simpleslides][style=Boxed]
\setupTitle[title={Title of the presentation},author={Name of
authors},date={Date of presentation}]
\starttext
\placeTitle
\SlideTitle{The first slide}
Write whatever you want.
\SlideTitle{The second slide}
Continue writing.
\stoptext

Does that mean the simpleslides module has some recursion problems?
I have tried a couple of themes but getting the same error.

Adam
___
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] PDF forms not creating proper children

2021-05-02 Thread Adam Reviczky
Hi Pablo,

First of all, my bad, the test suite example works just fine in Adobe,
including with ConTeXt latest.

I have messed up my form by overriding the PDF version to 2.0, shouldn't
have done that.

On the viewers, I cannot recall exactly what I've done earlier in the year,
but indeed, most likely I have tried evince after signing it from the
command line. From https://gitlab.gnome.org/GNOME/evince/-/issues/143 there
is still no support for the signing itself, though okular should have some
support.

In any case, thanks for the hints (I probably should've done more testing)!

Adam


On Sun, May 2, 2021 at 5:50 PM Pablo Rodriguez  wrote:

> On 5/2/21 12:20 AM, Adam Reviczky wrote:
> > Hi,
> >
> > I cannot get the signature working either, but almost certain it did
> > work in February this year, as I have done some with MKIV.
> > [...]
>
> Hi Adam,
>
> I’m on a Linux computer, so I’m not able to check this now.
>
> If the signature isn’t working, you mean that the output PDF document
> from fields-007.tex cannot be signed with Acrobat DC, don’t you?
>
> Sorry for asking the obvious question, but this worked perfectly fine
> each time I tested.
>
> > Using the https://live.contextgarden.net/ with (LuaTeX 2.06 20200630 +
> > ConTeXt MkIV 2020.06.30 17:30) looks good, but evince does not display
> > the field.
>
> Evince never displays the signature field, only when signed.
>
> BTW, using mupdf-gl to sign the PDF document will mess it, since it has
> problems to recognize the child object.
>
> From my experience, only Acrobat deals with child objects in signatures
> generating a valid signature (and rewriting the two objects into a
> single one).
>
> Just in case it might help,
>
> Pablo
> --
> http://www.ousia.tk
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>
___
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] PDF forms not creating proper children

2021-05-01 Thread Adam Reviczky
Hi,

I cannot get the signature working either, but almost certain it did work
in February this year, as I have done some with MKIV.

>From the test suite:

fields-007.tex
\nopdfcompression
\setupinteraction[state=start]
\starttext
\definefield[x][signature]
\field[x]
\stoptext

Using the https://live.contextgarden.net/ with (LuaTeX 2.06 20200630 +
ConTeXt MkIV 2020.06.30 17:30) looks good, but evince does not display the
field.

Adam

On Fri, Apr 23, 2021 at 8:52 PM Leonard Janis Robert König 
wrote:

> Hello,
>
> I currently try to build a document with AcroForms, e.g., the examples
> from [1] also linked in the Wiki.  The most recent example is in the
> form/ subdirectory and dated mid 2020.  However, when building the
> file(s) with my ConTeXt distribution the file created is broken, in
> comparison to the PDF checked in into the Git.
>
> The more obvious difference is that the PDF in the repository can be
> filled in the Firefox 89 beta, while the other PDF doesn't even display
> the fields as forms.  Running pdfinfo also yields:
>
> > Syntax Error: Form field child is not a dictionary
>
> I suspect that due to some breakage the forms children aren't set in
> the AcroForms dictionary anymore?  My ConTeXt versions are:
>
> # ArchLinux Repos
>
> context --version
> mtx-context | ConTeXt Process Management 1.04
> mtx-context |
> mtx-context | main context file: /usr/share/texmf-
> dist/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2021.03.05 19:11
> mtx-context | main context file: /usr/share/texmf-
> dist/tex/context/base/mkxl/context.mkxl
> mtx-context | current version: 2021.03.05 19:11
>
> # Debian Buster Repos
> mtx-context | ConTeXt Process Management 1.02
> mtx-context |
> mtx-context | main context file:
> /usr/share/texmf/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2018.04.04 00:51
>
> # Docker Image: Current
>
> mtx-context | ConTeXt Process Management 1.03
> mtx-context |
> mtx-context | main context file: /context/tex/texmf-
> context/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2020.01.30 14:13
> mtx-context | main context file: /context/tex/texmf-
> context/tex/context/base/mkiv/context.mkxl
> mtx-context | current version: 2020.01.30 14:13
>
> # Docker Image: Beta
> mtx-context | ConTeXt Process Management 1.03
> mtx-context |
> mtx-context | main context file: /context/tex/texmf-
> context/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2020.01.30 14:13
> mtx-context | main context file: /context/tex/texmf-
> context/tex/context/base/mkiv/context.mkxl
> mtx-context | current version: 2020.01.30 14:13
>
> # Docker Image: LMTX
> mtx-context | ConTeXt Process Management 1.04
> mtx-context |
> mtx-context | main context file: /context/tex/texmf-
> context/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2021.04.14 22:58
> mtx-context | main context file: /context/tex/texmf-
> context/tex/context/base/mkxl/context.mkxl
> mtx-context | current version: 2021.04.14 22:58
>
> # Docker Image: Beta from 2019-09
> mtx-context | ConTeXt Process Management 1.03
> mtx-context |
> mtx-context | main context file: /context/tex/texmf-
> context/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2019.09.10 20:03
> mtx-context | main context file: /context/tex/texmf-
> context/tex/context/base/mkiv/context.mkxl
> mtx-context | current version: 2019.09.10 20:03
>
> The ConTeXt version of the checked in file on GitHub is (according to
> pdfinfo):
>
> > Creator:LuaTeX 1.10 7138 + ConTeXt MkIV 2019.08.20 17:20
> > Producer:   macOS Version 10.14.6 (Build 18G5033) Quartz
> PDFContext
>
> I also remebered another time were I toyed around with it and indeed
> that PDF also had broken form field children:
>
>
> > Creator:LuaTeX 1.12 7306 + ConTeXt MkIV 2020.03.10 14:44
> > Producer:   LuaTeX-1.12
>
> A broken version that I built locally using the :current IslandOfTeX
> [2] can be found at [3].
>
> The version difference between the broken and not-broken PDFs hints
> that the breakage occured between 2019.08.20 and 2019.09.10-beta, while
> the Debian breackage might be due to a backport(?)
>
> Alternatively, this could just be a mistake on my side?
>
> Cheers
> Leo König
>
>
> [1]: https://github.com/fiee/ConTeXt
> [2]: https://gitlab.com/islandoftex/images/context/
> [3]:
> https://mega.nz/file/ThcghTqb#JqRCSsd59bBbMgTMr3ahaPdU4LPlZd0cpA3ZFBJLJ3A
>
>
>
>
> ___
> 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/

Re: [NTG-context] Formulanumbers in margin

2021-03-23 Thread Adam Reviczky
Hi,

So the numbercommand does work after all, I just needed to keep something
in the "formulanumber" part of the textline, otherwise it wouldn't get
drawn.

Not sure how nice this looks, but it does work like this now:

\starttext
\showframe
\setupformulas[numbercommand=\nbsp\inrightmargin]
\startplaceformula \startformula c^2 = a^2 + b^2
\stopformula \stopplaceformula
\stoptext

Adam

On Sun, Mar 21, 2021 at 8:41 PM Adam Reviczky  wrote:

> Thanks Hraban,
>
> That should be fine, I've tried to increase the margins as well, but not
> sure that's the issue as I can perfectly place text with \inmargin
> directly, just not with the numbercommand.
>
> MWE:
>
> \starttext
> \setuplayout[margin=2cm, leftmargin=2cm, rightmargin=2cm]
>
> \showframe
> \showlayout
>
> \setupcaption[figure][location={rightmargin}]
> \startplacefigure[title=Cow] \externalfigure[cow] \stopplacefigure
>
> \define[1]\MyFormulaNumber{\inleftmargin{#1}}
> \setupformula[numbercommand=\MyFormulaNumber]
>
> \inleftmargin{Left Margin Text}
> \inrightmargin{Right Margin Text}
>
> \startplaceformula[reference=eq1] \startformula c^2 = a^2 + b^2
> \stopformula \stopplaceformula
> \stoptext
>
> Adam
>
> On Sun, Mar 21, 2021 at 8:31 PM Henning Hraban Ramm 
> wrote:
>
>>
>> > Am 21.03.2021 um 20:56 schrieb Adam Reviczky :
>> >
>> > Thanks Hraban,
>> >
>> > I've tried the numbercommand as well, but that also just makes the
>> formula number disappear, unless I am doing something wrong.
>> >
>> > The framing as per the math manual (manuals/math/math-framing.tex)
>> however does work, so not sure:
>> > \setupformula[numbercommand={\inframed[framecolor=green]}]
>>
>> Are your margins actually non-zero? (\setuplayout)
>> Maybe check with \showlayout
>>
>> 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
>>
>> ___
>>
>
___
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] Formulanumbers in margin

2021-03-21 Thread Adam Reviczky
Thanks Hraban,

That should be fine, I've tried to increase the margins as well, but not
sure that's the issue as I can perfectly place text with \inmargin
directly, just not with the numbercommand.

MWE:

\starttext
\setuplayout[margin=2cm, leftmargin=2cm, rightmargin=2cm]

\showframe
\showlayout

\setupcaption[figure][location={rightmargin}]
\startplacefigure[title=Cow] \externalfigure[cow] \stopplacefigure

\define[1]\MyFormulaNumber{\inleftmargin{#1}}
\setupformula[numbercommand=\MyFormulaNumber]

\inleftmargin{Left Margin Text}
\inrightmargin{Right Margin Text}

\startplaceformula[reference=eq1] \startformula c^2 = a^2 + b^2
\stopformula \stopplaceformula
\stoptext

Adam

On Sun, Mar 21, 2021 at 8:31 PM Henning Hraban Ramm  wrote:

>
> > Am 21.03.2021 um 20:56 schrieb Adam Reviczky :
> >
> > Thanks Hraban,
> >
> > I've tried the numbercommand as well, but that also just makes the
> formula number disappear, unless I am doing something wrong.
> >
> > The framing as per the math manual (manuals/math/math-framing.tex)
> however does work, so not sure:
> > \setupformula[numbercommand={\inframed[framecolor=green]}]
>
> Are your margins actually non-zero? (\setuplayout)
> Maybe check with \showlayout
>
> 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
>
> ___
>
___
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] Formulanumbers in margin

2021-03-21 Thread Adam Reviczky
Thanks Hraban,

I've tried the numbercommand as well, but that also just makes the formula
number disappear, unless I am doing something wrong.

The framing as per the math manual (manuals/math/math-framing.tex
<https://github.com/contextgarden/context-mirror/blob/a0270f13065d116355a953c6f246cbba26289fc2/doc/context/sources/general/manuals/math/math-framing.tex>)
however does work, so not sure:
\setupformula[numbercommand={\inframed[framecolor=green]}]

Adam

On Sun, Mar 21, 2021 at 7:47 PM Henning Hraban Ramm  wrote:

>
>
> > Am 21.03.2021 um 19:40 schrieb Adam Reviczky :
> >
> > % this makes the formulanumber disappear
> > % \setupformulas[location={rightmargin}]
>
> No, \setupformula’s location understands only left and right.
>
> Try something like:
>
> \define[1]\MyFormulaNumber{\inmargin{#1}}
>
> \setupformula[
> numbercommand=\MyFormulaNumber
> ]
>
>
> 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
>
> ___
>
___
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] Formulanumbers in margin

2021-03-21 Thread Adam Reviczky
Hi,

One more question on formulas. How can I get the formula number to be put
into the left/right margin instead of left/right inside the text?

I have tried the following:

\starttext
\showframe
% figure caption into the margin
\setupcaption[figure][location={rightmargin}]
\startplacefigure[title=Cow] \externalfigure[cow] \stopplacefigure

% this makes the formulanumber disappear
% \setupformulas[location={rightmargin}]
\startplaceformula[reference=eq1,location={rightmargin}] \startformula c^2
= a^2 + b^2 \stopformula \stopplaceformula
\stoptext

But the setupformulas will make the number disappear entirely, and the
placeformula location doesn't seem to take the margin option.

Thanks,
Adam
___
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] Formula numbering including all prefix segments

2021-03-21 Thread Adam Reviczky
Hi Hans,

That does it indeed, thank you!

Together with prefixconversion I mainly wanted to use this for formulas in
the appendix with the added prefix.

I'll add it to the wiki, as it is a very helpful information.

Adam

On Sun, Mar 21, 2021 at 12:55 PM Hans Hagen  wrote:

> On 3/20/2021 11:45 PM, Adam Reviczky wrote:
> > Hi,
> >
> > Is there a way to have formula numbers showing all prefix segments?
> > When I use prefixsegments, I get the desired numbering in the placelist
> > but not in the formula number itself.
> >
> > For example:
> > \starttext
> > \setupcaption[figure][way=bytext,prefixsegments=1:*]
> > \setupformulas[way=bytext,prefixsegments=1:*]
> > \startsection[title=Section]
> > \startsubsection[title=SubSection]
> > \startplacefigure[list=cow] \externalfigure[cow] \stopplacefigure
> > \startplaceformula[reference=eq1] \startformula c^2 = a^2 + b^2
> > \stopformula \stopplaceformula
> > \stopsubsection
> > \stopsection
> > \placelistoffigures[criterium=all]
> > \placelist[formula][criterium=all]
> > \stoptext
> >
> > The figure has number 1.1.1 and is in the list as 1.1.1, the formula has
> > number 1.1 but is listed as 1.1.1.
> > I would like to have the formula numbered 1.1.1 as well (as referenced
> > in the placelist), so with section and subsection numbering.
> you need to add: prefixset=all (default is limited to 3, see strc-def)
>
> \starttext
>  \setupcounter[formula][way=bytext]
>  \setupcaption[figure][way=bytext,prefixsegments=1:*]
>  \setupformulas[way=bytext,prefixsegments=1:*,prefixset=all]
>
>  \startchapter[title=Chapter]
>  \dorecurse{4}{
>  \startsection[title=Section]
>  \startsubsection[title=SubSection]
>  \startplacefigure[list=cow] \externalfigure[cow]
> \stopplacefigure
>  \startplaceformula[reference=eq1] \startformula c^2
> = a^2 + b^2 \stopformula \stopplaceformula
>  \stopsubsection
>  \startsubsection[title=SubSection]
>  \startplacefigure[list=cow] \externalfigure[cow]
> \stopplacefigure
>  \startplaceformula[reference=eq1] \startformula c^2
> = a^2 + b^2 \stopformula \stopplaceformula
>  \stopsubsection
>  \stopsection
>  }
>  \stopchapter
>
>  \placelistoffigures[criterium=all]
>  \placelist[formula][criterium=all]
> \stoptext
> -
>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
___


[NTG-context] Formula numbering including all prefix segments

2021-03-20 Thread Adam Reviczky
Hi,

Is there a way to have formula numbers showing all prefix segments?
When I use prefixsegments, I get the desired numbering in the placelist but
not in the formula number itself.

For example:
\starttext
\setupcaption[figure][way=bytext,prefixsegments=1:*]
\setupformulas[way=bytext,prefixsegments=1:*]
\startsection[title=Section]
\startsubsection[title=SubSection]
\startplacefigure[list=cow] \externalfigure[cow] \stopplacefigure
\startplaceformula[reference=eq1] \startformula c^2 = a^2 + b^2
\stopformula \stopplaceformula
\stopsubsection
\stopsection
\placelistoffigures[criterium=all]
\placelist[formula][criterium=all]
\stoptext

The figure has number 1.1.1 and is in the list as 1.1.1, the formula has
number 1.1 but is listed as 1.1.1.
I would like to have the formula numbered 1.1.1 as well (as referenced in
the placelist), so with section and subsection numbering.

Adam
___
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] (no subject)

2021-03-20 Thread Adam Reviczky
Hi,

Is there a way to have formula numbers showing all prefix segments?
When I use prefixsegments, I get the desired numbering in the placelist but
not in the formula number itself.

For example:
\starttext
\setupcaption[figure][way=bytext,prefixsegments=1:*]
\setupformulas[way=bytext,prefixsegments=1:*]
\startsection[title=Section]
\startsubsection[title=SubSection]
\startplacefigure[list=cow] \externalfigure[cow] \stopplacefigure
\startplaceformula[reference=eq1] \startformula c^2 = a^2 + b^2
\stopformula \stopplaceformula
\stopsubsection
\stopsection
\placelistoffigures[criterium=all]
\placelist[formula][criterium=all]
\stoptext

The figure has number 1.1.1 and is in the list as 1.1.1, the formula has
number 1.1 but is listed as 1.1.1.
I would like to have the formula numbered 1.1.1 as well (as referenced in
the placelist), so with section and subsection numbering.

Adam
___
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] placenamedformula in placelist (MKII vs MKIV/LMTX)

2021-03-17 Thread Adam Reviczky
Hi,

Or would it be possible to just add a "list=" option to placeformula
similar to placefigure? (although that might conflict with the combination
of "title=")

All I am really after is to label or name numbered formulas in the
placelist.

---
\starttext

% 1   This is a picture of a cow  . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .  1
\startplacefigure[title={My cow},list={This is a picture of a cow}]
\externalfigure[cow] \stopplacefigure

% Mass-energy equivalence . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 1
\startplaceformula[reference=eq:one,title={Mass-energy equivalence}]
\startformula e=mc^2 \stopformula \stopplaceformula

% 1   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .  1
% list option could give: 1   Mass-energy equivalence . . . . . . . . . . .
. . . . . . . . . . . .  1
\startplaceformula[reference=eq:one,list={Mass-energy equivalence}]
\startformula e=mc^2 \stopformula \stopplaceformula

\placelistoffigures[criterium=all,alternative=c]
\placelist[formula][criterium=all,alternative=c]

\stoptext
--

Adam

On Tue, Mar 16, 2021 at 5:28 AM Adam Reviczky  wrote:

> Hi,
>
> I want to use placenamedformula to list a formula in the placelist with
> both the formula name and the formula number (alongside the pagenumber).
>
> The example in the wiki (https://wiki.contextgarden.net/Math/Display) and
> the test suite (cont-tst/doc/context/tests/mkiv/math/formulas-003.tex)
> shows what I would like to have.
>
> Using MKII I get the desired output (1 formulaname ... and 3b formulaname
> ...) but with MKIV and LMTX I only get the reference from the placeformula
> (as 1 and correctly not listed in the placelist) and none of the
> placenamedformula numbers. The placeformula number is then carried onto the
> second placenamedformula as 1 (resulting in formulaname ... and 1
> formulaname ...).
>
> I have attached the test suite file output with both MKII and MKIV.
>
> Is there a way to get the MKII output with MKIV/LMTX somehow?
>
> Adam
>
___
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] placenamedformula in placelist (MKII vs MKIV/LMTX)

2021-03-15 Thread Adam Reviczky
Hi,

I want to use placenamedformula to list a formula in the placelist with
both the formula name and the formula number (alongside the pagenumber).

The example in the wiki (https://wiki.contextgarden.net/Math/Display) and
the test suite (cont-tst/doc/context/tests/mkiv/math/formulas-003.tex)
shows what I would like to have.

Using MKII I get the desired output (1 formulaname ... and 3b formulaname
...) but with MKIV and LMTX I only get the reference from the placeformula
(as 1 and correctly not listed in the placelist) and none of the
placenamedformula numbers. The placeformula number is then carried onto the
second placenamedformula as 1 (resulting in formulaname ... and 1
formulaname ...).

I have attached the test suite file output with both MKII and MKIV.

Is there a way to get the MKII output with MKIV/LMTX somehow?

Adam


formulas-003-mkii.pdf
Description: Adobe PDF document


formulas-003.mkiv.pdf
Description: Adobe PDF document
___
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] MKIV format generation error with latest 2021-02-17 13:33

2021-02-17 Thread Adam Reviczky
Hi,

I am getting the following error with luatex/mkiv with today's latest:

context --make

loading : ConTeXt Token Support / Initialization
/usr/share/texmf/tex/context/base/mkxl/toks-ini.lmt:21: attempt to call a
nil value (field 'getcommandvalues')
stack traceback:
/usr/share/texmf/tex/context/base/mkxl/toks-ini.lmt:21: in local 'code'
/usr/share/texmf/tex/context/base/mkiv/util-lua.lua:96: in field
'loadedluacode'
/usr/share/texmf/tex/context/base/mkiv/luat-env.lua:108: in field
'luafilechunk'
/usr/share/texmf/tex/context/base/mkiv/luat-cod.lua:75: in function
'lua.registercode'
[\directlua]:1: in main chunk.
\registerctxluafile #1#2->\ctxlua {lua.registercode("#1","#2")}

l.18 \registerctxluafile{toks-ini}{autosuffix}

?

---
mtx-context | ConTeXt Process Management 1.04
mtx-context |
mtx-context | main context file:
/usr/share/texmf/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2021.02.17 13:30
mtx-context | main context file:
/usr/share/texmf/tex/context/base/mkxl/context.mkxl
mtx-context | current version: 2021.02.17 13:30
---
Compiled with libpng 1.6.37; using 1.6.37
Compiled with lua version 5.3.6
Compiled with mplib version 2.00
Compiled with zlib 1.2.11; using 1.2.11

Development id: 7405
---

Adam
___
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] mkiv broken in 2020-12-04 20:21:00 (typo-spa.lua)

2020-12-05 Thread Adam Reviczky
Hi Hans,

The removal of typo-spa.lua breaks the format generation in mkiv:

loading > ConTeXt Typesetting Macros / Wrapping
resolvers   > lua > loading file
'/usr/share/texmf/tex/context/base/mkiv/typo-wrp.lua' succeeded
close source> level 1, order 226, name
'/usr/share/texmf/tex/context/base/mkiv/typo-wrp.mkiv'
open source > level 1, order 227, name
'/usr/share/texmf/tex/context/base/mkiv/typo-spa.mkiv'
loading > ConTeXt Typesetting Macros / Spacing
resolvers   > lua > unknown file 'typo-spa.lua'

error loading file: typo-spa.lua (aborting)resolvers   | formats |
resolvers   | formats | binary path  : /usr/bin
resolvers   | formats | format path  :
/home/reviczky/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/formats/luatex
resolvers   | formats | luatex engine: luatex
resolvers   | formats | lua startup file :
/usr/share/texmf/tex/context/base/mkiv/luat-cod.lua
resolvers   | formats | context file :
/usr/share/texmf/tex/context/base/mkiv/cont-en.mkiv
resolvers   | formats | run time : 1.394 seconds
resolvers   | formats | return value : okay
resolvers   | formats |
system  | total runtime: 3.790 seconds

Adding the file back creates the formats again.

mtx-context | current version: 2020.12.04 20:19
This is LuaTeX, Version 1.13.0 (TeX Live 2021/dev/Debian)
Development id: 7387

Regards,
Adam
___
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] format error with latest 2020-11-16 19:40 with mkiv (luatex)

2020-11-17 Thread Adam Reviczky
Thank you Hans, all fine now again!

Adam

On Tue, Nov 17, 2020 at 8:54 AM Hans Hagen  wrote:

> On 11/17/2020 3:06 AM, Adam Reviczky wrote:
> > Hi,
> >
> > I am getting the following error message trying to generate the formats
> > (context --make) with the latest version (latest 2020-11-16 19:40) with
> > luatex 1.13.0 7385 (not lmtx).
> >
> > loading > ConTeXt Typesetting Macros / Triggering Actions
> > resolvers   > lua > loading file
> > '/usr/share/texmf/tex/context/base/mkiv/typo-inj.lua' succeeded
> >
> > tex error   > tex error on line 49 in file
> > /usr/share/texmf/tex/context/base/mkiv/typo-inj.mkiv: ! Parameters must
> > be numbered consecutively
> >
> > 
> > *
> > l.49 \permanent\tolerant\protected\def\checkinjector  [#1]#*
> >
> > [#2]{\clf_checkinjector{#1}{#2}}
> I'll upload a fixed zip.
>
> \permanent\tolerant\protected\def\checkinjector[#1]#*[#2]{...}
>
> is lmtx speak for pick up [#1], skip spaces, pickup [#2] but don't bark
> when these are missing (be \tolerant). And, prevent the user from
> overloading this macro {\permanent).
>
> 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
___


[NTG-context] format error with latest 2020-11-16 19:40 with mkiv (luatex)

2020-11-16 Thread Adam Reviczky
Hi,

I am getting the following error message trying to generate the formats
(context --make) with the latest version (latest 2020-11-16 19:40) with
luatex 1.13.0 7385 (not lmtx).

loading > ConTeXt Typesetting Macros / Triggering Actions
resolvers   > lua > loading file
'/usr/share/texmf/tex/context/base/mkiv/typo-inj.lua' succeeded

tex error   > tex error on line 49 in file
/usr/share/texmf/tex/context/base/mkiv/typo-inj.mkiv: ! Parameters must be
numbered consecutively


*
l.49 \permanent\tolerant\protected\def\checkinjector  [#1]#*

[#2]{\clf_checkinjector{#1}{#2}}

39 %D \placeregister[index][criterium=text]
40 %D \page
41 %D \startsection[title=Alpha] first  \index{first}  \stopsection
42 %D \startsection[title=Beta]  second \index{second} \stopsection
43 %D \startsection[title=Gamma] third  \index{third}  \stopsection
44 %D \startsection[title=Delta] fourth \index{fourth} \stopsection
45 %D \stoptext
46
47 \permanent \protected\def\resetinjector
 [#1]{\clf_resetinjector{#1}}
48 \permanent \protected\def\markinjector
[#1]{\dontleavehmode\clf_markinjector{#1}}
49 >>  \permanent\tolerant\protected\def\checkinjector
 [#1]#*[#2]{\clf_checkinjector{#1}{#2}}
50 \permanent \protected\def\checknextinjector
 [#1]{\clf_checkinjector{#1}{\v!next}}
51 \permanent \protected\def\checkpreviousinjector
 [#1]{\clf_checkinjector{#1}{\v!previous}}
52 %permanent \protected\def\checknextinjector
 [#1]{\clf_checknextinjector{#1}}
53 %permanent \protected\def\checkpreviousinjector
 [#1]{\clf_checkpreviousinjector{#1}}
54 \permanent\tolerant\protected\def\setinjector
 [#1]#*[#2]#*[#3]{\clf_setinjector{#1}{#2}{#3}}
55 \permanent\tolerant\protected\def\showinjector
[#1]{\clf_showinjector{#1}}
56
57 \permanent\protected\def\domarkinjector#1#2% called at the lua end
58   {\dontleavehmode\llap{\infofont\ifcase#1\else\red\fi<#2>\quad}}
59

Swapping typo-inj.mkxl with typo-inj.mkiv makes it work though, changing
\permanent\tolerant\protected\def\checkinjector [#1]#*[#2]{\clf
_checkinjector{#1}{#2}}
\permanent\tolerant\protected\def\setinjector [#1]#*[#2]#*[#3]{\clf
_setinjector{#1}{#2}{#3}}
back to
\unexpanded\def\docheckinjector [#1][#2]{\clf_checkinjector{#1}{#2}}
\unexpanded\def\dosetinjector [#1][#2][#3]{\clf_setinjector{#1}{#2}{#3}}

Were the files mixed up?
Shouldn't the former be for mkxl (lmtx) and the latter for mkiv?

Adam
___
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] gnuplot module broken with latest 2020-07-13 16:31

2020-07-13 Thread Adam Reviczky
Many thanks for the quick fix Hans,

I have tried the lmtx inclusions as well, very nice indeed (and added it to
the wiki)!

Kind Regards,
Adam Reviczky

On Mon, Jul 13, 2020 at 10:38 PM Hans Hagen  wrote:

> On 7/13/2020 8:53 PM, Adam Reviczky wrote:
> > Hi,
> >
> > Using the minimal example from the contextgarden for gnuplot
> > (https://wiki.contextgarden.net/Gnuplot) I am getting the following
> > error message:
> >
> > This is LuaTeX, Version 1.13.0 (TeX Live 2021/dev/Debian)
> >   system commands enabled.
> > open source > level 1, order 1, name
> > '/usr/share/texmf/tex/context/base/mkiv/cont-yes.mkiv'
> > system  >
> > system  > ConTeXt  ver: 2020.07.13 16:23 MKIV  fmt: 2020.7.13
> >   int: english/english
> > system  >
> > system  > 'cont-new.mkiv' loaded
> > open source > level 2, order 2, name
> > '/usr/share/texmf/tex/context/base/mkiv/cont-new.mkiv'
> > system  > beware: some patches loaded from cont-new.mkiv
> > close source> level 2, order 2, name
> > '/usr/share/texmf/tex/context/base/mkiv/cont-new.mkiv'
> > system  > files > jobname 'mwe', input './mwe', result 'mwe'
> > fonts   > latin modern fonts are not preloaded
> > languages   > language 'en' is active
> > open source > level 2, order 3, name '/tmp/4/mwe.tex'
> > modules > 'gnuplot' is loaded
> > open source > level 3, order 4, name
> > '/usr/share/texmf/tex/context/third/gnuplot/t-gnuplot.mkiv'
> > loading > Gnuplot module
> > open source > level 4, order 5, name
> > '/usr/share/texmf/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
> > close source> level 4, order 5, name
> > '/usr/share/texmf/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
> > close source> level 3, order 5, name
> > '/usr/share/texmf/tex/context/third/gnuplot/t-gnuplot.mkiv'
> >
> > lua error   > lua error on line 4 in file /tmp/4/mwe.tex:
> >
> > /usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:439: attempt to call
> > a nil value (upvalue 'gettoken')
> > stack traceback:
> > /usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:439: in upvalue
> 'pickup'
> > /usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:635: in function
> > 
> > (...tail calls...)
> >
> >   1 \usemodule[gnuplot]
> >   2
> >   3 % write a script for gnuplot
> >   4 >>  \startGNUPLOTscript[sin]
> >   5plot sin(x)
> >   6 \stopGNUPLOTscript
> >   7
> >   8 % include the resulting graphic into the document
> >   9 \useGNUPLOTgraphic[sin]
> > 10
> >
> > mtx-context | fatal error: return code: 256
> >
> > Does the gnuplot module need adjustments?
> No, i messed up something ... will be fixed tomorrow
>
> Do you have lmtx installed? It has nicer gnuplot support:
>
> m-gnuplot-demo.gp :
>
> 
> set format xy "$%g$"
>
> set title  'This is a plot of $y=\\sin(x)$'
> set xlabel 'This is the $x$ axis'
> set ylabel 'This is the $y$ axis'
>
> plot [0:6.28] [0:1] sin(x)
> 
>
> Can be included with:
>
> \starttext
>
>  \externalfigure[m-gnuplot-demo.gp][conversion=svg,width=4cm]
>
>  \externalfigure[m-gnuplot-demo.gp][conversion=svg,width=8cm]
>
> \stoptext
>
>
> -
>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
___


[NTG-context] gnuplot module broken with latest 2020-07-13 16:31

2020-07-13 Thread Adam Reviczky
Hi,

Using the minimal example from the contextgarden for gnuplot (
https://wiki.contextgarden.net/Gnuplot) I am getting the following error
message:

This is LuaTeX, Version 1.13.0 (TeX Live 2021/dev/Debian)
 system commands enabled.
open source > level 1, order 1, name
'/usr/share/texmf/tex/context/base/mkiv/cont-yes.mkiv'
system  >
system  > ConTeXt  ver: 2020.07.13 16:23 MKIV  fmt: 2020.7.13  int:
english/english
system  >
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name
'/usr/share/texmf/tex/context/base/mkiv/cont-new.mkiv'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 2, order 2, name
'/usr/share/texmf/tex/context/base/mkiv/cont-new.mkiv'
system  > files > jobname 'mwe', input './mwe', result 'mwe'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name '/tmp/4/mwe.tex'
modules > 'gnuplot' is loaded
open source > level 3, order 4, name
'/usr/share/texmf/tex/context/third/gnuplot/t-gnuplot.mkiv'
loading > Gnuplot module
open source > level 4, order 5, name
'/usr/share/texmf/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
close source> level 4, order 5, name
'/usr/share/texmf/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
close source> level 3, order 5, name
'/usr/share/texmf/tex/context/third/gnuplot/t-gnuplot.mkiv'

lua error   > lua error on line 4 in file /tmp/4/mwe.tex:

/usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:439: attempt to call a
nil value (upvalue 'gettoken')
stack traceback:
/usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:439: in upvalue 'pickup'
/usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:635: in function

(...tail calls...)

 1 \usemodule[gnuplot]
 2
 3 % write a script for gnuplot
 4 >>  \startGNUPLOTscript[sin]
 5plot sin(x)
 6 \stopGNUPLOTscript
 7
 8 % include the resulting graphic into the document
 9 \useGNUPLOTgraphic[sin]
10

mtx-context | fatal error: return code: 256

Does the gnuplot module need adjustments?
Version 2020-07-09 14:50 is fine.

Regards,
Adam
___
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] Interaction references with Reference List and Bibliography

2020-06-10 Thread Adam Reviczky
Hi,

When I try to create a "Reference List" (for cited references in the
document) followed by a "Bibliography" (for the rest of literature, not
cited) I get wrong references linked back in the document when citing a
reference multiple times, although the citation in the text is always fine.

See MWE:
---
\setupinteraction[state=start]

\usebtxdataset[sample.bib]
\usebtxdefinitions[apa]

\starttext
\input tufte \cite[hh2010a]
\input zapf \cite[hh2010a]

\title{Reference List}
\placelistofpublications[criterium=all]

\title{Bibliography}
\placelistofpublications[method=dataset]
\stoptext
---

Publications taken from (https://wiki.contextgarden.net/Sample_bib) as
sample.bib.

The outcome is correctly cited (Hagen, 2010a) including the interaction to
the reference list, but the second citation is also linked to the first
item in the bibliography Eijkhout, V. (1991) rather than the reference list
entry again. If I cite the item again, then the second item in the
bibliography is referenced and so on.

"aps" doesn't seem to create an interactive back reference, so the issue is
only with "apa".

Is this because I mix both references and bibliography with
placelistofpublications? Any other way to achieve this keeping interaction
links in place?

Thanks,
Adam
___
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] Short weekday option for date command

2020-04-08 Thread Adam Reviczky
Thank you Wolfgang!

Adam

On Wed, Apr 8, 2020 at 9:11 PM Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Adam Reviczky schrieb am 08.04.2020 um 21:53:
> > Thank you Hans and Wolfgang,
> >
> > I have updated the wiki (https://wiki.contextgarden.net/Command/date)
> > with the new dayshort/daylong options, but I seem to get an empty value
> > for every day after day 7, see example:
> >
> > \starttext
> > \date[d=7,m=4,y=2008][{\dayshort\normalday},{,~},day,~,month,~,year] \par
> > \date[d=8,m=4,y=2008][{\dayshort\normalday},{,~},day,~,month,~,year]
> > \stoptext
> >
> > This gives me (note "sun" is missing in the second line):
> >
> > sat, 7 April 2008
> > , 8 April 2008
> >
> > Am I using the options correctly?
>
> No, the \daylong and \dayshort expect a number between 1 and 7 and
> result in a label for the requested day of the week but it's not meant
> to be used in \currentdate.
>
> > Still using luatex and not luametatex.
>
> To get the short names with \currentdate you have to append ":mnem" to
> the weekday, w, WEEKDAY or W keywords.
>
> \starttext
>
> \startlines
> \date[d=7,m=4,y=2008][weekday,{,~},day,~,month,~,year]
> \date[d=7,m=4,y=2008][weekday:mnem,{,~},day,~,month,~,year]
> \date[d=8,m=4,y=2008][weekday,{,~},day,~,month,~,year]
> \date[d=8,m=4,y=2008][weekday:mnem,{,~},day,~,month,~,year]
> \stoplines
>
> \stoptext
>
> Wolfgang
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Short weekday option for date command

2020-04-08 Thread Adam Reviczky
Thank you Hans and Wolfgang,

I have updated the wiki (https://wiki.contextgarden.net/Command/date) with
the new dayshort/daylong options, but I seem to get an empty value for
every day after day 7, see example:

\starttext
\date[d=7,m=4,y=2008][{\dayshort\normalday},{,~},day,~,month,~,year] \par
\date[d=8,m=4,y=2008][{\dayshort\normalday},{,~},day,~,month,~,year]
\stoptext

This gives me (note "sun" is missing in the second line):

sat, 7 April 2008
, 8 April 2008

Am I using the options correctly?
Still using luatex and not luametatex.

ConTeXt  ver: 2020.04.08 14:34 MKIV beta  fmt: 2020.4.8  int:
english/english
mtx-context | current version: 2020.04.08 14:34

This is LuaTeX, Version 1.13.0 (TeX Live 2020/Debian)
Compiled with libpng 1.6.37; using 1.6.37
Compiled with lua version 5.3.5
Compiled with mplib version 2.00
Compiled with zlib 1.2.11; using 1.2.11
Development id: 7330

Thanks,
Adam

On Sat, Apr 4, 2020 at 11:24 AM Hans Hagen  wrote:

> On 4/4/2020 11:47 AM, Adam Reviczky wrote:
> > Hi,
> >
> > Is there a way to achieve a short weekday option with \date[] to get 3
> > letter equivalents (Mon, Tue, Wed, Thu, Fri, Sat, Sun) similar to the
> > monthshort either through context or lua?
> Not currently but I will add the basics (I have to double check with WS
> to see where if conflicts as such an extension involves additional
> commands it has to go into the setups too) but others have to add the
> abbreviations.
>
> 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
___


[NTG-context] Short weekday option for date command

2020-04-04 Thread Adam Reviczky
Hi,

Is there a way to achieve a short weekday option with \date[] to get 3
letter equivalents (Mon, Tue, Wed, Thu, Fri, Sat, Sun) similar to the
monthshort either through context or lua?

Thanks,
Adam
___
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] metafun 2

2019-08-17 Thread Adam Reviczky
Hi Hans, Alan,

This is really cool! Not sure how I missed this feature, works exactly for
my use-case.

Thanks a lot for pointing this out, I was able to find it in the MAPS as
well.

Cheers,
Adam

On Sat, Aug 17, 2019 at 9:52 AM Hans Hagen  wrote:

> On 8/17/2019 3:27 AM, Alan Braslau wrote:
> > We have eofill in MP (in pdf/ps in fact) and that likely will do what
> you need.
> You forgot the MWD (Minimal Working Demo):
>
> \starttext
>
> \startMPpage
> path p ; p := fullcircle scaled 1cm ;
> path q ; q := fullcircle scaled .5cm ;
>
> nofill p ;
> eofill q ;
> \stopMPpage
>
> \stoptext
>
> -
>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
___


Re: [NTG-context] metafun 2

2019-08-16 Thread Adam Reviczky
Hi Hans,

One MetaPost feature that I was looking forward to is the ability to create
a fill between two shapes.
Something like a difference function of two path's.

For logos I use the workaround with creating a path alongside the excluded
areas but it is always cumbersome.

I have briefly mentioned it back here:
https://mailman.ntg.nl/pipermail/ntg-context/2011/056910.html

Just for illustration purposes, if I wanted to fill the area in between two
circles:

*path p ;
**p := fullcircle scaled 1cm ;
**path q ;
**q := fullcircle scaled .5cm ;
*

Instead of creating a new path along both circles with:


*r := p -- reverse q -- cycle ;*

It would be nice to have something like:

*fill p excluding q ;*

or something like that.

I mainly have use-cases for differences in shapes, but filling the
intersection of two shapes would be the same idea.

Thanks,
Adam


On Wed, Aug 14, 2019 at 10:57 AM Hans Hagen  wrote:

> Hi,
>
> In the process of providing an additional (more abstract) interface to
> some of the old and also new MetaFun code we wonder what kind of
> features users would like to see.
>
> http://www.pragma-ade.com/general/magazines/mag-1104-mkiv.pdf
>
> As a teaser I uploaded a MyWay document that shows some of what is
> coming. All is experimental but it shows the direction. We're talking
> ConTeXt LMTX here. For instance,
>
>  draw lmt_outline [
>  content   = "hello",
>  kind  = "reverse",
>  fillcolor = "darkred",
>  drawcolor = "darkblue",
>  rulethickness = 1/2,
>  ] ysized h shifted (3.75h,-1.25h) ;
>
> Wraps all the outline drawing in one macro with a set of options (there
> will be xml interface definitions for that). Or take:
>
>  draw lmt_followtext [
>  content = "How well does it work {\bf 1}! ",
>  path= (fullcircle scaled 4cm),
>  trace   = true,
>  spread  = true,
>  ] ysized 5cm ;
>
> which is an easier interface to text along a curve. Arrows can be drawn
> with
>
>  draw lmt_arrow [
>  kind= "draw",
>  location= "middle",
>  alternative = "curved",
>  path= fullcircle
>  scaled  3cm
>  shifted (3.5cm,0cm),
>  ] withcolor "darkblue" ;
>
> but of course the low level interface with its many variables for
> tweaking stays around. Other examples are shown in the mentioned document.
>
> So the question is: What do you miss in metapost support? Of course it
> should fit within the concept, so 'artistic freehand drawings' is not
> something that is likely to get interfaced. We are particularly
> interested in educational applications, if only because ConTeXt started
> out that way.
>
> 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] MetaPost shading broken with latest beta

2018-06-23 Thread Adam Reviczky
Hi,

Using the shading function in a metapost image the whole page is
filled in instead of the figure that defines it.

Minimal example as from the metafun manual 8.3.3
(http://www.pragma-ade.nl/general/manuals/metafun-p.pdf):
\starttext
\startMPcode
fill fullsquare xyscaled (1cm,1cm)
withshademethod "linear"
withshadevector (1,0)
withshadecolors (darkred,darkgreen)
;
\stopMPcode
\stoptext

ConTeXt  ver: 2018.06.23 12:12 MKIV beta  fmt: 2018.6.23  int: english/english
luatex version 1.09 with functionality level 6823,
MetaPost 2.00

With this, I get a full A4 page with the shading colors.
This worked until the beta 2018-06-22 16:02 and the desired output is
shown when using live.contextgarden.net.

Thanks,
Adam
___
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] setmemstream to use pdfe.new instead of epdf.openMemStream

2018-06-23 Thread Adam Reviczky
Hi,

I am using the "figures.setmemstream" for inline images and it is
broken now with the latest luatex on the changes from
epdf.openMemStream to pdfe.new.

Although it does say "very experimental and likely to change", but can
we update the call from epdf.openMemStream?

Minimal example:
\starttext
\startluacode
figures.setmemstream("inline",mime.unb64("iVBORw0KGgoNSUhEUgEBAQMl21bKA1BMVEUAAACnej3aAXRSTlMAQObYZgpJREFUCNdjYAIAAeIhvDMASUVORK5CYII="))
context.externalfigure({"memstream:///inline"})
\stopluacode
\stoptext

or as in grph-mem.lua:
-- \startluacode
-- figures.setmemstream("whatever",io.loaddata("t:/sources/cow.pdf"))
-- \stopluacode
--
-- \externalfigure[memstream:///t:/sources/cow.pdf]
-- \externalfigure[memstream:///whatever]

The error message is:
/usr/share/texmf/tex/context/base/mkiv/grph-mem.lua:32: attempt to
index global 'epdf' (a nil value)
stack traceback:
/usr/share/texmf/tex/context/base/mkiv/grph-mem.lua:32: in
function 'setmemstream'
[ctxlua]:2: in main chunk

Which points to the line of "local memstream, identifier =
epdf.openMemStream(stream,#stream,name)"
LuaTeX commit 6822 change was "epdf.new (aka memstreams) (HH)"

ConTeXt  ver: 2018.06.23 12:12 MKIV beta  fmt: 2018.6.23  int: english/english
luatex version 1.09 with functionality level 6823,

Thanks,
Adam
___
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
___