0

I'm trying to compile some TeX files through a windows .bat script to avoid having to open them all on TeXWorks.

Compilation runs just fine on TeXWorks but when I'm runing luatex file.texon the cmd terminal, it outputs a pdf containing part of the .log file as it seems.


Context :

  • Running on windows 10 with MikTeX up to date (I'm more used to linux terminal but I had to get back to windows to be able to use some softwares).
  • I use LuaLaTeX to parse a csv file inside of LaTeX
  • File tree is the following, where 0_commands.tex contains my \newcommand statements and automatisation.tex contains the luacode (both of them are \input inside of the main .tex file). Graphismes is a folder containing pdf backgrounds.
0_commands.tex
automatisation.tex
carte_menu.aux
carte_menu.log
carte_menu.pdf
carte_menu.tex
colour_profiles.tex
Graphismes

Here is the command prompt result. I don't understand why TeXWorks is running just fine while compiling through window's terminal is going wrong...

C:\Users\etien\Documents\Entreprise_2020\Abonnements\Epicurien_prototypage\tex>luatex carte_menu.tex
This is LuaTeX, Version 1.12.0 (MiKTeX 20.6.29)
 restricted system commands enabled.
(./carte_menu.tex
! Undefined control sequence.
l.23 \documentclass
                 {article}
! Undefined control sequence.
l.26 \usepackage
              [T1]{fontenc}
! Undefined control sequence.
l.27 \usepackage
              [french]{babel}
! Undefined control sequence.
l.29 \usepackage
              {newunicodechar}
! Undefined control sequence.
l.30 \newunicodechar
                  {€}{\texteuro}
! Undefined control sequence.
l.30 \newunicodechar{€}{\texteuro
                                 }
! Undefined control sequence.
l.49 \usepackage
              [paperwidth=43cm,paperheight=30.7cm,total={41cm, 28.7cm}]{geom...

! Undefined control sequence.
l.53 \usepackage
              {eso-pic,graphicx}
! Undefined control sequence.
l.54 \graphicspath
                {{./Graphismes/}}%dossier des graphismes
! Undefined control sequence.
l.64 \newcommand
              {\ColG}{97mm}%largeur colonne gauche
! Undefined control sequence.
l.64 \newcommand{\ColG
                    }{97mm}%largeur colonne gauche
! Undefined control sequence.
l.65 \newcommand
              {\ColM}{194mm}%largeur colonne milieu
! Undefined control sequence.
l.65 \newcommand{\ColM
                    }{194mm}%largeur colonne milieu
! Undefined control sequence.
l.66 \newcommand
              {\ColD}{97mm}%largeur colonne droite
! Undefined control sequence.
l.66 \newcommand{\ColD
                    }{97mm}%largeur colonne droite
! Undefined control sequence.
l.67 \newcommand
              {\ColH}{260mm}%hauteur toutes colonnes
! Undefined control sequence.
l.67 \newcommand{\ColH
                    }{260mm}%hauteur toutes colonnes
! Undefined control sequence.
l.68 \newcommand
              {\Gap}{1cm}
! Undefined control sequence.
l.68 \newcommand{\Gap
                   }{1cm}
! Undefined control sequence.
l.69 \setlength
             \parindent{0pt}
! Missing number, treated as zero.
<to be read again>
{
l.69 \setlength\parindent{
                        0pt}
! Illegal unit of measure (pt inserted).
<to be read again>
{
l.69 \setlength\parindent{
                        0pt}
! Undefined control sequence.
l.79 \title
         {}
! Undefined control sequence.
l.80 \author
          {}
! Undefined control sequence.
l.81 \date
        {}
! Undefined control sequence.
l.91 \usepackage
              {luacode}
(./automatisation.tex
! Undefined control sequence.
l.5 \usepackage
             {stringstrings}
! Undefined control sequence.
l.6 \usepackage
             {ifthen}
! Undefined control sequence.
l.8 \usepackage
             {expl3}%répétition des commandes > utilisé pour définir com...

! Undefined control sequence.
l.9     \ExplSyntaxOn

! Undefined control sequence.
l.10     \cs
          _new_eq:NN \Repeat \prg_replicate:nn% Crée la commande \Repeat{<n...

! Missing $ inserted.
<inserted text>
$
<to be read again>
_
l.10     \cs_
           new_eq:NN \Repeat \prg_replicate:nn% Crée la commande \Repeat{<n...

! Undefined control sequence.
l.10     \cs_new_eq:NN \Repeat
                             \prg_replicate:nn% Crée la commande \Repeat{<n...

! Undefined control sequence.
l.10     \cs_new_eq:NN \Repeat \prg
                                 _replicate:nn% Crée la commande \Repeat{<n...

! Undefined control sequence.
l.11     \ExplSyntaxOff

! Missing $ inserted.
<inserted text>
$
<to be read again>
\par
l.12

! Undefined control sequence.
l.17 \begin
         {luacode*} -- CVS API: http://nocurve.com/simple-csv-read-and-write...

! Missing $ inserted.
<inserted text>
$
<to be read again>
^
l.20      local matchfunc = string.gmatch(str, "([^
                                                 "..sep.."]+)")
! Missing $ inserted.
<inserted text>
$
<to be read again>
\par
l.27


Overfull \hbox (233.88812pt too wide) in paragraph at lines 17--27
\tenrm fields= lo-cal match-func = string.gmatch(str, "([$[][]\teni ::sep::\ten
rm "]+)")\teni ifnotmatchfuncthenreturn[]endforstrinmatchfuncdotable:insert\ten
rm (\teni fields; str\tenrm )\teni endreturnfieldsend$ |
! You can't use `macro parameter character #' in horizontal mode.
l.36             for i=1,#
                        fields do
[1{C:/Users/etien/AppData/Local/MiKTeX/pdftex/config/pdftex.map}]))
(see the transcript file for additional information)<C:/Users/etien/AppData/Loc
al/Programs/MiKTeX/fonts/type1/public/amsfonts/cm/cmmi10.pfb><C:/Users/etien/Ap
pData/Local/Programs/MiKTeX/fonts/type1/public/amsfonts/cm/cmmi7.pfb><C:/Users/
etien/AppData/Local/Programs/MiKTeX/fonts/type1/public/amsfonts/cm/cmr10.pfb><C
:/Users/etien/AppData/Local/Programs/MiKTeX/fonts/type1/public/amsfonts/cm/cmr7
.pfb>
Output written on carte_menu.pdf (1 page, 50393 bytes).
Transcript written on carte_menu.log.
3
  • 4
    you should run lualatex, not luatex. Aug 10, 2020 at 15:11
  • The error is as Ulrike says but \usepackage[T1]{fontenc} is almost certainly wrong for luatex, that is using legacy 8bit encodings designed for pdftex, it is best tu use teh default Unicode encoding with lualatex and xelatex. Aug 10, 2020 at 16:12
  • Hahah, runing lualatex worked ... i feel so bad X-D
    – Etsaf
    Aug 11, 2020 at 12:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.