
コマンド の表示方法を変更したいと思います\label{}
。より正確には、 の定理についてですntheorem
。
実際、私は「仮定」と呼ばれる定理を作成しましたが、仮定を数字ではなく文字で参照したいと思います。
そこで私は前置きとして
\newtheorem*{hyp}{Assumption}}
私は記事の中で宣言する
\begin{hyp}[\ref{H}]\label{H}
\end{hyp}
を参照するとH
、(1)
が印刷されますが、私の目的は動的リンクを使用して を取得することです。環境内の(H)
コマンドはわかっていますが、それだけです。\tag{}
\begin{equation}
この最小限の例を提案します。
\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}
環境内でラベルを変更することは可能ですequation
。他の場所ではどうすればよいですか?
答え1
言うだけ\usepackage[hyperref]{ntheorem}
では不十分です。hyperref
パッケージもロードする必要があります。
\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}
答え2
最終的に次の環境を作成しました
\newenvironment{assumption}[1][\unskip]{%
\begin{enumerate}[label=(\textbf{#1}),leftmargin=60pt]
\item\label{#1}}
{\end{enumerate}}
そして私が望むものを手に入れます。