latex2e icon indicating copy to clipboard operation
latex2e copied to clipboard

rotating: Provide access to the rotated \textheight

Open schtandard opened this issue 5 years ago • 9 comments

(latexbug tells me rotating is third party software, but the documentation tells me that it is maintianed by the team (and it is contained in this repo), so I am opening the issue here. If that is wrong, feel free to point me into the right direction.)

Brief outline of the issue

As can be seen from the MWE below, inside the minipage created by rotating's \@rotfloat (which sidewaysfigure relies on) \vsize and \textheight still contain the values from outside the environment while \hsize, \textwidth, \linewidth and \columnwidth are (correctly) set to the outer value of \textheight. This means that one does not have access to the text height of the rotated page (i.e. the outer \textwidth) inside the sidewaysfigure, unless one manually stores the value before.

Naturally, one may want to scale images inside the sidewaysfigure using that length, so access to the value would be a useful addition to the command.

If changing \vsize and \textheight is not an option due to backwards compatibility, a new length, say \rotatedtextheight or \outertextwidth, would be a workable alternative.

Minimal example showing the bug

\RequirePackage{latexbug}
\documentclass{article}

\usepackage{rotating}

\def\displaylengths{%
  \begin{tabular}{ l l }
    \dspllength\hsize
    \dspllength\vsize
    \dspllength\textwidth
    \dspllength\textheight
    \dspllength\linewidth
    \dspllength\columnwidth
  \end{tabular}%
}
\def\dspllength#1{%
  \texttt{\string#1} & \the#1 \\%
}

\begin{document}\makeatletter

\displaylengths

\begin{sidewaysfigure}
  \displaylengths
\end{sidewaysfigure}

\end{document}

Log file

testfile.log

schtandard avatar Aug 15 '19 15:08 schtandard

Yes, I adopted rotating into the latex graphics bundle after Sebastian died. We should update latexbug.

Will need to think about the rotating suggestion later.

On Thu, 15 Aug 2019 at 16:04, schtandard [email protected] wrote:

(latexbug tells me rotating is third party software, but the documentation tells me that it is maintianed by the team (and it is contained in this repo), so I am opening the issue here. If that is wrong, feel free to point me into the right direction.) Brief outline of the issue

As can be seen from the MWE below, inside the minipage created by rotating's @rotfloat (which sidewaysfigure relies on) \vsize and \textheight still contain the values from outside the environment while \hsize, \textwidth, \linewidth and \columnwidth are (correctly) set to the outer value of \textheight. This means that one does not have access to the text height of the rotated page (i.e. the outer \textwidth) inside the sidewaysfigure, unless one manually stores the value before.

Naturally, one may want to scale images inside the sidewaysfigure using that length, so access to the value would be a useful addition to the command.

If changing \vsize and \textheight is not an option due to backwards compatibility, a new length, say \rotatedtextheight or \outertextwidth, would be a workable alternative. Minimal example showing the bug

\RequirePackage{latexbug}\documentclass{article} \usepackage{rotating} \def\displaylengths{% \begin{tabular}{ l l } \dspllength\hsize \dspllength\vsize \dspllength\textwidth \dspllength\textheight \dspllength\linewidth \dspllength\columnwidth \end{tabular}% }\def\dspllength#1{% \texttt{\string#1} & \the#1 \% } \begin{document}\makeatletter \displaylengths \begin{sidewaysfigure} \displaylengths\end{sidewaysfigure} \end{document}

Log file

testfile.log https://github.com/latex3/latex2e/files/3505973/testfile.log

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/latex3/latex2e/issues/167?email_source=notifications&email_token=AAJVYAQ2WGN2HNRCYRBRDQLQEVV6HA5CNFSM4IL7CHL2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HFOOLQA, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJVYAVMZJNYWWUEH2OACLTQEVV6HANCNFSM4IL7CHLQ .

davidcarlisle avatar Aug 15 '19 15:08 davidcarlisle

updated latexbug ... the thinking still needs doing :-)

FrankMittelbach avatar Sep 14 '19 09:09 FrankMittelbach

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 28 '19 04:11 stale[bot]

@davidcarlisle for next release?

FrankMittelbach avatar Nov 28 '19 12:11 FrankMittelbach

@FrankMittelbach yes can do something...

davidcarlisle avatar Nov 28 '19 12:11 davidcarlisle

This issue has been automatically marked as stale because it has not had recent activity.

stale[bot] avatar Jan 27 '20 12:01 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity.

stale[bot] avatar Nov 09 '21 20:11 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity.

stale[bot] avatar Aug 13 '22 04:08 stale[bot]