2

How can I draw \Rightarrow like this:? enter image description here

\documentclass{standalone}
\usepackage{tikz}
\newcommand{\Arrow}[1]{%
\parbox{#1}{\tikz{\draw[->,line width=0.7pt,line cap=round](0,0)--(#1,0);}}
}
\newcommand{\myarrow}{\Arrow{.45cm}}

\begin{document} 4 \myarrow 2 \end{document}

Update: How can i fix the left side? enter image description here

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows}
\newcommand{\Arrow}[1]{%
\parbox{#1}{\tikz{\draw[-implies,double equal sign distance,line width=0.7pt,line cap=round](0,0)--(#1,0);}}
}
\newcommand{\myarrow}{\hspace{0.0cm}\Arrow{.45cm}\hspace{0.0cm}}

\begin{document} 4 \myarrow 2 \end{document}

cufcuf
  • 594

1 Answers1

5

Is this what you are looking for (compare use of \Rightarrow with that drawn with TikZ):

enter image description here

Notes:

  • Earlier image had vertical artifcats. Turns out that this depends on the pdf bowser. Image here is produced usign Acrobat and no artifact is visible. Same file viewed in TeXShop or Preview on Mac shows the artifact.

Code:

\documentclass[border=2pt]{standalone}
\usepackage{mathtools}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}

\newcommand{\myRightarrow}[1][0.32cm]{% \mathbin{ \tikz [x=#1] \draw [ draw=red, -{Classical TikZ Rightarrow[scale=0.45, line cap=round]}, line width=0.40pt, double=none, double distance=0.375ex, ] (0,0) -- (1,0); }% }%

\begin{document} $4 \Rightarrow 2$

$4 \myRightarrow 2$ \end{document}

Peter Grill
  • 223,288
  • For the note: I think that your problem of the "artifcats" it is the same problem when you of tikz-cd. In fact I use xy package to delete this problem. (+1). – Sebastiano Oct 08 '21 at 12:11
  • @Sebastiano how? – cufcuf Oct 08 '21 at 14:57
  • @cufcuf If you drawing a code using tikz-cd package you have a strange little vertical line. – Sebastiano Oct 08 '21 at 15:29
  • 1
    @cufcuf: I suspect that the artifact bug will be resolved in a future update. One can always hack it and draw over those artifacts in white (or the background color) so that the artifacts dont show. – Peter Grill Oct 08 '21 at 17:24
  • I tried to draw white on the background but I couldn't :) @Peter Grill – cufcuf Oct 08 '21 at 19:04
  • 1
    @cufcuf: Slightlly updated code. As the artifact is dependent on the pdf viewer, am going to ignore it for now. Hopefully future updates to the OS/pdf viewer will resolve that. – Peter Grill Oct 10 '21 at 06:48