[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-devel] Label prefix for customized environments
From: |
Arash Esbati |
Subject: |
[AUCTeX-devel] Label prefix for customized environments |
Date: |
Sat, 19 Sep 2015 19:51:29 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 |
Hi all,
I have written a style for `newfloat.sty' (see attached) where I want to
associate new env's with the respective label prefix. My understandig
is that this done via `LaTeX-label-alist'. So I add new env's to this
variable with the `LaTeX-newfloat-auto-cleanup' function. When I load a
tex file like below, I still get the `sec:' prefix for a figure-like
env. Any hint?
--8<---------------cut here---------------start------------->8---
\documentclass[11pt]{article}
\usepackage{newfloat}
\DeclareFloatingEnvironment[
name=Code,
listname={List of Codes},
fileext=lol]{code} % {verbatim}
\DeclareFloatingEnvironment[name=Figures]{myfig} % {figure}
\begin{document}
Hit `C-c C-n' and the `C-c C-e', choose `myfig' and proceed to
`label' which has `sec:' as prefix:
\begin{myfig}[tbp]
\centering
Foo
\caption{caption}
\label{sec:foo}
\end{myfig}
\begin{code}
\begin{myfig}[tbp]
\centering
Foo
\caption{caption}
\label{sec:foo}
\end{myfig}
\end{code}
\end{document}
--8<---------------cut here---------------end--------------->8---
Any other comment to the code is always welcome.
Best, Arash
newfloat.el
Description: application/emacs-lisp
- [AUCTeX-devel] Label prefix for customized environments,
Arash Esbati <=