I'm having some trouble with the placement of captions in my LaTeX document. I'm using the trivfloat package to create a "quadro" environment for my tables, similar to the regular "table" environment.
Here's a minimal example of my code:
Code: Select all
\documentclass{article}
\usepackage{caption}
\usepackage{trivfloat}
\trivfloat{quadro}
\begin{document}
\section{Introduction}
\begin{table}[!htbp]
\centering
\caption{Example of a table}
\begin{tabular}{|c|c|}
\hline
Column 1 & Column 2 \\
\hline
Data 1 & Data 2 \\
Data 3 & Data 4 \\
\hline
\end{tabular}
\end{table}
\begin{quadro}[!htbp]
\centering
\caption{Example of a quadro}
\begin{tabular}{|c|c|}
\hline
Column 1 & Column 2 \\
\hline
Data 1 & Data 2 \\
Data 3 & Data 4 \\
\hline
\end{tabular}
\end{quadro}
\end{document}
As you can see, the caption for the "table" environment is placed above the table, which is what I want. However, the caption for the "quadro" environment is placed below the table, and I'd like it to be above the quadro, similar to the "table" environment.
Is there a way to achieve this using the trivfloat package, or is there another package or method I should be using instead?
Any help or suggestions would be greatly appreciated. Thank you in advance!