关于带圈的数字,之前也收集整理了不少,可以翻翻看看之前的总结:
总体来说,基本使用也还可以,但是总觉得没有那么彻底地解决问题,近日,看到了这个帖子:
给出了一个相对好一些的实现方法,这里摘录如下,需要
junicode
的支持,代码:
\documentclass{article} \usepackage{fontspec} \usepackage{libertine} \usepackage{pgf} % for the calculation % \libcirc and \libcircblk display their '0' if the parameter is out of range \newcommand{\libcirc}[1]{\pgfmathparse{ ifthenelse(#1 > 0 && #1 < 21, Hex(9311+#1), Hex(9450) }\libertineGlyph{uni\pgfmathresult}} \newcommand{\libcircdbl}[1]{\pgfmathparse{Hex(9460+#1)}\libertineGlyph{uni\pgfmathresult}} \newcommand{\libcircblk}[1]{\pgfmathparse{ ifthenelse(#1 > 0 && #1 < 11, Hex(10101+#1), ifthenelse(#1 > 10 && #1 < 21, Hex(9450-10+#1), Hex(9471) ) ) }\libertineGlyph{uni\pgfmathresult}} \newcommand{\juncirc}[1]{{\fontspec[Ligatures=Discretionary]{Junicode}[#1]}} \newcommand{\juncircdbl}[1]{{\fontspec[Ligatures=Discretionary]{Junicode}[[#1]]}} \newcommand{\juncircblk}[1]{{\fontspec[Ligatures=Discretionary]{Junicode}<#1>}} \usepackage{pgffor} % just for the demo loop \setlength{\parindent}{0pt} % just for the demo \begin{document} \section{Linux Libertine} \foreach \x in {0,...,20} {\libcirc{\x} } \foreach \x in {1,...,10} {\libcircdbl{\x} } \foreach \x in {0,...,20} {\libcircblk{\x} } \section{\fontspec{Junicode}Junicode} \foreach \x in {0,...,20} {\juncirc{\x} } \foreach \x in {1,...,10} {\juncircdbl{\x} } \foreach \x in {0,...,20} {\juncircblk{\x} } \end{document}效果图:
发表评论 取消回复