LaTeX forum ⇒ Page LayoutExclude Cover and Title Page from Setup for Page Layout

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Cloud
Posts: 4
Joined: Tue Mar 04, 2014 9:25 pm

Exclude Cover and Title Page from Setup for Page Layout

Postby Cloud » Tue Mar 04, 2014 9:35 pm

Hello everybody

I have following problem:

I want to use my personal page layout, like margins, text width, etc. But except the cover and the title page.

I think that the best solution for setting the page layout is to use is this (correct me if i am wrong).
  1. \usepackage{geometry}
  2. \geometry{...}

It works fine, but I really don't want to use the same page layout for the cover and the title page - the blank geometry is the best for cover and title page.

My code looks like this.
  1. \documentclass[12pt,a4paper]{report}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage[english]{babel}
  4. \usepackage{setspace}
  5. \linespread{1.5}
  6.  
  7. \usepackage{titlesec}
  8. \titleformat{\chapter}
  9. {\normalfont\LARGE\bfseries}{\thechapter}{1em}{}
  10. \titlespacing*{\chapter}{0pt}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}
  11.  
  12. \usepackage{cite}
  13. \usepackage{indentfirst}
  14.  
  15. \usepackage{geometry}
  16.  
  17. \geometry{ a4paper, total={210mm,297mm}, left=40mm, right=20mm, top=20mm, bottom=20mm, }
  18.  
  19. \begin{document}
  20.  
  21. \include{cover}
  22. \include{title_page}
  23.  
  24. \chapter{Introduction}
  25. ....
  26. \end{document}
Last edited by localghost on Tue Mar 04, 2014 9:55 pm, edited 1 time in total.
Reason: Source code has to be tagged as such to keep a post clear and legible (see Board Rules).

Tags:

hugovdberg
Posts: 133
Joined: Sat Feb 25, 2012 6:12 pm

Postby hugovdberg » Tue Mar 04, 2014 10:40 pm

Did you take a look at the geometry manual? It is perfectly fine to change your geometry at almost any point in the document. So you could do something like this:
  1. \documentclass[12pt,a4paper]{report}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage[english]{babel}
  4. \usepackage{setspace}
  5. \linespread{1.5}
  6.  
  7. \usepackage{titlesec}
  8. \titleformat{\chapter}
  9. {\normalfont\LARGE\bfseries}{\thechapter}{1em}{}
  10. \titlespacing*{\chapter}{0pt}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}
  11.  
  12. \usepackage{cite}
  13. \usepackage{indentfirst}
  14.  
  15. % Include geometry code, but don't change anything just yet.
  16. \usepackage{geometry}
  17.  
  18. \usepackage{blindtext}
  19. \begin{document}
  20.  
  21. \chapter{cover} %% I cant include your files, but this forces a new page for each
  22. \chapter{title page} %% I cant include your files, but this forces a new page for each
  23. % After title page set the geometry for the rest of the document
  24. \newgeometry{total={210mm,297mm}, left=40mm, right=20mm, top=20mm, bottom=20mm,}
  25.  
  26. \blinddocument
  27. \end{document}
Ubuntu 13.10 + Tex Live 2013 + Texmaker / Windows 7 Pro + MikTex 2.9 + TexnicCenter / Android 4.3 + TexPortal + DroidEdit

Cloud
Posts: 4
Joined: Tue Mar 04, 2014 9:25 pm

Postby Cloud » Wed Mar 05, 2014 1:04 am

Many thanks, it worked :)

And what about my question if it is the best way to define the page layout? I am really amateur with latex and i don't know if i will have some problem in future with some king of formatting. The reason why i am asking is that i have found a lot of different commands for set the amrgins, text with etc and lot of them doesn't work because they are limited by default values of other commands.

Thanks again :)

hugovdberg
Posts: 133
Joined: Sat Feb 25, 2012 6:12 pm

Postby hugovdberg » Wed Mar 05, 2014 1:10 am

There are many ways to similar results, but the geometry package is definitely an "accepted" way to change the page layout. It also depends on the documentclass you use, since for example the KOMA-script classes and memoir class have some formatting options included of their own, so it is really hard to answer your question in general.
Ubuntu 13.10 + Tex Live 2013 + Texmaker / Windows 7 Pro + MikTex 2.9 + TexnicCenter / Android 4.3 + TexPortal + DroidEdit

Cloud
Posts: 4
Joined: Tue Mar 04, 2014 9:25 pm

Postby Cloud » Wed Mar 05, 2014 4:39 am

I have one more question about the indent of paragraph. The first paragraph is not intended as default. I would like to indent every paragraph including the first. Simple solution is \usepackage{indentfirst}, but it obviously indent cover, title page and every chapter. I would like to start intending the first paragraph from the introduction of my thesis. One of the solution seems to be paste \noindent in every chapter, section and included files, where i dont want it, but is there a simpler way?? Or in general, is there a way to use package from exact point in document??

hugovdberg
Posts: 133
Joined: Sat Feb 25, 2012 6:12 pm

Postby hugovdberg » Wed Mar 05, 2014 2:06 pm

Next time please open a new topic when asking for this new question since this question is not tightly related to the original geometry question, this keeps topics clean.

I tested with the code below and it seems to work fine, the title is not indented. I suspect this is something in your cover/title_page files. You can't include the package halfway through the document, but if you take a look at the indentfirst manual it really consists of two lines only, which you could use at any place in the document, provided you enclose it between \makeatletter and \makeatother. To make this all a little easier I made two commands which you could use to switch indentation on and off.

  1. \documentclass{article}
  2. \usepackage{blindtext}
  3. \usepackage{titlesec}
  4.  
  5. \makeatletter
  6. \let\@backupafterindentfalse\@afterindentfalse
  7. \newcommand{\indentfirst}{
  8. \let\@afterindentfalse\@afterindenttrue
  9. \@afterindentfalse
  10. }
  11. \newcommand{\noindentfirst}{
  12. \let\@afterindentfalse\@backupafterindentfalse
  13. \@afterindentfalse
  14. }
  15. \makeatother
  16.  
  17. \title{this is a long, in fact, really very long test title to see it the indentation of the title is really off}
  18. \author{me}
  19. \begin{document}
  20. \maketitle
  21. \section{no indent}
  22. \blindtext
  23.  
  24. \blindtext
  25.  
  26. \blindtext
  27.  
  28. \section{indent}
  29. \indentfirst
  30. \blindtext
  31.  
  32. \blindtext
  33.  
  34. \blindtext
  35.  
  36. \section{no indent}
  37. \noindentfirst
  38. \blindtext
  39.  
  40. \blindtext
  41.  
  42. \blindtext
  43. \end{document}
Ubuntu 13.10 + Tex Live 2013 + Texmaker / Windows 7 Pro + MikTex 2.9 + TexnicCenter / Android 4.3 + TexPortal + DroidEdit

Cloud
Posts: 4
Joined: Tue Mar 04, 2014 9:25 pm

Postby Cloud » Wed Mar 05, 2014 3:15 pm

Thanks a lot, everything worked fine. You are king!!! :)


Return to “Page Layout”

Who is online

Users browsing this forum: No registered users and 3 guests