ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* problem since previous versions
@ 2020-06-07 10:07 Hans van der Meer
  2020-06-07 10:20 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Hans van der Meer @ 2020-06-07 10:07 UTC (permalink / raw)
  To: NTG ConTeXt


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

A problem has arisen up since previous versions, where code without a problem now raises an error.

This is the afflicted code:
	% Assign values to \locationbox.
	\doif{top}{\placexlocation}%
		{\def\startlocationbox{\vtop\bgroup\vss}}%
	\doif{center}{\placexlocation}%
		{\def\startlocationbox{\vcenter\bgroup}}%
	\doif{bottom}{\placexlocation}%
		{\def\startlocationbox{\vbox\bgroup}}%

And it is used here:
	\setbox\placexbox=\startlocationbox
		\ignorespaces

Previously this worked without a hitch, now the error is:
tex error       > tex error on line 9 in file ./familie-events.tex: ! A <box> was supposed to be here
<to be read again> 
\vcenter 
\startlocationbox ->\vcenter 
                             \bgroup 
\dostartcontentplacexinline ...ables \par \setbox \placexbox =\startlocationbox 
                                                                                \ignorespaces 
<to be read again> \syst_helpers_single_empty_one_nop 
                                   \xmlflush 
\21>:xmlplc:placexcontent ...le=\xmlatt {#1}{alttitle}]}\startcontent \xmlflush 
                                                                                {#1}\stopcontent 
l.9 }

I can try to make a minimal example, but not without the afflicted module of some 800 lines. So perhaps the problem will be located by the experts at first sight. It is of course the \vcenter playing havoc, because replacing it by \vtop or \vbox makes the error disappear.

Thanks for looking into it, because my work more or less depends on this code working in good order.

dr. Hans van der Meer



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

* Re: problem since previous versions
  2020-06-07 10:07 problem since previous versions Hans van der Meer
@ 2020-06-07 10:20 ` Wolfgang Schuster
  2020-06-07 10:37   ` Hans van der Meer
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2020-06-07 10:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hans van der Meer schrieb am 07.06.2020 um 12:07:
> A problem has arisen up since previous versions, where code without a 
> problem now raises an error.
> 
> This is the afflicted code:
> % Assign values to \locationbox.
> \doif{top}{\placexlocation}%
> {\def\startlocationbox{\vtop\bgroup\vss}}%
> \doif{center}{\placexlocation}%
> {\def\startlocationbox{\vcenter\bgroup}}%
> \doif{bottom}{\placexlocation}%
> {\def\startlocationbox{\vbox\bgroup}}%
> 
> And it is used here:
> \setbox\placexbox=\startlocationbox
> \ignorespaces
> 
> Previously this worked without a hitch, now the error is:
> tex error       > tex error on line 9 in file ./familie-events.tex: ! A 
> <box> was supposed to be here
> <to be read again>
> \vcenter
> \startlocationbox ->\vcenter
>                               \bgroup
> \dostartcontentplacexinline ...ables \par \setbox \placexbox 
> =\startlocationbox
>                                                                          
>          \ignorespaces
> <to be read again> \syst_helpers_single_empty_one_nop
>                                     \xmlflush
> \21>:xmlplc:placexcontent ...le=\xmlatt {#1}{alttitle}]}\startcontent 
> \xmlflush
>                                                                          
>          {#1}\stopcontent
> l.9 }
> 
> I can try to make a minimal example, but not without the afflicted 
> module of some 800 lines. So perhaps the problem will be located by the 
> experts at first sight. It is of course the \vcenter playing havoc, 
> because replacing it by \vtop or \vbox makes the error disappear.
> 
> Thanks for looking into it, because my work more or less depends on this 
> code working in good order.

How so you define \placexlocation?

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: problem since previous versions
  2020-06-07 10:20 ` Wolfgang Schuster
@ 2020-06-07 10:37   ` Hans van der Meer
  0 siblings, 0 replies; 3+ messages in thread
From: Hans van der Meer @ 2020-06-07 10:37 UTC (permalink / raw)
  To: NTG ConTeXt


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

Wolfgang,

I did define the various variants in order to parametrize vtop, vbox and vcenter through parameters top, bottom, center.
 
Happily there proved to be a remedy: place everything inside an \hbox and the error goes away. Without problematic whitespace or other nasty side effects, it seems.  But, although the panic is over now :-), I am still curious to know why it worked before and raises an error now.

as for the definition of \placexlocation, it comes from:
\def\setupplacex{\getparameters[placex]}
\setupplacex[%	default parameters
...
	location=center,%
...
	]%
and I checked that it had the value: center.

But if you are interested, I can send you the module code.

dr. Hans van der Meer


> On 7 Jun 2020, at 12:20, Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> wrote:
> 
> Hans van der Meer schrieb am 07.06.2020 um 12:07:
>> A problem has arisen up since previous versions, where code without a problem now raises an error.
>> This is the afflicted code:
>> % Assign values to \locationbox.
>> \doif{top}{\placexlocation}%
>> {\def\startlocationbox{\vtop\bgroup\vss}}%
>> \doif{center}{\placexlocation}%
>> {\def\startlocationbox{\vcenter\bgroup}}%
>> \doif{bottom}{\placexlocation}%
>> {\def\startlocationbox{\vbox\bgroup}}%
>> And it is used here:
>> \setbox\placexbox=\startlocationbox
>> \ignorespaces
>> Previously this worked without a hitch, now the error is:
>> tex error       > tex error on line 9 in file ./familie-events.tex: ! A <box> was supposed to be here
>> <to be read again>
>> \vcenter
>> \startlocationbox ->\vcenter
>>                              \bgroup
>> \dostartcontentplacexinline ...ables \par \setbox \placexbox =\startlocationbox
>>                                                                                  \ignorespaces
>> <to be read again> \syst_helpers_single_empty_one_nop
>>                                    \xmlflush
>> \21>:xmlplc:placexcontent ...le=\xmlatt {#1}{alttitle}]}\startcontent \xmlflush
>>                                                                                  {#1}\stopcontent
>> l.9 }
>> I can try to make a minimal example, but not without the afflicted module of some 800 lines. So perhaps the problem will be located by the experts at first sight. It is of course the \vcenter playing havoc, because replacing it by \vtop or \vbox makes the error disappear.
>> Thanks for looking into it, because my work more or less depends on this code working in good order.
> 
> How so you define \placexlocation?
> 
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________


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

end of thread, other threads:[~2020-06-07 10:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-07 10:07 problem since previous versions Hans van der Meer
2020-06-07 10:20 ` Wolfgang Schuster
2020-06-07 10:37   ` Hans van der Meer

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