本帖最后由 isea 于 2013-4-22 14:12 编辑
windows 一般用户把11楼(tex文件中的“文字”)代码改成这样,应该只有4个警 告,其他应该能一次性通过- \documentclass{article}
- \usepackage{fontspec}
- \usepackage{pifont}
- \usepackage{tikz}
- \newcommand{\dingcira}[1]{\pgfmathparse{
- int(171+#1)
- }{\ding{\pgfmathresult}}}
- \newcommand{\dingcirb}[1]{\pgfmathparse{
- int(181+#1)
- }{\ding{\pgfmathresult}}}
- \newcommand{\dingcirc}[1]{\pgfmathparse{
- int(191+#1)
- }{\ding{\pgfmathresult}}}
- \newcommand{\dingcird}[1]{\pgfmathparse{
- int(201+#1)
- }{\ding{\pgfmathresult}}}
- \newfontfamily\song{SimSun}
- \newcommand{\songcirc}[1]{\pgfmathparse{
- ifthenelse(#1 > 0 && #1 < 21, Hex(9311+#1), Hex(9450))
- }{\song{\symbol{"\pgfmathresult}}}}
- \newcommand{\songcircblk}[1]{\pgfmathparse{
- ifthenelse(#1 > 0 && #1 < 11, Hex(10101+#1),
- ifthenelse(#1 > 10 && #1 < 21, Hex(9450-10+#1),
- Hex(9471)
- )
- )
- }{\song{\symbol{"\pgfmathresult}}}}
- \newfontfamily\MG{MS Gothic}
- \newcommand{\mgcirc}[1]{\pgfmathparse{
- ifthenelse(#1 > 0 && #1 < 21, Hex(9311+#1), Hex(9450))
- }{\MG{\symbol{"\pgfmathresult}}}}
- \newfontfamily\CM{Cambria Math}
- \newcommand{\cmcirc}[1]{\pgfmathparse{
- ifthenelse(#1 > 0 && #1 < 21, Hex(9311+#1), Hex(9450))
- }{\CM{\symbol{"\pgfmathresult}}}}
- \newcommand{\cmcircblk}[1]{\pgfmathparse{
- ifthenelse(#1 > 0 && #1 < 11, Hex(10101+#1),
- ifthenelse(#1 > 10 && #1 < 21, Hex(9450-10+#1),
- Hex(9471)
- )
- )
- }{\CM{\symbol{"\pgfmathresult}}}}
- %\newfontfamily\LL{Linux Libertine O} %Linux字体,windows默认一定没有的
- %\newcommand{\libcirc}[1]{\pgfmathparse{
- % ifthenelse(#1 > 0 && #1 < 21, Hex(9311+#1), Hex(9450)
- % }{\LL{\symbol{"\pgfmathresult}}}}
- %\newcommand{\libcircdbl}[1]{\pgfmathparse{Hex(9460+#1)}{\LL{\symbol{"\pgfmathresult}}}}
- %\newcommand{\libcircblk}[1]{\pgfmathparse{
- % ifthenelse(#1 > 0 && #1 < 11, Hex(10101+#1),
- % ifthenelse(#1 > 10 && #1 < 21, Hex(9450-10+#1),
- % Hex(9471)
- % )
- % )
- % }{\LL{\symbol{"\pgfmathresult}}}}
- %\newfontfamily\Junicode{Junicode} %Junicode字体,windows下一般默认也没有的
- %\newcommand{\juncirc}[1]{{\fontspec[Ligatures=Discretionary]{Junicode}[#1]}}
- %\newcommand{\juncircdbl}[1]{{\fontspec[Ligatures=Discretionary]{Junicode}[[#1]]}}
- %\newcommand{\juncircblk}[1]{{\fontspec[Ligatures=Discretionary]{Junicode}<#1>}}
- \newfontfamily\CircledNum{CircledNum} %安装11楼附带字体后就能正常了
- \newcommand{\cncirc}[1]{\pgfmathparse{
- ifthenelse(#1 > 0 && #1 < 21, Hex(9311+#1), Hex(9450))
- }{\CircledNum{\symbol{"\pgfmathresult}}}}
- \newcommand{\cncircblk}[1]{\pgfmathparse{
- ifthenelse(#1 > 0 && #1 < 11, Hex(10101+#1),
- ifthenelse(#1 > 10 && #1 < 21, Hex(9450-10+#1),
- Hex(9471)
- )
- )
- }{\CircledNum{\symbol{"\pgfmathresult}}}}
- \renewcommand{\thefootnote}{\protect\cmcircblk{\value{footnote}}}
- \setlength{\parindent}{0pt}
- \begin{document}
- {
- \section{PiFont}
- 0123456789
- \foreach \x in {1,...,10} {\dingcira{\x}}
- \foreach \x in {1,...,10} {\dingcirb{\x}}
- \foreach \x in {1,...,10} {\dingcirc{\x}}
- \foreach \x in {1,...,10} {\dingcird{\x}}
- }
- {
- \section{\song{宋体}}
- 0123456789
- \foreach \x in {1,...,10} {\songcirc{\x}}
- }
- {
- \section{\MG{MS Gothic}}
- 0123456789
- \foreach \x in {0,...,20} {\mgcirc{\x}}
- }
- %{
- %\section{\LL{Linux Libertine}} %Linux字体,windows默认一定没有的
- %
- %0123456789
- %
- %\foreach \x in {0,...,20} {\libcirc{\x}}
- %
- %\foreach \x in {1,...,10} {\libcircdbl{\x}}
- %
- %\foreach \x in {0,...,20} {\libcircblk{\x}}
- %}
- %{
- %\section{\Junicode{Junicode}} %Junicode字体,windows下一般默认也没有的
- %
- %0123456789
- %
- %\foreach \x in {0,...,20} {\juncirc{\x}}
- %
- %\foreach \x in {1,...,10} {\juncircdbl{\x}}
- %
- %\foreach \x in {0,...,20} {\juncircblk{\x}}
- %}
- {
- \section{\CM{Cambria Math}}
- 0123456789
- \foreach \x in {0,...,20} {\cmcirc{\x}}
- \foreach \x in {0,...,20} {\cmcircblk{\x}}
- }
- {
- \section{CircledNum} %安装11楼附带字体后就能正常了
- 0123456789
- \foreach \x in {0,...,20} {\cncirc{\x}}
- \foreach \x in {0,...,20} {\cncircblk{\x}}
- }
- \end{document}
复制代码
|