GeneralHow to change the tickness of \hrulefill ?

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

How to change the tickness of \hrulefill ?

Post by yoyoimut »

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

How to change the tickness of \hrulefill ?

Post by gmedina »

Hi,

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

Code: Select all

\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 ?

Post by yoyoimut »

Thanks gmedina.

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

Re: How to change the tickness of \hrulefill ?

Post by murraye »

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