0

I'm having difficulties in displaying list of figures. Does someone know what is the issue? I get the error message: Illegal unit of measure (mu inserted) corresponding to the part of the code before begin{document}. Figures are either .jpeg or .pdf. Here is the part of my code:

\RequirePackage{luatex85}
\documentclass[12pt,a4paper,final]{revtex4}

\usepackage{sidecap}
\usepackage{ulem}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{graphicx}
\usepackage{bm}
\usepackage{color}
\usepackage[utf8]{inputenc}
\usepackage{relsize}
\usepackage[utf8]{inputenc}
\usepackage[toc,page]{appendix}
\usepackage{slashed} 

\usepackage{lmodern}

\makeatletter
\renewcommand*{\thesection}{\arabic{section}}
\renewcommand*{\thesubsection}{\thesection.\arabic{subsection}}
\renewcommand*{\p@subsection}{}
\renewcommand*{\thesubsubsection}{\thesubsection.\arabic{subsubsection}}
\renewcommand*{\p@subsubsection}{}
\makeatother

\makeatletter
\def\ps@myPS{%
    \def\@oddfoot{\null\hfill\thepage}
    \def\@evenfoot{\thepage}%
    \def\@evenhead{\null\hfil\slshape\leftmark}%
    \def\@oddhead{{\slshape\rightmark}}}%
\makeatother

\pagestyle{myPS}
\usepackage{float} 
\usepackage{wrapfig}
\graphicspath{ {figures/} }
\usepackage{array}

\usepackage{lipsum}% http://ctan.org/pkg/lipsum


\usepackage{tikz}
\usepackage[compat=1.1.0]{tikz-feynman}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{decorations.markings}
\usepackage{caption,tikz}

\usepackage{subcaption}
\captionsetup{compatibility=false}

\usepackage{sidecap}

\usepackage{ragged2e}
\DeclareCaptionJustification{justified}{\justifying}
\captionsetup{justification=justified,singlelinecheck=false,labelfont=normal}

\usepackage[capitalize]{cleveref}

\raggedbottom
\setlength{\topmargin}{0pt}

\DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it}

\voffset=-0.6in
\DeclareMathOperator{\Tr}{Tr}

\usepackage{geometry}
 \geometry{
 a4paper,
 total={210mm,297mm},
 left=30mm,
 right=30mm,
 top=30mm,
 bottom=30mm,
 }

\usepackage[T1]{fontenc}
\numberwithin{equation}{subsection}

\begin{document}

\tableofcontents
\listoffigures

 \makeatletter
    \let\toc@pre\relax
  \let\toc@post\relax
    \makeatother

  \newpage

\pagenumbering{arabic}

\begin{figure}[H]
\begin{center}
\includegraphics[scale=0.4]{AFree}
\caption{{\bf {Caption.} 
\label{afreedom}
\end{center}
\end{figure}

end{document}
  • Welcome. Why is there so much stuff going one? The revtex people just want content, right? They already have the layout complete. – Johannes_B Aug 6 '18 at 10:09
1

The class revtex4 does not support \listoffigures. Use the class revtex4-1 instead.

\documentclass{revtex4-1}
\usepackage{graphicx}
\begin{document}
\listoffigures
\begin{figure}
\centering
\includegraphics[scale=0.4]{example-image}
\caption{Caption.} 
\label{afreedom}
\end{figure}
\end{document}

enter image description here

Side note: Your document has many problems. You are loading several packages twice, and you have lots of redefinitions that I expect to cause problems. My suggestion: remove everything of which you don't know why it's there (= everything in the preamble?), and only add packages if you actually need an extra feature.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.