[NTG-context] referencing is broken in version: 2018.08.15 18:45

2018-08-15 Thread Rik Kabel

With this example code from the wiki (slightly modified for use here):

   \setuppapersize[A5]
   \starttext
   \placeformula[eq:pythagoras]
   \startformula
  a^2+b^2=c^2
   \stopformula
   This is explained in \in{Equation}{.}[eq:pythagoras]
   \stoptext

The following output is obtained:

A good excuse to stop for the night, thank you.

--
Rik

___
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] structures.lists.ordered empty in latest beta

2018-08-15 Thread Joseph Canedo
I also noticed that (at least some) latelua functions do not seem called (They 
output stuff in the log and these are no longer present).

De : Hans Hagen
Envoyé le :mercredi 15 août 2018 23:32
À : ntg-context@ntg.nl >> mailing list for ConTeXt users
Objet :Re: [NTG-context] structures.lists.ordered empty in latest beta

On 8/15/2018 10:37 PM, Joseph Canedo wrote:
> Hi,
> 
> I use the global lua table ConTeXt provides called : 
> structures.lists.ordered to perform some manipulations with sections 
> (using structures.lists.ordered.section which is itself a lua table), 
> but from latest beta it seems that that variable (a lua table) is now 
> completely empty. Is this expected ?
afaik nothing changed


-
   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
___

___
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 can I remove a blank leading line from a buffer

2018-08-15 Thread Rik Kabel

On 8/15/2018 03:07, Hans Hagen wrote:

On 8/15/2018 5:31 AM, Aditya Mahajan wrote:

On Tue, 14 Aug 2018, Rik Kabel wrote:

I really think, though, that a buffers.strip function would be the 
way to go, instead of futzing after the damage is done.


In lua, buffers.getcontent('name') gives the contents of the buffer 
labelled 'name'. You can post-process this in whatever way you want. 
For example, you could write a lua function userdata.strip that 
strips the leading and ending black spaces from a string, and then call


context(userdata.strip(buffers.getcontent('name)))

local s = [[

foo

bar


bar

]]

print(string.fullstrip(s))


So, it looks likethe following is closer to working for me in a simple 
test harness, but not in my full-blown work:


   
\dontleavehmode{\llap{StripA~}}\ctxlua{context(utilities.strings.striplines(string.gsub(buffers.getcontent("TestBuffer"),"^\\relax",""),"prune"))}

(or similar with string.fullstrip).

However, it fails when the buffer starts with an unescaped left square 
bracket. That is probably why the \relax is inserted, and I can see that 
it is not a simple job to handle this. So, I will accept that I must 
either append [] or get rid of the open layout for these cases.


I suspect that the issue in the larger project has to do with quoting 
for the RE ("^\\relax") since compilation fails with:


   %% \stopAttribution ...getcontent("Attribution"),"^\\
   %% relax","")))}\stopparagrap...

Any pointers on such quoting would be appreciated.

--
Rik
___
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] structures.lists.ordered empty in latest beta

2018-08-15 Thread Hans Hagen

On 8/15/2018 10:37 PM, Joseph Canedo wrote:

Hi,

I use the global lua table ConTeXt provides called : 
structures.lists.ordered to perform some manipulations with sections 
(using structures.lists.ordered.section which is itself a lua table), 
but from latest beta it seems that that variable (a lua table) is now 
completely empty. Is this expected ?

afaik nothing changed


-
  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
___

[NTG-context] structures.lists.ordered empty in latest beta

2018-08-15 Thread Joseph Canedo
Hi,

I use the global lua table ConTeXt provides called : structures.lists.ordered 
to perform some manipulations with sections (using 
structures.lists.ordered.section which is itself a lua table), but from latest 
beta it seems that that variable (a lua table) is now completely empty. Is this 
expected ?

Thanks a lot
Best regards

Joseph

___
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] embedded sounds aren’t played

2018-08-15 Thread Hans Hagen

On 8/15/2018 10:17 PM, Pablo Rodriguez wrote:

On 08/15/2018 09:34 PM, Hans Hagen wrote:

On 8/15/2018 7:25 PM, Pablo Rodriguez wrote:

If you need it you can spend some time on deciphering the latest spec
and tell me what is missing.


I need it. I already spent some time trying to decipher what was wrong.
But I failed. It seems that I need to investigate further.


one needs a minimal example that works without side effects and not
using flash with all crap objects/keys that are not needed removed


I hope to be able to provide the document (or the suggestion) in the
near future ).

BTW, I’m afraid that with the changes to lpdf-wid.lua, not even what
worked before is working now.

But I’m going to investigate this and see what I can get to get the
situation improved.

it works here with a mp3 filew in the current path

-
  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] embedded sounds aren’t played

