I am trying to have a document with TOC:
1 Introduction
2 blabla
3 Conclusion
Bibliography
Appendix 1
I want the Bibliography to start with title "Bibliography" but I do not want the Appendix 1 to start with title "Appendix 1". I just want to include some PDF pages without a title preceeding them. I, however, want both Bibliography and Appendix 1 to have headings specifying whether the page is a part of bibliography or Appendix 1.
Test document is as follows:
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english,czech]{babel}
\usepackage[nottoc]{tocbibind}
\usepackage{fancyhdr}
\usepackage{pdfpages}
\usepackage{appendix}
\let\stdsection\section
\renewcommand\section{\newpage\stdsection}
\begin{document}
\tableofcontents
\clearpage
\pagestyle{fancy}
\fancyhead{}
\fancyhead[L]{\leftmark}
\section{Úvod}
blabla
\section{Závěr}
bleble
\newpage
\renewcommand{\refname}{Bibliography}
\begin{thebibliography}{9}
bli
\end{thebibliography}
\appendix
\renewcommand{\appendixtocname}{Appendix 1}
\renewcommand{\appendixpagename}{Appendix 1}
\noappendicestocpagenum
\addappheadtotoc
\renewcommand{\refname}{Appendix 1}
\newpage
bla
\includepdf[scale=0.85,pages={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16},pagecommand={\thispagestyle{fancy},\fancyfoot{}}]{original.pdf}
\end{document}
The bibliography looks right:
I would like the heading of page 5 to be "Appendix 1" (see the command
\renewcommand{\refname}{Appendix}
before includepdf), but it is "Bibliography" like this:
I do not understand why \renewcommand
works for the first time but not for the second.
Alternative way to achieve what I want would be to start a section without it being printed in the actual document but only in the TOC - I have not managed to google how to do that.