# using "\interval" causes undefined control sequence error

Why does this line causes undefined control sequence error?

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\title{Amsmath example}
\author{ShareLaTeX Templates}
\date{June 2017}

\begin{document}

\maketitle
\section{Introduction}

$c \in \interval[{3q/8, 7q/8})$

\end{document}

• Where is \interval defined? Mar 15, 2020 at 4:17
• None of the lines in the example code defines \interval (or causes it to be defined). So the error we get is pretty natural. Maybe you were hoping to use the command from tex.stackexchange.com/a/135529/35864? In that case you just forgot to include the relevant code in your preamble. Mar 15, 2020 at 6:31
• You can load the interval package, but the syntaxt uses two arguments Mar 15, 2020 at 12:03

Just reading the guide to the pag. 3, of interval package as written in the @Bernard's comment. http://ctan.mirror.garr.it/mirrors/CTAN/macros/latex/contrib/interval/interval.pdf. You can see also the bad result when you use \dfrac option.

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
\usepackage{interval}
\title{Amsmath example}
\author{ShareLaTeX Templates}
\date{\today}
\begin{document}
\maketitle
\section{Introduction}
$c \in \interval{3q/8}{7q/8}$
\vskip 1cm
$c \in \interval{\frac{3q}{8}}{\frac{7q}{8}}$
\vskip 1cm
$c \in \interval{\dfrac{3q}{8}}{\dfrac{7q}{8}}$
\end{document}