auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX] Re: RefTeX referencing a custom environment


From: Sebastian P . Luque
Subject: [AUCTeX] Re: RefTeX referencing a custom environment
Date: Thu, 05 Jul 2007 17:36:04 -0500
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1.50 (gnu/linux)

On Thu, 05 Jul 2007 22:35:15 +0200,
Ralf Angeli <address@hidden> wrote:

[...]

> (info "(reftex)Figure Wrapper")

Thanks, I've read this before but didn't remember its relevance here.

I'm having some trouble getting it right.  Here's a minimal example:

---<---------------cut here---------------start-------------->---
\documentclass[12pt]{article} %
\usepackage{booktabs,relsize,threeparttable}

% Custom table environment
\newenvironment{msportraittable}[4]{%
  \begin{table}[p]%
    \centering
    \begin{small}%
      \begin{threeparttable}%
        \caption{#1} \label{#2}
        #3
        \begin{tablenotes}%
          \smaller{#4}}{%
        \end{tablenotes}%
      \end{threeparttable}%
    \end{small}%
  \end{table}}

\begin{document}

Table.

\begin{msportraittable}         %
  {Dummy table.} {tab:1}{%
    \begin{tabular}[p]{llll}
      \toprule
      A & B & C & D \\
      \midrule
      X\tnote{a} & 0 & 1 & 2 \\
      & 0 & 1 & 2 \\
      Y\tnote{b} & 0 & 1 & 2 \\
      & 0 & 1 & 2 \\
      \bottomrule
    \end{tabular}}{%
  \item[a] Note a.
  \item[b] Note b.}
\end{msportraittable}

\end{document}
---<---------------cut here---------------end---------------->---

so I set the alist like this:

(setq reftex-label-alist
      '(("\\msportraittable{}{*}{}{}" ?t nil nil 1)))

but doing 'C-c r' with point just after "Table" above brings up a
reference for "#2", which comes from the environment definition in the
preamble.  I don't understand from the docstring what options I have for
the TYPE-KEY element of the alist, which might be what is wrong in my
setting above.  Any further suggestions welcome.


-- 
Seb





reply via email to

[Prev in Thread] Current Thread [Next in Thread]