
나는 tcolorbox
패키지를 사용하여 솔루션이 포함된 연습문제를 제작합니다. 나는 때때로 일반적인 방법으로 상자에 각주를 생성하고, 때로는 여러 개의 각주가 있을 때 패키지를 사용하여 manyfoot
이러한 각주를 "인라인" 방식으로 작성합니다. 여기 편집에서 볼 수 있는 것은 일반적인 각주가 상자 안에 기록되어 있지만 에 의해 생성된 각주가 아니라는 것을 볼 수 있습니다. manyfoot
이는 각주 기호만 제공하고 각주나 텍스트는 제공하지 않습니다. Manyfoot이 만든 각주에 대해 동일한 동작을 어떻게 얻을 수 있습니까? 즉, 연습 문제 상자 안에, 인라인 형식으로, 그리고 솔루션 상자에도 쓰여진 각주 텍스트를 얻을 수 있습니까?
나는 사용된 tex 파일을 제공합니다:
\documentclass{book}
\usepackage[most]{tcolorbox}
\tcbuselibrary{skins,breakable,xparse}
\usepackage{polyglossia}
\setmainlanguage{english}
\usepackage[para*]{manyfoot}
\DeclareNewFootnote[para]{C}
\makeatletter
\let\c@footnoteC\c@footnote
\makeatother
\renewcommand{\thefootnoteC}{\fnsymbol{footnote}}
\NewTColorBox[auto counter,number within=chapter]{exercise}{+O{}}{%
enhanced,colframe=green!20!black,colback=yellow!10!white,coltitle=green!40!black,
fonttitle=\bfseries,
underlay={\begin{tcbclipinterior}
\shade[inner color=green!80!yellow,outer color=yellow!10!white]
(interior.north west) circle (2cm);
\draw[help lines,step=5mm,yellow!80!black,shift={(interior.north west)}]
(interior.south west) grid (interior.north east);
\end{tcbclipinterior}},
title={Exercise~ \thetcbcounter:},
label={exercise@\thetcbcounter},
attach title to upper=\quad,
after upper={\par\hfill\textcolor{green!40!black}%
{\itshape Solution on page~\pageref{solution@\thetcbcounter}}},
lowerbox=ignored,
savelowerto=solutions/exercise-\thetcbcounter.tex,
record={\string\solution{\thetcbcounter}{solutions/exercise-\thetcbcounter.tex}},
#1
}
\NewTotalTColorBox{\solution}{mm}{%
enhanced,colframe=red!20!black,colback=yellow!10!white,coltitle=red!40!black,
fonttitle=\bfseries,
underlay={\begin{tcbclipinterior}
\shade[inner color=red!50!yellow,outer color=yellow!10!white]
(interior.north west) circle (2cm);
\draw[help lines,step=5mm,yellow!80!black,shift={(interior.north west)}]
(interior.south west) grid (interior.north east);
\end{tcbclipinterior}},
title={Solution of Exercise~\ref{exercise@#1} on page~\pageref{exercise@#1}:},
phantomlabel={solution@#1},
attach title to upper=\par,
}{\input{#2}}
\tcbset{no solution/.style={no recording,after upper=}}
\begin{document}
\chapter{The first chapter}
\section{Exercises}
\tcbstartrecording
\begin{exercise}
Exercise with inlined footnotes, \footnoteC{inlined footnote 1} and \footnoteC{inlined footnote 2}, in the question.
\tcblower
Exercise with inlined footnotes, \footnoteC{inlined footnote 1} and \footnoteC{inlined footnote 2}, in the answer.
\end{exercise}
\begin{exercise}
Exercise with usual footnotes, \footnote{footnote 1} and \footnote{footnote 2}, in the question.
\tcblower
Exercise with usual footnotes, \footnote{footnote 1} and \footnote{footnote 2}, in the answer.
\end{exercise}
\tcbstoprecording
\section{Solutions of exercises}
\tcbinputrecords
\end{document}
xelatex를 사용한 컴파일입니다.