0

So I'm trying to rotate a basic array:

\begin{array}[b]{*{4}c}\\
& 2 & 3 & 4\\
5 & 6 & 7 & 8\\
\end{array}

But for a particular reason I can't use any packages. (So graphicx, rotating, rotfloat, etc. cannot be used) Is there a way to rotate a box/array with just native latex?

3
  • Copy the package source code in, then proceed as usual.
    – user202729
    Commented Jul 13, 2022 at 7:17
  • 1
    graphicx is a required part of LaTeX: an installation without it is fundamentally broken. Can you explain the requirements a bit more?
    – Joseph Wright
    Commented Jul 13, 2022 at 7:28
  • I need something that doesn't use "\usepackage" or any of its equivalents as I'm writing something that should be able to be copied/pasted into an arbitrary latex document no matter what they have imported. Commented Jul 13, 2022 at 11:00

1 Answer 1

5

With a rather current latex:

\documentclass{article}

\begin{document}

\newsavebox\mybox
\savebox\mybox{%
  \begin{array}[b]{*{4}c}\\
    & 2 & 3 & 4\\
   5 & 6 & 7 & 8\\
  \end{array}}

\ExplSyntaxOn
\box_rotate:Nn\mybox{90}
\ExplSyntaxOff

\usebox\mybox

\end{document}

enter image description here

3
  • What do you mean by "rather current latex"? Like would 2020 version be ok? Or is that not current enough? Commented Jul 13, 2022 at 11:01
  • Why don't you try? Commented Jul 13, 2022 at 11:02
  • Ah ok, I thought you were mentioning it because you knew one of the commands were more recently introduced. I'll go ahead and test it out on different versions and see where it works. Thanks! Commented Jul 13, 2022 at 13:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .