Latex:\footnote 命令在考试包的解决方案环境中不起作用

Latex:\footnote 命令在考试包的解决方案环境中不起作用

我正在使用考试包,我想在解决方案中添加脚注:它显示标记但不显示注释文本。在问题环境中这是可以的。

\documentclass[12pt, answers]{exam}
%\documentclass[12pt]{exam}
\usepackage[english, italian]{babel}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage[usenames,dvipsnames]{color}
\usepackage[utf8x]{inputenc}
\usepackage{verbatim}
\usepackage{minted}
\usepackage{footnote}
\renewcommand{\solutiontitle}{\noindent\textbf{Risposta:}\enspace}

\newcommand{\col}[1]{{\color[rgb]{0.094,0.235,0.36}{#1}}}
\newcommand{\myt}[1]{\textbf{\col{#1}}}
\newcommand{\myhdr}[4]{
\pagestyle{headandfoot}
\firstpageheader{\myt{#1}}{\Huge\myt{#2}}{\myt{#3}}
\runningheader{\myt{#1}}{\Huge\myt{#2}}{\myt{#3}}
\firstpagefooter{}{\myt{#2}}{\myt{#4}}
\runningfooter{}{\myt{#2}}{\myt{#4}}
\runningfootrule
}


%\myhdr{3A - INT}{Domande da un minuto}{Sistemi}{Pag. \thepage\ - \numpages}
\checkboxchar{$\Box$}


\begin{document}
\begin{questions}
\section{Capitolo 1}
\subsection{Quizzes}


\subsection{Questions}
\question
In quali parti si divide un \footnote{footnotes working fine} indirizzo IPv4?
    \begin{solution}Network portion e Host portion\footnote{footnotes working fine} \end{solution}


\section{Capitolo 8}
\subsection{Quizzes}
\subsection{Questions}
\question
In quanti livelli viene, di fatto, divisa la gerarchia della rete dal momento in cui aggiungo le sottoreti?
    \begin{solution}Tre: rete, sottorete e host\end{solution}
\question
Che cosa viene facilitato dalla creazione di un ulteriore livello nella gerarchia di rete?
    \begin{solution}La creazione dei sottogruppi nella rete IP che ne deriva facilita la velocizzazione di trasmissione dei pacchetti e la minimizzazione del traffico locale\footnote{8.0.1.1: Introducing an additional level to the hierarchy creates additional sub-groups within an IP network that facilitates faster packet delivery and added filtration, by helping to minimize ‘local’ traffic.}\end{solution}
\end{questions}
\end{document}

尽管在此示例中进行了评论,但我希望它在页脚打开的情况下也能正常工作。

答案1

您可以使用footnote包从类中获取脚注exam

在此处输入图片描述

代码:

\documentclass[12pt, answers]{exam}

\usepackage{footnote}
\makesavenoteenv{solution}

\begin{document}
\begin{questions}

\question
Some question
\begin{solution} 
    Text\footnote{Some footnote} 
\end{solution}

\end{questions}
\end{document}

答案2

我在此上下文中使用了尾注(带有 enotez 包),它似乎运行顺利。当我只想显示没有解决方案的考试时,我会注释掉末尾的 \printendnotes 行,这样就根本不显示尾注了。

相关内容