1

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}
3
  • 2
    Where is \interval defined?
    – Johannes_B
    Mar 15, 2020 at 4:17
  • 3
    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.
    – moewe
    Mar 15, 2020 at 6:31
  • 1
    You can load the interval package, but the syntaxt uses two arguments
    – Bernard
    Mar 15, 2020 at 12:03

1 Answer 1

1

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}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.