<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Finding that I was continually re-using the sequence :<br>
<br>
\newbox \xxxbox<br>
\setbox \xxxbox = \hbox {...}<br>
<br>
I thought to introduce an adjunct macro \imagebox, as in :<br>
<br>
\def \imagebox #1{\newbox #1\setbox #1}<br>
<br>
such that I could thereafter write <br>
<br>
\imagebox \xxxbox = \hbox {...}<br>
<br>
However, \newbox is defined with the \outer prefix and therefore cannot be used in a macro definition. \let \outer = \relax before the definition does not help. Victor Eijkhout [2] noted (p.~96) "[...] it is inconvenient that some of the plain macros are
outer [...]. One remedy is to redefine them, without the ‘outer’ option, which is done for instance in LATEX, but cleverer tricks are possible" but failed (as far as I could see) to describe any of those cleverer tricks. Stephan von Bechtolsheim [1] gives
the canonical Knuthian definition of \outer (Vol.~III, p.~179) but also (as far as I could see) fails to offer any workaround. Finally one suggested itself :<br>
<br>
<blockquote type="cite"><style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
\def \imagebox #1{\csname newbox\endcsname #1 \setbox #1}</p>
</blockquote>
<br>
Thereafter I can write (e.g.)<br>
<br>
<blockquote type="cite">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
\imagebox \logobox = \hbox {\XeTeXpdffile ../../Logos/WBH-Logo.pdf height \imageheight}</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
\imagebox \flagbox = \hbox {\XeTeXpdffile ../../Flags/St-Piran.pdf height \imageheight}</p>
</blockquote>
<br>
This would seem to be necessary and sufficient.<br>
<i>Philip Taylor<br>
--------</i><br>
[1]<i> </i>@Book<br>
{Bechtolsheim:TP93c,<br>
author = "Stephan von Bechtolsheim",<br>
title = "{\TeX} in Practice: Tokens, Macros",<br>
publisher = pub-SV,<br>
year = "1993",<br>
ISBN = "0-387-97597-7, 3-540-97597-7",<br>
LCCN = "Z253.4.T47 B4 1993",<br>
volume = "3",<br>
address = pub-SV:adr,<br>
bibdate = "Mon Oct 18 15:41:37 1993",<br>
acknowledgement = ack-nhfb,<br>
}<br>
<br>
<i></i>[2] @Book<br>
{Eijkhout:TTT92,<br>
author = "Victor Eijkhout",<br>
title = "{\TeX} by Topic, {A} {\TeX}nician's Reference",<br>
publisher = pub-AW,<br>
address = pub-AW:adr,<br>
year = "1992",<br>
ISBN = "0-201-56882-9",<br>
LCCN = "Z253.4.T47 E38 1992",<br>
pages = "vii + 307",<br>
bibdate = "Tue Dec 14 22:47:52 1993",<br>
}<br>
</body>
</html>