8

The following MWE worked in December 2015 based on the archived PDF. But, it does not work today. Any idea?

\documentclass{article}
\usepackage{mathtools}

\DeclarePairedDelimiter{\eceil}{\left\lceil}{\right\rceil}

\begin{document}
$\eceil{\cdot}$
\end{document}
3
  • @ChristianHupfer mathtools does not use expl3, it uses a self defined syntax similar to expl3, but not expl3
    – daleif
    May 7, 2017 at 19:22
  • @daleif: Hm, I was pretty sure that mathtools is defined with expl3. Ok, thanks
    – user31729
    May 7, 2017 at 20:04
  • @ChristianHupfer Morten wrote mathtools at a time when expl3 was not particularly stable. Made a subset of the syntax and used it as a kind of test case. The next version will clean it up a bit, so there are no macro overlap
    – daleif
    May 7, 2017 at 20:07

1 Answer 1

15

You should not use left and right in the DeclarePairedDelimiter definition. Those are automatically used when you use the command defined there.

You would use the starred version for autoscaling, i.e. \left and \right like

So

\documentclass{article}
\usepackage{mathtools}

\DeclarePairedDelimiter{\eceil}{\lceil}{\rceil}

\begin{document}
$\eceil{\cdot}$\\[3ex]

$\eceil*{\frac{\frac{a}{c}}{\frac{b}{d}}}$
\end{document}

Should work fine and produce

enter image description here

4
  • 1
    You're pace is increasing ;-) You were quicker...
    – user31729
    May 7, 2017 at 18:25
  • 1
    @ChristianHupfer I've seen too many DeclarePairedDelimiter and TeXBook Appendix G to be still so slow on these questions
    – Moriambar
    May 7, 2017 at 18:29
  • I follow your suggestion in removing \left and \right. But, it does not work for $\eceil{\frac{\frac{a}{c}}{\frac{b}{d}}}$. For this, the use of \left and \right vertically scaled the \lceil and \rceil in the archived PDF from 2015. May 7, 2017 at 18:38
  • @TadeusPrastowo you want to use the starred version, sorry, I did not write that. Corrected now
    – Moriambar
    May 7, 2017 at 18:42

You must log in to answer this question.

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