自定义 \Rightarrow 和 \Leftrightarrow

自定义 \Rightarrow 和 \Leftrightarrow

有什么方法可以缩短双等水平线,使它们不与箭头相交?

另外,如果我可以去除两条水平线之间的空白,那就完美了。 enter image description here

我的 MWE:

\documentclass[a4paper,11pt]{book}
\usepackage{tikz}
\usetikzlibrary{positioning,arrows.meta,arrows}

\begin{document}

\colorbox{green}{A \raisebox {0.35ex} {\tikz{\draw [double equal sign distance, -{Straight Barb[round, angle=60:1.5pt 1]}] (0,0) --++ (0.3,0)}} B \qquad C \raisebox {0.35ex} {\tikz{\draw[implies-implies,double equal sign distance,{Straight Barb[round, angle=60:1.5pt 1]}-{Straight Barb[round, angle=60:1.5pt 1]}] (0,0) -- (0.4,0);}} D}

\end{document}

答案1

为什么你不能简单地使用:

\documentclass{standalone}
\usepackage{xcolor}
\begin{document}

    \colorbox{green}{A $\Rightarrow$ B \qquad C $\Leftrightarrow$ D}

\end{document}

enter image description here

并加载XITS Math

enter image description here

使用xelatex. 或lualatex在 macOS 上运行

\listfiles
\documentclass{standalone}
\usepackage{libertinus}
\usepackage{xcolor}
\begin{document}

    \colorbox{green}{A $\Rightarrow$ B \qquad C $\Leftrightarrow$ D}

\end{document}

使用文件列表(在日志文件末尾)

*File List*
standalone.cls    2018/03/26 v1.3a Class to compile TeX sub-files standalone
shellesc.sty    2016/06/07 v0.02a unified shell escape interface for LaTeX
ifluatex.sty    2016/05/16 v1.4 Provides the ifluatex switch (HO)
   ifpdf.sty    2018/09/07 v3.3 Provides the ifpdf switch
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
 xkeyval.sty    2014/12/03 v2.7a package option processing (HA)
 xkeyval.tex    2014/12/03 v2.7a key=value parser (HA)
standalone.cfg    2018/03/26 v1.3a Default configuration file for 'standalone' 
class
 article.cls    2014/09/29 v1.4h Standard LaTeX document class
  size10.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
libertinus.sty    2018/09/03 v. 0.01 (Herbert Voss) Supports libertinus fonts f
or pdflatex/lualatex/xelatex
libertinus-otf.sty    2018/11/18 v. 0.13 (Herbert Voss and Bob Tennent) Support
s libertinus fonts for lualatex and xelatex.
textcomp.sty    2017/04/05 v2.0i Standard LaTeX package
  ts1enc.def    2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
unicode-math.sty    2018/07/29 vv0.8m Unicode maths in XeLaTeX and LuaLaTeX
   expl3.sty    2018-11-19 L3 programming layer (loader) 
expl3-code.tex    2018-11-19 L3 programming layer 
l3xdvipdfmx.def    
unicode-math-xetex.sty    2018/07/29 vv0.8m Unicode maths in XeLaTeX and LuaLaT
eX
  xparse.sty    2018-10-17 L3 Experimental document command parser
l3keys2e.sty    2018-10-17 LaTeX2e option processing using LaTeX3 keys
fontspec.sty    2018/07/30 vv2.6h Font selection for XeLaTeX and LuaLaTeX
fontspec-xetex.sty    2018/07/30 vv2.6h Font selection for XeLaTeX and LuaLaTeX

 fontenc.sty
   tuenc.def    2017/04/05 v2.0i Standard LaTeX file
fontspec.cfg
filehook.sty    2011/10/12 v0.5d Hooks for input files
  fix-cm.sty    2015/01/14 v1.1t fixes to LaTeX
  ts1enc.def    2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
  xcolor.sty    2016/05/11 v2.12 LaTeX color extensions (UK)
   color.cfg    2016/01/02 v1.6 sample color configuration
   xetex.def    2017/06/24 v5.0h Graphics/color driver for xetex

相关内容