6

I want to make an equation that use ceiling, and that's what I'm doing:

\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{mathtools}
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
\begin{equation}
\ceil[\big]{\frac{log{(1-P_{0})}}{log{(1-p)}}}
\end{equation}

The result is not as good as I want it:

Enter image description here

How do I make the ceiling cover the whole fractions?

6
  • Welcome to TeX.SX! Have you tried something other than \big?
    – TeXnician
    Apr 27, 2017 at 14:59
  • 1
    I'm voting to close this question because it was solved in the comments. Apr 27, 2017 at 15:07
  • 1
    you don't keep it for other people ?
    – elia
    Apr 27, 2017 at 15:08
  • 5
    @StefanPinnow don't close it as off-topic (because it is not). Either find the duplicate question that this must be or it is a valid question which even has been answered already…
    – cgnieder
    Apr 27, 2017 at 16:20
  • 1
    you also need a backslash on your \log(.) function. Apr 28, 2017 at 0:51

2 Answers 2

14

You should read some guides (starter guides) for LaTeX and math (especially about the sizes). With the knowledge about them you could easily adapt to this (\bigg):

ceiling

\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{mathtools}
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
\begin{document}
\begin{equation}
\ceil[\bigg]{\frac{\log{(1-P_{0})}}{\log{(1-p)}}}
\end{equation}
\end{document}
5
  • Thank you, yes I'm new to latex and i have dead line to follow that's why I had no time to adapt for this first.
    – elia
    Apr 27, 2017 at 15:04
  • 1
    @elia You're welcome. But as I already posted: The usual strategy to say thank you is to use the upvote or accept button (if it works for you).
    – TeXnician
    Apr 27, 2017 at 15:06
  • bro I know but i can't vote until 10 Min pass, I'll surly select your answer
    – elia
    Apr 27, 2017 at 15:07
  • 6
    Please, please change both instances of log to \log.
    – Mico
    Apr 27, 2017 at 16:49
  • 1
    @Mico Done. But the important part of the answer isn't the code, but the reference to starter guides ;)
    – TeXnician
    Apr 27, 2017 at 19:40
9

Very simple, you can work with the asterisk.

\documentclass{memoir}

\usepackage{amsmath,amsfonts,amssymb}
\usepackage{mathtools}
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}

\begin{document}

\begin{align}
    \ceil*{\frac{\log (1-P_{0})}{\log (1-p)}}
\end{align}

\end{document}

I also applied some minor improvements on log vs \log.

enter image description here

Please consider the manual http://www.ctan.org/pkg/mathtools .

Just for adding some informal tags: Kenneth Eugene Iverson floor ceiling notation.

2
  • 2
    I like the »asterix« but I guess you meant asterisk? ;)
    – cgnieder
    Apr 27, 2017 at 16:28
  • 2
    That is a Freudian slip. I demand to introduce asterix as a synonym for asterisk. Didn't Knuth introduced the word perm for permutation? Apr 27, 2017 at 17:15

You must log in to answer this question.

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