# LyX: How to combine two math symbols? [duplicate]

This question already has an answer here:

I'm a new user of LyX. I'm using it to write math lectures.

How can I make a new symbol from two existing ones? To be more precise, how can I create this: It's a subset with a circle in it (\subset, \circ).

## marked as duplicate by egreg, Peter Jansson, Jesse, Guido, Martin SchröderJan 26 '14 at 12:26

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

## migrated from stackoverflow.comJan 26 '14 at 8:50

This question came from our site for professional and enthusiast programmers.

• If this question can be reopened, then this answer can be moved here, where it fits better than as answer for the duplicate. – Heiko Oberdiek Jan 28 '14 at 20:40

## 3 Answers

I'm not sure how friendly my answer is to a new LyX user... but

\! can be used to give negative horizontal spacing in math mode. Wrapping with \mathrel{} adjust the spacing around the new symbol.

\documentclass[varwidth]{standalone}
\usepackage{amsmath}
\newcommand{\subsetcirc}{\mathrel{\subset\!\!\!\!\!\circ}}
\begin{document}
$A \subset B$

$A \subsetcirc B$
\end{document} Here's a solution that uses the TeX "primitive" commands \ooalign, \kern, and \raise (as well as \hss, \cr, and \hbox). It also uses, unsurprisingly, the "standard" symbols \subset and \circ. If you want to make the circle larger or smaller, change the first argument of the \scalebox command. To shift the circle a bit more to the right, increase the argument of the \kern command. And, if you use a package that uses its own forms of the subset and circle symbols, you may need to tweak the code a bit more to get a satisfactory positioning of the symbols.

\documentclass{article}
\usepackage{graphicx} % for \scalebox macro
\newcommand\subsetcirc{%
\mathrel{\ooalign{\hss$\subset$\hss\cr%
\kern0.6ex\raise0.2ex\hbox{\scalebox{0.7}{$\circ$}}}}}

\begin{document}
$A\subsetcirc B$
\end{document}


Another possibility is

\documentclass{article}

\newcommand*\subsetcircle{\mathrel{\ooalign{$\subset$\cr\hidewidth\hbox{$\circ\mkern 1mu$}\cr}}}

\begin{document}

$A\subsetcircle B$

\end{document} 