Estoy usando endfloat
para procesar todas mis tablas al final de mi documento. También estoy usando la opción para suprimir marcadores en el texto. Sin embargo, endfloat
todavía parece insertar un espacio donde habría estado el marcador (de hecho, creando un espacio innecesario entre mis párrafos). La razón por la que esto sucede es por las etiquetas de centrado. Eliminarlos soluciona el problema. ¿Por qué pasó esto? MWE:
\documentclass[english]{article}
\usepackage[nolists,tablesfirst,nomarkers]{endfloat}
\begin{document}
Some text here Some text here Some text here Some text here Some text
here Some text here Some text here Some text here Some text here Some
text here Some text here Some text here Some text here Some text here
Some text here Some text here Some text here Some text here Some text
here Some text here Some text here Some text here Some text here Some
text here Some text here Some text here Some text here Some text here
Some text here
\begin{center}
\begin{table}
\protect\caption{My Table}
\begin{tabular}{|c|c|c|c|c|}
\hline
a & & & & \tabularnewline
\hline
\hline
& b & & & \tabularnewline
\hline
& & & & \tabularnewline
\hline
& & & & \tabularnewline
\hline
& & & & \tabularnewline
\hline
\end{tabular}
\end{table}
\par\end{center}
Some more text here Some more text here Some more text here Some more
text here Some more text here Some more text here Some more text here
Some more text here Some more text here Some more text here Some more
text here Some more text here Some more text here Some more text here
Some more text here Some more text here Some more text here Some more
text here Some more text here Some more text here
\end{document}
Respuesta1
Ese espacio es causado por center
el medio ambiente. El center
entorno se define como trivlist
(o simplemente como list
)
\def\center{\trivlist \centering\item\relax}
\def\endcenter{\endtrivlist}
Como puedes ver, es una \trivlist
ronda \centering
. El efecto de \trivlist
es agregar \topsep
, \partopsep
etc. Para conocer las definiciones de estas cosas, consulte latex.ltx
. En conclusión, el center
ambiente añade espacio vertical arriba y abajo, lo que, en algunos casos (como este) es innecesario.
Además, la tabla contenida dentro del center
entorno flota (se colocará al final), pero el center
entorno permanece donde está. El espacio en blanco (asociado con center
el entorno) también permanece en la posición original y table
estará fuera del center
entorno y, por lo tanto, no estará centrado.
Evite esos espacios usando solo \centering
.
\documentclass[english]{article}
\usepackage[nolists,tablesfirst,nomarkers]{endfloat}
\begin{document}
Some text here Some text here Some text here Some text here Some text
here Some text here Some text here Some text here Some text here Some
text here Some text here Some text here Some text here Some text here
Some text here Some text here Some text here Some text here Some text
here Some text here Some text here Some text here Some text here Some
text here Some text here Some text here Some text here Some text here
Some text here
%\begin{center}
\begin{table}
\caption{My Table} %% no need of \protect use \caption[short title] instead
\centering %%<--- here
\begin{tabular}{|c|c|c|c|c|}
\hline
a & & & & \tabularnewline
\hline
\hline
& b & & & \tabularnewline
\hline
& & & & \tabularnewline
\hline
& & & & \tabularnewline
\hline
& & & & \tabularnewline
\hline
\end{tabular}
\end{table}
%\par\end{center}
Some more text here Some more text here Some more text here Some more
text here Some more text here Some more text here Some more text here
Some more text here Some more text here Some more text here Some more
text here Some more text here Some more text here Some more text here
Some more text here Some more text here Some more text here Some more
text here Some more text here Some more text here
\end{document}