Thank you very much, Johannes_B.
The funny thing is that, when I run the following code,
Code: Select all
\documentclass{article}
\usepackage{graphicx}
\usepackage{subfig}
\begin{document}
\begin{figure}[h]
\centering
\caption{Intuitive explanation of Models 1 and 2}
\label{intuition}
\subfloat[Linear projection of tuition prices into ENEM results\label{levelintuition}]{\includegraphics[width=.45\columnwidth]{model1.png}} \quad
\subfloat[Correlation between tuition prices and ENEM results\label{growthintuition}]{\includegraphics[width=.45\columnwidth]{model2.png}}
\end{figure}
Subfigures \ref{levelintuition} and \ref{growthintuition} are nice.
\end{document}
I get a very nice output

- Output 1
- test.PNG (40.79 KiB) Viewed 14011 times
.
However, when I copy and paste the above code in the middle of my article, the output is not as nice because, although the caption says figure 1, we can read subfigures 2a and 2b at the top of the figure and the subcaption are below the figures.

- Output 2
- sample.PNG (58.46 KiB) Viewed 14011 times
Moreover, when I run the code
Code: Select all
\begin{figure}[h]
\centering
\subfloat[Linear projection of tuition prices into ENEM results\label{levelintuition}]{\includegraphics[width=.45\columnwidth]{model1.png}} \quad
\subfloat[Correlation between tuition prices and ENEM results\label{growthintuition}]{\includegraphics[width=.45\columnwidth]{model2.png}}
\caption{Intuitive explanation of Models \ref{level} and \ref{growth}\label{intuition}}
\end{figure}
,
the references are correctly numbered, but the captions are below the figure.

- Output 3
- sample2.PNG (53.67 KiB) Viewed 14011 times
I wanted the captions to be above the figure. Can it be a problem in my preamble? I think it is, because when I run
Code: Select all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Arsclassica Article
% LaTeX Template
% Version 1.1 (10/6/14)
%
% This template has been downloaded from:
% http://www.LaTeXTemplates.com
%
% Original author:
% Lorenzo Pantieri (http://www.lorenzopantieri.net) with extensive modifications by:
% Vel (vel@latextemplates.com)
%
% License:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%----------------------------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------
\documentclass[
10pt, % Main document font size
a4paper, % Paper type, use 'letterpaper' for US Letter paper
oneside, % One page layout (no page indentation)
%twoside, % Two page layout (page indentation for binding and different headers)
headinclude,footinclude, % Extra spacing for the header and footer
BCOR5mm, % Binding correction
]{scrartcl}
\input{structure.tex} % Include the structure.tex file which specified the document structure and layout
\usepackage[left=3cm,right=2cm,top=3cm,bottom=2cm]{geometry}
\hyphenation{Fortran hy-phen-ation} % Specify custom hyphenation points in words with dashes where you would like hyphenation to occur, or alternatively, don't put any dashes in a word to stop hyphenation altogether
%----------------------------------------------------------------------------------------
% Packages
%----------------------------------------------------------------------------------------
%----------------------------------------------------------------------------------------
% Main packages
%----------------------------------------------------------------------------------------
% \usepackage{cmap} % Mapear caracteres especiais no PDF
% \usepackage{newtxtext} % Usa a fonte Times New Roman
\usepackage{color} % Permite o uso de textos coloridos
% \usepackage{indentfirst} % Indenta o primeiro parágrafo de cada seção.
% \usepackage{microtype} % para melhorias de justificação
\usepackage{url} % Para escrever links
\usepackage{float} % Para não deixar figuras voando no texto
% \newsubfloat{figure} % Subfigures
% \usepackage{pbox}
% \usepackage[flushleft]{threeparttable} % Aparentemente, isso deveria me ajudar a fazer notas de tabela.
%----------------------------------------------------------------------------------------
% MATH PACKAGES
%----------------------------------------------------------------------------------------
\usepackage{dsfont} %Escreve a função indicadora
\usepackage{bm}
\theoremstyle{plain} % Define theorem styles here based on the plain style (used for theorems, lemmas, propositions)
\newtheorem{model}{Model}
%----------------------------------------------------------------------------------------
% TABLE PACKAGES
%----------------------------------------------------------------------------------------
\usepackage{tabulary}
\usepackage{enumerate}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{pdflscape}
\usepackage{afterpage}
\usepackage{capt-of}
%----------------------------------------------------------------------------------------
% BIBLIOGRAPHY PACKAGES
%----------------------------------------------------------------------------------------
\usepackage{natbib}
\bibliographystyle{plainnat}
%----------------------------------------------------------------------------------------
% TITLE AND AUTHOR(S)
%----------------------------------------------------------------------------------------
\title{\normalfont\spacedallcaps{Title}} % The article title
\author{\spacedlowsmallcaps{Author}} % The article author(s) - author affiliations need to be specified in the AUTHOR AFFILIATIONS block
\date{May 2015} % An optional date to appear under the author(s)
\begin{document}
\begin{figure}[h]
\centering
\caption{Intuitive explanation of Models 1 and 2}
\label{intuition}
\subfloat[Linear projection of tuition prices into ENEM results\label{levelintuition}]{\includegraphics[width=.45\columnwidth]{model1.png}} \quad
\subfloat[Correlation between tuition prices and ENEM results\label{growthintuition}]{\includegraphics[width=.45\columnwidth]{model2.png}}
\end{figure}
Subfigures \ref{levelintuition} and \ref{growthintuition} are nice.
\end{document}
my output is problematic again:

- Output 4
- test2.PNG (46.72 KiB) Viewed 14011 times
If it helps, I also added my two figures