Math & ScienceXOR difference, how to?

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
krislodz
Posts: 42
Joined: Sun Nov 08, 2009 1:13 pm

XOR difference, how to?

Post by krislodz »

Hello,

I am trying to write xor difference which is a Delta character with a XOR as a superscript.

I did it the simplest way as:

Code: Select all

$\Delta^{\oplus}$
But XOR is a little bit too far from Delta and it does not look good. Has anyone done that or has some hints?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

XOR difference, how to?

Post by localghost »

Code: Select all

\[
  \Delta\!^\oplus
\]

Best regards
Thorsten
krislodz
Posts: 42
Joined: Sun Nov 08, 2009 1:13 pm

Re: XOR difference, how to?

Post by krislodz »

Thanks, this is much better, only the XOR is bigger than it should be and I don't know how to make it smaller.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

XOR difference, how to?

Post by localghost »

Code: Select all

\[
  \Delta\!\!^{\scriptscriptstyle\oplus}
\]
krislodz
Posts: 42
Joined: Sun Nov 08, 2009 1:13 pm

Re: XOR difference, how to?

Post by krislodz »

Now it is too close, it should not be touching. I will try to experiment with that. Also, is it possible to define such characters in a short version so that the document is easier to read?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

XOR difference, how to?

Post by localghost »

Code: Select all

\documentclass{article}

\newcommand*{\xordiff}{%
  \Delta\!^{\scriptscriptstyle\oplus}
}


\begin{document}
  \[
    \xordiff
  \]
\end{document}
krislodz
Posts: 42
Joined: Sun Nov 08, 2009 1:13 pm

Re: XOR difference, how to?

Post by krislodz »

Thanks a lot for help, this is really useful for future.
Post Reply