答案1
试试这个代码:
\documentclass[10pt,a4paper]{article}
\usepackage{amsmath}
\usepackage{graphicx,tikz}
\begin{document}
\begin{tikzpicture}
\draw[latex-latex] (-.2,0)--(10.5,0);
\foreach \x in {0,1,...,10}
\draw[line width=2pt] (\x,.1)--(\x,-.1) node[below] {\bfseries $\frac{\x}{4}$};
\filldraw (7,0) circle(.1) node[above] {A};
\end{tikzpicture}
\end{document}
输出:
添加:如果您想要使用菱形作为标记,请考虑此代码;
\documentclass[10pt,a4paper]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx,tikz}
\begin{document}
\begin{tikzpicture}
\draw[latex-latex] (-.5,0)--(10.5,0);
\foreach \x in {0,1,...,10}{
\draw[line width=2pt] (\x,-.1) node[below] {\bfseries $\frac{\x}{4}$};
\node at (\x,0) {\small $\blacklozenge$};
}
\node at (7,.35) {A};
\end{tikzpicture}
\end{document}
输出: