diff options
author | Karl Berry <karl@freefriends.org> | 2010-03-08 17:14:01 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-03-08 17:14:01 +0000 |
commit | fa5f154fe81b5cfda43334d7f4caa424b5e0a302 (patch) | |
tree | c58719688fa833d24ed0a1e608c6431d64164ff2 /Master/texmf-dist/tex | |
parent | 7bc3d71af69b04734daa32de9bbfd2f9cddfeac4 (diff) |
fncylab update (7mar10)
git-svn-id: svn://tug.org/texlive/trunk@17382 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/fncylab/fncylab.sty | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/fncylab/fncylab.sty b/Master/texmf-dist/tex/latex/fncylab/fncylab.sty new file mode 100644 index 00000000000..b28439bcec3 --- /dev/null +++ b/Master/texmf-dist/tex/latex/fncylab/fncylab.sty @@ -0,0 +1,61 @@ +% FNCYLAB.STY v1.0 +% Copyright 2000,2003 Robin Fairbairns (robin.fairbairns@cl.cam.ac.uk) +% +% This program can redistributed and/or modified under the terms +% of the LaTeX Project Public License; either version 1.2 of the +% license, or (at your option) any later version. +% +% See http://www.latex-project.org/lppl.txt for the latest version +% of the license. +% +% This package provides support for arbitrary structuring of the way +% label references look. The \labelformat command takes two +% arguments: +% #1 the counter that will define the label (e.g., section, figure, +% enumi, etc.) +% #2 the definition of how the label will be formatted: in this +% argument, #1 (*not* ##1) substitutes the `raw' value of the +% thing which is the source of the label. +% +% The package makes use of a built-in LaTeX facility (which actually +% needs a bit of patching before it's usable); this allows the precise +% layout of the references to labels generated from any LaTeX counter +% to be altered. Note that the way in which the counter itself is +% represented in references depends on \the<counter> -- it's the same +% as the way the counter gets printed. +% +% example +% \labelformat{section}{section #1} +% ... +% \section{The Blah Field}\label{blah} +% ... +% ... As we saw above in~\ref{blah} ... +% +% will typeset as +% ... As we saw above in section 3 ... +% +% For references at the start of a sentence, the package defines a +% command \Ref, which is used as follows: +% ... \Ref{blah} shows us that ... +% +% which will typeset as +% ... Section 3 shows us that ... + +% this check and redefinition is suggested in the latex source +% (ltxref.dtx) +\CheckCommand*\refstepcounter[1]{\stepcounter{#1}% + \protected@edef\@currentlabel + {\csname p@#1\endcsname\csname the#1\endcsname}% +} +\renewcommand*\refstepcounter[1]{\stepcounter{#1}% + \protected@edef\@currentlabel + {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}% +} + +\def\labelformat#1{\expandafter\def\csname p@#1\endcsname##1} + +\DeclareRobustCommand\Ref[1]{\protected@edef\@tempa{\ref{#1}}% + \expandafter\MakeUppercase\@tempa +} + +\endinput |