ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Ajith R via ntg-context <ntg-context@ntg.nl>
To: Hans Hagen via ntg-context <ntg-context@ntg.nl>
Cc: Ajith R <ajithramayyan@yahoo.co.in>
Subject: Re: aligning Malayalam horizontally across column
Date: Sun, 2 Jan 2022 12:38:46 +0530	[thread overview]
Message-ID: <20220102123846.5724a2d5@desktop.home> (raw)
In-Reply-To: <57212f27-44f1-a03c-cce3-40a014a5c0b2@xs4all.nl>

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
___________________________________________________________________________________

  reply	other threads:[~2022-01-02  7:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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: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 [this message]
2022-01-02 10:57       ` Hans Hagen via ntg-context

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220102123846.5724a2d5@desktop.home \
    --to=ntg-context@ntg.nl \
    --cc=ajithramayyan@yahoo.co.in \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).