我试图在数学模式下使粗体符号更粗(\boldsymbol
对我来说不够粗),到目前为止,我发现的最佳解决方案是使用contour
。但是,当在数学模式中使用轮廓时,它会使符号失去斜体行为。有没有办法在方程中使用轮廓来产生斜体字符?
\documentclass{article}
\usepackage{amsmath}
\usepackage[outline]{contour}
\newcommand{\A}{\contour{black}{A}}
\begin{document}
\begin{enumerate}
\item Using math mode within contour works:
\contour{black}{$A$} $ = 1$
\item but I want to use contour within math mode:
$\contour{black}{A} = 1$
\item since I'd like to eventually define the variables as bold elsewhere in the document:
$\A = 1$
\end{enumerate}
\end{document}
答案1
您可以使用$\contour{black}{$A$} = 1$
,但这会产生相当模糊的粗体,并且在上标中不起作用,而不会进一步增加复杂性\mathchoice
。通常最好使用粗体字体。
\documentclass{article}
\usepackage{amsmath}
\usepackage[outline]{contour}
\newcommand{\A}{\contour{black}{$A$}}
\usepackage{bm}
\bmdefine\Abm{A}
\begin{document}
\begin{enumerate}
\item Using math mode within contour works:
\contour{black}{$A$} $ = 1$
\item but I want to use contour within math mode:
$\contour{black}{$A$} = 1$
\item since I'd like to eventually define the variables as bold elsewhere in the document:
$\A = 1$
\end{enumerate}
\begin{enumerate}
\item Using math mode within contour works: $\bm{A} = 1$
\item but I want to use contour within math mode:
$\bm{A} = 1$
\item since I'd like to eventually define the variables as bold elsewhere in the document:
$\Abm = 1$
\end{enumerate}
\end{document}