[NTG-context] Vertical offset in framedtext has changed

2021-08-08 Thread Christoph Reller via ntg-context
Hi,

Somewhere between versions 2021-07-06 and 2021-07-30 the vertical
top-offset in framedtext has changed. Consider the MWE:

\starttext
\startframedtext
  Bla
\stopframedtext
\stoptext

Output 2021-07-06:
[image: FramedText-ConTeXt-2021-07-06.png]
Output 2021-07-30 (and later):
[image: FramedText-ConTeXt-2021-07-30.png]
Is this a regression?

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
___


Re: [NTG-context] new upload/issue with t-vim?

2021-08-08 Thread Hans Hagen via ntg-context

On 8/8/2021 11:53 PM, Aditya Mahajan via ntg-context wrote:

On Sun, 8 Aug 2021, Hans Hagen via ntg-context wrote:


On 8/8/2021 1:13 PM, Benjamin Buchmuller via ntg-context wrote:

I'm not sure if it's related to this latest:

ConTeXt  ver: 2021.08.07 22:53 LMTX  fmt: 2021.8.8  int: english/english

or a previous one, but with this one:

ConTeXt  ver: 2021.07.30 00:57 LMTX  fmt: 2021.8.8  int: english/english

My document compiled fine.

When I use the t-vim module (freshly installed again from the garden; but I

also tried to replace some files from the GitHub, but not sure if I did it
right …), I now get an error when I do something like


\usemodule[vim]

\definevimtyping[vimR]

\typevimRfile{path_to_file.R} % specifically: {../sourcecodes/myfile.R}

--

lua error > lua error on line 2 in file virtual://block.sourcecode.7:

token call, execute:

...ConTeXt/tex/texmf-context/tex/context/base/mkiv/l-io.lua:70: bad argument
#1 to '?' (string expected, got nil)
i'll check it, i cleaned up some code but didn't realize that it was
used in a module


This was also reported on t-vim's github page: 
https://github.com/adityam/filter/pull/48.

I basically use jobs.file.run to cache the results and I can easily write a 
module specific version of that, if needed. I'll look at it in a day or two 
(away from a stable internet connection until then).

blame me for this one

just wait for the update (i added the name,action interface again as i 
assumes the { filename =, action= } usage)


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
___


Re: [NTG-context] new upload/issue with t-vim?

2021-08-08 Thread Aditya Mahajan via ntg-context
On Sun, 8 Aug 2021, Hans Hagen via ntg-context wrote:

> On 8/8/2021 1:13 PM, Benjamin Buchmuller via ntg-context wrote:
> > I'm not sure if it's related to this latest:
> > 
> > ConTeXt  ver: 2021.08.07 22:53 LMTX  fmt: 2021.8.8  int: english/english
> > 
> > or a previous one, but with this one:
> > 
> > ConTeXt  ver: 2021.07.30 00:57 LMTX  fmt: 2021.8.8  int: english/english
> > 
> > My document compiled fine.
> > 
> > When I use the t-vim module (freshly installed again from the garden; but I
> also tried to replace some files from the GitHub, but not sure if I did it
> right …), I now get an error when I do something like
> > 
> > \usemodule[vim]
> > 
> > \definevimtyping[vimR]
> > 
> > \typevimRfile{path_to_file.R} % specifically: {../sourcecodes/myfile.R}
> > 
> > --
> > 
> > lua error > lua error on line 2 in file virtual://block.sourcecode.7:
> > 
> > token call, execute:
> ...ConTeXt/tex/texmf-context/tex/context/base/mkiv/l-io.lua:70: bad argument
> #1 to '?' (string expected, got nil)
> i'll check it, i cleaned up some code but didn't realize that it was 
> used in a module

This was also reported on t-vim's github page: 
https://github.com/adityam/filter/pull/48.

I basically use jobs.file.run to cache the results and I can easily write a 
module specific version of that, if needed. I'll look at it in a day or two 
(away from a stable internet connection until then).

Aditya___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] JavaScript in multimedia PDF

