Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

making the rotating package tagging compatible #1537

Merged
merged 7 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading