ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* halign broken
@ 2013-04-18 12:55 Meer, H. van der
  2013-04-18 13:03 ` Wolfgang Schuster
  0 siblings, 1 reply; 15+ messages in thread
From: Meer, H. van der @ 2013-04-18 12:55 UTC (permalink / raw)
  To: NTG ConTeXt


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

There seems something very much amiss with \halign in later ConTeXt versions.

This typesets fine in PlainTeX and is an example taken from a textbook.

  \tabskip=1em\halign{%
  \hfil\it#\hfil&\hfil#\hfil&#&\hfil#\crA&B&C&D\cr}

Also in contextversion 2012.05.30 (from a TeXlive distribution).

But it fails at least in ConTeXt  ver: 2013.03.20 10:34 MKIV
and in ConTeXt  ver: 2013.04.16 12:08 MKIV beta
with the following error

! Only one # is allowed per tab.
system          > tex > error on line 5 in file fixedwidth.tex: Only one # is allowed per tab ...

 1     \starttext
 2     contextversion=\contextversion\par
 3     \tabskip=1em
 4     \halign{%
 5 >>  \hfil\it#\hfil&\hfil#\hfil&#&\hfil#\cr
 6     A&B&C&D\cr}
 7     \stoptext
l.5 \hfil\it#\hfil&\hfil#
                       \hfil&#&\hfil#\cr

Why? How primitive it may be, I would like to use \halign now and then.

Hans van der Meer




[-- Attachment #1.2: Type: text/html, Size: 3436 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] 15+ messages in thread

* Re: halign broken
  2013-04-18 12:55 halign broken Meer, H. van der
@ 2013-04-18 13:03 ` Wolfgang Schuster
  2013-04-18 13:16   ` Meer, H. van der
  2013-04-18 13:26   ` Meer, H. van der
  0 siblings, 2 replies; 15+ messages in thread
From: Wolfgang Schuster @ 2013-04-18 13:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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


Am 18.04.2013 um 14:55 schrieb "Meer, H. van der" <H.vanderMeer@uva.nl>:

> There seems something very much amiss with \halign in later ConTeXt versions.
> 
> This typesets fine in PlainTeX and is an example taken from a textbook.
> 
>   \tabskip=1em\halign{%
>   \hfil\it#\hfil&\hfil#\hfil&#&\hfil#\crA&B&C&D\cr}
> 
> Also in contextversion 2012.05.30 (from a TeXlive distribution).
> 
> But it fails at least in ConTeXt  ver: 2013.03.20 10:34 MKIV
> and in ConTeXt  ver: 2013.04.16 12:08 MKIV beta
> with the following error
> 
> ! Only one # is allowed per tab.
> system          > tex > error on line 5 in file fixedwidth.tex: Only one # is allowed per tab ...
> 
>  1     \starttext
>  2     contextversion=\contextversion\par
>  3     \tabskip=1em
>  4     \halign{%
>  5 >>  \hfil\it#\hfil&\hfil#\hfil&#&\hfil#\cr
>  6     A&B&C&D\cr}
>  7     \stoptext
> l.5 \hfil\it#\hfil&\hfil#
>                        \hfil&#&\hfil#\cr
> 
> Why? How primitive it may be, I would like to use \halign now and then.

The error message is misleading because the problem is & and not #.

One of the changes for MkIV was to make _, ^ and & normal characters
in the document (the first two still works for math). For code writing this
doesn’t matter because & has it’s normal meaning when you use
\unprotect … \protect but it can’t be used in the document.

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 4154 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] 15+ messages in thread

* Re: halign broken
  2013-04-18 13:03 ` Wolfgang Schuster
@ 2013-04-18 13:16   ` Meer, H. van der
  2013-04-18 14:13     ` Hans Hagen
  2013-04-18 13:26   ` Meer, H. van der
  1 sibling, 1 reply; 15+ messages in thread
From: Meer, H. van der @ 2013-04-18 13:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

I see, it is either the nuisance of having to type \& etc. in the text, or the nuisance of having to wrap everything like \halign in \unprotect..\protect and then resorting to \& again.
At least there is nothing amiss with \halign itself, which is reassuring. However, I do not feel secure with these little deviations from the orginal TeX.

Hans van der Meer



On 18 Apr 2013, at 3:03 PM, Wolfgang Schuster <schuster.wolfgang@gmail.com<mailto:schuster.wolfgang@gmail.com>>
 wrote:


Am 18.04.2013 um 14:55 schrieb "Meer, H. van der" <H.vanderMeer@uva.nl<mailto:H.vanderMeer@uva.nl>>:

There seems something very much amiss with \halign in later ConTeXt versions.

This typesets fine in PlainTeX and is an example taken from a textbook.

  \tabskip=1em\halign{%
  \hfil\it#\hfil&\hfil#\hfil&#&\hfil#\crA&B&C&D\cr}

Also in contextversion 2012.05.30 (from a TeXlive distribution).

But it fails at least in ConTeXt  ver: 2013.03.20 10:34 MKIV
and in ConTeXt  ver: 2013.04.16 12:08 MKIV beta
with the following error

! Only one # is allowed per tab.
system          > tex > error on line 5 in file fixedwidth.tex: Only one # is allowed per tab ...

 1     \starttext
 2     contextversion=\contextversion\par
 3     \tabskip=1em
 4     \halign{%
 5 >>  \hfil\it#\hfil&\hfil#\hfil&#&\hfil#\cr
 6     A&B&C&D\cr}
 7     \stoptext
l.5 \hfil\it#\hfil&\hfil#
                       \hfil&#&\hfil#\cr

Why? How primitive it may be, I would like to use \halign now and then.

The error message is misleading because the problem is & and not #.

One of the changes for MkIV was to make _, ^ and & normal characters
in the document (the first two still works for math). For code writing this
doesn’t matter because & has it’s normal meaning when you use
\unprotect … \protect but it can’t be used in the document.

Wolfgang



[-- Attachment #1.2: Type: text/html, Size: 4996 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] 15+ messages in thread

* Re: halign broken
  2013-04-18 13:03 ` Wolfgang Schuster
  2013-04-18 13:16   ` Meer, H. van der
@ 2013-04-18 13:26   ` Meer, H. van der
  2013-04-18 13:34     ` Wolfgang Schuster
  1 sibling, 1 reply; 15+ messages in thread
From: Meer, H. van der @ 2013-04-18 13:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

There seems to be more to it:

This works:
\unprotect\halign{\hfil\it#\hfil&\hfil#\hfil&#&\hfil#\hfil\cr
A&B&C&D\cr A&BB&CCCC&DDDDDDDD\cr}\protect

But these generate a missing } after the \halign:
\unprotect\framed{\halign{\hfil\it#\hfil&\hfil#\hfil&#&\hfil#\hfil\cr
A&B&C&D\cr A&BB&CCCC&DDDDDDDD\cr}}\protect

\framed{\unprotect\halign{\hfil\it#\hfil&\hfil#\hfil&#&\hfil#\hfil\cr
A&B&C&D\cr A&BB&CCCC&DDDDDDDD\cr}\protect}

Is such a construction (now) impossible?

Hans van der Meer



On 18 Apr 2013, at 3:03 PM, Wolfgang Schuster <schuster.wolfgang@gmail.com<mailto:schuster.wolfgang@gmail.com>> wrote:


Am 18.04.2013 um 14:55 schrieb "Meer, H. van der" <H.vanderMeer@uva.nl<mailto:H.vanderMeer@uva.nl>>:

There seems something very much amiss with \halign in later ConTeXt versions.

This typesets fine in PlainTeX and is an example taken from a textbook.

  \tabskip=1em\halign{%
  \hfil\it#\hfil&\hfil#\hfil&#&\hfil#\crA&B&C&D\cr}

Also in contextversion 2012.05.30 (from a TeXlive distribution).

But it fails at least in ConTeXt  ver: 2013.03.20 10:34 MKIV
and in ConTeXt  ver: 2013.04.16 12:08 MKIV beta
with the following error

! Only one # is allowed per tab.
system          > tex > error on line 5 in file fixedwidth.tex: Only one # is allowed per tab ...

 1     \starttext
 2     contextversion=\contextversion\par
 3     \tabskip=1em
 4     \halign{%
 5 >>  \hfil\it#\hfil&\hfil#\hfil&#&\hfil#\cr
 6     A&B&C&D\cr}
 7     \stoptext
l.5 \hfil\it#\hfil&\hfil#
                       \hfil&#&\hfil#\cr

Why? How primitive it may be, I would like to use \halign now and then.

The error message is misleading because the problem is & and not #.

One of the changes for MkIV was to make _, ^ and & normal characters
in the document (the first two still works for math). For code writing this
doesn’t matter because & has it’s normal meaning when you use
\unprotect … \protect but it can’t be used in the document.

Wolfgang



[-- Attachment #1.2: Type: text/html, Size: 5432 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] 15+ messages in thread

* Re: halign broken
  2013-04-18 13:26   ` Meer, H. van der
@ 2013-04-18 13:34     ` Wolfgang Schuster
  2013-04-18 13:39       ` Meer, H. van der
  0 siblings, 1 reply; 15+ messages in thread
From: Wolfgang Schuster @ 2013-04-18 13:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 18.04.2013 um 15:26 schrieb "Meer, H. van der" <H.vanderMeer@uva.nl>:

> There seems to be more to it:
> 
> This works:
> \unprotect\halign{\hfil\it#\hfil&\hfil#\hfil&#&\hfil#\hfil\cr 
> A&B&C&D\cr A&BB&CCCC&DDDDDDDD\cr}\protect
> 
> But these generate a missing } after the \halign:
> \unprotect\framed{\halign{\hfil\it#\hfil&\hfil#\hfil&#&\hfil#\hfil\cr 
> A&B&C&D\cr A&BB&CCCC&DDDDDDDD\cr}}\protect
> 
> \framed{\unprotect\halign{\hfil\it#\hfil&\hfil#\hfil&#&\hfil#\hfil\cr 
> A&B&C&D\cr A&BB&CCCC&DDDDDDDD\cr}\protect}
> 
> Is such a construction (now) impossible?

\framed[align=normal,strut=no]{…}

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

* Re: halign broken
  2013-04-18 13:34     ` Wolfgang Schuster
@ 2013-04-18 13:39       ` Meer, H. van der
  2013-04-18 13:46         ` Wolfgang Schuster
  0 siblings, 1 reply; 15+ messages in thread
From: Meer, H. van der @ 2013-04-18 13:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Why does the [align=middle] makess such a difference?

Hans van der Meer



On 18 Apr 2013, at 3:34 PM, Wolfgang Schuster <schuster.wolfgang@gmail.com>
 wrote:

> 
> Am 18.04.2013 um 15:26 schrieb "Meer, H. van der" <H.vanderMeer@uva.nl>:
> 
>> There seems to be more to it:
>> 
>> This works:
>> \unprotect\halign{\hfil\it#\hfil&\hfil#\hfil&#&\hfil#\hfil\cr 
>> A&B&C&D\cr A&BB&CCCC&DDDDDDDD\cr}\protect
>> 
>> But these generate a missing } after the \halign:
>> \unprotect\framed{\halign{\hfil\it#\hfil&\hfil#\hfil&#&\hfil#\hfil\cr 
>> A&B&C&D\cr A&BB&CCCC&DDDDDDDD\cr}}\protect
>> 
>> \framed{\unprotect\halign{\hfil\it#\hfil&\hfil#\hfil&#&\hfil#\hfil\cr 
>> A&B&C&D\cr A&BB&CCCC&DDDDDDDD\cr}\protect}
>> 
>> Is such a construction (now) impossible?
> 
> \framed[align=normal,strut=no]{…}
> 
> 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] 15+ messages in thread

* Re: halign broken
  2013-04-18 13:39       ` Meer, H. van der
@ 2013-04-18 13:46         ` Wolfgang Schuster
  2016-05-16 13:50           ` Reviewing old messages Meer, Hans van der
  0 siblings, 1 reply; 15+ messages in thread
From: Wolfgang Schuster @ 2013-04-18 13:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 18.04.2013 um 15:39 schrieb "Meer, H. van der" <H.vanderMeer@uva.nl>:

> Why does the [align=middle] makess such a difference?

\framed can use a \hbox or a \vbox to place the content, by default it uses a \hbox
but when you set the correct value for the align key it uses a \vbox.

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

* Re: halign broken
  2013-04-18 13:16   ` Meer, H. van der
@ 2013-04-18 14:13     ` Hans Hagen
  2013-04-18 14:58       ` Aditya Mahajan
  0 siblings, 1 reply; 15+ messages in thread
From: Hans Hagen @ 2013-04-18 14:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 4/18/2013 3:16 PM, Meer, H. van der wrote:
> I see, it is either the nuisance of having to type \& etc. in the text,
> or the nuisance of having to wrap everything like \halign in
> \unprotect..\protect and then resorting to \& again.
> At least there is nothing amiss with \halign itself, which is
> reassuring. However, I do not feel secure with these little deviations
> from the orginal TeX.

orinal tex permits to set the catcodes so you need to define 'original tex'

anyhow, you can use \aligntab and \alignhash which wee introduced in 
luatex for this purpose

which reminds me that one of these days on the context dev list we 
should discuss this one

\catcode`€=\mathshiftcatcode

\starttext
     €e=mc^2€
\stoptext

for typesetting math with continental style presets.

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

* Re: halign broken
  2013-04-18 14:13     ` Hans Hagen
@ 2013-04-18 14:58       ` Aditya Mahajan
  0 siblings, 0 replies; 15+ messages in thread
From: Aditya Mahajan @ 2013-04-18 14:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users

> 
> which reminds me that one of these days on the context dev list we should discuss this one
> 
> \catcode`€=\mathshiftcatcode
> 
> \starttext
>    €e=mc^2€
> \stoptext
> 
> for typesetting math with continental style presets.

And maybe make it default whenever one wishes to use comma as a decimal separator :)

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

