The code



  \vskip 3ex\goodbreak
  \hbox to \hsize{%
      \hbox to 1cm{\hss\bfseries\Large\thesection \ \ }%
        \advance \hsize by 8cm
        \advance \hsize by -2\fboxrule
        \advance \hsize by 2\fboxsep
       \strut\strut \linespread{1.4}\selectfont#2
  \vskip 5mm\nobreak


\chapter{A Test}
\section{A  Test}

gives me this output:

enter image description here

but I want the frame to be fullwidth like the following. How can I do this?

enter image description here


This quick change makes the trick:

Just replace

\hbox to \hsize{%
\hbox to 1cm{\hss\bfseries\Large\thesection \ \ }%


\hbox to \hsize{%
\hbox to 5cm{\hss\bfseries\Large\thesection \ \ }%

Probably not the most elegant solution, but it works!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.