ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* A cases type environment using a right brace?
@ 2011-07-21  2:26 Alasdair McAndrew
  2011-07-21  3:50 ` Aditya Mahajan
  0 siblings, 1 reply; 11+ messages in thread
From: Alasdair McAndrew @ 2011-07-21  2:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 743 bytes --]

I'm trying to typeset a small column of numbers with a right brace on the
right, and nothing on the left.  (Sort of like the opposite to the right
hand side of a cases environment).  I've tried:

\definemathmatrix[group][left={},right={\,\right\} }]

\startgroup
    10\NR 9\NR 8\NR
\stopgroup

But this just gives me errors: and the right brace in my group definition is
just ignored.  So, how can I get a brace which extends to the full height of
the column?  If I use

\definemathmatrix[group][left={},right={\,\rbrace}]

This just gives me a small brace, and doesn't extend it vertically.

Thanks very much!

-Alasdair

-- 
Blog: http://amca01.wordpress.com
Web:  http://bit.ly/Alasdair
Facebook: http://www.facebook.com/alasdair.mcandrew

[-- Attachment #1.2: Type: text/html, Size: 1028 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

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

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

* Re: A cases type environment using a right brace?
  2011-07-21  2:26 A cases type environment using a right brace? Alasdair McAndrew
@ 2011-07-21  3:50 ` Aditya Mahajan
  2011-07-21  3:58   ` Alasdair McAndrew
  2011-07-21  6:20   ` Thomas A. Schmitz
  0 siblings, 2 replies; 11+ messages in thread
From: Aditya Mahajan @ 2011-07-21  3:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, 21 Jul 2011, Alasdair McAndrew wrote:

> I'm trying to typeset a small column of numbers with a right brace on the
> right, and nothing on the left.  (Sort of like the opposite to the right
> hand side of a cases environment).  I've tried:

(untested)

> \definemathmatrix[group][left={},right={\,\right\} }]

\definemathmatrix[group][left={\left.}, right={\,\right\}}]

> \startgroup
>    10\NR 9\NR 8\NR
> \stopgroup

\startgroup
   \NC 10 \NR
   \NC 9  \NR
   \NC 8  \NR
\stopgroup

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


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

* Re: A cases type environment using a right brace?
  2011-07-21  3:50 ` Aditya Mahajan
@ 2011-07-21  3:58   ` Alasdair McAndrew
  2011-07-21  6:20   ` Thomas A. Schmitz
  1 sibling, 0 replies; 11+ messages in thread
From: Alasdair McAndrew @ 2011-07-21  3:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1417 bytes --]

Thanks so much, Aditya- works perfectly!

-Alasdair

On Thu, Jul 21, 2011 at 1:50 PM, Aditya Mahajan <adityam@umich.edu> wrote:

> On Thu, 21 Jul 2011, Alasdair McAndrew wrote:
>
>  I'm trying to typeset a small column of numbers with a right brace on the
>> right, and nothing on the left.  (Sort of like the opposite to the right
>> hand side of a cases environment).  I've tried:
>>
>
> (untested)
>
>
>  \definemathmatrix[group][left=**{},right={\,\right\} }]
>>
>
> \definemathmatrix[group][left=**{\left.}, right={\,\right\}}]
>
>
>  \startgroup
>>   10\NR 9\NR 8\NR
>> \stopgroup
>>
>
> \startgroup
>  \NC 10 \NR
>  \NC 9  \NR
>  \NC 8  \NR
> \stopgroup
>
> 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 <http://www.ntg.nl/mailman/listinfo/ntg-context>
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/**projects/contextrev/<http://foundry.supelec.fr/projects/contextrev/>
> wiki     : http://contextgarden.net
> ______________________________**______________________________**
> _______________________
>



-- 
Blog: http://amca01.wordpress.com
Web:  http://bit.ly/Alasdair
Facebook: http://www.facebook.com/alasdair.mcandrew

[-- Attachment #1.2: Type: text/html, Size: 2747 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

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

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

* Re: A cases type environment using a right brace?
  2011-07-21  3:50 ` Aditya Mahajan
  2011-07-21  3:58   ` Alasdair McAndrew
@ 2011-07-21  6:20   ` Thomas A. Schmitz
  2011-07-21 12:21     ` Wolfgang Schuster
  1 sibling, 1 reply; 11+ messages in thread
From: Thomas A. Schmitz @ 2011-07-21  6:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 07/21/2011 05:50 AM, Aditya Mahajan wrote:
> On Thu, 21 Jul 2011, Alasdair McAndrew wrote:
>
>> I'm trying to typeset a small column of numbers with a right brace on the
>> right, and nothing on the left. (Sort of like the opposite to the right
>> hand side of a cases environment). I've tried:
>
May I chime in with a related question? Is there a dedicated ConTeXt way 
of having something similar in text mode? A column of content with a 
brace on its right (or left)? I have sometimes used something like this 
(which I think is from A Beginner's Book of TeX):

\starttext

\setbox1=\vbox{\hsize2cm Some \crlf vertical \crlf material }

\setbox2=\vbox{\hbox{X}}

\startformula
\left.\vcenter{\box1}\right\}\vcenter{\box2}
\stopformula

\stoptext

But I was wondering if there's a less hackish, more elegant way of doing 
this in ConTeXt.

All best

Thomas
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: A cases type environment using a right brace?
  2011-07-21  6:20   ` Thomas A. Schmitz
