0

I am trying to include my logo on the title page of my thesis. However, it does not appear. All that I got is an empty box with the title of my log!

\documentclass[12pt,twoside,a4paper,openright]{report}
\usepackage{hyperref}
\hypersetup{
    final,
    colorlinks=true, 
    citecolor=blue,
    filecolor=blue,
    linkcolor=blue,
    urlcolor=blue
    }
\usepackage{fancyhdr}
\usepackage{graphicx} % was missing
\renewcommand{\headrulewidth}{0pt}
\usepackage{titling}

\renewcommand\maketitlehooka{\null\mbox{}\vfill}
\renewcommand\maketitlehookd{\vfill\null}
\usepackage{titlesec}
\begin{document}
\makeatletter
    \begin{titlepage}
    \vfill % better
        \begin{center}
            {\huge \bfseries  \@title }\\[2ex] 
            {\LARGE  \@author}\\ [18ex]
            \includegraphics[width=0.3\linewidth]{logo.jpg}\\[2ex]
            {\large \@date}
        \end{center}
        \vfill % better
    \end{titlepage}
\makeatother
\end{document}

any help, please?

  • @Maryam: Your updated code works fine for me (TeXLive 2017). No compilation errors occur. – Marian G. Sep 5 '18 at 8:13
  • @Marian G. I am using Overleaf. Do you think the problem is from the editor itself? – Maryam Sep 5 '18 at 8:16
  • sounds like you have the draft option activated. – LukasCB Sep 5 '18 at 8:28
  • You need to ask a new question however - this is something different than the question you asked before. so my answer does not fit to your question anymore. – LukasCB Sep 5 '18 at 8:29
1
\documentclass[12pt,twoside,a4paper,openright,
demo % comment out
]{report}
\usepackage{hyperref}
\hypersetup{
    final,
    colorlinks=true, 
    citecolor=blue,
    filecolor=blue,
    linkcolor=blue,
    urlcolor=blue
    }
\usepackage{fancyhdr}
\usepackage{graphicx} % was missing
\renewcommand{\headrulewidth}{0pt}
\usepackage{titling}

\author{My Name}% was missing
\title{My Title}% was missing
\date{\today}% was missing

\renewcommand\maketitlehooka{\null\mbox{}\vfill}
\renewcommand\maketitlehookd{\vfill\null}
\usepackage{titlesec}
\begin{document}
\makeatletter
    \begin{titlepage}
    \vfill % better
        \begin{center}
            {\huge \bfseries  \@title }\\[2ex] 
            {\LARGE  \@author}\\ [18ex]
            \includegraphics[width=0.3\linewidth]{logo.jpg}\\[2ex]
            {\large \@date}
        \end{center}
        \vfill % better
    \end{titlepage}
\makeatother
\end{document}

enter image description here

  • Thank you for your answer. I add the \makeatother but the problem still arises. – Maryam Sep 5 '18 at 8:01
  • then you need to give a complete Minimal Working Example (MWE). – LukasCB Sep 5 '18 at 8:02
  • I updated my question. – Maryam Sep 5 '18 at 8:03
  • so did I my answer, a couple of things were missing, comment out demo when you compile to omit the black box. – LukasCB Sep 5 '18 at 8:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.