I need to insert text inside the rule.

  • \noindent\rule{\textwidth}{0.4mm} text between rules\par \noindent\rule[1ex]{\textwidth}{0.4pt} ? – Zarko Nov 1 '16 at 20:14
  • Is this different from you other request? – Werner Nov 1 '16 at 20:24
  • 1
    Do you want text to be written within the rule? If you're using a rule of thickness/width 0.4mm, the text will be quite small. Or do you just want the text written with rules above and below? – Werner Nov 1 '16 at 20:28
  • @Werner This was my first vision: characters 0.2 pt tall. :-) – Przemysław Scherwentke Nov 1 '16 at 20:37

Unless I've completely misunderstood the problem, here's a version that inserts text into a "rule" by using a \colorbox of appropriate width instead of an actual LaTeX rule:






\noindent\rulebox{Some hidden text here}


enter image description here

With a higher magnification, the hidden message (if that was intended) becomes readable:

enter image description here

| improve this answer | |

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.