Page LayoutMissing chap app in titles of chapters

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
oddisle
Posts: 4
Joined: Sun Mar 15, 2015 3:51 am

Missing chap app in titles of chapters

Post by oddisle »

The titles of my chapters after the introduction disappeared and there's only 'chapter X' left. I'm using TeXshop with Biber and BibLaTeX.

Minimal working exemple:

Main document

Code: Select all

    \RequirePackage{fix-cm}
    \documentclass[12pt,a4paper,oneside]{book}

    \usepackage{graphicx,xcolor,textpos}
    \usepackage{caption}
    \usepackage{float}
    \usepackage{subcaption}
    \usepackage{helvet}
    \usepackage[utf8]{inputenc}
    \usepackage[greek, dutch]{babel}
    \usepackage[vmargin=5cm,hmargin=5cm]{geometry}
    \usepackage[pagestyles, explicit]{titlesec}
    \usepackage{lipsum}
    \usepackage{epigraph}

    \titleformat{\chapter}[display]
      {\normalfont\Large\raggedleft}
      {\MakeUppercase{\chaptertitlename}%
        \rlap{ \resizebox{!}{1.5cm}{\thechapter} \rule{5cm}{1.5cm}}}
      {10pt}{\Huge#1}

    \titleformat{name = \chapter, numberless}[block]
     {\normalfont\Large\filleft}
     {\MakeUppercase{\chaptertitle}
    }%
     {10pt}{\Huge#1\rlap{\hskip0.5em\color{lightgray!50!}\rule[-0.5cm]{6cm}{1.5cm}}}

    \titlespacing*{\chapter}{0pt}{30pt}{20pt}

    \newgeometry{
    \topmargin -10mm
    \textwidth 160truemm
    \textheight 240truemm
    \oddsidemargin 0mm
    \evensidemargin 0mm
    }

    \definecolor{green}{RGB}{172,196,0}
    \definecolor{bluetitle}{RGB}{29,141,176}
    \definecolor{blueaff}{RGB}{0,0,128}
    \definecolor{blueline}{RGB}{82,189,236}
    \setlength{\TPHorizModule}{1mm}
    \setlength{\TPVertModule}{1mm}


    \usepackage[style=verbose-inote, autocite=footnote, backend=biber]{biblatex}

    \DeclareAutoCiteCommand{footnote}[f]{\footcite}{\footcites}
    \renewcommand*{\mkbibnamelast}[1]{\textsc{#1}}

   % \usepackage{filecontents}

    \begin{filecontents}{\references.bib}
    @article{pollard,
	Author = {Foo Bar},
	Date-Added = {2015-03-06 11:58:42 +0000},
	Date-Modified = {2015-03-06 11:59:44 +0000},
	Journal = {The Journal},
	Pages = {147-162},
	Title = {The Title},
	Volume = {35},
	Year = {2015}}
    \end{filecontents}

    \addbibresource{\jobname.bib}

    \begin{document}

    \thispagestyle{empty}
    \newcommand{\form}[1]{\scalebox{1.087}{\boldmath{#1}}}
    \sffamily
    %
    \begin{textblock}{191}(-24,-11)
    \colorbox{bluetitle}{\hspace{123mm}\ \parbox[c][18truemm]{68mm}{\textcolor{white}        {FACULTY}}}
    \end{textblock}
    %
    \begin{textblock}{70}(-18,-19)
    \textblockcolour{}
    \includegraphics*[height=19.8truemm]{UniversityLogo}
    \end{textblock}
    %
    \begin{textblock}{160}(-6,63)
    \textblockcolour{}
    \vspace{-\parskip}
    \flushleft
    \fontsize{30}{32}\selectfont \textcolor{bluetitle}{Thesis title}\\[1.5mm]
    \fontsize{20}{22}\selectfont With a subtitle}
    \end{textblock}
    %
    \begin{textblock}{160}(8,153)
    \textblockcolour{}
    \vspace{-\parskip}
    \flushright
    \fontsize{14}{16}\selectfont \textbf{My Name}
    \end{textblock}
  
    %
    \begin{textblock}{160}(8,191)
    \textblockcolour{}
    \vspace{-\parskip}
    \flushright
    More information\\[4.5pt]
    on my dissertation\\[4.5pt]
    And my supervisor
    \end{textblock}
       %
    \begin{textblock}{160}(8,232)
    \textblockcolour{}
    \vspace{-\parskip}
    \flushright
    2014-2015
    \end{textblock}
    %
    \begin{textblock}{191}(-24,248)
    {\color{blueline}\rule{550pt}{5.5pt}}
    \end{textblock}
    %
    \vfill
    \newpage

    \rmfamily
    \setcounter{page}{0}
    \pagenumbering{roman}

    \tableofcontents
    \thispagestyle{empty}
    %
    \newpage
    %
    \setcounter{page}{0}
    \pagenumbering{arabic}
    \setlength{\parindent}{4em}
    \setlength{\parskip}{1em}
    %
    \input{introduction}
    \input{methodology}
    \input{chapter1}
    \input{chapter2}
    \input{chapter3}
    \input{chapter4}
    %
    \printbibliography
    %
    \newpage

    \thispagestyle{empty}
    \sffamily
    %
    \begin{textblock}{191}(113,-11)
    {\color{blueline}\rule{160pt}{5.5pt}}
    \end{textblock}
    %
    \begin{textblock}{191}(168,-11)
    {\color{blueline}\rule{5.5pt}{59pt}}
    \end{textblock}
    %
    \begin{textblock}{183}(-24,-11)
    \textblockcolour{}
    \flushright
    \fontsize{7}{7.5}\selectfont
    \textbf{Faculty name}\\
    adress\\
    city and country\\
    tel. number\\
    http://www.website.edu\\
    \end{textblock}
    %
    \begin{textblock}{191}(154,-7)
    \textblockcolour{}
    \includegraphics*[height=16.5truemm]{sedes}
    \end{textblock}
    %
    \begin{textblock}{191}(-20,235)
    {\color{bluetitle}\rule{544pt}{55pt}}
    \end{textblock}
    \end{document}
Introduction

Code: Select all

  \restoregeometry
    \titleformat{\chapter}[display]
      {\normalfont\Large\raggedleft}
      {\MakeUppercase*{\chaptertitlename}%
        \rlap{ \resizebox{!}{1.5cm}{\thechapter} \rule{5cm}{1.5cm}}}
      {10pt}{\Huge}
    \titlespacing*{\chapter}{0pt}{30pt}{20pt}

    \setcounter{chapter}{0}

    \addto\captionsdutch{\renewcommand{\chaptername}{Introduction}}

    \chapter*{Introduction}
    \addcontentsline{toc}{chapter}{Introduction}

    \pagestyle{plain}

    \section*{First section}

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor  incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.[/MWE]

Methodology (& next chapters)

[MWE]

    \chapter{Methodology}
    \section{First section of this chapter}
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Image

This is a dummy version of what I get. Don't mind the mix of languages and the messy front page. How can I get my chapter titles back?
Last edited by oddisle on Mon Mar 16, 2015 12:08 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Missing chap app in titles of chapters

Post by Johannes_B »

Hi and welcome,

the problem is not related, so i was splitting it and moved it to the right place.
I bet you got this template from some place, please ask them to do the right changes.

For now, right above you start the Methodology section, replace the \titleformat block with the following:

Code: Select all

    \titleformat{\chapter}[display]
          {\normalfont\Large\raggedleft}
          {\MakeUppercase*{\chaptertitlename}%
            \rlap{ \resizebox{!}{1.5cm}{\thechapter} \rule{5cm}{1.5cm}}}
          {10pt}{\Huge#1}
Is there any specific reason, why you set the language to dutch and later define the dutch names to have english words?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
oddisle
Posts: 4
Joined: Sun Mar 15, 2015 3:51 am

Re: Missing chapapp

Post by oddisle »

Yes thanks, that works!
Everything in the real document is actually in Dutch, but I changed the MWE a bit to make it more understandable on the internet.
Post Reply