4

I want my endnotes to simulate the effect of

\usepackage[para,norule,hang]{footmisc}

With these settings, footnotes occur within a single paragraph. Each endnote, by contrast, begins on a new line. I've added some code (from Alan Munn, re hspace except at the beginning of a line) to kill the indent, but can't figure out how to replace with the carriage carry with the same horizontal spacing as footmisc places between the footnotes.

An example:

\documentclass{article}
\usepackage{endnotes}
\usepackage[para,norule,hang]{footmisc}

\usepackage{etoolbox}

\makeatletter
\patchcmd{\@makefntext}{.5em}{0em}{}{}
\makeatother

%KILL ENDNOTE INDENT 
   %\def\enoteformat{\rightskip=0pt \leftskip=0pt \parindent=0em \leavevmode\llap{\makeenmark}}
\patchcmd{\enoteformat}{1.8em}{0pt}{}{}

\begin{document}

Gallia\footnote{in} est\footnote{one} omnis\footnote{paragraph}
divisa\endnote{in} in\endnote{a} partes\endnote{vertical} tres\endnote{list}

\newpage

\theendnotes

\end{document}

1 Answer 1

4

Here you need to patch a more substantial piece of code, so I don't think it's so easily done with a patchcmd. Here's a solution.

\documentclass{article}
\usepackage{endnotes}
\usepackage[para,norule,hang]{footmisc}

\usepackage{etoolbox}

\makeatletter
\patchcmd{\@makefntext}{.5em}{0em}{}{}
\def\theendnotes{\immediate\closeout\@enotes \global\@enotesopenfalse
  \begingroup
    \makeatletter
    \edef\@tempa{`\string >}%
    \ifnum\catcode\@tempa=12%
      \let\@ResetGT\relax
    \else
      \edef\@ResetGT{\noexpand\catcode\@tempa=\the\catcode\@tempa}%
      \@makeother\>%
    \fi
    \def\@doanenote##1##2>{\def\@theenmark{##1}\begingroup
        \@ResetGT
        \edef\@currentlabel{\csname p@endnote\endcsname\@theenmark}%
        \enoteformat}
    \def\@endanenote{\hspace{1em}\endgroup}%
    \enoteheading
    \enotesize
    \input{\jobname.ent}%
  \endgroup}
\makeatother
%KILL ENDNOTE INDENT
\patchcmd{\enoteformat}{1.8em}{0pt}{}{}
\begin{document}

Gallia\footnote{in} est\footnote{one} omnis\footnote{paragraph}
divisa\endnote{in} in\endnote{a} partes\endnote{vertical} tres\endnote{list}

\newpage

\theendnotes

\end{document}

partial output of code

2
  • Thanks. That works perfectly. Off to inspect the code. (Apologies for the misattribution of code. I've edited the question.) Commented Jun 23, 2012 at 13:02
  • All I did was remove two \par commands from the code and replaced one with an \hspace.
    – Alan Munn
    Commented Jun 23, 2012 at 13:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .