Code: Select all
\include{ifthen}
...
\ifthenelse{\isEven{mycounter}}
{% code for even case
}
{% code for odd case
}
\newcommand{\isEven}[1]{
\ifthenelse{ ??? }{TRUE}{FALSE}
}
Code: Select all
\include{ifthen}
...
\ifthenelse{\isEven{mycounter}}
{% code for even case
}
{% code for odd case
}
\newcommand{\isEven}[1]{
\ifthenelse{ ??? }{TRUE}{FALSE}
}
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
Code: Select all
\documentclass{article}
\usepackage{ifthen}
\newcounter{myCounter}
\newcommand{\myExample}[1]%
{\ifthenelse{\isodd{\themyCounter}}{\Huge #1 \par}{\tiny #1 \par}}
\begin{document}
\stepcounter{myCounter}
\myExample{text}
\stepcounter{myCounter}
\myExample{text}
\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