![Как удалить номера страниц ссылок в оглавлении](https://rvso.com/image/420749/%D0%9A%D0%B0%D0%BA%20%D1%83%D0%B4%D0%B0%D0%BB%D0%B8%D1%82%D1%8C%20%D0%BD%D0%BE%D0%BC%D0%B5%D1%80%D0%B0%20%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%20%D1%81%D1%81%D1%8B%D0%BB%D0%BE%D0%BA%20%D0%B2%20%D0%BE%D0%B3%D0%BB%D0%B0%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B8.png)
Я не нашел решения этой проблемы в Интернете и не уверен, как это называется, но я хочу удалить номера справа от оглавления для моих подразделов.
Вот код, который у меня есть на данный момент для моего ToC
%align numbers and TOC
\titleformat{\section}{\normalfont\Large\bfseries}{\makebox[30pt][l]{\thesection}}{0pt}{}
\titleformat{\subsection}{\normalfont\large\bfseries}{\makebox[30pt][l]{\thesubsection}}{0pt}{}
%TOC spacing
\usepackage{tocloft}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}
\renewcommand{\cftsubsecleader}{\hfill}
\setcounter{tocdepth}{2}
\renewcommand{\cftsecafterpnum}{\vspace{0pt}}
\setlength{\cftsecnumwidth}{30pt}
\setlength{\cftsubsecnumwidth}{30pt}
\setlength{\cftsubsecindent}{60pt}
решение1
Добавление
\makeatletter
\renewcommand{\cftsubsecpagefont}{\@gobble}
\makeatother
в преамбуле позволит вам достичь цели форматирования.
Полная версия MWE:
\documentclass{article}
\usepackage{tocloft}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}
\renewcommand{\cftsubsecleader}{\hfill}
\makeatletter
\renewcommand{\cftsubsecpagefont}{\@gobble}
\makeatother
\renewcommand{\cftsecafterpnum}{\vspace{0pt}}
\setlength{\cftsecnumwidth}{30pt}
\setlength{\cftsubsecnumwidth}{30pt}
\setlength{\cftsubsecindent}{60pt}
\begin{document}
\tableofcontents
\section{Introduction}
\subsection{Goals of the Experiment}
\subsection{Background Information}
\section{Hypothesis}
\end{document}