ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: typesetting a formula as a figure
@ 2007-11-26  4:48 Dalyoung Jeong
  2007-11-26  8:46 ` Wolfgang Schuster
  0 siblings, 1 reply; 9+ messages in thread
From: Dalyoung Jeong @ 2007-11-26  4:48 UTC (permalink / raw)
  To: ntg-context

Dear Idris, Aditya, and Wolfgang,

Thank you for the replies.

Removing \start-stop formula and using \vcenter worked well.
However, adding $\displaystyle ...$ gave the strange output. The  
location of the captions are not under the matrix. It looks like that  
there are four columns, "matrix cap matrix cap".

I have one more question.

Is it possible to display three figures in a triangular shape as  
following?

				<  figure 1 >

			< figure 2>   <figure 3>

I tried to use \srartcombination[3*2] ... using a dummy blank figure.  
But because of the figure 1, there is a wide blank spaces between two  
figures.

Thank you so much.

Best regards,

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


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

* Re: typesetting a formula as a figure
  2007-11-26  4:48 typesetting a formula as a figure Dalyoung Jeong
@ 2007-11-26  8:46 ` Wolfgang Schuster
  0 siblings, 0 replies; 9+ messages in thread
From: Wolfgang Schuster @ 2007-11-26  8:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

2007/11/26, Dalyoung Jeong <haksan@mac.com>:
> Dear Idris, Aditya, and Wolfgang,
>
> Thank you for the replies.
>
> Removing \start-stop formula and using \vcenter worked well.
> However, adding $\displaystyle ...$ gave the strange output. The
> location of the captions are not under the matrix. It looks like that
> there are four columns, "matrix cap matrix cap".
>
> I have one more question.
>
> Is it possible to display three figures in a triangular shape as
> following?
>
>                                 <  figure 1 >
>
>                         < figure 2>   <figure 3>
>
> I tried to use \srartcombination[3*2] ... using a dummy blank figure.
> But because of the figure 1, there is a wide blank spaces between two
> figures.
>
> Thank you so much.
>
> Best regards,
>
> Dalyoung

You can use a table, e.g. with natural tables,

\placefigure
  {caption text}
  {\bTABLE[frame=off]
   \bTR\bTD[nx=2,align=middle] figure 1 \eTD\eTR
   \bTR\bTD figure 2 \eTD\bTD figure 3 \eTD\eTR
   \eTABLE}

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


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

* Re: typesetting a formula as a figure
  2007-11-24  5:56 Jeong Dalyoung
  2007-11-24 15:46 ` Idris Samawi Hamid
@ 2007-11-25  8:45 ` Wolfgang Schuster
  1 sibling, 0 replies; 9+ messages in thread
From: Wolfgang Schuster @ 2007-11-25  8:45 UTC (permalink / raw)
  To: ntg-context

On Sat, 24 Nov 2007 14:56:30 +0900
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?

\placefigure[here][fig:test]{Test of buffers}
  {\startcombination[2*2]
   {\vcenter{\externalfigure[7starmagic1][width=.25\makeupwidth]}}{G}
   {\getbuffer[one]}{AA}
   {\getbuffer[one]}{BB}
   {\getbuffer[one]}{CC}
  \stopcombination}

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


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

* Re: typesetting a formula as a figure
  2007-11-24 15:46 ` Idris Samawi Hamid
@ 2007-11-25  5:00   ` Aditya Mahajan
  0 siblings, 0 replies; 9+ messages in thread
From: Aditya Mahajan @ 2007-11-25  5:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


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

* Re: typesetting a formula as a figure
  2007-11-24  5:56 Jeong Dalyoung
@ 2007-11-24 15:46 ` Idris Samawi Hamid
  2007-11-25  5:00   ` Aditya Mahajan
  2007-11-25  8:45 ` Wolfgang Schuster
  1 sibling, 1 reply; 9+ messages in thread
From: Idris Samawi Hamid @ 2007-11-24 15:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

Notice the \setupcombinations[distance=2cm] !

Best
Idris

-- 
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: typesetting a formula as a figure
@ 2007-11-24  5:56 Jeong Dalyoung
  2007-11-24 15:46 ` Idris Samawi Hamid
  2007-11-25  8:45 ` Wolfgang Schuster
  0 siblings, 2 replies; 9+ messages in thread
From: Jeong Dalyoung @ 2007-11-24  5:56 UTC (permalink / raw)
  To: ntg-context

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?

Thank you.

Best wishes,

Dalyoung

fig 1:

	figure  												matrix 1
	figure  												matrix 1
	figure  												matrix 1
	figure  												matrix 1
			<....... wide ........... blank ......... space..........>
	matrix 2												matrix 3
	matrix 2 												matrix 3
	matrix 2												matrix 3
	matrix 2  												matrix 3

fig 2:

					figure
					figure
					figure
					figure              	matrix 1
					figure            	matrix 1
								matrix 1
								matrix 1

					matrix 2		matrix 3
					matrix 2		matrix 3
					matrix 2		matrix 3
					matrix 2		matrix 3



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


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

* Re: typesetting a formula as a figure
  2007-11-20 22:23 ` Idris Samawi Hamid
@ 2007-11-20 22:42   ` Peter I. Hansen
  0 siblings, 0 replies; 9+ messages in thread
From: Peter I. Hansen @ 2007-11-20 22:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Nov 20, 2007 11:23 PM, Idris Samawi Hamid <ishamid@colostate.edu> wrote:
> Hi Peter,
>
> On Tue, 20 Nov 2007 15:15:35 -0700, Peter I. Hansen <peterih@gmail.com>
> wrote:
>
>
> > Hi
> >
> > I would like to typeset a formula as a figure, so that the formula
> > enters the numbering scheme of figures and that I gain the possibility
> > of adding a figure caption. An example were this would be practical is
> > when using ppchtex.
> > I've been googling but having trouble finding hints on how to make
> > such a construction.
> > Is it possible at all?
>
> See Section 13.5 page 300 (absolute page 303) of cont-eni.pdf. Uses a
> buffer and a tmp-file name.

This works nicely, thanks.

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


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

* Re: typesetting a formula as a figure
  2007-11-20 22:15 Peter I. Hansen
@ 2007-11-20 22:23 ` Idris Samawi Hamid
  2007-11-20 22:42   ` Peter I. Hansen
  0 siblings, 1 reply; 9+ messages in thread
From: Idris Samawi Hamid @ 2007-11-20 22:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Peter,

On Tue, 20 Nov 2007 15:15:35 -0700, Peter I. Hansen <peterih@gmail.com>  
wrote:

> Hi
>
> I would like to typeset a formula as a figure, so that the formula
> enters the numbering scheme of figures and that I gain the possibility
> of adding a figure caption. An example were this would be practical is
> when using ppchtex.
> I've been googling but having trouble finding hints on how to make
> such a construction.
> Is it possible at all?

See Section 13.5 page 300 (absolute page 303) of cont-eni.pdf. Uses a  
buffer and a tmp-file name.

Best wishes
Idris

-- 
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* typesetting a formula as a figure
@ 2007-11-20 22:15 Peter I. Hansen
  2007-11-20 22:23 ` Idris Samawi Hamid
  0 siblings, 1 reply; 9+ messages in thread
From: Peter I. Hansen @ 2007-11-20 22:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi

I would like to typeset a formula as a figure, so that the formula
enters the numbering scheme of figures and that I gain the possibility
of adding a figure caption. An example were this would be practical is
when using ppchtex.
I've been googling but having trouble finding hints on how to make
such a construction.
Is it possible at all?

Thanks, Peter
___________________________________________________________________________________
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
___________________________________________________________________________________


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

end of thread, other threads:[~2007-11-26  8:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-26  4:48 typesetting a formula as a figure Dalyoung Jeong
2007-11-26  8:46 ` Wolfgang Schuster
  -- strict thread matches above, loose matches on Subject: below --
2007-11-24  5:56 Jeong Dalyoung
2007-11-24 15:46 ` Idris Samawi Hamid
2007-11-25  5:00   ` Aditya Mahajan
2007-11-25  8:45 ` 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

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).