I have a strange problem, whenever I make a reference in the body of the text e.g. ....in Equation \ref{MyEquationOne}
all subsequent main body text after the reference is changed to the same font style and formatting configuration as the equation or figure reference -- And I can't see why:
Here is an example
\documentclass{report}
\usepackage[reqno]{amsmath}
\usepackage{Baskervaldx}
\usepackage[baskervaldx,upint]{newtxmath}
\usepackage[margin=25mm]{geometry}
\usepackage[margin=9mm]{caption}
\usepackage[font={small}]{caption}
\usepackage[hang,bottom]{footmisc}
\usepackage{natbib}
\usepackage{graphicx}
\usepackage{subfiles}
\usepackage{amsfonts}
\usepackage{graphicx}\graphicspath{{figures/}}
\usepackage{array}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{upgreek}
\usepackage{subcaption}
\usepackage{listings}
\usepackage{color}
\usepackage{float}
\usepackage{dcolumn}
\usepackage{fancyhdr}
\usepackage{xfrac}
\usepackage{pdfpages}
\usepackage{epigraph}
\usepackage{etoolbox}
\usepackage{booktabs}
\usepackage{titlesec}
\usepackage{bm}
\usepackage{tocloft}
\usepackage{blindtext}
\usepackage{circuitikz}
\usepackage{tikz}\usetikzlibrary{arrows,decorations,shapes}\usetikzlibrary{decorations.markings,decorations.pathmorphing}
\renewcommand{\contentsname}{\centering\scshape\LARGE\normalfont{TABLE OF CONTENTS}}
\renewcommand{\listfigurename}{\centering\scshape\LARGE\normalfont{LIST OF FIGURES}}
\renewcommand{\listtablename}{\centering\scshape\LARGE\normalfont{LIST OF TABLES}}
\renewcommand{\bibname}{\centering\scshape\LARGE\normalfont{BIBLIOGRAPHY}}
\renewcommand{\thechapter}{\scshape\Roman{chapter}}
\titleformat{\chapter}{\centering\scshape\LARGE\normalfont\color{black}}{\thechapter.}{1pt}{}
\makeatletter
\def\@makechapterhead#1{%
\vspace*{-5em}% Space above number
{
\parindent \z@ \scshape
\interlinepenalty\@M
\Large\centering \scshape{\thechapter}%
\par\vspace{1mm}% Space between number and title
\MakeUppercase{#1}%
\par\vspace{2.5em}% Space between title and text
}
}
\makeatother
\makeatletter
\patchcmd{\epigraph}{\@epitext{#1}}{\itshape\@epitext{#1}}{}{}
\makeatother
\setlength\epigraphwidth{16cm}
\setlength\epigraphrule{0pt}
\numberwithin{equation}{section}
\begin{document}
\chapter{THE PEAK LINESHAPE}
\section*{Introduction}
Here I go making some point about something or other, then BAM! I need an equation which looks like,
\begin{equation}
E = m c^{2} \text{.}
\label{EQN:MyFirstEquation}
\end{equation}
After blathering on some more I want to talk about Equation \ref{EQN:MyFirstEquation}, but Oh no! Now the main body text has been changed -- help!
\end{document}