0

Since I've left for quite long time Latex, I am actually facing a compiling problem with utf8 inside xcookybooky package (V1.5).

I am trying to type a simple recipe that I wrote in utf8 format.

Basically, I have one Tex file containing basic starting information and an appeal to another file that contains the recipe.

First file is :

\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}

This second file TestUTF8 is the simplest possible :

This is UTF8 Test.

\begin{recipe}
Test encoding
\end{recipe}

So the facts are :

  • If I compile the main file using [latin1]{inputenc} : eveyrthing works fine.
  • If I compile the main file using [utf8]{inputenc} instead of [latin1]{inputenc}: this is crashing.
  • If I compile the main file using [utf8]{inputenc} and comment \begin{recipe} and \end{recipe} : works fine.

My file seems to me written in Utf8 since TexMaker show me in bottom right corner that encoding.

If anyone could help, I would appreciate.

Thanks

2
  • 2
    Show a complete example, not only a snippet. Commented Nov 30, 2019 at 21:04
  • Any suggestion or idea according to this full example ?
    – Mathieu
    Commented Dec 7, 2019 at 15:20

1 Answer 1

1

xcookybooky.sty is latin1 encoded, and it contains non-ascii chars which should then be used in headers. This chars are invalid in a utf8 document.

You can reset the definitions in your utf8 file. Then it should compile:

\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}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .