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: typesetting a formula as a figure
Date: Sun, 25 Nov 2007 00:00:42 -0500 (EST)	[thread overview]
Message-ID: <alpine.DEB.0.9999.0711242358060.5811@nqv-yncgbc> (raw)
In-Reply-To: <op.t2azft11nx1yh1@your-b27fb1c401>

On Sat, 24 Nov 2007, Idris Samawi Hamid wrote:

> Dear Dalyoung,
>
> On Fri, 23 Nov 2007 22:56:30 -0700, Jeong Dalyoung <haksan@mac.com> wrote:
>
>> Dear Idris,
>>
>> I have used buffers and \plcadefigures to display formula and figure
>> together. Here is my short sample file.
>>
>> \startbuffer[one]
>> \startformula \startmatrix
>> \NC \NC e_1 \NC e_2 \NC e_3 \NC e_5 \NC e_5 \NR
>> \NC  	u \NC 0 \NC 1 \NC 1 \NC 0 \NC 1 \NR
>> \NC  v \NC 1 \NC 0 \NC 1 \NC 0 \NC 0 \NR
>> \NC	w \NC 1 \NC 1 \NC 0 \NC 1 \NC 0 \NR
>> \NC	x \NC 0 \NC 0 \NC 1 \NC 0 \NC 1 \NR
>> \NC	y \NC 1 \NC 0 \NC 0 \NC 1 \NC 0 \NR
>> \stopmatrix \stopformula
>> \stopbuffer
>>
>> \starttext
>>
>> \placefigure[here][fig:test]{Test of buffers}
>> {\startcombination[2*2]
>> {\externalfigure[7starmagic1][width=.25\makeupwidth]}{G}
>> {\externalfigure[one.tmp]}{AA}
>> {\externalfigure[one.tmp]}{BB}
>> {\externalfigure[one.tmp]}{CC}
>> \stopcombination}
>>
>> \stoptext
>>
>> Then, I got a strange output(fig 1: wide blank spaces between
>> columns). If I use \getbuffer instead of \externalfigure, I got
>> somewhat proper output(fig 2), but the figure is located much higher
>> than the matrix(horizontal alignment is bad).
>>
>> What is wrong in my sample? Is there any option for \startcombination?
>
> \start-stopformula are for math display mode ($$-$$). Apparently having
> display mode turned on within the buffer creates the extra space. Since
> you are using combinations for your display there is no need for display
> mode. The following works here:
>
> ===============
> \startbuffer[one]
> %\startformula
>
> \startmatrix
> \NC \NC e_1 \NC e_2 \NC e_3 \NC e_5 \NC e_5 \NR
> \NC  	u \NC 0 \NC 1 \NC 1 \NC 0 \NC 1 \NR
> \NC  v \NC 1 \NC 0 \NC 1 \NC 0 \NC 0 \NR
> \NC	w \NC 1 \NC 1 \NC 0 \NC 1 \NC 0 \NR
> \NC	x \NC 0 \NC 0 \NC 1 \NC 0 \NC 1 \NR
> \NC	y \NC 1 \NC 0 \NC 0 \NC 1 \NC 0 \NR
> \stopmatrix
> %\stopformula
> \stopbuffer
>
> \starttext
>
> \setupcombinations[distance=2cm]
>
> \placefigure[here][fig:test]{Test of buffers}
> {\startcombination[2*2]
> % {\externalfigure[7starmagic1][width=.25\makeupwidth]}{G}
> {\externalfigure[one.tmp]}{AA}
> {\externalfigure[one.tmp]}{BB}
> {\externalfigure[one.tmp]}{CC}
> {\externalfigure[one.tmp]}{DD}
> \stopcombination}
>
> \stoptext

I would also add $\displaystyle ... $ around the matrices.

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
___________________________________________________________________________________


  reply	other threads:[~2007-11-25  5:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-24  5:56 Jeong Dalyoung
2007-11-24 15:46 ` Idris Samawi Hamid
2007-11-25  5:00   ` Aditya Mahajan [this message]
2007-11-25  8:45 ` Wolfgang Schuster
  -- strict thread matches above, loose matches on Subject: below --
2007-11-26  4:48 Dalyoung Jeong
2007-11-26  8:46 ` Wolfgang Schuster
2007-11-20 22:15 Peter I. Hansen
2007-11-20 22:23 ` Idris Samawi Hamid
2007-11-20 22:42   ` Peter I. Hansen

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.DEB.0.9999.0711242358060.5811@nqv-yncgbc \
    --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).