8

What are 2-nd and 4-th symbols in the image below ?

  • For me, 1-st looks like \ominus and 3-rd looks like \oslash. But I couldn't figure out the other two.

enter image description here

2

4 Answers 4

4
\documentclass{standalone}
\usepackage{graphicx}
\begin{document}
    $\ominus$, \rotatebox[origin=c]{90}{$\ominus$}, $\oslash$ and \rotatebox[origin=c]{90}{$\oslash$}
\end{document}

Result

Edit

After seeing campa's suggestion which also considers sub- and superscripts, I will show that this is also possible here using \mathchoice: Result with subscripts

\documentclass{article}
\usepackage{graphicx}

\newcommand\obslash{\ensuremath{\mathchoice%
    {\rotatebox[origin=c]{90}{$\oslash$}}% inline math
    {\rotatebox[origin=c]{90}{$\oslash$}}% display math
    {\rotatebox[origin=c]{90}{$\scriptstyle\oslash$}}% script
    {\rotatebox[origin=c]{90}{$\scriptscriptstyle\oslash$}}% scriptscript
}}
\newcommand\overt{\ensuremath{\mathchoice%
    {\rotatebox[origin=c]{90}{$\ominus$}}%
    {\rotatebox[origin=c]{90}{$\ominus$}}%
    {\rotatebox[origin=c]{90}{$\scriptstyle\ominus$}}%
    {\rotatebox[origin=c]{90}{$\scriptscriptstyle\ominus$}}%
}}

\begin{document}
    $\ominus$, \rotatebox[origin=c]{90}{$\ominus$}, $\oslash$ and \rotatebox[origin=c]{90}{$\oslash$}.
    It also scales correctly when used in sub-/superscripts:
    
    Text: $\ominus_{\ominus_{\ominus}}$, $\overt_{\overt_{\overt}}$, $\oslash_{\oslash_{\oslash}}$ and $\obslash_{\obslash_{\obslash}}$.
    \[
        \textrm{Display: } \ominus_{\ominus_{\ominus}}\textrm{, } \overt_{\overt_{\overt}}\textrm{, } \oslash_{\oslash_{\oslash}}\textrm{ and } \obslash_{\obslash_{\obslash}}\textrm{.}
    \]
\end{document}
14

All four of these characters are in Unicode and supported with command names in unicode-math and compatible packages such as stix2

 U+2296   U+29B6        U+2298   U+29B8
 \ominus  \circledvert  \oslash  \obslash

⊖ ⦶ ⊘ ⦸

enter image description here

\documentclass{article}

\usepackage{unicode-math}

\setmathfont{STIX Two Math}
\begin{document}

\[
a ^^^^2296 b  ^^^^29b6   c  ^^^^2298 d  ^^^^29b8
\]

\end{document}
4
  • 3
    \ominus as displayed here is a different size from the other operators, and the horizontal stroke doesn't touch the sides of the circle. In particular, it doesn't match what my TeX installation displays, and what is in the figure in the original post. Maybe that's just an issue of my browser fonts.
    – LSpice
    Commented Mar 8, 2023 at 15:39
  • 1
    @LSpice since they're from completely different Unicode blocks, it's obvious the symbols are unrelated despite any visual similarities. Commented Mar 8, 2023 at 21:52
  • @LSpice you get arbitary fonts via css, I added STIX2 version set with luatex Commented Mar 8, 2023 at 22:21
  • @MarkRansom not really. - and / are older, | and \ added as part of the stix submission, - and \ wouldn't have been re-added at that time as "similar shape". As I show in an image just added, an OpenType math font should have all 4 in matching size. Commented Mar 8, 2023 at 22:24
11

A modification of campa's answer in order to ensure that the symbols all get the same bounding box.

\documentclass{article}

\usepackage{graphicx} % for \rotatebox/\reflectbox
\usepackage{amsmath}  % for \binrel@/\binrel@@

\makeatletter
\newcommand*{\mathreflect}[1]{%
  \binrel@{#1}\binrel@@{\mathpalette\math@reflect{#1}}%
}
\newcommand*{\math@reflect}[2]{\reflectbox{\m@th$#1#2$}}
\newcommand*{\mathrotate}[3][]{%
  \binrel@{#3}\binrel@@{\vphantom{#3}\mathpalette\math@rotate{{#1}{#2}{#3}}}%
}
\newcommand*{\math@rotate}[2]{\math@@rotate#1#2}
\newcommand*{\math@@rotate}[4]{% #1=math style,#2=option,#3=angle,#4=symbol
  \sbox\z@{$\m@th#1#4$}%
  \smash{\makebox[\wd\z@]{\rotatebox[#2]{#3}{$\m@th#1#4$}}}%
}
\makeatother

\newcommand*{\obslash}{\mathreflect{\oslash}}
\newcommand*{\overt}{\mathrotate[origin=c]{90}{\ominus}}

\begin{document}

$\ominus$, $\overt$, $\oslash$, and $\obslash$

$a\ominus b$

$a\overt b$

$a\oslash b$

$a\obslash b$

$\overt_{\overt}\oslash_{\oslash}$

\setlength{\fboxsep}{0pt}\setlength{\fboxrule}{0.1pt}
\fbox{$\ominus$}\kern-\fboxrule
\fbox{$\overt$}\kern-\fboxrule
\fbox{$\oslash$}\kern-\fboxrule
\fbox{$\obslash$}

\end{document}

enter image description here

1
  • 1
    Nice idea with the bounding box (+1), I will definitely steal it though I'll probably define it as starred form (it might be wanted or not). However, I have a small comment: I remember that I introduced the \@ifnextchar[ to test for an optional argument because using \rotatebox and \rotatebox[] (i.e. with empty optional parameter) is not the same. (Try \rotatebox{90}{|}\rotatebox[]{90}{|}.) I also remember not having the time to investigate the issue any further ;-) but I should look into it again...
    – campa
    Commented Mar 7, 2023 at 16:45
8

From the stmaryrd package (symbols used in theoretical computer science):

\documentclass[11pt]{article}
\usepackage{stmaryrd}
\begin{document}
$\ominus$ and $\oslash$ % in LaTeX kernel

$\varominus$, $\varobar$, $\varoslash$ and $\varobslash$
\end{document}

enter image description here

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .