You could try using a combination of the foreach
loop and the
ode
functionality. I added the source code below:
documentclass{article}
usepackage{geometry}
geometry{hmargin=1cm,vmargin=1cm}
usepackage{tikz}
usetikzlibrary {shapes.geometric, arrows, arrows.meta}
defwidth{20}
defhauteur{25}
egin{document}
egin{tikzpicture}[x=1cm, y=1cm]
draw[step=1mm, line width=0.1mm, black!5!white] (0,0) grid (width,hauteur);
draw[step=5mm, line width=0.2mm, black!10!white] (0,0) grid (width,hauteur);
draw[step=5cm, line width=0.5mm, black!10!black] (0,0) grid (width,hauteur);
draw[step=1cm, line width=0.3mm, black!15!white] (0,0) grid (width,hauteur);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% ADD THE PART BELOW %%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
foreach x in {0, ..., width} {%
% Bottom
ode[anchor=north] at (x,0) {x};
% Top
ode[anchor=south] at (x,hauteur) {x};
}
foreach y in {0, ..., hauteur} {%
% Left
ode[anchor=east] at (0,y) {y};
% Right
ode[anchor=west] at (width,y) {y};
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
end{tikzpicture}
end{document}
This will produce the following output:
Of course you can still adjust the spacing a bit if you want. Would this be the result you are looking for?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…