0

I am trying to make a title page for my thesis using LaTeX, but nothing shows up. I have read other questions, but I still don't manage to get it correct. What I have done is:

      \documentclass[reqno]{article}
\usepackage{amsmath,amsthm,amsfonts}
\usepackage{empheq}

\usepackage{lipsum} 
\usepackage{caption}
\usepackage[utf8]{inputenc}
\usepackage[capposition=top]{floatrow}
\usepackage[table]{xcolor}
\definecolor{myblue}{rgb}{.8, .8, 1}
\usepackage{amssymb} 
\usepackage{multirow}
\usepackage{graphicx}
\usepackage{bm}
\usepackage{mathcomp}

\usepackage[table]{xcolor}
\usepackage{pdfpages}
\usepackage{amsmath,esint}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}


\usepackage[T1]{fontenc}
\usepackage[colorlinks]{hyperref}
\usepackage{tensor}

\usepackage{atbegshi}
\usepackage{esvect}
\usepackage{titlesec}
\usepackage{listings}
\usepackage[margin=1in]{geometry}

\usepackage{float}
\usepackage{minitoc}
\usepackage{booktabs}
\usepackage{apacite}
\usepackage{nomencl}
\newlength\mytemplen
\newsavebox\mytempbox

\makeatletter
\newcommand\mybluebox{%
    \@ifnextchar[%]
       {\@mybluebox}%
       {\@mybluebox[0pt]}}

