RevTex 4.2 の使用時に目次の空白を減らす

RevTex 4.2 の使用時に目次の空白を減らす

APS スタイルのクラスを持つドキュメントがありますrevtex4-2。スタイル上の理由からドキュメント クラスを保持したいのですが、ジャーナル投稿用にドキュメントをスタイル設定する必要はありません。

非常にコンパクトな目次を組み込みたいと思っています。具体的には、(1) トップレベルのセクションのみ、(2) エントリ間の垂直方向の空白を最小限、(3) 脚注のサイズをサンセリフフォント、(4) リンクを含める、です。これまでに実現できたのは次のとおりです。

目次 文章

これでは十分にコンパクトではありません。垂直方向の空白を完全に削除したいのですが、これは可能ですか?

(1) について。 RevTex はカウンターを無視しているようですtocdepth。 関連する質問への回答を使用して、この問題を回避しました (注: これが何をするのかわかりません)

\makeatletter
\def\l@subsection#1#2{}
\def\l@subsubsection#1#2{}
\makeatother

tocloft(3) について。 、、パッケージminitocを試しましたparskip。最初の 2 つは RevTex と互換性がないようです。3 つ目は段落テキストの RevTex スタイルを台無しにしました。唯一うまくいったのは を調整することでした\baselinestretchが、上の画像に見られるように、最小値に達しているようです。

この空白をさらに減らす方法はありますか?

以下に最小限の例を示します。

\documentclass[reprint, aps, prx]{revtex4-2}
\usepackage{hyperref}
\hypersetup{colorlinks = true, linkcolor = blue, linktoc = all}
\begin{document}
{
\makeatletter
\def\l@subsection#1#2{}
\def\l@subsubsection#1#2{}
\makeatother

\footnotesize \sf 
\renewcommand{\baselinestretch}{0.1}

\tableofcontents
}
\section{Introduction}
For comparison, here is the spacing of normal text.
\section{Results}
\subsection{I don't want this in TOC}
\subsection{I also don't want this in TOC}
\section{Another section}
\section{And another}
\section{Less vertical white space between sections please}
\section{Conclusion}
\clearpage
\end{document}

設定できる TeX の長さがあれば、助かります。セクションをループして表に書き込むことで「非公式」の ToC を再作成した回答も非常に助かります。

答え1

\documentclass[reprint, aps, prx]{revtex4-2}
\usepackage{hyperref}
\hypersetup{colorlinks = true, linkcolor = blue, linktoc = all}
\begin{document}

\makeatletter
\def\l@subsection#1#2{}
\def\l@subsubsection#1#2{}
\def\l@f@section{}%
\def\toc@@font{\footnotesize \sffamily}%
\makeatother


\tableofcontents



\section{Introduction}
For comparison, here is the spacing of normal text.
\section{Results}
\subsection{I don't want this in TOC}
\subsection{I also don't want this in TOC}
\section{Another section}
\section{And another}
\section{Less vertical white space between sections please}
\section{Conclusion}
\clearpage
\end{document}

ここに画像の説明を入力してください

関連情報