Skip to content

Commit

Permalink
Add missing backslashes in LaTeX syntax in the document of binomial f…
Browse files Browse the repository at this point in the history
…unction (#29933)
  • Loading branch information
machakann authored and fredrikekre committed Nov 7, 2018
1 parent cd6c415 commit d8df7df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions base/intfuncs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -828,18 +828,18 @@ end
"""
binomial(n::Integer, k::Integer)
The _binomial coefficient_ ``\binom{n}{k}``, being the coefficient of the ``k``th term in
The _binomial coefficient_ ``\\binom{n}{k}``, being the coefficient of the ``k``th term in
the polynomial expansion of ``(1+x)^n``.
If ``n`` is non-negative, then it is the number of ways to choose `k` out of `n` items:
```math
\binom{n}{k} = \frac{n!}{k! (n-k)!}
\\binom{n}{k} = \\frac{n!}{k! (n-k)!}
```
where ``n!`` is the [`factorial`](@ref) function.
If ``n`` is negative, then it is defined in terms of the identity
```math
\binom{n}{k} = (-1)^k \binom{k-n-1}{k}
\\binom{n}{k} = (-1)^k \\binom{k-n-1}{k}
```
# Examples
Expand Down
5 changes: 5 additions & 0 deletions doc/src/manual/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,11 @@ A paragraph containing some ``\LaTeX`` markup.
backticks use an even number greater than two. Note that if a single literal backtick needs to
be included within ``\LaTeX`` markup then two enclosing backticks is sufficient.

!!! note
The `\` character should be escaped appropriately if the text is embedded in a Julia source code,
for example, ``` "``\\LaTeX`` syntax in a docstring." ```, since it is interpreted as a string
literal.

#### Links

Links to either external or internal addresses can be written using the following syntax, where
Expand Down

0 comments on commit d8df7df

Please sign in to comment.