"cases" command in f1000Research journal

Viewed 24

I am writing my paper in the F1000journal template. When I want to use "cases" for defining a piecewise function, it shows something like a table. Here's f1000research link and these are the command section of the template

\documentclass[10pt,a4paper]{article}
\usepackage{f1000_styles}

%% Default: numerical citations
\usepackage[numbers]{natbib}

%% Uncomment this lines for superscript citations instead
% \usepackage[super]{natbib}

%% Uncomment these lines for author-year citations instead
% \usepackage[round]{natbib}
% \let\cite\citep

\begin{document}
\pagestyle{fancy}

I am writing the following equation

f(n) = \begin{cases}
  n/2  & n \text{ is even} \\
  3n+1 & n \text{ is odd}
\end{cases}

enter image description here

1 Answers

The problem seems to be the rowcolours your template is setting

\documentclass[10pt,a4paper]{article}

\usepackage{f1000_styles}
%% Default: numerical citations
\usepackage[numbers]{natbib}

%% Uncomment this lines for superscript citations instead
% \usepackage[super]{natbib}

%% Uncomment these lines for author-year citations instead
% \usepackage[round]{natbib}
% \let\cite\citep

\rowcolors{2}{}{}

\begin{document}
\pagestyle{fancy}


\begin{equation}
f(n) = \begin{cases}
  n/2  & n \text{ is even} \\
  3n+1 & n \text{ is odd}
\end{cases}
\end{equation}

\end{document}

enter image description here

Related