I'm trying to get siunitx working. For some reason I keep getting this error:
! Missing = inserted for \ifnum.
<to be read again>
-
l.3 \begin
{document}^^M
I have tried a minimal document to make sure it is not some kind of compatibility issue. And I get that same error in the most minimal document possible.
I'm using pdfLaTeX to compile, and have tried both from TeXWorks and from bash. I'm using TeXLive, if that matters. I have also tried reinstalling siunitx, l3packages, and l3kernel. There was an issue with l3kernel before this, due to an apparently old version. But all three packages are now up to date. I've also reinstalled expl3 while trying to debug the original issue.
My minimal document is:
\documentclass{article}
\usepackage{siunitx}
\begin{document}
\end{document}
The output I get is:
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./untitled-2.tex
LaTeX2e <2016/02/01>
Babel <3.9q> and hyphenation patterns for 81 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/home/<name>/texmf/tex/latex/siunitx/siunitx.sty
(/home/<name>/texmf/tex/latex/l3kernel/expl3.sty
(/home/<name>/texmf/tex/latex/l3kernel/expl3-code.tex)
(/home/<name>/texmf/tex/latex/l3kernel/l3pdfmode.def))
(/home/<name>/texmf/tex/latex/l3packages/xparse/xparse.sty)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/share/texlive/texmf-dist/tex/latex/tools/array.sty)
(/home/<name>/texmf/tex/latex/l3packages/l3keys2e/l3keys2e.sty)
(/usr/share/texlive/texmf-dist/tex/latex/beamer/translator/translator.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/latex/beamer/translator/translator-language-
mappings.tex)))
! Missing = inserted for \ifnum.
<to be read again>
-
l.3 \begin
{document}^^M
?
Does anyone have any idea what might be going wrong here?
\listfilesto your input and 'go past' the errors to get aFile listin the.logfile? If so, that list would be handy as an edit. If you can't, what happens if you loadexpl3,amstextandtranslator? As you say in the question, this looks like a version issue, but it's not one I recognise. – Joseph Wright Mar 22 '18 at 07:06