使用 chemscheme/chemstyle 与 Palatino 和 T1 编码时出现的问题

使用 chemscheme/chemstyle 与 Palatino 和 T1 编码时出现的问题

自动生成复合数字chemscheme(部分chemstyle)的作品:

  • 在拉丁现代(lmodern)中T1 或者 OT1编码
  • 在帕拉蒂诺 ( mathpazo) 与OT1编码,但是不是使用T1编码-相反,数字会消失(见下面的例子)。

这可能是由于 Palatino 在切换到 T1 时使用了位图字体。我想找到一种方法来继续使用 Palatino(或类似产品),但能够使用自动复合编号功能chemstyle(或者更确切地说是底层的chemcompounds


完整工作版本

作为我的 MWE,以文档中的示例文档的一个版本为例,chemstyle其工作原理如下:

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[runs=2]{auto-pst-pdf}
\usepackage[journal=rsc]{chemstyle}
\usepackage{lmodern}

\begin{document}

\begin{scheme}[ht]
\includegraphics{chemscheme}
\caption{A scheme with temporary compound numbers.}
\end{scheme}

\begin{scheme}[ht]
\schemeref{IMesHCl}
\schemeref{IMes}
\includegraphics{chemscheme}
\caption{A scheme with automated compound numbers.}
\end{scheme}

\end{document}

上面使用了chemstyle手册中的 eps 文件,IEchemscheme.eps 。据我所知,文档中似乎没有提供 eps 文件chemstyle,而是有一个 chemscheme.cdx(ChemDraw 文件),(对于使用 ChemDraw 的用户)可以将其保存为 eps。编辑:或者,我已上传副本至http://dur.ac.uk/owjburnham/stackexchange/chemscheme.eps

运行时,启用 shell-escape,通过

pdflatex.exe -synctex=1 -interaction=nonstopmode --shell-escape %.tex

正如预期的那样,

使用 chemscheme 代码编译的 PDF 示例,显示两种方案:一种方案使用临时化合物编号,另一种方案用自动生成的编号替换这些编号

IE在第二种方案中,eps 中的占位符(TMP1 和 TMP2)已被自动生成的数字取代。


错误

但是,如果我禁用拉丁现代IE如果文件内容如下

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[runs=2]{auto-pst-pdf}
\usepackage[journal=rsc]{chemstyle}
%\usepackage{lmodern}    %Latin Modern disabled. Now using Computer Modern.

\begin{document}

\begin{scheme}[ht]
\includegraphics{chemscheme}
\caption{A scheme with temporary compound numbers.}
\end{scheme}

\begin{scheme}[ht]
\schemeref{IMesHCl}
\schemeref{IMes}
\includegraphics{chemscheme}
\caption{A scheme with automated compound numbers.}
\end{scheme}

\end{document}

因此,文档使用默认字体(Computer Modern)进行编译,自动复合数字消失。如果我将 Latin Modern 替换为 Palatino,也会出现此问题,IE如果我将其替换lmodernmathpazo。无论哪种情况,我都会得到类似这样的结果,其中自动生成的数字缺失:

使用 Palatino 字体时使用 chemscheme 编译的 PDF 示例。自动生成的数字不再显示

令人高兴的是(?)可以解决这个问题 – 使用 Computer Modern 或 Palatino – 通过删除\usepackage[T1]{fontenc},以便返回默认(OT1)字体编码:

使用 chemscheme 编译 PDF 的示例,使用 Palatino 字体和 OT1 编码。自动生成的数字已返回

因此,总而言之,据我所知,自动生成复合数字的工作原理是:

  • 在拉丁现代T1 或者 OT1编码
  • 在现代计算机中OT1编码(但不是采用T1编码)
  • 在帕拉蒂诺OT1编码(但不是采用T1编码)

据我所知,这与 Computer Modern 和 Palatino 在切换到 T1 编码时使用位图字体有关。直觉上,我感觉 eps(矢量格式)适用于矢量字体,但不适用于位图,因此在这里使用位图字体可能会导致问题。


我想到过的可能的解决方案:

  1. 使用拉丁现代– 我宁愿不这样做,因为我喜欢 Palatino
  2. 使用 T1 中具有矢量形式的 Palatino 类字体– 但是我不知道有这样的字体!
  3. 除了复合编号的情况外,请使用 Palatino– 然而,我不知道该怎么做

如果有人对可能的修复有任何其他想法,但不知道如何实施,我会很乐意进行编辑并将任何此类建议添加到此列表中,以防其他人可以研究如何实施它们。

答案1

您的日志 ( ecrm1000.pk) 中有一个位图 (pk-)字体,这是问题的根源。

安装 cm-super 包(大型包,可能需要一些时间,并且在 miktex 中您可能需要updmap在安装后调用来激活地图文件)然后重试。

答案2

尝试一下这个包kpfonts,它看起来与之前的类似mathpazo,但更新一些。(感谢 迈克尔·帕尔默

相关内容