У меня проблема с удалением нумерации страниц в ToC, но не на странице. Я искал ответы и пробовал несколько вещей, но ничего не работает. Мне нужно использовать \thispagestyle{plain}
для нумерации страниц, но это автоматически помещает страницу в ToC. Если я использую {empty}
вместо этого, то я удаляю номера страниц на странице ...
Пожалуйста помоги!
newpage
\thispagestyle{plain}
\setcounter{page}{1}
%\pagenumbering{gobble} (this supresses the page numbers on the page which is not what I want)
\addcontentsline{toc}{chapter}{Appendices}
\chapter*{Appendix 1: Room Temperature}
\noindent\makebox[\textwidth][c]{\raisebox{-0.9\height}[10pt][10pt]{\includegraphics[page=1,scale=0.6]{Room-Code}}}\par
\addcontentsline{toc}{chapter}{Appendix 1: Room Temperature}
решение1
Без MWE в вопросе (класс документа, пакеты, связанные с TOC и т. д.) это может быть только предположением.
Вы можете использовать package tocloft
и добавить \cftpagenumbersoff{chapter}
в TOC.
Пример:
\documentclass{report}
\usepackage{blindtext}% only for dummy text
\usepackage{tocloft}
\begin{document}
\tableofcontents
\blinddocument
\cleardoublepage
\setcounter{page}{1}
\addtocontents{toc}{\protect\cftpagenumbersoff{chapter}}% <- added
\addcontentsline{toc}{chapter}{Appendices}
\chapter*{Appendix 1: Room Temperature}
\addcontentsline{toc}{chapter}{Appendix 1: Room Temperature}
\blindtext
\end{document}
Или предложение с пакетом tocbasic
:
\documentclass{report}
\usepackage{blindtext}% only for dummy text
\usepackage{tocbasic}
\newcommand\gobble[1]{}
\begin{document}
\tableofcontents
\blinddocument
\cleardoublepage
\setcounter{page}{1}
\addtocontents{toc}{\DeclareTOCStyleEntry[pagenumberformat=\protect\gobble]{tocline}{chapter}}
\addcontentsline{toc}{chapter}{Appendices}
\chapter*{Appendix 1: Room Temperature}
\addcontentsline{toc}{chapter}{Appendix 1: Room Temperature}
\blindtext
\end{document}
Или с \appendix
:
\documentclass{report}
\usepackage{blindtext}% only for dummy text
\usepackage{tocbasic}
\newcommand\gobble[1]{}
\newcommand\appendixprefixintoc[1]{\appendixname~#1:\hfill}
\begin{document}
\tableofcontents
\blinddocument
\cleardoublepage
\appendix
\setcounter{page}{1}
\addtocontents{toc}{\DeclareTOCStyleEntry[pagenumberformat=\protect\gobble]{tocline}{chapter}}
\addcontentsline{toc}{chapter}{Appendices}
\addtocontents{toc}{\DeclareTOCStyleEntry[entrynumberformat=\protect\appendixprefixintoc,dynnumwidth]{tocline}{chapter}}
\chapter{Room Temperature}
\blindtext
\end{document}