@ 2011-07-21 12:21     ` Wolfgang Schuster
  2011-07-21 12:41       ` Thomas A. Schmitz
  0 siblings, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2011-07-21 12:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 21.07.2011 um 08:20 schrieb Thomas A. Schmitz:

> May I chime in with a related question? Is there a dedicated ConTeXt way of having something similar in text mode? A column of content with a brace on its right (or left)? I have sometimes used something like this (which I think is from A Beginner's Book of TeX):
> 
> \starttext
> 
> \setbox1=\vbox{\hsize2cm Some \crlf vertical \crlf material }
> 
> \setbox2=\vbox{\hbox{X}}
> 
> \startformula
> \left.\vcenter{\box1}\right\}\vcenter{\box2}
> \stopformula
> 
> \stoptext
> 
> But I was wondering if there's a less hackish, more elegant way of doing this in ConTeXt.

http://www.ntg.nl/pipermail/ntg-context/2010/049601.html

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


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

* Re: A cases type environment using a right brace?
  2011-07-21 12:21     ` Wolfgang Schuster
@ 2011-07-21 12:41       ` Thomas A. Schmitz
  2011-07-21 13:24         ` Aditya Mahajan
  0 siblings, 1 reply; 11+ messages in thread
From: Thomas A. Schmitz @ 2011-07-21 12:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

>
> http://www.ntg.nl/pipermail/ntg-context/2010/049601.html
>
> Wolfgang
>
Thank you Wolfgang, the metapost solution looks very good! I'll make 
this part of my cont-user.tex, I think...

Best

Thomas
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: A cases type environment using a right brace?
  2011-07-21 12:41       ` Thomas A. Schmitz
@ 2011-07-21 13:24         ` Aditya Mahajan
  2011-07-21 13:43           ` Wolfgang Schuster
                             ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Aditya Mahajan @ 2011-07-21 13:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, 21 Jul 2011, Thomas A. Schmitz wrote:

>> 
>> http://www.ntg.nl/pipermail/ntg-context/2010/049601.html
>> 
>> Wolfgang
>> 
> Thank you Wolfgang, the metapost solution looks very good! I'll make this 
> part of my cont-user.tex, I think...

Can we have this as part of the core and accessible using:

leftframe=on|off|brace|bracket|parenthesis

and similar options for topframe, bottomframe, and rightframe,

