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}
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- 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