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

이미지가 사용된 헤더에 이미지가 표시되는 것을 알지 못했기 때문에 여기로 돌아왔습니다.여기에 이미지 설명을 입력하세요

가능하다면 이미지를 삭제하거나 옆에 올려두고 싶습니다.

관련 정보