How can I draw lines like in the picture in Latex? I tried using two consecutive \rule
but they are not as close together as I would like them to be.
This is how I tried:
\noindent\rule{15cm}{0.7pt}
\noindent\rule{15cm}{0.7pt}
The \rule
macro has an optional first parameter which specifies the height above the baseline. So you can use that to bring two rules closer together:
\begin{document}
This is some text.
\par\noindent\rule{\textwidth}{.5pt}
\rule[.8\baselineskip]{\textwidth}{.5pt}
This is some text.
\end{document}
The disadvantage of this approach is that the rule behaves like a single character and must be in its own paragraph. If you want to avoid that, then the \hrule
approach is better, and you can get very exact spacing. Of course in this case you would probably want to add vertical space around the rules themselves. The following example doesn't do that in order to show the difference between the two methods.
\documentclass[11pt]{article}
\begin{document}
This is some text.
\hrule height 0.5pt depth 0pt width \textwidth
\vspace{2pt}
\hrule height 0.5pt depth 0pt width \textwidth
This is some text.
\end{document}
\documentclass[fleqn]{article} \begin{document} \noindent \hrule width \hsize \kern 0.5mm \hrule width \hsize height 0.4pt \end{document}