I need to fix this warnings with saving of Times New Roman and sizes of it.
Warnings:
LaTeX Font Warning: Font shape `TU/ftm/m/n' undefined
(Font) using `TU/lmr/m/n' instead on input line 49.
LaTeX Font Warning: Font shape `PD1/ftm/m/n' undefined
(Font) using `PD1/pdf/m/n' instead on input line 51.
LaTeX Font Info: Try loading font information for PU+ftm on input line 51.
LaTeX Font Info: No file PUftm.fd. on input line 51.
LaTeX Font Warning: Font shape `PU/ftm/m/n' undefined
(Font) using `PU/pdf/m/n' instead on input line 51.
LaTeX Font Info: Try loading font information for T1+TimesNewRoman(1)
on input line 54.
LaTeX Font Info: No file T1TimesNewRoman(1).fd. on input line 54.
LaTeX Font Warning: Font shape `T1/TimesNewRoman(1)/m/n' undefined
(Font) using `T1/cmr/m/n' instead on input line 54.
Test code:
\documentclass[a4paper,14pt,russian,oneside,final]{extreport}
\usepackage{xltxtra}
\usepackage{courier}
\usepackage{lmodern}
\usepackage{tempora}
\usepackage{newtxmath}
\usepackage[T1,T2A]{fontenc}
\usepackage{polyglossia}
\defaultfontfeatures{Ligatures = TeX, Mapping = tex-text}
\setmainlanguage[babelshorthands = true]{russian}
\setotherlanguage{english}
\setmainfont{Arial}
\setmonofont{Courier New}
\setromanfont{Times New Roman}
\setsansfont{Arial}
\newfontfamily\cyrillicfont{Times New Roman}
\newfontfamily\cyrillicfontrm{Times New Roman}
\newfontfamily\cyrillicfontsf{Arial}
\newfontfamily\cyrillicfonttt{Courier New}
\newfontfamily\englishfont{Times New Roman}
\newfontfamily\englishfontrm{Times New Roman}
\newfontfamily\englishfontsf{Arial}
\newfontfamily\englishfonttt{Courier New}
\usepackage{mathtext}
\usepackage{extsizes}
\renewcommand{\rmdefault}{ftm}
\usepackage[final,hidelinks]{hyperref}
\renewcommand{\UrlFont}{\small\rmfamily\tt}
\usepackage[final]{listings}
\lstdefinestyle{C}{
xleftmargin = 1.25cm,
basicstyle = \fontencoding{T1}\small\ttfamily,
breaklines = true,
columns = fullflexible
}
\begin{document}
\section{Test section}
\url{http://stackoverflow.com/}
\begin{center}
\begin{lstlisting}[style=C]
#include <stdio.h>
int main()
{
printf("Hello, World!");
return 0;
}
\end{lstlisting}
\end{center}
\end{document}
newtxmath. Replace it with\usepackage{unicode-math}and\setmathfont{TeX Gyre Termes Math}. – Davislor Jul 01 '19 at 03:46newtxmathfix a lot of warnings:LaTeX Font Warning: Font shapeOML/ftm/m/n' undefined LaTeX Font Warning: Font shapeOMS/ftm/m/n' undefined LaTeX Font Warning: Font shapeOML/ftm/m/n' in size <29.86> not available LaTeX Font Warning: Font shapeOML/ftm/m/n' in size <14.93> not available LaTeX Font Warning: Font shapeOMS/ftm/m/n' in size <29.86> not available LaTeX Font Warning: Font shapeOMS/ftm/m/n' in size <14.93> not available– Armoken Jul 01 '19 at 13:21ftmthat you don’t have. This is breaking, so you’re working around it by loading a different font package over it. You should delete all the font commands you don’t actually need. – Davislor Jul 01 '19 at 14:30mathtext, because it was really useless, and remove\renewcommand{\rmdefault}{ftm}because it has no effect. Now I have onlyWarning: Font shapeT1/TimesNewRoman(1)/m/n' undefineddue lstlisting style, where used\small` size of font – Armoken Jul 04 '19 at 06:01polyglossia. They’re legacy 8-bit fonts, andpolyglossiabrings in Unicode. You end up setting the current font encoding to T1 when you’re using a Unicode font. Also redundant:\setromanfont.if you already have\setmainfont. – Davislor Jul 04 '19 at 08:43\fontencoding{T1}from settingbasicstyleoflstlistingand it disappeared. But now I have strange looking russian words, but as said in link addition oftexcl = trueto lst style fix it. – Armoken Jul 04 '19 at 16:13[Script=Cyrillic]after the definitions of\cyrillicfont,\cyrillicfontsf, etc. Delete the lines defining\romanfontand\cyrillicfontrm; they’re synonymous with the main font inpolyglossia. If you end up with Russian words that are intelligible, but look “strange” to you, that’s just what the font you selected looks like. You can pick another\cyrillicfont. – Davislor Jul 04 '19 at 17:21polyglossia, you don’t want to load any legacy font packages, too. If you’re loading Unicode, you don’t want to switch to any 8-bit encoding. – Davislor Jul 04 '19 at 18:26