0

EDITED I am writing a thesis in report class and should show separate authors for each chapter. While the authors show up, they do not format into authblk format. Does anyone have an idea of what I could be doing wrong? The code for my main tex is

\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\graphicspath{{images/}}
\usepackage[a4paper,width=150mm, top=25mm, bottom=25mm, bindingoffset=6mm]{geometry}
\usepackage{fancyhdr} 
\pagestyle{fancy}
\usepackage{babel}
\usepackage[style=english]{csquotes}
\usepackage[style=authoryear]{biblatex} 
\addbibresource{library.bib}
\usepackage{fixltx2e} 
\usepackage{titlesec}
  \titleformat{\chapter}[hang]
    {\normalfont\huge\bfseries}
    {\thechapter}{20pt}{\huge}
\usepackage{authblk}
\title{Something clever}
\author{Name}
\date{}

\begin{document}
\maketitle

\chapter*{Abstract}

\chapter*{Dedication}

\chapter*{Declaration}

\chapter*{Acknowledgment}

\tableofcontents 

\chapter{Introduction}
\input{Chapters/introduction} 

\chapter{Title of Chapter}
\input{Chapters/chap2}

\chapter{Title of Chapter}
\input{Chapters/chap3}

\chapter{Title of Chapter}
\input{Chapters/chap4}

\printbibliography

\end{document}``` 

While in the chapters the code is:
\title{something clever}
\author[1]{Name1}
\author[2]{Name2}
\author[1]{Name3}
\author[1]{Name4}
\affil[1]{af1}
\affil[2]{af2}
\date{}                     
\begin{abstract} 
\end{abstract}


1 Answer 1

1

I think that the problem is that the \maketitle command can be used only once in a document. If I remember correctly after its first use it redefines itself to do nothing. Perhaps you can define your own version of \maketitle, say \mymaketitle, that does not do this (on my system the report.cls code is in /usr/local/texlive/2019/texmf-dist/tex/latex/base) just picking out the relevant bits (do you really need a title after the chapter heading?).

1
  • Thank you for this comment @PeterWilson - I tried what you suggested, and completely removed the \maketitle. The author names now show up, but without affiliations. I edited the code in the question.
    – safisc
    Mar 26, 2020 at 9:51

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.