[NTG-context] Both pdfinfo & exiftool have trouble with 1.0.4 but works with 1.0.3
Hi, We use PDF tools like mutool, pdfinfo (from poppler) and exiftool in our workflow (once the PDFs are created by ConTeXt). But looks like we have hit upon some regression issue between 1.0.3 and 1.0.4 versions. Both pdfinfo (from poppler) and exiftool are able to read PDFs created from 1.0.3 but have trouble reading PDFs created with 1.0.4. Please see below logs for details. Our 1.0.4 is from April-2021. We will try to upgrade to the latest 1.0.4 and try again. mtx-context | ConTeXt Process Management 1.04 mtx-context | mtx-context | main context file: /ConTeXt/apr2021/tex/texmf-context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2021.04.21 11:39 mtx-context | main context file: /ConTeXt/apr2021/tex/texmf-context/tex/context/base/mkxl/context.mkxl mtx-context | current version: 2021.04.21 11:39 mtx-context | ConTeXt Process Management 1.03 mtx-context | mtx-context | main context file: /ConTeXt/sep2020/tex/texmf-context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2020.09.20 23:02 mtx-context | main context file: /ConTeXt/sep2020/tex/texmf-context/tex/context/base/mkiv/context.mkxl mtx-context | current version: 2020.09.20 23:02 *pdfinfo (from Poppler)* ~/TeX$ pdfinfo Hello-world_1.0.4.pdf Syntax Error: Missing 'endstream' or incorrect stream length Syntax Error: Missing 'endstream' or incorrect stream length Title: Hello world! Subject:A ConTeXt template Keywords: template Author: Mickey Mouse Creator:LuaMetaTeX 2.09 20210418 + ConTeXt LMTX 2021.04.21 11:39 Producer: LuaMetaTeX-2.09 CreationDate: Tue Aug 10 10:18:36 2021 +08 ModDate:Tue Aug 10 10:18:36 2021 +08 Tagged: no UserProperties: no Suspects: no Form: none JavaScript: no Pages: 2 Encrypted: no Page size: 612 x 792 pts (letter) Page rot: 0 File size: 39062 bytes Optimized: no PDF version:1.7 ~/TeX$ pdfinfo Hello-world_1.0.3.pdf Title: Hello world! Subject:A ConTeXt template Keywords: template Author: Mickey Mouse Creator:LuaTeX 2.07 20200920 + ConTeXt MkIV 2020.09.20 23:02 Producer: LuaTeX-2.07 CreationDate: Tue Aug 10 09:16:30 2021 +08 ModDate:Tue Aug 10 09:16:30 2021 +08 Tagged: no UserProperties: no Suspects: no Form: none JavaScript: no Pages: 2 Encrypted: no Page size: 612 x 792 pts (letter) Page rot: 0 File size: 39861 bytes Optimized: no PDF version:1.7 *exiftool* ~/exiftool/Image-ExifTool-12.29/exiftool Hello-world_1.0.4.pdf ExifTool Version Number : 12.29 File Name : Hello-world_1.0.4.pdf Directory : . File Size : 38 KiB File Modification Date/Time : 2021:08:10 10:19:52+08:00 File Access Date/Time : 2021:08:10 10:20:17+08:00 File Inode Change Date/Time : 2021:08:10 10:19:52+08:00 File Permissions: -rwxr-x--- File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.7 Linearized : No Warning : Error reading stream data ~/exiftool/Image-ExifTool-12.29/exiftool Hello-world_1.0.3.pdf ExifTool Version Number : 12.29 File Name : Hello-world_1.0.3.pdf Directory : . File Size : 39 KiB File Modification Date/Time : 2021:08:10 09:17:51+08:00 File Access Date/Time : 2021:08:10 09:18:00+08:00 File Inode Change Date/Time : 2021:08:10 09:17:51+08:00 File Permissions: -rwxr-x--- File Type : PDF File Type Extension : pdf MIME Type : application/pdf Linearized : No Author : Mickey Mouse Con Te Xt Jobname : Hello-world Con Te Xt LMTX : 0.10 Con Te Xt Support : contextgarden.net Con Te Xt Time : 2021-08-10 09:16 Con Te Xt Url : www.pragma-ade.com Con Te Xt Version : 2020.09.20 23:02 Create Date : 2021:08:10 09:16:30+08:00 ID : Hello-world | 2021-08-10T09:16:30+08:00 Keywords: template Modify Date : 2021:08:10 09:16:30+08:00 Subject : A ConTeXt template Te X Support: tug.org Language: en Format : application/pdf Creator : Mickey Mouse Description : A ConTeXt template Title : Hello world! Id : Hello-world | 2021-08-10T09:16:30+08:00 Con Te Xt Jobname : Hello-world Con Te Xt Time : 2021:08:10 09:16 Con Te Xt Url : www.pragma-ade.com Con Te Xt Support : contextgarden.net Co
Re: [NTG-context] nil from TeX to Lua
On Mon, 9 Aug 2021, Hans van der Meer via ntg-context wrote: > In the TeX to Lua interface with > > \def\Macro#1{\directlua{luafunction("#1")}} > > the transfer from TeX to Lua is by string. However what to do at the Lua end > when calling \Macro{}? > As I understand it, then on the Lua side an empty argument and an empty > string are indistinguishable. That is not the case: $ echo 'print("" == nil)' | lua false > This is not always wanted, for example when one needs to place either a nil > or an empty string into a Lua table. I am running in trouble when to t.key > set to \Macro{} should become nil or when it should become "". If you call luafunction(""), the string is empty and not nil. \startluacode userdata = userdata or {} function userdata.macro(str) if str == nil then context("Argument is nil") elseif str == "" then context("Argument is empty") else context("Argument is %s", str) end end \stopluacode \define[1]\Macro{\ctxlua{userdata.macro([==[#1]==])}} \starttext \startlines \Macro{} \Macro{ABC} \ctxlua{userdata.macro()} \stoplines \stoptext 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 ___
[NTG-context] nil from TeX to Lua
In the TeX to Lua interface with \def\Macro#1{\directlua{luafunction("#1")}} the transfer from TeX to Lua is by string. However what to do at the Lua end when calling \Macro{}? As I understand it, then on the Lua side an empty argument and an empty string are indistinguishable. This is not always wanted, for example when one needs to place either a nil or an empty string into a Lua table. I am running in trouble when to t.key set to \Macro{} should become nil or when it should become "". Is there some common understanding about how to handle this situation? 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 ___
[NTG-context] footnote interaction in titles
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] Create an enumeration style
Fabrice Couvreur schrieb am 09.08.2021 um 14:16: Hi Wolfgang, Thank you for your suggestion. I tested the code and the result is not what I expected from the second item : "2 exemple" instead of "2^{e} exemple", "3 exemple" instead of "3^{e} exemple" ... core-con.lua (line 1155): local ordinals = { [...] french = function(n) if n == 1 then return "er" + else + return "e" end end, } Then I tried to use the key alternative = serried but without success. This works for me: \defineenumeration [test] [text=, alternative=serried, width=fit, distance=.5em, 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 ___
Re: [NTG-context] Short forms and abbreviations in bibliography
Henning's suggestion for abbreviations should work fine for that issue. I could simply use the shorthand in the "series" and "journal" fields and set up the appropriate \abbreviation calls in the document or environment. As for the larger issue of bibliographies, I've started working on publ-imp-sbl.lua and publ-imp-sbl.mkvi files. I knew I would need this for my own project soon, and I felt it would be useful to myself and the ConTeXt community if I could at least get a rudimentary version working. I'm presently using the reference for examples from the *SBL Handbook of Style*, 2nd edition, available at https://github.com/dcpurton/biblatex-sbl/blob/master/test/biblatex-sbl-examples.ref.txt . Like you say, some parts are tricky. SBL uses "entry"-style citations by default and doesn't seem to make use of other common alternatives (such as "authoryear"). I can think of some existing alternatives that might get used in specific cases (e.g., "author", "title"), but the recommended shorthand has the form "shortauthor, shorttitle" (i.e., the last name(s) of the author(s) only, followed by a comma and a shortened form of the title as specified in the "shorttitle" field). I could make this the sbl style's implementation of the "short" alternative, since the LaTeX-style bracketed number references are foreign to SBL style anyway, but if would be preferable just to introduce another alternative (something like "authortitle"), then I could also try to do that. For my immediate purposes, I won't need much more than the @book, @article, @inbook, and @incollection entries, so my focus will be on getting those right, but if anyone is interested in helping, I'll gladly take help. (But it would probably be better to discuss the details in a separate e-mail thread.) Joey On Mon, Aug 9, 2021 at 4:12 AM Denis Maier via ntg-context < ntg-context@ntg.nl> wrote: > > > > -Ursprüngliche Nachricht- > > Von: ntg-context Im Auftrag von Henning > > Hraban Ramm via ntg-context > > Gesendet: Samstag, 7. August 2021 22:40 > > An: mailing list for ConTeXt users > > Cc: Henning Hraban Ramm > > Betreff: Re: [NTG-context] Short forms and abbreviations in bibliography > > > > > > > > > Am 07.08.2021 um 21:53 schrieb Joey McCollum via ntg-context > cont...@ntg.nl>: > > > > > > A separate list of abbreviations would then list "LSAWS" alongside > "Linguistic > > Studies in Ancient West Semitic" (and likewise for other journal/series > > abbreviations). > > > > Regarding abbreviations have a look at > > https://wiki.contextgarden.net/Command/definesynonyms > > > > It should be as easy as > > > > \abbreviation{LSAWS}{Linguistic Studies in Ancient West Semitic} > > > > The full name of \quote{LSAWS} is \infull{LSAWS}. > > > > \placelistofabbreviations > > > > > > I had a case where mostly abbreviations were used in the text but the > full name > > should appear in the index. > > I can provide the setup (including Lua functions), if it might help you. > > > > > > Can’t help with bibliographies, sorry. > > SBL is a tricky beast anyway. There were some discussions regarding > implementing Chicago Manual of Style a couple of weeks ago. Develelopments > on that front could also be useful for SBL. Don't know what came out of > this though. > > Denis > > > > > 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 > > ___ > ___ 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 forms and abbreviations in bibliography
> -Ursprüngliche Nachricht- > Von: ntg-context Im Auftrag von Henning > Hraban Ramm via ntg-context > Gesendet: Samstag, 7. August 2021 22:40 > An: mailing list for ConTeXt users > Cc: Henning Hraban Ramm > Betreff: Re: [NTG-context] Short forms and abbreviations in bibliography > > > > > Am 07.08.2021 um 21:53 schrieb Joey McCollum via ntg-context cont...@ntg.nl>: > > > > A separate list of abbreviations would then list "LSAWS" alongside > > "Linguistic > Studies in Ancient West Semitic" (and likewise for other journal/series > abbreviations). > > Regarding abbreviations have a look at > https://wiki.contextgarden.net/Command/definesynonyms > > It should be as easy as > > \abbreviation{LSAWS}{Linguistic Studies in Ancient West Semitic} > > The full name of \quote{LSAWS} is \infull{LSAWS}. > > \placelistofabbreviations > > > I had a case where mostly abbreviations were used in the text but the full > name > should appear in the index. > I can provide the setup (including Lua functions), if it might help you. > > > Can’t help with bibliographies, sorry. SBL is a tricky beast anyway. There were some discussions regarding implementing Chicago Manual of Style a couple of weeks ago. Develelopments on that front could also be useful for SBL. Don't know what came out of this though. Denis > > 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 ___