I'm compiling the following MWE with LuaLaTeX in an updated TexLive 2017 installation on Ubuntu:
% !TeX program=lualatex
\documentclass[a4paper,12pt,twoside=semi,openright]{scrbook}
\usepackage{polyglossia}
\setmainlanguage{german}
\setotherlanguage{english}
\usepackage{fontspec}
\usepackage{subfig}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{bm}
\renewcommand{\vec}[1]{\bm{#1}}
\begin{document}
\begin{align}
\vec{x} = 1
\end{align}
\end{document}
Here's what I get:
The desired output would of course be x=1.
Note that this fails only when using \setmainlanguage{german}
. It also works fine using pdfLaTeX and babel.
*File List*
scrbook.cls 2017/09/07 v3.24 KOMA-Script document class (book)
scrkbase.sty 2017/09/07 v3.24 KOMA-Script package (KOMA-Script-dependent basi
cs and keyval usage)
scrbase.sty 2017/09/07 v3.24 KOMA-Script package (KOMA-Script-independent ba
sics and keyval usage)
keyval.sty 2014/10/28 v1.15 key=value parser (DPC)
scrlfile.sty 2017/09/07 v3.24 KOMA-Script package (loading files)
tocbasic.sty 2017/09/07 v3.24 KOMA-Script package (handling toc-files)
scrsize12pt.clo 2017/09/07 v3.24 KOMA-Script font size class option (12pt)
typearea.sty 2017/09/07 v3.24 KOMA-Script package (type area)
polyglossia.sty 2015/03/25 v1.42.4 Alternative to Babel for XeLaTeX and LuaLa
TeX
etoolbox.sty 2017/01/02 v2.4 e-TeX tools for LaTeX (JAW)
makecmds.sty 2009/09/03 v1.0a extra command making commands
xkeyval.sty 2014/12/03 v2.7a package option processing (HA)
xkeyval.tex 2014/12/03 v2.7a key=value parser (HA)
fontspec.sty 2017/11/09 v2.6g Font selection for XeLaTeX and LuaLaTeX
xparse.sty 2017/11/14 L3 Experimental document command parser
expl3.sty 2017/11/14 L3 programming layer (loader)
expl3-code.tex 2017/11/14 L3 programming layer
l3pdfmode.def 2017/03/18 v L3 Experimental driver: PDF mode
fontspec-luatex.sty 2017/11/09 v2.6g Font selection for XeLaTeX and LuaLaTeX
fontenc.sty
tuenc.def 2017/04/05 v2.0i Standard LaTeX file
fontspec.cfg
ifluatex.sty 2016/05/16 v1.4 Provides the ifluatex switch (HO)
ifxetex.sty 2010/09/12 v0.6 Provides ifxetex conditional
luatexbase.sty 2015/10/04 v1.3 luatexbase interface to LuaTeX
ctablestack.sty 2015/10/01 v1.0 Catcode table stable support
gloss-german.ldf polyglossia: module for german
babelsh.def 2013/04/30 Babel common definitions for shorthands
Taken verbatim from babel.def (2013/04/15 v3.9e)
gloss-english.ldf polyglossia: module for english
subfig.sty 2005/06/28 ver: 1.3 subfig package
caption.sty 2016/02/21 v3.3-144 Customizing captions (AR)
caption3.sty 2016/05/22 v1.7-166 caption3 kernel (AR)
amsmath.sty 2017/09/02 v2.17a AMS math features
amstext.sty 2000/06/29 v2.01 AMS text
amsgen.sty 1999/11/30 v2.0 generic functions
amsbsy.sty 1999/11/29 v1.2d Bold Symbols
amsopn.sty 2016/03/08 v2.02 operator names
amssymb.sty 2013/01/14 v3.01 AMS font symbols
amsfonts.sty 2013/01/14 v3.01 Basic AMSFonts support
bm.sty 2017/01/16 v1.2c Bold Symbol Support (DPC/FMi)
umsa.fd 2013/01/14 v3.01 AMS symbols A
umsb.fd 2013/01/14 v3.01 AMS symbols B
***********
ifluatex
package to make the document compilable with pdfLaTeX too and to conditionally load and configure the engine specific packages in a single\ifluatex
block. Cluttering commands based on the pickiness of the engine is therefore not what I was hoping for. – Christoph90 Nov 21 '17 at 15:43amsmath
,amssymb
, andbm
should always be loaded before bothfontspec
andpolyglossia
. – Mico Nov 21 '17 at 16:09