با سلام. من در کلاس book یک محیط برای قراردادن کاربستها تعریف کرده ام. می خواهم «فهرست کاربستها» را تولید کنم ولی صفحه ایجاد می شود ولی محتوی فهرست تولید نمی شود!
\newtcolorbox[auto counter, number within=chapter]{ex}[2][]{
enhanced, breakable,
colframe=blue!35,
colback=blue!5,
fonttitle=\bfseries,
title=کاربست~ \thetcbcounter: #2,
list entry={کاربست~ \thetcbcounter: #2},
#1
}
#ویرایش#
کد میمنیمالی که روی آن کار می کنم به صورت زیر است:
\documentclass{book}
\usepackage[most]{tcolorbox}
\newtcolorbox[auto counter, number within=chapter]{ex}[2][]{
enhanced, breakable,
colframe=blue!35,
colback=blue!5,
fonttitle=\bfseries,
title=کاربست~ \thetcbcounter: #2,
list entry={کاربست~ \thetcbcounter: #2},
#1}
\usepackage{xepersian}
\settextfont{XB Zar}
\begin{document}
\tableofcontents
\chapter*{فهرست کاربستها}
\addcontentsline{toc}{chapter}{فهرست کاربستها}
\tcblistof{ex}{فهرست کاربستها}
\chapter{نمونهها}
\begin{ex}{قانون انگل}
این یک تست فهرست کاربستها است.
\end{ex}
\begin{ex}{قانون دوم}
این هم یک کاربست دیگر برای تست فهرست کاربستهاست.
\end{ex}
\end{document}
تصویر اسکرین خروجی مورد اشاره به صورت زیر است
