答案1
\documentclass{standalone}
\usepackage{graphicx}
\begin{document}
$\ominus$, \rotatebox[origin=c]{90}{$\ominus$}, $\oslash$ and \rotatebox[origin=c]{90}{$\oslash$}
\end{document}
编辑
在看到 campa 的建议(也考虑了下标和上标)后,我将证明在这里使用这种方法也是可能的\mathchoice
:
\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}
答案2
答案3
修改campa 的回答以确保所有符号都具有相同的边界框。
\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}