aligning Malayalam horizontally across column
Hi, I am trying to prepare a moderate sized document in Malayalam using Context. Overall I have been successful. However, there are a few rough edges for which I need help. This is the second problem I face. I have some 300 group of short sentences placed in five columns using \startcolumns[n=5] \input aCharTable.tex \stopcolumns The aCharTex generated by a shell script contains the 300 plus commands with the structure \tfa{ \bold{variable} \par (12 - 0.13) } \blank The problems are that - a) the group, with the two short paras get separated into different columns and sometimes pages. How can I prevent that? In other words, how do I tell Context that this should be treated as cohesive unit? b) The horizontal space doesn't align across columns. This probably is because the different conjuncts in each of these lines have different heights. How can I ask Context to treat each of these cohesive units as having the same height? Thanks, ajith
On Friday, December 31, 2021 6:25:01 PM IST Ajith R via ntg-context wrote:
The problems are that - a) the group, with the two short paras get separated into different columns and sometimes pages. How can I prevent that? In other words, how do I tell Context that this should be treated as cohesive unit? b) The horizontal space doesn't align across columns. This probably is because the different conjuncts in each of these lines have different heights. How can I ask Context to treat each of these cohesive units as having the same height?
Your example is not clear enough for me to address b). I think I understand what problem you have described in a). If you want to explicitly typeset paragraphs into a columnar format, use 'paragraphs': \defineparagraphs[mypar][n=5] \setupparagraphs[mypar][1][width=…] \setupparagraphs[mypar][2][width=…] \setupparagraphs[mypar][3][width=…] \setupparagraphs[mypar][4][width=…] \setupparagraphs[mypar][5][width=…] Now, you can do \startmypar this is the first column \mypar and here is the second column \mypar the third column is here \mypar and the fourth column is here \mypar and the last (fifth) column \stopmypar [If you end up using this you will have to "denote columns" in your script- generated file by using \mypar] Look into the options of \setupparagraphs for more details (there is a height option as well). If the height varies due to the formation of conjuncts, I think you are better off using "(natural) tables" : https://wiki.contextgarden.net/TABLE In particular, setting align=lohi for the two columns concerned should work. Again, your example is not clear enough for me to suggest much. kauśika
On Fri, 31 Dec 2021 20:49:30 +0530
kauśika
If the height varies due to the formation of conjuncts, I think you are better off using "(natural) tables" : https://wiki.contextgarden.net/TABLE In particular, setting align=lohi for the two columns concerned should work. Again, your example is not clear enough for me to suggest much
Hi Kausika, I used natural tables as you suggested and it has solved both my problems. Thanks again for all your help, Have a wonderful year ahead, ajith
On 12/31/2021 1:55 PM, Ajith R via ntg-context wrote:
Hi, I am trying to prepare a moderate sized document in Malayalam using Context. Overall I have been successful. However, there are a few rough edges for which I need help. This is the second problem I face.
I have some 300 group of short sentences placed in five columns using \startcolumns[n=5] \input aCharTable.tex \stopcolumns
The aCharTex generated by a shell script contains the 300 plus commands with the structure
\tfa{ \bold{variable} \par (12 - 0.13) } \blank
The problems are that - a) the group, with the two short paras get separated into different columns and sometimes pages. How can I prevent that? In other words, how do I tell Context that this should be treated as cohesive unit? b) The horizontal space doesn't align across columns. This probably is because the different conjuncts in each of these lines have different heights. How can I ask Context to treat each of these cohesive units as having the same height?
But isn't the \par breaking it? \dontleavehmode\hbox{\tfa\bold{variable} (12 - 0.13)} we need a better example (just a snippet of actual source that gets rendered to see the issue) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On Sat, 1 Jan 2022 11:12:14 +0100
Hans Hagen via ntg-context
On 12/31/2021 1:55 PM, Ajith R via ntg-context wrote:
Hi, I am trying to prepare a moderate sized document in Malayalam using Context. Overall I have been successful. However, there are a few rough edges for which I need help. This is the second problem I face.
I have some 300 group of short sentences placed in five columns using \startcolumns[n=5] \input aCharTable.tex \stopcolumns
The aCharTex generated by a shell script contains the 300 plus commands with the structure
\tfa{ \bold{variable} \par (12 - 0.13) } \blank
The problems are that - a) the group, with the two short paras get separated into different columns and sometimes pages. How can I prevent that? In other words, how do I tell Context that this should be treated as cohesive unit? b) The horizontal space doesn't align across columns. This probably is because the different conjuncts in each of these lines have different heights. How can I ask Context to treat each of these cohesive units as having the same height?
But isn't the \par breaking it?
Yes, it is. I wanted them as two lines, but one below the other. If I don't use \par, they become one line. May be you will be able to understand my requirement if I tell what these are. The first of the pair is one of the many syllables in a text analysed, the numbers inside the parentheses are its rank and frequency proportion. So, to make sense, they have to be together. And, it looks pretty if the pairs are lined up nicely.
\dontleavehmode\hbox{\tfa\bold{variable} (12 - 0.13)}
Thanks for this. But, I changed to natural tables as suggested by Kausika and that solved my problems.
we need a better example (just a snippet of actual source that gets rendered to see the issue)
I am afraid this example is a bit long. The last pair in the first and third columns gets split.And, overall, the lines are not aligned. \definefontfamily [malayalam] [serif] [RIT Rachana][features=malayalam-two] \setupbodyfont[malayalam] \starttext \startcolumns[n=5] \tfa{ \bold{നാ} \par (42 - 0.43) } \blank \tfa{ \bold{ണ} \par (43 - 0.42) } \blank \tfa{ \bold{ള്ള} \par (44 - 0.42) } \blank \tfa{ \bold{മു} \par (45 - 0.41) } \blank \tfa{ \bold{ഗ} \par (46 - 0.39) } \blank \tfa{ \bold{രാ} \par (47 - 0.38) } \blank \tfa{ \bold{റ} \par (48 - 0.36) } \blank \tfa{ \bold{സി} \par (49 - 0.36) } \blank \tfa{ \bold{റി} \par (50 - 0.36) } \blank \tfa{ \bold{പ്പെ} \par (51 - 0.34) } \blank \tfa{ \bold{നു} \par (52 - 0.34) } \blank \tfa{ \bold{ശ} \par (53 - 0.34) } \blank \tfa{ \bold{ടി} \par (54 - 0.33) } \blank \tfa{ \bold{കു} \par (55 - 0.33) } \blank \tfa{ \bold{ക്ക} \par (56 - 0.32) } \blank \tfa{ \bold{ലി} \par (57 - 0.31) } \blank \tfa{ \bold{കൾ} \par (58 - 0.31) } \blank \tfa{ \bold{സ്} \par (59 - 0.30) } \blank \tfa{ \bold{വാ} \par (60 - 0.30) } \blank \tfa{ \bold{സം} \par (61 - 0.30) } \blank \tfa{ \bold{തു} \par (62 - 0.30) } \blank \tfa{ \bold{ചെ} \par (63 - 0.30) } \blank \tfa{ \bold{ളി} \par (64 - 0.30) } \blank \tfa{ \bold{താ} \par (65 - 0.29) } \blank \tfa{ \bold{ജ} \par (66 - 0.29) } \blank \tfa{ \bold{ങ്ങൾ} \par (67 - 0.29) } \blank \tfa{ \bold{വർ} \par (68 - 0.28) } \blank \tfa{ \bold{ള} \par (69 - 0.28) } \blank \tfa{ \bold{മി} \par (70 - 0.27) } \blank \tfa{ \bold{ലാ} \par (71 - 0.27) } \blank \tfa{ \bold{ത്തിൽ} \par (72 - 0.27) } \blank \tfa{ \bold{യിൽ} \par (73 - 0.27) } \blank \tfa{ \bold{ച്ചു} \par (74 - 0.26) } \blank \tfa{ \bold{ഈ} \par (75 - 0.25) } \blank \tfa{ \bold{ച്ച} \par (76 - 0.25) } \blank \tfa{ \bold{ത്ത} \par (77 - 0.25) } \blank \tfa{ \bold{പി} \par (78 - 0.25) } \blank \stopcolumns \stoptext Thanks, ajith
On 1/2/2022 8:08 AM, Ajith R via ntg-context wrote:
Thanks for this. But, I changed to natural tables as suggested by Kausika and that solved my problems.
if it's only text, \starttabulate works ok too (and often better) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Ajith R
-
Hans Hagen
-
kauśika