0

I have used this code from how-can-i-add-abstract-and-acknowledgement-pages-into-the-table-of-contents to add abstract and acknowledgement. However, I am not able to match the chapter titles with the existing margin format of other chapter titles.

Like shown in the picture! Screenshot

My code after title page and before introduction chapter is given as;

\pagenumbering{roman} 
%\shipout\null
%\stepcounter{page}
\cleardoublepage
\chapter*{Acknowledgement}
\addcontentsline{toc}{chapter}{\numberline{}Acknowledgement}%
\lipsum
\chapter*{Abstract}
\addcontentsline{toc}{chapter}{\numberline{}Abstract}%
\lipsum

%----------------------------------------------------------------------------

\tableofcontents
\listoffigures
\listoftables

Please let me know how to correct the margin in TOC. Thanks in advance!

  • Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Skillmon Aug 29 '18 at 13:17
1

I added a bit more of dummy content using the duckuments package. You get the correct alignment if you drop the \numberline{} in the last \addcontentsline argument.

\documentclass[]{report}

\usepackage{duckuments}

\begin{document}
\pagenumbering{roman} 
\cleardoublepage
\chapter*{Acknowledgement}
\addcontentsline{toc}{chapter}{Acknowledgement}%
\blindduck
\chapter*{Abstract}
\addcontentsline{toc}{chapter}{Abstract}%
\blindduck

\duckument

%----------------------------------------------------------------------------

\tableofcontents
\listoffigures
\listoftables
\end{document}

enter image description here

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.