[NTG-context] Use of context in lua (was: date calculated with currentdate plus n days)

2018-08-14 Thread Jan U. Hasecke
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") >

Re: [NTG-context] how to put page X of N in header or top space?

2018-08-14 Thread David Walther
On Wed, Aug 15, 2018 at 05:41:33AM +0200, Wolfgang Schuster wrote: \setuppagenumbering [alternative=doublesided, location=none, page=no] Thanks Wolfgang, that works like a champ. Now I've found the documentation for ConTeXt in Debian, it is tucked away in

Re: [NTG-context] Logo in the margin at the bottom of the page

2018-08-14 Thread Henri Menke
You have to use the correct margin width, i.e. \rightmarginwidth in the right margin and vice versa in the left margin. You should also scale the margins to fit in the backspace/cutspace because by default they don't and run off the paper. \showframe \useMPlibrary[dum] \setuplayout

Re: [NTG-context] how to put page X of N in header or top space?

2018-08-14 Thread Wolfgang Schuster
\setuppagenumbering [alternative=doublesided, location=none, page=no] Wolfgang David Walther schrieb am 14.08.18 um 22:44: Thank you Wolfgang, that worked nicely. Two artifacts I'm not sure how to address: I did page Page X of N, but in the output, it displays like Page 2of 3,

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-14 Thread Aditya Mahajan
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

Re: [NTG-context] how to put page X of N in header or top space?

2018-08-14 Thread Alan Braslau
On Tue, 14 Aug 2018 14:19:25 -0700 David Walther wrote: > On Tue, Aug 14, 2018 at 02:58:58PM -0600, Alan Braslau wrote: > >On Tue, 14 Aug 2018 13:44:43 -0700 > >David Walther wrote: > > > >> I did page Page X of N, but in the output, it displays like > >> Page 2of 3, Page 1of 3, etc. It

Re: [NTG-context] Logo in the margin at the bottom of the page

2018-08-14 Thread Fabrice Couvreur
Hi Hraban, It seems a little more complicated but I have never used the layers. Fabrice Le mar. 14 août 2018 à 13:11, Henning Hraban Ramm a écrit : > Am 2018-08-14 um 12:13 schrieb Fabrice Couvreur < > fabrice1.couvr...@gmail.com>: > > > Hello, > > I wish to place a small logo at the bottom of

Re: [NTG-context] how to put page X of N in header or top space?

2018-08-14 Thread David Walther
On Tue, Aug 14, 2018 at 02:58:58PM -0600, Alan Braslau wrote: On Tue, 14 Aug 2018 13:44:43 -0700 David Walther wrote: I did page Page X of N, but in the output, it displays like Page 2of 3, Page 1of 3, etc. It ignores the space between the number and the word of. You must have forgotten

Re: [NTG-context] how to put page X of N in header or top space?

2018-08-14 Thread Alan Braslau
On Tue, 14 Aug 2018 13:44:43 -0700 David Walther wrote: > I did page Page X of N, but in the output, it displays like > Page 2of 3, Page 1of 3, etc. It ignores the space between the number and the > word of. You must have forgotten the trailing "\ " of "\userpagenumber\ ". Alan

Re: [NTG-context] how to put page X of N in header or top space?

2018-08-14 Thread David Walther
Thank you Wolfgang, that worked nicely. Two artifacts I'm not sure how to address: I did page Page X of N, but in the output, it displays like Page 2of 3, Page 1of 3, etc. It ignores the space between the number and the word of. Secondly, when I use the doublesided and the

Re: [NTG-context] how to put page X of N in header or top space?

2018-08-14 Thread Wolfgang Schuster
\setuppagenumbering [alternative=doublesided, % doublesided layout %alternative={singlesided,doublesided}, % singlesided layout with left/right pages location=none] \setupheadertexts [My Spreadsheet] \setupheadertexts [] [Page \userpagenumber\ of \lastuserpagenumber]

Re: [NTG-context] embedded sounds aren’t played

2018-08-14 Thread Hans Hagen
On 8/14/2018 5:38 PM, Pablo Rodriguez wrote: Dear list, this is sounds-001.tex from the examples: \definerenderingwindow [example] [width=0pt,height=0pt,frame=off] \setupinteraction[state=start] \useexternalrendering [mysound] [audio/mpeg] %

[NTG-context] how to put page X of N in header or top space?

2018-08-14 Thread David Walther
Hi, I am slowly learning ConTeXt. I am generating tables and spreadsheets, and transforming them into ConTeXt, finally got it working after a lot of mysterious errors about missing } as macro arguments. I have read this page carefully: http://wiki.contextgarden.net/Layout How can I alter the

Re: [NTG-context] \definetextbackground does not fill tables within

2018-08-14 Thread Alan Braslau
On Tue, 14 Aug 2018 09:49:05 +0200 Hans Hagen wrote: > > 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? >

[NTG-context] embedded sounds aren’t played

2018-08-14 Thread Pablo Rodriguez
Dear list, this is sounds-001.tex from the examples: \definerenderingwindow [example] [width=0pt,height=0pt,frame=off] \setupinteraction[state=start] \useexternalrendering [mysound] [audio/mpeg] % audio/x-mp3 [akkerman.mp3] [embed]

Re: [NTG-context] \startregister…\stopregister bug?

2018-08-14 Thread Wolfgang Schuster
You forgot the second argument for \startregister and \stopregister. \defineregister[TesT] \starttext \startregister[TesT][one]{samples} \input knuth \page \startregister[TesT][two]{more} \input ward \stopregister[TesT][one] \page zapf \stopregister[TesT][two] \blank[3*big]

[NTG-context] \startregister…\stopregister bug?

2018-08-14 Thread Alan Bowen
In the latest beta (2018.08.10), \defineregister[TesT] \starttext \startregister[TesT]{samples} \input knuth \page \input ward \stopregister[TesT] \blank[3*big] \placeregister[TesT] \stoptext produces on page 2 the index entry *samples 1* when one expects *samples 1–2* Alan

Re: [NTG-context] date calculated with currentdate plus n days

2018-08-14 Thread Pablo Rodriguez
On 08/14/2018 09:24 AM, Henri Menke wrote: > On 14/08/18 17:29, Pablo Rodriguez wrote: >> [...] >> Where are those context.* Lua commands documented? >> >> I want to generate an xtable using Lua code, but I don’t know where to read. > > They aren't documented because they are just the context

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-14 Thread Rik Kabel
On 8/13/2018 18:43, Rik Kabel wrote: On 8/13/2018 15:52, Wolfgang Schuster wrote: Rik Kabel schrieb am 13.08.18 um 20:27: On 8/13/2018 13:46, Wolfgang Schuster wrote: \starttext \BeforePar{\dontleavehmode\llap{? }}\GotoPar \input knuth \startnarrower \BeforePar{\dontleavehmode\llap{?

Re: [NTG-context] Scite + ConTeXt

2018-08-14 Thread Ken Moffat
On Tue, Aug 14, 2018 at 12:17:06PM +0200, Fabrice Couvreur wrote: > Hi Ken, > In which file ? > Fabrice > As a user, on the command line: xdg-mime is a command to set preferences. But I said 'perhaps' because it depends on the rest of your desktop adhering to freedesktop.org standards. > > Le

Re: [NTG-context] Framed flush bottom

2018-08-14 Thread Hans Hagen
On 8/14/2018 11:53 AM, Henri Menke wrote: Dear list, According to the wiki page for \setupalign "height" Fill the height: press the last line's baseline against the lower boundary. but that doesn't see to work in framed.  How can I get the interline space stretched to flush to the bottom? 

Re: [NTG-context] Logo in the margin at the bottom of the page

2018-08-14 Thread Henning Hraban Ramm
Am 2018-08-14 um 12:13 schrieb Fabrice Couvreur : > Hello, > I wish to place a small logo at the bottom of the page. > It works almost but it is not very well adjusted. > How to cure it ? Salut, while the footer text approach may be viable, I’d use layers for exact placement.

Re: [NTG-context] Logo in the margin at the bottom of the page

2018-08-14 Thread Fabrice Couvreur
Hi Henri, Thank you for your suggestion. However, I believe that my way of doing should not be the best because fixing width=\marginwidth the image is cropped. Fabrice \showframe \useMPlibrary[dum] \setuplayout [height=middle, width=middle, backspace=2cm, topspace=10mm,

Re: [NTG-context] Logo in the margin at the bottom of the page

2018-08-14 Thread Henri Menke
On 14/08/18 22:13, Fabrice Couvreur wrote: Hello, I wish to place a small logo at the bottom of the page. It works almost but it is not very well adjusted. How to cure it ? Thank you. fabrice \showframe \useMPlibrary[dum] \setuplayout   [height=middle,    width=middle,    backspace=2cm,   

Re: [NTG-context] Scite + ConTeXt

2018-08-14 Thread Fabrice Couvreur
Hi Ken, In which file ? Fabrice Le mar. 14 août 2018 à 02:18, Ken Moffat a écrit : > On Tue, Aug 14, 2018 at 01:54:06AM +0200, Fabrice Couvreur wrote: > > > How to have evince as the default reader ? > > > perhaps > > xdg-mime default evince.desktop application/pdf > > ĸen > -- >

[NTG-context] Logo in the margin at the bottom of the page

2018-08-14 Thread Fabrice Couvreur
Hello, I wish to place a small logo at the bottom of the page. It works almost but it is not very well adjusted. How to cure it ? Thank you. fabrice \showframe \useMPlibrary[dum] \setuplayout [height=middle, width=middle, backspace=2cm, topspace=10mm, bottomspace=10mm,

[NTG-context] Framed flush bottom

2018-08-14 Thread Henri Menke
Dear list, According to the wiki page for \setupalign "height" Fill the height: press the last line's baseline against the lower boundary. but that doesn't see to work in framed. How can I get the interline space stretched to flush to the bottom? MWE is below. Cheers, Henri ---

Re: [NTG-context] \definetextbackground does not fill tables within

2018-08-14 Thread Hans Hagen
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]

Re: [NTG-context] Scite + ConTeXt

2018-08-14 Thread Hans Hagen
On 8/14/2018 2:06 AM, Alan Braslau wrote: On Tue, 14 Aug 2018 01:54:06 +0200 Fabrice Couvreur wrote: Hello, As I am having some problems with Emacs, I will try to use Scite ! 1. How to insert an environment ? That is with AUCTEX + Emacs, I was doing C-c C-e but how do with Scite ? 2. To

Re: [NTG-context] date calculated with currentdate plus n days

2018-08-14 Thread Henri Menke
On 14/08/18 17:29, Pablo Rodriguez wrote: On 08/14/2018 01:46 AM, Henri Menke wrote: On top of that I recommend to use context.date to get the correct formatting according to the current language options: \def\duedate{\ctxlua{ local t = os.date('*t', os.time()+ 10 * 24 * 3600)