2021-08-08 Thread Michal Vlasák via ntg-context
On Sun Aug 8, 2021 at 8:22 PM CEST, Pablo Rodriguez via ntg-context wrote:
> I don’t know why I get the following message:
>
> TypeError: a.doc is undefined
>
> It seems to be caused by "app.media.openPlayer", but the code is copied
> from the documentation Adobe released early this year.

Is there a newer document than "JavaScript for Acrobat API Reference"
(May 2015)?

Anyways, I thought that the culprit is that you only specify the
rendition (what to play) and not screen (where to play):


 function GoToFirstSlide(label) {
 this.pageNum = 0 ;
 var rendition = this.media.getRendition(label) ;
+var screen = this.media.getAnnots({ nPage: 0})[0];
 var player = app.media.openPlayer({
 rendition: rendition,
+annot: screen,
   });
 }

But as it turns out, while the screen query succesfully returns an
object, the rendition query returns null.

The PDF 1.7 standard specifies that the name (/N) of Rendition PDF
object should be Unicode, but that doesn't seem to make it work either,
as does deleting the name of the media clip (which was the same).

(But I now get "Invalid arguments" error for the "app.media.openPlayer"
call, which is kind of expected.)

Can you confirm, that "rendition" is null on your side as well?

console.println(rendition);
console.println(screen);
console.show();


Michal Vlasák
___
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] Create an enumeration style

2021-08-08 Thread Wolfgang Schuster via ntg-context

Fabrice Couvreur via ntg-context schrieb am 08.08.2021 um 17:47:

Hello,
Is it possible to create an enumeration style to get this :
1 ^ {er} exemple
2 ^ {e} exemple
3 ^ {e} exemple


The conversion needs a fix but this is how you can do it.

\defineenumeration
  [test]
  [text=,
   numbercommand=\groupedcommand{}{~exemple},
   numberconversion=ordinal]

\mainlanguage [fr]

\starttext

\starttest
\input knuth
\stoptest

\starttest
\input knuth
\stoptest

\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] JavaScript in multimedia PDF

2021-08-08 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \setupinteraction
  [state=start]

  \startJSpreamble varia used now
  this.pageNum = 0 ; // start at 0

  function GoToFirstSlide(label) {
  this.pageNum = 0 ;
  var rendition = this.media.getRendition(label) ;
  var player = app.media.openPlayer({
  rendition: rendition,
});
  }

  function GoToLastSlide(label) {
this.pageNum = this.numPages ;
  }

  function GoToNextSlide(label) {
  ++this.pageNum ;
  }

  function GoToPreviousSlide(label) {
  --this.pageNum ;
  }

  function SwitchFS() {
if (app.fs.isFullScreen == true)
  app.fs.isFullScreen = false ;
else
  app.fs.isFullScreen = true ;
  }
  \stopJSpreamble


  \setuppapersize[A9, landscape]

  \definefontfamily
  [mainface]
  [rm]
  [Latin Modern Sans]

  \definefontfamily
  [mainface]
  [ss]
  [Hans]

  \setupbodyfont
  [mainface, 25pt]

  \setupalign[middle]

  \setupfooter
  [style={\ss}]

  \def\SlideNavigationButtons{%
  \goto{A}[JS(GoToFirstSlide{mainsound})]%
  \goto{K}[JS(GoToPreviousSlide{mainsound})]%
  \goto{L}[JS(GoToNextSlide{mainsound})]%
  \goto{B}[JS(GoToLastSlide{mainsound})]
  \goto{{\ssb Q}}[JS(SwitchFS{})]%
  }

  \setupfootertexts[\SlideNavigationButtons]

  \starttext

\definerenderingwindow[soundplace]
  [width=0pt, height=0pt]

\useexternalrendering[mainsound][audio/mp3][sound.mp3][embed=yes]

\placerenderingwindow[soundplace][mainsound]
  \dorecurse{25}{\null\page}
  \stoptext

I don’t know why I get the following message:

TypeError: a.doc is undefined

It seems to be caused by "app.media.openPlayer", but the code is copied
from the documentation Adobe released early this year.

