I have the following table:
\begin{table}[hbt]
\centering
\tabcolsep=0.3cm
\caption{Gram Negative Bacteria.}{\cite{Bacterial_Classification}}
\label{Tab:Gram Negative Bacteria}
\renewcommand{\arraystretch}{1.5}
\small
\begin{tabularx}{\textwidth}{ p{5em} >{\raggedright\arraybackslash}X p{5em} p{5em} >{\raggedright\arraybackslash}X >{\raggedright\arraybackslash}X }
\toprule
\textbf{Name} & \textbf{Morphology} & \textbf{O\textsubscript{2} Require\-ments} & \textbf{Commensal} & \textbf{Reservoirs / Sites \-of colonization, Transmission} & \textbf{Types of Infections} \\ \midrule
Entero\-bacteriaceae (E. coli, klebsiella, salmonella, shigella) & Rods & facultative anaerobe & Some species & GI tract, animals / Endogenous, fecal oral & Diarrhea, uninary tract, food poisoning, sepsis \\
Bacteroides & Rods & anaerobic & Yes & GI tract / Endogenous & Abscesses \\
Pseudomonas & Rods & aerobic & No & Water, soil / Endogenous, breach of skin barrier & Infections in immunocompromised hosts, Cystic Fibrosis \\
Vibrio (cholera) & Rods, curved shap & micro\-aerophilic & No & Water / Contaminated food, water & Diarrhea \\
Campylobac\-ter & Rods, curved shape & micro\-aerophilic & No & Food / Ingestion of contaminated food & Diarrhea, Bacteremia \\
Legionella & Rods, poorly stained & micro\-aerophilic & No & Water Inhalation of aerosol & Pneumonia, febrile illness \\
Neisseriam & Cocci, kidney-bean shaped & Micro\-aerophilic & No (\textit{N. meningitidis} sometimes) & Humans / Sexual, aerosol & Meningitis, pelvic inflammatory disease \\
Hemophilus & Coccobacillary-pleomorphic & facultative anaerobe & Some species & Respiratory tract / Endogenous, aerosol & Respiratory, sinusitis, otitis, meningitis \\
Bartonella & Small, pleomorphic rods & aerobic/micro\-aerophilic & No & Cats, fleas, lice / cat bites, lice or fleas? & Cat scratch disease, endocarditis, bacillary angiomatosis \\\bottomrule
\end{tabularx}
\end{table}
I also have the following figure:
\begin{figure}[hbt]
\centering
\resizebox{1\textwidth}{!}{\includegraphics{Thesis/Images/Chapters/Chapter 1/A_bacterial_sample_to_a_protein_extraction_and_the_final_analysis_by_mass_spectrometry.jpg}}
\caption{A bacterial sample subjected to a protein extraction and the final analysis by mass spectrometry.}{\cite{Mass_Spectrometry}}
\label{Fig:Mass Spectrometry}
\end{figure}
These 2 represent the same example I want you to focus. The citation is appearing under the table or figure caption and not in the end of the text of table/figure caption.
If I cite like this: \caption{A bacterial sample subjected to a protein extraction and the final analysis by mass spectrometry. \cite{Mass_Spectrometry}} we will end up with a problem in referencing order cause the list of figures. So we must keep the form \caption{A bacterial sample subjected to a protein extraction and the final analysis by mass spectrometry.}{\cite{Mass_Spectrometry}}. This is also the correct way to do it: \caption[text without cite for the list of figures]{text with cite}
P.S. I do not include the packages used in preamable because I assume they do not matter for this problem. If you want it, just comment it and I will edit.
\captiononly has one mandatory argument, I assume you meant\caption[Gram Negative Bacteria.]{\cite{Bacterial_Classification}}not\caption{Gram Negative Bacteria.}{\cite{Bacterial_Classification}}– David Carlisle Nov 30 '23 at 10:37\resizebox{1\textwidth}{!}{\includegraphics{...}}sounds like a very complicated way to say\includegraphics[width=\textwidth]{...}– samcarter_is_at_topanswers.xyz Nov 30 '23 at 10:40ABCas currently people need to guess at leastbooktabs,tabularxandgraphicxpackages to run these fragments – David Carlisle Nov 30 '23 at 10:40