
Aquí hay un ejemplo demasiado simplificado. Mi problema es \justify
y/o \clearpage
crea un error en la primera \item
línea que dice "posible elemento faltante". He usado una secuencia de código similar arriba de esta sección sin errores; sin embargo, era una tabla, un texto, otra tabla. Me pregunto si existe una manera más eficiente de devolver texto después de mi \centering
tabla o figura para que esté justificado y se parezca al resto de mi documento. ¿El error también se debe a otro paquete o es la enumeración?
\documentclass[draft]{article}
\usepackage[showframe]{geometry}
\usepackage{ragged2e}
\usepackage{adjustbox}
\usepackage{caption}
\begin{document}
\paragraph{Paragraph 1}
Filler text is here. \\
\centering
\begin{adjustbox}{max width=\textwidth}
\begin{tabular}{|c|c|}
\hline
Filler & Whatever \\
\hline
\end{tabular}
\end{adjustbox}
\captionof{figure}{Filling for Figure}
\justify
\paragraph{Paragraph 2}
Filler Text
\centering
\captionof{table}{Table 1}
\begin{adjustbox}{max width=\textwidth}
\begin{tabular}{|c|c|}
\hline
x & 1 \\
\hline
y & 3 \\
\hline
\end{tabular}
\end{adjustbox}
\clearpage %Adding this errors out
\justify %Or this
\paragraph{Paragraph 3}
Filler text to show up.
\begin{enumerate}
\item Function
\item Filler Text
\end{enumerate}
\end{document}
Edición 1: hizo que el documento incluyera los paquetes adecuados.
Edición 2: el documento ahora da un error al incluir las 2 líneas con comentarios. Mi objetivo general es tener los tres párrafos y la lista enumerada justificada como lo hace un documento "normal". Las 2 tablas y sus títulos deben estar centrados tal como están.
Respuesta1
Como ya se señaló en los comentarios, debe usar \justifying
, no \justify
(ese comando existe solo debido a un efecto secundario de cómo LaTeX implementa el justify
entorno).