Re: [NTG-context] checking whether file is landscape or portrait
On 1/29/20 2:31 PM, Arthur Reutenauer wrote: > On Tue, Jan 28, 2020 at 05:43:36PM +0100, Pablo Rodriguez wrote: >> I’m afraid this is the second time I’m aware of the existence of \ifdim >> (the first time was when reading previous message from Taco ). > > It’s a TeX primitive. From the TeXbook, chapter 20: > > * \ifdim (compares two dimensions) > This is like \ifnum, but it compares two values. For > example, to test whether the value of \hsize exceeds 100pt, you > can say ‘\ifdim\hsize>100pt’. > > The definition of \ifnum, right above it, states: > > * \ifnum (compares two integers) > The must be either ‘<’ or ‘=’ or ‘>’. The two > integer numbers are compared to each other in the usual way, and > the result is true or false accordingly. Many thanks for your reply, Arthur. The explanation is extremely clear. I think I should try to read the TeXbook (but I need time for this first). 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] removing extra margins
On 1/28/20 10:14 PM, Henri Menke wrote: > On 1/29/20 10:09 AM, Pablo Rodriguez wrote: >> [...] >> How could I crop 2ex from the left and top margins in the code above? > > https://wiki.contextgarden.net/Using_Graphics#Image_Clipping Many thanks for your reply, Henri. This is exactly what I was looking for. But I had only “crop” in mind. 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] checking whether file is landscape or portrait
On Tue, Jan 28, 2020 at 05:43:36PM +0100, Pablo Rodriguez wrote: > I’m afraid this is the second time I’m aware of the existence of \ifdim > (the first time was when reading previous message from Taco ). It’s a TeX primitive. From the TeXbook, chapter 20: * \ifdim (compares two dimensions) This is like \ifnum, but it compares two values. For example, to test whether the value of \hsize exceeds 100pt, you can say ‘\ifdim\hsize>100pt’. The definition of \ifnum, right above it, states: * \ifnum (compares two integers) The must be either ‘<’ or ‘=’ or ‘>’. The two integer numbers are compared to each other in the usual way, and the result is true or false accordingly. Best, Arthur ___ 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] margintext and floats in the margin
Hi, Is it possible to put some short notes in the margin, together with a float? Below is an example, which puts the float on top of the text in the margin. The option « stack=yes » works fine for the margintext when there is no float, but it does not seems to be an option which puts the figure and margintext in a sort of stack. Thanks for any advice: Otared K. % begin margintext-float.tex \setuppapersize[A4][A4] \setuplayout[ width=120mm, leftmargin=25mm,rightmargin=50mm] \setupmargindata[margintext] [align=raggedright, stack=yes, location=outer, style={\rm}] \showframe \startbuffer[sine] numeric u ; u = 5mm ; draw function (1,"x","1.5*sin(x)",0,710/113,.01) scaled u withcolor transparent(1,.5,darkblue) withpen pencircle scaled 2pt ; \stopbuffer \starttext This is some text.\margintext{This is a remark in the margin.} This is some more text.\margintext{This text is also in the margin.} \startplacefigure[location=outermargin,number=no] \scale[width=\rightmarginwidth]{\processMPbuffer[sine]} \stopplacefigure \stoptext % end margintext-float.tex ___ 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 ___