1

How can I make brackets like this in this picture:

enter image description here

\documentclass[tikz,border=3.14mm]{standalone}

\begin{equation}
\label{eq:1}
P(k)= (\sum_{min}^{max}\frac{{K \choose k}{N-K \choose n-k}} {{N \choose n}})^j
\end{equation}
with following parameters:
\begin{itemize}
    \item $N = 2^{256}$ is the output range of SHA-256
    \item $K=target(p)$ is the target value with a probability $p$ at a particular transverse time.
    \item $n=3.5\times10^6$ is the number of hashes per time $t=90 sec$. This value is estimated in python.
\end{itemize}
\end{document}
2
  • 2
    Try \documentclass{article} \begin{document} \begin{equation} \label{eq:1} P(k)= \left(\sum_{min}^{max}\frac{{K \choose k}{N-K \choose n-k}} {{N \choose n}}\right)^j \end{equation} \end{document}
    – user121799
    Commented Dec 22, 2018 at 0:52
  • 2
    Your MWE is not compilable. However, for large bracket size, you can use \left(...\right) or \big(, \Big(, etc.
    – user156344
    Commented Dec 22, 2018 at 1:23

1 Answer 1

2

To make the brackets adjust to what they enclose, you can use \left( and \right). (Additional options have been mentioned in the comment by Joule V.) I also want to encourage you to write min and max in text mode, to declare a math operator for target and to use \binom for the binomials. You may also want to use siunitx in order to typeset 90 sec. Your document did not compile because you forgot \begin{document} and \end{document}`.

\documentclass{article}
\usepackage{amsmath,siunitx}
\DeclareMathOperator{\target}{target}
\begin{document}
\begin{equation}
\label{eq:1}
P(k)= \left(\sum_{\textup{min}}^{\textup{max}}
\frac{\binom{K}{k}\binom{N-K}{n-k}}{\binom{N}{n}}\right)^j
\end{equation}
with the following parameters:
\begin{itemize}
    \item $N = 2^{256}$ is the output range of SHA-256.
    \item $K=\target(p)$ is the target value with a probability $p$ at a
    particular transverse time.
    \item $n=3.5\times10^6$ is the number of hashes per time $t=\SI{90}{\sec}$. This value is estimated in python.
\end{itemize}
\end{document}

enter image description here

9
  • 2
    Please don't encourage users to use \text like this. It is wrong. Try using your example in an italic context. Use \textup or similar. There are so many users who uses \text as a hammer and really should not.
    – daleif
    Commented Dec 22, 2018 at 7:03
  • @daleif Done. Could you please remind me why it is "wrong"?
    – user121799
    Commented Dec 22, 2018 at 9:25
  • The output of \text is italic if used in an italic context, like in a theorem, try \textit{test $\text{test}$ test} , the all come out in italics. Indices like these should always be upright regardless of context. Imo it is not a good syntax to tell the user to use one command in one context and another in a different context, it should be one single syntax. We sadly see many users who use it as function names as well \text{max} (x, y) because they do not know better.
    – daleif
    Commented Dec 22, 2018 at 10:16
  • \min and \max are predefined and can/should be used here.
    – egreg
    Commented Dec 22, 2018 at 10:17
  • @egreg Frankly, IMHO this is not the function max which is used here. I do agree that \max is to be used for something like \max(x_1,x_2), but I am not sure that this is to be used here. To me this is just an ordinary text, as in \sum\limits_{\text{all Saturdays}}. I guess without knowing the context better, each of us might be right.
    – user121799
    Commented Dec 22, 2018 at 14:52

You must log in to answer this question.

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