The used package does not expand the value before testing whether it is a number. So you have to do the expansion yourself, e.g.
Code: Select all
\documentclass{article}
\newcommand{\isbn}{978-1-56619-909-4}
\newcommand{\ISBNoption}{}
\edef\ISBNoption{ISBN=\isbn}
\usepackage{ean13isbn}
\begin{document}
\expandafter\EANisbn\expandafter[\ISBNoption,SC5b]
\end{document}
or use another package like
Code: Select all
\documentclass{article}
%\usepackage[undo-recent-deprecations]{expl3}% Only needed with out-dated GS1 and up-to-date expl3
\newcommand{\isbn}{978-1-56619-909-4}
\usepackage{GS1}[2021/06/17]% Need at least GS1 version 23 (see note below).
\begin{document}
\GSSetup{module_width=.46mm}
\expandafter\EANBarcode\expandafter{\isbn}
\end{document}
Note:
GS1 before version 23 is not compatible with current version of
l3kernel. If you get an error about the usage of deprecated
\hbox_unpack_clear
, you have to activate loading
expl3
with option
undo-recent-deprecations
or—better!—update to
GS1 version 23 or newer