I have a problem with LaTeX. I am using TeXstudio, MikTeX and the article class, but suddenly my figures have started raising errors. It happened a day after MiKTeX updates. My code for figures is
\begin{figure}
\centering
\includegraphics[scale=0.45]{Figure1.pdf}
\caption{\footnotesize Caption }
\label{fig:fig38}
\end{figure}
I get the errors
Missing endcsname inserted. \includegraphics[scale=0.45]{Figure1}
Use of ??? doesn't match its definition. \includegraphics[scale=0.45]{Figure1}
Missing endcsname inserted. \includegraphics[scale=0.45]{Figure1}
Use of ??? doesn't match its definition. \includegraphics[scale=0.45]{Figure1}
File `Figure1' not found. \includegraphics[scale=0.45]{Figure1}
No other errors then those concerning the figures are shown in the log window.
What is wrong? I have recreated the problem in a newly created article file [CODE]:
\documentclass[a4paper,12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{underscore}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{csquotes}
\usepackage[style=authoryear,maxcitenames=2,maxbibnames=99,uniquelist=false,backend=biber]{biblatex}
\usepackage{titlesec}
\usepackage{algorithmicx}
\usepackage{algorithm}
\usepackage{algpseudocode}
\renewcommand\algorithmicthen{}
\usepackage{amsfonts}
\usepackage{lipsum}
\usepackage[export]{adjustbox}
\usepackage{hyperref}
\graphicspath{{C:\\Users\\user\\Documents\\Folder\\Subfolder}}
\titlelabel{\thetitle.\quad}
\addbibresource{}% Syntax for version >= 1.2
\renewcommand\algorithmicthen{}% Remove 'then' text
\algtext*{EndIf}% Remove 'end if' text
\renewcommand\algorithmicdo{}
\algtext*{EndFor}% Remove 'end if' text
\usepackage{multirow}
\usepackage[figurename=Fig.,labelsep=endash,labelfont=bf]{caption}
\usepackage{longtable}
\usepackage{adjustbox}
\usepackage{caption}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}
\newtheorem{definition}{Definition}[section]
\theoremstyle{definition}
\usepackage{appendix}
\providecommand{\keywords}[1]
{
\small
\textbf{\textit{Keywords:}} #1
}
\usepackage{authblk}
\title{Title}
\author{Author}
\affil{\footnotesize{something}}
\date{\footnotesize \today}
\begin{document}
\maketitle
\begin{abstract}
\footnotesize \lipsum
\end{abstract}
\begin{figure}[htp]
\includegraphics[scale=0.45]{Figure1}
\caption{\footnotesize Caption }
\centering
\label{fig:fig38}
\end{figure}
\end{document}
What am I doing wrong? Should I reinstall MikTeX, given that it happened only after packages' and MikTeX updates? It is probably not a packages clash, because after deleting all the parts of preamble concerning algorithms, the problem persists. It persists even after deleting the import of all other packages, except for the necessary ones and graphicx.
\graphicspath{{C:\\Users\\user\\Documents\\Folder\\Subfolder}}
is wrong\\
never separates directories in tex. If you must use graphicspath,, use/
even on windows.\keywords{something,foo,bar}
would make the whole document\small
, did you intend to have a group there?\\
in graphicspath has never worked in latex. (I wrote that code:-)