LaTeX Macro Symbol

I have long dreamed of creating a “sequential comparison” operator for use in my homework (in LaTeX). That is, in some long derivation, we may need to know how $ a $ compares with $ b $, and although this is completely far-fetched, the example can read

\begin{align*}
    a &? b \\
    f(a) &? f(b) \\
    f(a) &= f(b) \text{by assumption} \\
    \implies a &= b
\end{align*}

That is, we start with the fact that "this comparison should be consistent throughout the output," and then we will see it? (comparison operator) can be replaced by =. This notation is clearly crappy, and now, when I do more work in the group, it would be nice to have something more visual, intuitive.

I have a dream about a small circle with a question mark inside or above it. The problem is that I don’t know how to individually size / align characters in LaTeX macros. So far i've come up with

\def\mycomparator{\circ^{\!\!\!?}\,}
$a \mycomparator b$

(i.e. a small circle with a superscript question mark, threw back three places, then some right filling to correctly place the left side of the comparator)

While this works, this is not exactly what I'm looking for and (even worse) is a talented, disgusting hack.

How can I achieve this?

Thank!

+3
source share
3 answers

Try the following (not verified):

\newcommand{\mycomparator}{\stackrel{?}{\circ}}

\mathrel, .

, . , .

, R , .. \mathrel {R} . , .

, \preceq \prec, , .

\ circ .

+3

LaTeX, \textcircled{?} .

+3

If you need a character that actually looks beautiful, then I assume that you will need to correctly design something with the correct scaling, say, work with the presentation of the question mark font and include a circle.

Take a look at the metapost or spiro .

+2
source

Source: https://habr.com/ru/post/1724587/


All Articles