6

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}
  • @ChristianHupfer mathtools does not use expl3, it uses a self defined syntax similar to expl3, but not expl3 – daleif May 7 '17 at 19:22
  • @daleif: Hm, I was pretty sure that mathtools is defined with expl3. Ok, thanks – user31729 May 7 '17 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 '17 at 20:07
11

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

  • You're pace is increasing ;-) You were quicker... – user31729 May 7 '17 at 18:25
  • @ChristianHupfer I've seen too many DeclarePairedDelimiter and TeXBook Appendix G to be still so slow on these questions – Moriambar May 7 '17 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. – Tadeus Prastowo May 7 '17 at 18:38
  • @TadeusPrastowo you want to use the starred version, sorry, I did not write that. Corrected now – Moriambar May 7 '17 at 18:42

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.