類似の \hourglass および \lozengeminus 記号

類似の \hourglass および \lozengeminus 記号

\hourglass同様の (⧖) および\lozengeminus(⟠) 記号、つまり同一の三角形を取得する方法はありますか?

fdsymbolとパッケージの両方を使用するとstix\lozengeminusは よりもはるかに大きくなります\hourglass

目標は、上下の三角形と上下の三角形を持つ 2 つの「反対の」演算子を作成することです。つまり、2 番目の演算子は三角形を交換することによって取得されます。

答え1

おそらく、 をtikzpictureコマンドとして定義できるでしょう。そうすれば、作成する 2 つのシンボルのサイズを制御できます。

\documentclass{article}
\usepackage{tikz}


\newcommand{\hour}[1]{%
    \begin{tikzpicture}
    \draw (0,0) -- (6pt,0) -- (0,12pt) -- (6pt,12pt) -- (0,0);
    \end{tikzpicture}
}

\newcommand{\loz}[1]{%
    \begin{tikzpicture} 
    \draw (0,6pt) -- (3pt,12pt) -- (6pt,6pt);
    \draw (0,6pt) -- (6pt,6pt);
    \draw (0,6pt) -- (3pt,0) -- (6pt,6pt);
    \end{tikzpicture}
}

\begin{document}

This is an example of \hour. 

This is an example of \loz.

\end{document}

具体的な定義は次のようになります。

tikzコマンド出力の定義

答え2

\triangleさらに別のオプションとしては、 の2 つのコピーから を構築するというものがありますstackengine

ここに画像の説明を入力してください

\documentclass{article}
\usepackage{graphicx}
\usepackage{stackengine}
\begin{document}


$
\stackanchor[-4.1pt]{$\triangle$}{\rotatebox[origin=c]{180}{$\triangle$}} 
\stackanchor[0pt]{\rotatebox[origin=c]{180}{$\triangle$}}{$\triangle$}
$

\end{document}

答え3

数式スタイルに合わせて拡大縮小するモードを備えた別のバージョンpicture。好みに応じて幅/高さを変更します (幅を 0.33333em に設定して表示)。

\documentclass{article}
\usepackage{amsmath}
\usepackage{pict2e}

\makeatletter
\newcommand{\lozengeminus}{%
  \mathbin{% a binary operation symbol
  \mspace{1mu}% some sidebearing
  \mathpalette\vinc@lozengeminus\relax}% the symbol
  \mspace{1mu}% some sidebearing
}
\newcommand{\vinc@lozengeminus}[2]{%
  \begingroup
  \settowidth{\unitlength}{$\m@th#1\mspace{6mu}$}% 1/3 of an em
  \begin{picture}(1,1.732)
  \vinc@linethickness{#1}
  \roundcap\roundjoin
  \Line(0.5,0)(1,0.866)(0.5,1.732)(0,0.866)(0.5,0)
  \Line(0,0.866)(1,0.866)
  \end{picture}%
  \endgroup
}
\newcommand{\hourglass}{%
  \mathbin{% a binary operation symbol
  \mspace{1mu}% some sidebearing
  \mathpalette\vinc@hourglass\relax}% the symbol
  \mspace{1mu}% some sidebearing
}
\newcommand{\vinc@hourglass}[2]{%
  \begingroup
  \settowidth{\unitlength}{$\m@th#1\mspace{6mu}$}% 1/3 of an em
  \begin{picture}(1,1.732)
  \vinc@linethickness{#1}
  \roundcap\roundjoin
  \Line(0,0)(1,1.732)(0,1.732)(1,0)(0,0)
  \end{picture}%
  \endgroup
}
\newcommand{\vinc@linethickness}[1]{%
  \linethickness{%
      \ifx#1\displaystyle 0.8\fontdimen8\textfont3\else
      \ifx#1\textstyle 0.8\fontdimen8\textfont3\else
      \ifx#1\scriptstyle0.8\fontdimen8\scriptfont3\else
      1\fontdimen8\scriptscriptfont3\fi\fi\fi
  }%
}
\makeatother

\begin{document}

$x+a\lozengeminus b$
$\scriptstyle x+a\lozengeminus b$
$\scriptscriptstyle x+a\lozengeminus b$

$x+a\hourglass b$
$\scriptstyle x+a\hourglass b$
$\scriptscriptstyle x+a\hourglass b$

\end{document}

ここに画像の説明を入力してください

答え4

パッケージはあなたが望むものに近いものをoplotsymbl提供します。\rhombuslineh

\documentclass{article}
\usepackage{stix}
\usepackage{oplotsymbl}

\begin{document}

$\hourglass \rhombuslineh$

\end{document}

関連情報