* Reviewing old messages
  2013-04-18 13:46         ` Wolfgang Schuster
@ 2016-05-16 13:50           ` Meer, Hans van der
  2016-05-16 14:03             ` Wolfgang Schuster
  0 siblings, 1 reply; 15+ messages in thread
From: Meer, Hans van der @ 2016-05-16 13:50 UTC (permalink / raw)
  To: NTG ConTeXt


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

Sifting through my TeX-mailbox, I came along this post of Wolfgang Schuster and decided to try all variations given to the align parameter on \framed.
Curious in which cases the \hbox and in which the \vbox is chosen, not unimportant of course.
I did this by typesetting \hbox{abc}\hbox{xyz} inside a framed. For \hbox want expects abcxyz as output and for \vbox abc and below it xyz. As can be seen in the first two examples.
To my surprise none of the \framed[align=..] options exhibits \vbox character!

Thus my question: has the behaviour of \framed[align=..] changed in the mean time? Three years is of course an eternity when seen in the perspective of the speed with which ConTeXt is evolving 😃. Or is there another reason why the \vbox effect is not shown in any of the examples?
I am enclosing a minmal example and its output. Just curious.

Hans van der Meer


On 18 Apr 2013, at 15:46, Wolfgang Schuster <schuster.wolfgang@gmail.com<mailto:schuster.wolfgang@gmail.com>> wrote:


Am 18.04.2013 um 15:39 schrieb "Meer, H. van der" <H.vanderMeer@uva.nl<mailto:H.vanderMeer@uva.nl>>:

Why does the [align=middle] makess such a difference?

\framed can use a \hbox or a \vbox to place the content, by default it uses a \hbox
but when you set the correct value for the align key it uses a \vbox.

Wolfgang

% testting hbox-vbox behaviour for framed.
\starttext
input:\verbatim{\hbox{\hbox{abc}\hbox{xyz}}}\crlf
\hbox{\hbox{abc}\hbox{xyz}}\blank
input:\verbatim{\vbox{\hbox{abc}\hbox{xyz}}}\crlf
\vbox{\hbox{abc}\hbox{xyz}}\blank
\setupframed[width=0.7\textwidth]
\leftaligned{these are in the command reference}\blank
input:\verbatim{\framed[align=OPTION]{\hbox{abc}\hbox{xyz}}}\blank
inner:\crlf
\framed[align=inner]{\hbox{abc}\hbox{xyz}}\blank
outer:\crlf
\framed[align=outer]{\hbox{abc}\hbox{xyz}}\blank
left:\crlf
\framed[align=left]{\hbox{abc}\hbox{xyz}}\blank
right:\crlf
\framed[align=right]{\hbox{abc}\hbox{xyz}}\blank
flushleft:\crlf
\framed[align=flushleft]{\hbox{abc}\hbox{xyz}}\blank
flushright:\crlf
\framed[align=flushright]{\hbox{abc}\hbox{xyz}}\blank
middle:\crlf
\framed[align=middle]{\hbox{abc}\hbox{xyz}}\blank
center:\crlf
\framed[align=center]{\hbox{abc}\hbox{xyz}}\blank
normal:\crlf
\framed[align=normal]{\hbox{abc}\hbox{xyz}}\blank
no:\crlf
\framed[align=no]{\hbox{abc}\hbox{xyz}}\blank
yes:\crlf
\framed[align=yes]{\hbox{abc}\hbox{xyz}}\blank
broad:\crlf
\framed[align=broad]{\hbox{abc}\hbox{xyz}}\blank
last:\crlf
\framed[align=last]{\hbox{abc}\hbox{xyz}}\blank
r2l:\crlf
\framed[align=r2l]{\hbox{abc}\hbox{xyz}}\blank
l2r:\crlf
\framed[align=l2r]{\hbox{abc}\hbox{xyz}}\blank
\leftaligned{these are extra in the contextgarden}\blank
high:\crlf
\framed[align=high]{\hbox{abc}\hbox{xyz}}\blank
low:\crlf
\framed[align=low]{\hbox{abc}\hbox{xyz}}\blank
lohi:\crlf
\framed[align=lohi]{\hbox{abc}\hbox{xyz}}\blank
\stoptext



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

[-- Attachment #2: framedbox.pdf --]
[-- Type: application/pdf, Size: 9993 bytes --]

[-- Attachment #3: 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] 15+ messages in thread

* Re: Reviewing old messages
  2016-05-16 13:50           ` Reviewing old messages Meer, Hans van der
