Estou tentando compilar esse código
\documentclass[a4paper, 11pt]{article}
\input{Preambule.tex}
\input{Commands.tex}
\begin{document}
%\maketitle
\begin{center}
\Large \WorkTitle \\
\Large \today
\end{center}
%\tableofcontents
\section{Introduction}
\figz{Pictures/mx.png}{4cm}{lab1}{Pictures/mx.png}{4cm}{lab2}{big cap}{fig:mux}
\figi{Pictures/mx.png}{8cm}{label}
\end{document}
O comando \figz vem de {Commands.tex} o comando é definido como segue:
%Simple figure
\newcommand{\figi}[3]{
\begin{figure}[!ht]
\begin{center}
\includegraphics[width=#2]{#1}
\end{center}
\caption{\label{#1}#3}
\end{figure}
}
%two figures side by side
%inputs
% #1 figpath1 // #2 fig1 size // #3 labelfig1
% #4 figpath2 // #5 fig2 size // #6 labelfig2
% #7 fig lgd // #8 fig ref
\newcommand{\figz}[8]{
\begin{figure}[!ht]
\centering
\subfloat[\centering #3]{{\includegraphics[width=#2]{#1} }}%
\qquad
\subfloat[\centering #6]{{\includegraphics[width=#5]{#4} }}%
\caption{#7}%
\label{#8}%
\end{figure}
}
Sempre que tento compilar este comando, recebo o erro "sequência de controle indefinida". A parte mais estranha é que tenho usado exatamente o mesmo comando em alguns documentos mais antigos e nunca tive esse problema. Posso compilá-los a partir de hoje. O comando \figi definido em "Commands.tex" não reporta nenhum erro.
Estou usando o VScode com a extensão LaTex Workshop da James Yu.
Alguma idéia de onde vem o erro?
Responder1
Depois de procurar um pouco, percebi que não estava incluindo \usepackage{subfig}
no meu Preamble.tex
arquivo. O problema agora está resolvido...