Page LayoutFormatting for a Thesis Layout

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
MrBrown997
Posts: 4
Joined: Thu Nov 29, 2012 4:34 pm

Formatting for a Thesis Layout

Post by MrBrown997 »

Hello,

I'm new to LaTeX and so also to LyX. I have a couple of questions concerning my Layout for my Diploma thesis. I have searched now for about three hours but couldn't find any helpful answers concerning my problems. I've attached my complete Layout for LyX and hopefully someone can help me with this questions:
  1. How is it possible to make the page numbers of the pages for the LoF and LoT according to the main page numbers so it doesn't start to count from 1 when the appendix starts? I have tried so long now and couldn't find any solution to this problem.
  2. How is it possible to display the page number (according to point 1.) on the pages of the LoF and LoT? I tried almost everything but the page numbers still stay hidden on these sites.
  3. How can I display the same footer and header on the page with the ToC as it is in the normal chapter pages? So it should be like the name "Table of Contents" in the upper right corner of the heading and the roman number is in the lower center of the footer.
  4. Why is the format of the LoF (Abbildungsverzeichnis) and and LoT (Tabellenverzeichnis) other than the normal format of the chapter names?
  5. How is it possible to make the figures name to something like "1.x" instead of displaying also the subsection number like "1.1.x"?
  6. How can I display the name of the chapters (only the chapters) in capital letters instead of normal letters?
I would appreciate any help since i cant find any help to these problems. The main file (see attachment) is the "Diplomarbeit_Vorlage". All the other files are included.


Cheers,
MrBrown
Attachments
Thesis_Layout.zip
(278.23 KiB) Downloaded 496 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Formatting for a Thesis Layout

Post by meho_r »

MrBrown997 wrote:[...] How is it possible to make the page numbers of the pages for the LoF and LoT according to the main page numbers so it doesn't start to count from 1 when the appendix starts? I have tried so long now and couldn't find any solution to this problem.
Remove \pagenumbering{arabic} command before LOF.
How is it possible to display the page number (according to point 1.) on the pages of the LoF and LoT? I tried almost everything but the page numbers still stay hidden on these sites.
The first page of a chapter uses plain page style, so you'll have to change it. E.g. add the following code (which matches the page style used for other chapters) prior to LoT:

Code: Select all

\fancypagestyle{plain}{%
\fancyhf{} 
\fancyhead{}  
\fancyfoot{} 
\fancyhead[R]{{\nouppercase{\leftmark}\color{mygray}}} 
\fancyfoot[C]{\textbf \Large -\thepage-} 
\addtolength{\headheight}{1\baselineskip} 
\addtolength{\headheight}{1mm}}
\pagestyle{fancy}
How can I display the same footer and header on the page with the ToC as it is in the normal chapter pages? So it should be like the name "Table of Contents" in the upper right corner of the heading and the roman number is in the lower center of the footer.
Same as above. Try adding the same code before ToC (but after \pagenumbering{Roman} line) and tweak it as necessary.
Why is the format of the LoF (Abbildungsverzeichnis) and and LoT (Tabellenverzeichnis) other than the normal format of the chapter names?
Since you're already using tocloft package, you can use commands that match your redefinition of chapter titles. So, after \titleformat{\chapter}[hang]{\Large\sffamily\bfseries}... command, add something like this:

Code: Select all

\renewcommand\cftloftitlefont{\Large\sffamily\bfseries}% List of figures
\renewcommand\cftlottitlefont{\Large\sffamily\bfseries}% List of tables
How is it possible to make the figures name to something like "1.x" instead of displaying also the subsection number like "1.1.x"?
You can redefine \thefigure and \thetable counters so that they include only the chapter number and the figure number:

Code: Select all

\renewcommand{\thefigure}{\thechapter.\arabic{figure}}
\renewcommand{\thetable}{\thechapter.\arabic{table}}
Put the code into the preamble, maybe after \setcapindent, so you can find it easily.
How can I display the name of the chapters (only the chapters) in capital letters instead of normal letters?
Try adding the \uppercase command into \titleformat{chapter}... line, so that it looks like this:

Code: Select all

