如何调整 \models 上的重叠字母?

如何调整 \models 上的重叠字母?

给出以下 MWE,基于 @egreg 的回答这个问题那么,如何重新定义 \Mmodels 使得重叠 M 提升约 1pt,并且向左移动相同的量?


\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{stackengine}%Myoverset

\makeatletter% redefine \models to be similar in size and shape 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\oversetnorm{.4\normalbaselineskip}%Myoverset
\makeatletter
\newcommand\myoverset[3][\oversetnorm]{%
    \binrel@{#3}\binrel@@{\mathop{\ensurestackMath{%
                \stackengine{#1}{#3}{\scriptstyle#2}{O}{c}{F}{F}{L}}}}}
\makeatother


\newcommand{\Mmodels}{\myoverset{\textsc{m}}{\models\,}}%models with overset small capital M


\begin{document}
    
    \(\Mmodels\)
    
\end{document}


答案1

按照我的评论的建议......

\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{stackengine}%Myoverset

\makeatletter% redefine \models to be similar in size and shape 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\oversetnorm{\dimexpr.4\normalbaselineskip+1pt}%Myoverset
\makeatletter
\newcommand\myoverset[3][\oversetnorm]{%
    \binrel@{#3}\binrel@@{\mathop{\ensurestackMath{%
                \stackengine{#1}{#3}{\kern-1pt\scriptstyle#2}{O}{c}{F}{F}{L}}}}}
\makeatother


\newcommand{\Mmodels}{\myoverset{\textsc{m}}{\models\,}}%models with overset small capital M


\begin{document}
    
    \(\Mmodels\)
    
\end{document}

在此处输入图片描述

相关内容