5

I have a problem with drawing a line across the page (from margin to margin). I had to change default margins for title page (only for this page) and to do that I used changepage package.

\thispagestyle{empty} \begin{adjustwidth}{-1cm}{-1cm} ... ... ... \end{adjustwidth} 

Everything looks great however lines which I draw using

\rule{\textwidth}{.1pt} 

aren't drawn from margin to margin. The line starts at goo point however line clearly ends before text. How can I fix that ?

1 Answer 1

6

Use \linewidth instead:

\rule{\linewidth}{.1pt} 

To understand the difference, have a look at Difference between \textwidth, \linewidth and \hsize.

Example:

\documentclass{book} \usepackage[english]{babel} \usepackage{blindtext} \usepackage{changepage} \begin{document} \thispagestyle{empty} \begin{adjustwidth}{-1cm}{-1cm} \blindtext[2] \rule{\linewidth}{.1pt} \end{adjustwidth} \blindtext[2] \rule{\linewidth}{.1pt} \end{document} 

output

2
  • You beat me by 44 seconds. ;-) Commented Sep 2, 2011 at 15:33
  • @lockstep: just luck :-) so added some information, since there's the nice Q&A about the difference of those widths. Commented Sep 2, 2011 at 15:40

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.