![我怎样才能重现 chemmacros 标志风格?](https://linux22.com/image/296254/%E6%88%91%E6%80%8E%E6%A0%B7%E6%89%8D%E8%83%BD%E9%87%8D%E7%8E%B0%20chemmacros%20%E6%A0%87%E5%BF%97%E9%A3%8E%E6%A0%BC%EF%BC%9F.png)
我想重现 chemmacros 徽标样式,就像在 chemmacros 中看到的那样文档
我检查了源 .tex 文件,但徽标是从另一个 pdf“chemmacros-logo.pdf”加载的,而该 pdf 在 TeX Live 中找不到。
因为我假设徽标是用 TikZ 或其他东西绘制的,它的代码可以在某处找到吗?
答案1
这是我用来制作“徽标”的代码。字体是奥吉,氧化还原箭头用自己的宏绘制chemmacros
,线条用@percusse 的pencilline
装饰(使用 编译两次xelatex
):
% arara: xelatex
% arara: xelatex
\documentclass[margin=1cm]{standalone}
\usepackage{fontspec}
\usepackage{chemmacros}
\usetikzlibrary{calc,positioning,decorations.pathmorphing,patterns}
% credits:
% https://tex.stackexchange.com/a/49961/
\pgfdeclaredecoration{pencilline}{initial}{
\state{initial}[
width=+\pgfdecoratedinputsegmentremainingdistance,
auto corner on length=1mm
]{
\pgfpathcurveto%
{% From
\pgfqpoint
{\pgfdecoratedinputsegmentremainingdistance}
{\pgfdecorationsegmentamplitude}
}
{% Control 1
\pgfmathrand
\pgfpointadd
{\pgfqpoint{\pgfdecoratedinputsegmentremainingdistance}{0pt}}
{%
\pgfqpoint
{-\pgfdecorationsegmentaspect\pgfdecoratedinputsegmentremainingdistance}%
{\pgfmathresult\pgfdecorationsegmentamplitude}
}
}
{%TO
\pgfpointadd
{\pgfpointdecoratedinputsegmentlast}
{\pgfpoint{1pt}{1pt}}
}
}
\state{final}{}
}
\tikzset{pencil/.style={decorate,decoration=pencilline}}
\begin{document}
\ch[font-spec={Augie}]{
2 "\OX{o1,\ox{0,Na}}" + "\OX{r1,\ox{0,Cl}}" {}2
->
2 "\OX{o2,\ox{+1,Na}}" {}+ + 2 "\OX{r2,\ox{-1,Cl}}" {}-
}
\redox(o1,o2)[red,pencil,-cf]{%
\small\ch[font-spec={[Color=red]Augie},math-space=.3em]{$-$ 2 e-}}
\redox(r1,r2)[blue,pencil,-cf][-1]{%
\small\ch[font-spec={[Color=blue]Augie},math-space=.3em]{$+$ 2 e-}}
\end{document}
可能的改进:添加
\setchemformula{ arrow-style = pencil }
还会用pencilline
装饰画出反应箭头。我可能会在下一个版本中添加这个。