
Me gustaría la siguiente política:
- La parte superior de la página
figure
ytable
los elementos flotantes deben estar un 15% hacia abajo en la página (e idealmente deben poder moverse hacia arriba si la cifra supera el 85% de la altura del texto). - Un entorno personalizado (
smallbox
) debe estar centrado verticalmente.
Básicamente, quiero configurarlo @fptop
excepto 0.15\textheight minus 0.15\textheight
en el mybox
caso (donde @fptop
debería aplicarse el valor predeterminado).
Mi solución inicial fue establecer:
\setlength{\@fptop}{0.15\textheight minus 0.15\textheight}
\setlength{\@fpbot}{0pt plus 1fil}
y luego con el siguiente entorno:
\usepackage{newfloat} %%
\DeclareFloatingEnvironment[listname={List of boxes}, name = {Box}]{boxe}
% The smallbox is a box intended for onecolumn.
\newenvironment{smallbox}[3][p]{%
\begin{boxe}[#1]
}{\end{boxe}}
añadiendo un espacio grande (como\vspace*{\fill}
en el último argumento del entorno. Sin embargo, esto no hace nada (es decirmantiene la parte superior del texto smallbox
al 15% de la altura del texto) o lo mueve demasiado (es decir, el cuadro pequeño está en la parte superior de la página).
MWE:
\documentclass[12pt,twocolumn]{article} %% twocolumn makes fptop more obvious
\makeatletter
\setlength{\@fptop}{0.15\textheight minus 0.15\textheight}
\setlength{\@fpbot}{0pt plus 1fil}
\makeatother
\usepackage{newfloat}
\DeclareFloatingEnvironment[listname={List of boxes}, name = {Box}]{boxe}
\newenvironment{smallbox}[1][p]{%
\begin{boxe}[#1]
}{\end{boxe}}
\usepackage[showframe]{geometry}
\usepackage[demo]{graphicx}
\usepackage{lipsum}
\begin{document}
.
\begin{figure}[p]
\caption{foo}
\includegraphics{}
\end{figure}
\clearpage
.
\begin{smallbox}
\lipsum[1]
\end{smallbox}
\end{document}
Respuesta1
Descubrí que usar a minipage
parece funcionar unas horas después de la publicación.
\newenvironment{smallbox}[1][p]{%
\begin{boxe}[#1]
\begin{minipage}[c][\textheight]{\linewidth}
}{\end{minipage}\end{boxe}}