@ 2016-05-16 14:03             ` Wolfgang Schuster
  2016-05-16 14:31               ` Meer, Hans van der
  0 siblings, 1 reply; 15+ messages in thread
From: Wolfgang Schuster @ 2016-05-16 14:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

> Meer, Hans van der <mailto:H.vanderMeer@uva.nl>
> 16. Mai 2016 um 15:50
> Sifting through my TeX-mailbox, I came along this post of Wolfgang 
> Schuster and decided to try all variations given to the align 
> parameter on \framed.
> Curious in which cases the \hbox and in which the \vbox is chosen, not 
> unimportant of course.
> I did this by typesetting \hbox{abc}\hbox{xyz} inside a framed. For 
> \hbox want expects abcxyz as output and for \vbox abc and below it 
> xyz. As can be seen in the first two examples.
> To my surprise none of the \framed[align=..] options exhibits \vbox 
> character!
>
> Thus my question: has the behaviour of \framed[align=..] changed in 
> the mean time? Three years is of course an eternity when seen in the 
> perspective of the speed with which ConTeXt is evolving 😃. Or is 
> there another reason why the \vbox effect is not shown in any of the 
> examples?
\framed adds a \strut at the begin and end of the content.

\starttext

\vbox{\hbox{First}\hbox{Second}}

