- I want to write
pinyin(Latin characters that are used for Chinese) in a LuaLaTeX document. - I get the error, that is stated below.
- According to the babel manual (Version 3.32, up to date) the
pinyinoption should work. - I updated my MiKTeX installation to make sure, that I do not make a rookie mistake.
- Googleing brings some hits like https://packages.debian.org/jessie/amd64/latex-cjk-chinese/filelist that include
/usr/share/texmf/tex/generic/babel/pinyin.ldf. - I also did not find anything in the babel repository: https://github.com/latex3/babel.
! Package babel Error: Unknown option `pinyin'. Either you misspelled it (babel) or the language definition file pinyin.ldf was not found
Question: Where do I get pinyin.ldf and should it be installed automatically when I have a full MiKTeX installation?
\documentclass{article}
\usepackage[pinyin]{babel}
\begin{document}
Pīnyīn.
\end{document}
Update 1
With the help of user @egreg I found the ldf file, here's the content of pinyin.ldf:
% This is the file pinyin.ldf of the CJK package
% for hyphenating Chinese pinyin syllables.
%
% We use the latin-1 character code for `umlaut u' (0xfc). Additionally,
% the quote character "'" is used in its standard sense (resolving syllabic
% ambiguities).
%
% created by Werner Lemberg <wl@gnu.org>
%
% Version 4.8.4 (18-Apr-2015)
% Copyright (C) 1994-2015 Werner Lemberg <wl@gnu.org>
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program in doc/COPYING; if not, write to the Free
% Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
% MA 02110-1301 USA
\ProvidesLanguage{pinyin}
[CJK 4.8.4 pinyin support for the babel system]
\LdfInit{pinyin}{captionspinyin}
\ifx\l@pinyin\@undefined
\@nopatterns{pinyin}
\adddialect\l@pinyin0
\fi
\def\pinyinhyphenmins{11}
\def\captionspinyin{}
\def\datepinyin{}
\initiate@active@char{"}
\addto\extraspinyin{\languageshorthands{pinyin}}
\addto\extraspinyin{\bbl@activate{"}}
\addto\extraspinyin{\babel@save\"\umlautlow}
\addto\extraspinyin{%
\babel@savevariable{\lccode"27}%
\lccode"27 "27}
\addto\noextraspinyin{\umlauthigh}
\declare@shorthand{pinyin}{"u}{\textormath{\"{u}}{\ddot u}}
\declare@shorthand{pinyin}{"U}{\textormath{\"{U}}{\ddot U}}
\def\mdqon{\shorthandon{"}}
\def\mdqoff{\shorthandoff{"}}
\ldf@finish{pinyin}
\endinput
Update 2
Bug report for MiKTeX: https://github.com/MiKTeX/miktex-packaging/issues/110 (it was closed because my report was not good enough), 2nd try: https://github.com/MiKTeX/miktex-packaging/issues/111.

cjkpackage. It's supposed to be in TeXLive and MiKTeK. And the file is here on CTAN. – David Purton Jul 16 '19 at 01:26pinyin.ldfis not there! – David Purton Jul 16 '19 at 01:30cjkpackage of TeX Live. It's apparently bad packaging in MiKTeX. – egreg Jul 16 '19 at 09:18