![嵌套字体在使用 newtx (newtxtext) 包时失败(特别是 \textsc、\textup 和 \textbf)](https://linux22.com/image/349438/%E5%B5%8C%E5%A5%97%E5%AD%97%E4%BD%93%E5%9C%A8%E4%BD%BF%E7%94%A8%20newtx%20(newtxtext)%20%E5%8C%85%E6%97%B6%E5%A4%B1%E8%B4%A5%EF%BC%88%E7%89%B9%E5%88%AB%E6%98%AF%20%5Ctextsc%E3%80%81%5Ctextup%20%E5%92%8C%20%5Ctextbf%EF%BC%89.png)
正如所讨论的这个答案,通常可以使用 禁用小写字母\textup{}
。这似乎与newtx
包裹。我怎样才能恢复所需的行为?
与 Computer Modern 配合使用:
\documentclass{standalone}
\begin{document}
\textsc{abc\textup{abc}}
\end{document}
中断原因newtxttext
:
\documentclass{standalone}
\usepackage{newtxtext}
\begin{document}
\textsc{abc\textup{abc}}
\end{document}
期望的输出(例如,使用较旧的txfonts
包,它可以按预期工作,但是具有其他newtx
需要修复的缺陷。)
其他嵌套字体选择似乎\textit{\textbf{abd}}
运行良好。
更新:
正如@UlrikeFischer 所指出的,人们可以使用\textulc{}
来“逃避”小写字母,但后来我注意到使用该largesc
选项时存在另一个问题。嵌套的\textbf{\textsc{abc}}
是斜体而不是粗体。(注意:这在没有该largesc
选项的情况下也可以工作):
\documentclass{standalone}
\usepackage[largesc]{newtxtext}
\begin{document}
\textbf{\textsc{abc}}
\end{document}
使用以下日志文件:
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=pdflatex 2017.2.13) 13 FEB 2017 18:09
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**nestedsc
(./nestedsc.tex
LaTeX2e <2017/01/01> patch level 1
Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
(/usr/local/texlive/2016/texmf-dist/tex/latex/standalone/standalone.cls
Document Class: standalone 2015/07/15 v1.2 Class to compile TeX sub-files stand
alone
(/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
(/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
(/usr/local/texlive/2016/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
(/usr/local/texlive/2016/texmf-dist/tex/latex/xkeyval/xkeyval.sty
Package: xkeyval 2014/12/03 v2.7a package option processing (HA)
(/usr/local/texlive/2016/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2016/texmf-dist/tex/generic/xkeyval/xkvutils.tex
\XKV@toks=\toks14
\XKV@tempa@toks=\toks15
(/usr/local/texlive/2016/texmf-dist/tex/generic/xkeyval/keyval.tex))
\XKV@depth=\count79
File: xkeyval.tex 2014/12/03 v2.7a key=value parser (HA)
))
\sa@internal=\count80
\c@sapage=\count81
(/usr/local/texlive/2016/texmf-dist/tex/latex/standalone/standalone.cfg
File: standalone.cfg 2015/07/15 v1.2 Default configuration file for 'standalone
' class
)
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count82
\c@section=\count83
\c@subsection=\count84
\c@subsubsection=\count85
\c@paragraph=\count86
\c@subparagraph=\count87
\c@figure=\count88
\c@table=\count89
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
\sa@box=\box26
)
(/usr/local/texlive/2016/texmf-dist/tex/latex/newtx/newtxtext.sty
Package: newtxtext 2017/01/30 v1.517
`newtxtext' v1.517, 2017/01/30 Text macros taking advantage of TeX-Gyre Termes
fonts (msharpe)
(/usr/local/texlive/2016/texmf-dist/tex/latex/fontaxes/fontaxes.sty
Package: fontaxes 2014/03/23 v1.0d Font selection axes
LaTeX Info: Redefining \upshape on input line 29.
LaTeX Info: Redefining \itshape on input line 31.
LaTeX Info: Redefining \slshape on input line 33.
LaTeX Info: Redefining \scshape on input line 37.
)
\ntx@fs=\dimen103
(/usr/local/texlive/2016/texmf-dist/tex/latex/etoolbox/etoolbox.sty
Package: etoolbox 2017/01/02 v2.4 e-TeX tools for LaTeX (JAW)
\etb@tempcnta=\count90
)
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2017/01/24 v2.0c Standard LaTeX package
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/t1enc.def
File: t1enc.def 2017/01/24 v2.0c Standard LaTeX file
LaTeX Font Info: Redeclaring font encoding T1 on input line 48.
))
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/textcomp.sty
Package: textcomp 2017/01/24 v2.0c Standard LaTeX package
Package textcomp Info: Sub-encoding information:
(textcomp) 5 = only ISO-Adobe without \textcurrency
(textcomp) 4 = 5 + \texteuro
(textcomp) 3 = 4 + \textohm
(textcomp) 2 = 3 + \textestimated + \textcurrency
(textcomp) 1 = TS1 - \textcircled - \t
(textcomp) 0 = TS1 (full)
(textcomp) Font families with sub-encoding setting implement
(textcomp) only a restricted character set as indicated.
(textcomp) Family '?' is the default used for unknown fonts.
(textcomp) See the documentation for details.
Package textcomp Info: Setting ? sub-encoding to TS1/1 on input line 79.
Package textcomp Info: Changing ? sub-encoding to TS1/0 on input line 80.
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/ts1enc.def
File: ts1enc.def 2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
)
LaTeX Info: Redefining \oldstylenums on input line 334.
Package textcomp Info: Setting cmr sub-encoding to TS1/0 on input line 349.
Package textcomp Info: Setting cmss sub-encoding to TS1/0 on input line 350.
Package textcomp Info: Setting cmtt sub-encoding to TS1/0 on input line 351.
Package textcomp Info: Setting cmvtt sub-encoding to TS1/0 on input line 352.
Package textcomp Info: Setting cmbr sub-encoding to TS1/0 on input line 353.
Package textcomp Info: Setting cmtl sub-encoding to TS1/0 on input line 354.
Package textcomp Info: Setting ccr sub-encoding to TS1/0 on input line 355.
Package textcomp Info: Setting ptm sub-encoding to TS1/4 on input line 356.
Package textcomp Info: Setting pcr sub-encoding to TS1/4 on input line 357.
Package textcomp Info: Setting phv sub-encoding to TS1/4 on input line 358.
Package textcomp Info: Setting ppl sub-encoding to TS1/3 on input line 359.
Package textcomp Info: Setting pag sub-encoding to TS1/4 on input line 360.
Package textcomp Info: Setting pbk sub-encoding to TS1/4 on input line 361.
Package textcomp Info: Setting pnc sub-encoding to TS1/4 on input line 362.
Package textcomp Info: Setting pzc sub-encoding to TS1/4 on input line 363.
Package textcomp Info: Setting bch sub-encoding to TS1/4 on input line 364.
Package textcomp Info: Setting put sub-encoding to TS1/5 on input line 365.
Package textcomp Info: Setting uag sub-encoding to TS1/5 on input line 366.
Package textcomp Info: Setting ugq sub-encoding to TS1/5 on input line 367.
Package textcomp Info: Setting ul8 sub-encoding to TS1/4 on input line 368.
Package textcomp Info: Setting ul9 sub-encoding to TS1/4 on input line 369.
Package textcomp Info: Setting augie sub-encoding to TS1/5 on input line 370.
Package textcomp Info: Setting dayrom sub-encoding to TS1/3 on input line 371.
Package textcomp Info: Setting dayroms sub-encoding to TS1/3 on input line 372.
Package textcomp Info: Setting pxr sub-encoding to TS1/0 on input line 373.
Package textcomp Info: Setting pxss sub-encoding to TS1/0 on input line 374.
Package textcomp Info: Setting pxtt sub-encoding to TS1/0 on input line 375.
Package textcomp Info: Setting txr sub-encoding to TS1/0 on input line 376.
Package textcomp Info: Setting txss sub-encoding to TS1/0 on input line 377.
Package textcomp Info: Setting txtt sub-encoding to TS1/0 on input line 378.
Package textcomp Info: Setting lmr sub-encoding to TS1/0 on input line 379.
Package textcomp Info: Setting lmdh sub-encoding to TS1/0 on input line 380.
Package textcomp Info: Setting lmss sub-encoding to TS1/0 on input line 381.
Package textcomp Info: Setting lmssq sub-encoding to TS1/0 on input line 382.
Package textcomp Info: Setting lmvtt sub-encoding to TS1/0 on input line 383.
Package textcomp Info: Setting lmtt sub-encoding to TS1/0 on input line 384.
Package textcomp Info: Setting qhv sub-encoding to TS1/0 on input line 385.
Package textcomp Info: Setting qag sub-encoding to TS1/0 on input line 386.
Package textcomp Info: Setting qbk sub-encoding to TS1/0 on input line 387.
Package textcomp Info: Setting qcr sub-encoding to TS1/0 on input line 388.
Package textcomp Info: Setting qcs sub-encoding to TS1/0 on input line 389.
Package textcomp Info: Setting qpl sub-encoding to TS1/0 on input line 390.
Package textcomp Info: Setting qtm sub-encoding to TS1/0 on input line 391.
Package textcomp Info: Setting qzc sub-encoding to TS1/0 on input line 392.
Package textcomp Info: Setting qhvc sub-encoding to TS1/0 on input line 393.
Package textcomp Info: Setting futs sub-encoding to TS1/4 on input line 394.
Package textcomp Info: Setting futx sub-encoding to TS1/4 on input line 395.
Package textcomp Info: Setting futj sub-encoding to TS1/4 on input line 396.
Package textcomp Info: Setting hlh sub-encoding to TS1/3 on input line 397.
Package textcomp Info: Setting hls sub-encoding to TS1/3 on input line 398.
Package textcomp Info: Setting hlst sub-encoding to TS1/3 on input line 399.
Package textcomp Info: Setting hlct sub-encoding to TS1/5 on input line 400.
Package textcomp Info: Setting hlx sub-encoding to TS1/5 on input line 401.
Package textcomp Info: Setting hlce sub-encoding to TS1/5 on input line 402.
Package textcomp Info: Setting hlcn sub-encoding to TS1/5 on input line 403.
Package textcomp Info: Setting hlcw sub-encoding to TS1/5 on input line 404.
Package textcomp Info: Setting hlcf sub-encoding to TS1/5 on input line 405.
Package textcomp Info: Setting pplx sub-encoding to TS1/3 on input line 406.
Package textcomp Info: Setting pplj sub-encoding to TS1/3 on input line 407.
Package textcomp Info: Setting ptmx sub-encoding to TS1/4 on input line 408.
Package textcomp Info: Setting ptmj sub-encoding to TS1/4 on input line 409.
)
Babel
LaTeX Font Info: Try loading font information for T1+ntxtlf on input line 25
3.
(/usr/local/texlive/2016/texmf-dist/tex/latex/newtx/t1ntxtlf.fd
File: t1ntxtlf.fd 2015/01/17 v1.0 font definition file for T1/ntx/tlf
)
LaTeX Font Info: Font shape `T1/ntxtlf/m/n' will be
(Font) scaled to size 10.0pt on input line 253.
)
(./nestedsc.aux)
\openout1 = `nestedsc.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 3.
LaTeX Font Info: Try loading font information for TS1+cmr on input line 3.
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/ts1cmr.fd
File: ts1cmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: ... okay on input line 3.
\c@mv@tabular=\count91
\c@mv@boldtabular=\count92
LaTeX Font Info: Font shape `T1/ntxtlf/bx/n' in size <10> not available
(Font) Font shape `T1/ntxtlf/b/n' tried instead on input line 4.
LaTeX Font Info: Font shape `T1/ntxtlf/b/n' will be
(Font) scaled to size 10.0pt on input line 4.
LaTeX Font Info: Font shape `T1/ntxtlf/bx/sc' in size <10> not available
(Font) Font shape `T1/ntxtlf/b/sc' tried instead on input line 4.
LaTeX Font Info: Font shape `T1/ntxtlf/b/sc' will be
(Font) scaled to size 10.0pt on input line 4.
[1
{/usr/local/texlive/2016/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./nestedsc.aux) )
Here is how much of TeX's memory you used:
1988 strings out of 493013
29369 string characters out of 6133343
74377 words of memory out of 5000000
5556 multiletter control sequences out of 15000+600000
13128 words of font info for 18 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
34i,4n,56p,870b,108s stack positions out of 5000i,500n,10000p,200000b,80000s
{/usr/local/texlive/2016/texmf-dist/fonts/enc/dvips/newtx/ntx
-ec-tlf-sc.enc}</usr/local/texlive/2016/texmf-dist/fonts/type1/public/newtx/ntx
tmb.pfb>
Output written on nestedsc.pdf (1 page, 31136 bytes).
PDF statistics:
13 PDF objects out of 1000 (max. 8388607)
8 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)
答案1
依我拙见,这是一个错误。该largesc
选项的 TFM 文件不正确。可能还有其他问题 - 我没有进一步追究此事,因为这个已经足够了。
以下是 T1 编码的常规大写小型大写字体的 TFM 文件的开头:
(FAMILY TEX-NTX-RTLF-SCL-T1)
(FACE F MRR)
(CODINGSCHEME ENCNTX-EC-TLF-SC)
(DESIGNSIZE R 10.0)
(COMMENT DESIGNSIZE IS IN POINTS)
(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE)
(CHECKSUM O 21116146204)
(FONTDIMEN
(SLANT R 0.0)
(SPACE R 0.25)
(STRETCH R 0.2)
(SHRINK R 0.1)
(XHEIGHT R 0.45)
(QUAD R 1.0)
(EXTRASPACE R 0.111)
)
请注意,正如SLANT
我们预期的那样,为零。这描述了 TFM 所指的字体 - 显然是直立的。现在比较粗体
(FAMILY TEX-NTX-BTLF-SCL-T1)
(FACE F MRR)
(CODINGSCHEME ENCNTX-EC-TLF-SC)
(DESIGNSIZE R 10.0)
(COMMENT DESIGNSIZE IS IN POINTS)
(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE)
(CHECKSUM O 31633301164)
(FONTDIMEN
(SLANT R 0.267949)
(SPACE R 0.25)
(STRETCH R 0.2)
(SHRINK R 0.1)
(XHEIGHT R 0.432)
(QUAD R 1.0)
(EXTRASPACE R 0.111)
)
此处SLANT
适合斜体,但不适合直立。因此,本 TFM 引用的字体是倾斜的或斜体的,而不是直立的。相比之下,非大号小写粗体则如预期的那样不倾斜。
(FAMILY TEX-NTX-B-TLF-SC-T1)
(FACE F MRR)
(CODINGSCHEME ENCNTX-EC-TLF-SC)
(DESIGNSIZE R 10.0)
(COMMENT DESIGNSIZE IS IN POINTS)
(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE)
(CHECKSUM O 26363400366)
(FONTDIMEN
(SLANT R 0.0)
(SPACE R 0.25)
(STRETCH R 0.2)
(SHRINK R 0.1)
(XHEIGHT R 0.461)
(QUAD R 1.0)
(EXTRASPACE R 0.111)
)
这应该被报告为一个错误。它需要在分发的文件中更正。也就是说,您可以重新进行配置,但除非没有希望修复该软件包,或者您迫在眉睫的最后期限,绝对需要这个带有这些选项的字体软件包,否则如果您报告并等待,您将是一个更理智的人。
字体安装的纠结是……最礼貌的描述是……有趣的体验。也许不容错过,但你的一生都在等着你,为什么要今天去做十年后你就能轻松做的事情呢?
与最初不是您创作的字体装置纠缠在一起是更加有趣的体验......也许不容错过,但为什么不相信轮回,以便您可以在几千年后回到这个问题上?
问题是,我们基本上没有源代码。这使得找到问题并纠正其根本原因变得更加困难。如果我们有源代码 - 脚本、Makefile、驱动程序文件或任何使用过的东西 - 我们可以在进行更正后简单地重新生成 TFM。就目前情况而言,我们最多只能治疗症状或从头开始编写源代码(可能会在此过程中引入一系列不同的错误)。
可以说,我们确实应该获得源代码,因为有许可证。不幸的是,这似乎并不是一个普遍的看法。