Re: [NTG-context] pgfplots module wrecks in latest
On Mon, 16 Jan 2023, Hans Hagen via ntg-context wrote: > make sure to get rid of the t-tikz modules Tested again. Downloaded the latest context and pgf.tds.zip from ctan. Unizip pgf by using 'unzip -x "**/t-*.*" so that no t- modules from tikz are unzipped but still get the following error on a simple hello world example: \usemodule[tikz] \starttext Hello \stoptext gives the attached log. Does the latest pgf/tikz run at your end? Adityajob > passes > version mismatch: 1.32 <> 1.33 system > system > ConTeXt ver: 2023.01.15 14:04 LMTX fmt: 2023.1.16 int: english/english system > system > 'cont-new.mkxl' loaded open source > level 1, order 1, name '/opt/luametatex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > beware: some patches loaded from cont-new.mkiv close source> level 1, order 1, name '/opt/luametatex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > files > jobname './test', input './test.tex', result './test' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 1, order 2, name './test.tex' modules > 'tikz' is loaded open source > level 2, order 3, name '/opt/luametatex/texmf-context/tex/context/modules/mkxl/m-tikz.mkxl' open source > level 3, order 4, name 'pgfutil-common.tex' close source> level 3, order 4, name 'pgfutil-common.tex' open source > level 3, order 5, name 'pgfutil-context.def' close source> level 3, order 5, name 'pgfutil-context.def' open source > level 3, order 6, name 'pgfrcs.code.tex' open source > level 4, order 7, name 'pgf.revision.tex' close source> level 4, order 7, name 'pgf.revision.tex' close source> level 3, order 7, name 'pgfrcs.code.tex' open source > level 3, order 8, name 'pgfsys.code.tex' open source > level 4, order 9, name 'pgfkeys.code.tex' open source > level 5, order 10, name 'pgfkeyslibraryfiltered.code.tex' close source> level 5, order 10, name 'pgfkeyslibraryfiltered.code.tex' close source> level 4, order 10, name 'pgfkeys.code.tex' cld > stack > cld > stack > use : slot = context.functions.register(f) cld > stack > and : context.functions.unregister(slot) cld > stack > open source > level 4, order 11, name 'pgf.cfg' close source> level 4, order 11, name 'pgf.cfg' Driver file for pgf: pgfsys-luatex.def open source > level 4, order 12, name 'pgfsys-luatex.def' open source > level 5, order 13, name 'pgfsys-common-pdf.def' close source> level 5, order 13, name 'pgfsys-common-pdf.def' close source> level 4, order 13, name 'pgfsys-luatex.def' open source > level 4, order 14, name 'test.pgf' close source> level 4, order 14, name 'test.pgf' close source> level 3, order 14, name 'pgfsys.code.tex' open source > level 3, order 15, name 'pgfkeys.code.tex' close source> level 3, order 15, name 'pgfkeys.code.tex' open source > level 3, order 16, name 'pgfsyssoftpath.code.tex' close source> level 3, order 16, name 'pgfsyssoftpath.code.tex' open source > level 3, order 17, name 'pgfsysprotocol.code.tex' close source> level 3, order 17, name 'pgfsysprotocol.code.tex' open source > level 3, order 18, name 'pgfcore.code.tex' open source > level 4, order 19, name 'pgfmath.code.tex' open source > level 5, order 20, name 'pgfmathutil.code.tex' close source> level 5, order 20, name 'pgfmathutil.code.tex' open source > level 5, order 21, name 'pgfmathparser.code.tex' close source> level 5, order 21, name 'pgfmathparser.code.tex' open source > level 5, order 22, name 'pgfmathfunctions.code.tex' close source> level 5, order 22, name 'pgfmathfunctions.code.tex' open source > level 5, order 23, name 'pgfmathfunctions.basic.code.tex' close source> level 5, order 23, name 'pgfmathfunctions.basic.code.tex' open source > level 5, order 24, name 'pgfmathfunctions.trigonometric.code.tex' close source> level 5, order 24, name 'pgfmathfunctions.trigonometric.code.tex' open source > level 5, order 25, name 'pgfmathfunctions.random.code.tex' close source> level 5, order 25, name 'pgfmathfunctions.random.code.tex' open source > level 5, order 26, name 'pgfmathfunctions.comparison.code.tex' close source> level 5, order 26, name 'pgfmathfunctions.comparison.code.tex' open source > level 5, order 27, name 'pgfmathfunctions.base.code.tex' close source> level 5, order 27, name 'pgfmathfunctions.base.code.tex' open source > level 5, order 28, name 'pgfmathfunctions.round.code.tex' close source> level 5, order 28, name 'pgfmathfunctions.round.code.tex' open source > level 5, order 29, name 'pgfmathfunctions.misc.code.tex' close source> level 5, order 29, name 'pgfmathfunctions.misc.code.tex' open source > level 5, order 30, name 'pgfmathfunctions.integerarit
Re: [NTG-context] multimedia inclusion added to the wiki
Hi Pablo, Thank you for the article on the wiki. It will be very useful ! Best regards: Otared > On 16 Jan 2023, at 19:00, Pablo Rodriguez via ntg-context > wrote: > > Dear list, > > just in case it might help, I have just added a new wiki article about > how to add multimedia in PDF documents. > > https://wiki.contextgarden.net/Multimedia_Inclusion > > I hope it helps, > > Pablo > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] multimedia inclusion added to the wiki
Dear list, just in case it might help, I have just added a new wiki article about how to add multimedia in PDF documents. https://wiki.contextgarden.net/Multimedia_Inclusion I hope it helps, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] pgfplots module wrecks in latest
On 1/16/2023 6:23 PM, Aditya Mahajan via ntg-context wrote: On Mon, 16 Jan 2023, Henri Menke via ntg-context wrote: On Mon, 2023-01-16 at 11:56 -0500, Aditya Mahajan wrote: On Mon, 16 Jan 2023, Hans Hagen via ntg-context wrote: just load tikz first so that the right loader helpers are there \usemodule[tikz] \usemodule[pgfplots] \starttext Hello \stoptext seems to work here I did a fresh install of context and downloaded the latest version of pgf/tikz and pgfplots from ctan. Now, something is wrong with tikz: \usemodule[tikz] \starttext Hello \stoptext gives the attached log file. Not sure what changed on the tikz end. That's most likely due to https://github.com/pgf-tikz/pgf/issues/1062 https://github.com/pgf-tikz/pgf/pull/1073 but this MWE \catcode`\@=11 \begingroup \lccode`\~=`\" \lowercase{\endgroup \def\pgfmath@catcodes{% \catcode`\==12 % \catcode`\,=12 % \catcode`\|=12 % \catcode`\&=12 % \let~\pgfmath@char@quote }}% {\pgfmath@catcodes "} \bye works in Knuth TeX, so it's likely not our fault. So what's with the double quote ... I haven't looked pgf core in a while, but does it make sense to just redefine all the catcode jugglery in pgf as a catcodetable in m-tikz.mkxl? there is no gain in that as it is basically a tex catcode regime with a few differences; if you look in m-mkxl it's more some other things that can clash (they use some \meaning stuff and we need to temporary disable overload mode and disable some neat new features and such) make sure to get rid of the t-tikz modules 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 / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] pgfplots module wrecks in latest
On Mon, 16 Jan 2023, Henri Menke via ntg-context wrote: > On Mon, 2023-01-16 at 11:56 -0500, Aditya Mahajan wrote: > > > > On Mon, 16 Jan 2023, Hans Hagen via ntg-context wrote: > > > > > just load tikz first so that the right loader helpers are there > > > > > > \usemodule[tikz] > > > \usemodule[pgfplots] > > > > > > \starttext > > > Hello > > > \stoptext > > > > > > seems to work here > > > > I did a fresh install of context and downloaded the latest version of > > pgf/tikz and pgfplots from ctan. Now, something is wrong with tikz: > > > > \usemodule[tikz] > > > > \starttext > > Hello > > \stoptext > > > > gives the attached log file. Not sure what changed on the tikz end. > > That's most likely due to > > https://github.com/pgf-tikz/pgf/issues/1062 > https://github.com/pgf-tikz/pgf/pull/1073 > > but this MWE > > \catcode`\@=11 > > \begingroup > \lccode`\~=`\" > \lowercase{\endgroup > \def\pgfmath@catcodes{% > \catcode`\==12 % > \catcode`\,=12 % > \catcode`\|=12 % > \catcode`\&=12 % > \let~\pgfmath@char@quote > }}% > > {\pgfmath@catcodes "} > > \bye > > works in Knuth TeX, so it's likely not our fault. I haven't looked pgf core in a while, but does it make sense to just redefine all the catcode jugglery in pgf as a catcodetable in m-tikz.mkxl? Thanks, Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] pgfplots module wrecks in latest
On Mon, 2023-01-16 at 11:56 -0500, Aditya Mahajan wrote: > > On Mon, 16 Jan 2023, Hans Hagen via ntg-context wrote: > > > just load tikz first so that the right loader helpers are there > > > > \usemodule[tikz] > > \usemodule[pgfplots] > > > > \starttext > > Hello > > \stoptext > > > > seems to work here > > I did a fresh install of context and downloaded the latest version of > pgf/tikz and pgfplots from ctan. Now, something is wrong with tikz: > > \usemodule[tikz] > > \starttext > Hello > \stoptext > > gives the attached log file. Not sure what changed on the tikz end. That's most likely due to https://github.com/pgf-tikz/pgf/issues/1062 https://github.com/pgf-tikz/pgf/pull/1073 but this MWE \catcode`\@=11 \begingroup \lccode`\~=`\" \lowercase{\endgroup \def\pgfmath@catcodes{% \catcode`\==12 % \catcode`\,=12 % \catcode`\|=12 % \catcode`\&=12 % \let~\pgfmath@char@quote }}% {\pgfmath@catcodes "} \bye works in Knuth TeX, so it's likely not our fault. Cheers, Henri > > Thanks, > Aditya > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] pgfplots module wrecks in latest
On Mon, 16 Jan 2023, Hans Hagen via ntg-context wrote: > just load tikz first so that the right loader helpers are there > > \usemodule[tikz] > \usemodule[pgfplots] > > \starttext > Hello > \stoptext > > seems to work here I did a fresh install of context and downloaded the latest version of pgf/tikz and pgfplots from ctan. Now, something is wrong with tikz: \usemodule[tikz] \starttext Hello \stoptext gives the attached log file. Not sure what changed on the tikz end. Thanks, Aditya system > system > ConTeXt ver: 2023.01.15 14:04 LMTX fmt: 2023.1.16 int: english/english system > system > 'cont-new.mkxl' loaded open source > level 1, order 1, name '/opt/luametatex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > beware: some patches loaded from cont-new.mkiv close source> level 1, order 1, name '/opt/luametatex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > files > jobname './test', input './test.tex', result './test' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 1, order 2, name './test.tex' modules > 'tikz' is loaded open source > level 2, order 3, name '/opt/luametatex/texmf-context/tex/context/modules/mkxl/m-tikz.mkxl' open source > level 3, order 4, name 'pgfutil-common.tex' close source> level 3, order 4, name 'pgfutil-common.tex' open source > level 3, order 5, name 'pgfutil-context.def' close source> level 3, order 5, name 'pgfutil-context.def' open source > level 3, order 6, name 'pgfrcs.code.tex' open source > level 4, order 7, name 'pgf.revision.tex' close source> level 4, order 7, name 'pgf.revision.tex' close source> level 3, order 7, name 'pgfrcs.code.tex' open source > level 3, order 8, name 'pgfsys.code.tex' open source > level 4, order 9, name 'pgfkeys.code.tex' open source > level 5, order 10, name 'pgfkeyslibraryfiltered.code.tex' close source> level 5, order 10, name 'pgfkeyslibraryfiltered.code.tex' close source> level 4, order 10, name 'pgfkeys.code.tex' cld > stack > cld > stack > use : slot = context.functions.register(f) cld > stack > and : context.functions.unregister(slot) cld > stack > open source > level 4, order 11, name 'pgf.cfg' close source> level 4, order 11, name 'pgf.cfg' Driver file for pgf: pgfsys-luatex.def open source > level 4, order 12, name 'pgfsys-luatex.def' open source > level 5, order 13, name 'pgfsys-common-pdf.def' close source> level 5, order 13, name 'pgfsys-common-pdf.def' close source> level 4, order 13, name 'pgfsys-luatex.def' open source > level 4, order 14, name 'test.pgf' close source> level 4, order 14, name 'test.pgf' close source> level 3, order 14, name 'pgfsys.code.tex' open source > level 3, order 15, name 'pgfkeys.code.tex' close source> level 3, order 15, name 'pgfkeys.code.tex' open source > level 3, order 16, name 'pgfsyssoftpath.code.tex' close source> level 3, order 16, name 'pgfsyssoftpath.code.tex' open source > level 3, order 17, name 'pgfsysprotocol.code.tex' close source> level 3, order 17, name 'pgfsysprotocol.code.tex' open source > level 3, order 18, name 'pgfcore.code.tex' open source > level 4, order 19, name 'pgfmath.code.tex' open source > level 5, order 20, name 'pgfmathutil.code.tex' close source> level 5, order 20, name 'pgfmathutil.code.tex' open source > level 5, order 21, name 'pgfmathparser.code.tex' close source> level 5, order 21, name 'pgfmathparser.code.tex' open source > level 5, order 22, name 'pgfmathfunctions.code.tex' close source> level 5, order 22, name 'pgfmathfunctions.code.tex' open source > level 5, order 23, name 'pgfmathfunctions.basic.code.tex' close source> level 5, order 23, name 'pgfmathfunctions.basic.code.tex' open source > level 5, order 24, name 'pgfmathfunctions.trigonometric.code.tex' close source> level 5, order 24, name 'pgfmathfunctions.trigonometric.code.tex' open source > level 5, order 25, name 'pgfmathfunctions.random.code.tex' close source> level 5, order 25, name 'pgfmathfunctions.random.code.tex' open source > level 5, order 26, name 'pgfmathfunctions.comparison.code.tex' close source> level 5, order 26, name 'pgfmathfunctions.comparison.code.tex' open source > level 5, order 27, name 'pgfmathfunctions.base.code.tex' close source> level 5, order 27, name 'pgfmathfunctions.base.code.tex' open source > level 5, order 28, name 'pgfmathfunctions.round.code.tex' close source> level 5, order 28, name 'pgfmathfunctions.round.code.tex' open source > level 5, order 29, name 'pgfmathfunctions.misc.code.tex' close source> level 5, order 29, name 'pgfmathfunctions.misc.code.tex' open source > level 5, order 30, name 'pgfmathfunctions.integerarithmetic
Re: [NTG-context] question about multimedia renderings
On 1/16/23 02:42, Michal Vlasák via ntg-context wrote: > [...] > I would think that something like the attached could work. But in some > cases it fails on the TeX side with something I am not sure about. I > probably overlooked something. Anyways the idea is to just use the > Start/StopRendering actions with the correct label. Hi Michal, many thanks for your reply. Your code fixes the "auto" option. At least with the following sample: \setupinteraction[state=start] \unexpanded\def\IncludeVideo[#1] {\definerenderingwindow[#1] [width=\textwidth, height=\textwidth, framecolor=red] \userendering[#1][video/mp4][#1] [embed=yes, auto] \placerenderingwindow[#1][#1]} \starttext \null\page \startTEXpage[offset=1em, pagestate=start] \IncludeVideo[video-1.mp4] \stopTEXpage \null\page \startTEXpage[offset=1em, pagestate=start] \IncludeVideo[video-2.mp4] \stopTEXpage \null\page \stoptext I attach a diff and complete file with the the fix from today and the addition of controls, volume, repeat and opacity you sent me some days ago (already sent in https://mailman.ntg.nl/pipermail/dev-context/2022/003957.html). Just in case Hans may review your code and merge into ConTeXt. Many thanks for your help, Pablo--- /home/ousia/Desktop/lpdf-wid.lmt +++ /home/ousia/mkxl/lpdf-wid.lmt @@ -64,6 +64,10 @@ local v_compress = variables.compress local v_list = variables.list local v_title = variables.title +local v_controls = variables.controls +local v_volume = variables.volume +local v_repeat = variables["repeat"] +local v_opacity= variables.opacity local lpdf = lpdf @@ -615,7 +619,7 @@ -- sound is different, no window (or zero) so we need to collect them and -- force them if not set -local ms, mu, mf = { }, { }, { } +local mu, mf = { }, { }, { } local function delayed(label) local reserved = mu[label] @@ -623,7 +627,7 @@ reserved = pdfreserveobject() mu[label] = reserved end -return pdfreference(reserved) +return reserved end local function checkedreference(ref) @@ -639,16 +643,16 @@ local openpage = specification.openpage local closepage = specification.closepage local option= settings_to_hash(specification.option) -if option[v_auto] then -if not openpage or openpage == "" then -openpage = variables.StartCurrentRendering -end -if not closepage or closepage == "" then -closepage = variables.StopCurrentRendering -end -end openpage = checkedreference(openpage) closepage = checkedreference(closepage) +if option[v_auto] then +if not openpage then +openpage = executers.startrendering(label) +end +if not closepage then +closepage = executers.stoprendering(label) +end +end if openpage or closepage then actions = pdfdictionary { PO = openpage, @@ -656,13 +660,8 @@ } end local page = tonumber(specification.page) or texgetcount("realpageno") -- todo -local r = mu[label] or pdfreserveobject() -- reserve, child refers to parent -local a = pdfdictionary { -S = pdfconstant("Rendition"), -R = mf[label], -OP = 0, -AN = pdfreference(r), -} +local r = delayed(label) -- reserve, child refers to parent +local a = executers.startrendering(label) local bs, bc = pdfborder() local d = pdfdictionary { Subtype = pdfconstant("Screen"), @@ -676,7 +675,6 @@ local width = specification.width or 0 local height = specification.height or 0 context(nodeinjections.annotation(width,height,0,d(),r)) -- save ref -return pdfreference(r) end -- some dictionaries can have a MH (must honor) or BE (best effort) capsule @@ -713,7 +711,7 @@ -- B = start, -- } -- } -local parameters = pdfdictionary { +local permissions = pdfdictionary { Type = pdfconstant("MediaPermissions"), TF = pdfstring("TEMPALWAYS"), -- TEMPNEVER TEMPEXTRACT TEMPACCESS TEMPALWAYS / needed for acrobat/wmp } @@ -733,6 +731,20 @@ forcereference = option[v_list] ~= v_no, } end +local media_play_params = pdfdictionary { +Type = pdfconstant("MediaPlayParams"), +BE = pdfdictionary { +C = option[v_controls] and option[v_controls] ~= v_no or false, +V = tonumber(option[v_volume]) or 100, +RC = tonumber(option[v_repeat]) or 1, +}, +} +local media_screen_params = pdfdictionary { +Type = pdfconstant("MediaScreenParams"), +BE = pdfdi
Re: [NTG-context] pgfplots module wrecks in latest
On 1/16/2023 3:21 AM, Aditya Mahajan via ntg-context wrote: On Fri, 30 Dec 2022, Hans Hagen via ntg-context wrote: On 12/30/2022 12:40 AM, Gavin via ntg-context wrote: Hi List, The TikZ related module “pgfplots” is causing a fatal error in the latest ConTeXt. Here is a MWE: \usemodule[tikz] \usemodule[pgfplots]% PGFPlots module for graphs \starttext \starttikzpicture \draw (0, 0) circle (3cm); \stoptikzpicture \stoptext Without loading the pgfplots module, this draws a circle. With the \usemodule[pgfplots] line, this has the error below before doing anything. I don’t know when this started happening, because I don’t use pgfplots often, but it was probably in the last couple months. Thanks for all the great updates! these extra modules have bad loaders ... i'll send you better ones to test pgfplots still appears to be broken in LMTX: \usemodule[pgfplots] \starttext Hello \stoptext gives tex error > tex error on line 521 in file pgfplots.code.tex: Use of \pgfplots@command@to@string@@ doesn't match its definition just load tikz first so that the right loader helpers are there \usemodule[tikz] \usemodule[pgfplots] \starttext Hello \stoptext seems to work here loaders are in the distribution (it makes no sense to have 2000 dedicated loader modules for all that tikz/pgf provides, ) 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 / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___