ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* aligning Malayalam horizontally across column
       [not found] <20211231182501.66267835.ref@desktop.home>
@ 2021-12-31 12:55 ` Ajith R via ntg-context
  2021-12-31 15:19   ` kauśika via ntg-context
  2022-01-01 10:12   ` Hans Hagen via ntg-context
  0 siblings, 2 replies; 6+ messages in thread
From: Ajith R via ntg-context @ 2021-12-31 12:55 UTC (permalink / raw)
  To: Mailing List for ConTeXt Users; +Cc: Ajith R

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
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: aligning Malayalam horizontally across column
  2021-12-31 12:55 ` aligning Malayalam horizontally across column Ajith R via ntg-context
@ 2021-12-31 15:19   ` kauśika via ntg-context
  2022-01-01 10:20     ` Ajith R via ntg-context
  2022-01-01 10:12   ` Hans Hagen via ntg-context
  1 sibling, 1 reply; 6+ messages in thread
From: kauśika via ntg-context @ 2021-12-31 15:19 UTC (permalink / raw)
  To: Mailing List for ConTeXt Users; +Cc: kauśika, Ajith R via ntg-context

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


___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: aligning Malayalam horizontally across column
  2021-12-31 12:55 ` aligning Malayalam horizontally across column Ajith R via ntg-context
  2021-12-31 15:19   ` kauśika via ntg-context
@ 2022-01-01 10:12   ` Hans Hagen via ntg-context
  2022-01-02  7:08     ` Ajith R via ntg-context
  1 sibling, 1 reply; 6+ messages in thread
From: Hans Hagen via ntg-context @ 2022-01-01 10:12 UTC (permalink / raw)
  To: Ajith R via ntg-context; +Cc: Hans Hagen

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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: aligning Malayalam horizontally across column
  2021-12-31 15:19   ` kauśika via ntg-context
@ 2022-01-01 10:20     ` Ajith R via ntg-context
  0 siblings, 0 replies; 6+ messages in thread
From: Ajith R via ntg-context @ 2022-01-01 10:20 UTC (permalink / raw)
  To: kauśika; +Cc: Ajith R, Mailing List for ConTeXt Users

On Fri, 31 Dec 2021 20:49:30 +0530
kauśika <citturs@gmail.com> wrote:

> 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
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: aligning Malayalam horizontally across column
  2022-01-01 10:12   ` Hans Hagen via ntg-context
@ 2022-01-02  7:08     ` Ajith R via ntg-context
  2022-01-02 10:57       ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 6+ messages in thread
From: Ajith R via ntg-context @ 2022-01-02  7:08 UTC (permalink / raw)
  To: Hans Hagen via ntg-context; +Cc: Ajith R

On Sat, 1 Jan 2022 11:12:14 +0100
Hans Hagen via ntg-context <ntg-context@ntg.nl> wrote:

> 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

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: aligning Malayalam horizontally across column
  2022-01-02  7:08     ` Ajith R via ntg-context
@ 2022-01-02 10:57       ` Hans Hagen via ntg-context
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen via ntg-context @ 2022-01-02 10:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen

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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-01-02 10:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20211231182501.66267835.ref@desktop.home>
2021-12-31 12:55 ` aligning Malayalam horizontally across column Ajith R via ntg-context
2021-12-31 15:19   ` kauśika via ntg-context
2022-01-01 10:20     ` Ajith R via ntg-context
2022-01-01 10:12   ` Hans Hagen via ntg-context
2022-01-02  7:08     ` Ajith R via ntg-context
2022-01-02 10:57       ` Hans Hagen via ntg-context

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).