
最近、Lyx を新しい 2.1 バージョンにアップデートしました。しかし、ドキュメント (スペイン語) をコンパイルしようとすると、次の「未定義の制御シーケンス」エラーが発生します。
\StartBabelCommands
*{spanish}{captions}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
「設定 > 言語」で言語をスペイン語に設定し、また、\usepackage[spanish]{babel}
プリアンブルに を追加してみました。結果は出ませんでした。なぜこのようなことが起こるのか、本当にわかりません。以前の Lyx 2.0 では、この設定は完璧に機能していました。
編集: ここに LyX による LaTeX 出力があります (最小限の動作例)。このコードは上記のエラーを生成します: この LaTeX を LyX の外部でコンパイルしようとしましたが、うまくいきませんでした。
%% LyX 2.1.3 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[spanish]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{babel}
\addto\shorthandsspanish{\spanishdeactivate{~<>}}
\begin{document}
Una fórmula:
\[
E=mc^{2}
\]
\end{document}
ご協力いただきありがとうございます!
答え1
解決しました! 問題は、babel パッケージが古くなっていたことです。MikTeX 2.9 Updater (管理者) を実行して、すべてのパッケージを更新しました。その後、LyX を再構成すると、動作するようになりました。