tags:

views:

40

answers:

1

I want to generalize a template I have and one of the items is setting a few variables before generating a PDF to send to someone.

In my Makefile I have set:

${OBJS}/main.pdf: main.tex ${DEPS}
 pdflatex -output-directory=${OBJS} "\def\recipiant{${RECIPIANT}} \def\revision{${REVISION}} \include{main}"

Though I would like to not worry about those variables for reviews.. I figured I could do something like \ifdef but it isn't working out... any ideas how I can generalize this template conditionally?

\ifdef\recipiant
                \fancyfoot[CE,CO]{prepared for \recipiant \ (revision \revision) }
\else
                \fancyfoot[CE,CO]{REVIEW}
\fi
A: 

I use \ifx to achieve this

\ifx\recipiant\undefined
    \fancyfoot[CE,CO]{REVIEW}
\else
    \fancyfoot[CE,CO]{prepared for \recipiant \ (revision \revision) }
\fi
Niall Murphy