2

Without doing something in this document, the section and subsection font type seems to be quite different.

I get this:enter image description here

When I should be getting this: enter image description here

The problem is that the section 1 and subsection 1.1 font type should be the one on the second image and not the one on the first. For some reason, when running the exact same code, I got the first images' font.

I only get the same result as before (second image) when I add "\renewcommand\rmdefault{lmr}" in the preamble,

My code:

\documentclass[12pt]{article}
\usepackage{lmodern}
\usepackage[dvipsnames]{xcolor}
\usepackage{graphicx}
\usepackage{ae,aecompl}
\usepackage[T1]{fontenc}
\graphicspath{ {images/} }
\usepackage[a4paper, total={6.5in, 8in}]{geometry}
\usepackage{titling}
\setlength{\droptitle}{-8em}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{float}
\usepackage{mathtools}
\usepackage{subcaption}
\renewcommand\rmdefault{lmr}
\begin{document}
\title{Problem Set 1 - Macroeconomic Theory} 
\date{\today}
\maketitle
\section{The Ramsey-Cass-Koopmans Model}
\subsection{The Ramsey Problem}
(a) 
$$Max \quad U_{0}=\int_{0}^{\infty} e^{-\rho t}u(c_{t}) dt$$ \\ \vspace{-2mm}
$s.t.\quad \dot{k}=f(k_{t})-c_{t}-nk_{t}$\\ \vspace{2mm}
$c_{t}, k_{t}\geq 0$ 
\end{center}
\end{document}

Thank you! And sorry for any mistake, recent and autodidact economics student.

  • 1
    What difference do you see? The size is different when using the article class. – egreg May 19 '20 at 17:37
  • 2
    I can't read you code. Please provide an MWE (from \documentclass... to \end{document}) that we can process that shows your problem. – Peter Wilson May 19 '20 at 18:21
  • 1
    if you are getting a different font then you have specified a different font in your document, but as you have shown no code at all, what help can we offer? Provide a complete small document that produces the problem that you see, – David Carlisle May 19 '20 at 20:35
  • @joaomariapc: it looks like you have two separate accounts. You can go here to merge them. – Circumscribe May 19 '20 at 21:20
  • 1
    It isn't at all clear what issue you have but don't do \usepackage{ae,aecompl} in any document written this century, the ae fonts were an early test release of what became T1 encoding. Certainly it makes no sense to load them and the lmodern package as you are then specifying two fonts both to be the main document font. also don't use $$ in latex, it is not supported syntax. – David Carlisle May 21 '20 at 22:15

1 Answers1

0

I can’t solve your problem, mainly because it is very unclear what your problem is. It seems to be that you think the section and subsection are being set in too big a font size, is that correct?

There are lots and lots of very kind and knowledgeable people here who are happy to help beginners like you, but you have to provide enough information. The most important of which is an MWE: a minimum, working example.

First, what you have provided is not a working example. It doesn’t compile, which you would have easily discovered if you had just tried to compile it yourself. The \end{centre} on the 2nd to last line has no corresponding \begin{centre}. So remove that.

Next, it should be minimum. Remove anything not relevant to your problem. So the maths doesn’t seem to be relevant. And your MWE doesn’t have any graphics or floats in it. So you can remove

\usepackage[dvipsnames]{xcolor}
\usepackage{graphicx}
\graphicspath{ {images/} }
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{float}
\usepackage{mathtools}

Let’s add some lorem ipsum text, and your MWE now looks like this:

\documentclass[12pt]{article}
\usepackage{lmodern}
\usepackage{ae,aecompl}
\usepackage[T1]{fontenc}
\usepackage[a4paper, total={6.5in, 8in}]{geometry}
\usepackage{titling}
\setlength{\droptitle}{-8em}
\usepackage{subcaption}
\renewcommand\rmdefault{lmr}
\begin{document}
\title{Problem Set 1 - Macroeconomic Theory} 
\date{\today}
\maketitle
\section{The Ramsey-Cass-Koopmans Model}
Incididunt veniam non ipsum adipisicing aliquip id laborum nisi adipisicing consectetur
irure do. Aute veniam occaecat ipsum proident cupidatat Lorem mollit incididunt dolore
tempor laborum commodo. Ea sit nulla sunt veniam aliqua et magna aliquip dolor. Quis in
veniam ipsum et mollit dolor elit adipisicing labore Lorem eiusmod adipisicing esse
proident.
\subsection{The Ramsey Problem}
Qui qui ex officia consequat laborum nulla aliqua voluptate ea minim magna. Nostrud minim
exercitation deserunt sint voluptate amet aute laboris exercitation irure tempor
reprehenderit. Amet pariatur enim anim laborum. Proident consectetur duis sit
proident.
\end{document}

Now, if I compare the output of that with this even more minimal version

\documentclass[12pt]{article}
\usepackage[a4paper, total={6.5in, 8in}]{geometry}
\begin{document}
\title{Problem Set 1 - Macroeconomic Theory} 
\date{\today}
\maketitle
\section{The Ramsey-Cass-Koopmans Model}
Incididunt veniam non ipsum adipisicing aliquip id laborum nisi adipisicing consectetur
irure do. Aute veniam occaecat ipsum proident cupidatat Lorem mollit incididunt dolore
tempor laborum commodo. Ea sit nulla sunt veniam aliqua et magna aliquip dolor. Quis in
veniam ipsum et mollit dolor elit adipisicing labore Lorem eiusmod adipisicing esse
proident.
\subsection{The Ramsey Problem}
Qui qui ex officia consequat laborum nulla aliqua voluptate ea minim magna. Nostrud minim
exercitation deserunt sint voluptate amet aute laboris exercitation irure tempor
reprehenderit. Amet pariatur enim anim laborum. Proident consectetur duis sit
proident.
\end{document}

I can see no difference in the font-size of the section and subsection.

So I am sorry to say that I just don’t understand what your problem is. You will need to try to explain it better.

But most importantly, learn how to create a proper MWE. More often than not, doing that can often lead to you discovering the cause of your problem and solving it yourself without even needing to ask here.

Sorry I couldn’t help more.

ddbrierton
  • 98
  • 8
  • I don't think this is an answer (it could be edited to be one) you fixed the problem by removing the ae package which over-writes the settings from lmodern.(Or at least that is what I assume the question is) – David Carlisle Feb 14 '21 at 15:15