3

I'm using Texlive 2015 on Fedora 25, and since the update compiling with Luatex doesn't work. I do use TexStudio but I replicated the error in TexMaker and with the CLI.

Basically, it looks like Lualatex can't load the package microtype. I post here what seems to be the relevant part of the log file:

 ! Undefined control sequence.
<recently read> \RequireLuaModule 

l.56 \RequireLuaModule
                    {microtype}
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.


! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.56 \RequireLuaModule{m
                      icrotype}
You're in trouble here.  Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

It may be a distro-specific problem but it doesn't work.

When clicking on the log file in TexStudio it leads me to microtype-luatex.def file, where it points to the line:

\RequireLuaModule{microtype}

The error is followed by a list of errors similar to this one

Package microtype Warning: Could not parse font size `12'
(microtype)                in font set `basicmath' on input line 74.

[\directlua]:1: attempt to index global 'microtype' (a nil value)
stack traceback:
    [\directlua]:1: in main chunk.
\MT@ifdimen ...MT@lua {microtype.if_dimen([[#1]])}
                                                  \endcsname 
l.74    }

The lua interpreter ran into a problem, so the
remainder of this lua chunk will be ignored.

I can add my minimal working exemple and my preamble.

Here are my test file:

% classe de document
\documentclass[a4paper,12pt,onecolumn,oneside]{scrartcl}
% appel au préambule
\input{preambule.tex}
% en-têtes et pieds de pages
%
% réglages hyperref
\hypersetup{
    breaklinks=true,         %permet le retour à la ligne dans les liens trop longs
    pdfpagemode = UseOutlines,% afficher le pdf en plein écran
    unicode=true,          % non-Latin characters in Acrobat’s bookmarks
    pdftoolbar=true,        % show Acrobat’s toolbar?
    pdfmenubar=true,        % show Acrobat’s menu?
    pdffitwindow=false,     % window fit to page when opened
    pdfstartview={FitH},    % fits the width of the page to the window
    pdftitle={Test},    % title
    pdfauthor={NT},     % author
    pdfsubject={test},   % subject of the document
    pdfcreator={Moi},   % creator of the document
    pdfkeywords={test}, % list of keywords
    pdfnewwindow=true,      % links in new window
}
%
%appel au titre et à l'auteur
\title{Test}
\author{Moi}
%
%document
\begin{document}
% appel au titre
\maketitle
%
yyy
\end{document}

and my preamble:

% préambule commun
%
% encodage caractères
\usepackage{luatex} %   Compiler avec LuaLaTeX
%
% choix de la police
\usepackage{libertine}
%
  \usepackage{fontspec}
  \defaultfontfeatures{Ligatures=TeX} % To support LaTeX quoting style
%  \setmainfont{libertine}
  \usepackage{pdftexcmds}
  \makeatletter
  \let\pdfstrcmp\pdf@strcmp
  \let\pdffilemoddate\pdf@filemoddate
  \makeatother
% langue
\usepackage[german,english,latin,french]{babel}
\usepackage[autolanguage]{numprint}
% microtypographie
\usepackage{microtype}
\microtypecontext{kerning=french}   % réglage pour le français
%\usepackage[a4paper,landscape]{geometry}
\usepackage[official]{eurosym}  %   symbole monnaie euro
% bibliographie
\usepackage{natbib}
% maths
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{framed}
\usepackage[amsmath,framed,thmmarks,hyperref]{ntheorem}
% unités SI
\usepackage{siunitx}
\sisetup{locale = FR,
    detect-all = true,
    separate-uncertainty, % écriture des incertitudes
    list-final-separator = { \translate{and} },
    range-phrase = { \translate{to (numerical range)} },
    inter-unit-separator={}\cdot{}
}
% espaces réguliers
\usepackage{xspace}
% En-têtes et pieds de page
\usepackage{scrlayer-scrpage}
% multicolonnes
\usepackage{multirow}
% centrage
\usepackage{array}
% tableaux soignés
\usepackage{booktabs}
\usepackage{tabularx}
% tableaux longs
%\usepackage{longtable}
\usepackage{xtab}
% import de données externes pour créer un tableau
\usepackage{pgfplotstable}
\usepackage{colortbl}
% graphiques et images
\usepackage[section]{placeins}
\usepackage{graphicx}
\usepackage{wrapfig}
%\usepackage{subcaption}
\usepackage{varioref}
\usepackage{tikz}
\usepackage{float}
\usetikzlibrary{shapes,decorations.pathmorphing}
% Define box and box title style
\tikzstyle{mybox} = [draw=red, fill=black!10, very thick,
    rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]
\tikzstyle{fancytitle} =[fill=red, text=white]
%
\usepackage{svg}
% usage de la couleur
\usepackage[usenames,dvipsnames,svgnames,x11names,table]{xcolor}
% Creative Commons licenses
\usepackage{ccicons}
% usage de la couleur
\usepackage[usenames,dvipsnames,svgnames,x11names,table]{xcolor}
%\usepackage{asymptote}
% Dessin de circuits électriques
\usepackage[european,siunitx,smartlabels]{circuitikz}
% import et exécution de code python
\usepackage{python}
% chimie
\usepackage[version=3,arrows=pgf]{mhchem}
\usepackage{etex}
\usepackage{m-pictex,m-ch-en}
\usepackage{chemfig}
% numérotation des pages
\usepackage{lastpage}
% cadres avec logo
\usepackage[tikz]{bclogo}
% QCM
\usepackage{alterqcm}
% insérer url
\PassOptionsToPackage{hyphens}{url}\usepackage{hyperref}
% insérer faux texte
\usepackage{lipsum} 
4
  • Looks like a version issue to me: there were some changes between TL'15 and TL'16 in low-level Lua support. Can you edit in the full .log you get, in particular the file paths for the various files loaded?
    – Joseph Wright
    Commented Oct 22, 2016 at 9:54
  • I'm confused: Are you using TL15 or TL16? Commented Oct 22, 2016 at 14:28
  • @JosephWright I'd say there's something wrong with luatexbase (loaded by microtype), which aborts loading itself when \BeginCatcodeRegime is defined (which luatex.sty does), leaving \RequireLuaModule undefined. MNWE: \documentclass{article} \usepackage{luatex,luatexbase} \RequireLuaModule{foo}
    – Robert
    Commented Oct 22, 2016 at 14:29
  • I'm using TL16 as provided by Fedora 25. There are still problems wih some packages it seems since the KOMA classes give me errors too.
    – Nicolas T.
    Commented Oct 22, 2016 at 16:57

1 Answer 1

4

All amsmath packages should be loaded before fontspec. And all old font related stuff also before. However, for TL2016 the following works for me:

\documentclass[a4paper,12pt,onecolumn,oneside]{scrartcl}
\usepackage[official]{eurosym}  %   symbole monnaie euro
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{fontspec}
\usepackage{libertine}
\usepackage{microtype}
\microtypecontext{kerning=french}   % réglage pour le français
\usepackage{natbib}
\usepackage{pdftexcmds}
\makeatletter
\let\pdfstrcmp\pdf@strcmp
\let\pdffilemoddate\pdf@filemoddate
\makeatother
% langue
\usepackage[german,english,latin,french]{babel}
\usepackage[autolanguage]{numprint}
% microtypographie
%\usepackage[a4paper,landscape]{geometry}
\usepackage{framed}
\usepackage[amsmath,framed,thmmarks,hyperref]{ntheorem}
% unités SI
\usepackage{siunitx}
\sisetup{locale = FR,
    detect-all = true,
    separate-uncertainty, % écriture des incertitudes
    list-final-separator = { \translate{and} },
    range-phrase = { \translate{to (numerical range)} },
    inter-unit-separator={}\cdot{}
}
% espaces réguliers
\usepackage{xspace}
% En-têtes et pieds de page
\usepackage{scrlayer-scrpage}
% multicolonnes
\usepackage{multirow}
% centrage
\usepackage{array}
% tableaux soignés
\usepackage{booktabs}
\usepackage{tabularx}
% tableaux longs
%\usepackage{longtable}
\usepackage{xtab}
% import de données externes pour créer un tableau
\PassOptionsToPackage{xcolor}{usenames,dvipsnames,svgnames,x11names,table}
\usepackage{pgfplotstable}
\usepackage[section]{placeins}
\usepackage{graphicx}
\usepackage{wrapfig}
%\usepackage{subcaption}
\usepackage{varioref}
\usepackage{tikz}
\usepackage{float}
\usetikzlibrary{shapes,decorations.pathmorphing}
% Define box and box title style
\tikzstyle{mybox} = [draw=red, fill=black!10, very thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]
\tikzstyle{fancytitle} =[fill=red, text=white]
%
\usepackage{svg}
% usage de la couleur
\usepackage{ccicons}
\usepackage[european,siunitx,smartlabels]{circuitikz}
\usepackage{python}
\usepackage[version=3,arrows=pgf]{mhchem}
\usepackage{etex}
\usepackage{m-pictex,m-ch-en}
\usepackage{chemfig}
% numérotation des pages
\usepackage{lastpage}
% cadres avec logo
\usepackage[tikz]{bclogo}
% QCM
\usepackage{alterqcm}
% insérer url
\PassOptionsToPackage{hyphens}{url}
\usepackage{hyperref}
% insérer faux texte
\usepackage{lipsum} 
% réglages hyperref
\hypersetup{
    breaklinks=true,         %permet le retour à la ligne dans les liens trop longs
    pdfpagemode = UseOutlines,% afficher le pdf en plein écran
    unicode=true,          % non-Latin characters in Acrobat’s bookmarks
    pdftoolbar=true,        % show Acrobat’s toolbar?
    pdfmenubar=true,        % show Acrobat’s menu?
    pdffitwindow=false,     % window fit to page when opened
    pdfstartview={FitH},    % fits the width of the page to the window
    pdftitle={Test},    % title
    pdfauthor={NT},     % author
    pdfsubject={test},   % subject of the document
    pdfcreator={Moi},   % creator of the document
    pdfkeywords={test}, % list of keywords
    pdfnewwindow=true,      % links in new window
}
%
%appel au titre et à l'auteur
\title{Test}
\author{Moi}
%
%document
\begin{document}
    % appel au titre
    \maketitle
    %
    yyy
\end{document}
0

You must log in to answer this question.

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