# ! Missing \endcsname inserted once Miktex upgraded

I just upgrade Miktex and since then I receive this message and don't know what to do. I tried different possibilities without any success. A minimal example is not possible since to run the .tex file you need .sty file. Please help me and tell me how I can fix that problem. I can upload both .tex file and sty to a hosting site if needed.

(C:/Users/gateway/Documents/MesRecettes\recettes/boulanger/PainCitrouille.tex) ("C:\Program Files\MiKTeX 2.9\tex/latex/lm\t1lmr.fd") ("C:\Program Files\MiKTeX 2.9\tex/latex/marvosym\umvs.fd") ! Missing \endcsname inserted. \csname\endcsname l.111 ...tes/boulanger/PainCitrouille}{vide}{vide}

• well without code it is not possible to help. Feb 18, 2021 at 15:32
• What's in line 111 of the PainCitrouille.tex file? The error message refers to that line
– Ivan
Feb 18, 2021 at 15:35
• that is password protected ... Feb 18, 2021 at 16:13

You are using \lettrine and in its first argument your code inserts a \stepcounter command. That is dangerous as \lettrine uses this argument to calculate sizes. Move the \stepcounter command before the \lettrine:

\documentclass{article}
\usepackage{lettrine}
\begin{document}
\newcounter{init}
%this fails:
%\lettrine{\stepcounter{init}\theinit}{text} text

%this works:
\stepcounter{init}%
\lettrine{\theinit}{text} text
\end{document}


• Now, that I put setcounter before lettrine it worked fine, But I have a utf8 problem (! Package inputenc Error: Invalid UTF-8 byte sequence). The same LaTex file used to work properly in the past with this in the preamble. \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{babel} I don't know how to fix the problem. Feb 20, 2021 at 20:13
• if you have new problem, ask a new question. But better learn to make a minimal example. And check all the encodings of your files. Feb 20, 2021 at 20:39