返回列表

看看\textcircled能不能用

$\textcircled{a}$
基本信息:kuing,GG,19880618~?,地道广州人,高中毕业,无业游民,不等式爱好者,论坛混混;
现状:冇钱又冇样、冇型又冇款、冇身材又冇文采、冇学历又冇能力、冇高度冇速度冇力度兼夹冇野做!(粤语)

果断无法加圈圈……

再试几个特殊的 $\circledS,\circledR,\copyright$
基本信息:kuing,GG,19880618~?,地道广州人,高中毕业,无业游民,不等式爱好者,论坛混混;
现状:冇钱又冇样、冇型又冇款、冇身材又冇文采、冇学历又冇能力、冇高度冇速度冇力度兼夹冇野做!(粤语)

顺便记录一个链接http://www.latexstudio.net/good-way-to-make-textcircled-numbers/
关于带圈数字的
基本信息:kuing,GG,19880618~?,地道广州人,高中毕业,无业游民,不等式爱好者,论坛混混;
现状:冇钱又冇样、冇型又冇款、冇身材又冇文采、冇学历又冇能力、冇高度冇速度冇力度兼夹冇野做!(粤语)

本帖最后由 isea 于 2013-4-10 22:44 编辑

\usepackage{pifont}
\usepackage[perpage,symbol*]{footmisc}
\DefineFNsymbols{circled}{{\ding{192}}{\ding{193}}{\ding{194}}
{\ding{195}}{\ding{196}}{\ding{197}}{\ding{198}}{\ding{199}}{\ding{200}}{\ding{201}}}
\setfnsymbol{circled}

直接将这个代码复制来得了

我想一般情况下,用这个平易近人些

效果图 圈1 对应 \ding{192}

snap.png (121.31 KB)

snap.png

数学公式终极编辑器:Aurora,基于LaTeX;
$\LaTeX$,若习惯命令一定顺手

本帖最后由 isea 于 2013-4-22 12:50 编辑

何版这一套带圈数字,真漂亮。(不懂原理,但好用,貌似用PGF画的,感觉)。


用xelatex编译,需要tikz与fontspec宏包(调用xeCJK会自动调用fontspec;再如ctexart文档也会自己调用xeCJK)。
  1. \usepackage{xeCJK}
  2. \usepackage{tikz}                                                                                                                   %编号圈0样式到20
  3. \newfontfamily\CM{Cambria Math}
  4. \newcommand{\cmcirc}[1]{\pgfmathparse{                                                                                %白底黑字 风格1
  5.     ifthenelse(#1 > 0 && #1 < 21, Hex(9311+#1), Hex(9450))
  6.     }{\CM{\symbol{"\pgfmathresult}}}}
  7. \newcommand{\cmcircblk}[1]{\pgfmathparse{                                                                            %黑底白字 风格2
  8.     ifthenelse(#1 > 0 && #1 < 11, Hex(10101+#1),
  9.         ifthenelse(#1 > 10 && #1 < 21, Hex(9450-10+#1),
  10.             Hex(9471)
  11.         )
  12.     )
  13.     }{\CM{\symbol{"\pgfmathresult}}}}
复制代码
用法如圈5:
\cmcirc{5}           %风格1
\cmcircblk{5}        %风格2

===
按8楼和10楼已做修改;何版在11楼给出“完整”风格圈,这里只提取我觉得最好看的最小代码。
数学公式终极编辑器:Aurora,基于LaTeX;
$\LaTeX$,若习惯命令一定顺手

5# isea

不是用 pgf 画的,那里只不过提供了一个对应关系,方便一点而已,事实上可以不用 pgf
基本信息:kuing,GG,19880618~?,地道广州人,高中毕业,无业游民,不等式爱好者,论坛混混;
现状:冇钱又冇样、冇型又冇款、冇身材又冇文采、冇学历又冇能力、冇高度冇速度冇力度兼夹冇野做!(粤语)

Hex 是 pgf 的一个函数,将十进制数转化为十六进制,\symbol{"十六进制数} 就是引用字体里的某个字符,\pgfmathresult 是 pgf 的输出结果,然后用 ifthenelse 建立一个函数来对应……
还是不扯太多了,自己理解下……
基本信息:kuing,GG,19880618~?,地道广州人,高中毕业,无业游民,不等式爱好者,论坛混混;
现状:冇钱又冇样、冇型又冇款、冇身材又冇文采、冇学历又冇能力、冇高度冇速度冇力度兼夹冇野做!(粤语)

5# isea


为什么我复制粘贴到导言区中,无法编译啊?我的是ctex.

4# isea


这个可用!编译通过……

8# hnsredfox_007

他没帖完整,还要加tikz宏包,如果不是用ctex系列文档类或宏包的话还要加fontspec或xecjk。
要用xelatex编译。
如果要整到脚注,还要把脚注的某个参数重定义一下。
基本信息:kuing,GG,19880618~?,地道广州人,高中毕业,无业游民,不等式爱好者,论坛混混;
现状:冇钱又冇样、冇型又冇款、冇身材又冇文采、冇学历又冇能力、冇高度冇速度冇力度兼夹冇野做!(粤语)

CircledNum.png
(21.85 KB)
2013-4-22 10:44

试了若干个带圈数字的字体,pifont的带圈数字里面的数字形状与默认无圈的数字形状很接近,但太小了,于是提取字体出来放大,做成CircledNum字体,若要使用安装一下就可以了。
pdf里是几种带圈数字及默认无圈的数字的对比。

CircledNum.rar (81.26 KB)

2013-4-22 10:44
下载次数:7

其实能做,而且有闲情的话,不如整到99
基本信息:kuing,GG,19880618~?,地道广州人,高中毕业,无业游民,不等式爱好者,论坛混混;
现状:冇钱又冇样、冇型又冇款、冇身材又冇文采、冇学历又冇能力、冇高度冇速度冇力度兼夹冇野做!(粤语)

unicode里只有0到20带圈数字,21-99都无对应unicode的,无通用性,所以懒得做,20个也足够了

本帖最后由 isea 于 2013-4-22 14:00 编辑

安装附带字体,显示7;偶这里还少4和5的字体。
4和5的字体windows下有么?如果我下载安装一下。


=============
第5种找到windows版了:http://sourceforge.jp/projects/sfnet_junicode/releases/


维基百科,自由的百科全书

Junicode样字文本

Junicode(全称Junius-Unicode)是一款支援Unicode的复古风格衬线字体,由弗吉尼亚大学Peter S. Baker主持设计。它的设计灵感来自17世纪英国牛津所使用的一种字体。字体囊括了大量特殊字符及合字,以便于中世纪研究使用。具有OpenType特性。

Junicode最新版本为0.7.8,发布于2012年12月30日。

===================

最后,如果你编译11楼许多错误,建议你把所以有关\CMU行用%标注掉,偶这里CTEX (basic)套装+win7 无法编译出效果来(如下图123数字字哪一行均空白),我想你也应该类似吧。

(即
\newfontfamily\CMU{CMU Serif}
{\CMU{0123456789}}

snap.png (25.29 KB)

snap.png

数学公式终极编辑器:Aurora,基于LaTeX;
$\LaTeX$,若习惯命令一定顺手

本帖最后由 isea 于 2013-4-22 14:12 编辑

windows 一般用户把11楼(tex文件中的“文字”)代码改成这样,应该只有4个警 告,其他应该能一次性通过
  1. \documentclass{article}
  2. \usepackage{fontspec}
  3. \usepackage{pifont}
  4. \usepackage{tikz}


  5. \newcommand{\dingcira}[1]{\pgfmathparse{
  6. int(171+#1)
  7. }{\ding{\pgfmathresult}}}
  8. \newcommand{\dingcirb}[1]{\pgfmathparse{
  9. int(181+#1)
  10. }{\ding{\pgfmathresult}}}
  11. \newcommand{\dingcirc}[1]{\pgfmathparse{
  12. int(191+#1)
  13. }{\ding{\pgfmathresult}}}
  14. \newcommand{\dingcird}[1]{\pgfmathparse{
  15. int(201+#1)
  16. }{\ding{\pgfmathresult}}}

  17. \newfontfamily\song{SimSun}
  18. \newcommand{\songcirc}[1]{\pgfmathparse{
  19.     ifthenelse(#1 > 0 && #1 < 21, Hex(9311+#1), Hex(9450))
  20.     }{\song{\symbol{"\pgfmathresult}}}}
  21. \newcommand{\songcircblk}[1]{\pgfmathparse{
  22.     ifthenelse(#1 > 0 && #1 < 11, Hex(10101+#1),
  23.         ifthenelse(#1 > 10 && #1 < 21, Hex(9450-10+#1),
  24.             Hex(9471)
  25.         )
  26.     )
  27.     }{\song{\symbol{"\pgfmathresult}}}}

  28. \newfontfamily\MG{MS Gothic}
  29. \newcommand{\mgcirc}[1]{\pgfmathparse{
  30.     ifthenelse(#1 > 0 && #1 < 21, Hex(9311+#1), Hex(9450))
  31.     }{\MG{\symbol{"\pgfmathresult}}}}

  32. \newfontfamily\CM{Cambria Math}
  33. \newcommand{\cmcirc}[1]{\pgfmathparse{
  34.     ifthenelse(#1 > 0 && #1 < 21, Hex(9311+#1), Hex(9450))
  35.     }{\CM{\symbol{"\pgfmathresult}}}}
  36. \newcommand{\cmcircblk}[1]{\pgfmathparse{
  37.     ifthenelse(#1 > 0 && #1 < 11, Hex(10101+#1),
  38.         ifthenelse(#1 > 10 && #1 < 21, Hex(9450-10+#1),
  39.             Hex(9471)
  40.         )
  41.     )
  42.     }{\CM{\symbol{"\pgfmathresult}}}}

  43. %\newfontfamily\LL{Linux Libertine O}                                                       %Linux字体,windows默认一定没有的
  44. %\newcommand{\libcirc}[1]{\pgfmathparse{
  45. %    ifthenelse(#1 > 0 && #1 < 21, Hex(9311+#1), Hex(9450)
  46. %    }{\LL{\symbol{"\pgfmathresult}}}}
  47. %\newcommand{\libcircdbl}[1]{\pgfmathparse{Hex(9460+#1)}{\LL{\symbol{"\pgfmathresult}}}}
  48. %\newcommand{\libcircblk}[1]{\pgfmathparse{
  49. %    ifthenelse(#1 > 0 && #1 < 11, Hex(10101+#1),
  50. %        ifthenelse(#1 > 10 && #1 < 21, Hex(9450-10+#1),
  51. %            Hex(9471)
  52. %        )
  53. %    )
  54. %    }{\LL{\symbol{"\pgfmathresult}}}}

  55. %\newfontfamily\Junicode{Junicode}                                                                                       %Junicode字体,windows下一般默认也没有的
  56. %\newcommand{\juncirc}[1]{{\fontspec[Ligatures=Discretionary]{Junicode}[#1]}}
  57. %\newcommand{\juncircdbl}[1]{{\fontspec[Ligatures=Discretionary]{Junicode}[[#1]]}}
  58. %\newcommand{\juncircblk}[1]{{\fontspec[Ligatures=Discretionary]{Junicode}<#1>}}

  59. \newfontfamily\CircledNum{CircledNum}                                               %安装11楼附带字体后就能正常了
  60. \newcommand{\cncirc}[1]{\pgfmathparse{
  61.     ifthenelse(#1 > 0 && #1 < 21, Hex(9311+#1), Hex(9450))
  62.     }{\CircledNum{\symbol{"\pgfmathresult}}}}
  63. \newcommand{\cncircblk}[1]{\pgfmathparse{
  64.     ifthenelse(#1 > 0 && #1 < 11, Hex(10101+#1),
  65.         ifthenelse(#1 > 10 && #1 < 21, Hex(9450-10+#1),
  66.             Hex(9471)
  67.         )
  68.     )
  69.     }{\CircledNum{\symbol{"\pgfmathresult}}}}

  70. \renewcommand{\thefootnote}{\protect\cmcircblk{\value{footnote}}}

  71. \setlength{\parindent}{0pt}

  72. \begin{document}

  73. {
  74. \section{PiFont}

  75. 0123456789

  76. \foreach \x in {1,...,10} {\dingcira{\x}}

  77. \foreach \x in {1,...,10} {\dingcirb{\x}}

  78. \foreach \x in {1,...,10} {\dingcirc{\x}}

  79. \foreach \x in {1,...,10} {\dingcird{\x}}
  80. }

  81. {
  82. \section{\song{宋体}}

  83. 0123456789

  84. \foreach \x in {1,...,10} {\songcirc{\x}}
  85. }

  86. {
  87. \section{\MG{MS Gothic}}

  88. 0123456789

  89. \foreach \x in {0,...,20} {\mgcirc{\x}}
  90. }

  91. %{
  92. %\section{\LL{Linux Libertine}}                                      %Linux字体,windows默认一定没有的
  93. %
  94. %0123456789
  95. %
  96. %\foreach \x in {0,...,20} {\libcirc{\x}}
  97. %
  98. %\foreach \x in {1,...,10} {\libcircdbl{\x}}
  99. %
  100. %\foreach \x in {0,...,20} {\libcircblk{\x}}
  101. %}

  102. %{
  103. %\section{\Junicode{Junicode}}                           %Junicode字体,windows下一般默认也没有的
  104. %
  105. %0123456789
  106. %
  107. %\foreach \x in {0,...,20} {\juncirc{\x}}
  108. %
  109. %\foreach \x in {1,...,10} {\juncircdbl{\x}}
  110. %
  111. %\foreach \x in {0,...,20} {\juncircblk{\x}}
  112. %}

  113. {
  114. \section{\CM{Cambria Math}}

  115. 0123456789

  116. \foreach \x in {0,...,20} {\cmcirc{\x}}

  117. \foreach \x in {0,...,20} {\cmcircblk{\x}}
  118. }

  119. {
  120. \section{CircledNum}                     %安装11楼附带字体后就能正常了

  121. 0123456789


  122. \foreach \x in {0,...,20} {\cncirc{\x}}

  123. \foreach \x in {0,...,20} {\cncircblk{\x}}
  124. }

  125. \end{document}
复制代码
数学公式终极编辑器:Aurora,基于LaTeX;
$\LaTeX$,若习惯命令一定顺手

本帖最后由 hejoseph 于 2013-4-22 15:35 编辑

CMU Serif、Linux Libertine、Junicode出问题是因为你还没更新宏包,你把宏包更新完之后就不会有问题了,我的机器也是windows系统

CMU Serif、Linux Libertine、Junicode出问题是因为你还没更新宏包,你把宏包更新完之后就不会有问题了,我的机器也是windows系统
hejoseph 发表于 2013-4-22 14:12
升,果断 update MiKTeX
updaeable packages
数学公式终极编辑器:Aurora,基于LaTeX;
$\LaTeX$,若习惯命令一定顺手

安装附带字体,显示7;偶这里还少4和5的字体。
4和5的字体windows下有么?如果我下载安装一下。


=============
第5种找到windows版了:http://sourceforge.jp/projects/sfnet_junicode/releases/


维基百 ...
isea 发表于 2013-4-22 13:26
==============================
终于给我找到相应的字体宏包了

Linux Libertine 在最下的 uncategorized (未分类之意)中的 libertine 宏包  (第四种字体,这种字体是多数linux下默认字体,很赞)

snap-lbt.png (37.37 KB)

snap-lbt.png

数学公式终极编辑器:Aurora,基于LaTeX;
$\LaTeX$,若习惯命令一定顺手

本帖最后由 isea 于 2013-4-23 23:40 编辑

代码中 \newfontfamily\CMU{CMU Serif}

中的 CMU Serif 是 fonts 类下的  outline fonts ——cm-unicode 宏包,推荐大家安装

同样的,在此分类中,能找到 Junicode 字体

snap-cmu.png (41.66 KB)

snap-cmu.png

数学公式终极编辑器:Aurora,基于LaTeX;
$\LaTeX$,若习惯命令一定顺手

差不多,还有
LaTeX Font Warning: Font shape `EU1/SimSun(0)/bx/n' undefined
(Font)              using `EU1/SimSun(0)/m/n' instead on input line 101.


LaTeX Font Warning: Font shape `EU1/MSGothic(0)/bx/n' undefined
(Font)              using `EU1/MSGothic(0)/m/n' instead on input line 109.

*************************************************
* fontspec warning: "icu-feature-not-exist-in-font"
*
* OpenType feature 'Ligatures=Discretionary' (+dlig) not available for font
* 'Junicode/B' with script 'Latin' and language 'Default'.
*************************************************
*************************************************
* fontspec warning: "icu-feature-not-exist-in-font"
*
* OpenType feature 'Ligatures=Discretionary' (+dlig) not available for font
* 'Junicode/B' with script 'Latin' and language 'Default'.
*************************************************
*************************************************
* fontspec warning: "icu-feature-not-exist-in-font"
*
* OpenType feature 'Ligatures=Discretionary' (+dlig) not available for font
* 'Junicode/BI' with script 'Latin' and language 'Default'.
*************************************************

LaTeX Font Warning: Font shape `EU1/CambriaMath(0)/bx/n' undefined
(Font)              using `EU1/CambriaMath(0)/m/n' instead on input line 141.

[1] (C:\Users\iC\Desktop\CircledNum.aux)

LaTeX Font Warning: Some font shapes were not available, defaults substituted.

)
这样的警告就无视了,不管了,至此,基本解决能完整编译出11楼
数学公式终极编辑器:Aurora,基于LaTeX;
$\LaTeX$,若习惯命令一定顺手

返回列表