将 mathbb{1} 与 IEEEtran 结合使用

将 mathbb{1} 与 IEEEtran 结合使用

有没有办法$mathbb{1}$使用 IEEE 样式文件?我发现这适用于其他样式文件,但不适用于 IEEE 样式文件。以下是示例:

\documentclass{IEEEtran}
\usepackage{graphicx,amsthm,amsmath,amsfonts,amssymb}
\begin{document}
\title{Writing mathbb 1}
\author{author}
\maketitle
\begin{abstract}
  We show a test case for the inability of writing mathbb 1 using IEEEtran.cls.
   \end{abstract}
   \begin{IEEEkeywords}
     mathbb
\end{IEEEkeywords}

\section{Illustration}
The mathbb command \begin{verbatim} ${\mathbb 1}$ \end{verbatim} does
not appear to work in the {\tt IEEEtran.cls} file. The above provides the
following symbol, that is often used as an indicator function:
$${\mathbb 1}.$$
However, a similar approach works for other letters, {\em e.g.}, 
\begin{verbatim} ${\mathbb I}$ \end{verbatim} provides
$${\mathbb I}.$$
so some other additional device/fix may need to be found.
\end{document}

它为我提供了以下 PDF:

在此处输入图片描述

答案1

您可以在 第 124 页 找到一些示例C:\texlive\2023\texmf-dist\doc\latex\comprehensive\symbols-a4.pdf

在此处输入图片描述

\documentclass{IEEEtran}
\DeclareMathAlphabet{\mathbb}{U}{bbold}{m}{n}
\begin{document}
$\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$
$\mathbb{abcdefghijklmnopqrstuvwxyz}$
$\mathbb{0123456798}$
\end{document}

在此处输入图片描述

答案2

如果您使用 NewTX(提供与 Times 兼容的符号),则没有问题。

\documentclass{IEEEtran}
\usepackage{graphicx,amsthm,amsmath}
\usepackage{newtxtext}
\usepackage[vvarbb]{newtxmath}

\begin{document}

\title{Writing mathbb 1}
\author{author}
\maketitle

\begin{abstract}
We show a test case for the ability of writing mathbb 1 using \texttt{IEEEtran.cls}.
\end{abstract}
\begin{IEEEkeywords}
mathbb
\end{IEEEkeywords}

\section{Illustration}

The mathbb command \verb|$\mathbb{1}$| appears to work in the 
\texttt{IEEEtran.cls} file. The above provides the
following symbol, that is often used as an indicator function:
\[
\mathbb{1}.
\]
A similar approach works for other letters, \emph{e.g.}, 
\verb|$\mathbb{I}$| provides
\[
\mathbb{I}.
\]
so no other additional device/fix is needed.

\end{document}

重要笔记

正确的语法是

  • \mathbb{1}\mathbb{A}, 不{\mathbb 1}{\mathbb A}

  • \texttt{words}并不是{\tt words}

  • \emph{words}并不是{\em words}

  • \[...\]并不是$$...$$

在此处输入图片描述

相关内容