LaTeX forum ⇒ GeneralHow to change the tickness of \hrulefill ?

LaTeX specific issues not fitting into one of the other forums of this category.
yoyoimut
Posts: 120
Joined: Mon Oct 19, 2009 6:58 am

How to change the tickness of \hrulefill ?

Postby yoyoimut » Fri Mar 19, 2010 12:47 pm

Hi,

I want to change the tickness of \hrulefill to 0.01pt.

How to do that?

If it is impossible, I have another idea, i.e., using \rule{width}{0.01pt}.
Unfortunately, I don't know how to get the width of \hfill.


Thank you in advance.


regards,

Yuko.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

How to change the tickness of \hrulefill ?

Postby gmedina » Fri Mar 19, 2010 2:30 pm

Hi,

the following command lets you control the height of the rule while having variable width, as the standard \hrulefill:

\documentclass{minimal}

\makeatletter
  \def\vhrulefill#1{\leavevmode\leaders\hrule\@height#1\hfill \kern\z@}
\makeatother

\begin{document}

text \vhrulefill{3pt} text

text \vhrulefill{10pt} text

text \vhrulefill{1pt} text

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...

yoyoimut
Posts: 120
Joined: Mon Oct 19, 2009 6:58 am

Re: How to change the tickness of \hrulefill ?

Postby yoyoimut » Fri Mar 19, 2010 5:24 pm

Thanks gmedina.

Perfectly done.

murraye
Posts: 34
Joined: Sat Aug 15, 2009 6:25 pm

Re: How to change the tickness of \hrulefill ?

Postby murraye » Mon Jul 04, 2016 5:00 pm

How could one define \vhrulefil using just actual LaTeX commands and not any lower-level TeX commands?l


Return to “General”

Who is online

Users browsing this forum: No registered users and 13 guests