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