[NTG-context] Re: list of modules: need changes/testing/response
Am 31.08.23 um 18:00 schrieb Mojca Miklavec: On Wed, 30 Aug 2023 at 20:17, Henning Hraban Ramm wrote: * t-gnuplot (2013, Mojca) It would certainly not hurt to somewhat modernise the code, switch to t-filter etc., but last time I checked it still worked even with lmtx. … I would definitely keep it in TeX Live. As far as LMTX installer is concerned ... no clue. Ok, thank you! Hraban ___ 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] Re: list of modules: need changes/testing/response
Am 01.09.23 um 17:27 schrieb Pablo Rodriguez: On 8/31/23 18:26, Henning Hraban Ramm wrote: [...] I have just updated both modules and they are TDS compilant again (or so I guess). Ehm, no. Have a look into https://modules.contextgarden.net/dl/presvoz/ and https://modules.contextgarden.net/dl/t-handlecsv/ This seems to be fixed now, Hraban. Yes, looks good. BTW, it is really hard in the updating process not giving any hint about the name of the module being updated. I wonder whether this could be improved somehow. There’s a lot I’d like to improve in our handling of modules… I’ll make a list, a few things might be worth discussing (see https://meeting.contextgarden.net/2023/programme.shtml Monday 18:30). Hraban ___ 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] (feature proposal) link to attachments: /GoToE
Hi Hans, having attachments in PDF is very useful, but the vast majority of people don’t know how to handle them (even with the attachment pane displayed when Acrobat opens the document, or with file annotation). It would be really useful to have a link with destination that it would open the embedded document (when clicked). Since in its basic functionality, this is very similar to links to external documents (GoToR), I wonder whether it would be possible to implement links to embedded documents (GoToE, https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf#G11.2048909). At least to begin with, only links to embedded children documents would be required. If this GoToR is generated by ConTeXt from "\goto{whatever}[destination-doc::page(15)]": 17 0 obj << /D [ 14 /Fit ] /F (destination-doc.pdf) /NewWindow true /S /GoToR >> endobj A GoToE destination for "\attachment[file=destination-doc.pdf, method=hidden]" would read: 1 0 obj << /S /GoToE /D [ 14 /Fit ] /NewWindow true /T << /R /C /N (destination-doc.pdf) >> >> endobj With EmbeddedFiles, the F entry from GoToR is a target dictionary (T key) in GoToE. The T dictionary contains the relation (R key) to the destination file (only C, child, needed) and the name (N) from EmbeddedFiles/Names for the attachment. This is the most basic implementation that allows to link to an attachment. What the spec describes as “a complete facility for linking between a file in a hierarchy of nested embedded files and another file in the same or different hierarchy” is probably unnecesarily complex (even to use). With file annotations, instead of the name from EmbeddedFiles/Names in the target dictionary, it requires the keys P and A (as numbers or strings). P gives the page number which contains the file annotation: zero-based as number, or named destination as string. A gives the annotation: zero-based index of the annotation in the Annots array, or NM entry value from the annotation object. As for the interface, it would be great that GoToR links could be converted automatically in "\goto{some text}[file::page(number)]" for attached files. This basic implementation of GoToE links would be extremely helpful to access embedded documents (believe it or not, this is something I explain almost every week at work). I would be happy to provide the code to implement this, but I’m afraid this is way beyond my knowledge. Many thanks for your help, 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 ___
[NTG-context] Re: (feature proposal) link to attachments: /GoToE
On 9/3/2023 12:17 PM, Pablo Rodriguez wrote: Hi Hans, having attachments in PDF is very useful, but the vast majority of people don’t know how to handle them (even with the attachment pane displayed when Acrobat opens the document, or with file annotation). It would be really useful to have a link with destination that it would open the embedded document (when clicked). Since in its basic functionality, this is very similar to links to external documents (GoToR), I wonder whether it would be possible to implement links to embedded documents (GoToE, https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf#G11.2048909). At least to begin with, only links to embedded children documents would be required. If this GoToR is generated by ConTeXt from "\goto{whatever}[destination-doc::page(15)]": 17 0 obj << /D [ 14 /Fit ] /F (destination-doc.pdf) /NewWindow true /S /GoToR >> endobj A GoToE destination for "\attachment[file=destination-doc.pdf, method=hidden]" would read: 1 0 obj << /S /GoToE /D [ 14 /Fit ] /NewWindow true /T << /R /C /N (destination-doc.pdf) >> >> endobj With EmbeddedFiles, the F entry from GoToR is a target dictionary (T key) in GoToE. The T dictionary contains the relation (R key) to the destination file (only C, child, needed) and the name (N) from EmbeddedFiles/Names for the attachment. This is the most basic implementation that allows to link to an attachment. What the spec describes as “a complete facility for linking between a file in a hierarchy of nested embedded files and another file in the same or different hierarchy” is probably unnecesarily complex (even to use). With file annotations, instead of the name from EmbeddedFiles/Names in the target dictionary, it requires the keys P and A (as numbers or strings). P gives the page number which contains the file annotation: zero-based as number, or named destination as string. A gives the annotation: zero-based index of the annotation in the Annots array, or NM entry value from the annotation object. As for the interface, it would be great that GoToR links could be converted automatically in "\goto{some text}[file::page(number)]" for attached files. This basic implementation of GoToE links would be extremely helpful to access embedded documents (believe it or not, this is something I explain almost every week at work). I would be happy to provide the code to implement this, but I’m afraid this is way beyond my knowledge. remind me in a month or so ... i'm not going to touch that part of the code now (some other priorities) 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 ___
[NTG-context] Re: (feature proposal) link to attachments: /GoToE
On 9/3/23 12:46, Hans Hagen wrote: > On 9/3/2023 12:17 PM, Pablo Rodriguez wrote: >> [...] >> This basic implementation of GoToE links would be extremely helpful to >> access embedded documents (believe it or not, this is something I >> explain almost every week at work). >> >> I would be happy to provide the code to implement this, but I’m >> afraid this is way beyond my knowledge. > remind me in a month or so ... i'm not going to touch that part of the > code now (some other priorities) Perfectly fine for me, Hans. 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 ___
[NTG-context] ifxmlselfempty
Is it possible that the new \ifxmlselfempty has reversed its outcome? Or did I something wrong in this MWE?Here an MWE. yours sincerelydr. Hans van der Meer xmlsetup-template.pdf Description: Adobe PDF document \startbuffer[test]!not empty node!\stopbuffer\startxmlsetups xml:mysetups \xmlsetsetup{\xmldocument}{something|emptynode|notemptynode}{xml:*}\stopxmlsetups\xmlregistersetup{xml:mysetups}\startxmlsetups xml:emptynodenode=\xmltag{#1}:\crlfifxmlselfempty-else-fi:\space\ifxmlselfempty{#1} attribute = \xmlatt{#1}{value}\else content = \xmlflush{#1}\fi\crlfifxmlselfempty-else-fi reversed:\space\ifxmlselfempty{#1} content = \xmlflush{#1}\else attribute = \xmlatt{#1}{value}\fi\blank\stopxmlsetups\startxmlsetups xml:notemptynodenode=\xmltag{#1}:\crlfifxmlselfempty-else-fi:\space\ifxmlselfempty{#1} attribute = \xmlatt{#1}{value}\else content = \xmlflush{#1}\fi\crlfifxmlselfempty-else-fi reversed:\space\ifxmlselfempty{#1} content = \xmlflush{#1}\else attribute = \xmlatt{#1}{value}\fi\blank\stopxmlsetups\startxmlsetups xml:something\xmlall{#1}{./emptynode}\blank\xmlall{#1}{./notemptynode}\blank\stopxmlsetups\starttext\ConTeXt\ \contextversion\blank \xmlprocessbuffer{main}{test}{}\stoptext___ 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] Re: (feature proposal) link to attachments: /GoToE
Am 03.09.23 um 13:03 schrieb Pablo Rodriguez: On 9/3/23 12:46, Hans Hagen wrote: On 9/3/2023 12:17 PM, Pablo Rodriguez wrote: [...] This basic implementation of GoToE links would be extremely helpful to access embedded documents (believe it or not, this is something I explain almost every week at work). I would be happy to provide the code to implement this, but I’m afraid this is way beyond my knowledge. remind me in a month or so ... i'm not going to touch that part of the code now (some other priorities) Perfectly fine for me, Hans. While I don’t know what’s missing under the hood, I think there’s just a “reference” key missing in \attachment or \setupattachment: \setupinteraction[state=start] \starttext \samplefile{lorem} \attachment[ file={hacker.jpg}, title={Hacker}, symbol=Paperclip, author=Hans, location=inmargin, reference=foobar, ] As you can see in \in{attachment}[foobar], we’re hacking away … \stoptext Hraban ___ 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] Re: (feature proposal) link to attachments: /GoToE
On 9/3/23 16:02, Henning Hraban Ramm wrote: > Am 03.09.23 um 13:03 schrieb Pablo Rodriguez: > [...] > While I don’t know what’s missing under the hood, I think there’s just a > “reference” key missing in \attachment or \setupattachment: Many thanks for your reply, Hraban. I’m afraid that \in{attachment}[foobar] doesn‘t generate a link in your sample. Or do you get a link border from the following source? \setupinteraction[state=start] \enabledirectives[references.border=green] \starttext \startTEXpage[offset=1em] \attachment[ file={hacker.jpg}, method=hidden, reference=foobar, ] \goto{Link to attachment}[foobar] \stopTEXpage \stoptext Many thanks for your help, 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 ___
[NTG-context] Cron /var/www/aanhet.net/context/bin/cron/context-mirror
receiving incremental file list ./ ctan.lsr document-2.htm download-1.htm download-2.htm logo-ade.png logo-cts.png logo-pod.png rss.xml show-fil.pdf context/latest/ context/latest/cont-lmt.zip context/latest/cont-mpd.zip context/latest/cont-ppc.zip context/latest/cont-sci.zip context/latest/cont-tmf.zip context/latest/cont-tst.7z context/latest/cont-tst.tar.xz context/latest/cont-tst.zip general/manuals/ general/manuals/primitives.pdf sent 177,498 bytes received 39,927,460 bytes 3,487,387.65 bytes/sec total size is 566,594,609 speedup is 14.13 Running archiver: New dir: /var/www/aanhet.net/context//htdocs/archives/context-2023-09-03.20 235019522 /var/www/aanhet.net/context//htdocs/archives/context-2023-09-03.20/latest 126745317 /var/www/aanhet.net/context//htdocs/archives/context-2023-09-03.20/current 361768935 /var/www/aanhet.net/context//htdocs/archives/context-2023-09-03.20 361768935 total ___ 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] Re: Reinserting a section title followed by (continued) after a page break
On the off chance anyone seeing this is interested, I have a solution uploaded as part of a module I wrote for screenplay and stageplay writing: https://github.com/cjayross/drama.mkiv/blob/4a9b2576c8630fd03352d95f99456092f6e21190/drama.mkiv#L480 The solution ended up being very detailed and tightly coupled to this particular problem. However, the general approach was to use box registers to capture the portions of dialog marked using a command sequence (`\continue` in this case) that designates acceptable locations to insert a page break in the dialog. The markup is then placed into the document in pieces with each placement testing the `\pagetotal` against the `\pagegoal` to measure whether the current piece will fit on the current page. This solution had to up using `\synchronizeoutput` as opposed to `\triggerpagebuilder`. I'm not sure why there's a difference in behavior between the two, but the former seems to fix bugs where the `\pagetotal`s would output the measure of the previous page rather than the current one -- leading to sporadic page breaks. ___ 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] Bug or feature? \numexpression and hashes
Hi, list. The following fails with a "Missing number, treated as zero" error prompt: \starttext \expandedrepeat2{\expandedrepeat2{\the\numexpression#I+#P\relax\ }} \stoptext OTOH, \numexpr works seamlessly. Tested on ConTeXt 2023.09.03 19:03. Thanks in advance. Best regards, Jairo ___ 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] TOC with sections titles and page numbers like a paragraph beneath chapter
I am attempting to get a TOC that looks like the following (in other words with section titles and their relative page numbers in a block below the chapter): Chapter 1 ...5 Section 1 5, Section 2 6, Section 3 7, Section 4 8, Section 5 9 etc Chapter 2 10 Section 1 10, Section 2 11, Section 3 12, Section 4 13, Section 5 14 etc As I really had no idea how to do this, I found https://wiki.contextgarden.net/Horizontal_Table_of_Contents thinking it might help, but none of it compiles (for me) in LMTX. So I tried something different, e.g. \definelist[chapter] \setuplist[chapter][label=yes,distance=1.5cm,alternative=c,style=normal,before=\blank] \definelist[section] \setuplist[section] [textcommand=\setups{SecToc}] \setupcombinedlist [content]o [list={chapter,section}] \startsetups [SecToc] \startframedtext [width=\textwidth, align=middle, frame=off] \placelist [section] [ criterium=chapter, ] \stopframedtext \stopsetups While that produces a result, it is nothing like what I want above. Has anyone put together a TOC of this kind and might be able to give me a hint to follow? Julian ___ 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] Re: TOC with sections titles and page numbers like a paragraph beneath chapter
jbf schrieb am 04.09.2023 um 08:34: I am attempting to get a TOC that looks like the following (in other words with section titles and their relative page numbers in a block below the chapter): Chapter 1 ...5 Section 1 5, Section 2 6, Section 3 7, Section 4 8, Section 5 9 etc Chapter 2 10 Section 1 10, Section 2 11, Section 3 12, Section 4 13, Section 5 14 etc As I really had no idea how to do this, I found https://wiki.contextgarden.net/Horizontal_Table_of_Contents thinking it might help, but none of it compiles (for me) in LMTX. So I tried something different, e.g. [...] While that produces a result, it is nothing like what I want above. Has anyone put together a TOC of this kind and might be able to give me a hint to follow? Please send *working* (which include some dummy content) examples. The example below results in section entries which are listed as a paragraph, what output do you expect here. \setuplist[chapter][alternative=c] \setuplist[section][alternative=d] \starttext \completecontent \dorecurse{2} {\chapter{Chapter #1} \dorecurse{10}{\section{Section ##1}}} \stoptext Wolfgang ___ 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 ___