2018-08-15 Thread Pablo Rodriguez
On 08/15/2018 09:34 PM, Hans Hagen wrote:
> On 8/15/2018 7:25 PM, Pablo Rodriguez wrote:
>>> If you need it you can spend some time on deciphering the latest spec
>>> and tell me what is missing.
>>
>> I need it. I already spent some time trying to decipher what was wrong.
>> But I failed. It seems that I need to investigate further.
> 
> one needs a minimal example that works without side effects and not 
> using flash with all crap objects/keys that are not needed removed

I hope to be able to provide the document (or the suggestion) in the
near future ).

BTW, I’m afraid that with the changes to lpdf-wid.lua, not even what
worked before is working now.

But I’m going to investigate this and see what I can get to get the
situation improved.

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] embedded sounds aren’t played

2018-08-15 Thread Hans Hagen

On 8/15/2018 7:25 PM, Pablo Rodriguez wrote:

On 08/14/2018 06:35 PM, Hans Hagen wrote:

On 8/14/2018 5:38 PM, Pablo Rodriguez wrote:

Dear list,

this is sounds-001.tex from the examples:
[...]
As I cannot check it myself with Acrobat for Linux (it seems to lack a
player for MP3 files), I asked at the Spanish TeX mailing list whether
they can play the MP3 file embedded in the PDF file.


I have no clue. But these interactive media features in pdf are such a
mess. Embedding a simple sound file or video has become a pain and
changed over time.


I know. RichMedia is even an extension to the PDF spec 1.7
(https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/adobe_supplement_iso32000.pdf).


I think that the modern way is to create a bunch of useless objects,
embed a shockwave (soon obsolete flash) player etc etc and who knows
what in a few years. While all we want is to embed a sound file
(afaik the old easy ways are obsolete).


As long as it isn’t deprecated, I would like to use MediaClip (to be
able to handle it with JS code).


One can only use acrobat to check. My most recent version is 10.1 and
i'm not going to subscribe to some lock-in pro version for 20 euro per
month in order to check if code still works.


http://www.davidgilmour.com/freedom/ uses a similar approach (although
no MediaClip, but RichMedia instead). And they work fine with latest
Acrobat Reader.


Having the file in the same paths seems to work so maybe something is
missing.


This is also my impression, but I still haven’t found what I’m looking
for (https://www.youtube.com/watch?v=e3-5YC_oHjE).


One problem i remember is that when one adds too many key/values one
suddenly gets sounds mentioned in side bars and so.


I only want to embed a single audio file per PDF document.


If you need it you can spend some time on deciphering the latest spec
and tell me what is missing.


I need it. I already spent some time trying to decipher what was wrong.
But I failed. It seems that I need to investigate further.


one needs a minimal example that works without side effects and not 
using flash with all crap objects/keys that are not needed removed


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] latest beta (2018.08.14 23:10)

2018-08-15 Thread Pablo Rodriguez
On 08/15/2018 06:31 PM, Pablo Rodriguez wrote:
> On 08/15/2018 05:49 PM, Alan Bowen wrote:
>> When I run the latest standalone beta, the following
>>
>> \starttext
>> Hello, world!
>> \stoptext
>>
>> fails with the error message:
>> [...]
> 
> I can confirm the break in the compilation.

Many thanks, Hans, for fixing this in beta from 2018.08.15 18:45.

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] embedded sounds aren’t played

2018-08-15 Thread Pablo Rodriguez
On 08/14/2018 06:35 PM, Hans Hagen wrote:
> On 8/14/2018 5:38 PM, Pablo Rodriguez wrote:
>> Dear list,
>>
>> this is sounds-001.tex from the examples:
>> [...]
>> As I cannot check it myself with Acrobat for Linux (it seems to lack a
>> player for MP3 files), I asked at the Spanish TeX mailing list whether
>> they can play the MP3 file embedded in the PDF file.
> 
> I have no clue. But these interactive media features in pdf are such a 
> mess. Embedding a simple sound file or video has become a pain and 
> changed over time.

I know. RichMedia is even an extension to the PDF spec 1.7
(https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/adobe_supplement_iso32000.pdf).

> I think that the modern way is to create a bunch of useless objects,
> embed a shockwave (soon obsolete flash) player etc etc and who knows
> what in a few years. While all we want is to embed a sound file
> (afaik the old easy ways are obsolete).

As long as it isn’t deprecated, I would like to use MediaClip (to be
able to handle it with JS code).

> One can only use acrobat to check. My most recent version is 10.1 and 
> i'm not going to subscribe to some lock-in pro version for 20 euro per 
> month in order to check if code still works.

http://www.davidgilmour.com/freedom/ uses a similar approach (although
no MediaClip, but RichMedia instead). And they work fine with latest
Acrobat Reader.

