diff options
author | Karl Berry <karl@freefriends.org> | 2023-02-16 21:35:35 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-02-16 21:35:35 +0000 |
commit | 4524edc6ed4f603e0d556d5b9c366de0425743f9 (patch) | |
tree | 4b9b583da1522d007128ae3e73d5442204a5b3e1 /Master/texmf-dist | |
parent | 7cd731f9eda70f3ba7b51998456b7480e7b7e435 (diff) |
postnotes (16feb23)
git-svn-id: svn://tug.org/texlive/trunk@65854 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/postnotes/CHANGELOG.md | 11 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/postnotes/postnotes-code.pdf | bin | 838960 -> 839836 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/postnotes/postnotes.pdf | bin | 177382 -> 177383 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/postnotes/postnotes.dtx | 35 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/postnotes/postnotes.sty | 21 |
5 files changed, 48 insertions, 19 deletions
diff --git a/Master/texmf-dist/doc/latex/postnotes/CHANGELOG.md b/Master/texmf-dist/doc/latex/postnotes/CHANGELOG.md index d9b24379f53..b626145fd0e 100644 --- a/Master/texmf-dist/doc/latex/postnotes/CHANGELOG.md +++ b/Master/texmf-dist/doc/latex/postnotes/CHANGELOG.md @@ -1,6 +1,15 @@ # Changelog -## [Unreleased](https://github.com/gusbrs/postnotes/compare/v0.2.1...HEAD) +## [Unreleased](https://github.com/gusbrs/postnotes/compare/v0.2.2...HEAD) + +## [v0.2.2](https://github.com/gusbrs/postnotes/compare/v0.2.1...v0.2.2) (2023-02-15) + +### Fixed +- Don't try to hyperlink `\postnotezref` when `zref-hyperref` is not loaded. +- "perhaps a missing \item" error for empty `\postnote`. + +### Changed +- Renamed `postnotes/print/eachnote` hook to `postnotes/print/note/begin`. ## [v0.2.1](https://github.com/gusbrs/postnotes/compare/v0.2.0...v0.2.1) (2023-02-13) diff --git a/Master/texmf-dist/doc/latex/postnotes/postnotes-code.pdf b/Master/texmf-dist/doc/latex/postnotes/postnotes-code.pdf Binary files differindex 644edf8e889..76ed8d090bf 100644 --- a/Master/texmf-dist/doc/latex/postnotes/postnotes-code.pdf +++ b/Master/texmf-dist/doc/latex/postnotes/postnotes-code.pdf diff --git a/Master/texmf-dist/doc/latex/postnotes/postnotes.pdf b/Master/texmf-dist/doc/latex/postnotes/postnotes.pdf Binary files differindex 52735b15623..6a20c7ba76e 100644 --- a/Master/texmf-dist/doc/latex/postnotes/postnotes.pdf +++ b/Master/texmf-dist/doc/latex/postnotes/postnotes.pdf diff --git a/Master/texmf-dist/source/latex/postnotes/postnotes.dtx b/Master/texmf-dist/source/latex/postnotes/postnotes.dtx index fab2cb99144..47271ac97a6 100644 --- a/Master/texmf-dist/source/latex/postnotes/postnotes.dtx +++ b/Master/texmf-dist/source/latex/postnotes/postnotes.dtx @@ -153,7 +153,7 @@ % % % \begin{macrocode} -\ProvidesExplPackage {postnotes} {2023-02-13} {0.2.1} +\ProvidesExplPackage {postnotes} {2023-02-15} {0.2.2} {Endnotes for LaTeX} % \end{macrocode} % @@ -1210,14 +1210,14 @@ % additional setup, specially to add support to packages and features which % require it. The \texttt{postnotes/print/begin} hook is run early in % \cs{@@_print_notes:} and only once per call, after the user options have -% been processed. The \texttt{postnotes/print/eachnote} hook is run once for -% each note, at the point where environment variables are being set or +% been processed. The \texttt{postnotes/print/note/begin} hook is run once +% for each note, at the point where environment variables are being set or % restored, before the typesetting of either the mark or the text, but within % a group of its own of each note. % % \begin{macrocode} \NewHook { postnotes/print/begin } -\NewHook { postnotes/print/eachnote } +\NewHook { postnotes/print/note/begin } % \end{macrocode} % % @@ -1350,7 +1350,7 @@ \l_@@_print_format_tl } \group_begin: - \UseHook { postnotes/print/eachnote } + \UseHook { postnotes/print/note/begin } \@@_get_pageref:Nx \pnthepage { mark@ \l_postnotes_print_note_id_tl } \@@_prop_get:nnN @@ -1377,6 +1377,10 @@ { \l_postnotes_print_note_id_tl } \l_@@_print_mark_tl } +% \end{macrocode} +% Leave vertical mode to avoid ``perhaps a missing \cs{item}'' error. +% \begin{macrocode} + \mode_leave_vertical: \l_@@_print_content_tl \l_@@_post_printnote_tl \group_end: @@ -2072,7 +2076,7 @@ % \end{macrocode} % Restore \pkg{biblatex} variables for each note. % \begin{macrocode} - \AddToHook { postnotes/print/eachnote } [ postnotes ] + \AddToHook { postnotes/print/note/begin } [ postnotes ] { \@@_prop_get:nnN { \l_postnotes_print_note_id_tl } { biblatex@refsection } \l_@@_restore_tmp_tl @@ -2201,7 +2205,7 @@ \tl_gset:Nx \g_@@_biblatex_prev_refsection_tl \l_@@_biblatex_orig_refsection_tl } - \AddToHook { postnotes/print/eachnote } [ postnotes ] + \AddToHook { postnotes/print/note/begin } [ postnotes ] { \@@_prop_get:nnN { \l_postnotes_print_note_id_tl } { biblatex@refsection } \l_@@_restore_tmp_tl @@ -2275,9 +2279,12 @@ \group_begin: \@@_typeset_mark_wrapper:n { - \bool_lazy_and:nnTF - { ! #1 } - { \l_@@_hyperlink_bool } + \bool_lazy_all:nTF + { + { ! #1 } + { \l_@@_hyperlink_bool } + { \l_@@_zrefhyperref_bool } + } { \hyperlink { \zref@extractdefault {#2} { anchor } { } } @@ -2294,6 +2301,12 @@ } % \end{macrocode} % +% \begin{macrocode} +\bool_new:N \l_@@_zrefhyperref_bool +\AddToHook { package/zref-hyperref/after } + { \bool_set_true:N \l_@@_zrefhyperref_bool } +% \end{macrocode} +% % % \subsection*{\pkg{zref-clever}} % @@ -2325,7 +2338,7 @@ \prop_gput:cnx { \@@_data_name:e { \l_postnotes_note_id_tl } } { zref-check@abssec } { \int_use:N \c@zc@abssec } } - \AddToHook { postnotes/print/eachnote } [ postnotes ] + \AddToHook { postnotes/print/note/begin } [ postnotes ] { \@@_prop_get:nnN { \l_postnotes_print_note_id_tl } { zref-check@abschap } \l_@@_restore_tmp_tl diff --git a/Master/texmf-dist/tex/latex/postnotes/postnotes.sty b/Master/texmf-dist/tex/latex/postnotes/postnotes.sty index b78ca391314..8dce52caa5f 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} {2023-02-13} {0.2.1} +\ProvidesExplPackage {postnotes} {2023-02-15} {0.2.2} {Endnotes for LaTeX} \cs_new:Npn \__postnotes_data_name:n #1 { g__postnotes_ #1 _data_prop } @@ -542,7 +542,7 @@ \tl_new:N \l__postnotes_print_content_tl \seq_new:N \l__postnotes_clear_queue_seq \NewHook { postnotes/print/begin } -\NewHook { postnotes/print/eachnote } +\NewHook { postnotes/print/note/begin } \newcounter { postnotetext } \newcounter { postnotesection } \setcounter { postnotesection } { 10000 } @@ -622,7 +622,7 @@ \l__postnotes_print_format_tl } \group_begin: - \UseHook { postnotes/print/eachnote } + \UseHook { postnotes/print/note/begin } \__postnotes_get_pageref:Nx \pnthepage { mark@ \l_postnotes_print_note_id_tl } \__postnotes_prop_get:nnN @@ -649,6 +649,7 @@ { \l_postnotes_print_note_id_tl } \l__postnotes_print_mark_tl } + \mode_leave_vertical: \l__postnotes_print_content_tl \l__postnotes_post_printnote_tl \group_end: @@ -990,9 +991,12 @@ \group_begin: \__postnotes_typeset_mark_wrapper:n { - \bool_lazy_and:nnTF - { ! #1 } - { \l__postnotes_hyperlink_bool } + \bool_lazy_all:nTF + { + { ! #1 } + { \l__postnotes_hyperlink_bool } + { \l__postnotes_zrefhyperref_bool } + } { \hyperlink { \zref@extractdefault {#2} { anchor } { } } @@ -1003,6 +1007,9 @@ \group_end: } } +\bool_new:N \l__postnotes_zrefhyperref_bool +\AddToHook { package/zref-hyperref/after } + { \bool_set_true:N \l__postnotes_zrefhyperref_bool } \AddToHook { package/zref-clever/after } { \zcsetup @@ -1024,7 +1031,7 @@ \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 ] + \AddToHook { postnotes/print/note/begin } [ postnotes ] { \__postnotes_prop_get:nnN { \l_postnotes_print_note_id_tl } { zref-check@abschap } \l__postnotes_restore_tmp_tl |