On Jul 9, 8:47 am, daxel <
darioa...@gmail.com> wrote:
> Hi and thanks for your answer!!
>
> I explained it wrong... the problem comes with the upper part of the
> sheet, not with the left margin. Each time I write the \chapter tag,
> Latex starts a new page and the title goes 5 cm below it... how can I
> make this space smaller?
>
> Thanks
I have no idea what James is leading towards, but is seems to be going
even more off topic in his last post. Therefore, consider this my
attempt at find a resolution to your request:
First of all, the LaTeX \chapter{...} command necessarily changes
certain things about the document layout in the book class. More
specifically, it generates a new page (using a \cleardoublepage
command to ensure that the chapter page starts on an odd page in a two-
sided document), leaves a gap/whitespace (you mention something like
5cm) before the title, typesets the title in a large font (combined
\Huge and \Large in your case), and also changes the pagestyle to
plain. That's why you'll see you first chapter page having page
numbers displayed at the bottom (in the footer) while the rest of your
chapter pages have the page numbers at the top (in the header).
Now, back to your problem: The titlesec package allows for a large
number of changes or formatting in terms of the titles (or 'sectional
headers'). However, it doesn't allow one to easily change the space
before the sectional title... or not in an obvious way. In the
titlesec package command
\titleformat{<command>}[<shape>]{<format>}{<label>}{<sep>}{<before>}
[<after>]
you should include your vertical spacing in the <format> part of the
command. I've added a \vskip-3em command into this, moving the title
up (vertically negative) by 3em's:
\usepackage[compact]{titlesec}
\newcommand{\bigrule}{\titlerule[0.5mm]}
\titleformat{\chapter}[display]
{\bfseries\Huge}
{%
\vskip-3em
\titlerule
\filleft
\Large\chaptertitlename\
\Large\thechapter}
{0mm}
{\filleft}
[\vspace{0.5mm} \bigrule]
I'm not exactly sure what the actual amount is that LaTeX moves the
chapter title vertically downward from the top of the page, but I can
find that out. Otherwise, you can play around with come lengths
(instead of my 3em) and see whether you find something that suits your
needs.
Hope this helps,
Werner