1

I have a problem because when I add labels to equations (Pic.1), they appear in the margins of the text (Pic.2). If I do not add a label it gets a question mark in the margin. Unfortunately the Overleaf documentation does not solve my problem.

Thanks for everything. Draqun

Pic.1

enter image description here

Pic.2

enter image description here

main.tex

\documentclass{MastersDoctoralThesis} % The class file specifying the document structure
\begin{document}
\pagenumbering{gobble}

\begin{equation} \label{eq:thread}
    T_{P} = \{t_i|i=0...\alpha\}, \alpha \in \mathbb{N}
\end{equation}

\end{document}  

MasterDoctoralThesis.cls

\NeedsTeXFormat{LaTeX2e}[1996/12/01]
\newcommand{\classname}{MastersDoctoralThesis}
\ProvidesClass{\classname}[2017/08/27 v1.6 LaTeXTemplates.com]
\providecommand{\baseclass}{book}
\RequirePackage{etoolbox}
\RequirePackage{xparse}
\newbool{nolistspace}
\newbool{chapteroneline}
\newbool{listtoc}
\newbool{toctoc}
\newbool{parskip}
\newbool{hyperrefsupport}
\booltrue{hyperrefsupport}
\newbool{headsepline}
\newbool{consistentlayout}

\DeclareOption{nohyperref}{\boolfalse{hyperrefsupport}}
\DeclareOption{nolistspacing}{\booltrue{nolistspace}}
\DeclareOption{liststotoc}{\booltrue{listtoc}}
\DeclareOption{chapterinoneline}{\booltrue{chapteroneline}}
\DeclareOption{toctotoc}{\booltrue{toctoc}}
\DeclareOption{parskip}{\booltrue{parskip}}
\DeclareOption{headsepline}{\booltrue{headsepline}}
\DeclareOption{consistentlayout}{\booltrue{consistentlayout}}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\baseclass}}

\ProcessOptions\relax

\LoadClass{\baseclass}

\usepackage[utf8]{inputenc} % Required for inputting international characters
\usepackage[T1]{fontenc} % Output font encoding for international characters
\usepackage{lmodern}
\usepackage{mathpazo} % Use the Palatino font by default
\usepackage{makecell}
\usepackage{subfig}
\usepackage{wrapfig}
\usepackage[backend=biber,style=numeric,sorting=nty,isbn=false,abbreviate=false,natbib=true,autolang=other]{biblatex}
\usepackage{numprint}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{minted}
\usepackage{MnSymbol}
\usepackage{mathtools}
\usepackage[autostyle=true]{csquotes}
\usepackage{longtable}
\usepackage{svg}
\usepackage{refcheck}
\usepackage{multirow}
\usepackage{rotating}
9
  • 2
    Did you try running it more than once? The second run should resolve the ? issue. Also, instead of an image, it is always better to provide a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. Feb 4, 2022 at 18:51
  • 3
    ...and you probably have a package like showlabel or showkeys loaded. Please read tex.meta.stackexchange.com/questions/6255/…
    – Rmano
    Feb 4, 2022 at 18:52
  • 3
    Now we can only guess, what is going on in your document. Please provide code for complete small document, which we can test as it is and which reproduce your problem
    – Zarko
    Feb 4, 2022 at 19:05
  • 1
    \label does not make any printed output it is just an internal identifier for use with \ref you wil have shokabel or similar debug package loaded to make the internal label visible. But please do not post code as an image it makes it hard for anyone to debug it for you, Feb 4, 2022 at 20:29
  • 1
    That was enough for an answer. For future reference, you could also trim the class file quite a bit more. That might have been enough for you to narrow the problem down to refcheck.
    – Teepeemm
    Feb 5, 2022 at 19:58

1 Answer 1

4

Your class is loading the package refcheck. By default, that package will print the labels in the margins. If you don't have a reference to that label in your document, it will also include the ? (and add a warning to the log file). To disable both the ? and the label printing, add the command \norefnames to your preamble before the \begin{document}.

1
  • Right. I forgot about refcheck. Thanks a lot!!! Best regards.
    – Draqun
    Feb 7, 2022 at 16:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .