Hi gang,
Did not get any feedback, I'll try again:
==================================
Date: 2007-03-02 07:34 -700
Hmm, no reply yet, maybe the following is more interesting:
On Thu, 01 Mar 2007 12:30:42 -0700, Idris Samawi Hamid
How can I evenly spread the contents of a box or column-row? In PlainTeX there is
\hbox{Here\hfill is\hfill an\hfill evenly\hfill spread\hfill line.}
but there must be a better (read "ConTeXt-") way. I looked into thisyears ago and may have found the answer; but I've forgotten it...
=================================== \starttext \defineparagraphs[TwoColumns][n=2,distance=2cm] \setupparagraphs[TwoColumns][each][width=5cm,tolerance=stretch] \setupframedtexts[frame=off] \startframedtext[middle] \startalignment[middle] \startTwoColumns \hbox spread \textwidth{Here is the first line 1a} \TwoColumns Here \hfill is \hfill the \hfill first \hfill line \hfill 1b \stopTwoColumns \startTwoColumns Here \hfill is \hfill the \hfill second \hfill line \hfill 2a \TwoColumns Here \hfill is \hfill the \hfill second \hfill line \hfill 2b \stopTwoColumns \stopalignment \stopframedtext \stoptext ============================== How can I get the first column right? Note that, according to the manual, \textwidth gives the width of a column but in this case it apparently gives a full \hsize. RELATED QUESTION: How can I control the distance between rows? I do not want any extra whitespace between rows (i.e., except the normal interparagraph space). Please advise! Best Idris -- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523 -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
I don't know if this method qualifies as a ConTeXt way, but it's what I would do in plain tex, and it works in ConTeXt: \starttext \line{\spaceskip0pt plus 1fil\relax hello how are you} \stoptext -Sanjoy `Not all those who wander are lost.' (J.R.R. Tolkien)
Thank you, Sanjoy, this will help me write a spread macro.
But I can't help thinking there's a context-way to do this, it seems like
such a mundane operation...
Best
Idris
On Wed, 07 Mar 2007 10:38:34 -0700, Sanjoy Mahajan
I don't know if this method qualifies as a ConTeXt way, but it's what I would do in plain tex, and it works in ConTeXt:
\starttext \line{\spaceskip0pt plus 1fil\relax hello how are you} \stoptext
-- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523 -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
By the way, the \relax may not be needed. It's like garlic for vampires. It may help and I haven't learnt enough about TeX's parser to know whether I should put it in. So I was being safe and lazy. -Sanjoy `Not all those who wander are lost.' (J.R.R. Tolkien)
Hi Idris, I played with an example derived from the columns manual: \definecolumnset[example][n=2] \definecolumnsetspan[wide][n=2,background=screen] \setuptolerance[verytolerant,stretch] \setupcolors[state=start] \starttext \startcolumnset[example] \startcolumnsetspan[wide] \stretched{Here is the first line 1a} \stopcolumnsetspan \input tufte Here is the second line 2a \column \input tufte Here is the second line 2a \stopcolumnset \stoptext I do hope, that this is giving you a clue. On Mar 7, 2007, at 5:47 PM, Idris Samawi Hamid wrote:
Hi gang,
Did not get any feedback, I'll try again: ================================== Date: 2007-03-02 07:34 -700
Hmm, no reply yet, maybe the following is more interesting:
On Thu, 01 Mar 2007 12:30:42 -0700, Idris Samawi Hamid
wrote: How can I evenly spread the contents of a box or column-row? In PlainTeX there is
\hbox{Here\hfill is\hfill an\hfill evenly\hfill spread\hfill line.}
but there must be a better (read "ConTeXt-") way. I looked into thisyears ago and may have found the answer; but I've forgotten it...
=================================== \starttext
\defineparagraphs[TwoColumns][n=2,distance=2cm] \setupparagraphs[TwoColumns][each][width=5cm,tolerance=stretch] \setupframedtexts[frame=off] \startframedtext[middle] \startalignment[middle] \startTwoColumns \hbox spread \textwidth{Here is the first line 1a} \TwoColumns Here \hfill is \hfill the \hfill first \hfill line \hfill 1b \stopTwoColumns \startTwoColumns Here \hfill is \hfill the \hfill second \hfill line \hfill 2a \TwoColumns Here \hfill is \hfill the \hfill second \hfill line \hfill 2b \stopTwoColumns \stopalignment \stopframedtext
\stoptext ==============================
How can I get the first column right? Note that, according to the manual, \textwidth gives the width of a column but in this case it apparently gives a full \hsize.
RELATED QUESTION: How can I control the distance between rows? I do not want any extra whitespace between rows (i.e., except the normal interparagraph space).
Please advise!
Best Idris
-- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523
-- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Willi Egger w.egger@boede.nl
Hi Willi,
On Wed, 07 Mar 2007 15:10:18 -0700, Willi Egger
\stretched{Here is the first line 1a}
\stretched!!! That was it! I looked in the Layout chapter of the manual, but it was in the Typography chapter. What a gangster! THNX, Willi. Best Idris -- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523 -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
participants (3)
-
Idris Samawi Hamid
-
Sanjoy Mahajan
-
Willi Egger