2

As discussed in this answer, one can typically disable small caps with \textup{}. This appears to be broken with the newtx package. How can I restore the desired behaviour?

Works with Computer Modern:

\documentclass{standalone}
\begin{document}
\textsc{abc\textup{abc}}
\end{document}

Working small caps with Computer Modern

Broken with newtxttext:

\documentclass{standalone}
\usepackage{newtxtext}
\begin{document}
\textsc{abc\textup{abc}}
\end{document}

Broken small caps with newtxtext

Desired output (for example, with the older txfonts package, which works as expected but has other deficiencies that newtx is supposed to fix.)

Desired output

Other nested font selection like \textit{\textbf{abd}} seem to work fine.

Update:

As pointed out by @UlrikeFischer, one can use \textulc{} to "escape" from the small caps, but then I noticed another issue when using the largesc option. Nested \textbf{\textsc{abc}} is italics rather than bold. (Note: this works without the largesc option):

\documentclass{standalone}
\usepackage[largesc]{newtxtext}
\begin{document}
\textbf{\textsc{abc}}
\end{document}

Broken \textbf{\textsc{abc}}

with the following log file:

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
    newtx uses the fontaxes package to move \scshape to another axis. You can use \textulc instead of \textup to get back to upright. – Ulrike Fischer Feb 13 '17 at 16:14
  • @UlrikeFischer Hmm. That seems to work, but now I notice that \textsc{} also has issues when embedded in other commands. \textbf{\textsc{abc}} produces italic small caps for example! – mforbes Feb 13 '17 at 19:59
  • Doesn't happen for me. I get bold small caps. Show a complete example and the log-file. – Ulrike Fischer Feb 13 '17 at 23:02
  • Sorry. The \textbf{\textsc{abc}} issue only happens when I use the largest option: \usepackage[largesc]{newtxtext}. – mforbes Feb 14 '17 at 2:18
3

In my humble opinion, this is a bug. The TFM files for the largesc option are incorrect. Possibly there are other issues - I didn't pursue the matter further as this one is enough.

Here is the start of the TFM file for the Regular large small caps font in T1 encoding:

(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)
   )

Notice that the SLANT is zero as we'd expect. This describes the font the TFM is referring to - evidently an upright one. Now compare the bold

(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)
   )

The SLANT here would be appropriate for the italic, but not the upright. The font referenced by this TFM is, therefore, slanted or italic rather than upright. In contrast, the non-large small caps bold is unslanted, as expected.

(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)
   )

This should be reported as a bug. It needs to be corrected in the distributed files. That is, you could redo the configuration, but unless there is no hope of getting the package fixed or you are up against a deadline which absolutely requires this font package with these options, you will remain a saner person if you report and wait.

Tangling with font installation is ... an experience most politely described as ... interesting. Not to be missed, perhaps, but you have your whole life ahead of you, and why do today what you could as easily do in a decade or so?

Tangling with font installations you did not originally author is an even more interesting experience .... Not to be missed, perhaps, but why not believe in reincarnation so that you can return to the matter in a couple of millennia?

The trouble is, we don't basically have the source. And that makes it much more difficult to find the problem and correct its root cause. If we had the source - scripts, a Makefile, driver files or whatever was used - we could simply regenerate the TFMs after making the corrections. As things are, we can at best treat the symptoms or write the source from scratch (likely introducing a whole set of different mistakes along the way).

Arguably, we really should have the source, given the licence. Unfortunately, this does not appear to be a widely held view.

  • A faulty tfm alone could not produce slanted glyphs. But ntxtmb.pfb contains /FontName /ntxtmri def and has a non zero ItalicAngle so I would say the fonts have been mixed up. – Ulrike Fischer Feb 14 '17 at 9:29
  • @UlrikeFischer True. But I was assuming the TFMs were generated from the AFMs, for example, rather than hand-crafted. That is, I took it that the TFMs described the font that they were using. Of course, a TFM alone can't produce any glyphs at all, slanted or otherwise. [I've added a clarification. Hopefully less misleading now.] – cfr Feb 14 '17 at 16:25
  • I contacted the developer and it looks like a corrected version of newtx should be available in a few days. – mforbes Feb 15 '17 at 0:04
  • @mforbes Great! – cfr Feb 15 '17 at 4:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.