有没有办法倾斜数学符号?

有没有办法倾斜数学符号?

让我们考虑以下句子:

\documentclass[10pt,a4paper]{article}
\begin{document}
We often call these players \emph{spoiler} and \emph{duplicator}, \emph{\'Elo\"ise} and \emph{Ab\'elard} or $\exists$ and $\forall$.
\end{document}

\forall我现在想要的是和符号的倾斜版本\exists,有没有办法做到这一点(某种\mathsl或类似的东西)?

或者你会说这实在是太丑了?

答案1

以下示例通过 TikZ 使用倾斜:

\tikz[
  baseline=(X.base),
  inner sep=0pt,
  transform canvas={xslant=cos(#1)},
] \node (X) {#2};%

倾斜角度为#1,倾斜材料为#2。由于某些未知原因,边界框非常错误,该框在基线处水平居中,高度要短得多。因此定义 \xslant手动设置边界框。

倾斜角度可以通过可选参数指定。默认值为 76(从 Computer Modern 字体的倾斜大写字母 I 开始测量)。

该宏\xslantmath是一个扩展版本,它将参数放在数学中并尊重当前的数学风格。

\documentclass[10pt,a4paper]{article}
\usepackage{tikz}

\newcommand*{\xslant}[2][76]{%
  \begingroup
    \sbox0{#2}%
    \pgfmathsetlengthmacro\wdslant{\the\wd0 + cos(#1)*\the\wd0}%
    \leavevmode
    \hbox to \wdslant{\hss
      \tikz[
        baseline=(X.base),
        inner sep=0pt,
        transform canvas={xslant=cos(#1)},
      ] \node (X) {\usebox0};%
      \hss
      \vrule width 0pt height\ht0 depth\dp0 %
    }%
  \endgroup
}

\makeatletter
\newcommand*{\xslantmath}{}
\def\xslantmath#1#{%
  \@xslantmath{#1}%
}
\newcommand*{\@xslantmath}[2]{%
  % #1: optional argument for \xslant including brackets
  % #2: math symbol
  \ensuremath{%
    \mathpalette{\@@xslantmath{#1}}{#2}%
  }%
}
\newcommand*{\@@xslantmath}[3]{%
  % #1: optional argument for \xslant including brackets
  % #2: math style
  % #3: math symbol
  \xslant#1{$#2#3\m@th$}%
}
\makeatother

\begin{document}
\noindent
We often call these players \emph{spoiler} and \emph{duplicator} or
\xslantmath{\exists} and \xslantmath{\forall}$\!$.
\end{document}

结果

答案2

丑陋至极。;-)

\documentclass{article}

\usepackage{graphicx}

\DeclareRobustCommand{\slantflip}[1]{%
  \raisebox{\depth}{%
    \scalebox{1}[-1]{%
      \scalebox{-1}[1]{\slshape\sffamily#1}%
    }%
  }\negthinspace
}

\newcommand{\allsl}{\slantflip{A}}
\newcommand{\allex}{\slantflip{E}}

\begin{document}

\allsl{} and \allex{}

\end{document}

在此处输入图片描述

相关内容