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:

enter image description here

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:


enter image description here

Update 2: Better Solution From http://www.ctan.org/pkg/comprehensive

 \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

enter image description here

  • You might find this useful in relation to Mico's answer below. tex.stackexchange.com/questions/38982/… – Daniel Harbour Oct 19 '13 at 11:08
  • I'm glad that the basic method for the \counterfactual macro also works for your \mightcounterfactual symbol. :-) – Mico Oct 19 '13 at 11:19
  • i know that some very similar symbols were added to unicode, so try the stix or xits fonts. (i am not able to check these from my present location, sorry.) – barbara beeton Oct 19 '13 at 15:33
  • Careful, \usepackage{txfonts} and \usepackage{pxfonts} changes your whole document font to a quite ugly one (to the latter one, i.e. this case pxfonts, so putting two fonts has no additional effect anyways). Since both fonts look significantly worse than the default font this is not a good solution for me. – Max Jun 2 '20 at 0:10

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:

enter image description here

$\Box\rightarrow$ vs.\ \counterfactual

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 as


That way, the spacing in expressions such as $A \counterfactual B$ will be correct without need for further fiddling.

  • 1
    Could you maybe add something about \mathrel here? The spacing in $P \mathrel{\counterfactual} Q$ is (closer to) that of $P \rightarrow Q$ than that of $P \counterfactual Q$ is. – Daniel Harbour Oct 19 '13 at 11:15
  • 1
    @DanielHarbour - Thanks for this. I've inserted an addendum to address the use of giving the new macro "mathrel" status if it's going to be used in math mode. – Mico Oct 19 '13 at 11:26

There's no need to guess or measure things, other than the amount of back up. The arrow should be at the same height as plain arrows. So we can use the fact that \mathop applied to a single object centers it with respect to the math axis.


$A\counterfactual B$

$A\mightcounterfactual B$


enter image description here

  • Can we use a smaller box instead? – Max Jun 2 '20 at 0:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.