3

Running pdflatex on

\documentclass[ngerman]{article}
\pagestyle{empty}
\usepackage[T2A,T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage[slantedGreek,subscriptcorrection,helvratio=.9]{newtx}% I tested v1.724 and v1.735
\begin{document}
x\textsf{xX}X$\mathsf{XxX}\mathrm{Xx}\mathsf{x}$x
\end{document}

yields

output

When using a single all-covering font package (as NewTX), we should expect all the fonts to jive well with each other, at least roughly. (Notice that here we're not testing the two packages newtxtext and newtxmath: saying \usepackage{newtxtext,newtxmath} instead of \usepackage[…]{newtx} yields different output, though it's older interface.)

The text sans font is not ideal but subjectively tolerable: though the sans x is visibly taller (by a factor of 1.046) than the serif x, the sans X is somewhat smaller (by a factor of 1.009) than the serif X, and we could tweak the height of the text sans font with helvratio a bit anyway if we wish to.

The math sans font is what visibly bothers us; we consider its height subjectively not well equalized with respect to

  • the height of the text font and

  • the height of the math upright font.

Namely, though the sans math x is only very slightly smaller (by a factor of 1.015) than both the text serif x and the math upright serif x, the sans math X is very visibly taller (by a factor of 1.046) than both the text serif X and the math upright serif X. This issue in the math sans font bothers us. How to very slightly downscale the sans math or the capitals therein, i.e., reduce the height of the sans math font or of the capitals in sans math font?

Other relationships between the fonts seem fine, and we have more fonts in our non-minimal example, so we don't wish to tweak more than asked above (in particular, we wish to keep the sizes of all the non–sans-math fonts as they currently are).

7
  • 1
    You have certainly demonstated an impressive aptitude at typesetting various combinations of the letters x and X in various combinations of text-mode serif, text-mode sans-serif, and math-mode sans-serif font combinations. That said, I must confess to having no clue as to what the actual purpose of your query could be. If your purpose is to find a combination of serif and sans-serif fonts that harmonize well with each other, in both text and math mode, then you probably already know that Times Roman and Helvetica are not going to form such a combination.
    – Mico
    Feb 4 at 21:51
  • @Mico The purpose is to make our texts look nice or at least nicer than currently (perfect harmony is unnecessary). We do use serif and sans fonts for various purposes, we do need sans on some occasions, and using Times (or a clone thereof) as a main text and math font is a must by the publisher. The question is this: How to (very) slightly reduce the height of the sans math font or of the capitals in the sans math font?
    – AlMa1r
    Feb 4 at 21:58
  • 1
    Helvetica and Times Roman are exceedingly dissimlar. Hence, the purpose of "making texts look nice" is pretty much doomed if one insists on using this combination of fonts. (As I'm sure you're well aware of, there's a whole lot more to making a combination of two fonts look good than just equating their x-heights or cap-heights. Indeed, equating their x-heights may be one of the least important aspects of making a combination of two fonts look good together...) If using Times Roman as the serif font is a must for you, then start looking for sans-serif fonts other than Helvetica.
    – Mico
    Feb 4 at 22:04
  • @Mico There is no Helvetica (or Neue Helvetica or Helvetica Now) involved here. In the output of pdffonts, we see a font coming probably from CM Super, i.e., it should be CM Super Sans. Subjectively, I'd consider it already an improvement if this font were downscaled by, say, 0.5% or 1%. Alternatively, cf. tex.stackexchange.com/questions/708727/… .
    – AlMa1r
    Feb 4 at 22:16
  • 1
    Please check your facts. By default (i.e., unless an option such as nohelv is specified...) newtx loads Tex Gyre Heros as its sans-serif text font -- and ... drumroll ... Tex Gyre Heros is indeed an Helvetica clone. And what could the option helvratio in the code you posted be referring to?
    – Mico
    Feb 4 at 22:23

1 Answer 1

3

Asking \showthe\textfont8 reveals \T1/cmss/m/n/10, instead of using the same font as \sffamily.

I'm not sure why newtx.sty doesn't set the \mathsf font, while newtxmath.sty does it. Fix it and report.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[
  slantedGreek,
  subscriptcorrection,
  helvratio=.9,
]{newtx}

\DeclareMathAlphabet{\mathsf}{\encodingdefault}{\sfdefault}{m}{n}
\SetMathAlphabet{\mathsf}{bold}{\encodingdefault}{\sfdefault}{b}{n}

\begin{document}

x\textsf{xX}X$\mathsf{XxX}\mathrm{Xx}\mathsf{x}$x

\end{document}

enter image description here

5
  • Thank you. I've sent an e-mail to the maintainer. As for your answer: is there also a bold italic sans and italic sans that need to be set/changed for the sake of completeness?
    – AlMa1r
    Feb 4 at 22:36
  • @AlMa1r You can \DeclareMathAlphabet{\mathsfit}{\encodingdefault}{\sfdefault}{m}{it} and you can guess the corresponding \SetMathAlphabet instruction. It's not defined in newtxmath
    – egreg
    Feb 4 at 22:52
  • \SetMathAlphabet{\mathsfit}{bold}{\encodingdefault}{\sfdefault}{b}{it}?
    – AlMa1r
    Feb 5 at 1:13
  • 1
    @AlMa1r That's it.
    – egreg
    Feb 5 at 10:00
  • I like {it} :-).
    – AlMa1r
    Feb 25 at 16:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .