使用\usym{2776}
一个可以排版圆圈内的数字。是否可以将数字添加到其他符号,例如\faBookmark
?
\documentclass{article}
\usepackage{relsize}
\usepackage{utfsym}
\usepackage{fontawesome5}
\begin{document}
My text {\relscale{1.1}\usym{2776}} is awesome.
My text {\relscale{.9}\faBookmark} is awesome.
\end{document}
答案1
是的,这是可能的。一种方法是写下您的符号,然后在其上方添加一个数字,例如\ooalign
。这是一个可能的解决方案。
\documentclass{article}
\usepackage{relsize}
\usepackage{utfsym}
\usepackage{fontawesome5}
\usepackage{xcolor}
\newcommand*{\faBookmarknum}[1]{%
\ooalign{%
\relscale{.9}\faBookmark\cr%
\hfil\raisebox{.5ex}{%
\color{white}\relscale{.65}#1%
}\hfil\cr%
}%
}
\begin{document}
My text {\relscale{1.1}\usym{2776}} is awesome.
My text \faBookmarknum{1} is awesome.
\footnotesize
\faBookmarknum{1}
\faBookmarknum{2}
\faBookmarknum{3}
\faBookmarknum{4}
\faBookmarknum{5}
\faBookmarknum{6}
\faBookmarknum{7}
\faBookmarknum{8}
\faBookmarknum{9}
\faBookmarknum{0}
\normalsize
\faBookmarknum{1}
\faBookmarknum{2}
\faBookmarknum{3}
\faBookmarknum{4}
\faBookmarknum{5}
\faBookmarknum{6}
\faBookmarknum{7}
\faBookmarknum{8}
\faBookmarknum{9}
\faBookmarknum{0}
\large
\faBookmarknum{1}
\faBookmarknum{2}
\faBookmarknum{3}
\faBookmarknum{4}
\faBookmarknum{5}
\faBookmarknum{6}
\faBookmarknum{7}
\faBookmarknum{8}
\faBookmarknum{9}
\faBookmarknum{0}
\Large
\faBookmarknum{1}
\faBookmarknum{2}
\faBookmarknum{3}
\faBookmarknum{4}
\faBookmarknum{5}
\faBookmarknum{6}
\faBookmarknum{7}
\faBookmarknum{8}
\faBookmarknum{9}
\faBookmarknum{0}
\end{document}
这是另一种选择,即降低符号而不是升高数字,以便数字的基线与文本的基线对齐。
\documentclass{article}
\usepackage{relsize}
\usepackage{utfsym}
\usepackage{fontawesome5}
\usepackage{xcolor}
\newcommand*{\faBookmarknum}[1]{%
\ooalign{%
\raisebox{-.5ex}{%
\relscale{.9}\faBookmark%
}\cr%
\hfil\textcolor{white}{\relscale{.65}#1}\hfil\cr%
}%
}
\begin{document}
My text {\relscale{1.1}\usym{2776}} is awesome.
My text \faBookmarknum{1} is awesome.
\footnotesize
\faBookmarknum{1}
\faBookmarknum{2}
\faBookmarknum{3}
\faBookmarknum{4}
\faBookmarknum{5}
\faBookmarknum{6}
\faBookmarknum{7}
\faBookmarknum{8}
\faBookmarknum{9}
\faBookmarknum{0}
\normalsize
\faBookmarknum{1}
\faBookmarknum{2}
\faBookmarknum{3}
\faBookmarknum{4}
\faBookmarknum{5}
\faBookmarknum{6}
\faBookmarknum{7}
\faBookmarknum{8}
\faBookmarknum{9}
\faBookmarknum{0}
\large
\faBookmarknum{1}
\faBookmarknum{2}
\faBookmarknum{3}
\faBookmarknum{4}
\faBookmarknum{5}
\faBookmarknum{6}
\faBookmarknum{7}
\faBookmarknum{8}
\faBookmarknum{9}
\faBookmarknum{0}
\Large
\faBookmarknum{1}
\faBookmarknum{2}
\faBookmarknum{3}
\faBookmarknum{4}
\faBookmarknum{5}
\faBookmarknum{6}
\faBookmarknum{7}
\faBookmarknum{8}
\faBookmarknum{9}
\faBookmarknum{0}
\end{document}