1

Im trying to make the rules equally spaced

\begin{center}
\rule{\textwidth}{.6pt}
\end{center}

\begin{figure}[H]
    \centering
    \rule{0.5cm}{0.5cm}
\end{figure}

\begin{center}
\rule{\textwidth}{.6pt}
\end{center}
1
  • 1
    Do you really need figure?
    – Sigur
    Mar 1, 2018 at 22:31

2 Answers 2

1

It's better to use a low level primitive, namely \hrule:

\documentclass{article}

\begin{document}

\begin{center}
\hrule height 0.6pt

\vspace{1cm}

\rule{0.5cm}{0.5cm}

\vspace{1cm}

\hrule height 0.6pt
\end{center}

\end{document}

enter image description here

Sorry for the low accuracy, but that's all Adobe Reader provides.

4
  • texdef does not work on \hrule. How to see its definition?
    – Sigur
    Mar 1, 2018 at 23:40
  • @Sigur \hrule is a TeX primitive.
    – egreg
    Mar 1, 2018 at 23:44
  • But is it possible to understand better what it is? I mean, how it was defined, constructed, or some other method related to it. For example, how to make it to produce a line?
    – Sigur
    Mar 1, 2018 at 23:48
  • 2
    @Sigur Look in the TeXbook or in TeX by topic
    – egreg
    Mar 2, 2018 at 6:56
1

Also possible with tikz:

\documentclass{article}
\usepackage{tikz}
\begin{document}

\noindent%
\begin{tikzpicture}
\draw (0, 0) -- ++(\linewidth,0)
      (0,-2) -- ++(\linewidth,0);
\node [draw,fill,minimum size=.5cm] at (\linewidth/2,-1){};
\end{tikzpicture}

\end{document}

enter image description here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.