ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Using \startalign outside of math mode?
Date: Fri, 28 Aug 2009 10:31:23 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LNX.2.00.0908281028400.32414@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <20090828112910.GY12901@katherina.student.utwente.nl>

On Fri, 28 Aug 2009, Matthijs Kooijman wrote:

> Hi,
>
> I'm using a custom pretty printer to apply some formatting to a buffer.
> However, I'm not using a monospaced font, but some sans serif font to display
> the result. In the original text, I have some lines that are nicely aligned
> using leading spaces. For example:
>
>  foo = bar
>      | baz
>
> Obviously, when using a non monospaced font for this, the alignment is lost.
> When in math mode, I can use \startalign to force alignment, like:
>
>  \startalign
>  foo \NC= bar
>      \NC| baz
>  \stopalgin
>
> However, I haven't manage to switch to math mode inside pretty printed text.
> Also, even if I would, I would get my text rendered in math mode, which
> probably won't work.
>
> So, I'm wondering if there is anything like \startalign to use outside of math
> mode? I've been looking at the implementation of \startalign, but couldn't
> find it...

Startalign is essentially a table with some predefined defaults. You can 
try something like (untested)

\starttable[|rs(0.2em)|cs(0.2em)|l|]
  \NC foo \NC = \NC bar \NC \AR
  \NC     \NC | \NC baz \NC \AR
\stoptable

Aditya
___________________________________________________________________________________
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


      parent reply	other threads:[~2009-08-28 14:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-28 11:29 Matthijs Kooijman
2009-08-28 11:57 ` Matthijs Kooijman
2009-08-28 14:31 ` Aditya Mahajan [this message]

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=alpine.LNX.2.00.0908281028400.32414@ybpnyubfg.ybpnyqbznva \
    --to=adityam@umich.edu \
    --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).