Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

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

share|improve this answer
    
Thanks. That works perfectly. Off to inspect the code. (Apologies for the misattribution of code. I've edited the question.) –  Daniel Harbour Jun 23 '12 at 13:02
    
All I did was remove two \par commands from the code and replaced one with an \hspace. –  Alan Munn Jun 23 '12 at 13:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.