Why does not cross-referencing of end nodes work with `enotez` and `cleveref`?
up vote
0
down vote
favorite
It does not seem that cref
works with enotez
. The output refers to the chapter number rather than the number of the end note.
I had similar issue in this question: Why does not cross-referencing of exercises work with exsheets
?
. It seems that the solution for exsheets
does not work for enotez
, because question
is an environment while endnote
is a command
My source code
documentclass{book}
usepackage[x11names]{xcolor}
usepackage{hyperref}
hypersetup{linkbordercolor=DodgerBlue3, linkcolor=DodgerBlue3, colorlinks=true}
usepackage{enotez}
% This package allows for the use of end notes
setenotez{mark-format=tiny, list-name=End Notes of Chapter thechapter,backref}
renewcommand{theendnote}{thechapter.alph{endnote}}
DeclareInstance{enotez-list}{custom}{paragraph}{
heading=chapter*{#1},
% Spacing
notes-sep=0.5baselineskip,
%
% Styling of the printed end notes
%
% Notes
format=normalfont,
%
% Numbering
number-format=normalfont,
%
% Notes numbering
number=#1hspace{3mm}
}
usepackage{cleveref}
crefformat{endnote}{End Note #2#1#3}
crefrangeformat{endnote}{End Notes #3#1#4 to #5#2#6}
crefmultiformat{endnote}{End Notes #2#1#3}{ and #2#1#3}{, #2#1#3}{ and #2#1#3}
crefrangemultiformat{endnote}{End Notes #3#1#4 to #5#2#6}{ and #3#1#4 to #5#2#6}{, #3#1#4 to #5#2#6}{ and #3#1#4 to #5#2#6}
newcommand{sampletext}{noindent This is a sample text for testing purposes}
begin{document}
chapter{My Chapter}
sampletext endnote{My End Note 1 label[endnote]{en:endnote1}}
sampletext endnote{My End Note 2 label[endnote]{en:endnote2}}
sampletext endnote{My End Note 3 label[endnote]{en:endnote3}}
sampletext endnote{My End Note 4 label[endnote]{en:endnote4}}
sampletext endnote{My End Note 5 label[endnote]{en:endnote5}}
sampletext endnote{My End Note 6 label[endnote]{en:endnote6}}
sampletext endnote{My End Note 7 label[endnote]{en:endnote7}}
sampletext endnote{My End Note 8 label[endnote]{en:endnote8}}
sampletext endnote{My End Note 9 label[endnote]{en:endnote9}}
vspace{baselineskip}
cref{en:endnote1,en:endnote2,en:endnote3}
cref{en:endnote4,,en:endnote5,,en:endnote6}
cref{en:endnote1,en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote9}
cref{en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote7,en:endnote8,,en:endnote9}
cref{en:endnote1,en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote7,en:endnote8,en:endnote9}
printendnotes[custom]
end{document}
hyperref cross-referencing cleveref endnotes enotez
bumped to the homepage by Community♦ 2 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
up vote
0
down vote
favorite
It does not seem that cref
works with enotez
. The output refers to the chapter number rather than the number of the end note.
I had similar issue in this question: Why does not cross-referencing of exercises work with exsheets
?
. It seems that the solution for exsheets
does not work for enotez
, because question
is an environment while endnote
is a command
My source code
documentclass{book}
usepackage[x11names]{xcolor}
usepackage{hyperref}
hypersetup{linkbordercolor=DodgerBlue3, linkcolor=DodgerBlue3, colorlinks=true}
usepackage{enotez}
% This package allows for the use of end notes
setenotez{mark-format=tiny, list-name=End Notes of Chapter thechapter,backref}
renewcommand{theendnote}{thechapter.alph{endnote}}
DeclareInstance{enotez-list}{custom}{paragraph}{
heading=chapter*{#1},
% Spacing
notes-sep=0.5baselineskip,
%
% Styling of the printed end notes
%
% Notes
format=normalfont,
%
% Numbering
number-format=normalfont,
%
% Notes numbering
number=#1hspace{3mm}
}
usepackage{cleveref}
crefformat{endnote}{End Note #2#1#3}
crefrangeformat{endnote}{End Notes #3#1#4 to #5#2#6}
crefmultiformat{endnote}{End Notes #2#1#3}{ and #2#1#3}{, #2#1#3}{ and #2#1#3}
crefrangemultiformat{endnote}{End Notes #3#1#4 to #5#2#6}{ and #3#1#4 to #5#2#6}{, #3#1#4 to #5#2#6}{ and #3#1#4 to #5#2#6}
newcommand{sampletext}{noindent This is a sample text for testing purposes}
begin{document}
chapter{My Chapter}
sampletext endnote{My End Note 1 label[endnote]{en:endnote1}}
sampletext endnote{My End Note 2 label[endnote]{en:endnote2}}
sampletext endnote{My End Note 3 label[endnote]{en:endnote3}}
sampletext endnote{My End Note 4 label[endnote]{en:endnote4}}
sampletext endnote{My End Note 5 label[endnote]{en:endnote5}}
sampletext endnote{My End Note 6 label[endnote]{en:endnote6}}
sampletext endnote{My End Note 7 label[endnote]{en:endnote7}}
sampletext endnote{My End Note 8 label[endnote]{en:endnote8}}
sampletext endnote{My End Note 9 label[endnote]{en:endnote9}}
vspace{baselineskip}
cref{en:endnote1,en:endnote2,en:endnote3}
cref{en:endnote4,,en:endnote5,,en:endnote6}
cref{en:endnote1,en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote9}
cref{en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote7,en:endnote8,,en:endnote9}
cref{en:endnote1,en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote7,en:endnote8,en:endnote9}
printendnotes[custom]
end{document}
hyperref cross-referencing cleveref endnotes enotez
bumped to the homepage by Community♦ 2 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
It does not seem that cref
works with enotez
. The output refers to the chapter number rather than the number of the end note.
I had similar issue in this question: Why does not cross-referencing of exercises work with exsheets
?
. It seems that the solution for exsheets
does not work for enotez
, because question
is an environment while endnote
is a command
My source code
documentclass{book}
usepackage[x11names]{xcolor}
usepackage{hyperref}
hypersetup{linkbordercolor=DodgerBlue3, linkcolor=DodgerBlue3, colorlinks=true}
usepackage{enotez}
% This package allows for the use of end notes
setenotez{mark-format=tiny, list-name=End Notes of Chapter thechapter,backref}
renewcommand{theendnote}{thechapter.alph{endnote}}
DeclareInstance{enotez-list}{custom}{paragraph}{
heading=chapter*{#1},
% Spacing
notes-sep=0.5baselineskip,
%
% Styling of the printed end notes
%
% Notes
format=normalfont,
%
% Numbering
number-format=normalfont,
%
% Notes numbering
number=#1hspace{3mm}
}
usepackage{cleveref}
crefformat{endnote}{End Note #2#1#3}
crefrangeformat{endnote}{End Notes #3#1#4 to #5#2#6}
crefmultiformat{endnote}{End Notes #2#1#3}{ and #2#1#3}{, #2#1#3}{ and #2#1#3}
crefrangemultiformat{endnote}{End Notes #3#1#4 to #5#2#6}{ and #3#1#4 to #5#2#6}{, #3#1#4 to #5#2#6}{ and #3#1#4 to #5#2#6}
newcommand{sampletext}{noindent This is a sample text for testing purposes}
begin{document}
chapter{My Chapter}
sampletext endnote{My End Note 1 label[endnote]{en:endnote1}}
sampletext endnote{My End Note 2 label[endnote]{en:endnote2}}
sampletext endnote{My End Note 3 label[endnote]{en:endnote3}}
sampletext endnote{My End Note 4 label[endnote]{en:endnote4}}
sampletext endnote{My End Note 5 label[endnote]{en:endnote5}}
sampletext endnote{My End Note 6 label[endnote]{en:endnote6}}
sampletext endnote{My End Note 7 label[endnote]{en:endnote7}}
sampletext endnote{My End Note 8 label[endnote]{en:endnote8}}
sampletext endnote{My End Note 9 label[endnote]{en:endnote9}}
vspace{baselineskip}
cref{en:endnote1,en:endnote2,en:endnote3}
cref{en:endnote4,,en:endnote5,,en:endnote6}
cref{en:endnote1,en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote9}
cref{en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote7,en:endnote8,,en:endnote9}
cref{en:endnote1,en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote7,en:endnote8,en:endnote9}
printendnotes[custom]
end{document}
hyperref cross-referencing cleveref endnotes enotez
It does not seem that cref
works with enotez
. The output refers to the chapter number rather than the number of the end note.
I had similar issue in this question: Why does not cross-referencing of exercises work with exsheets
?
. It seems that the solution for exsheets
does not work for enotez
, because question
is an environment while endnote
is a command
My source code
documentclass{book}
usepackage[x11names]{xcolor}
usepackage{hyperref}
hypersetup{linkbordercolor=DodgerBlue3, linkcolor=DodgerBlue3, colorlinks=true}
usepackage{enotez}
% This package allows for the use of end notes
setenotez{mark-format=tiny, list-name=End Notes of Chapter thechapter,backref}
renewcommand{theendnote}{thechapter.alph{endnote}}
DeclareInstance{enotez-list}{custom}{paragraph}{
heading=chapter*{#1},
% Spacing
notes-sep=0.5baselineskip,
%
% Styling of the printed end notes
%
% Notes
format=normalfont,
%
% Numbering
number-format=normalfont,
%
% Notes numbering
number=#1hspace{3mm}
}
usepackage{cleveref}
crefformat{endnote}{End Note #2#1#3}
crefrangeformat{endnote}{End Notes #3#1#4 to #5#2#6}
crefmultiformat{endnote}{End Notes #2#1#3}{ and #2#1#3}{, #2#1#3}{ and #2#1#3}
crefrangemultiformat{endnote}{End Notes #3#1#4 to #5#2#6}{ and #3#1#4 to #5#2#6}{, #3#1#4 to #5#2#6}{ and #3#1#4 to #5#2#6}
newcommand{sampletext}{noindent This is a sample text for testing purposes}
begin{document}
chapter{My Chapter}
sampletext endnote{My End Note 1 label[endnote]{en:endnote1}}
sampletext endnote{My End Note 2 label[endnote]{en:endnote2}}
sampletext endnote{My End Note 3 label[endnote]{en:endnote3}}
sampletext endnote{My End Note 4 label[endnote]{en:endnote4}}
sampletext endnote{My End Note 5 label[endnote]{en:endnote5}}
sampletext endnote{My End Note 6 label[endnote]{en:endnote6}}
sampletext endnote{My End Note 7 label[endnote]{en:endnote7}}
sampletext endnote{My End Note 8 label[endnote]{en:endnote8}}
sampletext endnote{My End Note 9 label[endnote]{en:endnote9}}
vspace{baselineskip}
cref{en:endnote1,en:endnote2,en:endnote3}
cref{en:endnote4,,en:endnote5,,en:endnote6}
cref{en:endnote1,en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote9}
cref{en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote7,en:endnote8,,en:endnote9}
cref{en:endnote1,en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote7,en:endnote8,en:endnote9}
printendnotes[custom]
end{document}
hyperref cross-referencing cleveref endnotes enotez
hyperref cross-referencing cleveref endnotes enotez
edited Aug 31 at 4:39
asked Aug 31 at 4:06
Al-Motasem Aldaoudeyeh
1,400311
1,400311
bumped to the homepage by Community♦ 2 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 2 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
I found the in Cleveref won't work with enotez
ExplSyntaxOn
cs_set_protected:Npn enotez_endnote_mark:n #1
{
int_gincr:N g__enotez_endnote_id_int
quark_if_no_value:nTF {#1}
{
refstepcounter {endnote}
% show theendnote
% cs_gset:cpx {@currentlabel} {theendnote}
enotez_write_mark:xn
{ int_use:N g__enotez_endnote_id_int }
{ theendnote }
}
{
cs_gset:cpn {@currentlabel} {#1}
% cs_gset_eq:NN theendnote @currentlabel
enotez_write_mark:xn { int_use:N g__enotez_endnote_id_int } {#1}
}
bool_if:NT l__enotez_disable_bool
{
int_gdecr:N g__enotez_endnote_id_int
addtocounter {endnote} {-1}
}
}
ExplSyntaxOff
Full code
documentclass{book}
usepackage[x11names]{xcolor}
usepackage{hyperref}
hypersetup{linkbordercolor=DodgerBlue3, linkcolor=DodgerBlue3, colorlinks=true}
usepackage{enotez}
renewcommand{theendnote}{thechapter.alph{endnote}}
setenotez{list-name=End Notes of Chapter thechapter}
setenotez{backref=true}
DeclareInstance{enotez-list}{custom}{paragraph}{
heading=chapter*{#1},
% Spacing
notes-sep=0.5baselineskip,
% Default=0.5baselineskip
%
% Styling of the printed end notes
%
% Notes
format=normalfont,
%
% Numbering
number-format=normalfont,
%
% Notes numbering
number=#1hspace{3mm}
}
ExplSyntaxOn
cs_set_protected:Npn enotez_endnote_mark:n #1
{
int_gincr:N g__enotez_endnote_id_int
quark_if_no_value:nTF {#1}
{
refstepcounter {endnote}
% show theendnote
% cs_gset:cpx {@currentlabel} {theendnote}
enotez_write_mark:xn
{ int_use:N g__enotez_endnote_id_int }
{ theendnote }
}
{
cs_gset:cpn {@currentlabel} {#1}
% cs_gset_eq:NN theendnote @currentlabel
enotez_write_mark:xn { int_use:N g__enotez_endnote_id_int } {#1}
}
bool_if:NT l__enotez_disable_bool
{
int_gdecr:N g__enotez_endnote_id_int
addtocounter {endnote} {-1}
}
}
ExplSyntaxOff
usepackage{cleveref}
crefformat{endnote}{End Note #2#1#3}
crefrangeformat{endnote}{End Notes #3#1#4 to #5#2#6}
crefmultiformat{endnote}{End Notes #2#1#3}{ and #2#1#3}{, #2#1#3}{ and #2#1#3}
crefrangemultiformat{endnote}{End Notes #3#1#4 to #5#2#6}{ and #3#1#4 to #5#2#6}{, #3#1#4 to #5#2#6}{ and #3#1#4 to #5#2#6}
newcommand{sampletext}{noindent This is a sample text for testing purposes}
begin{document}
chapter{My Chapter}
sampletext endnote{My End Note 1} label{en:endnote1}
sampletext endnote{My End Note 2} label[endnote]{en:endnote2}
sampletext endnote{My End Note 3} label[endnote]{en:endnote3}
sampletext endnote{My End Note 4} label[endnote]{en:endnote4}
sampletext endnote{My End Note 5} label[endnote]{en:endnote5}
sampletext endnote{My End Note 6} label[endnote]{en:endnote6}
sampletext endnote{My End Note 7} label[endnote]{en:endnote7}
sampletext endnote{My End Note 8} label[endnote]{en:endnote8}
sampletext endnote{My End Note 9} label[endnote]{en:endnote9}
vspace{baselineskip}
cref{en:endnote1}
cref{en:endnote1,en:endnote2,en:endnote3}
cref{en:endnote4,,en:endnote5,,en:endnote6}
cref{en:endnote1,en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote9}
cref{en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote7,en:endnote8,,en:endnote9}
cref{en:endnote1,en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote7,en:endnote8,en:endnote9}
AfterNextEndnotesList{A sample of text that comes before end note list}
AtNextEndnotesList{A sample of text that comes after end note list}
printendnotes[custom]
end{document}
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I found the in Cleveref won't work with enotez
ExplSyntaxOn
cs_set_protected:Npn enotez_endnote_mark:n #1
{
int_gincr:N g__enotez_endnote_id_int
quark_if_no_value:nTF {#1}
{
refstepcounter {endnote}
% show theendnote
% cs_gset:cpx {@currentlabel} {theendnote}
enotez_write_mark:xn
{ int_use:N g__enotez_endnote_id_int }
{ theendnote }
}
{
cs_gset:cpn {@currentlabel} {#1}
% cs_gset_eq:NN theendnote @currentlabel
enotez_write_mark:xn { int_use:N g__enotez_endnote_id_int } {#1}
}
bool_if:NT l__enotez_disable_bool
{
int_gdecr:N g__enotez_endnote_id_int
addtocounter {endnote} {-1}
}
}
ExplSyntaxOff
Full code
documentclass{book}
usepackage[x11names]{xcolor}
usepackage{hyperref}
hypersetup{linkbordercolor=DodgerBlue3, linkcolor=DodgerBlue3, colorlinks=true}
usepackage{enotez}
renewcommand{theendnote}{thechapter.alph{endnote}}
setenotez{list-name=End Notes of Chapter thechapter}
setenotez{backref=true}
DeclareInstance{enotez-list}{custom}{paragraph}{
heading=chapter*{#1},
% Spacing
notes-sep=0.5baselineskip,
% Default=0.5baselineskip
%
% Styling of the printed end notes
%
% Notes
format=normalfont,
%
% Numbering
number-format=normalfont,
%
% Notes numbering
number=#1hspace{3mm}
}
ExplSyntaxOn
cs_set_protected:Npn enotez_endnote_mark:n #1
{
int_gincr:N g__enotez_endnote_id_int
quark_if_no_value:nTF {#1}
{
refstepcounter {endnote}
% show theendnote
% cs_gset:cpx {@currentlabel} {theendnote}
enotez_write_mark:xn
{ int_use:N g__enotez_endnote_id_int }
{ theendnote }
}
{
cs_gset:cpn {@currentlabel} {#1}
% cs_gset_eq:NN theendnote @currentlabel
enotez_write_mark:xn { int_use:N g__enotez_endnote_id_int } {#1}
}
bool_if:NT l__enotez_disable_bool
{
int_gdecr:N g__enotez_endnote_id_int
addtocounter {endnote} {-1}
}
}
ExplSyntaxOff
usepackage{cleveref}
crefformat{endnote}{End Note #2#1#3}
crefrangeformat{endnote}{End Notes #3#1#4 to #5#2#6}
crefmultiformat{endnote}{End Notes #2#1#3}{ and #2#1#3}{, #2#1#3}{ and #2#1#3}
crefrangemultiformat{endnote}{End Notes #3#1#4 to #5#2#6}{ and #3#1#4 to #5#2#6}{, #3#1#4 to #5#2#6}{ and #3#1#4 to #5#2#6}
newcommand{sampletext}{noindent This is a sample text for testing purposes}
begin{document}
chapter{My Chapter}
sampletext endnote{My End Note 1} label{en:endnote1}
sampletext endnote{My End Note 2} label[endnote]{en:endnote2}
sampletext endnote{My End Note 3} label[endnote]{en:endnote3}
sampletext endnote{My End Note 4} label[endnote]{en:endnote4}
sampletext endnote{My End Note 5} label[endnote]{en:endnote5}
sampletext endnote{My End Note 6} label[endnote]{en:endnote6}
sampletext endnote{My End Note 7} label[endnote]{en:endnote7}
sampletext endnote{My End Note 8} label[endnote]{en:endnote8}
sampletext endnote{My End Note 9} label[endnote]{en:endnote9}
vspace{baselineskip}
cref{en:endnote1}
cref{en:endnote1,en:endnote2,en:endnote3}
cref{en:endnote4,,en:endnote5,,en:endnote6}
cref{en:endnote1,en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote9}
cref{en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote7,en:endnote8,,en:endnote9}
cref{en:endnote1,en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote7,en:endnote8,en:endnote9}
AfterNextEndnotesList{A sample of text that comes before end note list}
AtNextEndnotesList{A sample of text that comes after end note list}
printendnotes[custom]
end{document}
add a comment |
up vote
0
down vote
I found the in Cleveref won't work with enotez
ExplSyntaxOn
cs_set_protected:Npn enotez_endnote_mark:n #1
{
int_gincr:N g__enotez_endnote_id_int
quark_if_no_value:nTF {#1}
{
refstepcounter {endnote}
% show theendnote
% cs_gset:cpx {@currentlabel} {theendnote}
enotez_write_mark:xn
{ int_use:N g__enotez_endnote_id_int }
{ theendnote }
}
{
cs_gset:cpn {@currentlabel} {#1}
% cs_gset_eq:NN theendnote @currentlabel
enotez_write_mark:xn { int_use:N g__enotez_endnote_id_int } {#1}
}
bool_if:NT l__enotez_disable_bool
{
int_gdecr:N g__enotez_endnote_id_int
addtocounter {endnote} {-1}
}
}
ExplSyntaxOff
Full code
documentclass{book}
usepackage[x11names]{xcolor}
usepackage{hyperref}
hypersetup{linkbordercolor=DodgerBlue3, linkcolor=DodgerBlue3, colorlinks=true}
usepackage{enotez}
renewcommand{theendnote}{thechapter.alph{endnote}}
setenotez{list-name=End Notes of Chapter thechapter}
setenotez{backref=true}
DeclareInstance{enotez-list}{custom}{paragraph}{
heading=chapter*{#1},
% Spacing
notes-sep=0.5baselineskip,
% Default=0.5baselineskip
%
% Styling of the printed end notes
%
% Notes
format=normalfont,
%
% Numbering
number-format=normalfont,
%
% Notes numbering
number=#1hspace{3mm}
}
ExplSyntaxOn
cs_set_protected:Npn enotez_endnote_mark:n #1
{
int_gincr:N g__enotez_endnote_id_int
quark_if_no_value:nTF {#1}
{
refstepcounter {endnote}
% show theendnote
% cs_gset:cpx {@currentlabel} {theendnote}
enotez_write_mark:xn
{ int_use:N g__enotez_endnote_id_int }
{ theendnote }
}
{
cs_gset:cpn {@currentlabel} {#1}
% cs_gset_eq:NN theendnote @currentlabel
enotez_write_mark:xn { int_use:N g__enotez_endnote_id_int } {#1}
}
bool_if:NT l__enotez_disable_bool
{
int_gdecr:N g__enotez_endnote_id_int
addtocounter {endnote} {-1}
}
}
ExplSyntaxOff
usepackage{cleveref}
crefformat{endnote}{End Note #2#1#3}
crefrangeformat{endnote}{End Notes #3#1#4 to #5#2#6}
crefmultiformat{endnote}{End Notes #2#1#3}{ and #2#1#3}{, #2#1#3}{ and #2#1#3}
crefrangemultiformat{endnote}{End Notes #3#1#4 to #5#2#6}{ and #3#1#4 to #5#2#6}{, #3#1#4 to #5#2#6}{ and #3#1#4 to #5#2#6}
newcommand{sampletext}{noindent This is a sample text for testing purposes}
begin{document}
chapter{My Chapter}
sampletext endnote{My End Note 1} label{en:endnote1}
sampletext endnote{My End Note 2} label[endnote]{en:endnote2}
sampletext endnote{My End Note 3} label[endnote]{en:endnote3}
sampletext endnote{My End Note 4} label[endnote]{en:endnote4}
sampletext endnote{My End Note 5} label[endnote]{en:endnote5}
sampletext endnote{My End Note 6} label[endnote]{en:endnote6}
sampletext endnote{My End Note 7} label[endnote]{en:endnote7}
sampletext endnote{My End Note 8} label[endnote]{en:endnote8}
sampletext endnote{My End Note 9} label[endnote]{en:endnote9}
vspace{baselineskip}
cref{en:endnote1}
cref{en:endnote1,en:endnote2,en:endnote3}
cref{en:endnote4,,en:endnote5,,en:endnote6}
cref{en:endnote1,en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote9}
cref{en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote7,en:endnote8,,en:endnote9}
cref{en:endnote1,en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote7,en:endnote8,en:endnote9}
AfterNextEndnotesList{A sample of text that comes before end note list}
AtNextEndnotesList{A sample of text that comes after end note list}
printendnotes[custom]
end{document}
add a comment |
up vote
0
down vote
up vote
0
down vote
I found the in Cleveref won't work with enotez
ExplSyntaxOn
cs_set_protected:Npn enotez_endnote_mark:n #1
{
int_gincr:N g__enotez_endnote_id_int
quark_if_no_value:nTF {#1}
{
refstepcounter {endnote}
% show theendnote
% cs_gset:cpx {@currentlabel} {theendnote}
enotez_write_mark:xn
{ int_use:N g__enotez_endnote_id_int }
{ theendnote }
}
{
cs_gset:cpn {@currentlabel} {#1}
% cs_gset_eq:NN theendnote @currentlabel
enotez_write_mark:xn { int_use:N g__enotez_endnote_id_int } {#1}
}
bool_if:NT l__enotez_disable_bool
{
int_gdecr:N g__enotez_endnote_id_int
addtocounter {endnote} {-1}
}
}
ExplSyntaxOff
Full code
documentclass{book}
usepackage[x11names]{xcolor}
usepackage{hyperref}
hypersetup{linkbordercolor=DodgerBlue3, linkcolor=DodgerBlue3, colorlinks=true}
usepackage{enotez}
renewcommand{theendnote}{thechapter.alph{endnote}}
setenotez{list-name=End Notes of Chapter thechapter}
setenotez{backref=true}
DeclareInstance{enotez-list}{custom}{paragraph}{
heading=chapter*{#1},
% Spacing
notes-sep=0.5baselineskip,
% Default=0.5baselineskip
%
% Styling of the printed end notes
%
% Notes
format=normalfont,
%
% Numbering
number-format=normalfont,
%
% Notes numbering
number=#1hspace{3mm}
}
ExplSyntaxOn
cs_set_protected:Npn enotez_endnote_mark:n #1
{
int_gincr:N g__enotez_endnote_id_int
quark_if_no_value:nTF {#1}
{
refstepcounter {endnote}
% show theendnote
% cs_gset:cpx {@currentlabel} {theendnote}
enotez_write_mark:xn
{ int_use:N g__enotez_endnote_id_int }
{ theendnote }
}
{
cs_gset:cpn {@currentlabel} {#1}
% cs_gset_eq:NN theendnote @currentlabel
enotez_write_mark:xn { int_use:N g__enotez_endnote_id_int } {#1}
}
bool_if:NT l__enotez_disable_bool
{
int_gdecr:N g__enotez_endnote_id_int
addtocounter {endnote} {-1}
}
}
ExplSyntaxOff
usepackage{cleveref}
crefformat{endnote}{End Note #2#1#3}
crefrangeformat{endnote}{End Notes #3#1#4 to #5#2#6}
crefmultiformat{endnote}{End Notes #2#1#3}{ and #2#1#3}{, #2#1#3}{ and #2#1#3}
crefrangemultiformat{endnote}{End Notes #3#1#4 to #5#2#6}{ and #3#1#4 to #5#2#6}{, #3#1#4 to #5#2#6}{ and #3#1#4 to #5#2#6}
newcommand{sampletext}{noindent This is a sample text for testing purposes}
begin{document}
chapter{My Chapter}
sampletext endnote{My End Note 1} label{en:endnote1}
sampletext endnote{My End Note 2} label[endnote]{en:endnote2}
sampletext endnote{My End Note 3} label[endnote]{en:endnote3}
sampletext endnote{My End Note 4} label[endnote]{en:endnote4}
sampletext endnote{My End Note 5} label[endnote]{en:endnote5}
sampletext endnote{My End Note 6} label[endnote]{en:endnote6}
sampletext endnote{My End Note 7} label[endnote]{en:endnote7}
sampletext endnote{My End Note 8} label[endnote]{en:endnote8}
sampletext endnote{My End Note 9} label[endnote]{en:endnote9}
vspace{baselineskip}
cref{en:endnote1}
cref{en:endnote1,en:endnote2,en:endnote3}
cref{en:endnote4,,en:endnote5,,en:endnote6}
cref{en:endnote1,en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote9}
cref{en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote7,en:endnote8,,en:endnote9}
cref{en:endnote1,en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote7,en:endnote8,en:endnote9}
AfterNextEndnotesList{A sample of text that comes before end note list}
AtNextEndnotesList{A sample of text that comes after end note list}
printendnotes[custom]
end{document}
I found the in Cleveref won't work with enotez
ExplSyntaxOn
cs_set_protected:Npn enotez_endnote_mark:n #1
{
int_gincr:N g__enotez_endnote_id_int
quark_if_no_value:nTF {#1}
{
refstepcounter {endnote}
% show theendnote
% cs_gset:cpx {@currentlabel} {theendnote}
enotez_write_mark:xn
{ int_use:N g__enotez_endnote_id_int }
{ theendnote }
}
{
cs_gset:cpn {@currentlabel} {#1}
% cs_gset_eq:NN theendnote @currentlabel
enotez_write_mark:xn { int_use:N g__enotez_endnote_id_int } {#1}
}
bool_if:NT l__enotez_disable_bool
{
int_gdecr:N g__enotez_endnote_id_int
addtocounter {endnote} {-1}
}
}
ExplSyntaxOff
Full code
documentclass{book}
usepackage[x11names]{xcolor}
usepackage{hyperref}
hypersetup{linkbordercolor=DodgerBlue3, linkcolor=DodgerBlue3, colorlinks=true}
usepackage{enotez}
renewcommand{theendnote}{thechapter.alph{endnote}}
setenotez{list-name=End Notes of Chapter thechapter}
setenotez{backref=true}
DeclareInstance{enotez-list}{custom}{paragraph}{
heading=chapter*{#1},
% Spacing
notes-sep=0.5baselineskip,
% Default=0.5baselineskip
%
% Styling of the printed end notes
%
% Notes
format=normalfont,
%
% Numbering
number-format=normalfont,
%
% Notes numbering
number=#1hspace{3mm}
}
ExplSyntaxOn
cs_set_protected:Npn enotez_endnote_mark:n #1
{
int_gincr:N g__enotez_endnote_id_int
quark_if_no_value:nTF {#1}
{
refstepcounter {endnote}
% show theendnote
% cs_gset:cpx {@currentlabel} {theendnote}
enotez_write_mark:xn
{ int_use:N g__enotez_endnote_id_int }
{ theendnote }
}
{
cs_gset:cpn {@currentlabel} {#1}
% cs_gset_eq:NN theendnote @currentlabel
enotez_write_mark:xn { int_use:N g__enotez_endnote_id_int } {#1}
}
bool_if:NT l__enotez_disable_bool
{
int_gdecr:N g__enotez_endnote_id_int
addtocounter {endnote} {-1}
}
}
ExplSyntaxOff
usepackage{cleveref}
crefformat{endnote}{End Note #2#1#3}
crefrangeformat{endnote}{End Notes #3#1#4 to #5#2#6}
crefmultiformat{endnote}{End Notes #2#1#3}{ and #2#1#3}{, #2#1#3}{ and #2#1#3}
crefrangemultiformat{endnote}{End Notes #3#1#4 to #5#2#6}{ and #3#1#4 to #5#2#6}{, #3#1#4 to #5#2#6}{ and #3#1#4 to #5#2#6}
newcommand{sampletext}{noindent This is a sample text for testing purposes}
begin{document}
chapter{My Chapter}
sampletext endnote{My End Note 1} label{en:endnote1}
sampletext endnote{My End Note 2} label[endnote]{en:endnote2}
sampletext endnote{My End Note 3} label[endnote]{en:endnote3}
sampletext endnote{My End Note 4} label[endnote]{en:endnote4}
sampletext endnote{My End Note 5} label[endnote]{en:endnote5}
sampletext endnote{My End Note 6} label[endnote]{en:endnote6}
sampletext endnote{My End Note 7} label[endnote]{en:endnote7}
sampletext endnote{My End Note 8} label[endnote]{en:endnote8}
sampletext endnote{My End Note 9} label[endnote]{en:endnote9}
vspace{baselineskip}
cref{en:endnote1}
cref{en:endnote1,en:endnote2,en:endnote3}
cref{en:endnote4,,en:endnote5,,en:endnote6}
cref{en:endnote1,en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote9}
cref{en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote7,en:endnote8,,en:endnote9}
cref{en:endnote1,en:endnote2,en:endnote3,en:endnote5,en:endnote6,en:endnote7,en:endnote8,en:endnote9}
AfterNextEndnotesList{A sample of text that comes before end note list}
AtNextEndnotesList{A sample of text that comes after end note list}
printendnotes[custom]
end{document}
answered Sep 1 at 3:48
Al-Motasem Aldaoudeyeh
1,400311
1,400311
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f448610%2fwhy-does-not-cross-referencing-of-end-nodes-work-with-enotez-and-cleveref%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown