Text Formatting ⇒ How to control underline length
-
- Posts: 1
- Joined: Fri Mar 15, 2019 6:18 pm
How to control underline length
I have a question about underline:basically I want to get the effect that make the underline span all the textwidth, is there anyway to achieve it?
I search lots of solution, no luck.
Thanks a lot.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
How to control underline length
welcome to the forum!
Instead of directly underlining text, you could put that text into a box and underline that box:
Code: Select all
\documentclass{article}
\begin{document}
\noindent
\underline{\makebox[\textwidth][c]{Some text}}
\end{document}