I am getting these error for my following preamble file. I can't figure out what is causing the error.
'''
\documentclass{article}
%%%%%%%% CREATE DOCUMENT STRUCTURE %%%%%%%%
%% Language and font encodings
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
%\usepackage{subfig}
%% Sets page size and margins
\usepackage[a4paper,top=3cm,bottom=2cm,left=2cm,right=2cm,marginparwidth=2cm]{geometry}
%% Useful packages
\usepackage{amsmath}
\usepackage[colorlinks=true,linkcolor=blue,urlcolor=black,bookmarksopen=true]{hyperref}
\usepackage{bookmark}
\usepackage{wrapfig}
\usepackage{ragged2e}
\usepackage{siunitx}
\usepackage{pdfpages}
\usepackage{chngcntr}
\usepackage{sectsty}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage[colorinlistoftodos]{todonotes}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{apacite}
\usepackage{fancyhdr}
\usepackage{booktabs}
\usepackage{float}
\usepackage{pgfplots}
\usepackage{titling}
\usepackage{blindtext}
\usepackage[square,sort,comma,numbers]{natbib}
\usepackage[colorinlistoftodos]{todonotes}
\usepackage{xcolor}
\usepackage[export]{adjustbox}
\definecolor{darkgreen}{rgb}{0.0, 0.4, 0.0}
\renewcommand{\familydefault}{\rmdefault}
\usepackage{titlesec}
\titleformat*{\section}{\normalfont\Large\bfseries}
\titleformat*{\subsection}{\normalfont\large\bfseries}
\titleformat*{\subsubsection}{\normalfont\normalsize\bfseries}
%\titleformat*{\paragraph}{\normalfont\normalsize\bfseries}
\newcommand{\atan}{\tan^{-1}}
\hypersetup{
pdfpagelabels=true,%
plainpages=false,%
pdfauthor={Bharat Aryal},%
pdftitle={Title},%
pdfsubject={Subject},%
bookmarksnumbered=true,%
colorlinks=false,%
citecolor=black,%
filecolor=black,%
linkcolor=black,%you should probably change this to black before printing
urlcolor=black,%
pdfstartview=FitH
}
'''
\usepackage[utf8x]{inputenc}it is not compatible with current latex – David Carlisle Jul 31 '22 at 09:12