# How do you superimpose two symbols over each other?

I want to superimpose two symbols, e.g. I want to superimpose \vee and \wedge and > and < symbols over each other (not above each other as in stackrel) and Q with a horizontal strike through like bar across it. I am using LyX 2.0.

-
Welcome to TeX.sx! A tip: you can use backticks  to mark your inline code as I did in my edit. Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count. This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). –  doncherry Jul 3 '11 at 8:51

\makeatletter
\newcommand{\superimpose}[2]{%
{\ooalign{$#1\@firstoftwo#2$\cr\hfil$#1\@secondoftwo#2$\hfil\cr}}}
\makeatother

\newcommand{\veewedge}{\mathpalette\superimpose{{\vee}{\wedge}}}
\newcommand{\lessgreater}{\mathpalette\superimpose{{<}{>}}}
\newcommand{\strikeQ}{\mathpalette\superimpose{{\text{---}}{Q}}}

$\veewedge_{\veewedge}\lessgreater_{\lessgreater}\strikeQ_{\strikeQ}$


The wider symbol must go first in the argument to \superimpose, which must consist of two braced objects. Of course \text requires amsmath.

If, say, \veewedge is to be considered as a relation symbol, the definition should be

\newcommand{\veewedge}{\mathrel{\mathpalette\superimpose{{\vee}{\wedge}}}}

-

\rlap and \llap can be used to print a symbol without a width. Similar, the mathtools package provides commands \mathrlap, \mathclap, \mathllap. These commands offer a quick way for overlapping symbols.

Example, overlapping \vee, \wedge and Q like desired in your question:

\documentclass{article}
\usepackage{mathtools}
\begin{document}
$\mathrlap{\vee}\wedge$
\rlap{Q}---
\end{document}


While \rlap produces a zero-width box where the content sticks out to the right, \llap does the same but to the left. \mathclap` centers to the current position.

-