Graphics, Figures & TablesText and sidewaysfigure at the same page

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
peris
Posts: 1
Joined: Fri Aug 21, 2009 12:17 am

Text and sidewaysfigure at the same page

Post by peris »

Hi guys,

I would like to put some text and after it a landscape figure (the caption 90º rotated too). I've tried with sidewaysfigure environment but it seems this environment introduces a newpage command. Following a minimal example:

Code: Select all

\documentclass[a4paper,12pt,twoside]{book}
\usepackage{rotating}

\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent
sodales tristique neque non malesuada. Vivamus dictum, mi vel
condimentum convallis, odio lectus pharetra felis, ac aliquam risus
justo eu lectus. 

\begin{sidewaysfigure}[H]
\centering
\rule{0.2\textwidth}{7cm}
\caption{Test}
\label{fig:test}
\end{sidewaysfigure}
\end{document}
Any idea? Thanks in advance.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Text and sidewaysfigure at the same page

Post by gmedina »

Hi,

the hvfloat package could be useful; take a look at the following example:

Code: Select all

\documentclass[a4paper,12pt,twoside]{book}
\usepackage{hvfloat}

\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent
sodales tristique neque non malesuada. Vivamus dictum, mi vel
condimentum convallis, odio lectus pharetra felis, ac aliquam risus
justo eu lectus.

\hvFloat[rotAngle=270]%
  {figure}%
  {\rule{.2\textwidth}{7cm}}%
  [short caption]{long caption}%
  {fig:fig1}

\end{document}
Please, refer to the package documentation for further information.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply