TeX - LaTeX Asked on September 5, 2021
I’m struggling to make every endnote entry not take a new line. I read this answer, which explained a lot, but didn’t answer my doubt, as said, how can I make endnotes entries not start a new line.
For example:
1- entry 1 2- entry 2
Instead of
1- entry 1
2- entry 2
In endnotes.sty, theendnotes
is defined as follows:
deftheendnotes{immediatecloseout@enotes global@enotesopenfalse
begingroup
makeatletter
edef@tempa{`string >}%
ifnumcatcode@tempa=12%
let@ResetGTrelax
else
edef@ResetGT{noexpandcatcode@tempa=thecatcode@tempa}%
@makeother>%
fi
def@doanenote##1##2>{def@theenmark{##1}parbegingroup
@ResetGT
edef@currentlabel{csname p@endnoteendcsname@theenmark}%
enoteformat}
def@endanenote{parendgroup}%
enoteheading
enotesize
input{jobname.ent}%
endgroup}
All you need to do is to hack this to remove the par
s inside the definition. Here is the MWE, where two par
s are just removed:
documentclass{article}
usepackage{endnotes}
makeatletter
deftheendnotes{immediatecloseout@enotes global@enotesopenfalse
begingroup
makeatletter
edef@tempa{`string >}%
ifnumcatcode@tempa=12%
let@ResetGTrelax
else
edef@ResetGT{noexpandcatcode@tempa=thecatcode@tempa}%
@makeother>%
fi
def@doanenote##1##2>{def@theenmark{##1}begingroup
@ResetGT
edef@currentlabel{csname p@endnoteendcsname@theenmark}%
enoteformat}
def@endanenote{hspace{1em}endgroup}%
enoteheading
enotesize
input{jobname.ent}%
endgroup}
makeatother
begin{document}
Oneendnote{this is the first endnote. this is the first endnote.} twoendnote{this is the second endnote. this is the second endnote.} three endnote{this is the third endnote.}
theendnotes
end{document}
You can change the space between endnotes by modifying the amount of hspace{1em}
.
Correct answer by domperor on September 5, 2021
You can use enotez
together with enumitem
.
documentclass{article}
usepackage{enotez}
usepackage[inline]{enumitem}
DeclareInstance{enotez-list}{itemize*}{list}{list-type = itemize*}
setlist[itemize]{itemjoin={qquad}}
begin{document}
Aendnote{entry one}
Bendnote{entry two}
Aendnote{entry one}
Bendnote{entry two}
Aendnote{entry one}
Bendnote{entry two}
Aendnote{entry one}
Bendnote{entry two}
Aendnote{entry one}
Bendnote{entry two}
Aendnote{entry one}
Bendnote{entry two}
Aendnote{entry one}
Bendnote{entry two}
Aendnote{entry one}
Bendnote{entry two}
Aendnote{entry one}
Bendnote{entry two}
printendnotes[itemize*]
end{document}
Answered by egreg on September 5, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP