Re: [NTG-context] columns and footnotes
On Mon, Oct 21, 2019 at 8:24 AM Henning Hraban Ramm wrote: > Hi again, > I’m testing columns again, and before I publish an article on the subject, > I’d like to check with you. > Best, Hraban > Hi Hraban, the attachment are >100K, I have made an exception but please try to stay under 100K next time. -- luigi ___ 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 viewer poll
On 2019-10-19, at 12:21, Henning Hraban Ramm wrote: >> Am 2019-10-15 um 08:17 schrieb Marcin Borkowski : Basically javascript can be limited to (1) setting annotation properties, like toggling layers or button renditions, and (2) some simple calculations (for forms). Constructing pdf runtime using javascript is pretty braindead (use html instead then). >>> >>> D’accord. >> >> Of course you are aware that limiting a powerful language is not an easy >> task? > > I am. But JS in PDF is completely different from PDF in browsers anyway (no > DOM!), so they don’t need a complete interpreter and could have limited PDF > scripting to a few commands, in JS syntax or anything else. Fair enough, although I don't have an association JS <-> browser ingrained so much - for me, JS is a general purpose language which happens to be embedded in browsers, but also many other places. Most of my JS code runs either on a server (backend code) or in a development environment (various, let's call it, DevOps-ish scripts). Only now and then I write JS for browsers, and then it is often crippled JS, full of things like "var" (because old browsers etc.) It is one of the puzzling areas to me: no problem in browsers and elsewhere but not in open source pdf viewers. It's not the most complex stuff so it probably indicates that no one cares much about these features. >>> >>> I wouldn’t say "no problem", because JS causes security problems everywhere. >> >> It's not JS that causes problems. Any other (powerful enough) language >> not specifically designed with browser environment in mind could be >> problematic here. I guess that having Perl, Python or Ruby instead of >> JS would create a similar set of problems. (Lua might be an exception >> due to its design and a possibility to whitelist functions for eval, >> AFAIR.) > > Of course any programming language is a security risk. More so if it runs in > an ubiquitous program like a browser. And since they created JavaScript for > that, JS causes problems. > > When I read "Java runs on millions of devices" I don’t feel that’s good > advertising, but it remembers me that each of those devices is at risk. I like this approach:-). There is also that old joke than "every time you install Java it gets moved from another device to yours", since the installer has been saying that "3 billion devices run Java" for almost two decades now. >> Just 2 cents from a JS programmer who actually thinks that JS is not the >> worst Lisp dialect out there. > > I didn’t say JS is bad. For me it’s a necessary evil. > I don’t think my beloved Python would be a better choice for client scripts. Python is a worse Lisp dialect than JS, but still nice. (Disclaimer: i have only written less than 1000 lines of Python in my life.) > Maybe Lua is, but every scriptable program is a risk. > LuaTeX and write18 _are_ dangerous. > It would be very easy to spread malicious TeX code, since everyone uses CTAN > (LaTeX) packages without checking them first. > But it wouldn’t come far, I guess, for it needs a while for a package to > become known and in wide use, and that still means only in a subset of the > (La)TeX community, where there are enough expert hackers who would find this > malicious code. Assuming that they would search for it. I'm less of an optimist here. > And you can count the people on one hand who would be able to publish a > malicious ConTeXt module… Malicious code snippets in our wiki or ML also > wouldn’t come far. That's interesting. It would be enough to have a "plain TeX virus", probably. I guess the main reason malicious ConTeXt code does not exist (assuming this is the case!) is that it is not economically viable - the ConTeXt community is too small. > > There was PDF malware (using JS or media stuff). There also was PostScript > malware in its time. The latter didn’t make a lot of sense, except it could > destroy RIP hardware. The RIP technician at the newspaper where I worked told > me stories, e.g. there was an evil EPS (some faulty customer logo, no > deliberate malware) that caused the deletion of important parts of the RIP > software. At my time there was a PS ghost: somehow a page got installed on > one of the printers and got printed at odd times. Reboot didn’t help, we > never found the cause. That's absolutely fascinating! Best, -- Marcin Borkowski http://mbork.pl ___ 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] LTMX crashes on OpenBSD 6.5 amd64
Hi Luigi, Unfortunately I cannot check with an up-to-date mkiv, since I didn't succeed in installing standalone mkiv binaries. But those file compile fine under TexLive 2018 context binaries packaged for OpenBSD 6.5. I will check tomorrow, whether my /home/ has got mount options that may lead to crashing, for example regarding w^x settings. Regards, Damien Thiriet ___ 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] issue splitting tables and horizontal mode
On 10/20/19 12:53 PM, Wolfgang Schuster wrote: > [...] > You can use the float environment and disable the counter. > [...] > Another option is framedtext which can be centered. Many thanks for your reply, Wolfgang. framedtext seems easier to me. > When you have a short table keeping them together can be better or do > you want short tables with five rows to be split across pages. In that case, I’d avoid the table split. But I don’t use many tables and they tend to contain many rows. Many thanks for your 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 ___
Re: [NTG-context] How to get attribute value from xml tag?
On 20-10-19 16:38, Thomas A. Schmitz wrote: On 20. Oct 2019, at 16:05, Geert Verhaag wrote: The \xmlfirst{#1}{distance} yields 20, but how can the unit attribute value km be accessed? Gerard \xmlattribute{#1}{/distance}{unit} (probably, you need to make a real example. See xml-mkiv.pdf, chapter 3.6) Thomas ___ 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 ___ -- Hi, Thomas, thanks a lot, and it is fairly simple if you know how to read the following (taken from page 22, chapter 3.6): \xmlattribute {...} {...} {...} finds a first match for LPATH at NODE and returns the value of attribute NAME or empty if no such attribute exists But now I get it, thanks! Regards, Gerard ___ 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] LMTX distorts PDF aspect
On 10/20/19 11:08 AM, Hans Hagen wrote: On Sat, Oct 19, 2019 at 12:07:03PM +0200, Pablo Rodriguez wrote: > [...] > 2. LMTX inserts the document distorting its aspect. > [...] > i have a fix but it has to be checked later on (no beta now) .. has to > to with rotation Many thanks for the fix, Hans. My concern was that the bug was overseen. 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 ___
Re: [NTG-context] How to get attribute value from xml tag?
> On 20. Oct 2019, at 16:05, Geert Verhaag wrote: > > The \xmlfirst{#1}{distance} yields 20, but how can the unit attribute value > km be accessed? > > Gerard > > \xmlattribute{#1}{/distance}{unit} (probably, you need to make a real example. See xml-mkiv.pdf, chapter 3.6) Thomas ___ 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] How to get attribute value from xml tag?
Hi, Struggling with XML in ConTeXt. I'have the following tag in my xml file: ... 20 ... \startxmlsetups xml:invoice:travel \xmlfirst{#1}{distance} \stopxmlsetups The \xmlfirst{#1}{distance} yields /20/, but how can the unit attribute value /km/ be accessed? Gerard -- ___ 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] issue splitting tables and horizontal mode
Pablo Rodriguez schrieb am 20.10.2019 um 12:36: On 10/20/19 11:49 AM, Wolfgang Schuster wrote: Pablo Rodriguez schrieb am 18.10.2019 um 16:23: [...] When splitting extreme tables, I cannot use \dontleavehmode. 1. What is the purpose of \dontleavehmode in your example? Sorry, Wolfgang, I forgot to mention. \dontleavehmode is required to center the table when \startmakeup[standard][align=center]. You can use the float environment and disable the counter. \starttext \startplacefigure [location={none,split}] \startxtable \dorecurse{100} {\startxrow \startxcell xxx \stopxcell \startxcell xxx \stopxcell \stopxrow} \stopxtable \stopplacefigure \stoptext Another option is framedtext which can be centered. \starttext \startframedtext [location=middle,width=fit,frame=off] \startxtable \startxrow \startxcell xxx \stopxcell \startxcell xxx \stopxcell \stopxrow \stopxtable \stopframedtext \stoptext 2. Why do you try to split a table in a makup environment (which will never work)? \setupxtable[split=yes] is a general setup for the whole document. I mean, I don’t want a table in the document to be stuck between pages. Only sometimes I have makeups with tables. And this was my first issue with the conflicting general setup. When you short table keeping them together can be better or do you want short tables with five rows to be split across pages. 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] issue splitting tables and horizontal mode
On 10/20/19 11:49 AM, Wolfgang Schuster wrote: > Pablo Rodriguez schrieb am 18.10.2019 um 16:23: >> [...] >> When splitting extreme tables, I cannot use \dontleavehmode. > 1. What is the purpose of \dontleavehmode in your example? Sorry, Wolfgang, I forgot to mention. \dontleavehmode is required to center the table when \startmakeup[standard][align=center]. > 2. Why do you try to split a table in a makup environment (which will > never work)? \setupxtable[split=yes] is a general setup for the whole document. I mean, I don’t want a table in the document to be stuck between pages. Only sometimes I have makeups with tables. And this was my first issue with the conflicting general setup. As written in my previous message, there was no clash some time (well, five years 😅) ago. >> Since this worked before, am I missing something or is this a bug? > It isn't a bug but a side effect of the way how split=yes works. > > The normal splitters uses a simple placement method where each table row > is placed below each other. To prevent unwanted white space between the > lines \nointerlineskip is used but the command works only a vertical > mode. With \dontleavehmode like in your example you force horizontal > mode for the table which results in the error message. Many thanks for your explanation. 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 ___
Re: [NTG-context] LTMX crashes on OpenBSD 6.5 amd64
On Sun, Oct 20, 2019 at 12:22 PM Hans Hagen wrote: > On 10/20/2019 11:11 AM, Damien Thiriet wrote: > > Hi, > > > > > > As I wrote yesterday, I have crashes on LTMX, openbsd6.5-amd64. > > LTMX version: > > > Bus error (core dumped) > could be pplib related Can you check also luatex mkiv ? -- luigi ___ 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] LTMX crashes on OpenBSD 6.5 amd64
On 10/20/2019 11:11 AM, Damien Thiriet wrote: Hi, As I wrote yesterday, I have crashes on LTMX, openbsd6.5-amd64. LTMX version: ConTeXt ver: 2019.10.10 18:15 MKIV beta fmt: 2019.10.19 int: english/english I was not yet able to trace why does it crashes. The crashes is connected with buses, but I can hardly say anything more. Here are the last lines of a crashed-compilation log. Looks likes the file was compiled and then something got wrong. Maybe something gets wrong after some time of compilation. Bigger files crash after 10–12 pages. mkiv lua stats > result saved in file: sprawdziany5C.pdf, compresslevel 3, objectcompresslevel 1 mkiv lua stats > loaded patterns: en::1 fr::55, load time: 0.000 mkiv lua stats > loaded fonts: 2 files: latinmodern-math.otf, lmsans10-regular.otf mkiv lua stats > font engine: otf 3.109, afm 1.513, tfm 1.000, 5 instances, 1 shared in backend, 0 common vectors, 1 common hashes, load time 0.321 seconds mkiv lua stats > metapost: 0.005 seconds, loading: 0.122, execution: 0.004, n: 3, average: 0.043, instances: 1, luacalls: 223, memory: 3.265 M mkiv lua stats > graphics processing time: 0.005 seconds including tex, 1 processed images, 1 unique asked, 1 bad names mkiv lua stats > font embedding time: 0.014 seconds, 1 fonts mkiv lua stats > used platform: linux, type: unix, binary subtree: texmf-openbsd6.5-amd64 mkiv lua stats > used engine: luametatex version 2.0, functionality level 20190729, format id 977 mkiv lua stats > control sequences: 46949 of 65536 + 10 mkiv lua stats > lua properties: engine: lua 5.4, used memory: 44 MB, ctx: 43 MB, max: 47 MB), hash chars: min(64,40), symbol mask: utf (τεχ) mkiv lua stats > runtime: 1.781 seconds, 10 processed pages, 10 shipped pages, 5.614 pages/second Bus error (core dumped) mtx-context | fatal error: return code: 35328 Shall I send the dump core somewhere? I have no clue how to trace it ... mabe Alan knows as he's on somekindofBSD too. 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] issue splitting tables and horizontal mode
Pablo Rodriguez schrieb am 18.10.2019 um 16:23: Dear list, I have another issue related to extreme tables. \setupxtable[split=yes] \starttext \startmakeup[standard] \dontleavehmode \startxtable[align={middle,lohi},columndistance=0em] \startxrow \startxcell \dontleavehmode \externalfigure[cow.pdf] [scale=500] \stopxcell \startxcell \dontleavehmode \externalfigure[cow.pdf] [scale=500] \stopxcell \stopxrow \stopxtable \stopmakeup \stoptext When splitting extreme tables, I cannot use \dontleavehmode. 1. What is the purpose of \dontleavehmode in your example? 2. Why do you try to split a table in a makup environment (which will never work)? Since this worked before, am I missing something or is this a bug? It isn't a bug but a side effect of the way how split=yes works. The normal splitters uses a simple placement method where each table row is placed below each other. To prevent unwanted white space between the lines \nointerlineskip is used but the command works only a vertical mode. With \dontleavehmode like in your example you force horizontal mode for the table which results in the error message. You can reproduce the error with the following minimal example: \starttext \dontleavehmode \vbox{} \nointerlineskip \vbox{} \stoptext The reason why this doens't happen when splitting is disabled or when the header or footer lines are repeated is that ConTeXt puts the collected lines for each table in a \vbox. When you flush the lines in the \vbox the are placed in vertical modes and your \dontleavehmode is only applied to the outer \vbox while the lines itself are placed in vertical mode. \starttext \dontleavehmode \vbox {\vbox{} \nointerlineskip \vbox{}} \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] LTMX crashes on OpenBSD 6.5 amd64
Hello, I don't think this is relevant, but lua 5.4 is not installed as a separate package (and nor is available as a package on OpenBSD 6.5). Greetings, Damien Thiriet ___ 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] LTMX crashes on OpenBSD 6.5 amd64
Hi, As I wrote yesterday, I have crashes on LTMX, openbsd6.5-amd64. LTMX version: ConTeXt ver: 2019.10.10 18:15 MKIV beta fmt: 2019.10.19 int: english/english I was not yet able to trace why does it crashes. The crashes is connected with buses, but I can hardly say anything more. Here are the last lines of a crashed-compilation log. Looks likes the file was compiled and then something got wrong. Maybe something gets wrong after some time of compilation. Bigger files crash after 10–12 pages. mkiv lua stats > result saved in file: sprawdziany5C.pdf, compresslevel 3, objectcompresslevel 1 mkiv lua stats > loaded patterns: en::1 fr::55, load time: 0.000 mkiv lua stats > loaded fonts: 2 files: latinmodern-math.otf, lmsans10-regular.otf mkiv lua stats > font engine: otf 3.109, afm 1.513, tfm 1.000, 5 instances, 1 shared in backend, 0 common vectors, 1 common hashes, load time 0.321 seconds mkiv lua stats > metapost: 0.005 seconds, loading: 0.122, execution: 0.004, n: 3, average: 0.043, instances: 1, luacalls: 223, memory: 3.265 M mkiv lua stats > graphics processing time: 0.005 seconds including tex, 1 processed images, 1 unique asked, 1 bad names mkiv lua stats > font embedding time: 0.014 seconds, 1 fonts mkiv lua stats > used platform: linux, type: unix, binary subtree: texmf-openbsd6.5-amd64 mkiv lua stats > used engine: luametatex version 2.0, functionality level 20190729, format id 977 mkiv lua stats > control sequences: 46949 of 65536 + 10 mkiv lua stats > lua properties: engine: lua 5.4, used memory: 44 MB, ctx: 43 MB, max: 47 MB), hash chars: min(64,40), symbol mask: utf (τεχ) mkiv lua stats > runtime: 1.781 seconds, 10 processed pages, 10 shipped pages, 5.614 pages/second Bus error (core dumped) mtx-context | fatal error: return code: 35328 Shall I send the dump core somewhere? Greetings, Damien Thiriet ___ 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] LMTX distorts PDF aspect
On 10/19/2019 9:04 PM, Pablo Rodriguez wrote: On 10/19/19 7:50 PM, Rudolf Bahr wrote: On Sat, Oct 19, 2019 at 12:07:03PM +0200, Pablo Rodriguez wrote: Dear list, using the document attached to this message with the following sample gives different outputs: [...] 2. LMTX inserts the document distorting its aspect. [...] ConTeXt ver: 2019.10.11 15:47 MKIV beta fmt: 2019.10.19 int: english/english The output of LMTX is compressed in the height whereas LuaTex isn't. Hi Rudolf, many thanks for confirming the bug. Sorry again, This was my fault. I forgot to mention that I was using latest beta (as I normally do). i have a fix but it has to be checked later on (no beta now) .. has to to with rotation - 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 ___