> Having the file in the same paths seems to work so maybe something is
> missing.

This is also my impression, but I still haven’t found what I’m looking
for (https://www.youtube.com/watch?v=e3-5YC_oHjE).

> One problem i remember is that when one adds too many key/values one
> suddenly gets sounds mentioned in side bars and so.

I only want to embed a single audio file per PDF document.

> If you need it you can spend some time on deciphering the latest spec 
> and tell me what is missing.

I need it. I already spent some time trying to decipher what was wrong.
But I failed. It seems that I need to investigate further.

>> Decompressing the PDF file, I see that there are two similar objects:
> 
> \nopdfcompression save you that step

I know, but the output from "mutool clean -d" is more readable to me.
And it comes also handy to add in text messages.

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] latest beta (2018.08.14 23:10)

2018-08-15 Thread Pablo Rodriguez
On 08/15/2018 05:49 PM, Alan Bowen wrote:
> When I run the latest standalone beta, the following
> 
> \starttext
> Hello, world!
> \stoptext
> 
> fails with the error message:
> [...]

I can confirm that the break in the compilation.

Exactly the same message here.

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] latest beta (2018.110.14)

2018-08-15 Thread Alan Bowen
When I run the latest standalone beta, the following

\starttext
Hello, world!
\stoptext

fails with the error message:

lua error   > lua error on line 5 in file
/Users/bowen1/Desktop/TestTeX/test-01.tex:


...eXt/tex/texmf-context/tex/context/base/mkiv/cldf-ini.lua:1120: no string
to print

stack traceback:

[C]: in function 'tex.sprint'

...eXt/tex/texmf-context/tex/context/base/mkiv/cldf-ini.lua:1120: in
upvalue 'sprint'

...eXt/tex/texmf-context/tex/context/base/mkiv/cldf-bas.lua:180: in upvalue
'ctx_latelua'

...eXt/tex/texmf-context/tex/context/base/mkiv/anch-pos.lua:643: in
function <...eXt/tex/texmf-context/tex/context/base/mkiv/anch-pos.lua:601>

(...tail calls…)


1

2

3 \starttext

4

5 >>  Hello, world!

6

7 \stoptext

8


Alan
___
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] XML to ConTeXt: converting date attribute from ISO date

2018-08-15 Thread Hans Hagen

On 8/15/2018 12:27 PM, Mike O'Connor wrote:

G’Day,

Having a first go at converting TEI XML to ConTeXt.

Steep learning curve, but easier (for me) than XSLT, and first results 
were amazing.  Using 
http://www.pragma-ade.com/general/manuals/xml-mkiv.pdf as a guide.


Currently stuck on converting an ISO format date (eg. 1908-01-10) into 
something more readable (eg. 10 January 1908) in the output.  I presume 
I should create a function (?luacode) that can take any ISO value and 
output the readable form.  The following works but seems to me inefficient.


Grateful for any pointers.

Mike

Here is my MWE:

\startbuffer[demo]

     
         
             
                 
                     type="divDate">10.I.08

                 
                 
19 Mar '08
                 
             
         
     

\stopbuffer

