I am trying to use cross reference in an article, here is a sample of my code.

\usepackage[margin=1in]{geometry}   % set the margins to 1in on all sides
\usepackage{graphicx}              % to include figures
\usepackage{amsmath}               % great math stuff
\usepackage{amsfonts}              % for blackboard bold, etc
\usepackage{amsthm}                % better theorem environments
\usepackage{epsfig}         % For postscript
\usepackage{epic,eepic}       % For epic and eepic output from xfig

\newtheoremstyle{break}% name
  {}%         Space above, empty = `usual value'
  {}%         Space below
  {\itshape}% Body font
  {}%         Indent amount (empty = no indent, \parindent = para indent)
  {\bfseries}% Thm head font
  {.}%        Punctuation after thm head
  {\newline}% Space after thm head: \newline = linebreak
  {}%         Thm head spec




\newenvironment{sketchpf}{\noindent{\it Sketch of Proof}\hspace*{1em}}{\qed\bigskip\\}
\newenvironment{proof-idea}{\noindent{\bf Proof Idea}\hspace*{1em}}{\qed\bigskip\\}
\newenvironment{proof-of-lemma}[1]{\noindent{\bf Proof of Lemma #1}\hspace*{1em}}{\qed\bigskip\\}
\newenvironment{proof-attempt}{\noindent{\bf Proof Attempt}\hspace*{1em}}{\qed\bigskip\\}
\newenvironment{proofof}[1]{\noindent{\bf Proof} of #1:\hspace*{1em}}{\qed\bigskip\\}
\newenvironment{remark}{\noindent{\bf Remark}\hspace*{1em}}{\bigskip}

   This is just an sample.
By Proposition \ref{2}, we can see the problem.

But when I compile my file, there is a "1" in a square box besides Proposition (the number of above proposition), and at the reference part, there is a small "1" in a square box lying above Proposition.

Is there a way to get rid of these square boxes?


enter image description here

  • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Apr 25 '15 at 15:30
  • 1
    it's best not to use numbers as labels (it works but it is very confusing when the label number is different to the printed proposition number) do you have showkeys or showlabels package loaded? – David Carlisle Apr 25 '15 at 15:32
  • 1
    @FangyangTian I fixed it; just select the code part and click on the {} button above the editor window (or hit Control-K). Avoid loading epsfig preferring graphicx; also pdfsync should never be loaded. – egreg Apr 25 '15 at 15:42
  • 1
    don't use epsfig (it is only needed to help port old (pre 1994) latex2.09 documents to latex2e. – David Carlisle Apr 25 '15 at 15:42
  • 1
    @FangyangTian they are unreleated: you need to delete showkeys – David Carlisle Apr 25 '15 at 15:48

As I guessed in comment, you have


which is a package for drafts only, to show the internal label.

| improve this answer | |
  • Sorry, David, it doesn't work...... – Fangyang Tian Apr 25 '15 at 15:43
  • @FangyangTian what doesn't work? – David Carlisle Apr 25 '15 at 15:47
  • I put a picture of the output pdf. I think my problem is clearer now. – Fangyang Tian Apr 25 '15 at 15:52
  • @FangyangTian it was clear before, you just need to remove showkeys – David Carlisle Apr 25 '15 at 15:55
  • @FangyangTian -- if you comment out showkeys, the boxes (and the report of the labels) disappears. also, if you are using amsart, you don't need to include the packages amsmath, amsthm, and amsfonts -- those are already either preloaded or incorporated in the document class. – barbara beeton Apr 25 '15 at 15:55

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.