[NTG-context] numerator is too high in \frac{3}{4}, in palatino

2014-05-01 Thread Sanjoy Mahajan
I've noticed the following issue with how high the numerator is placed, but only when using Palatino: \setupbodyfont[palatino] \starttext \startformula {3\over4}\quad {1\over2} \stopformula \stoptext The 3 and the 1 sit quite high above the division line, esp. in comparison with the gap below the

Re: [NTG-context] too many open files?

2014-05-01 Thread Andrea Valle
Thanks a lot! -a- -- Andrea Valle -- CIRMA - StudiUm Università degli Studi di Torino --> http://www.cirma.unito.it/andrea/ --> http://www.fonurgia.unito.it/andrea/ --> http://www.flickr.com/photos/vand

[NTG-context] Empty heads after leading whitespace

2014-05-01 Thread Maggyero
> before=\empty, \empty is not even required. The problem with your solution (setting 'before=' i.e. empty) is that there is also no whitespace before a subsection which doesn't start on a new page. Any better ideas?

Re: [NTG-context] resize and center and clip image

2014-05-01 Thread Wolfgang Schuster
Am 01.05.2014 um 20:00 schrieb Aditya Mahajan : > On Thu, 1 May 2014, Mikael P. Sundqvist wrote: >> \startluacode >> userdata = userdata or {} >> function userdata.lundklippfyllbild(str, bredd, hojd) >> if tex.dimen[0] / tex.dimen[2] < tex.dimen[4] / tex.dimen[6] then >> local skalning = >> -

Re: [NTG-context] resize and center and clip image

2014-05-01 Thread Mikael P. Sundqvist
On Thu, May 1, 2014 at 8:00 PM, Aditya Mahajan wrote: > On Thu, 1 May 2014, Mikael P. Sundqvist wrote: >> >> \startluacode >> userdata = userdata or {} >> function userdata.lundklippfyllbild(str, bredd, hojd) >> if tex.dimen[0] / tex.dimen[2] < tex.dimen[4] / tex.dimen[6] then >> local skalni

Re: [NTG-context] automatically adding commands to some characters

2014-05-01 Thread Pablo Rodriguez
On 04/29/2014 12:10 AM, Rik Kabel wrote: > On 2014-04-28 17:53, Pablo Rodriguez wrote: >> [...] >> Is there any command that allows the addition of arbitrary commands when >> a character appears in text? I mean, a way that internally replaces >> "Council Directive 93/98/EEC" with "Council Directive

Re: [NTG-context] Empty heads after leading whitespace

2014-05-01 Thread Thangalin
\setuphead[section][% placehead=empty, before=, after=] \setuphead[subsection][% placehead=yes, before=\empty, after={\blank[line]}] \setupheadertexts[section] \starttext \showframe \section{My section} \subsection{My subsection (whitespace before)} % Here is my problem. \p

Re: [NTG-context] resize and center and clip image

2014-05-01 Thread Aditya Mahajan
On Thu, 1 May 2014, Mikael P. Sundqvist wrote: \startluacode userdata = userdata or {} function userdata.lundklippfyllbild(str, bredd, hojd) if tex.dimen[0] / tex.dimen[2] < tex.dimen[4] / tex.dimen[6] then local skalning = -0.5*(tex.dimen[4]/tex.dimen[0]*tex.dimen[2]-tex.dimen[6]) cont

Re: [NTG-context] resize and center and clip image

2014-05-01 Thread Otared Kavian
Hi Mikael, With your new definitions and lua code I could typeset and test a few examples: it is very nice, thanks for sharing! Best regards: OK On 1 mai 2014, at 17:07, Mikael P. Sundqvist wrote: > Interesting, > > I use ConTeXt ver: 2014.04.28 23:24 MKIV beta fmt: 2014.4.29 int: > engli

Re: [NTG-context] resize and center and clip image

2014-05-01 Thread Mikael P. Sundqvist
Interesting, I use ConTeXt ver: 2014.04.28 23:24 MKIV beta fmt: 2014.4.29 int: english/english and it works. I now defined this with argument: \startluacode userdata = userdata or {} function userdata.lundklippfyllbild(str, bredd, hojd) if tex.dimen[0] / tex.dimen[2] < tex.dimen[4] / tex.dime

Re: [NTG-context] resize and center and clip image

2014-05-01 Thread Otared Kavian
Hi Mikael, Out of curiosity I tried to typeset your example (after adding the usual \starttext, \stoptext), but using ConTeXt ver: 2014.04.28 23:24 MKIV beta fmt: 2014.4.29 int: english/english I obtained a TeX error: tex error > error on line 13 in file /Users/kavian/Contex

Re: [NTG-context] resize and center and clip image

2014-05-01 Thread Mikael P. Sundqvist
OK, sorry for the noise. I think I have the solution: \startexternalfigurecollection[k.jpg] \useexternalfigure[k.jpg][k.jpg] \stopexternalfigurecollection \externalfigurecollectionminwidth{k.jpg} \externalfigurecollectionmaxheight{k.jpg} \clip[width=8cm,height=7cm]{% \framed[width=8cm,hei

[NTG-context] resize and center and clip image

2014-05-01 Thread Mikael P. Sundqvist
Hi! Assume that I want to fill in the text area with images, and I want to clip and scale them according to these rules: 1) If the image is "too wide" (in sense of proportions), then scale it so that the height fits the text area height, center it, and clip it to the text area. (See the attached

Re: [NTG-context] too many open files?

2014-05-01 Thread Henning Hraban Ramm
Am 2014-05-01 um 05:13 schrieb Andrea Valle : > Dear, > > I’m compiling the new version of my manual on the SuperCollider language, > using a project structure, and I’m including a lot of pdfs, as I’m > automatically generating figures containing colorised code that have to > included in the