두 번째 .tex 파일의 \input이 포함된 정의되지 않은 제어 시퀀스

두 번째 .tex 파일의 \input이 포함된 정의되지 않은 제어 시퀀스

이 코드를 컴파일하려고 합니다.

\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}

\figz 명령은 {Commands.tex}에서 왔으며 명령은 다음과 같이 정의됩니다.

%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}
}

이 명령을 컴파일하려고 할 때마다 "정의되지 않은 제어 시퀀스" 오류가 발생합니다. 가장 이상한 부분은 이전 문서 몇 개에서 정확히 동일한 명령을 사용했는데 이 문제가 발생하지 않았다는 것입니다. 오늘부로 그것들을 정리할 수 있습니다. "Commands.tex"에 정의된 \figi 명령은 어떤 오류도 보고하지 않습니다.

James Yu 확장 프로그램의 LaTex Workshop과 함께 VScode를 사용하고 있습니다.

오류가 어디서 발생하는지에 대한 아이디어가 있습니까?

답변1

조금 찾아보니 파일 \usepackage{subfig}에 가 포함되어 있지 않다는 것을 깨달았습니다 Preamble.tex. 이제 문제가 해결되었습니다.

관련 정보