0

I have the following,

\begin{equation}
\label{Hyp}\tag{$\mathbf{H}$}
\nonumber
(\mathbf{H})\left\{
\begin{tabular}{p{\textwidth}}
\begin{enumerate}[label=(\subscript{\mathbf{H}}{{\arabic*}})]
    \item something
    \item something
    \item something
\end{enumerate}
\end{tabular}
\right.
\end{equation}

But I don't want the equation to have the (H) tag showing in the document, I only want it to show as such when I am cross referencing, i.e., if i write \ref{Hyp} then I want (H).

  • Hello @TSF! Do you looking for something like autonum package? Be aware this package is not supported very long and other packages have difficulties to work with this package. – Su-47 Oct 14 '20 at 14:58
  • No, not quite. I know I will reference this equation and I want it to have a custom tag. However, this results in the custom tag showing up on the equation (in the bottom right) and this is undesirable. I want it to be a tagged equation without the tag showing up on the equation itself, and I want to be able to reference it as such. – giorgi nguyen Oct 14 '20 at 15:04
  • 3
    Since you are printing manually the tag on the left, would it be an option to switch to left equation numbering for this equation? You could then use simply https://tex.stackexchange.com/a/212099/82917 – campa Oct 14 '20 at 15:30
  • Unfortunately, that doesn't actually work for me as the placement of the tag isn't aligned correctly with the brace. Really would like to remove the automatic showing of the tag. – giorgi nguyen Oct 14 '20 at 19:02
  • Please use @username to ping someone, otherwise the user gets no message. But to the point: the placement of the tag isn't aligned because you are forcing a tabular of width \textwidth. Your code will complain about an overfull \hbox. If you choose a reasonable size the tag will be correctly centered. – campa Oct 15 '20 at 13:55
  • @campa I see, you're completely correct. Thanks for your help with this issue. – giorgi nguyen Oct 15 '20 at 15:05

1 Answers1

2

You could override the amsmath mechanism:

\documentclass{article}
\usepackage{amsmath,enumitem}

\usepackage{lipsum} % for mock text

\makeatletter \newcommand{\weirdlabel}[2]{% \protected@write@auxout{}{\string\newlabel{#1}{{#2}{\thepage}}}% } \makeatother

\begin{document}

\lipsum[1][1-5] \begin{equation} \weirdlabel{Hyp}{\ensuremath{\mathbf{H}}} (\mathbf{H})\left{ \begin{minipage}{0.8\textwidth} \begin{enumerate}[label=(\arabic$_{\mathbf{H}}$)] \item \lipsum[2][1-5] \item \lipsum[2][6] \item \lipsum[2][7] \end{enumerate} \end{minipage} \right. \end{equation*} \lipsum[3] \ref{Hyp}

\end{document}

As you see, the \ref command produces the expected H.

enter image description here

egreg
  • 1,121,712
  • Thanks for this. In the end I went with Campa's suggestion of getting the tag on the left but if I had found this first I would have used it. – giorgi nguyen Oct 16 '20 at 10:17