# code-block-pro/1.27.5/build/shiki/samples/tex.sample

Code Block Pro – Beautiful Syntax Highlighting, version 1.27.5. 30 lines.

- Page: https://pluginprobe.com/plugins/code-block-pro/1.27.5/code/build/shiki/samples/tex.sample
- Raw: https://pluginprobe.com/plugins/code-block-pro/1.27.5/raw/build/shiki/samples/tex.sample
- Modified: 2023-09-03T01:04:34+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/code-block-pro/1.27.5/code/build/shiki/samples/tex.sample#L10-L20`.

```
\documentclass{article}

\usepackage{expl3}

\ExplSyntaxOn
  \cs_new_eq:NN \calc \fp_eval:n
\ExplSyntaxOff

\def\valueA{7}
\def\valueB{19}
\def\valueC{41}
\def\valueD{31}
\def\valueE{25}
\def\valueF{17}
\def\valueG{7}
\def\valueH{3}

\begin{document}

\noindent I have the list
\[
\valueA,\valueB,\valueC,\valueD,\valueE,\valueF,\valueG,\valueH
\]
in which the largest element is $\calc{max(\valueA,\valueB,\valueC,\valueD,\valueE,\valueF,\valueG,\valueH)}$ (but that is of no importance to me).\\[\baselineskip]
How can I get \LaTeX{} to extract the position number of the largest element in a list? (In the example above, the answer is of course `$3$'.)

\end{document}

% From https://tex.stackexchange.com/questions/231558/position-of-largest-element-in-a-list

```
