TeXShopSubsection followed by Subsection giving error

Information and discussion about TeXShop, an integrated LaTeX environment for Mac OS X
Post Reply
jay_singh
Posts: 9
Joined: Tue Jul 14, 2020 6:27 pm

Subsection followed by Subsection giving error

Post by jay_singh »

Hello, I am trying to get an output like screenshot attached.
Screen Shot 2021-02-06 at 4.12.58 PM.png
Screen Shot 2021-02-06 at 4.12.58 PM.png (100.11 KiB) Viewed 15913 times
To this end, I did implement following code in my editor;

Code: Select all

\documentclass[10pt]{article} 
\usepackage[left=1.5cm,top=0.7cm,right=1.6cm,bottom=1.2cm]{geometry}
\usepackage{hyperref}
\usepackage{indentfirst}
\usepackage{fancyhdr}
\fancyhf{}
\fancyfoot[R]{Page \thepage}
%\renewcommand\headrulewidth{0pt}
\pagestyle{fancy}
\begin{document} 

\begin{center}\subsection*{EXECUTIVE SUMMARY}\end{center}
Dr. Singh has extensive experience in various industries including Academia as well as Computers and Information Technology. Perform rigorous Mathematical as well as Statistical Analysis to drive revenue growth as well as predict customer churn using various modeling techniques. \\

\begin{center} \subsection*{EDUCATION} \end{center}
\begin{itemize}\itemsep0.5pt \parskip0pt \parsep0pt
\item{\textbf{North Dakota State University, Fargo, ND.\hspace{3.3in} May 2016}\\
 Ph.D. Mathematics.\\
 Dissertation: Stability Analysis of Discrete Time Recurrent Neural Networks.}
 \end{itemize}
 \end{document}
But it is giving me following error;
LATEX Error: Something is wrong, perhaps a missing \item
See the LATEX Manual or Companion for Help.
Can I kindly get help on how to fix it? Help is appreciated.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
Bartman
Posts: 366
Joined: Fri Jan 03, 2020 2:39 pm

Subsection followed by Subsection giving error

Post by Bartman »

If the alignment of the headings in the attached figure shows the target you want to achieve, then you should remove the center environments.

Code: Select all

\documentclass{article}
\usepackage[left=1.5cm,top=0.7cm,right=1.6cm,bottom=1.2cm,showframe]{geometry}
% Provides the ability to customize a list environment.
\usepackage{enumitem}
\usepackage{indentfirst}
\usepackage{fancyhdr}
    
\fancyhf{}
\fancyfoot[R]{Page \thepage}
%\renewcommand\headrulewidth{0pt}
\pagestyle{fancy}
    
\begin{document} 
\subsection*{EXECUTIVE SUMMARY}
Dr. Singh has extensive experience in various industries including Academia as well 
as Computers and Information Technology. Perform rigorous Mathematical as well as 
Statistical Analysis to drive revenue growth as well as predict customer churn using 
various modeling techniques.
     
\subsection*{EDUCATION}
\begin{itemize}[nosep]
% The approximate length has been replaced.
\item\textbf{North Dakota State University, Fargo, ND.\hfill May 2016}\\
Ph.D. Mathematics.\\
Dissertation: Stability Analysis of Discrete Time Recurrent Neural Networks.
\end{itemize}
\end{document}
If the centered alignment is desired instead, as you have tried in the example, but shouldn't apply to every command, then there are the following options:

Code: Select all

\subsection*{\centering HEADING}
or

Code: Select all

\begin{center}
    \large\textbf{HEADING}
\end{center}
Use the starred outline command or the environment, but not both. Even if you (like me) don't know the cause of the problem, you can still see that both variants insert vertical spaces before and after.

End a paragraph with a blank line and not with the chosen macro, which is used for line breaks.
Post Reply