user15032639
user15032639

Reputation: 53

Title not being rendered with LaTeX

So I have the following document:

\include{preamble}


\title{test title}

\begin{document}


\maketitle



\begin{equation*}
    \begin{aligned}
       \pi\sqrt{\pi\sqrt{\pi\sqrt{\pi\sqrt{\pi\sqrt{\pi\dots}}}}}
    \end{aligned}
\end{equation*}
    



\bibliographystyle{plain}
\bibliography{references}
\end{document}

the contents of my preamble.tex file is:

%%%%% Document Setup %%%%%%%%

\documentclass[10pt,onecolumn]{revtex4}    % Font size (10,11 or 12pt) and column number (one or two).


\usepackage{times}                          % Times New Roman font type
  
\usepackage[a4paper, left=1.85cm, right=1.85cm,top=1.85cm, bottom=1.85cm]{geometry}       % Defines paper size and margin length

\usepackage[font=small, labelfont=bf]{caption}                      % Defines caption font size as 9pt and caption title bolded


\usepackage{graphics,graphicx,epsfig,ulem}  % Makes sure all graphics works 
\usepackage{amsmath}            % Adds mathematical features for equations

\usepackage{etoolbox}                       % Customise date to preferred format
\usepackage{subcaption}
\usepackage{caption}
\makeatletter
\patchcmd{\frontmatter@RRAP@format}{(}{}{}{}
\patchcmd{\frontmatter@RRAP@format}{)}{}{}{}
\renewcommand\Dated@name{}
\makeatother

\usepackage{fancyhdr}

\def\bibsection{\section*{References}}        % Position reference section correctly
    





\usepackage{import}
\usepackage{pdfpages}
\usepackage{transparent}       
\usepackage{xcolor}
  
  
\newcommand{\incfig}[2][1]{%
    \def\svgwidth{#1\columnwidth}   
    \import{./figures/}{#2.pdf_tex} 
}

\pdfsuppresswarningpagegroup=1

For some reason the title just will not be included on the pdf when I compile the code, I am sure I have \title{} and \maketitle in the correct positions. Any help as to why this is would be much appreciated.

Upvotes: 0

Views: 1017

Answers (1)

Move the title after \begin{document}:

\documentclass{revtex4}   

\begin{document}

\title{test title}
\maketitle

\end{document}

enter image description here

(don't do this with other documentclasses. Most of the time it is better to have the \title in the preamble, e.g. to get sensible pdf meta data if combined with hyperref)

Upvotes: 1

Related Questions