ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \startmathcases ... \stopmathcases
@ 2013-10-31 17:27 Rudolf Bahr
  2013-10-31 21:04 ` Rudolf Bahr
  0 siblings, 1 reply; 2+ messages in thread
From: Rudolf Bahr @ 2013-10-31 17:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Hello All!

I order to design a genealogical table I found "\startmathcases ... \stopmathcases" in [1].
It is, what I need, at least partially, with a single left brace adjusting itself in height
to the corresponding right text.

I know that I'm misusing "mathcases" as my data are pure text and no formulae. But even worse,
"mathcases" seem to have a centering environment which makes it difficult to adjust the data of
father, mother, grandfather, grandmother and so on in there placement relativ to each other on
the page.

In the following simple code example there is to be seen, that I had to use \hskip and \vskip by 
trial and error to dock the second vbox with the first one. That's rather discouraging when 
thinking of all the rest of genealogical people in 6 generations.

Is there a way to make "mathcases" more tame (i.e. without there behaviour to be centered) or do 
you suggest a complete other method?

Rudolf


[1] My Way, Aditya Mahajan, http://dl.contextgarden.net/myway/context-latex-math.pdf
			    http://dl.contextgarden.net/myway/mathalign.pdf

-----------------------------------------------------------------------------------------------
# ConTeXt  ver: 2013.06.10 22:51 MKIV beta  fmt: 2013.6.21:

\setuppapersize[A4]
\setuplayout[backspace=45pt,topspace=35pt,width=535pt,height=760pt,footer=0pt,header=0pt,
                rightmargin=0pt,leftmargin=0pt]
\showframe

\definefontstyle [rm,roman,serif,regular] [rm]

\definefont[StufeFFont][rm at  6pt][.75]
\definefont[StufeEFont][rm at  7pt][.80]

\definebodyfontswitch [vii]  [7pt]
\definebodyfontswitch [vi]   [6pt]

\starttext

\hbox{
     \vbox{
          \rm\vii
          \startformula
              \startmathcases
                  \NC Bahr, Rudolf\NR
                  \NC *1867\ \dag 1923\NR
                  \noalign{\vskip8mm}
                  \NC *1881\NR
                  \NC Supan, Josefa\NR
              \stopmathcases
          \stopformula
     }
     \hskip-.45\textwidth
     \vbox{
          \rm\vi
          \startformula
              \startmathcases
                  \NC Bahr, Franz\NR
                  \NC \starteffect[hidden]1800\stopeffect\NR
                  \noalign{\vskip4mm}
                  \NC *1833\NR
                  \NC Diwald, Katharina\NR
              \stopmathcases
          \stopformula
          \vskip11.5mm
     }
}

\stoptext
-----------------------------------------------------------------------------------------------

___________________________________________________________________________________
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] 2+ messages in thread

* Re: \startmathcases ... \stopmathcases
  2013-10-31 17:27 \startmathcases ... \stopmathcases Rudolf Bahr
@ 2013-10-31 21:04 ` Rudolf Bahr
  0 siblings, 0 replies; 2+ messages in thread
From: Rudolf Bahr @ 2013-10-31 21:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, Oct 31, 2013 at 06:27:11PM +0100, Rudolf Bahr wrote:
> 
> Is there a way to make "mathcases" more tame (i.e. without there behaviour to be centered) or do 
> you suggest a complete other method?


Later in the evening I found  Wolfgang's Mail to Vladimir Lomov from Thu May 20 13:04:15 CEST 2010
concerning braces without math-mode. I think, this will be allright for me too. Thanks to Wolfgang!

Rudolf

--------------------------------------------------------------------------
You can play with this:

\def\linkeklammer
   {\setbox\scratchbox\hbox{$\left\{\vrule height .5\vsize depth 
.5\vsize width 0pt\relax\right.$}%
    \rightaligned{\hbox to 
.5\wd\scratchbox{\raise\dp\scratchbox\box\scratchbox\hss}}}

\def\rechteklammer
   {\setbox\scratchbox\hbox{$\left.\vrule height .5\vsize depth .5\vsize 
width 0pt\relax\right\}$}%
    \leftaligned{\hbox to 
.5\wd\scratchbox{\hss\raise\dp\scratchbox\box\scratchbox}}}

\defineoverlay[linkeklammer] [\linkeklammer]
\defineoverlay[rechteklammer][\rechteklammer]

\starttext

\bTABLE
   \bTR[align={middle,middle},frame=off,offset=1ex]
     \bTD[background=linkeklammer] text \eTD
     \bTD text\\text\\text \eTD
     \bTD[background=rechteklammer] text \eTD
   \eTR
\eTABLE

\stoptext
-------------------------------------------------------------------------
___________________________________________________________________________________
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] 2+ messages in thread

end of thread, other threads:[~2013-10-31 21:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-31 17:27 \startmathcases ... \stopmathcases Rudolf Bahr
2013-10-31 21:04 ` Rudolf Bahr

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