ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
Subject: Re: alignment in cells without "alignmentcharacter"
Date: Mon, 14 Nov 2005 19:45:27 +0100	[thread overview]
Message-ID: <6faad9f00511141045p4d21d69bs8581a7e318599125@mail.gmail.com> (raw)
In-Reply-To: <43774AB0.1080409@elvenkind.com>

On 11/13/05, Taco Hoekwater <taco@elvenkind.com> wrote:
> Mojca Miklavec wrote:
> >
> > Is there an elegant way which would align those numbers as if they had
> > an additional slash on the right? I was thinking about placing a
>
> Browsing through the source I've found two approaches:
>
> 1. A currently undocumented, but nice & clean solution:
>
>    \chardef\characteralignmentmode=2

Thank you! Found in supp-ali.tex under
%D Yet undocumented.
:) Than was exactly the answer I was looking for. (with)

> 2. A not at all elegant solution, that doesn't depend on a hidden
>    feature:
>
>    \unexpanded\def\hide#1{\hphantom{/}}
>    \setupTABLE[c][1][.... as before ...]
>    \bTABLE
>    \bTR\bTD  01/1  \eTD\eTR
>    \bTR\bTD  02/13 \eTD\eTR
>    \bTR\bTD  03\hide/    \eTD\eTR
>    \bTR\bTD 314/2  \eTD\eTR
>    \bTR\bTD 315\hide/    \eTD\eTR
>    \eTABLE

Interesting ;) I was thinking about making a \hphantom, but didn't
come to the idea of having blind arguments. I didn't know how the
mechanism of finding an alignment character works.

For Peter: are you looking for the code below or for an automated
solution to do it?

\def\mypercent#1{\hbox to 0pt{\%\hss}}
\chardef\characteralignmentmode=2
\setupTABLE[c][1][aligncharacter=yes,alignmentcharacter={,}]
\bTABLE
\bTR\bTD   1,23\% \eTD\eTR
\bTR\bTD  12,3\%  \eTD\eTR
\bTR\bTD 123\mypercent, \eTD\eTR
\eTABLE

Mojca

  parent reply	other threads:[~2005-11-14 18:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-13  0:48 Mojca Miklavec
2005-11-13 14:16 ` Taco Hoekwater
2005-11-13 19:02   ` Peter Münster
2005-11-14  7:24     ` Taco Hoekwater
2005-11-14 16:28       ` Peter Münster
2005-11-14 18:19         ` Taco Hoekwater
2005-11-14 18:45   ` Mojca Miklavec [this message]
2005-11-14 18:55     ` Mojca Miklavec
2005-11-14 19:39     ` Peter Münster

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=6faad9f00511141045p4d21d69bs8581a7e318599125@mail.gmail.com \
    --to=mojca.miklavec.lists@gmail.com \
    --cc=ntg-context@ntg.nl \
    /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).