0

This is a follow-up to this question. That allowed me to format references to an equation/figure/algorithm so that they started with an 'S'. What if I want to change the format in the original equation/figure/algorithm? For instance, if I entered

\begin{equation}
a=b
\label{eq:myeq}
\end{equation}

How would I get it to show up in the final document as:

a=b (S1)

Instead of:

a=b (1)

?

1
\def\theequation{S\arabic{equation}}

I assume that you use it in article. Definition for report or book should be a bit modified.

MWE:

\documentclass{article}
\begin{document}

\def\theequation{S\arabic{equation}}

\begin{equation}
2+2=4
\end{equation}


\end{document}

enter image description here

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