texlive[63822] Master/texmf-dist: postnotes (6jul22)
commits+karl at tug.org
commits+karl at tug.org
Wed Jul 6 22:18:38 CEST 2022
Revision: 63822
http://tug.org/svn/texlive?view=revision&revision=63822
Author: karl
Date: 2022-07-06 22:18:37 +0200 (Wed, 06 Jul 2022)
Log Message:
-----------
postnotes (6jul22)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/postnotes/CHANGELOG.md
trunk/Master/texmf-dist/doc/latex/postnotes/postnotes-code.pdf
trunk/Master/texmf-dist/doc/latex/postnotes/postnotes.pdf
trunk/Master/texmf-dist/source/latex/postnotes/postnotes.dtx
trunk/Master/texmf-dist/tex/latex/postnotes/postnotes.sty
Modified: trunk/Master/texmf-dist/doc/latex/postnotes/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/postnotes/CHANGELOG.md 2022-07-06 20:18:18 UTC (rev 63821)
+++ trunk/Master/texmf-dist/doc/latex/postnotes/CHANGELOG.md 2022-07-06 20:18:37 UTC (rev 63822)
@@ -1,7 +1,12 @@
# Changelog
-## [Unreleased](https://github.com/gusbrs/postnotes/compare/v0.1.3...HEAD)
+## [Unreleased](https://github.com/gusbrs/postnotes/compare/v0.1.4...HEAD)
+## [v0.1.4](https://github.com/gusbrs/postnotes/compare/v0.1.3...v0.1.4) (2022-07-06)
+
+### Added
+- `zref-check` support.
+
## [v0.1.3](https://github.com/gusbrs/postnotes/compare/v0.1.2...v0.1.3) (2022-05-28)
### Fixed
Modified: trunk/Master/texmf-dist/doc/latex/postnotes/postnotes-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/postnotes/postnotes.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/postnotes/postnotes.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/postnotes/postnotes.dtx 2022-07-06 20:18:18 UTC (rev 63821)
+++ trunk/Master/texmf-dist/source/latex/postnotes/postnotes.dtx 2022-07-06 20:18:37 UTC (rev 63822)
@@ -147,7 +147,7 @@
%
%
% \begin{macrocode}
-\ProvidesExplPackage {postnotes} {2022-05-28} {0.1.3}
+\ProvidesExplPackage {postnotes} {2022-07-06} {0.1.4}
{Endnotes for LaTeX}
% \end{macrocode}
%
@@ -1338,7 +1338,7 @@
{ content } \l_@@_print_content_tl
\cs_set:Npn \@currentcounter { postnotetext }
\int_set:Nn \c at postnotetext
- { \int_eval:n { \l_@@_print_counter_tl } }
+ { \l_@@_print_counter_tl }
\cs_set:Npx \@currentlabel
{ \p at postnote \l_@@_print_mark_tl }
\@@_hyperref_make_currentHref:n
@@ -1940,6 +1940,12 @@
%
% \section{Compatibility}
%
+% A dedicated temp variable for restoring data.
+%
+% \begin{macrocode}
+\tl_new:N \l_@@_restore_tmp_tl
+% \end{macrocode}
+%
% \subsection*{\cs{caption}}
%
% For \cs{caption}'s possible two passes. This catches more than just
@@ -2055,21 +2061,20 @@
% \end{macrocode}
% Restore \pkg{biblatex} variables for each note.
% \begin{macrocode}
- \tl_new:N \l_@@_biblatex_restore_tl
\AddToHook { postnotes/print/eachnote } [ postnotes ]
{
\@@_prop_get:nnN { \l_@@_print_note_id_tl }
- { biblatex at refsection } \l_@@_biblatex_restore_tl
- \int_set:Nn \c at refsection { \l_@@_biblatex_restore_tl }
+ { biblatex at refsection } \l_@@_restore_tmp_tl
+ \int_set:Nn \c at refsection { \l_@@_restore_tmp_tl }
\@@_prop_get:nnN { \l_@@_print_note_id_tl }
- { biblatex at refsegment } \l_@@_biblatex_restore_tl
- \int_set:Nn \c at refsegment { \l_@@_biblatex_restore_tl }
+ { biblatex at refsegment } \l_@@_restore_tmp_tl
+ \int_set:Nn \c at refsegment { \l_@@_restore_tmp_tl }
\@@_prop_get:nnN { \l_@@_print_note_id_tl }
- { biblatex at refcontextbool } \l_@@_biblatex_restore_tl
- \use:c { toggle \l_@@_biblatex_restore_tl } { blx at refcontext }
+ { biblatex at refcontextbool } \l_@@_restore_tmp_tl
+ \use:c { toggle \l_@@_restore_tmp_tl } { blx at refcontext }
\@@_prop_get:nnN { \l_@@_print_note_id_tl }
- { biblatex at refcontext } \l_@@_biblatex_restore_tl
- \blx at edef@refcontext { \l_@@_biblatex_restore_tl }
+ { biblatex at refcontext } \l_@@_restore_tmp_tl
+ \blx at edef@refcontext { \l_@@_restore_tmp_tl }
}
% \end{macrocode}
% Make \pkg{biblatex}'s \cs{mkbibendnote} use \cs{postnote}. This is very
@@ -2204,15 +2209,15 @@
\AddToHook { postnotes/print/eachnote } [ postnotes ]
{
\@@_prop_get:nnN { \l_@@_print_note_id_tl }
- { biblatex at refsection } \l_@@_biblatex_restore_tl
+ { biblatex at refsection } \l_@@_restore_tmp_tl
\tl_if_eq:NNF
- \l_@@_biblatex_restore_tl
+ \l_@@_restore_tmp_tl
\g_@@_biblatex_prev_refsection_tl
{
\int_set:Nn \c at blx@maxsection
- { \l_@@_biblatex_restore_tl - 1 }
+ { \l_@@_restore_tmp_tl - 1 }
\tl_gset_eq:NN \g_@@_biblatex_prev_refsection_tl
- \l_@@_biblatex_restore_tl
+ \l_@@_restore_tmp_tl
\group_begin:
\cs_set_eq:NN \label \use_none:n
\cs_set_eq:NN \blx at info \use_none:n
@@ -2308,6 +2313,35 @@
% \end{macrocode}
%
%
+% \subsection*{\pkg{zref-check}}
+%
+% \begin{macrocode}
+\AddToHook { package/zref-check/after }
+ {
+ \IfPackageAtLeastTF { zref-check } { 2022-07-05 }
+ {
+ \AddToHook { postnotes/store/note } [ postnotes ]
+ {
+ \prop_gput:cnx { \@@_data_name:e { \l_@@_note_id_tl } }
+ { zref-check at abschap } { \int_use:N \c at zc@abschap }
+ \prop_gput:cnx { \@@_data_name:e { \l_@@_note_id_tl } }
+ { zref-check at abssec } { \int_use:N \c at zc@abssec }
+ }
+ \AddToHook { postnotes/print/eachnote } [ postnotes ]
+ {
+ \@@_prop_get:nnN { \l_@@_print_note_id_tl }
+ { zref-check at abschap } \l_@@_restore_tmp_tl
+ \int_set:Nn \c at zc@abschap { \l_@@_restore_tmp_tl }
+ \@@_prop_get:nnN { \l_@@_print_note_id_tl }
+ { zref-check at abssec } \l_@@_restore_tmp_tl
+ \int_set:Nn \c at zc@abssec { \l_@@_restore_tmp_tl }
+ }
+ }
+ { }
+ }
+% \end{macrocode}
+%
+%
% \subsection*{\pkg{amsmath}}
%
% \begin{macrocode}
Modified: trunk/Master/texmf-dist/tex/latex/postnotes/postnotes.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/postnotes/postnotes.sty 2022-07-06 20:18:18 UTC (rev 63821)
+++ trunk/Master/texmf-dist/tex/latex/postnotes/postnotes.sty 2022-07-06 20:18:37 UTC (rev 63822)
@@ -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 at postnotetext
- { \int_eval:n { \l__postnotes_print_counter_tl } }
+ { \l__postnotes_print_counter_tl }
\cs_set:Npx \@currentlabel
{ \p at 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 at 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 at refsection } \l__postnotes_biblatex_restore_tl
- \int_set:Nn \c at refsection { \l__postnotes_biblatex_restore_tl }
+ { biblatex at refsection } \l__postnotes_restore_tmp_tl
+ \int_set:Nn \c at refsection { \l__postnotes_restore_tmp_tl }
\__postnotes_prop_get:nnN { \l__postnotes_print_note_id_tl }
- { biblatex at refsegment } \l__postnotes_biblatex_restore_tl
- \int_set:Nn \c at refsegment { \l__postnotes_biblatex_restore_tl }
+ { biblatex at refsegment } \l__postnotes_restore_tmp_tl
+ \int_set:Nn \c at refsegment { \l__postnotes_restore_tmp_tl }
\__postnotes_prop_get:nnN { \l__postnotes_print_note_id_tl }
- { biblatex at refcontextbool } \l__postnotes_biblatex_restore_tl
- \use:c { toggle \l__postnotes_biblatex_restore_tl } { blx at refcontext }
+ { biblatex at refcontextbool } \l__postnotes_restore_tmp_tl
+ \use:c { toggle \l__postnotes_restore_tmp_tl } { blx at refcontext }
\__postnotes_prop_get:nnN { \l__postnotes_print_note_id_tl }
- { biblatex at refcontext } \l__postnotes_biblatex_restore_tl
- \blx at edef@refcontext { \l__postnotes_biblatex_restore_tl }
+ { biblatex at refcontext } \l__postnotes_restore_tmp_tl
+ \blx at 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 at abschap } { \int_use:N \c at zc@abschap }
+ \prop_gput:cnx { \__postnotes_data_name:e { \l__postnotes_note_id_tl } }
+ { zref-check at abssec } { \int_use:N \c at zc@abssec }
+ }
+ \AddToHook { postnotes/print/eachnote } [ postnotes ]
+ {
+ \__postnotes_prop_get:nnN { \l__postnotes_print_note_id_tl }
+ { zref-check at abschap } \l__postnotes_restore_tmp_tl
+ \int_set:Nn \c at zc@abschap { \l__postnotes_restore_tmp_tl }
+ \__postnotes_prop_get:nnN { \l__postnotes_print_note_id_tl }
+ { zref-check at abssec } \l__postnotes_restore_tmp_tl
+ \int_set:Nn \c at zc@abssec { \l__postnotes_restore_tmp_tl }
+ }
+ }
+ { }
+ }
\AddToHook { package/amsmath/after }
{
\AddToHook { postnotes/note/inhibit } [ postnotes ]
More information about the tex-live-commits
mailing list.