写为
$r_4$:\quad\texttt{r(X)} \texttt{<=>} \texttt{X$\leq$0|} \texttt{q(X)}
我想作弊并以像打字机这样的字体显示小于等号。
我找不到答案http://tug.ctan.org/info/symbols/comprehensive/symbols-a4.pdf希望你能提供一些建议。提前谢谢你。
答案1
\documentclass{article}
\usepackage{stackengine}
\newcommand\ttleq{\mathrel{\stackunder[-1pt]{\texttt{<}}{\texttt{-}}}}
\begin{document}
$r_4$:\quad\texttt{r(X)} \texttt{<=>} \texttt{X$\leq$0|} \texttt{q(X)}
$r_4$:\quad\texttt{r(X)} \texttt{<=>} \texttt{X${}\ttleq{}$0|} \texttt{q(X)}
\end{document}
如果你需要一个可以扩展到较小数学风格的模型,
\documentclass{article}
\usepackage{stackengine,scalerel}
\newcommand\ttleqtext{\stackunder[-1pt]{\texttt{<}}{\texttt{-}}}
\newcommand\ttleq{\mathrel{\scaleto{\ttleqtext}{10\LMpt}}}
\begin{document}
$\mathtt{X \ttleq Y_{X\ttleq Y_{X\ttleq Y}}}$
\end{document}
答案2
您可以使用cmtex
字体:
\documentclass{article}
\DeclareFontFamily{OT1}{cmtex}{}
\DeclareFontShape{OT1}{cmtex}{m}{n}{
<-8.5> cmtex8
<8.5-9.5> cmtex9
<9.5-> cmtex10
}{}
\newcommand{\ttleq}{{\usefont{OT1}{cmtex}{m}{n}\symbol{"1C}}}
\newcommand{\ttgeq}{{\usefont{OT1}{cmtex}{m}{n}\symbol{"1D}}}
\begin{document}
$r_4$:\quad\texttt{r(X) <=> X\ttleq0| q(X)}
$r_5$:\quad\texttt{r(X) <=> X\ttgeq0| q(X)}
\end{document}
还有其他符号:这里是完整的字体表,因此您可以按照与\ttleq
和类似的方式添加它们\ttgeq
。