[latex3-commits] [latex3/latex3] dvips-breaklinks: Enable link breaking for dvips (36921f25a)
github at latex-project.org
github at latex-project.org
Sun Jul 16 08:48:44 CEST 2023
Repository : https://github.com/latex3/latex3
On branch : dvips-breaklinks
Link : https://github.com/latex3/latex3/commit/36921f25a040919333eccf282fe1bea892789316
>---------------------------------------------------------------
commit 36921f25a040919333eccf282fe1bea892789316
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Sun Jul 16 08:44:16 2023 +0200
Enable link breaking for dvips
>---------------------------------------------------------------
36921f25a040919333eccf282fe1bea892789316
l3backend/CHANGELOG.md | 3 +++
l3backend/l3backend-pdf.dtx | 41 +++++++++++++++++++----------------------
2 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/l3backend/CHANGELOG.md b/l3backend/CHANGELOG.md
index 5877ce53d..cfd05b969 100644
--- a/l3backend/CHANGELOG.md
+++ b/l3backend/CHANGELOG.md
@@ -6,6 +6,9 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+### Changed
+- Enable link breaking in `dvips`
+
## [2023-04-19]
### Changed
diff --git a/l3backend/l3backend-pdf.dtx b/l3backend/l3backend-pdf.dtx
index d99b100b8..eccac5be7 100644
--- a/l3backend/l3backend-pdf.dtx
+++ b/l3backend/l3backend-pdf.dtx
@@ -571,38 +571,35 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\@makecol at hook}
-% Hooks to allow link breaking: something will be needed in format mode
-% at some stage. At present this code is disabled as there is an open
-% question about the name of the hook: to be resolved at the \LaTeXe{}
-% end.
+% \begin{macro}{\@makecol}
+% Install the necessary code to break links.
% \begin{macrocode}
-\use_none:n
+\bool_lazy_and:nnT
+ { \cs_if_exist_p:N \hook_gput_code:nnn }
+ { \cs_if_exist_p:N \@makecol }
{
- \cs_if_exist:NT \@makecol at hook
+ \hook_gput_code:nnn { cmd / @makecol / before }
+ { backend }
{
- \tl_put_right:Nn \@makecol at hook
+ \box_if_empty:NF \l_shipout_box
{
- \box_if_empty:NF \l_shipout_box
+ \vbox_set:Nn \l_shipout_box
{
- \vbox_set:Nn \l_shipout_box
+ \__kernel_backend_postscript:n
{
- \__kernel_backend_postscript:n
- {
- pdf.globaldict /pdf.brokenlink.rect ~ known
- { pdf.bordertracking.continue }
- if
- }
- \vbox_unpack_drop:N \l_shipout_box
- \__kernel_backend_postscript:n
- { pdf.bordertracking.endpage }
+ pdf.globaldict /pdf.brokenlink.rect ~ known
+ { pdf.bordertracking.continue }
+ if
}
+ \vbox_unpack_drop:N \l_shipout_box
+ \__kernel_backend_postscript:n
+ { pdf.bordertracking.endpage }
}
}
- \tl_set:Nn \l_@@_breaklink_pdfmark_tl { pdf.pdfmark }
- \cs_set_eq:NN \@@_breaklink_postscript:n \__kernel_backend_postscript:n
- \cs_set_eq:NN \@@_breaklink_usebox:N \hbox_unpack:N
}
+ \tl_set:Nn \l_@@_breaklink_pdfmark_tl { pdf.pdfmark }
+ \cs_set_eq:NN \@@_breaklink_postscript:n \__kernel_backend_postscript:n
+ \cs_set_eq:NN \@@_breaklink_usebox:N \hbox_unpack:N
}
% \end{macrocode}
% \end{macro}
More information about the latex3-commits
mailing list.