Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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
    
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
2  
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
add comment

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

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

1 Answer

up vote 5 down vote accepted

If you want equation numbering use:

\begin{equation} 
    e = m c^2
\end{equation}

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:

\renewcommand*\showkeyslabelformat[1]{\normalfont\small\ttfamily(#1)}
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
2  
@user423805 Don't use showkeys for numbering equations. It's for a completely different purpose. –  egreg Nov 29 '11 at 7:25
1  
@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
show 4 more comments

Your Answer

 
discard

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.