# Indenting only some sections in TOC

I want to indent some sections in the TOC but leave the fact that they're unnumbered and not indented in the body unchanged. Example follows.

In the example below I would want "Test" in the TOC to be aligned with "1.1 Section Foo" so that the "T" is right under the "S", while leaving the formatting of the body unchanged and still no numbering of "Test" in the TOC.

\documentclass{book}

\usepackage{bookman}
\usepackage{tocstyle}
\usetocstyle{standard}
\renewcommand{\numberline}[1]{#1~}
\setcounter{tocdepth}{1}
\newenvironment{test}[1]{%
\subsection*{#1}}

\begin{document}

\tableofcontents

\chapter{Chapter Foo}
\section{Section Foo}
\subsection{Subsection Foo}
\begin{test}{Test}
\subsubsection*{Subsection Foo Star}
\end{test}

\end{document}

• In fact it's aligned. If you think it's not you can just try with \addcontentsline{toc}{section}{ Test} i.e. with additional space in { Test}. Feb 14, 2020 at 19:58
• You are right. I apologize. I meant aligning the "T" with the "S". I'm editing my question. Feb 14, 2020 at 20:00