Skip to content

Commit

Permalink
add some experiments about line breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
u-fischer committed Mar 14, 2024
1 parent 3c92779 commit c9c88c2
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 2 deletions.
Binary file added experiments/link-break-page.pdf
Binary file not shown.
30 changes: 30 additions & 0 deletions experiments/link-break-page.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
\DocumentMetadata{uncompress,testphase={phase-III,title},pdfversion=2.0,pdfstandard=ua-2}
\documentclass{article}
\ExplSyntaxOn
\hook_gremove_code:nn {pdfannot/link/URI/before}{tagpdf}
\hook_gremove_code:nn {pdfannot/link/URI/after}{tagpdf}
\ExplSyntaxOff
\usepackage{hyperref}
\hypersetup{pdftitle=Link breaks}
\textheight 2cm
\textwidth 4cm
\begin{document}
some text \\some text\\some text \\
\ExplSyntaxOn
\tag_mc_end_push:
\tag_struct_begin:n { tag=Link }
\tag_mc_begin:n { tag=Link }
\group_begin:
\pdfannot_dict_put:nne
{ link/URI }
{ StructParent }
{ \tag_struct_parent_int: }
\href{https://latex-project.org}{this~link~leads~to~the~\LaTeX{}}
\tag_struct_insert_annot:ee {\pdfannot_ref_last:}{\tag_struct_parent_int:}
\group_end:\\
\href{https://latex-project.org}{project~page}%
\tag_mc_end:
\tag_struct_end:
\tag_mc_begin_pop:n{}~more text
\ExplSyntaxOff
\end{document}
Binary file modified experiments/link-with-line-break.pdf
Binary file not shown.
Binary file added experiments/structparent-link.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions experiments/structparent-link.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
% The other are "untagged".
% Regarding the spec this is probably more correct, but verapdf complains ...

\DocumentMetadata{uncompress,testphase=phase-III,xmp=false,pdfversion=2.0,pdfstandard=ua-2}
\DocumentMetadata{uncompress,testphase={phase-III,title},pdfversion=2.0,pdfstandard=ua-2}
\documentclass{article}
\ExplSyntaxOn
\hook_gremove_code:nn {pdfannot/link/URI/before}{tagpdf}
Expand Down Expand Up @@ -40,7 +40,7 @@

\ExplSyntaxOff
\usepackage{hyperref}

\hypersetup{pdftitle=Structparent test}
\begin{document}
\href{https://latex-project.org}{abc\\blub}%
\end{document}

0 comments on commit c9c88c2

Please sign in to comment.