LaTeX等号中间加问号


 
 

\documentclass{ctexart}

 

  \usepackage{amsmath,amssymb}
   \usepackage{mathtools}
  \makeatletter
  \newcommand\fhcd[3][bin]{
  \csname math#1\endcsname{\mathchoice
  {\@fhcd\displaystyle{#2}{#3}}
  {\@fhcd\textstyle{#2}{#3}}
  {\@fhcd\scriptstyle{#2}{#3}}
  {\@fhcd\scriptscriptstyle{#2}{#3}}}}
  \newcommand\@fhcd[3]{
  \settowidth\@tempdima{$\m@th#1{#2}$}
  \settowidth\@tempdimb{$\m@th#1{#3}$}
  \ifdim\@tempdimb>\@tempdima\@tempdima\@tempdimb\fi
  \kern.5\@tempdima\mathclap{#2}\mathclap{#3}\kern.5\@tempdima}
  \makeatother
   
  %自定义 等号与问号重叠
  \newcommand\dengwen{\fhcd[bin] ? =}
   
  \begin{document}
   
  例如 $f \dengwen g=h$?
  \begin{equation*}
  A \dengwen B
  \end{equation*}
 

 

有网友提出问题,如何输入长等号,而且可以依据等号上下的文字宽度来自动伸缩长度,同样我们也会用到箭头的输入。

   
%%\usepackage{extarrows}:
  $$ A \xlongequal{\quad\quad}B $$
  $$ A\xlongequal[sub-script]{super-script}B $$</pre>
 

\end{document} 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM