2

Aim and Problem

Warning 1

User Ulrike Fischer proposed \babelfont{tt}{Latin Modern Mono} for this warning.

Package babel Warning: The following fonts are not babel standard families:
(babel) * \ttfamily / lmtt
(babel) [lmmono10-regular]:
(babel) There is nothing intrinsically wrong with it, but
(babel) 'babel' will no set Script and Language. Consider
(babel) defining a new family with \babelfont.
(babel) Reported on input line 2.

Warning 2

Package fontspec Warning: Font "NotoSans" does not contain requested Script
(fontspec) "Simplified".

Warning 3

Package fontspec Warning: Language 'Chinese Simplified' not available for font
(fontspec) 'NotoSans' with script 'CustomDefault'.

(Potentially) Needed Steps to Reproduce the Problem

  • I use TeXlive (up-to-date) on Windows and compile with LuaLaTeX..
  • I downloaded the notocjksc fonts from https://www.ctan.org/pkg/notocjksc and put them in C:\texlive\2019\texmf-dist\fonts\opentype\google.
  • I also downloaded noto fonts from https://www.ctan.org/pkg/noto and put them in the same path as notocjksc, see screenshot.
  • Problem 2: It works but, I do not know which places (aka folders / paths) I can put fonts and if the folder name is relevant at all?! Can I also put it in C:\texlive\texmf-local\fonts for example? (Is there a logic or manual that I have to follow?).
  • I opened the TeXlive Shell and generated the Font-Maps, see screenshot.

enter image description here enter image description here enter image description here enter image description here

Problem 3: I do not understand why \babelfont[chinese-simplified]{rm}{Noto Serif CJK SC} works. When I open for example NotoSerifCJKsc-Black.otf then there is no Noto Serif CJK SC -- it is a Noto Serif CJK SC Black instead.


\documentclass{article}

% babel-package with option *english* as the document's default language
\usepackage[english]{babel}

% babelprovide for *english* (default language of the document)
\babelprovide[
    main,
    import,
    language = Default]
    {english}

% babelprovide for *chinese-simplified* (for some single words throughout the document)
\babelprovide[
    import,
    language = Chinese Simplified]
    {chinese-simplified}

%% Choose actual fonts for different font variants.
% Font for font variant "rm" (Serif)
\babelfont{rm}{Noto Serif}
% Font for font variant "sf" (Sans Serif --> Without Serif)
\babelfont{sf}{Noto Sans}
% Font for font variant "chinese-simplified"
\babelfont[chinese-simplified]{rm}{Noto Serif CJK SC}

\begin{document}

\begin{itemize}
\item English.
\item \foreignlanguage{chinese-simplified}{汉语。} (Chinese)
\end{itemize}   

\end{document}

Related

Remark

  • I am in China timezone, so I am a couple of hours in the future for some of you. Keep that in mind when my replies may seem late :).

  • I used my fair share of LaTeX in the past years but when it comes to fonts I am really a bloody beginner :). So sorry of the questions seems "stupid" or not well-enough researched.

  • 2
    Add \babelfont{tt}{Latin Modern Mono}. – Ulrike Fischer Nov 25 '19 at 14:53
  • @UlrikeFischer Thanks! I was still updating the question (three warnings). Using your hint removed one of them! There is also NotoSansMono as I see it -- but I can't use it instead. – Dr. Manuel Kuehner Nov 25 '19 at 15:02
  • @UlrikeFischer Going to bed now (it's 23:09 local time), so I won't be able to reply shortly. – Dr. Manuel Kuehner Nov 25 '19 at 15:09
  • 1
    There is no need to load english twice. See https://tex.stackexchange.com/questions/513618/howto-multilanguage-babel#513667 . See also more relevant links in https://github.com/latex3/babel/wiki/Useful-links-to-tex.stackexchange , as well as https://tex.stackexchange.com/questions/511079/why-babel-produce-warnings-about-rmfamily-and-ttfamily-with-babelfont/511296#511296 . – Javier Bezos Nov 25 '19 at 15:24
  • 1
    @JavierBezos Thanks for the hints. But I get even more warnings then :(. I am off to bed and can't try more deeply. – Dr. Manuel Kuehner Nov 25 '19 at 15:40
  • Warnings are not errors. They just warn about a potential problem. If everything is fine, then you can ignore them. As the warning about the fonts say, “There is nothing intrinsically wrong with this warning”. If you don't like the warning, you may turn off with the package option silent, or use the package silence. – Javier Bezos Nov 25 '19 at 16:13

0 Answers0