\titleformat{\chapter}[hang]
{\Large\sffamily\bfseries}
{\thechapter\hsp}
{0pt}
{\uppercase}
MrBrown997
Posts: 4
Joined: Thu Nov 29, 2012 4:34 pm

Formatting for a Thesis Layout

Post by MrBrown997 »

Hey meho_r,

thanks for this great answer. With this help I could solve alsmost all problems! :D
But still there are four more. I really would appreciate getting your help one more time. I attached the changed layout again. The left problems are:
  1. I wanted to have upper case letters for the chapters in the ToC instead of every chapter heading in the text in upper case letters. What do I have to do to achieve this?
  2. As you can see in the layout, the ToC has no headings and footer. It should have the same heading and footer as ne normal text has except the page numbering (as it already is) should be in Roman letters.
  3. For some reason, the list of abbreviations has the wrong title in the upper right corner of the header, there is still the name of the LoT. How can I change this?
  4. Code: Select all

    \renewcommand\cftloftitlefont{\Large\sffamily\bfseries}  % Formatierung für Abbildungsverzeichnis Ueberschrift
    \renewcommand\cftlottitlefont{\Large\sffamily\bfseries}  % Formatierung für Tabellenverzeichnis Überschrift
    
    Your code worked for the LoF but not for the LoT. How do I have to change this code to get the same heading layout for the LoT as it is for the LoF?
Sorry for the huge load of questions but somehow I think there are so many parameters already in my layout, that changing one, effects several things and not only the one I wanted to change.

I would again appreciate any help.
Attachments
Thesis_Layout_1.1.zip
(278.49 KiB) Downloaded 549 times
Last edited by localghost on Fri Nov 30, 2012 11:48 am, edited 1 time in total.
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Formatting for a Thesis Layout

Post by meho_r »

MrBrown997 wrote: [...]
I wanted to have upper case letters for the chapters in the ToC instead of every chapter heading in the text in upper case letters. What do I have to do to achieve this?
You can try \uppercase command in the preamble, like this:

Code: Select all

% Definitionen zur Inhaltsverzeichnis-Formatierung
\titlecontents{chapter}[1.5em]
{\addvspace{1pc}}
{\contentslabel{1.5em}\uppercase}
{\hspace*{-1.5em}}
{\titlerule*[0.3pc]{.}\contentspage}
If you don't see any difference, don't forget to disable these two lines:

Code: Select all

\usepackage{tocstyle}
\usetocstyle{allwithdot}
As you can see in the layout, the ToC has no headings and footer. It should have the same heading and footer as ne normal text has except the page numbering (as it already is) should be in Roman letters.
As I mentioned before, you should redefine plain page style before TOC. You already have some code there, like page numbering being switched to roman, something like this:

Code: Select all

