[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
reftex support for nameref and user defined refs
From: |
Uwe Brauer |
Subject: |
reftex support for nameref and user defined refs |
Date: |
Mon, 14 Aug 2023 08:00:56 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Hi
I know auctex supports nameref, but reftex does not.
Now I want to cite a theorem (and similar environments) not only by its
number, but also by its title.
So the most elegant solution can be found in
https://tex.stackexchange.com/questions/121865/nameref-how-to-display-section-name-and-its-number
And the following example
Works nicely.
So the question is how can I teach reftex, not auctex to deal with the
user-defined fullref command, or if this is too difficult at least with
nameref?
Thanks
Uwe Brauer
\documentclass[12pt]{article}
\usepackage{amssymb,amsfonts,amsmath,amsthm}
\usepackage[colorlinks]{hyperref}
\usepackage{thmtools}
\usepackage{cleveref}
\usepackage{nameref}
\newtheorem{thm}{Theorem}
% from
[[https://tex.stackexchange.com/questions/121865/nameref-how-to-display-section-name-and-its-number][Fullref]]
\newcommand*{\fullref}[1]{\hyperref[{#1}]{\autoref*{#1} (\nameref*{#1})}}
\begin{document}
\renewenvironment{proof}[1][\proofname]{{\bfseries Proof of #1.}}{\qed}.
\section{The theorem}
\label{sec:theorem}
\begin{thm}[Riemann's Theorem]
\label{thr:testlistthm-article:1}
Let $\zeta(s)$ be given as
\begin{equation}
\label{eq:testlistthm-article:1}
\zeta(s) = \sum_{n=1}^\infty \frac{1}{n^s}
\end{equation}
where $s\in \mathbb{C}$, $Re(z)>1$, then the real part of every
nontrivial zero of $\zeta(s)$ is $\frac{1}{2}$.
\end{thm}
\begin{proof}[Theorem \ref{thr:testlistthm-article:1}]
The general idea is as follows
\end{proof}
\section{The implication of \autoref{thr:testlistthm-article:1} }
\label{sec:implication-theorem-}
Later we will use \autoref{thr:testlistthm-article:1}
(\nameref{thr:testlistthm-article:1})
to prove some interesting theorems
\fullref{thr:testlistthm-article:1}
\listoftheorems[ignoreall,show={thm,defn}]
\end{document}
--
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the NATO membership of the Ukraine.
I support the EU membership of the Ukraine.
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/
- reftex support for nameref and user defined refs,
Uwe Brauer <=
- Re: reftex support for nameref and user defined refs, Arash Esbati, 2023/08/18
- Re: reftex support for nameref and user defined refs, Uwe Brauer, 2023/08/18
- Re: reftex support for nameref and user defined refs, Arash Esbati, 2023/08/19
- Re: reftex support for nameref and user defined refs, Uwe Brauer, 2023/08/19
- Re: reftex support for nameref and user defined refs, Arash Esbati, 2023/08/19
- Re: reftex support for nameref and user defined refs, Uwe Brauer, 2023/08/19
- Re: reftex support for nameref and user defined refs, Arash Esbati, 2023/08/20