0

How do I change the second item (the equation with cases) in the list so - the label (b) is vertically aligned with the lhs of the equation, - the equation in (b) is left aligned with the start of equations in the list, and - there isn't a blank line before the (b) equation begins?

While similar to the question Alignment for Equations with Numbering, Align Number from Enumerate with Question, and Displaying an Equation in a List, I am unable to figure out how to use either minipage or parbox to get alignments right.

I include my output, my code, and a (fuzzy) picture of the exercise I am trying to mimic.

My output.

\documentclass[11pt]{amsart}
\usepackage{mathtools}
\usepackage{enumitem}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor} % floor function fences
\begin{document}
Prove that the greatest-integer function, $\floor{x}$, has the properties indicated.
\begin{enumerate}[label=(\alph*)]
    \item $\floor{x + n} = \floor{x} + n,$ for every integer $n$.
    \item \[ 
        \floor{-x} = \begin{cases}
            - \floor{x} & \text{if } x \text{ is an integer}, \\
            - \floor{x} -1 & \text{otherwise.}
        \end{cases} 
        \]
    \item $\floor{x+y} = \floor{x} + \floor{y} \qquad \text{or} \qquad \floor{x} + \floor{y} +1$.
    \item $\floor{2x} = \floor{x} + \floor{x + \frac{1}{2}}$
    \item $\floor{3x} = \floor{x} + \floor{x + \frac{1}{3}} + \floor{x + \frac{1}{3}}$
\end{enumerate}
\end{document}

Original exercise from Apostol.

0

2 Answers 2

3

In this case, i.e. in the case of an equation without label, it is very easy. EDIT Comments by @SandyG and @ HenkMetselaar built in.

\documentclass[11pt]{amsart}
\usepackage{mathtools}
\newcommand{\SandyFloor}[1]{\ensuremath{\left\lfloor#1\right\rfloor}}
\usepackage{enumitem}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor} % floor function fences
\begin{document}
Prove that the greatest-integer function, $\floor{x}$, has the properties indicated.
\begin{enumerate}[label=(\alph*)]
    \item $\floor{x + n} = \floor{x} + n,$ for every integer $n$.
    \item $\displaystyle
        \floor{-x} = \begin{cases}
            - \floor{x} & \text{if } x \text{ is an integer}, \\
            - \floor{x} -1 & \text{otherwise.}
        \end{cases} 
        $
    \item $\floor{x+y} = \floor{x} + \floor{y} \qquad \text{or} \qquad \floor{x} + \floor{y} +1$.
    \item $\displaystyle\floor{2x} = \floor{x} + \SandyFloor{x + \frac{1}{2}}$.
    \item $\displaystyle\floor{3x} = \floor{x} + \SandyFloor{x + \frac{1}{3}} + \SandyFloor{x + \frac{2}{3}}$.
\end{enumerate}
\end{document}

enter image description here

5
  • You may wish to use \big\lfloor and \big\rfloor to get the floor to the bottom of the fractions.
    – Sandy G
    Dec 12, 2017 at 3:14
  • \floor{x + \frac{2}{3}} as last term in the last line. Dec 12, 2017 at 3:14
  • Yes, @HenkMetselaar. I have changed \floor to \floor* to get the better versions.
    – Bryan H-M
    Dec 12, 2017 at 3:28
  • Thank you, @marmot, Such a simple change! Not only did I change \floor to \floor* to get the better fence-size, I've also added a few points to the spacing between items in the list with \itemsep=3pt to keep things from running into each other.
    – Bryan H-M
    Dec 12, 2017 at 3:55
  • For now I have taken out the \displaystyle command. If it weren't an exercise, I would probably use it, but the floor fences with the fractions seem too big with it.
    – Bryan H-M
    Dec 12, 2017 at 4:08
0

I have currently changed my code to the following. It doesn't enlarge the floor fences as much as @Sandy G suggested and as @marmot used in his example.

Prove that the greatest-integer function, $\floor{x}$, has the properties indicated.

\begin{enumerate}[label=(\alph*), itemsep=4pt]
    \item $\floor{x + n} = \floor{x} + n,$ for every integer $n$.
    \item $ 
        \floor{-x} = \begin{cases}
            - \floor{x} & \text{if } x \text{ is an integer}, \\
            - \floor{x} -1 & \text{otherwise.}
        \end{cases} 
        $
    \item $\floor{x+y} = \floor{x} + \floor{y} \qquad \text{or} \qquad \floor{x} + \floor{y} +1$.
    \item\label{exFormula1} $\floor{2x} = \floor{x} + \floor*{x + \frac{1}{2}}$.
    \item\label{exFormula2} $\floor{3x} = \floor{x} + \floor*{x + \frac{1}{3}} + \floor*{x + \frac{1}{3}}$.
\end{enumerate}

Great advice, thanks!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .