Is it possible ot increase the size of the number of a section, while also slightly increasing the size of the section text. Now, when we are using the standard \section
and \subsection
within \begin{document}
looks like the following:
What we would like is to have something look like the following, where the number of the section is much larger than the text, and the section text font is also increased in size. The subsection can stay as they already are.
UPDATE
The section are as we wanted them to be now, but it messed up or head of every page. We use \pagestyle{fancy}
but it seems like it doesn't work well together with the titlesec
library because if we remove the \usepackage{titlesec}
, then my header is visible and contains Validation of Meteorological Data by Machine Learning, but when adding \usepackage{titlesec}
, the header just writes 0. like that, which is very odd to us.
This is the main file:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{titling}
\usepackage{float}
\usepackage{layout}
\usepackage{makecell}
\usepackage{geometry}
\usepackage{titleps}
\usepackage{fancyhdr}
\usepackage{vmargin}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{titlesec}
\hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=blue,
citecolor = black,
urlcolor=blue,
}
\title{Validation of Meteorological Data by Machine Learning}
\author{Ahmad Josef Sahebzadeh\\}
\date{\today}
\renewcommand\theadfont{\normalsize}
\renewcommand\theadalign{bc}
\renewcommand\theadfont{\bfseries}
\renewcommand\theadgape{\Gape[4pt]}
\renewcommand\cellgape{\Gape[4pt]}
\newcommand{\height}{6cm}
\setmarginsrb{3 cm}{1 cm}{4 cm}{2.5 cm}{1 cm}{1.5 cm}{1 cm}{1.5 cm}
\pagestyle{fancy} %THIS DOESNT WORK WITH TITLESEC
\fancyhf{} %THIS DOESNT WORK WITH TITLESEC
\lhead{\thetitle} %THIS DOESNT WORK WITH TITLESEC
\begin{document}
\pagenumbering{gobble}
\input{front}
\newpage
\input{introduction}
\end{document}
This is how it looks before adding \usepackage{titlesec}:
This is how it looks after adding \usepackage{titlesec}:
Best Answer
You can use the
titlesec
package.MWE:
Edit: There is some compatibility issue between the
fancyhdr
and thetitlesec
package. So, to use the solution withtitlesec
package, I will recommend to use thetitleps
package which is an alternative tofancyhdr
package. When combined withtitlesec
package, it should be loaded by using\usepackage[pagestyles]{titlesec}
.To apply the changes in the header and the footer, the syntax of the
titleps
package is:You may go through this page to find some examples with
titleps
.For some reason, the
\thetitle
from the\titling
package didn't work with the\titlesec
package. So, I inserted the title of the article directly.Note: Consider reading how to write an MWE. This will help you to get help quickly and effectively from this site.