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



enter image description here



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}









share|improve this question
















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.



















    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



    enter image description here



    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}









    share|improve this question
















    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.

















      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



      enter image description here



      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}









      share|improve this question















      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



      enter image description here



      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      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.
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          enter image description here



          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}





          share|improve this answer





















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "85"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            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

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            enter image description here



            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}





            share|improve this answer

























              up vote
              0
              down vote













              enter image description here



              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}





              share|improve this answer























                up vote
                0
                down vote










                up vote
                0
                down vote









                enter image description here



                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}





                share|improve this answer












                enter image description here



                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}






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Sep 1 at 3:48









                Al-Motasem Aldaoudeyeh

                1,400311




                1,400311






























                    draft saved

                    draft discarded




















































                    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.




                    draft saved


                    draft discarded














                    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





















































                    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







                    Popular posts from this blog

                    Contact image not getting when fetch all contact list from iPhone by CNContact

                    count number of partitions of a set with n elements into k subsets

                    A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks