I am looking for a symbol that looks like: []–>
So far I came up with $\Box\rightarrow$. The problem with this is, that the arrow is too far away from the box:
How could I achieve this so that the box is not so far away from the arrow?
Update:
Solution below.
Additionally I also needed a might counterfactual:
\newcommand{\counterfactualmight}{\ensuremath{%
\mathord{\Diamond}\kern-1.5pt
\raise0.5pt\hbox{$\mathord{\rightarrow}$}}}
Update 2:
Better Solution
From
http://www.ctan.org/pkg/comprehensive
%..
\usepackage{txfonts}
\usepackage{pxfonts}
%..
\begin{enumerate}
\item A conditional: X $\rightarrow$ Y
\item A strict conditional: X $\strictif$ Y
\item A would-counterfactual conditional: X $\boxright$ Y
\item A might-counterfactual conditional: X $\Diamondright$ Y
\end{enumerate}
Best Answer
A combination of
\kern
,\raise
,\hbox
, and\mathord
(the final one to change the status of\rightarrow
to "ordinary") should do the trick of aligning\Box
and\rightarrow
:Addendum: I don't know if you intend to use the
\counterfactual
macro in text or math mode. (That was also, by the way, why I used\ensuremath
to encase the macro's contents.) If you intend to use it in math mode, it may be a good idea to give it "mathrel" (relational operator) status, e.g., by defining it asThat way, the spacing in expressions such as $A \counterfactual B$ will be correct without need for further fiddling.