I was looking for an example here about setting the lengh of the command \underline. I'm trying to produce a text on top of a line with 10cm fixed length, with text of variable size. In addition the text should be left aligned (not centered as the examples founded here produce) Here's a minimal example. Thank you.

\documentclass[a4paper,brazil, 12pt]{report}
\usepackage{tikz, tkz-euclide}


\usepackage{eqparbox, ulem}



    \noindent (line 1) $\mathbf{u+w=v+w},$

    \noindent (line 2) $\mathbf{u+w=v+w},$

    \noindent (line 3)  $\mathbf{u+w=v+w},$

    \noindent (line 4)  $\mathbf{u+w=v+w},$

    \noindent (line 5)  $\mathbf{u+w=v+w},$

    \noindent (line 6)  $\mathbf{u+w=v+w},$

    \underline{text here (in front of line 1) \hspace{4cm}}

    \underline{more text here (in front of line 2) \hspace{3cm}}

    \noindent \ulmakebox{\noindent(in front of line 3)}

    \wideunderline[10cm]{\noindent text here (in front of line 4)}

    \begin{tikzpicture} %\without text line in front of line 5
    \draw (0,0) to (10,0);

    \begin{tikzpicture} %\without text line in front of line 6
    \draw (0,0) to (10,0);


Not sure what's the problem. Use the [l] option for \makebox.





(line 1) \wideunderline[10cm]{text here}

(line 2) \wideunderline[10cm]{text here with a p}


enter image description here

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.