Re: [NTG-context] Problem with string.format (Lua)

2018-01-14 Thread Joseph Canedo
Hi Fabrice, string.format behaves more or less as C printf. You probably need to specify %.4g in 1st argument. Hope this helps Best Joseph De : Fabrice Couvreur Envoyé le :dimanche 14 janvier 2018 13:05 À : mailing list for ConTeXt users Objet :[NTG-context] Problem with string.format (Lua)

[NTG-context] uservariables in heads and lists

2018-01-14 Thread Henning Hraban Ramm
Hi, it’s been a while... For a scientific magazine I need subtitles in the margin and authors as well as subtitles in my ToC. I didn’t yet try the latter, since I got stuck with the first. Here’s my complete, not really working example: """ \usemodule[visual] \setuplayout[ backspace=21mm,

Re: [NTG-context] Problem with string.format (Lua)

2018-01-14 Thread Hans Hagen
On 1/14/2018 1:13 PM, Joseph Canedo wrote: Hi Fabrice, string.format behaves more or less as C printf. You probably need to specify %.4g in 1st argument. Hope this helps Best Joseph *De : *Fabrice Couvreur *Envoyé le :*dimanche 14 janvier 2018 13:05 *À 

Re: [NTG-context] Firstline problem with smallcaps

2018-01-14 Thread Hans Hagen
On 1/12/2018 10:47 PM, Rik Kabel wrote: When \setfirstline is used to set the first line of a paragraph in a small-cap style, the line is mis-set. This does not occur with every font and input, but occurs with most fonts and many inputs. The problem does not seem to be awakened by other styles

Re: [NTG-context] Command line tool for macro definitions

2018-01-14 Thread Hans Hagen
On 1/14/2018 1:56 AM, Henri wrote: Dear list, For TeX/LaTeX users there is the neat command line tool `texdef` with which you can show the definition of a macro.  Here an example: $ texdef -t latex section \section: \long macro:->\@startsection {section}{1}{\z@ }{-3.5ex \@plus -1ex \@minus

[NTG-context] Problem with string.format (Lua)

2018-01-14 Thread Fabrice Couvreur
Hello, I start with Lua and I try to display my result with 4 decimal places without success. Thank you Fabrice \startluacode function Binomial(n,k,p) if k > n then return nil end if k > n/2 then k = n - k end numer, denom = 1, 1 for i = 1, k do numer = numer * ( n - i +

Re: [NTG-context] Labels and Enumerations

2018-01-14 Thread Hans Hagen
On 1/13/2018 10:17 PM, Rik Kabel wrote: I would like to request the restoration of labels (\definelabel) to full citizenship in MKIV. While enumerations are more flexible in many ways, they cannot replace one particular use of labels if find necessary. Enumerations are paragraph entities,

Re: [NTG-context] Problem with string.format (Lua)

2018-01-14 Thread Hans Hagen
On 1/14/2018 9:50 PM, Fabrice Couvreur wrote: Hi Hans, Your code runs perfectly, thanks. However, if I replace % with \letterpercent, my code does not run \ctxlua{print(string.format("\letterpercent g",Binomial(100,60,0.25)))} because print prints to the console Thank you Fabrice

Re: [NTG-context] Problem with string.format (Lua)

2018-01-14 Thread Fabrice Couvreur
Hi Hans, Your code runs perfectly, thanks. However, if I replace % with \letterpercent, my code does not run \ctxlua{print(string.format("\letterpercent g",Binomial(100,60,0.25)))} Thank you Fabrice 2018-01-14 13:58 GMT+01:00 Hans Hagen : > On 1/14/2018 1:13 PM, Joseph Canedo

Re: [NTG-context] Labels and Enumerations

2018-01-14 Thread Rik Kabel
On 2018-01-14 09:46, Hans Hagen wrote: On 1/13/2018 10:17 PM, Rik Kabel wrote: I would like to request the restoration of labels (\definelabel) to full citizenship in MKIV. While enumerations are more flexible in many ways, they cannot replace one particular use of labels if find necessary.

[NTG-context] structureuservariable in ToC

2018-01-14 Thread Henning Hraban Ramm
Now, my second issue with user variables: """ \define[1]\ChapterTocEntry{% \doifnotempty{\structureuservariable{author}}{\structureuservariable{author}\crlf }% #1% \doifnotempty{\structureuservariable{subtitle}}{\crlf\structureuservariable{subtitle}}}

Re: [NTG-context] Labels and Enumerations

2018-01-14 Thread Rik Kabel
Further experimentation suggests that the problem is in the interaction between footnotes and margin placement. Endnotes work fine. \defineconstructionalternative   [mylabel]   [renderingsetup=constructionrenderings:mylabel,    width=]