chemnum - 将替换的标签扩展几个字符

chemnum - 将替换的标签扩展几个字符

我想在我的 chemdraw 文件中标记这样的化合物: 在此处输入图片描述

chemnum 能否用 .eps 文件中的 TMP 替换1a:例如 M = Ti, n = 2?这里是一个类似的问题,但我想扩大替换范围几个字符。

\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\DeclareNewTOC[
type=scheme,
types=schemes,
float,
name=Schema,
listname={Verzeichnis der Schemata}
]{los}
\usepackage[runs=2,crop=off]{auto-pst-pdf}
\usepackage{chemnum}
\setchemnum{format = \bfseries\sffamily}


\begin{document}

\begin{scheme}[htb]
\centering
\replacecmpd{mycompund.a}
\replacecmpd{mycompund.b}
\replacecmpd{mycompund.c}
\includegraphics[width=0.8\textwidth]{xyz}
\caption{My compounds.}
\label{mycompounds}
\end{scheme}
Compound \refcmpd{mycompound.a, mycompound.b, mycompound.c} are my compounds.
\end{document}

答案1

借助包\psfrag中的命令psfrag(该命令由您加载),chemnum您可以.eps使用任何其他 LaTeX 命令或文本替换文件中的任何占位符文本:

在此处输入图片描述

\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\DeclareNewTOC[
type=scheme,
types=schemes,
float,
name=Schema,
listname={Verzeichnis der Schemata}
]{los}
\usepackage[runs=2,crop=off]{auto-pst-pdf}
\usepackage{chemnum}
\setchemnum{format = \bfseries\sffamily}


\begin{document}
\begin{scheme}[htb]
\centering
\psfrag{TMP1}{\cmpd{mycompound.a}: M = Ti, n = 4}
\psfrag{TMP2}{\cmpd{mycompound.b}: M = Fe, n = 3}
\psfrag{TMP3}{\cmpd{mycompound.c}: M = Sn, n = 4}
\includegraphics{xyz}
\caption{My compounds. The replacement text is left aligned with respect to the placeholder text.}
\label{mycompounds}
\end{scheme}

\begin{scheme}[htb]
\centering
\psfrag{TMP1}[c][l]{\cmpd{mycompound.a}: M = Ti, n = 4}
\psfrag{TMP2}[c][l]{\cmpd{mycompound.b}: M = Fe, n = 3}
\psfrag{TMP3}[c][l]{\cmpd{mycompound.c}: M = Sn, n = 4}
\includegraphics{xyz}
\caption{My compounds. The replacement text is horizontally centered with respect to the placeholder text.}
\label{mycompounds}
\end{scheme}


Compound \cmpd{mycompound.a, mycompound.b, mycompound.c} are my compounds.
\end{document}

相关内容