or perhaps predefined metapost graphics for setting 
background={metapost:leftbrace,metapost:topbrace}, etc (similar to line 
shading macros.

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


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

* Re: A cases type environment using a right brace?
  2011-07-21 13:24         ` Aditya Mahajan
@ 2011-07-21 13:43           ` Wolfgang Schuster
  2011-07-21 13:49             ` Thomas A. Schmitz
  2011-07-21 16:32           ` Hans Hagen
  2011-07-21 17:25           ` Hans Hagen
  2 siblings, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2011-07-21 13:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 21.07.2011 um 15:24 schrieb Aditya Mahajan:

> On Thu, 21 Jul 2011, Thomas A. Schmitz wrote:
> 
>>> http://www.ntg.nl/pipermail/ntg-context/2010/049601.html
>>> Wolfgang
>> Thank you Wolfgang, the metapost solution looks very good! I'll make this part of my cont-user.tex, I think...
> 
> Can we have this as part of the core and accessible using:
> 
> leftframe=on|off|brace|bracket|parenthesis
> 
> and similar options for topframe, bottomframe, and rightframe,
> 
> or perhaps predefined metapost graphics for setting background={metapost:leftbrace,metapost:topbrace}, etc (similar to line shading macros.

MetaPost is the easier choice because we can add more styles to draw also fancy borders for tables etc.

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


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

* Re: A cases type environment using a right brace?
  2011-07-21 13:43           ` Wolfgang Schuster
@ 2011-07-21 13:49             ` Thomas A. Schmitz
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas A. Schmitz @ 2011-07-21 13:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 07/21/2011 03:43 PM, Wolfgang Schuster wrote:

  or perhaps predefined metapost graphics for setting 
background={metapost:leftbrace,metapost:topbrace}, etc (similar to line 
shading macros.
>
> MetaPost is the easier choice because we can add more styles to draw also fancy borders for tables etc.
>
> Wolfgang

In my viewer (okular), it also looks nicer. With the $\left\{ solution, 
one could see tiny gaps between the parts of the brace. I assume this 
wouldn't be visible when you print it out, but at large sizes in a 
presentation, this doesn't look very nice, whereas the metapost solution 
is perfect.

Thomas
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: A cases type environment using a right brace?
  2011-07-21 13:24         ` Aditya Mahajan
  2011-07-21 13:43           ` Wolfgang Schuster
@ 2011-07-21 16:32           ` Hans Hagen
  2011-07-21 17:25           ` Hans Hagen
  2 siblings, 0 replies; 11+ messages in thread
From: Hans Hagen @ 2011-07-21 16:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 21-7-2011 3:24, Aditya Mahajan wrote:
> On Thu, 21 Jul 2011, Thomas A. Schmitz wrote:
>
>>>
>>> http://www.ntg.nl/pipermail/ntg-context/2010/049601.html
>>>
>>> Wolfgang
>>>
>> Thank you Wolfgang, the metapost solution looks very good! I'll make
>> this part of my cont-user.tex, I think...
>
> Can we have this as part of the core and accessible using:
>
> leftframe=on|off|brace|bracket|parenthesis
>
> and similar options for topframe, bottomframe, and rightframe,
>
> or perhaps predefined metapost graphics for setting
> background={metapost:leftbrace,metapost:topbrace}, etc (similar to line
> shading macros.

i'll add it


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: A cases type environment using a right brace?
  2011-07-21 13:24         ` Aditya Mahajan
  2011-07-21 13:43           ` Wolfgang Schuster
  2011-07-21 16:32           ` Hans Hagen
@ 2011-07-21 17:25           ` Hans Hagen
  2 siblings, 0 replies; 11+ messages in thread
From: Hans Hagen @ 2011-07-21 17:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 21-7-2011 3:24, Aditya Mahajan wrote:
> On Thu, 21 Jul 2011, Thomas A. Schmitz wrote:
>
>>>
>>> http://www.ntg.nl/pipermail/ntg-context/2010/049601.html
>>>
>>> Wolfgang
>>>
>> Thank you Wolfgang, the metapost solution looks very good! I'll make
>> this part of my cont-user.tex, I think...
>
> Can we have this as part of the core and accessible using:
>
> leftframe=on|off|brace|bracket|parenthesis
>
> and similar options for topframe, bottomframe, and rightframe,
>
> or perhaps predefined metapost graphics for setting
> background={metapost:leftbrace,metapost:topbrace}, etc (similar to line
> shading macros.

as a start:

\useMPlibrary[fen]

you can run meta-imp-fen.mkiv to see the examples.

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2011-07-21 17:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-21  2:26 A cases type environment using a right brace? Alasdair McAndrew
2011-07-21  3:50 ` Aditya Mahajan
2011-07-21  3:58   ` Alasdair McAndrew
2011-07-21  6:20   ` Thomas A. Schmitz
2011-07-21 12:21     ` Wolfgang Schuster
2011-07-21 12:41       ` Thomas A. Schmitz
2011-07-21 13:24         ` Aditya Mahajan
2011-07-21 13:43           ` Wolfgang Schuster
2011-07-21 13:49             ` Thomas A. Schmitz
2011-07-21 16:32           ` Hans Hagen
2011-07-21 17:25           ` Hans Hagen

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