TOC要素の横に図や画像を配置する方法

TOC要素の横に図や画像を配置する方法

TOC の章要素の横に図/画像を配置する方法を探しています。

現時点では、それをそのすぐ下に置く方法しか見つけられず、章番号の前やページの後に置く方法は見つかりませんでした。 \addstufftotoc{\nobreak\protect\includegraphics[height=1\baselineskip]{Image/en.jpg}\par}

TOC要素

答え1

ここでは、必要に応じて、目次に別の見出しを指定して、ラップ経由でグラフィックを追加する機能を使用します。

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\tableofcontents

\noindent\hrulefill

\section{Normal section}

\section[{\llap{\includegraphics[height=\baselineskip]{example-image}%
  \kern20pt}Left of section number}]{Left of section number}

\section[{Right of title \includegraphics[height=\baselineskip]{example-image}}]%
  {Right of title}

\section[{Right of page  number\hfill\rlap{\kern20pt\includegraphics%
  [height=\baselineskip]{example-image}}}]{Right of page  number}
\end{document}

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


補足

\chapterクラスでのの使用bookと画像の垂直配置に関するコメントに応えて、追加の MWE を提供します。

\documentclass[a4paper,openright]{book}
\usepackage{graphicx}
\DeclareRobustCommand\addimg[1]{\llap{\raisebox{-\dp\strutbox}%
  {\includegraphics[height=\baselineskip]{#1} \kern20pt}}}
\begin{document}
\tableofcontents

\noindent\hrulefill

\chapter[\addimg{example-image}Left of section number]{Left of section number}

\chapter[\addimg{example-image}Machines d'audit et processus MCO et MCS]{Machines d'audit et processus MCO et MCS}
\end{document}

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

答え2

画像が使用されているヘッダーに表示されていることに気づかなかったので、ここに戻ってきました。ここに画像の説明を入力してください

可能であれば、画像を削除するか、横に置きたいです。

関連情報