\vbox{\strut\hbox{First}\hbox{Second}}

\framed[align=flushleft]{\hbox{First}\hbox{Second}}

\framed[align=flushleft,strut=no,autostrut=no]{\hbox{First}\hbox{Second}}

\stoptext

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 2465 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] 15+ messages in thread

* Re: Reviewing old messages
  2016-05-16 14:03             ` Wolfgang Schuster
@ 2016-05-16 14:31               ` Meer, Hans van der
  2016-05-16 14:41                 ` Wolfgang Schuster
  0 siblings, 1 reply; 15+ messages in thread
From: Meer, Hans van der @ 2016-05-16 14:31 UTC (permalink / raw)
  To: NTG ConTeXt


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

Thanks.

I redid the examples with the autostrut parameter set to respectively yes and no. In the former case I see all have an hbox and in the latter case all have a vbox. So it seems not the align, but the strut being the one determining the box variant.

Hans van der Meer




On 16 May 2016, at 16:03, Wolfgang Schuster <schuster.wolfgang@gmail.com<mailto:schuster.wolfgang@gmail.com>> wrote:

Meer, Hans van der<mailto:H.vanderMeer@uva.nl>
16. Mai 2016 um 15:50
Sifting through my TeX-mailbox, I came along this post of Wolfgang Schuster and decided to try all variations given to the align parameter on \framed.
Curious in which cases the \hbox and in which the \vbox is chosen, not unimportant of course.
I did this by typesetting \hbox{abc}\hbox{xyz} inside a framed. For \hbox want expects abcxyz as output and for \vbox abc and below it xyz. As can be seen in the first two examples.
To my surprise none of the \framed[align=..] options exhibits \vbox character!

Thus my question: has the behaviour of \framed[align=..] changed in the mean time? Three years is of course an eternity when seen in the perspective of the speed with which ConTeXt is evolving 😃. Or is there another reason why the \vbox effect is not shown in any of the examples?
\framed adds a \strut at the begin and end of the content.

\starttext

\vbox{\hbox{First}\hbox{Second}}

\vbox{\strut\hbox{First}\hbox{Second}}

\framed[align=flushleft]{\hbox{First}\hbox{Second}}

\framed[align=flushleft,strut=no,autostrut=no]{\hbox{First}\hbox{Second}}

\stoptext

Wolfgang
___________________________________________________________________________________


[-- Attachment #1.2: Type: text/html, Size: 3560 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] 15+ messages in thread

* Re: Reviewing old messages
  2016-05-16 14:31               ` Meer, Hans van der
@ 2016-05-16 14:41                 ` Wolfgang Schuster
  2016-05-16 15:18                   ` Meer, Hans van der
  0 siblings, 1 reply; 15+ messages in thread
From: Wolfgang Schuster @ 2016-05-16 14:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

> Meer, Hans van der <mailto:H.vanderMeer@uva.nl>
> 16. Mai 2016 um 16:31
> Thanks.
>
> I redid the examples with the autostrut parameter set to respectively 
> yes and no. In the former case I see all have an hbox and in the 
> latter case all have a vbox. So it seems not the align, but the strut 
> being the one determining the box variant.
No, the align settings determines the box type. The \strut at the begin 
forces horizontal mode which results in both \hbox’es in the same line.

\starttext

\ifvmode Vertical \else Horizontal \fi mode

\strut
\ifvmode Vertical \else Horizontal \fi mode

\stoptext

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 1778 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] 15+ messages in thread

* Re: Reviewing old messages
  2016-05-16 14:41                 ` Wolfgang Schuster
@ 2016-05-16 15:18                   ` Meer, Hans van der
  2016-05-16 15:36                     ` Wolfgang Schuster
  0 siblings, 1 reply; 15+ messages in thread
From: Meer, Hans van der @ 2016-05-16 15:18 UTC (permalink / raw)
  To: NTG ConTeXt


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



On 16 May 2016, at 16:41, Wolfgang Schuster <schuster.wolfgang@gmail.com<mailto:schuster.wolfgang@gmail.com>> wrote:

Meer, Hans van der<mailto:H.vanderMeer@uva.nl>
16. Mai 2016 um 16:31
Thanks.

I redid the examples with the autostrut parameter set to respectively yes and no. In the former case I see all have an hbox and in the latter case all have a vbox. So it seems not the align, but the strut being the one determining the box variant.
No, the align settings determines the box type. The \strut at the begin forces horizontal mode which results in both \hbox’es in the same line.

Ok. But when using "strut=no,autostrut=no" I see for all values of align the abc/xyz below each other and none having abcxyz. Doesn't that suggest that all boxes are vbox and that the strut merely forces horizontal mode? Otherwise I do not understand what happens.

Thus I did the experiment again, for all options with \framed[strut=no,autostrut=no,align=OPTION]{\ifvmode V\else H\f.
I  found a V at the front of the output in each and every case.


\starttext

\ifvmode Vertical \else Horizontal \fi mode

\strut
\ifvmode Vertical \else Horizontal \fi mode

\stoptext

Wolfgang
___________________________________________________________________________________


[-- Attachment #1.2: Type: text/html, Size: 3150 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] 15+ messages in thread

* Re: Reviewing old messages
  2016-05-16 15:18                   ` Meer, Hans van der
@ 2016-05-16 15:36                     ` Wolfgang Schuster
  0 siblings, 0 replies; 15+ messages in thread
From: Wolfgang Schuster @ 2016-05-16 15:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

> Meer, Hans van der <mailto:H.vanderMeer@uva.nl>
> 16. Mai 2016 um 17:18
> Ok. But when using "strut=no,autostrut=no" I see for all values of 
> align the abc/xyz below each other and none having abcxyz. Doesn't 
> that suggest that all boxes are vbox and that the strut merely forces 
> horizontal mode? Otherwise I do not understand what happens.
Yes, when you set a value for the width key you always get a \vbox.

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 1458 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] 15+ messages in thread

end of thread, other threads:[~2016-05-16 15:36 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-18 12:55 halign broken Meer, H. van der
2013-04-18 13:03 ` Wolfgang Schuster
2013-04-18 13:16   ` Meer, H. van der
2013-04-18 14:13     ` Hans Hagen
2013-04-18 14:58       ` Aditya Mahajan
2013-04-18 13:26   ` Meer, H. van der
2013-04-18 13:34     ` Wolfgang Schuster
2013-04-18 13:39       ` Meer, H. van der
2013-04-18 13:46         ` Wolfgang Schuster
2016-05-16 13:50           ` Reviewing old messages Meer, Hans van der
2016-05-16 14:03             ` Wolfgang Schuster
2016-05-16 14:31               ` Meer, Hans van der
2016-05-16 14:41                 ` Wolfgang Schuster
2016-05-16 15:18                   ` Meer, Hans van der
2016-05-16 15:36                     ` 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).