\def\@mybluebox[#1]{%
    \@ifnextchar[%]
       {\@@mybluebox[#1]}%
       {\@@mybluebox[#1][0pt]}}

\def\@@mybluebox[#1][#2]#3{
    \sbox\mytempbox{#3}%
    \mytemplen\ht\mytempbox
    \advance\mytemplen #1\relax
    \ht\mytempbox\mytemplen
    \mytemplen\dp\mytempbox
    \advance\mytemplen #2\relax
    \dp\mytempbox\mytemplen
    \colorbox{myblue}{\hspace{1em}\usebox{\mytempbox}\hspace{1em}}}
    \makeatother

\newcommand*\widefbox[1]{\fbox{\hspace{2em}#1\hspace{2em}}}
\newcommand{\vhtable}{\rule{30pt}{30pt}}
\newcommand{\eps}{\varepsilon}
\newcommand{\bU}{\mathbf{U}}
\newcommand{\bH}{\mathbf{H}}
\newcommand{\uvec}[1]{\boldsymbol{\hat{\textbf{#1}}}}
\newcommand{\sgn}{\text{sgn}}
\newcommand{\pw}{p^w}
\newcommand{\epsw}{\varepsilon^w}
\def\R{\mathbb{R}}
\def\N{\mathbb{N}}
\newcommand{\ud}{u^{\delta}}
\newcommand{\vect}[1]{\boldsymbol{#1}}
\newcommand{\md}{m^{\delta}}
\newcommand{\nd}{n^{\delta}}
\newcommand{\psid}{\psi_{\delta}}
\newcommand{\cde}{c^{\delta}}
\newcommand*\VF[1]{\mathbf{#1}}
\newcommand*\dif{\mathop{}\!\mathrm{d}}
\newcommand*{\captionsource}[2]{%
  \caption[{#1}]{%
    #1%
    \\\hspace{\linewidth}%
    \textbf{Source:} #2%
  }%
}
\newcommand\citecolor[1]{\@namedef{keycolor#1}{\color{black}}}
\newcommand{\mde}{m^{\delta}}
\newcommand{\nde}{n^{\delta}}
\newcommand{\ude}{u^{\delta}}
\newlength\dlf  
\newcommand\alignedbox[2]{

{
\settowidth\dlf{$\displaystyle #1$}  

\addtolength\dlf{\fboxsep+\fboxrule}  

\hspace{-\dlf}  

\boxed{#1 #2}

}
}
\newcommand\MyTabHeadings{% 
\rowcolor{Tab}\rowstyle{\bfseries\color{white}}}
\newcommand{\mT}{\widetilde{m}}
\renewcommand{\arraystretch}{2}
\renewcommand{\thesection}{\arabic{section}}
\newtheorem{deff}{Definition}[section]
\newtheorem{thm}{Theorem}[section]
\newtheorem{remark}{Remark}[section]
\newtheorem{lem}{Lemma}[section]
\newtheorem{prop}{Proposition}[section]
\newtheorem{cor}{Corollary}[section]
\titleformat{\chapter}{\LARGE\bfseries}{\thechapter.\ }{0em}{}
\AtBeginDocument{\AtBeginShipoutNext{\AtBeginShipoutDiscard}}
\makeatletter

\newcommand*{\@rowstyle}{}

\newcommand*{\rowstyle}[1]{
  \gdef\@rowstyle{#1}
  \@rowstyle\ignorespaces
}

\newcolumntype{=}{
  >{\gdef\@rowstyle{}}
}

\newcolumntype{+}{
  >{\@rowstyle}
}

\makeatletter
\AtBeginDocument{
  \let\nl@org@contentsline\contentsline
  \def\contentsline#1{
    \def\nl@current@levelname{#1}
    \nl@org@contentsline{#1}
  }%
}


\protected\def\numberline#1{%
  \begingroup
    \edef\nl@align{%
      nl@align@%
      \@ifundefined{nl@current@levelname}{}{\nl@current@levelname}%
    }%
    \edef\nl@align{%
      \@ifundefined{\nl@align}\nl@align@{\csname\nl@align\endcsname}%
    }%
    \@ifundefined{nl@numberline@\nl@align}{%
      \errmessage{Unknown alignment '\nl@align' for \noexpand\numberline}%
      \nl@numberline@l{#1}%
    }{%
      \csname nl@numberline@\nl@align\endcsname{#1}%
    }%
  \endgroup
}


\newcommand*{\nl@numberline@l}[1]{
  \hb@xt@\@tempdima{#1 \hfil}%
}
\newcommand*{\nl@numberline@c}[1]{% 
  \hb@xt@\@tempdima{\hfil#1 \hfil}%
}
\newcommand*{\nl@numberline@r}[1]{% 
  \hb@xt@\@tempdima{\hfil#1 }%
}


\def\nl@align@{l}
\def\nl@align@section{r}

\makeatletter    

\makeatother

\makeatletter    


\definecolor{lightgray}{gray}{0.9}
\makenomenclature
\makeglossary
\makeatletter

\setcounter{tocdepth}{3}


\AtBeginDocument{%
\expandafter\newcommand\csname r@tocindent0\endcsname{0pt}
}
\makeatother

\makeatother



\begin{document}

\title{title name}
\author{My name}
\date{Spring 2017}
\maketitle
\newpage


\begin{abstract}
\normalsize
Abstract
\end{abstract}



 \newpage
    {
      \hypersetup{linkcolor=black}
      \tableofcontents
    \clearpage
    }

    \makeatletter
    \let\toc@pre\relax
    \let\toc@post\relax
    \makeatother
\section{\textbf{Introduction}}

\end{document}

But it doesn't show anything in my LaTeX document. I am using article document class.

Does anyone know what I should do differently?

  • 1
    There was a missing } for the title ... Please show the minimal document that has this issue, not just fragments – user31729 Jun 14 '17 at 8:44
  • Yes, sorry I forgot to include the } in the question. I have included it now. – David Jun 14 '17 at 8:46
  • Yes, but putting that fragment into a minimal document with article class I get the title – user31729 Jun 14 '17 at 8:47
  • reqno is no class option for article, but that's not the cause of the issue – user31729 Jun 14 '17 at 9:02
  • 2
    @David: Oh my god, that preamble is a mess ... – user31729 Jun 14 '17 at 9:48
2

Below mentioned lines are causing the issue,

\usepackage{titlesec}
\titleformat{\chapter}{\LARGE\bfseries}{\thechapter.\ }{0em}{}
\AtBeginDocument{\AtBeginShipoutNext{\AtBeginShipoutDiscard}}

By commenting these lines, title text comes in output

  • 1
    \AtBeginDocument{\AtBeginShipoutNext{\AtBeginShipoutDiscard}} is the only line responsible for the OP's issue. – Dai Bowen Jun 14 '17 at 10:20
  • Fantastic, I got the title showing at the first page when I deleted those three lines! Thank you very much! – David Jun 14 '17 at 10:37

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.