| 1 |
%% |
| 2 |
%% This is file `lwarp-enotez.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% lwarp.dtx (with options: `enotez') |
| 8 |
%% This is a generated file. |
| 9 |
%% Copyright 2016-2026 Brian Dunn |
| 10 |
%% |
| 11 |
%% This work may be distributed and/or modified under the |
| 12 |
%% conditions of the LaTeX Project Public License, either version 1.3 |
| 13 |
%% of this license or (at your option) any later version. |
| 14 |
%% The latest version of this license is in |
| 15 |
%% http://www.latex-project.org/lppl.txt |
| 16 |
%% and version 1.3 or later is part of all distributions of LaTeX |
| 17 |
%% version 2005/12/01 or later. |
| 18 |
\LWR@ProvidesPackagePass{enotez}[2020/12/13] |
| 19 |
\ExplSyntaxOn |
| 20 |
\AtBeginDocument{ |
| 21 |
\bool_set_true:N \l__enotez_hyperref_bool |
| 22 |
\bool_set_true:N \l__enotez_hyperfootnotes_bool |
| 23 |
} |
| 24 |
\VerifyCommand[lwarp][enotez]{\enotez_write_mark:nn}{61DA2A7B03A7D9F55E3E2E2D2498FB32} |
| 25 |
|
| 26 |
\cs_gset_protected:Npn \enotez_write_mark:nn #1#2 |
| 27 |
{ |
| 28 |
\bool_if:NTF \l__enotez_hyperfootnotes_bool |
| 29 |
{ |
| 30 |
\enotezwritemark { \hyperlink {enz.#1} { \enmarkstyle #2 } } |
| 31 |
\bool_if:NT \l__enotez_hyperbackref_bool |
| 32 |
{ |
| 33 |
\hypertarget {enz.#1.backref} { } |
| 34 |
} |
| 35 |
} |
| 36 |
{ \enotezwritemark { \enmarkstyle #2 } } |
| 37 |
} |
| 38 |
\cs_generate_variant:Nn \enotez_write_mark:nn {x} |
| 39 |
\VerifyCommand[lwarp][enotez]{\enotez_write_list_number:n}{9793BEC2766E17864C6391209599DD84} |
| 40 |
|
| 41 |
\cs_gset_protected:Npn \enotez_write_list_number:n #1 |
| 42 |
{ |
| 43 |
\bool_if:NT \l__enotez_hyperfootnotes_bool |
| 44 |
{ |
| 45 |
\hypertarget {enz.#1} { } |
| 46 |
} |
| 47 |
\tl_use:N \l__enotez_list_number_format_tl |
| 48 |
\tl_if_eq:nxTF {a} { \prop_item:Nn \g__enotez_endnote_man_prop {#1} } |
| 49 |
{ |
| 50 |
\bool_if:nTF |
| 51 |
{ \l__enotez_hyperfootnotes_bool && \l__enotez_hyperbackref_bool } |
| 52 |
{ |
| 53 |
\exp_args:Nnx |
| 54 |
\hyperlink {enz.#1.backref} |
| 55 |
{ \exp_not:V \l__enotez_endnote_mark_tl } |
| 56 |
} |
| 57 |
{ \prop_item:Nn \g__enotez_endnote_mark_prop {#1} } |
| 58 |
} |
| 59 |
{ |
| 60 |
\bool_if:nTF |
| 61 |
{ \l__enotez_hyperfootnotes_bool && \l__enotez_hyperbackref_bool } |
| 62 |
{ |
| 63 |
\exp_args:Nnx |
| 64 |
\hyperlink {enz.#1.backref} |
| 65 |
{ \exp_not:V \l__enotez_endnote_mark_tl } |
| 66 |
} |
| 67 |
{ \tl_use:N \l__enotez_endnote_mark_tl } |
| 68 |
} |
| 69 |
} |
| 70 |
\DeclareTemplateCode {enotez-list} {paragraph} {1} |
| 71 |
{ |
| 72 |
heading = \enotez_list_heading:n , |
| 73 |
format = \l__enotez_list_format_tl , |
| 74 |
number = \enotez_list_number:n , |
| 75 |
number-format = \l__enotez_list_number_format_tl , |
| 76 |
notes-sep = \l__enotez_list_notes_sep_dim |
| 77 |
} |
| 78 |
{ |
| 79 |
\AssignTemplateKeys |
| 80 |
\enotez_set_totoc: |
| 81 |
\enotez_list_heading:n { \l__enotez_list_name_tl } |
| 82 |
\enotez_list_preamble: |
| 83 |
\enotez_build_print_list:nnnn {#1} |
| 84 |
{} |
| 85 |
{ |
| 86 |
\par\noindent |
| 87 |
\group_begin: |
| 88 |
\tl_use:N \l__enotez_list_format_tl |
| 89 |
\enotez_list_number:n |
| 90 |
{ \enotez_write_list_number:n {##1} } |
| 91 |
\tl_use:N \c_space_tl |
| 92 |
% \cs_set:cpn {@currentlabel} |
| 93 |
% { \p@endnote \l__enotez_endnote_mark_tl } |
| 94 |
\tl_use:N \g__enotez_endnote_text_tl |
| 95 |
\par |
| 96 |
\dim_compare:nT { \l__enotez_list_notes_sep_dim != 0pt } |
| 97 |
{ \addvspace { \l__enotez_list_notes_sep_dim } } |
| 98 |
\group_end: |
| 99 |
} |
| 100 |
{} |
| 101 |
\enotez_list_postamble: |
| 102 |
} |
| 103 |
|
| 104 |
\ExplSyntaxOff |
| 105 |
\begin{warpMathJax} |
| 106 |
\def\endnotename{endnote} |
| 107 |
\appto\LWR@syncnotenumbers{\LWR@synconenotenumber{LWRendnote}{\theendnote}} |
| 108 |
\appto\LWR@syncnotenames{\LWR@synconenotename{LWRendnote}{\endnotename}} |
| 109 |
\CustomizeMathJax{\def\LWRendnote{1}} |
| 110 |
\CustomizeMathJax{\newcommand{\endnote}[2][\LWRendnote]{{}^{\mathrm{#1}}}} |
| 111 |
\CustomizeMathJax{\newcommand{\endnotemark}[1][\LWRendnote]{{}^{\mathrm{#1}}}} |
| 112 |
\end{warpMathJax} |
| 113 |
|
| 114 |
|
| 115 |
\endinput |
| 116 |
%% |
| 117 |
%% End of file `lwarp-enotez.sty'. |