最近更新后,newpx
字体包(newpxtext, newpxmath
)在尝试在选择粗体系列的组内创建上标脚注编号时会抛出错误。
\documentclass{article}
\usepackage{newpxtext}
\usepackage[T1]{fontenc}
\begin{document}
\bfseries % Comment this line to eliminate error
Error at footnote number here.\footnote{Error just now.}
\end{document}
编译时pdflatex
生成以下错误:
> (/usr/local/texlive/2014/texmf-dist/tex/latex/newpx/t1zplsups.fd)
> ! No declaration for shape T1/zplsups/n/n.
> sub@sfcnt ...e forspace shapespace mandatory@arg }
> error@fontshape else #1{Fo...
> l.7 Error at footnote number here.\footnote{
> Error just now.}
这看起来问题出在文件中t1plsups.fd
。更新中发生了哪些变化导致此问题,我可以修复它吗?
答案1
您必须更正字体定义文件。如果不做进一步调查,我不确定正确的版本应该是什么样子,但我认为这可以完成工作:
\documentclass{article}
\usepackage{filecontents}
\makeatletter
\begin{filecontents}{t1zplsups.fd}
\ProvidesFile{t1zplsups.fd}[2015/03/04 v1.0 PATCHED]
\expandafter\ifx\csname zpl@scaled\endcsname\relax
\let\zpl@scaled\@empty%
\fi
\DeclareFontFamily{T1}{zplsups}{}
\DeclareFontShape{T1}{zplsups}{m}{n}{ %medium
<-> \zpl@scaled zplsups-Regular-t1%
}{}
\DeclareFontShape{T1}{zplsups}{m}{it}{ %italic
<-> \zpl@scaled zplsups-Italic-t1%
}{}
\DeclareFontShape{T1}{zplsups}{b}{n}{ %bold
<-> \zpl@scaled zplsups-Bold-t1%
}{}
\DeclareFontShape{T1}{zplsups}{b}{it}{ %bold italic
<-> \zpl@scaled zplsups-BoldItalic-t1%
}{}
\DeclareFontShape{T1}{zplsups}{m}{sc}{ %cap & small cap
<-> ssub * zplsups/m/n%
}{}
\DeclareFontShape{T1}{zplsups}{m}{sl}{ %slanted
<-> ssub * zplsups/m/it%
}{}
\DeclareFontShape{T1}{zplsups}{m}{scit}{ %italic
<-> ssub * zplsups/m/it%
}{}
\DeclareFontShape{T1}{zplsups}{m}{ui}{ %unslanted italic
<-> ssub * zplsups/m/n%
}{}
\DeclareFontShape{T1}{zplsups}{bx}{sc}{ %bold extended cap & small cap
<-> ssub * zplsups/b/n%
}{}
\DeclareFontShape{T1}{zplsups}{bx}{sl}{ %bold extended slanted
<-> ssub * zplsups/b/it%
}{}
\DeclareFontShape{T1}{zplsups}{bx}{it}{ %bold extended italic
<-> ssub * zplsups/b/it%
}{}
\DeclareFontShape{T1}{zplsups}{bx}{scit}{ %bold extended italic
<-> ssub * zplsups/b/it%
}{}
\DeclareFontShape{T1}{zplsups}{bx}{ui}{ %bold extended unslanted italic
<-> ssub * zplsups/b/n%
}{}
\DeclareFontShape{T1}{zplsups}{bx}{n}{ %bold extended
<-> ssub * zplsups/b/n%
}{}
\DeclareFontShape{T1}{zplsups}{b}{sc}{ %bold cap & small cap
<-> ssub * zplsups/b/n%
}{}
\DeclareFontShape{T1}{zplsups}{b}{sl}{ %bold slanted
<-> ssub * zplsups/b/it%
}{}
\DeclareFontShape{T1}{zplsups}{b}{ui}{ %bold unslanted italic
<-> ssub * zplsups/b/n%
}{}
\DeclareFontShape{T1}{zplsups}{b}{scit}{ %bold italic
<-> ssub * zplsups/b/it%
}{}
\endinput
\end{filecontents}
\makeatother
\usepackage{newpxtext}
\usepackage[T1]{fontenc}
\begin{document}
\bfseries % Comment this line to eliminate error
Error at footnote number here.\footnote{Error just now.}
\end{document}
请将该错误报告给软件包的维护者。
答案2
软件包作者 Michael Sharpe 已更新 CTAN 上的软件包以更正此错误。现在(2015 年 3 月)的建议是更新您的发行版。
如果由于某种原因无法实现,作者提供了以下三个.fd
文件,您可以将它们放入工作目录中以恢复正常工作。
文件:ly1zplsups.fd
\ProvidesFile{ly1zplsups.fd}[2015/01/17 v1.0]
\expandafter\ifx\csname zpl@scaled\endcsname\relax
\let\zpl@scaled\@empty%
\fi
\DeclareFontFamily{LY1}{zplsups}{}
\DeclareFontShape{LY1}{zplsups}{m}{n}{ %medium
<-> \zpl@scaled zplsups-Regular-ly1%
}{}
\DeclareFontShape{LY1}{zplsups}{m}{it}{ %italic
<-> \zpl@scaled zplsups-Italic-ly1%
}{}
\DeclareFontShape{LY1}{zplsups}{b}{n}{ %bold
<-> \zpl@scaled zplsups-Bold-ly1%
}{}
\DeclareFontShape{LY1}{zplsups}{b}{it}{ %bold italic
<-> \zpl@scaled zplsups-BoldItalic-ly1%
}{}
\DeclareFontShape{LY1}{zplsups}{m}{sc}{ %cap & small cap
<-> ssub * zplsups/m/n%
}{}
\DeclareFontShape{LY1}{zplsups}{m}{sl}{ %slanted
<-> ssub * zplsups/m/it%
}{}
\DeclareFontShape{LY1}{zplsups}{m}{scit}{ %italic
<-> ssub * zplsups/m/it%
}{}
\DeclareFontShape{LY1}{zplsups}{m}{ui}{ %unslanted italic
<-> ssub * zplsups/m/n%
}{}
\DeclareFontShape{LY1}{zplsups}{bx}{sc}{ %bold extended cap & small cap
<-> ssub * zplsups/b/n%
}{}
\DeclareFontShape{LY1}{zplsups}{bx}{sl}{ %bold extended slanted
<-> ssub * zplsups/b/it%
}{}
\DeclareFontShape{LY1}{zplsups}{bx}{it}{ %bold extended italic
<-> ssub * zplsups/b/it%
}{}
\DeclareFontShape{LY1}{zplsups}{bx}{scit}{ %bold extended italic
<-> ssub * zplsups/b/it%
}{}
\DeclareFontShape{LY1}{zplsups}{bx}{ui}{ %bold extended unslanted italic
<-> ssub * zplsups/b/n%
}{}
\DeclareFontShape{LY1}{zplsups}{bx}{n}{ %bold extended
<-> ssub * zplsups/b/n%
}{}
\DeclareFontShape{LY1}{zplsups}{b}{sc}{ %bold cap & small cap
<-> ssub * zplsups/b/n%
}{}
\DeclareFontShape{LY1}{zplsups}{b}{sl}{ %bold slanted
<-> ssub * zplsups/b/it%
}{}
\DeclareFontShape{LY1}{zplsups}{b}{ui}{ %bold unslanted italic
<-> ssub * zplsups/b/n%
}{}
\DeclareFontShape{LY1}{zplsups}{b}{scit}{ %bold italic
<-> ssub * zplsups/b/it%
}{}
\endinput
文件:ot1zplsups.fd
\ProvidesFile{ot1zplsups.fd}[2015/01/17 v1.0]
\expandafter\ifx\csname zpl@scaled\endcsname\relax
\let\zpl@scaled\@empty%
\fi
\DeclareFontFamily{OT1}{zplsups}{}
\DeclareFontShape{OT1}{zplsups}{m}{n}{ %medium
<-> \zpl@scaled zplsups-Regular-ot1%
}{}
\DeclareFontShape{OT1}{zplsups}{m}{it}{ %italic
<-> \zpl@scaled zplsups-Italic-ot1%
}{}
\DeclareFontShape{OT1}{zplsups}{b}{n}{ %bold
<-> \zpl@scaled zplsups-Bold-ot1%
}{}
\DeclareFontShape{OT1}{zplsups}{b}{it}{ %bold italic
<-> \zpl@scaled zplsups-BoldItalic-ot1%
}{}
\DeclareFontShape{OT1}{zplsups}{m}{sc}{ %cap & small cap
<-> ssub * zplsups/m/n%
}{}
\DeclareFontShape{OT1}{zplsups}{m}{sl}{ %slanted
<-> ssub * zplsups/m/it%
}{}
\DeclareFontShape{OT1}{zplsups}{m}{scit}{ %italic
<-> ssub * zplsups/m/it%
}{}
\DeclareFontShape{OT1}{zplsups}{m}{ui}{ %unslanted italic
<-> ssub * zplsups/m/n%
}{}
\DeclareFontShape{OT1}{zplsups}{bx}{sc}{ %bold extended cap & small cap
<-> ssub * zplsups/b/n%
}{}
\DeclareFontShape{OT1}{zplsups}{bx}{sl}{ %bold extended slanted
<-> ssub * zplsups/b/it%
}{}
\DeclareFontShape{OT1}{zplsups}{bx}{it}{ %bold extended italic
<-> ssub * zplsups/b/it%
}{}
\DeclareFontShape{OT1}{zplsups}{bx}{scit}{ %bold extended italic
<-> ssub * zplsups/b/it%
}{}
\DeclareFontShape{OT1}{zplsups}{bx}{ui}{ %bold extended unslanted italic
<-> ssub * zplsups/b/n%
}{}
\DeclareFontShape{OT1}{zplsups}{bx}{n}{ %bold extended
<-> ssub * zplsups/b/n%
}{}
\DeclareFontShape{OT1}{zplsups}{b}{sc}{ %bold cap & small cap
<-> ssub * zplsups/b/n%
}{}
\DeclareFontShape{OT1}{zplsups}{b}{sl}{ %bold slanted
<-> ssub * zplsups/b/it%
}{}
\DeclareFontShape{OT1}{zplsups}{b}{ui}{ %bold unslanted italic
<-> ssub * zplsups/b/n%
}{}
\DeclareFontShape{OT1}{zplsups}{b}{scit}{ %bold italic
<-> ssub * zplsups/b/it%
}{}
\endinput
文件:t1zplsups.fd
\ProvidesFile{t1zplsups.fd}[2015/01/17 v1.0]
\expandafter\ifx\csname zpl@scaled\endcsname\relax
\let\zpl@scaled\@empty%
\fi
\DeclareFontFamily{T1}{zplsups}{}
\DeclareFontShape{T1}{zplsups}{m}{n}{ %medium
<-> \zpl@scaled zplsups-Regular-t1%
}{}
\DeclareFontShape{T1}{zplsups}{m}{it}{ %italic
<-> \zpl@scaled zplsups-Italic-t1%
}{}
\DeclareFontShape{T1}{zplsups}{b}{n}{ %bold
<-> \zpl@scaled zplsups-Bold-t1%
}{}
\DeclareFontShape{T1}{zplsups}{b}{it}{ %bold italic
<-> \zpl@scaled zplsups-BoldItalic-t1%
}{}
\DeclareFontShape{T1}{zplsups}{m}{sc}{ %cap & small cap
<-> ssub * zplsups/m/n%
}{}
\DeclareFontShape{T1}{zplsups}{m}{sl}{ %slanted
<-> ssub * zplsups/m/it%
}{}
\DeclareFontShape{T1}{zplsups}{m}{scit}{ %italic
<-> ssub * zplsups/m/it%
}{}
\DeclareFontShape{T1}{zplsups}{m}{ui}{ %unslanted italic
<-> ssub * zplsups/m/n%
}{}
\DeclareFontShape{T1}{zplsups}{bx}{sc}{ %bold extended cap & small cap
<-> ssub * zplsups/b/n%
}{}
\DeclareFontShape{T1}{zplsups}{bx}{sl}{ %bold extended slanted
<-> ssub * zplsups/b/it%
}{}
\DeclareFontShape{T1}{zplsups}{bx}{it}{ %bold extended italic
<-> ssub * zplsups/b/it%
}{}
\DeclareFontShape{T1}{zplsups}{bx}{scit}{ %bold extended italic
<-> ssub * zplsups/b/it%
}{}
\DeclareFontShape{T1}{zplsups}{bx}{ui}{ %bold extended unslanted italic
<-> ssub * zplsups/b/n%
}{}
\DeclareFontShape{T1}{zplsups}{bx}{n}{ %bold extended
<-> ssub * zplsups/b/n%
}{}
\DeclareFontShape{T1}{zplsups}{b}{sc}{ %bold cap & small cap
<-> ssub * zplsups/b/n%
}{}
\DeclareFontShape{T1}{zplsups}{b}{sl}{ %bold slanted
<-> ssub * zplsups/b/it%
}{}
\DeclareFontShape{T1}{zplsups}{b}{ui}{ %bold unslanted italic
<-> ssub * zplsups/b/n%
}{}
\DeclareFontShape{T1}{zplsups}{b}{scit}{ %bold italic
<-> ssub * zplsups/b/it%
}{}
\endinput