Skip to content

Commit

Permalink
making the rotating package tagging compatible (#1537)
Browse files Browse the repository at this point in the history
* handle tagging 751+112, WIP

* add \leavevmode for latex3/tagging-project#112

* update changes entry

* docu

* update dates
  • Loading branch information
u-fischer authored Jan 14, 2025
1 parent bf1bcd0 commit b8391f3
Show file tree
Hide file tree
Showing 8 changed files with 3,809 additions and 2 deletions.
5 changes: 5 additions & 0 deletions required/graphics/changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ are not part of the distribution.
================================================================================
All changes above are only part of the development branch for the next release.
================================================================================
2025-01-14 Ulrike Fischer <[email protected]>

* rotating.dtx: Tagging support for sideways floats (tagging-project#751).
Added \leavevmode to sideways, turn etc (tagging-project#112).


2024-12-31 David Carlisle <[email protected]>

Expand Down
21 changes: 19 additions & 2 deletions required/graphics/rotating.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
\ProvidesFile{rotating.dtx}%
%</dtx>
%<package>\ProvidesPackage{rotating}%
[2016/08/11 v2.16d
[2025/01/14 v2.16e
%<package> rotated objects in LaTeX%
%<*dtx>
rotating package source file%
Expand Down Expand Up @@ -257,8 +257,12 @@
% \section{Turning and rotation environments}
% \begin{macro}{sideways}
% Environment to turn the contents through 90 degrees.
% \changes{v2.16e}{2025/01/14}{add \cs{leavevmode} for tagging support}
% \cs{Grot@box} issues a \cs{leavevmode} but for tagging (when using lualatex)
% this is too late, it should happen before the box is set.
% \begin{macrocode}
\def\sideways{%
\leavevmode
\Grot@setangle{90}%
\setbox\z@\color@hbox\ignorespaces}
\def\endsideways{%
Expand All @@ -272,8 +276,10 @@
%
% \begin{macro}{turn}
% Rotate the contents of the environment, leaving the appropriate space
% \changes{v2.16e}{2025/01/14}{add \cs{leavevmode} for tagging support}
% \begin{macrocode}
\def\turn#1{%
\leavevmode
\Grot@setangle{#1}%
\setbox\z@\color@hbox\ignorespaces}
\def\endturn{%
Expand All @@ -286,8 +292,10 @@
% \end{macro}
% \begin{macro}{rotate}
% Rotate the contents of the environment, leaving \emph{no space}.
% \changes{v2.16e}{2025/01/14}{add \cs{leavevmode} for tagging support}
% \begin{macrocode}
\def\rotate#1{%
\leavevmode
\Grot@setangle{#1}%
\setbox\z@\color@hbox\ignorespaces}
\def\endrotate{%
Expand All @@ -301,8 +309,10 @@
% \end{macro}
% \begin{macro}{\turnbox}
% A macro version of the `rotate' environment.
% \changes{v2.16e}{2025/01/14}{add \cs{leavevmode} for tagging support}
% \begin{macrocode}
\def\turnbox#1#2{%
\leavevmode
\Grot@setangle{#1}%
% \end{macrocode}
% Note: grouping within the box makes \cs{color@hbox} unnecessary, I think.
Expand Down Expand Up @@ -350,9 +360,13 @@
% \end{macrocode}
% Set the float contents in
% a box of width \cs{textheight} instead of \cs{columnwidth}.
% \changes{v2.16e}{2025/01/14}{correct tagging of the minipage}
% \begin{macrocode}
\begin{lrbox}\rot@float@box
\SuspendTagging{\minipage}%
\begin{minipage}\textheight
\ResumeTagging{\minipage}%
\UseTaggingSocket{para/restore}%
}
% \end{macrocode}
% \end{macro}
Expand All @@ -372,7 +386,10 @@
% we need to use the a variant \cs{pageref} mechanism and our own
% specialised labels.
% \begin{macrocode}
\end{minipage}\end{lrbox}%
\par\SuspendTagging{\minipage}%
\end{minipage}%
\ResumeTagging{\minipage}%
\end{lrbox}%
\stepcounter{r@tfl@t}%
\rot@label{RF\ther@tfl@t}%
\rot@pageref{RF\ther@tfl@t}{\R@@page}%
Expand Down
Loading

0 comments on commit b8391f3

Please sign in to comment.