제목 대신 목차에 그림을 사용하는 방법

제목 대신 목차에 그림을 사용하는 방법

목차의 특정 섹션에 그림(작은 아이콘)을 사용하고 싶습니다. 어떤 제안이 있나요? 일반적 \addcontentsline{toc}{section}{Name} 으로 목차를 참조하는 데 사용합니다 .

답변1

ToC기본적으로 정보는 (특수) 파일이므로 에 정보를 쓰는 것과 관련하여 구체적인 내용은 없습니다 . 그러나 항상 그렇듯이 파일에 쓸 때는 콘텐츠를 강력 하게 .tex만들거나 . \protect\includegraphics

\documentclass{article}
\usepackage{graphicx}

\begin{document}
\tableofcontents
\section{Foo}
\addcontentsline{toc}{section}{\protect\includegraphics[scale=0.2]{beeduck}}
\section{Other foo}
\end{document}

여기에 이미지 설명을 입력하세요

답변2

\documentclass{scrartcl}
\usepackage{graphicx}

\begin{document}
    \tableofcontents
    \section{Foo}
    \addsec[{\protect\includegraphics[width=1cm]{tiger}}]{}
    \section{Other foo}
\end{document}

여기에 이미지 설명을 입력하세요

관련 정보