Re: [NTG-context] bug in image scaling
On 07/10/2016 12:51 PM, Hans Hagen wrote: > On 7/9/2016 8:10 PM, Pablo Rodriguez wrote: >> Dear list, >> >> I have the following sample: >> >> \setupexternalfigure[location=default] >> \starttext >> \insertpages[cow.pdf][width=\textwidth] >> \stoptext >> >> Using latest beta from 2016.07.08 17:19, scaling doesn’t work. > > next beta: > > \setupexternalfigure[location=default] > \defineexternalfigure[foo][width=.5\textwidth] > > \starttext \showframe > > \insertpages[cow.pdf][category=foo] > > \stoptext > > (you wikify it) Many thanks for the implementation, Hans. I have just wikified it. 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Issue with tex.Jhangindent with latest beta 2016-07-08 17:24
Thanks a lot Hans. From: pra...@wxs.nl Sent: Sunday, July 10, 2016 12:21 PM To: ntg-context@ntg.nl On 7/9/2016 11:19 PM, josephcan...@gmail.com wrote: > Dear list, > > In some lua code I have in my project, I’ve started getting this error > when upgrading to latest beta (used to work fine for lots of versions > for months) : > > attempt to perform arithmetic on field 'hangindent' (a nil value) > > when using expression: tex.hangindent in lua code. > > I am quite sure hangindent is not zero for this paragraph (on purpose). > Is there a change in way to access hangindent value for a paragraph ? fixed in next binary - 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug in image scaling
On 7/9/2016 8:10 PM, Pablo Rodriguez wrote: Dear list, I have the following sample: \setupexternalfigure[location=default] \starttext \insertpages[cow.pdf][width=\textwidth] \stoptext Using latest beta from 2016.07.08 17:19, scaling doesn’t work. next beta: \setupexternalfigure[location=default] \defineexternalfigure[foo][width=.5\textwidth] \starttext \showframe \insertpages[cow.pdf][category=foo] \stoptext (you wikify it) - 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug in image scaling
On 7/9/2016 8:10 PM, Pablo Rodriguez wrote: Dear list, I have the following sample: \setupexternalfigure[location=default] \starttext \insertpages[cow.pdf][width=\textwidth] \stoptext Using latest beta from 2016.07.08 17:19, scaling doesn’t work. Am I missing something or have I hit a bug? width is the width of the destination box, not of the image an dit's used to flush left or right the image scaled to \textheight (currently) Just in case it might me causing the issue, I’m using LuaTeX-0.95 for Linux 32bit. Could anyone check this issue? Many thanks for your help, Pablo -- - 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Issue with tex.hangindent with latest beta 2016-07-08 17:24
On 7/9/2016 11:19 PM, josephcan...@gmail.com wrote: Dear list, In some lua code I have in my project, I’ve started getting this error when upgrading to latest beta (used to work fine for lots of versions for months) : attempt to perform arithmetic on field 'hangindent' (a nil value) when using expression: tex.hangindent in lua code. I am quite sure hangindent is not zero for this paragraph (on purpose). Is there a change in way to access hangindent value for a paragraph ? fixed in next binary - 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \currentheadnumber does not work
Hi Wolfgang, Thank you for the code and still as clear explanations. Fabrice 2016-07-09 12:45 GMT+02:00 Wolfgang Schuster : > Fabrice Couvreur > 9. Juli 2016 um 12:17 > Hi Wolfgang, > > In the first example, so I do not need the command \currentheadnumber > but just do : > > \setuphead >[chapter] >[command=\HeadTitle, > headstyle=\ss, > numbercommand=\Headed] > > ConTeXt passes the section number to the argument of the \Headed command. > > But in this second example, using the command > \determineheadnumber[chapter], the chapter number is always 0 > > You need \determineheadnumber[...] each time when the value for > \currentheadnumber should change. > > \setuppagenumbering[location=footer] > > \startusableMPgraphic{NumberHead} > picture r ; > r := image ( graphictext > \MPstring{chapter} > scaled 4pt > withfillcolor \MPcolor{lightgray} > withpen pencircle scaled 1pt ; ) ; > draw r ; > \stopusableMPgraphic > > \defineoverlay[NumberHead][\uniqueMPgraphic{NumberHead}] > > \def\processMPheadnumber#1% > {\setMPtext{chapter}{\bf#1} >\useMPgraphic{NumberHead}} > > \setuphead >[chapter] >[command=\HeadTitle, > headstyle=\ss, > numbercommand=\processMPheadnumber{\currentheadnumber}] > > The following works here. > > \startusableMPgraphic{NumberHead} > picture r ; > r := image ( graphictext > "\bf\namedheadnumber{chapter}" > scaled 4pt > withfillcolor \MPcolor{lightgray} > withpen pencircle scaled 1pt ; ) ; > draw r ; > \stopusableMPgraphic > > \def\processMPheadnumber#1% > {\useMPgraphic{NumberHead}} > > \setuphead >[chapter] >[command=\HeadTitle, > headstyle=\ss, > numbercommand=\processMPheadnumber] > > 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://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___