![如何在不使用 pdflscape 的情况下使用 sidewaystable/figure 旋转 pdf 页面?](https://linux22.com/image/362472/%E5%A6%82%E4%BD%95%E5%9C%A8%E4%B8%8D%E4%BD%BF%E7%94%A8%20pdflscape%20%E7%9A%84%E6%83%85%E5%86%B5%E4%B8%8B%E4%BD%BF%E7%94%A8%20sidewaystable%2Ffigure%20%E6%97%8B%E8%BD%AC%20pdf%20%E9%A1%B5%E9%9D%A2%EF%BC%9F.png)
我有一个sidewaysfigure
,但是我想旋转pdf
包含此表的页面,避免使用pdflscape
包。我该怎么做?
\documentclass[12pt,a4paper]{article}
\usepackage{blindtext}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{rotating}
\begin{document}
\blindtext\par
%
\begin{sidewaysfigure}
\centering
I'd like to rotate this page
\caption{An example}
\end{sidewaysfigure}
\Blindtext
\end{document}
答案1
编辑:
\documentclass{article}
\usepackage{blindtext}
\usepackage{rotating}
\usepackage{caption}
\usepackage{tikz}
\begin{document}
\blindtext\par
\pagebreak
\global\pdfpageattr\expandafter{\the\pdfpageattr/Rotate 90}
\thispagestyle{empty}
\begin{tikzpicture}
\node[rotate=90] at (0,0) {\begin{minipage}{\textheight}
\begin{center}
I'd like to rotate this page
\end{center}
\blindtext
\centering
\includegraphics[width=0.3\textwidth]{example-image-a}
\captionof{figure}{Test caption}
\end{minipage}};
\end{tikzpicture}
\pagebreak
\global\pdfpageattr\expandafter{\the\pdfpageattr/Rotate 0}
\Blindtext
\end{document}
来自这里的答案:https://tex.stackexchange.com/a/40692/120578
\documentclass{article}
\begin{document}
text
\pagebreak[4]
\global\pdfpageattr\expandafter{\the\pdfpageattr/Rotate 90}
text
\pagebreak
\global\pdfpageattr\expandafter{\the\pdfpageattr/Rotate 0}
text
\end{document}
我不想改变原始答案,所以我在这里写下这个作为重复问题的答案(我将标记它,但我会在原始答案的评论中引用它)。