GeneralText Positioning for End-notes

LaTeX specific issues not fitting into one of the other forums of this category.
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Text Positioning for End-notes

Post by cgnieder »

I don't know why this only shows with fontspec... But I have a solution:

Code: Select all

% arara: xelatex
\documentclass[a5paper, openany, 10pt]{book}
\usepackage{fontspec}
\setmainfont{Linux Libertine O}
\usepackage[top=1.5cm,headsep=4pt,outer=2cm,inner=1cm,nofoot,bottom=1.5cm]{geometry}
\usepackage{blindtext}
\usepackage{bookmark}
\usepackage{enotez}

\setenotez{
  reset = true ,
  backref = true ,
  totoc = chapter ,
  split = chapter ,
  list-style = itemize
}
\renewcommand*\enmark[1]{\llap{#1}}

\ExplSyntaxOn\makeatletter
\cs_set_protected:Npn \enotez_write_mark:nn #1#2
  {
    \bool_if:NTF \l__enotez_hyperfootnotes_bool
      {
        \enotezwritemark { \hyperlink { enz.#1 } { \enmarkstyle #2 } }
        \bool_if:NT \l__enotez_hyperbackref_bool
          { \Hy@raisedlink { \hypertarget { enz.#1.backref } { } } }
      }
      { \enotezwritemark { \enmarkstyle #2 } }
  }
\ExplSyntaxOff\makeatother

\begin{document}
\chapter{Introduction}
\blindtext
\endnote{\blindtext}
\blindtext
\endnote{\blindtext}
\blindtext
\endnote{\blindtext}
\blindtext
\endnote{\blindtext}
\blindtext
\endnote{\blindtext}
\blindtext
\endnote{\blindtext}
\blindtext
\endnote{\blindtext}
\blindtext
\endnote{\blindtext}
\blindtext
\endnote{\blindtext}
\blindtext
\endnote{\blindtext}

\printendnotes
\end{document}
Regards
site moderator & package author

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Text Positioning for End-notes

Post by AleCes »

Thank you so much, it works :!:

P.S.
Should I point out the flaw in the paragraph option and this one to the CTAN mailing list?
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Text Positioning for End-notes

Post by cgnieder »

AleCes wrote:Should I point out the flaw in the paragraph option and this one to the CTAN mailing list?
No need :) Since I am the author of enotez I already fixed the first bug (the new version should hit CTAN soon) and will add something for the second bug as well.

Regards
site moderator & package author
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Text Positioning for End-notes

Post by AleCes »

:shock: How could I have known? :roll: Anyway, you did a wonderful job, your package is sooo superior to endnotes :!:
Post Reply