答案1
答案2
我用 tikz 试过了
\documentclass{article}
\usepackage{tikz}
\ExplSyntaxOn
\cs_set_eq:NN \inteval \int_eval:n
\ExplSyntaxOff
\newcommand{\test}[1]
{
\begin{tikzpicture}
\node[] (start) at (0,0) {0};
\node[] (mid) at (3,0) {1 2 3 4 5 6 7 8 ... \inteval{#1-1} #1};
\node[] (end) at (6,0){\inteval{#1+1}};
\foreach \x in {start,mid,end}
\draw[] (\x.north west) -- (\x.south west) --(\x.south east) -- (\x.north east);
\node[scale=0.8] at ([yshift = -0.25cm]start.south){min};
\node[scale=0.8] at ([yshift = -0.25cm]mid.south){number domain};
\node[scale=0.8] at ([yshift = -0.25cm]end.south){max};
\end{tikzpicture}
}
\begin{document}
\test{18}
\par
\test{74}
\par
\test{23}
\end{document}
结果