[Tex/LaTex] How to i set the fontsize of different document elements

fontsizesectioning

I am using \documentclass{article} to write an article but I should change its default font size to other standards. How can I change the font size of each title or body underneath of each title? How about some words in the document?

How can I understand that each of commands \small, \Huge, etc is equivalent of what font size?

This what I want to have: I have written the font size in front of each section, also I want to left justify the abstract section.

enter image description here

Best Answer

The fontsize commands of LaTeX, e.g. \small, \large, etc. work in relation to the global fontsize of the document. Hence, they change if the font size of the document changes. For a detailed overview see

What point (pt) font size are \Large etc.?

In concrete they are used like a switch. For example

\documentclass{article}
\usepackage{lipsum}

\begin{document}
%Some normal sized text, no changes
\lipsum[1]

%smaller text from here
\small
\lipsum[2]

%again normal sized
\normalsize
\lipsum[3]
\end{document}

You can of course limit the effect of those macros to a group, i.e. {\small This text is small\par}. In this case text that follows the group won't be affected. (Note the \par concluding the group to apply the correct line spacing.)

Now, you can change the font size of the document globally by declaring the 10pt, 11pt or 12pt option while calling the documentclass as:

\documentclass[11pt]{article}

Regarding your example I used the titlesec package to patch the sectional headings. The customization of the title and the abstract - note that I added a \keywords macro - is hand-crafted. A complete code could be:

\documentclass[11pt]{article}
\usepackage{lipsum}
\usepackage[T1]{fontenc}
  \renewcommand\rmdefault{ptm}
\usepackage{textcase,url,titlesec}

\titleformat{\section}{\relax}
            {\large\BoldAllcaps{\thesection}}{1em}{\large\BoldAllcaps}

\newcommand{\BoldAllcaps}[1]{\MakeTextUppercase{\scshape\bfseries #1}}

\makeatletter
\renewcommand\@maketitle{%
  \newpage
  \null
  \vskip 2em%
  \begin{center}%
  \let \footnote \thanks
    {\Large\bfseries \@title \par}%
    \vskip 1.5em%
    {\large
      \lineskip .5em%
      \begin{tabular}[t]{c}%
        \@author
      \end{tabular}\par}%
    \vskip 1em%
    {\small \@date}%
  \end{center}%
  \par
  \vskip 1.5em}%
\renewenvironment{abstract}{\section*{\abstractname}}{\relax}
\newcommand{\keywords}[1]{\par\vspace{.5em}\noindent{\large\bfseries \keywordsname:} #1\par}
  \def\keywordsname{Keywords}
\makeatletter

\title{Title of paper}
\author{Author}
\date{Affiliation, \url{e@ma.il}}

\begin{document}
\maketitle

\begin{abstract}
  \lipsum[1]
  \keywords{blah, blah}
\end{abstract}

\section*{Introduction}
\lipsum[2]
\end{document}

fontsize_ex