1

was trying to make an arrow with a cross (when a chemical reaction does not occur) using tikz and chemfig, but the results were not good.

I would like to do something similar to the drawing below.

Any suggestion?

enter image description here

1 Answer 1

4

The chemfig package already offers the -/> arrow type to denote non successful reactions. Based on its definition, I also defined a new -x> arrow type:

enter image description here

\documentclass{article}
\usepackage{chemfig}

\catcode`\_=11
\definearrow5{-x>}{%
    \CF_arrowshiftnodes{#3}%
    \CF_expafter{\draw[}\CF_arrowcurrentstyle](\CF_arrowstartnode)--(\CF_arrowendnode)%
        coordinate[midway,shift=(\CF_ifempty{#4}{225}{#4}+\CF_arrowcurrentangle:\CF_ifempty{#5}{5pt}{#5})](line@start)%
        coordinate[midway,shift=(\CF_ifempty{#4}{45}{#4}+\CF_arrowcurrentangle:\CF_ifempty{#5}{5pt}{#5})](line@end)%
        coordinate[midway,shift=(\CF_ifempty{#4}{135}{#4}+\CF_arrowcurrentangle:\CF_ifempty{#5}{5pt}{#5})](line@start@i)%
        coordinate[midway,shift=(\CF_ifempty{#4}{315}{#4}+\CF_arrowcurrentangle:\CF_ifempty{#5}{5pt}{#5})](line@end@i);
    \draw(line@start)--(line@end);%
    \draw(line@start@i)--(line@end@i);%
    \CF_arrowdisplaylabel{#1}{0.5}+\CF_arrowstartnode{#2}{0.5}-\CF_arrowendnode
}
\catcode`\_=8

\begin{document}
\schemestart
A \arrow{-/>} B
\schemestop

\schemestart
A \arrow{-x>} B
\schemestop
\end{document}
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .