類似的 \hourglass 和 \lozengeminus 符號

類似的 \hourglass 和 \lozengeminus 符號

有沒有辦法得到相似的\hourglass(⧖) 和\lozengeminus(⟠) 符號,即具有相同的三角形?

fdsymbolstix包一起使用時,\lozengeminus\hourglass.

目標是擁有兩個具有自下而上三角形和自上而下三角形的「相反」算子,即透過交換三角形來獲得第二個算子。

答案1

也許你可以將 a 定義tikzpicture為指令。然後您可以控制要建立的兩個符號的大小。

\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另一種選擇是用兩個with副本來建構它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

packageeoplotsymbl提供的\rhombuslineh內容可能接近您想要的內容。

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

\begin{document}

$\hourglass \rhombuslineh$

\end{document}

相關內容