summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-07-06 20:18:37 +0000
committerKarl Berry <karl@freefriends.org>2022-07-06 20:18:37 +0000
commitb70fc3fabe4489f1b839f898132a64e206b1feb6 (patch)
tree2c4d49a1474a54048da3c1f8c5a7afeaa76c0dac /Master/texmf-dist/tex/latex
parent8ee154b9a139bc485395d507ca7a735365ad302e (diff)
postnotes (6jul22)
git-svn-id: svn://tug.org/texlive/trunk@63822 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/postnotes/postnotes.sty45
1 files changed, 34 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/latex/postnotes/postnotes.sty b/Master/texmf-dist/tex/latex/postnotes/postnotes.sty
index a81a56476a5..51edd8057cb 100644
--- a/Master/texmf-dist/tex/latex/postnotes/postnotes.sty
+++ b/Master/texmf-dist/tex/latex/postnotes/postnotes.sty
@@ -53,7 +53,7 @@
}%
\endinput
}%
-\ProvidesExplPackage {postnotes} {2022-05-28} {0.1.3}
+\ProvidesExplPackage {postnotes} {2022-07-06} {0.1.4}
{Endnotes for LaTeX}
\cs_new:Npn \__postnotes_data_name:n #1
{ g__postnotes_ #1 _data_prop }
@@ -624,7 +624,7 @@
{ content } \l__postnotes_print_content_tl
\cs_set:Npn \@currentcounter { postnotetext }
\int_set:Nn \c@postnotetext
- { \int_eval:n { \l__postnotes_print_counter_tl } }
+ { \l__postnotes_print_counter_tl }
\cs_set:Npx \@currentlabel
{ \p@postnote \l__postnotes_print_mark_tl }
\__postnotes_hyperref_make_currentHref:n
@@ -952,6 +952,7 @@
{ \pnhdnotes{} ~ \pnhdtopage{} ~ \pnhdpagefirst }
{ \pnhdnotes{} ~ \pnhdtopages{} ~ \pnhdpagefirst -- \pnhdpagelast }
}
+\tl_new:N \l__postnotes_restore_tmp_tl
\AddToHook { postnotes/note/begin } [ postnotes ]
{
\cs_if_exist:NT \@captype
@@ -996,21 +997,20 @@
\__postnotes_biblatex_citereset_local:
\toggletrue { blx@footnote }
}
- \tl_new:N \l__postnotes_biblatex_restore_tl
\AddToHook { postnotes/print/eachnote } [ postnotes ]
{
\__postnotes_prop_get:nnN { \l__postnotes_print_note_id_tl }
- { biblatex@refsection } \l__postnotes_biblatex_restore_tl
- \int_set:Nn \c@refsection { \l__postnotes_biblatex_restore_tl }
+ { biblatex@refsection } \l__postnotes_restore_tmp_tl
+ \int_set:Nn \c@refsection { \l__postnotes_restore_tmp_tl }
\__postnotes_prop_get:nnN { \l__postnotes_print_note_id_tl }
- { biblatex@refsegment } \l__postnotes_biblatex_restore_tl
- \int_set:Nn \c@refsegment { \l__postnotes_biblatex_restore_tl }
+ { biblatex@refsegment } \l__postnotes_restore_tmp_tl
+ \int_set:Nn \c@refsegment { \l__postnotes_restore_tmp_tl }
\__postnotes_prop_get:nnN { \l__postnotes_print_note_id_tl }
- { biblatex@refcontextbool } \l__postnotes_biblatex_restore_tl
- \use:c { toggle \l__postnotes_biblatex_restore_tl } { blx@refcontext }
+ { biblatex@refcontextbool } \l__postnotes_restore_tmp_tl
+ \use:c { toggle \l__postnotes_restore_tmp_tl } { blx@refcontext }
\__postnotes_prop_get:nnN { \l__postnotes_print_note_id_tl }
- { biblatex@refcontext } \l__postnotes_biblatex_restore_tl
- \blx@edef@refcontext { \l__postnotes_biblatex_restore_tl }
+ { biblatex@refcontext } \l__postnotes_restore_tmp_tl
+ \blx@edef@refcontext { \l__postnotes_restore_tmp_tl }
}
\AddToHook { begindocument/before } [ postnotes/mkbibendnote ]
{
@@ -1097,6 +1097,29 @@
\AddToHook { postnotes/print/begin } [ postnotes ]
{ \zcsetup { counterresetby = { postnotetext = postnotesection } } }
}
+\AddToHook { package/zref-check/after }
+ {
+ \IfPackageAtLeastTF { zref-check } { 2022-07-05 }
+ {
+ \AddToHook { postnotes/store/note } [ postnotes ]
+ {
+ \prop_gput:cnx { \__postnotes_data_name:e { \l__postnotes_note_id_tl } }
+ { zref-check@abschap } { \int_use:N \c@zc@abschap }
+ \prop_gput:cnx { \__postnotes_data_name:e { \l__postnotes_note_id_tl } }
+ { zref-check@abssec } { \int_use:N \c@zc@abssec }
+ }
+ \AddToHook { postnotes/print/eachnote } [ postnotes ]
+ {
+ \__postnotes_prop_get:nnN { \l__postnotes_print_note_id_tl }
+ { zref-check@abschap } \l__postnotes_restore_tmp_tl
+ \int_set:Nn \c@zc@abschap { \l__postnotes_restore_tmp_tl }
+ \__postnotes_prop_get:nnN { \l__postnotes_print_note_id_tl }
+ { zref-check@abssec } \l__postnotes_restore_tmp_tl
+ \int_set:Nn \c@zc@abssec { \l__postnotes_restore_tmp_tl }
+ }
+ }
+ { }
+ }
\AddToHook { package/amsmath/after }
{
\AddToHook { postnotes/note/inhibit } [ postnotes ]