수직 막대가 있는 등호(≠)가 아님

수직 막대가 있는 등호(≠)가 아님

\neq기울어진 막대 대신 수직 막대를 사용하여 얻을 수 있습니까 ? \gvertneqq이러한 종류의 "같지 않음"을 특징으로 하지만 다른 기호와 혼합하지 않고는 그렇지 않은 AMS와 같은 부등식 연산자가 있습니다 .

\documentclass[a5paper]{article}
\usepackage{amssymb}
\usepackage{amsmath}
\begin{document}
\begin{align*}
a&\gvertneqq b\\
C&\neq \varnothing
\end{align*}
\end{document}

위 코드의 결과

그래서 제가 기본적으로 갖고 싶은 것은 \gvertneqq위의 > 아래에 있는 격리된 기호입니다. 특히 저는 두 번째 줄의 슬래시 기울기가 다른 것을 좋아하지 않으며 "≠∅"는 매우 일반적인 조합입니다.

답변1

수직선이 있는 등호

수직선이 |제 취향에는 좀 높네요. 에 대한 다음 정의는 의 \vneq전체 높이와 일치하도록 수직선의 전체 높이를 줄입니다 \neq. 수직 높이의 크기를 조정해도 수평 방향의 선 두께는 변경되지 않습니다.

  • 수직선의 최종 너비와 높이는 매크로 \vneqxscale및 를 재정의하여 미세 조정할 수 있습니다 \vneqyscale. 기본값은 입니다 1.
  • \mathpalette기호의 크기를 자동으로 조정할 수 있습니다.

예시 파일:

\documentclass{article}

\usepackage{amssymb}% \varnothing

\usepackage{graphicx}% \resizebox
\makeatletter
\newcommand*{\vneq}{%
  \mathrel{%
    \mathpalette\@vneq{=}%
  }%
}
\newcommand*{\@vneq}[2]{%
  % #1: math style (\displaystyle, \textstyle, ...)
  % #2: symbol (=, ...)
  \sbox0{\raisebox{\depth}{$#1\neq$}}%
  \sbox2{\raisebox{\depth}{$#1|\m@th$}}%
  \ifdim\ht2>\ht0 %
    \sbox2{\resizebox{\vneqxscale\width}{\vneqyscale\ht0}{\unhbox2}}%
  \fi
  \sbox2{$\m@th#1\vcenter{\copy2}$}%
  \ooalign{%
    \hfil\phantom{\copy2}\hfil\cr
    \hfil$#1#2\m@th$\hfil\cr
    \hfil\copy2\hfil\cr
  }%
}
\newcommand*{\vneqxscale}{1}
\newcommand*{\vneqyscale}{1}
\makeatother

\begin{document}
\[
  % Comparison \neq vs. vneq
  \varnothing \neq \emptyset \vneq \varnothing \\
\] 
\[ 
  % Check sizes:
  \vneq^{\vneq^{\vneq}} \\
\] 
\[ 
  % Bounding box checks:
  \setlength{\fboxsep}{0pt}
  \setlength{\fboxrule}{.1pt}
  \fbox{$\neq$}\,\fbox{$\vneq$}\,\fbox{$|$}
\]
\end{document}

결과

높이는 다음과 같이 더 낮아질 수 있습니다.

\renewcommand*{\vneqyscale}{.8}

결과/.8

다음에 대한 결과 mathabx:

수학

다음에 대한 결과 txfonts:

tx폰트

다음에 대한 결과 MnSymbol:

Mn 기호

여기서 수직선이 너무 두꺼워서 수평 크기 조정을 줄여야 합니다.

\renewcommand*{\vneqxscale}{.67}

MnSymbol\vneqxscale=에 대한 결과 .67:

Mn심볼/.67

에 대한 대안varnothing

를 변경하는 대신 기울어진 수직선의 기울기를 일치시키기 위해 를 사용하여 \neq빈 집합 기호를 \varnothing구성할 수 있습니다 . \not그러나 \circ너무 작고 \bigcirc너무 큽니다. 따라서 이 방법 은 및 을 txfonts제공하는 것으로 표시됩니다 .\medcircMnSymbol\medcircle

\documentclass{article}

%\usepackage{txfonts}
%\newcommand*{\varemptysetcircle}{\medcirc}

\usepackage{MnSymbol}
\newcommand*{\varemptysetcircle}{\medcircle}

\makeatletter
\newcommand*{\varemptyset}{%
  {% mathord
    \vphantom{\not=}% correct height and depth of the final symbol
    \mathpalette\@varemptyset\varemptysetcircle
  }%
}
\newcommand*{\@varemptyset}[2]{%
  % #1: math style (\displaystyle, \textstyle, ...)
  % #2: circle
  \ooalign{%
    \hfil$\m@th#1\not\hphantomeq$\hfil\cr
    \hfil$\m@th#1#2$\hfil\cr
  }%
}
% \not can be redefined to take an argument
\newcommand*{\hphantomeq}{%
  \mathrel{\hphantom{=}}%
}
\makeatother

\usepackage{color}

\begin{document}
\[
  \not=\; \color{blue}\neq \varemptyset\; \color{black}\varnothing
\]
\end{document}

다음에 대한 결과 txfonts:

tx폰트

다음에 대한 결과 MnSymbol:

Mn 기호

답변2

예:

아래 코드 스크린샷

\documentclass[a5paper]{article}
\usepackage{amssymb}
\usepackage{amsmath}
\newcommand\vneq{\mathrel{\ooalign{$=$\cr\hidewidth$|$\hidewidth\cr}}}
\begin{document}
\begin{align*}
a&\gvertneqq b\\
C&\neq \varnothing \\
d&\vneq f
\end{align*}
\end{document}

의 명령에 대한 동기를 얻으려면 \vneqegreg의 훌륭한 튜토리얼을 읽어보세요 \ooalign.\subseteq+ \circ단일 기호(“개방 하위 집합”)

답변3

단순한 해결책은 다음과 같습니다.

\usepackage{mathabx}
\changenotsign

그러나 이는 수학 기호의 상당 부분을 변경하는 것을 의미하며 이는 바람직하지 않습니다. 제 생각에는 에서 제공하는 기호 중 일부가 mathabx잘못 설계되었기 때문입니다.

표준 도구를 사용한 솔루션은 다음과 같습니다.

\documentclass{article}

\renewcommand\neq{\mathrel{\vphantom{|}\mathpalette\xsneq\relax}}
\newcommand\xsneq[2]{%
  \ooalign{\hidewidth$#1|$\hidewidth\cr$#1=$\cr}%
}

\begin{document}
$a\neq b$
\end{document}

일반적인 모양으로 \renewcommand되돌리려면 해당 코드를 제거하기만 하면 되기 때문에 이 방법을 사용했습니다 .\neq

를 사용하면 \mathpalette생성된 기호의 아래 첨자 또는 위 첨자가 작아집니다.

여기에 이미지 설명을 입력하세요

관련 정보