TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using showkeys package in LaTeX so my labels inside \[ \] math statements show up. Usually \[ \] does not show any numbering, I both want to use \[ \], and numbering, this was the only solution I could find.

In any case, with showkeys, the label numbers show up in little squares. Is there a way to change that square into parens, or maybe brackets?

share|improve this question

migrated from stackoverflow.com Nov 29 '11 at 0:25

This question came from our site for professional and enthusiast programmers.

Welcome to TeX.SE. It is always best to compose 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. – Peter Grill Nov 29 '11 at 0:26
The standard ways to number equations is to put them into an \begin{equation} ... \end{equation} environment. The showkeys package is for debugging purposes (or drafts) only. Maybe you should read some of the sources mentioned in the mathmode tag wiki. – Alan Munn Nov 29 '11 at 0:31
If you register your account you should be able to add comments. Can we ask why you want to do this? – Alan Munn Nov 29 '11 at 0:45
ok it works now. – user423805 Nov 29 '11 at 0:45
up vote 5 down vote accepted

If you want equation numbering use:

    e = m c^2

Using equation* (which requires amsmath package) instead will disable the equation numbering.

To adjust the appearance of the label from the showkeys, you can redefine the \showkeyslabelformat macro:

share|improve this answer
equation* is available only when amsmath has been loaded. – egreg Nov 29 '11 at 0:35
@egreg: Thanks. Have added that. I really should follow my own advice and not post code snippets!! :-) – Peter Grill Nov 29 '11 at 0:42
\\renewcommand worked. – user423805 Nov 29 '11 at 0:46
@user423805 Don't use showkeys for numbering equations. It's for a completely different purpose. – egreg Nov 29 '11 at 7:25
@user423805 For having an automatic number you've to use \begin{equation}...\end{equation}. If you load amsmath, then \tag{...} inserts a "handmade" number also in \[...\]. – egreg Nov 29 '11 at 22:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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