ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* alignment
@ 2006-02-17 13:39 Hans van der Meer
  2006-02-17 14:16 ` alignment Taco Hoekwater
  0 siblings, 1 reply; 6+ messages in thread
From: Hans van der Meer @ 2006-02-17 13:39 UTC (permalink / raw)


There is something I do not understand with alignment.
My idea was to put a small text in the middle of the line.
The minimal example below does center he first but not the second  
alignment.
Is this intentionale or an unforseen interaction between alignment  
and framed?

\starttext
\startalignment[middle]
	middle? yes!
\stopalignment
\startalignment[middle]
	\framed{middle? no!}
\stopalignment
\stoptext

yours sincerely,
dr. H. van der Meer

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

* Re: alignment
  2006-02-17 13:39 alignment Hans van der Meer
@ 2006-02-17 14:16 ` Taco Hoekwater
  0 siblings, 0 replies; 6+ messages in thread
From: Taco Hoekwater @ 2006-02-17 14:16 UTC (permalink / raw)


Hans van der Meer wrote:
> There is something I do not understand with alignment.
> My idea was to put a small text in the middle of the line.
> The minimal example below does center he first but not the second  
> alignment.
> Is this intentionale or an unforseen interaction between alignment  
> and framed?

It is a somewhat unexpected side-effect of \framed being a \hbox.
Try this:

  \startalignment[middle]
    \leavevmode\framed{middle? no!}
  \stopalignment


Cheers, taco

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

* Re: Alignment
  2019-05-13 20:45 Alignment Fabrice Couvreur
@ 2019-05-13 21:15 ` Wolfgang Schuster
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2019-05-13 21:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Fabrice Couvreur


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



Fabrice Couvreur schrieb am 13.05.2019 um 22:45:
> Hi,
> Not having too many ideas, I did this: is there not a more elegant way ?
\definemathmatrix [pmatrix] [matrix:parentheses] [simplecommand=MATRIX]

\starttext

\startformula
   \startmathalignment
   \NC P \times M = P \NC \iff \MATRIX{x,y} \times 
\MATRIX{0.22,0.78;0.53,0.47} = \MATRIX{x,y} \NR
   \NC                \NC \iff
     \startmathcases
     \NC 0.22x + 0.53y = x \NR
     \NC 0.78x + 0.47y = y \NR
     \stopmathcases
   \NR
   \NC                \NC \iff 0.78x - 0.53y = 0 \NR
   \NC                \NC \iff   78x -   53y = 0 \NR
   \stopmathalignment
\stopformula

\stoptext

Wolfgang


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

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Alignment
@ 2019-05-13 20:45 Fabrice Couvreur
  2019-05-13 21:15 ` Alignment Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: Fabrice Couvreur @ 2019-05-13 20:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hi,
Not having too many ideas, I did this: is there not a more elegant way ?
Thank you.
Fabrice

\definemathmatrix [pmatrix][matrix:parentheses][simplecommand=MATRIX]
\starttext
\startmidaligned
            \startxtable[align={middle,lohi},frame=off,offset=0.8ex]
              \startxrow
                \startxcell
                  \m{P\times M=P}
                \stopxcell
                \startxcell
                  \math{\iff}
                \stopxcell
                \startxcell
                  \m{\MATRIX{x,y}\times
\MATRIX{0.22,0.78;0.53,0.47}=\MATRIX{x,y}}
                \stopxcell
              \stopxrow
              \startxrow
                \startxcell

                \stopxcell
                \startxcell
                  \m{\iff}
                \stopxcell
                \startxcell[align=right]
                  \math{\startmathcases
                         \NC 0.22x+0.53y=x    \NR
                         \NC 0.78x+0.47y=y     \NR
                         \stopmathcases}
                \stopxcell
              \stopxrow
              \startxrow
                \startxcell

                \stopxcell
                \startxcell
                  \m{\iff}
                \stopxcell
                \startxcell[align=right]
                  \m{0.78x-0.53y=0}
                \stopxcell
              \stopxrow
              \startxrow
                \startxcell

                \stopxcell
                \startxcell
                  \m{\iff}
                \stopxcell
                \startxcell[align=right]
                 \m{78x-53y=0}
                \stopxcell
              \stopxrow
            \stopxtable
          \stopmidaligned
\stoptext

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

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: alignment
  2006-07-06 18:44 alignment Hans van der Meer
@ 2006-07-10 20:24 ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2006-07-10 20:24 UTC (permalink / raw)


Hans van der Meer wrote:
> Question:� Why does this gives an error
> \midaligned{%
> \starttabulate[|r|c|l|]
> \NC abc \NC : \NC PQR \NC\NR
> \NC def \NC : \NC XYZ \NC\NR
> \stoptabulate
> }
> ! Missing } inserted.
> <inserted text>
> � � � � � � � � }
> <to be read again>
> � � � � � � � � �� \vskip
> \whitespace ...\parskip >\zeropoint \relax \vskip
> � � � � � � � � � � � � � � � � � � � � � � � � � \parskip \fi
> \dofinalstarttabulate ...efloat \else \whitespace
> � � � � � � � � � � � � � � � � � � � � � � � � � \getvalue {\??tt 
> \currentt...
> <to be read again>
> � � � � � � � � �� \NC
> l.22 \NC
> � � � � � abc \NC : \NC PQR \NC\NR
>
> Without the \midaligned the tabulate works out ok.
>
this obscure tex message means that you do something v in h mode or vise 
versa

\midaligned{\vbox{...}}

will work

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* alignment
@ 2006-07-06 18:44 Hans van der Meer
  2006-07-10 20:24 ` alignment Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Hans van der Meer @ 2006-07-06 18:44 UTC (permalink / raw)



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

Question:  Why does this gives an error
	\midaligned{%
	\starttabulate[|r|c|l|]
	\NC abc \NC : \NC PQR \NC\NR
	\NC def \NC : \NC XYZ \NC\NR
	\stoptabulate
	}
! Missing } inserted.
<inserted text>
                 }
<to be read again>
                    \vskip
\whitespace ...\parskip >\zeropoint \relax \vskip
                                                   \parskip \fi
\dofinalstarttabulate ...efloat \else \whitespace
                                                   \getvalue {\??tt  
\currentt...
<to be read again>
                    \NC
l.22 	\NC
           abc \NC : \NC PQR \NC\NR

Without the \midaligned the tabulate works out ok.


Hans van der Meer




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

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

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

end of thread, other threads:[~2019-05-13 21:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-17 13:39 alignment Hans van der Meer
2006-02-17 14:16 ` alignment Taco Hoekwater
2006-07-06 18:44 alignment Hans van der Meer
2006-07-10 20:24 ` alignment Hans Hagen
2019-05-13 20:45 Alignment Fabrice Couvreur
2019-05-13 21:15 ` Alignment Wolfgang Schuster

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