答案1
尝试从如下的事情开始:
\documentclass{article}
\usepackage{tikz}
\usepackage{mathtools}
\begin{document}
\begin{tikzpicture}
\draw(0,0) -- (10,0);
\node at (1,-1) {0};
\draw(1,0.2) -- (1,-0.2);
\node at (2,-1) {$\dfrac{1}{q}$};
\draw(2,0.2) -- (2,-0.2);
\node at (3,-1) {$\dfrac{2}{q}$};
\draw(3,0.2) -- (3,-0.2);
\node at (4.5,-1) {$\dfrac{P}{q}$};
\draw(4.5,0.2) -- (4.5,-0.2);
\node at (5,1) {P};
\draw(5,0.2) -- (5,-0.2);
\node at (6,-1) {$\dfrac{P+1}{q}$};
\draw(6,0.2) -- (6,-0.2);
\node at (10.5,0) {L};
\end{tikzpicture}
.
\end{document}