1

how can I define a command so that in the preamble of my document I can have something like

\FigureFolder{name}

So that the following two commands will work

\newcommand{\FigureCaption}[3]{\begin{figure}[h!]\centering\includegraphics[scale=#1]{FIGURES/\FigureFolder/#2}\caption{#3}\label{#2}\end{figure}}

\newcommand{\FigureNoCaption}[2]{\begin{figure}[h!]\centering\includegraphics[scale=#1]{FIGURES/\FigureFolder/#2}\label{#2}\end{figure}}

Basically I want to associate with every of my LaTeX files a separate figure folder (to keep things a bit organised), and specify the name of that folder at the beginning of the document. Of course, I know I could just copy the \newcommand codes in the preamble but I prefer to put those commands in a .sty file and not have too many things at the top of my document.

Tom Bombadil
  • 40,123

0 Answers0