-3

What may be done to get rid of these two font shape warnings:

Font shape `LGR/ntxtlf/m/n' undefined

Font shape `LGR/ntxtlf/m/it' undefined

4
  • 1
    Please post the warnings into your question along with the smallest complete document we can compile to reproduce them. Questions should remain useful when the contents of links change. Many people won't follow links posted by strangers on the internet anyway. And dropbox links are a pain besides.
    – cfr
    Apr 9 at 23:17
  • 1
    don't use an image or an external link to show warnings, which just tells you that the ntx times roman clone doesn't have Greek encoding defined, but how to avoid the warnings depends on what you want to do, do you need Greek, do you need ntx fonts show a small complete document that gives the warning and say what you want it to do. Apr 9 at 23:21
  • @David Carlisle I got rid of the picture and the link. Greek I need, but I do not know about ntx fonts. I do not know a s m a l l complete document which produces the warnings. Apr 9 at 23:37
  • 2
    start with a copy of your document and delete everything you can while showing the warning, but the warning is just telling you that the times roman clone hasn't got Greek (there is a clue in the name:-) so you need to choose a different font for the Greek bits Apr 9 at 23:45

2 Answers 2

1

I can reproduce the warnings with

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[greek,english]{babel}
\usepackage{newtxtext}

\begin{document}

xyz \textgreek{αβγ}

\textit{xyz \textgreek{αβγ}}

\end{document}

The terminal will show

LaTeX Font Warning: Font shape `LGR/ntxtlf/m/n' undefined
(Font)              using `LGR/cmr/m/n' instead on input line 4.

LaTeX Font Warning: Font shape `LGR/ntxtlf/m/it' undefined
(Font)              using `LGR/ntxtlf/m/n' instead on input line 11.

because NewTX has no support for Greek. You can substitute a Times-based font for the LGR (Greek) encoding.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[greek,english]{babel}
\usepackage{newtxtext}

\DeclareFontFamilySubstitution{LGR}{ntxtlf}{Tempora-TLF}

\begin{document}

xyz \textgreek{αβγ}

\textit{xyz \textgreek{αβγ}}

\end{document}

enter image description here

Alternatively, directly use Tempora.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[greek,english]{babel}
\usepackage{tempora}

\begin{document}

xyz \textgreek{αβγ}

\textit{xyz \textgreek{αβγ}}

\end{document}

enter image description here

If you need math, you can still load newtxmath after tempora.

3
  • Thank you! Unfortunately it doesn't work, and it is perhaps as I always use $\alpha$, and so on, and not \textgreek{α}. Apr 10 at 1:27
  • @FrodeAlfsonBjørdal We can't read other people's minds. You should add a minimal example reproducing the issue. And no: a big image isn't a minimal example.
    – egreg
    Apr 10 at 9:22
  • Thanks! I resolved it, by elimination. :) Apr 11 at 3:14
0

You have not provided any example nor shown the full message.

You could have shown an example such as

\documentclass{article}

\usepackage[LGR]{fontenc}
\usepackage{newtx}

\begin{document}
x
\end{document}

which produces

LaTeX Font Warning: Font shape `LGR/ntxtlf/m/n' undefined
(Font)              using `LGR/cmr/m/n' instead on input line 6.

Telling you that the newtx Times Roman clone doesn't have the Greek LGR encoding set up and latex is using LGR computer modern instead.

What you do then is your choice, you coul dnot use Greek or not use newtx fonts, or you could ignore the warning and accept the substitution offered which will use newtx fonts when it can and use computer modern Greek.

1

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