29

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.

26

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

enter image description here

15
\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}}}}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.