Does anyone know what is wrong here or what am I missing?

Many thanks for your help in advance,

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
___


[NTG-context] Create an enumeration style

2021-08-08 Thread Fabrice Couvreur via ntg-context
Hello,
Is it possible to create an enumeration style to get this :
1 ^ {er} exemple
2 ^ {e}  exemple
3 ^ {e} exemple 
Thanks
Fabrice
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] new upload/issue with t-vim?

2021-08-08 Thread Hans Hagen via ntg-context

On 8/8/2021 1:13 PM, Benjamin Buchmuller via ntg-context wrote:

I'm not sure if it's related to this latest:

ConTeXt  ver: 2021.08.07 22:53 LMTX  fmt: 2021.8.8  int: english/english

or a previous one, but with this one:

ConTeXt  ver: 2021.07.30 00:57 LMTX  fmt: 2021.8.8  int: english/english

My document compiled fine.

When I use the t-vim module (freshly installed again from the garden; but I 
also tried to replace some files from the GitHub, but not sure if I did it 
right …), I now get an error when I do something like

\usemodule[vim]

\definevimtyping[vimR]

\typevimRfile{path_to_file.R} % specifically: {../sourcecodes/myfile.R}

--

lua error > lua error on line 2 in file virtual://block.sourcecode.7:

token call, execute: 
...ConTeXt/tex/texmf-context/tex/context/base/mkiv/l-io.lua:70: bad argument #1 
to '?' (string expected, got nil)
i'll check it, i cleaned up some code but didn't realize that it was 
used in a module


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
___


Re: [NTG-context] new upload/issue with t-vim?

2021-08-08 Thread Benjamin Buchmuller via ntg-context
I'm not sure if it's related to this latest:

ConTeXt  ver: 2021.08.07 22:53 LMTX  fmt: 2021.8.8  int: english/english

or a previous one, but with this one:

ConTeXt  ver: 2021.07.30 00:57 LMTX  fmt: 2021.8.8  int: english/english

My document compiled fine.

When I use the t-vim module (freshly installed again from the garden; but I 
also tried to replace some files from the GitHub, but not sure if I did it 
right …), I now get an error when I do something like

\usemodule[vim]

\definevimtyping[vimR]

\typevimRfile{path_to_file.R} % specifically: {../sourcecodes/myfile.R}

--

lua error > lua error on line 2 in file virtual://block.sourcecode.7:

token call, execute: 
...ConTeXt/tex/texmf-context/tex/context/base/mkiv/l-io.lua:70: bad argument #1 
to '?' (string expected, got nil)
stack traceback:
[C]: in ?
(...tail calls...)
...ConTeXt/tex/texmf-context/tex/context/base/mkiv/l-io.lua:70: in 
function 'io.loaddata'
...onTeXt/tex/texmf-context/tex/context/base/mkiv/l-md5.lua:91: in 
upvalue 'checksum'
...eXt/tex/texmf-context/tex/context/base/mkiv/grph-fil.lua:97: in 
field 'run'
[ctxlua]:1: in main chunk


--

Any clues? For the moment, I switched back to the older version as I have to 
get some work finished, which is why I can't dig deeper at the moment. If a MWE 
would help, I'll try to make one later this week.

Thanks


Benjamin
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] new upload

2021-08-08 Thread Hans Hagen via ntg-context

On 8/8/2021 2:50 AM, Aditya Mahajan via ntg-context wrote:

On Sat, 7 Aug 2021, Hans Hagen via ntg-context wrote:


Hi,

I did a new upload. Attached is a document describing a new cheap (lmtx only)
feature. It's probably not that useful for most users, because it is meant for
somewhat extreme situations. but you never know.


How is this different from reading files from a zip file?
no duplicates, so in my use case .8 G instead of 1.8 G, with selective 
compression (no need to zip jpg or png), probably also bit more memory 
friendly and faster but i didn't check that (it's a side track of som 
escript that i had to write to check for duplicates, conflicts, 
inconsistencies in a large set of files)


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
___