General ⇒ <argument> \??? ! LaTeX3 Error: Extra ) ignored.
<argument> \??? ! LaTeX3 Error: Extra ) ignored.
! Use of \??? doesn't match its definition.
<argument> \???
! LaTeX3 Error: Extra ) ignored.
l.22 ...0\Omega$, this value is the\ExxivPos{3300}
th of E24 family of resist...
If you say, e.g., `\def\a1{...}', then you must always
put `1' after `\a', since control sequence names are
made up of letters only. The macro here has not been
followed by the required stuff, so I'm ignoring it.
This is the test file I'm using.
\documentclass{article}
\usepackage[brazilian]{babel} % Suporte para Portugues do Brasil
\usepackage[utf8]{inputenc} % Permite acentuação automática para o Português do Brasil.
\usepackage{cmap} % Mapear caracteres especiais no PDF
\usepackage[T1]{fontenc} % Permite a hifenização correta em Português
\usepackage{amsmath,amssymb,amsthm,amsfonts}
\usepackage{xparse}
\usepackage{xfp}
\NewDocumentCommand \ExxivPos { m } {%
\def\myResNZ{\fpeval{10^(trunc(ln(#1)/ln(10)) - 1)}}%
\def\myResDS{\fpeval{#1 / \myResNZ)}}%
\def\myPtr{\fpeval{trunc(24*((ln(\myResDS)/ln(10)) - 1) + 1.5)}}%
\myPtr%
}%
\begin{document}
$R_S = 3300\Omega$, this value is the\ExxivPos{3300}th of E24 family of resistors.
\end{document}
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Ijon Tichy
- Posts: 640
- Joined: Mon Dec 24, 2018 10:12 am
<argument> \??? ! LaTeX3 Error: Extra ) ignored.
Code: Select all
\documentclass{article}\usepackage[main=brazilian,english]{babel} % Suporte para Portugues do Brasil\usepackage[utf8]{inputenc} % Permite acentuação automática para o Português do Brasil.\usepackage{cmap} % Mapear caracteres especiais no PDF\usepackage[T1]{fontenc} % Permite a hifenização correta em Português\usepackage{amsmath,amssymb,amsthm,amsfonts}\usepackage{xparse}\usepackage{xfp}\NewDocumentCommand \ExxivPos { m } {%\def\myResNZ{\fpeval{10^(trunc(ln(#1)/ln(10)) - 1)}}%\def\myResDS{\fpeval{#1 / \myResNZ}}% Here you've had an additional `)'\def\myPtr{\fpeval{trunc(24*((ln(\myResDS)/ln(10)) - 1) + 1.5)}}%\myPtr%}%\begin{document}\foreignlanguage{english}{% The text is english, so we temporary select this language.$R_S = 3300\Omega$, this value is the\ExxivPos{3300}th of E24 family of resistors.%}\end{document}
)
, which causes the ! LaTeX3 Error: Extra ) ignored
error.
<argument> \??? ! LaTeX3 Error: Extra ) ignored.

Next time I'll remember to mark the code and the foreign language, please forgive me for the inconvenience.
Jether