Skip to main content
added 710 characters in body
Source Link
JeT
  • 4.6k
  • 2
  • 13
  • 52

Have you tried the package numerica ?

enter image description here

\documentclass[margin=5pt, varwidth]{standalone}
\usepackage{amsmath}
\usepackage{numerica}

\begin{document}

Test 1:
\[
\sum_{k=1}^{100} k
= \eval*{\sum_{k=1}^{100} k}
\]

Test 2:
\[
\sum_{k=0}^{5} \binom{5}{k}
= \eval*{\sum_{k=0}^{5} \binom{5}{k}}
= 2^5
\]

\end{document}

Edit 1 with a table of values

enter image description here

\documentclass[margin=5pt, varwidth]{standalone}

\usepackage{amsmath}
\usepackage{numerica}
\usepackage{numerica-tables}

\begin{document}

% Table of values for S(n) = \sum_{k=1}^{n} k, for n={1,..,10}
% Key point:
% - rvar is the row variable
% - rstop is how far we go
% - [n=1] gives the initial value of the row variable

\begin{table}[h]
\centering
\nmcTabulate[
  rvar=n,
  rstop=10,
  rstep=1
]{ \sum_{k=1}^{n} k }[n=1]

\end{table}

\end{document}

Have you tried the package numerica ?

enter image description here

\documentclass[margin=5pt, varwidth]{standalone}
\usepackage{amsmath}
\usepackage{numerica}

\begin{document}

Test 1:
\[
\sum_{k=1}^{100} k
= \eval*{\sum_{k=1}^{100} k}
\]

Test 2:
\[
\sum_{k=0}^{5} \binom{5}{k}
= \eval*{\sum_{k=0}^{5} \binom{5}{k}}
= 2^5
\]

\end{document}

Have you tried the package numerica ?

enter image description here

\documentclass[margin=5pt, varwidth]{standalone}
\usepackage{amsmath}
\usepackage{numerica}

\begin{document}

Test 1:
\[
\sum_{k=1}^{100} k
= \eval*{\sum_{k=1}^{100} k}
\]

Test 2:
\[
\sum_{k=0}^{5} \binom{5}{k}
= \eval*{\sum_{k=0}^{5} \binom{5}{k}}
= 2^5
\]

\end{document}

Edit 1 with a table of values

enter image description here

\documentclass[margin=5pt, varwidth]{standalone}

\usepackage{amsmath}
\usepackage{numerica}
\usepackage{numerica-tables}

\begin{document}

% Table of values for S(n) = \sum_{k=1}^{n} k, for n={1,..,10}
% Key point:
% - rvar is the row variable
% - rstop is how far we go
% - [n=1] gives the initial value of the row variable

\begin{table}[h]
\centering
\nmcTabulate[
  rvar=n,
  rstop=10,
  rstep=1
]{ \sum_{k=1}^{n} k }[n=1]

\end{table}

\end{document}
Source Link
JeT
  • 4.6k
  • 2
  • 13
  • 52

Have you tried the package numerica ?

enter image description here

\documentclass[margin=5pt, varwidth]{standalone}
\usepackage{amsmath}
\usepackage{numerica}

\begin{document}

Test 1:
\[
\sum_{k=1}^{100} k
= \eval*{\sum_{k=1}^{100} k}
\]

Test 2:
\[
\sum_{k=0}^{5} \binom{5}{k}
= \eval*{\sum_{k=0}^{5} \binom{5}{k}}
= 2^5
\]

\end{document}