Re: [NTG-context] How to calculate the height of text of a certain width?

2020-03-25 Thread Rudolf Bahr
Sorry, I forgot the mentioned pdf-file. Rudolf dowithnextbox-2.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist :

Re: [NTG-context] How to calculate the height of text of a certain width?

2020-03-25 Thread Rudolf Bahr
On Tue, Mar 24, 2020 at 07:29:26PM +0100, Wolfgang Schuster wrote: > > When you need the height for the layer offset you can use \dowithnextbox > because it hides \setbox etc. > > \definelayer[TextBox] > > \showframe[text][text] > > \starttext > > \dowithnextbox > {\setlayer >

Re: [NTG-context] How to calculate the height of text of a certain width?

2020-03-24 Thread Rudolf Bahr
On Tue, Mar 24, 2020 at 11:36:30AM -0400, Aditya Mahajan wrote: > > You can do: > > > \definelayer[LAY] > > \starttext > > \setbox\scratchbox=\vbox{\framed[width=300pt, align=flushleft]{\input > ward\relax}} > The height of the box is \the\ht\scratchbox; the width is > \the\wd\scratchbox. >

Re: [NTG-context] How to calculate the height of text of a certain width?

2020-03-24 Thread Wolfgang Schuster
Rudolf Bahr schrieb am 24.03.2020 um 19:04: On Tue, Mar 24, 2020 at 04:43:17PM +0100, Wolfgang Schuster wrote: \setbox0=\vbox{... somehow flushed text ...} wount work, i.e \wd0 or \ht0 will both result in 0. With "unflushed" text this means will work perfectly. I have no idea where you get 0

Re: [NTG-context] How to calculate the height of text of a certain width?

2020-03-24 Thread Rudolf Bahr
On Tue, Mar 24, 2020 at 04:43:17PM +0100, Wolfgang Schuster wrote: > > \setbox0=\vbox{... somehow flushed text ...} wount work, i.e \wd0 or \ht0 > > will both result in 0. With "unflushed" text this means will work perfectly. > > I have no idea where you get 0 (0pt?). Nor do I, in the meantime.

Re: [NTG-context] How to calculate the height of text of a certain width?

2020-03-24 Thread Wolfgang Schuster
Rudolf Bahr schrieb am 24.03.2020 um 16:29: On Tue, Mar 24, 2020 at 03:56:18PM +0100, Wolfgang Schuster wrote: Rudolf Bahr schrieb am 24.03.2020 um 12:19: Hello dear All, the following MWE works best: \definelayer[LAY] \starttext \setlayerframed[LAY] [x=0pt,y=20pt] [frame=on,

Re: [NTG-context] How to calculate the height of text of a certain width?

2020-03-24 Thread Aditya Mahajan
On Tue, 24 Mar 2020, Rudolf Bahr wrote: On Tue, Mar 24, 2020 at 03:56:18PM +0100, Wolfgang Schuster wrote: Rudolf Bahr schrieb am 24.03.2020 um 12:19: > Hello dear All, > > the following MWE works best: > > > \definelayer[LAY] > \starttext > > \setlayerframed[LAY] >[x=0pt,y=20pt] >

Re: [NTG-context] How to calculate the height of text of a certain width?

2020-03-24 Thread Rudolf Bahr
On Tue, Mar 24, 2020 at 03:56:18PM +0100, Wolfgang Schuster wrote: > Rudolf Bahr schrieb am 24.03.2020 um 12:19: > > Hello dear All, > > > > the following MWE works best: > > > > > > \definelayer[LAY] > > \starttext > > > > \setlayerframed[LAY] > >[x=0pt,y=20pt] > >[frame=on, > >

Re: [NTG-context] How to calculate the height of text of a certain width?

2020-03-24 Thread Wolfgang Schuster
Rudolf Bahr schrieb am 24.03.2020 um 12:19: Hello dear All, the following MWE works best: \definelayer[LAY] \starttext \setlayerframed[LAY] [x=0pt,y=20pt] [frame=on, width=300pt, align={right,}] % tolerant}] {\input ward } \flushlayer[LAY] \stoptext Now, it could

[NTG-context] How to calculate the height of text of a certain width?

2020-03-24 Thread Rudolf Bahr
Hello dear All, the following MWE works best: \definelayer[LAY] \starttext \setlayerframed[LAY] [x=0pt,y=20pt] [frame=on, width=300pt, align={right,}] % tolerant}] {\input ward } \flushlayer[LAY] \stoptext Now, it could have a favourable effect on designing a page if the