\startxmlsetups xml:initialize
\xmlsetsetup{#1}{date}{xml:date}
\stopxmlsetups
\xmlregistersetup{xml:initialize}

\startxmlsetups xml:date
\xmldoifelse {#1}{.[@type='divDate']} {
\def\docdate{\ctxlua{
local tyear = string.sub('\xmlatt{#1}{when-iso}',1,4)
local tmonth = string.sub('\xmlatt{#1}{when-iso}',6,7)
local tday = string.sub('\xmlatt{#1}{when-iso}',9,10)
context.date{d = tday, m = tmonth, y = tyear}
}}
\docdate[day,month,year] = Document Date \par
     } {
\def\docdate{\ctxlua{
local tyear = string.sub('\xmlatt{#1}{when-iso}',1,4)
local tmonth = string.sub('\xmlatt{#1}{when-iso}',6,7)
local tday = string.sub('\xmlatt{#1}{when-iso}',9,10)
context.date{d = tday, m = tmonth, y = tyear}
}}
\docdate[day,month,year] = Event Date\par
}
\stopxmlsetups

\starttext
\xmlprocessbuffer{main}{demo}{}
\stoptext

Can be wikified ...

\startluacode
function xml.finalizers.tex.MyDate(e,what,how)
local t = string.split(e[1].at[what],"-")
context.date(
{ y = t[1], m = t[2], d = t[3] },
{ how }
)
end
\stopluacode

\startxmlsetups xml:date

\xmldoifelse {#1}{.[@type='divDate']} {
\xmlfilter{#1}{./MyDate("when-iso","day,month,year")}\
Document Date \par
} {
\xmlfilter{#1}{./MyDate("when-iso","day,month,year")}\
Event Date\par

}
\stopxmlsetups

-
  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
___

[NTG-context] XML to ConTeXt: converting date attribute from ISO date

2018-08-15 Thread Mike O'Connor
G’Day,

Having a first go at converting TEI XML to ConTeXt.  

Steep learning curve, but easier (for me) than XSLT, and first results were 
amazing.  Using http://www.pragma-ade.com/general/manuals/xml-mkiv.pdf 
 as a guide.

Currently stuck on converting an ISO format date (eg. 1908-01-10) into 
something more readable (eg. 10 January 1908) in the output.  I presume I 
should create a function (?luacode) that can take any ISO value and output the 
readable form.  The following works but seems to me inefficient.

Grateful for any pointers.

Mike

Here is my MWE:

\startbuffer[demo]





10.I.08


19 Mar 
'08





\stopbuffer

\startxmlsetups xml:initialize
\xmlsetsetup{#1}{date}{xml:date}
\stopxmlsetups

\xmlregistersetup{xml:initialize}

\startxmlsetups xml:date

\xmldoifelse {#1}{.[@type='divDate']} {
\def\docdate{\ctxlua{
local tyear = string.sub('\xmlatt{#1}{when-iso}',1,4)
local tmonth = string.sub('\xmlatt{#1}{when-iso}',6,7)
local tday = string.sub('\xmlatt{#1}{when-iso}',9,10)
context.date{d = tday, m = tmonth, y = tyear}
}}

\docdate[day,month,year] = Document Date \par
} {
\def\docdate{\ctxlua{
local tyear = string.sub('\xmlatt{#1}{when-iso}',1,4)
local tmonth = string.sub('\xmlatt{#1}{when-iso}',6,7)
local tday = string.sub('\xmlatt{#1}{when-iso}',9,10)
context.date{d = tday, m = tmonth, y = tyear}
}}

\docdate[day,month,year] = Event Date\par
}
\stopxmlsetups

\starttext
\xmlprocessbuffer{main}{demo}{}
\stoptext___
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] \definetextbackground does not fill tables within

2018-08-15 Thread Xavier B.
On Tue, 14 Aug 2018 09:49:05 +0200
Hans Hagen  ha escrit:

> On 8/13/2018 11:37 PM, dxpubl...@posteo.net wrote:
> > Hi,
> > 
> > I have simple document which I define my \definetextbackground: 
> > \startteoria and \stopteoria (see below). When I use it and put table 
> > within, the table does not get filled with color. Any solution?
> \setupfloats[table][freeregion=no]
> 


Thanks a lot, Hans. It works.

Does it have any collateral effects?

___
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 can I remove a blank leading line from a buffer

2018-08-15 Thread Hans Hagen

On 8/15/2018 5:31 AM, Aditya Mahajan wrote:

On Tue, 14 Aug 2018, Rik Kabel wrote:

I really think, though, that a buffers.strip function would be the way 
to go, instead of futzing after the damage is done.


In lua, buffers.getcontent('name') gives the contents of the buffer 
labelled 'name'. You can post-process this in whatever way you want. For 
example, you could write a lua function userdata.strip that strips the 
leading and ending black spaces from a string, and then call


context(userdata.strip(buffers.getcontent('name)))

local s = [[

foo

bar


bar

]]

print(string.fullstrip(s))



-
  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] Use of context in lua

2018-08-15 Thread Henri Menke



On 15/08/18 17:46, Jan U. Hasecke wrote:

On 14.08.2018 16:58, Pablo Rodriguez wrote:

I rewrote your sample as (xtables are the only tables I know in ConTeXt):

 \starttext
 \startlua
 context.startxtable()
 context.startxrow()
  context.startxcell()
   context("Note 1")
  context.stopxcell()
  context.startxcell()
   context("Note 2")
  context.stopxcell()
 context.stopxrow()
 context.startxrow()
  context.startxcell()
   context("Note 3")
  context.stopxcell()
  context.startxcell()
   context("Note 4")
  context.stopxcell()
 context.stopxrow()
 context.stopxtable()
 \stoplua
 \stoptext


Seeing this example I wonder if there is already an example taking a
csv-file and creating a table based on its content. I guess building
blocks are readfile, loops and setting the stop sign (; oder ,).


It already exists:
- Database module
  http://wiki.contextgarden.net/M-database
- handlecsv module

https://modules.contextgarden.net/cgi-bin/module.cgi/ruid=55907888/action=view/id=86



As I know a bit of Python, at least, I might be able to search for the
building blocks in the doku. ;-)

juh
___
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
___