I've managed to number a series of lines in a page (as in an exam sheet) using tikz, but it feels awkward and somewhat sketchy. Is there any way to improve it or make it "cleaner" (with or without other packages)?
\documentclass[12pt,oneside]{article}
\usepackage[a4paper,margin=2cm]{geometry}%showframe
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage[sfdefault,lf]{FiraSans}
\usepackage{lineno}
\newcounter{linha}
\newcommand{\linha}{\stepcounter{linha}\arabic{linha}}
\begin{document}
\begin{tikzpicture}
\foreach \x in {1,1.7,...,26}
\draw (0,\x) -- (16,\x);
\end{tikzpicture}
\begin{tikzpicture}[overlay]
\foreach \x in {25.25,24.55,...,0.3}
%\foreach \y in {1,...,26}
\node at (-0.8,\x) {\linha};
\end{tikzpicture}
\end{document}
\documentclass[border={5pt}]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[remember picture,overlay]
\foreach \x in {1,...,5}
\draw[line width=\x mm] (0,\x) -- (2,\x);
\end{tikzpicture}
\end{document}