怎样才能在两条分隔的行中有两个脚注结构?

怎样才能在两条分隔的行中有两个脚注结构?

我希望这个first带有命令的结构\footnote带有 para选项脚注。
对于second带有\footnotetext命令的结构,我希望它位于next line并且还带有 para选项脚注。
我的意思是每个结构都位于 中separated line。我该怎么做?
这是我的代码:

\documentclass[12pt]{report}
\usepackage[para]{footmisc}
\begin{document}
\null\vfill
I want all of this structures to be with  para option footnote.
Hi\footnote{hello}.I am fine\footnote{Okay}.
And I want all of the below structures to be in the next line and also to be with  para option footnote.
\footnotemark\footnotetext{First footnote}
\footnotemark\footnotetext{Second footnote}
\end{document}

答案1

我将其作为单独的答案发布,因为这是一种完全不同的方法:

在 para 模式下插入脚注时,\hbox会将 a 放入 中\footins,稍后会对其进行\unhbox编辑。因此,此 的宽度\hbox无关紧要,可用作标记,指示脚注属于哪个块:

\documentclass[12pt]{report}
\usepackage[para]{footmisc}

\makeatletter
% This is almost an exact copy from footmisc.sty
\renewcommand\@footnotetext[1]{%
  \insert\footins{%
    \ifFN@setspace
      \let\baselinestretch\FN@baselinestretch
    \fi
    \reset@font\footnotesize
    \interlinepenalty\interfootnotelinepenalty
    \splittopskip\footnotesep
    \splitmaxdepth \dp\strutbox
    \floatingpenalty\@MM
    \hsize\columnwidth
    \@parboxrestore
    \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}%
    \color@begingroup
      \setbox\FN@tempboxa=\hbox{%
        \@makefntext{\ignorespaces#1\strut
          \penalty-10\relax
          \hskip\footglue
        }% end of \@makefntext parameter
      }% end of \hbox
      \dp\FN@tempboxa=0pt
      \ifFN@etex
        \ht\FN@tempboxa=\dimexpr\wd\FN@tempboxa *
                        \footnotebaselineskip / \columnwidth\relax
      \else
        \ht\FN@tempboxa=\fudgefactor\wd\FN@tempboxa
      \fi
      % The following line was inserted here
      \wd\FN@tempboxa=\footnotetype
      \box\FN@tempboxa
    \color@endgroup
  }%
  \FN@mf@prepare
}
% This is almost an exact copy from footmisc.sty except for the \FN@tempboxc parts
\long\def\makefootnoteparagraph{\unvbox\footins \makehboxofhboxes
  \setbox\FN@tempboxa=\hbox{\unhbox\FN@tempboxa \removehboxes}
  \setbox\FN@tempboxc=\hbox{\unhbox\FN@tempboxc \removehboxes}
  \hsize\columnwidth
  \@parboxrestore
  \baselineskip=\footnotebaselineskip
  \noindent
  \rule{\z@}{\footnotesep}%
  \ifdim\wd\FN@tempboxa=0pt\else%
    \unhbox\FN@tempboxa\par
  \fi%
  \ifdim\wd\FN@tempboxc=0pt\else%
    \unhbox\FN@tempboxc\par
  \fi%
}
% This is almost an exact copy from footmisc.sty except for the \FN@tempboxc parts
\def\makehboxofhboxes{\setbox\FN@tempboxa=\hbox{}\setbox\FN@tempboxc=\hbox{}%
  \loop
    \setbox\FN@tempboxb=\lastbox
    \ifhbox\FN@tempboxb
    \ifdim\wd\FN@tempboxb=0sp%
      \setbox\FN@tempboxa=\hbox{\box\FN@tempboxb\unhbox\FN@tempboxa}%
    \else%
      \setbox\FN@tempboxc=\hbox{\box\FN@tempboxb\unhbox\FN@tempboxc}%
    \fi%
  \repeat
}
\newdimen\footnotetype
\let\mfn@orig@footnote\footnote
\renewcommand*\footnote{\footnotetype=0sp\relax\mfn@orig@footnote}
\let\mfn@orig@footnotetext\footnotetext
\renewcommand*\footnotetext{\footnotetype=1sp\relax\mfn@orig@footnotetext}
\makeatother

\begin{document}
\null\vfill
I want all of this structures to be with  para option footnote.
Hi\footnote{hello}.I am fine\footnote{Okay}.
And I want all of the below structures to be in the next line and also to be with  para option footnote.
\footnotemark\footnotetext{First footnote}
\footnotemark\footnotetext{Second footnote}
Hi\footnote{Another hello}.I am fine\footnote{This gets boring}.
\end{document}

输出

这种方法可以轻松扩展到两组以上的脚注。

答案2

您可以通过在脚注之间插入换行符来实现此目的:

\documentclass[12pt]{report}
\usepackage[para]{footmisc}
\newcommand\footnotebreak{\insert\footins{\newline}}
\begin{document}
\null\vfill
I want all of this structures to be with  para option footnote.
Hi\footnote{hello}.I am fine\footnote{Okay}.
\footnotebreak%
And I want all of the below structures to be in the next line and also to be with  para option footnote.
\footnotemark\footnotetext{First footnote}
\footnotemark\footnotetext{Second footnote}
\end{document}
\newcommand\footnotebreak{\insert\footins{\hbox{\newline}}}

在此处输入图片描述

相关内容