So passen Sie das \label{} an

So passen Sie das \label{} an

Ich möchte die Darstellung des Befehls ändern \label{}. Genauer gesagt für die Theoreme von ntheorem.

Tatsächlich habe ich einen Satz mit dem Namen „Annahme“ erstellt und ich möchte eine Annahme mit einem Buchstaben statt einer Zahl bezeichnen.

Ich habe also in meiner Präambel

\newtheorem*{hyp}{Assumption}}

Ich erkläre in meinem Artikel

\begin{hyp}[\ref{H}]\label{H}
\end{hyp}

Wenn ich verweise H, wird gedruckt, aber mein Ziel ist es, mit einem dynamischen Link (1)zu gelangen . Ich kenne den Befehl in der Umgebung, aber das ist alles.(H)\tag{}\begin{equation}

Ich schlage dieses Minimalbeispiel vor.

\documentclass[11pt]{article}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}  
\usepackage{amsmath,amssymb,mathrsfs}
\usepackage[colorlinks=true,linkcolor=blue,citecolor=red,backref=page]{hyperref}
\usepackage[hyperref]{ntheorem}

{\theoremheaderfont{\normalfont\bfseries}
\theorembodyfont{\itshape}
\theoremseparator{:}
\newtheorem*{hyp}{Assumption}}

\begin{document}

\begin{hyp}[\ref{sheme}]\label{sheme}
Bla bla
\end{hyp}

\begin{hyp}[H]
Bla bla
\end{hyp}

\begin{equation} 1=1, \tag{\textbf{H}$_{Mon}$} \label{mono} \end{equation}
Reference to mono: (\ref{mono}), with an hyperlink
\end{document}

Es ist möglich, ein Label in einer Umgebung zu ändern equation. Wie kann ich das woanders tun?

Antwort1

Sagen \usepackage[hyperref]{ntheorem}allein reicht hier nicht. Das hyperrefPaket muss auch geladen werden!

\documentclass[11pt]{article}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}  
\usepackage{amsmath,amssymb,mathrsfs}
\usepackage[hyperref]{ntheorem}
\usepackage{hyperref}

{\theoremheaderfont{\normalfont\bfseries}
\theorembodyfont{\itshape}
\theoremseparator{:}
\newtheorem*{hyp}{Assumption}}

\begin{document}

\begin{hyp}[\ref{sheme}]\label{sheme}
Bla bla
\end{hyp}

\begin{hyp}[H]
Bla bla
\end{hyp}


\begin{equation} 1=1, \tag{\textbf{H}$_{Mon}$} \label{mono} \end{equation}
Reference to mono: (\ref{mono}), with an hyperlink

\end{document}

Antwort2

Schließlich habe ich die folgende Umgebung erstellt

\newenvironment{assumption}[1][\unskip]{%
\begin{enumerate}[label=(\textbf{#1}),leftmargin=60pt] 
\item\label{#1}}
{\end{enumerate}}

und bekomme, was ich will.

verwandte Informationen