0

For some equations I need to visible their label, for example:

/begin{equation}    
    /label{eq:C3}    
    x+y=3    
/end{equation}

I also used the package showlables.

In this case for each equation I received one number and one label

this happens for all equations from the first page to the last page like that:

$x+y=3 $       $ (1.1) (eq:C3)$

But I need the label $(eq:C3)$ just for the equations which are in my last chapter.

Do you have any suggestion?

10
  • 1
    presumably you used \begin not /begin showlabels is just for debugging so why does it matter if it applies to the whole document? Feb 10, 2019 at 23:08
  • @DavidCarlisle the package which I used before /begin{document} is /usepakage{showlables}, So what do you mean by /begin{showlables} ?
    – Angela
    Feb 11, 2019 at 9:47
  • 1
    the image that you post to seems completely unrelated to teh question, did you intend to post a different image? Feb 11, 2019 at 11:13
  • 1
    @DavidCarlisle I didn't post this image. I don't know how it came here, !!!!
    – Angela
    Feb 11, 2019 at 11:17
  • 1
    The question is very confusing in its current state. Can you explain your problem in more detail?
    – Johannes_B
    Feb 11, 2019 at 11:18

1 Answer 1

1

If I understand you correctly you want to be able to turn on and off the printing of the labels by the showlabels package. The code below shows how you can define two macros \ShowLabels and \HideLabels that will do just that.

enter image description here

\documentclass{article}
\usepackage{showlabels}
\let\OriginalLabelFormat\showlabelsetlabel
\newcommand\ShowLabels{\let\showlabelsetlabel\OriginalLabelFormat}
\newcommand\HideLabels{\renewcommand\showlabelsetlabel[1]{}}
\begin{document}
\begin{equation}
a=a  \label{a}
\end{equation}

\HideLabels % turns off showing of labels for the following equations
\begin{equation}
a=b  \label{b}
\end{equation}

\ShowLabels % turn on labels again
\begin{equation}
a=c  \label{c}
\end{equation}

\end{document}

You must log in to answer this question.

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