将小写字母 m 下调至 \(\models\) 和 \(\vdash\)?

将小写字母 m 下调至 \(\models\) 和 \(\vdash\)?

根据 Steven B. Segletes 对这个问题的回答,给出以下 MWE重叠和垂直对齐,可以得到相应的(\models)和(\vdash)下陷微小的 m?

\documentclass{article}
\usepackage{stackengine,amsmath}
\newcommand\oversetnorm{.4\normalbaselineskip}
\makeatletter
\newcommand\myoverset[3][\oversetnorm]{%
    \binrel@{#3}\binrel@@{\mathop{\ensurestackMath{%
                \stackengine{#1}{#3}{\scriptstyle#2}{O}{c}{F}{F}{L}}}}}
\makeatother
\begin{document}
    
    \(\myoverset{\textsc{m}}{\models\,}\), \(\myoverset{\textsc{m}}{\vdash\,}\) 
    
        
\end{document}

答案1

我猜你想要的是类似以下的东西。

我重新定义了,\models因为我真的无法忍受默认渲染。

\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}

\makeatletter
% redefine \models to be similar to \vdash
\renewcommand{\models}{\mathrel{\mathpalette\models@\relax}}
\newcommand{\models@}[2]{%
  \begingroup
  \mspace{-1.3mu}%
  \sbox\z@{$\m@th#1\vdash$}
  \resizebox{\width}{\dimexpr\ht\z@+\dp\z@}{\raisebox{\depth}{$\m@th#1|$}}%
  \mspace{-3.8mu}%
  \nonscript\mspace{0.8mu}%
  \raisebox{0.25\height}{\resizebox{\wd\z@}{\height}{$\m@th#1=$}}%
  \endgroup
}

\newcommand{\inset}[1]{\mathrel{\mathpalette\inset@{#1}}}
\newcommand{\inset@}[2]{%
  \makebox[0pt][l]{$\m@th#1\mspace{3mu}_{#2}$}
}
\makeatother

\newcommand{\mmodels}{\inset{\scriptscriptstyle\textnormal{\scshape m}}\models}
\newcommand{\mvdash}{\inset{\scriptscriptstyle\textnormal{\scshape m}}\vdash}

\begin{document}

\(\models\vdash\)
\quad\(\scriptstyle\models\vdash\scriptscriptstyle\models\vdash\)

\(\mmodels\mvdash\)

\end{document}

在此处输入图片描述

相关内容