[texhax] symbol for triple vertical 'x'

Morten Høgholm moho01ab at student.cbs.dk
Fri Dec 17 16:23:53 CET 2004


On Fri, 17 Dec 2004 13:52:42 +0100, Sarah Bluhme  
<sarah.bluhme at itg.uni-muenchen.de> wrote:

> Hi Tom,
>
> thanks for your help - I modified your code slightly to make the 'x's  
> smaller and it looks fine for my purposes
>
> \newcommand{\recur}{\hbox to 1ex{\hbox to0pt{\raisebox{0.9ex}{\sffamily  
> \tiny x}}%
> \hbox to0pt{\raisebox{-0.3ex}{\sffamily \tiny x}}%
> \hbox to0pt{\raisebox{0.3ex}{\sffamily \tiny x}}}}
>
>
> There's just one strange bug: a blank line preceding a \recur starts a  
> new paragraph after the triple 'x' sign.
> Has anyone got any ideas as to the cause of this phenomenon?

There are good reasons why one should use the LaTeX command \makebox  
instead of the TeX primitive \hbox. You see, \hbox has a mildly deceiving  
name. While it typesets it's argument in horizontal mode it may in fact  
appear in vertical mode. Since TeX is in vertical mode at the beginning of  
the paragraph, the \hbox in \recur will also be in vertical mode unless  
you tell it to leave vertical mode. This can be done with the command  
\leavevmode, but I'd much rather instruct you to use the LaTeX constructs  
in order to avoid those problems once and for all.

Might I propose a definition like this:

\newsavebox\recurbox
\sbox\recurbox{\sffamily\tiny x}
\sbox\recurbox{%
   \raisebox{-.5\ht\recurbox}{\usebox\recurbox}%
   \makebox[0pt][r]{\raisebox{.5\ht\recurbox}{\usebox\recurbox}}%
   \makebox[0pt][r]{\raisebox{1.5\ht\recurbox}{\usebox\recurbox}}%
}
\newcommand*\recur{\usebox\recurbox}

Box objects like this are useful in situations where you need the exact  
same object multiple times as seems to be the case here.
-- 
Morten Høgholm



More information about the texhax mailing list