\pagenumbering{Roman}
\thispagestyle{fancy} %Stilangabe 
\renewcommand{\chaptermark}[1]{\markboth{#1}{}} 
\renewcommand{\headrulewidth}{0.4pt} 
\renewcommand{\footrulewidth}{0.4pt}

\fancypagestyle{plain}{% This should solve the header/footer problem
\fancyhf{}
\fancyhead{}
\fancyfoot{}
\fancyhead[R]{{\nouppercase{\leftmark}\color{mygray}}}
\fancyfoot[C]{\textbf \Large -\thepage-}
\addtolength{\headheight}{1\baselineskip}
\addtolength{\headheight}{1mm}}
\pagestyle{fancy}

\addtolength{\headheight}{-1\baselineskip} 
\addtolength{\headheight}{0mm}

For some reason, the list of abbreviations has the wrong title in the upper right corner of the header, there is still the name of the LoT. How can I change this?

Code: Select all

\renewcommand\cftloftitlefont{\Large\sffamily\bfseries}  % Formatierung für Abbildungsverzeichnis Ueberschrift
\renewcommand\cftlottitlefont{\Large\sffamily\bfseries}  % Formatierung für Tabellenverzeichnis Überschrift
Your code worked for the LoF but not for the LoT. How do I have to change this code to get the same heading layout for the LoT as it is for the LoF?
Really can't say what's wrong, it compiles correctly for me, as you can see in the attached PDF file.
Attachments
PDF_output.pdf
(243.31 KiB) Downloaded 529 times
Thesis_sample.zip
(279.28 KiB) Downloaded 431 times
MrBrown997
Posts: 4
Joined: Thu Nov 29, 2012 4:34 pm

Formatting for a Thesis Layout

Post by MrBrown997 »

Hey meho_r,

thanks again for the great help. I'm really sorry for having this loads of questions and I'm very thankful for your help! Unfortunately there are still some points unclear.
  1. First of all the ToC. The problem is, the names for the nomenclature and the references are still not upper case. I managed to display "Abbildungsverzehnis" and "Tabellenverzehnis" in upper case by changing the following code.

    Code: Select all

    \addcontentsline{toc}{chapter}{ABBILDUNGSVERZEICHNIS}
    \addcontentsline{toc}{chapter}{TABELLENVERZEICHNIS}
    
    Maybe this is a somehow bad way of doing this, but it works for me. But for the nomenclature and the references this doesn't work since they are implemented in the ToC automatically and not by such a code.
  2. The heading for "Inhaltsverzeichnis" is supposed to be the same font as the names for the Chapters (for example "1 Einleitung"). Somehow the font for "Inhaltsverzeichnis" is bigger than the one for the chapters.
  3. If you have a look at the pages for LoF and LoT, you will see a different font for "Abbildungsverzeichnis" and "Tabellenverzeichnis" and this is even if I use your code for the Layout. Where is the error here?
  4. If you have a look at the LoT and nomenclature (Abkürzungsverzeichnis), you will see that they also have different fonts. In addition, the space between the header and the "Tabellenverzeichnis" and the space between the header and "Abkürzungsverzeichnis" are different. I can't find the problem where this comes from. Additionally, the headers display the wrong name in the upper right corner for the nomenclature page. Here it should display "Abkürzungsverzeichnis" and not "Tabellenverzeichnis".
  5. Again the nomenclature page has a wrong format itself. The text "CAD" should be left aligned and the test "Computer Aided Design" should be right aligned. In between those two there should be dots to fill the space. How can I achieve this?
Sorry again for this many questions. I hope you've got some time again for helping me with this.

I attached the PDF output which I compiled using the attached LyX files. I also attached some Images to display again the errors. Within the PDF file I also marked the mentioned errors.


Greetings,
MrBrown
Attachments
Thesis_Layout_1.2.zip
(277.94 KiB) Downloaded 451 times
Images.zip
(102.08 KiB) Downloaded 571 times
Diplomarbeit_Vorlage.pdf
(254.02 KiB) Downloaded 537 times
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Formatting for a Thesis Layout

Post by meho_r »

First of all the ToC. The problem is, the names for the nomenclature and the references are still not upper case. I managed to display "Abbildungsverzehnis" and "Tabellenverzehnis" in upper case by changing the following code.

Code: Select all

\addcontentsline{toc}{chapter}{ABBILDUNGSVERZEICHNIS}
\addcontentsline{toc}{chapter}{TABELLENVERZEICHNIS}
Maybe this is a somehow bad way of doing this, but it works for me. But for the nomenclature and the references this doesn't work since they are implemented in the ToC automatically and not by such a code.
Display of contents entries are controlled by tocloft package as well as titletoc package (which is a part of titlesec package), so, as we changed numbered entries (chapters) to uppercase, we can do the same for unnumbered entries by adding \uppercase command. So, in the preamble, find the following line of code and make sure you have \uppercase commands for both numbered and unnumbered entries, like this:

Code: Select all

\titlecontents{chapter}[1.5em]
{\addvspace{1pc}}
{\contentslabel{1.5em}\uppercase}% numbered entries
{\hspace*{-1.5em}\uppercase}% unnumbered entries
{\titlerule*[0.3pc]{.}\contentspage}
The heading for "Inhaltsverzeichnis" is supposed to be the same font as the names for the Chapters (for example "1 Einleitung"). Somehow the font for "Inhaltsverzeichnis" is bigger than the one for the chapters.
You can change the title of the TOC manually and change font size on the fly So, this goes above the TOC:

Code: Select all

\renewcommand{\cfttoctitlefont}{\bfseries\sffamily\Large}
If you have a look at the pages for LoF and LoT, you will see a different font for "Abbildungsverzeichnis" and "Tabellenverzeichnis" and this is even if I use your code for the Layout. Where is the error here?
Instead of hunting for the error, here's the solution: you use the code provided by tocloft package to change appearance of titles for TOC, LOF and LOT. So, this goes above the TOC:

Code: Select all

\renewcommand{\cfttoctitlefont}{\bfseries\sffamily\Large}
You already have the code for LOT and LOF at the beginning of the document, just place them in front of LOT and LOF, respectively, instead of putting the code at the very beginning. This goes in front of the LOF:

Code: Select all

\renewcommand{\cftloftitlefont}{\bfseries\sffamily\Large}
and this goes above the LOT:

Code: Select all

\renewcommand{\cftlottitlefont}{\bfseries\sffamily\Large}
Remember, titles are controlled by titlesec packages, and contents entries (TOC, LOF, LOT) are controlled by titletoc and tocloft packages, so those are the first places you should take a look at.
If you have a look at the LoT and nomenclature (Abkürzungsverzeichnis), you will see that they also have different fonts. In addition, the space between the header and the "Tabellenverzeichnis" and the space between the header and "Abkürzungsverzeichnis" are different. I can't find the problem where this comes from. Additionally, the headers display the wrong name in the upper right corner for the nomenclature page. Here it should display "Abkürzungsverzeichnis" and not "Tabellenverzeichnis".
A dirty approach for the spacing above the title: redefine \titlespacing{chapter} before the nomenclature. Add the following:

Code: Select all

\titlespacing{\chapter}{0pt}{*2.5}{*3}
Change *2.5 to some higher value, until you're happy with the result.
Don't forget to reset this after the nomenclature.

For the page style, try doing the same as you did for TOC: redefine plain page style. So, in front of the nomenclature, add the following:

Code: Select all

\fancypagestyle{plain}{% This should solve the header/footer problem
\fancyhf{}
\fancyhead{}
\fancyfoot{}
\fancyhead[R]{{\nouppercase{Abkürzungsverzeichnis}\color{mygray}}}
\fancyfoot[C]{\textbf \Large -\thepage-}
\addtolength{\headheight}{1\baselineskip}
\addtolength{\headheight}{1mm}}
\pagestyle{fancy}
I put Abkürzungsverzeichnis instead of previously used \leftmark.
Again the nomenclature page has a wrong format itself. The text "CAD" should be left aligned and the test "Computer Aided Design" should be right aligned. In between those two there should be dots to fill the space. How can I achieve this?
With this, I'm afraid I can't help you. Try asking a question about nomenclature in general, not in the LyX subforum, maybe someone can point you in the right direction.
Attachments
Thesis.zip
(280.81 KiB) Downloaded 547 times
MrBrown997
Posts: 4
Joined: Thu Nov 29, 2012 4:34 pm

Re: Formatting for a Thesis Layout

Post by MrBrown997 »

Hey Meho_R,

i was asking some questions some time ago concerning a thesis template in lyx.
i'm now almost finished with my thesis except some formatting problems in lyx. Maybe you can help me one more time, since im not able to solve these problems on my own.

Im sending you a zip-file including a pdf-file called Diplomarbeit_2.pdf and the lyx files, where the Diplomarbeit_2.lyx is the main file.

1. Please have a look at the TOC. You can see, that these are going over 2 sites and on the second, the TOC has got a header, which should not be there. it collides with it. The header of the second site of the TOC should be as the one of the first site of the TOC. How can i achieve this?

2. As you can see as example on page 8 (pdf page 17), the main thesis template has got a header with a line and a footer with a line. As there are so many definitions in thesis, i cant find the one to format the distance between the beginning of the a4 paper an the line of the header and the distance between the ending of the a4 paper und the line in the footer. Those two distances are too big at the moment. I need to make them both 1.27 cm from the border of the a4 paper.

I would really appreciate your help again.

I tried to send this pn including the zip-file. Unfortunately this did not work since the file is 15 mb. I uploaded it at file dropper. Somehow i cant send you a pn. Could you please send me your mailaddress or skype or ICQ so i can send you the link via these messengers?


Greetings,
Jakob
Post Reply