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 ?

lockstep
  • 250,273
geronimo
  • 165

1 Answers1

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

Stefan Kottwitz
  • 231,401