[texhax] Placing unknown images arbitrarily by lower left corner

Steve Schwartz s.schwartz at imperial.ac.uk
Thu Mar 31 15:59:43 CEST 2011


\raisebox works as it was advertised by previous writers. I append a
short example that puts a frame around all the boxes so you can see
where they are. I tried with both text and graphics and they give the
same results. They are consistent with the message I've just seen from
Ulrike.

You might try putting frames around your boxes to see how they interact
with textpos or whatever.

HTH
Steve

----------------------------------
\documentclass{article}
\usepackage{graphicx}
\begin{document}

\newsavebox{\lion}
\sbox{\lion}{\fbox{\LARGE LION}}


%\sbox{\lion}{\fbox{\includegraphics[scale=0.2]{mary-rose}}}

\newsavebox{\raiselion}
\sbox{\raiselion}{\fbox{\raisebox{3em}{\usebox{\lion}}}}

\newsavebox{\raisebyheight}
\sbox{\raisebyheight}{\fbox{\raisebox{\height}{\usebox{\lion}}}}

Hello\_\usebox{\lion}\_

Goodbye\_\usebox{\raiselion}\_

Hello\_\usebox{\raisebyheight}\_

\end{document}
-----------------------------


On Thu, 2011-03-31 at 14:45 +0100, Peter Davis wrote:
> 
> On Thu, Mar 31, 2011 at 9:41 AM, Philip Taylor (Webmaster, Ret'd)
> <P.Taylor at rhul.ac.uk> wrote:
>         
>         
>         Peter Davis wrote:
>         
>                 Hmmm.  I tried this with XeLaTeX, but the images are
>                 still coming out at
>                 the bottom of the page, rather than on the 396bp line.
>         
>         
>         How about doing the \raises later, at the time of the \usebox
>         rather than at the time of the \s[et]box ?  I don't speak
>         LaTeX, so I can't write it for you ...
> 
> 
> That's what I tried first.  Same result.
> 
> 
> Thanks,
> -pd
> 
> 
> 
> 
> -- 
> ----
> The Tech Curmudgeon
> http://www.techcurmudgeon.com
> 
> 
> 
-- 
+-------------------------------------------------------------------+
Professor Steven J Schwartz        Phone: +44-(0)20-7594-7660
Head, Space & Atmospheric Physics  Fax:   +44-(0)20-7594-7772
The Blackett Laboratory            E-mail: s.schwartz at imperial.ac.uk
Imperial College London            Office: Huxley 6M67A 
London SW7 2AZ, U.K.               Web: www.sp.ph.ic.ac.uk/~sjs
+-------------------------------------------------------------------+



More information about the texhax mailing list