私はかなり長い間 Latex を離れていたので、実は xcookybooky パッケージ (V1.5) 内で utf8 のコンパイル問題に直面しています。
UTF8 形式で書いた簡単なレシピを入力しようとしています。
基本的に、基本的な開始情報を含む 1 つの Tex ファイルと、レシピを含む別のファイルへのアピールがあります。
最初のファイルは次のとおりです:
\documentclass[%
a4paper,
%twoside,
%12pt
11pt
]{article}
\usepackage[utf8]{inputenc}
%\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage[
%handwritten,
%myconfig,
nowarnings
]{xcookybooky}
\begin{document}
This is simple.
Les accents é ç à è fonctionnent correctement.
\include{Folder/TestUTF8}
\end{document}
この 2 番目のファイル TestUTF8 は可能な限り単純です。
This is UTF8 Test.
\begin{recipe}
Test encoding
\end{recipe}
つまり事実は次のようになります:
- :を使用してメイン ファイルをコンパイルすると、
[latin1]{inputenc}
すべて正常に動作します。 [utf8]{inputenc}
:の代わりにを使用してメイン ファイルをコンパイルすると、[latin1]{inputenc}
クラッシュします。- メイン ファイルを
[utf8]{inputenc}
コメント\begin{recipe}
と\end{recipe}
: を使用してコンパイルすると、正常に動作します。
TexMaker が右下隅にそのエンコードを表示するので、私のファイルは Utf8 で記述されているようです。
どなたか助けていただけると幸いです。
ありがとう
答え1
xcookybooky.sty
latin1 でエンコードされており、ヘッダーで使用する必要がある非 ASCII 文字が含まれています。この文字は、utf8 ドキュメントでは無効です。
utf8 ファイルの定義をリセットすることができます。その後、コンパイルできるはずです。
\documentclass[%
a4paper,
%twoside,
%12pt
11pt
]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage[nowarnings]{xcookybooky}
\IfLanguagePatterns{french}
{% French
\setHeadlines
{% translation
inghead = Ingrédients, %problem
prephead = Préparation, %problem
hinthead = Tuyau,
continuationhead = Suite,
continuationfoot = Suite page suivante,
portionvalue = Portions,
calory = Valeur calorifique
}
}{}
\begin{document}
This is simple.
Les accents é ç à è fonctionnent correctement.
This is UTF8 Test.
\begin{recipe}
Test encoding
\end{recipe}
%\include{Folder/TestUTF8}
\end{document}