From cc655ac3a75a0bf9ce53c6acc5e0c0128a599af5 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 5 Dec 2010 00:11:13 +0000 Subject: fink 2.2 (4dec10) git-svn-id: svn://tug.org/texlive/trunk@20654 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/fink/fink.dtx | 199 +++++++++++++++------------ Master/texmf-dist/source/latex/fink/fink.ins | 30 ++-- 2 files changed, 123 insertions(+), 106 deletions(-) (limited to 'Master/texmf-dist/source/latex/fink') diff --git a/Master/texmf-dist/source/latex/fink/fink.dtx b/Master/texmf-dist/source/latex/fink/fink.dtx index 2032dbddd1c..8cc65414867 100644 --- a/Master/texmf-dist/source/latex/fink/fink.dtx +++ b/Master/texmf-dist/source/latex/fink/fink.dtx @@ -1,13 +1,13 @@ -% \iffalse -*- mode: LaTeX -*- +% \iffalse % % fink.dtx --- Doc file for the FiNK package (code and documentation) % -% Copyright (C) 1999, 2000, 2001, 2002, 2007 Didier Verna. +% Copyright (C) 1999, 2000, 2001, 2002, 2007, 2010 Didier Verna % % Author: Didier Verna % Maintainer: Didier Verna % Created: Thu Sep 23 18:23:48 1999 -% Last Revision: Mon Jun 11 10:59:19 2007 +% Last Revision: Wed Dec 1 14:37:28 2010 % % This file is part of FiNK. % @@ -31,13 +31,20 @@ % %<*driver> \documentclass[a4paper]{ltxdoc} -% \OnlyDescription -% \CodelineIndex -% \RecordChanges +\usepackage[T1]{fontenc} +\usepackage{xspace} \newcommand{\fink}{% \mbox{\fontfamily{ptm}\fontseries{b}\fontshape{it}\selectfont% F\hspace{-.4ex}\protect\raisebox{-.5ex}{\textmd{i}}\hspace{0.2ex}NK}% - } + \xspace} +\makeatletter + \def\@currname{fink} + \def\@currext{inc} +\makeatother +\input{header.inc} +% \OnlyDescription +\CodelineIndex +% \RecordChanges \begin{document} \DocInput{fink.dtx} \end{document} @@ -46,7 +53,8 @@ % \fi % % \catcode`\¡=14 -% \CheckSum{153} +% \CheckSum{155} +% \GetFileInfo{fink.inc} %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z @@ -63,16 +71,28 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} % -% \newcommand\version{2.1.1} -% \newcommand\releasedate{2008/02/27} -% \newcommand\packagecopyright{Copyright \copyright{} 1999, 2000, 2001, 2002, -% 2007, 2008 Didier Verna} -% \newcommand\auctex{AUC-\TeX} % \MakeShortVerb{\|} -% \date{\today} +% +% \makeatletter +% \def\ps@mystyle{ +% \def\@oddfoot{\hfil\thepage\hfil} +% \def\@evenfoot{\hfil\thepage\hfil} +% \def\@evenhead{\hfil\slshape\leftmark} +% \def\@oddhead{\slshape\rightmark\hfil}} +% \makeatother +% +% \newcommand\packagecopyright{Copyright \copyright{} 1999, 2000, 2001, 2002, +% 2007, 2008, 2010 Didier Verna} +% +% \newcommand\auctex{AUC-\TeX\xspace} +% +% \pagestyle{mystyle} +% \markright{\hskip-.5\marginparwidth \fink \fileversion{} (\filedate)} +% +% \date{\texttt{\fileversion{} (\filedate)}} % \title{\fink{} -- the \LaTeXe{} \textbf{Fi}le \textbf{N}ame -% \textbf{K}eeper\thanks{This document describes \fink{} \version, release -% date \releasedate.}} +% \textbf{K}eeper\footnote{\fink homepage: +% \texttt{http://www.lrde.epita.fr/\~{}didier/software/latex.php\#fink}}} % \author{Didier Verna\\ % \texttt{mailto:didier@lrde.epita.fr}\\ % \texttt{http://www.lrde.epita.fr/\~{}didier/}} @@ -86,7 +106,7 @@ % packache fas orichinally a hack dat I used somefere elss, but since it might % be off a cheneral interest, I'fe decided to make it a separate % fink\ldots\par -% The \fink{} package is \packagecopyright{}, and distributed under the terms +% The \fink package is \packagecopyright{}, and distributed under the terms % of the LPPL license. % % \section{User Interface} @@ -118,7 +138,7 @@ % \begin{macro}{maindir} % \begin{macro}{mainext} % Because there's no way \TeX{} can give you back information about the -% file being processed (apart from its base name), \fink{} provides the +% file being processed (apart from its base name), \fink provides the % options |maindir| (defaults to |./|) and |mainext| (defaults to |tex|) % for changing the directory and the extension of the main source file. % For instance, suppose your source file is in |src/foo.ltx| and you are @@ -129,30 +149,30 @@ % \end{macro} % \end{macro} % -% \section{\auctex{} support} -% \auctex{} is a powerful major mode for editing \TeX{} documents in +% \section{\auctex support} +% \auctex is a powerful major mode for editing \TeX{} documents in % \textsf{Emacs} or \textsf{XEmacs}. In particular, it provides automatic -% completion of macro names once they are known. \fink{} supports \auctex{} -% by providing a style file named \texttt{fink.el} which contains \auctex{} +% completion of macro names once they are known. \fink supports \auctex +% by providing a style file named \texttt{fink.el} which contains \auctex % definitions for the relevant macros. This file should be installed to a -% location where \auctex{} can find it (usually in a subdirectory of your -% \LaTeX{} styles directory). Please refer to the \auctex{} documentation for +% location where \auctex can find it (usually in a subdirectory of your +% \LaTeX{} styles directory). Please refer to the \auctex documentation for % more information on this. % % \section{Caveat} -% \fink{} cannot follow files included with the \TeX{} |\input| primitive. +% \fink cannot follow files included with the \TeX{} |\input| primitive. % That's because \TeX{} has a very insensible way of defining primitives whose % argument parsing syntax is not available for macros. As a consequence, it's % almost impossible to redefine the |\input| primitive without breaking its % syntax (one would have to parse the characters one by one, and I'm not ready -% to do so\ldots). \fink{} currently does not follow auxiliary files either. +% to do so\ldots). \fink currently does not follow auxiliary files either. % % \section{Hints, Tricks, Tips} % % \subsection{File names with special characters} % Here, ``special'' is to be taken in the \LaTeX{} sense, for instance, a % directory or file name containing an underscore. If this situation occurs, -% you're likely to face problems with \fink{} macros because they don't try to +% you're likely to face problems with \fink macros because they don't try to % properly escape those characters. So for instance, an underscore alone will % make \LaTeX{} think that you forgot the math mode |$| sign before it. There % are actually two problems that you may encounter: @@ -169,6 +189,8 @@ % % \section{Changes} % \begin{itemize} +% \item[v2.2] Fix incompatibility with the |memoir| class, reported by Lars +% Madsen\\ % \item[v2.1.1] Fix trailing whitespace in |\fink@restore|, reported by % Maverick Woo\\ % Added some hints about filenames with special characters, suggested by @@ -185,15 +207,17 @@ % |\finkextension| % \end{itemize} % -% \StopEventually{\par Well, I think that's it. Enjoy using \fink{}! -% \vfill\hfill\small \packagecopyright{}.} +% \StopEventually{\par Well, I think that's it. Enjoy using \fink! +% \vfill\hfill\small \packagecopyright{}} % % \section{The Code} % \begin{macrocode} -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{fink}[2008/02/27 v2.1.1 - Keep track of the current filename] +%\NeedsTeXFormat{LaTeX2e} +%<*header> +\ProvidesPackage{fink}[2010/12/03 v2.2 Keep track of the current filename] +% +%<*fink> \RequirePackage{kvoptions} \SetupKeyvalOptions{family=fnk,prefix=fnk@} @@ -232,17 +256,12 @@ % % \subsection{File's name components macros} % \begin{macro}{\finkdir} -% \begin{macro}{\finkbase} -% \begin{macro}{\finkext} -% \begin{macro}{\finkfile} -% \begin{macro}{\finkpath} -% We declare the user-level macros here. |\fink@file| is used to -% compute file names, possibly with no extension. -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} +% \begin{macro}{\finkbase} +% \begin{macro}{\finkext} +% \begin{macro}{\finkfile} +% \begin{macro}{\finkpath} +% We declare the user-level macros here. |\fink@file| is used to +% compute file names, possibly with no extension. % \begin{macrocode} \newcommand*\finkdir{\fnk@maindir} \newcommand*\finkbase{\jobname} @@ -258,51 +277,58 @@ \PackageInfo{FiNK}{main file set to "\finkpath"} % \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} % % \subsection{Commands overriding} -% \begin{macro}{\fink@prepare} -% This macro prepares the name of next file to be input. We arrange to setup -% a complete filename, including directory and extension. -% -% As of version 1.2, this macro performs in a group of its own. This fixes a -% problem that appeared when using |\includegraphics| with a filename with an -% explicit extension. |\includegraphics| calls |\filename@parse| itself, so -% it is important that the same call in |\fink@prepare| only have a local -% effect, just the time to compute the new values for the |\fink@next*| -% macros. +% \begin{macro}{\fink@beginfile} +% \begin{macro}{\fink@endfile} +% The |memoir| class redefines \cs{InputIfFileExists} as well, in order to +% provide its file hooks. Since we override its definition, we need to take +% care of those hooks ourselves. +% \begin{macrocode} +\@ifclassloaded{memoir}{ + \let\fink@beginfile\m@matbeginf + \def\fink@endfile#1{\m@matendf{#1}\killm@matf{#1}}}{% + \def\fink@beginfile#1{} + \def\fink@endfile#1{}} + +% \end{macrocode} % \end{macro} +% \end{macro} +% +% Note: as of version 1.2, every call to \cs{filename@parse} is done in a +% group of its own. This fixes a problem that appeared when using +% |\includegraphics| with a filename with an explicit extension. +% |\includegraphics| calls |\filename@parse| itself, so it is important that +% our call(s) only have a local effect. +% \begin{macro}{\fink@input} +% \begin{macro}{\fink@restore} +% These macros are defined for a convenient use of |\expandafter|. They +% save and restore the current filename. Remember that |\@@input| is +% \LaTeX's redefinition of the \TeX{} input primitive. % \begin{macrocode} -\newcommand*\fink@prepare[1]{% +\newcommand*\fink@input[1]{% \begingroup% \filename@parse{#1}% - \xdef\fink@nextdir{% + \xdef\finkdir{% \ifx\filename@area\@empty% \fnk@maindir% \else% \fnk@maindir\filename@area% \fi}% - \xdef\fink@nextbase{\filename@base}% - \xdef\fink@nextext{\ifx\filename@ext\relax tex\else\filename@ext\fi}% - \xdef\fink@nextfile{\fink@file{\fink@nextbase}{\fink@nextext}}% - \xdef\fink@nextpath{\fink@nextdir\fink@nextfile}% - \endgroup} + \xdef\finkbase{\filename@base}% + \xdef\finkext{\ifx\filename@ext\relax tex\else\filename@ext\fi}% + \xdef\finkfile{\fink@file{\finkbase}{\finkext}}% + \xdef\finkpath{\finkdir\finkfile}% + \endgroup% + \fink@beginfile{#1}% + \@@input\@filef@und% + \fink@endfile{#1}} -% \end{macrocode} -% \begin{macro}{\fink@input} -% \begin{macro}{\fink@restore} -% These macros are defined for a convenient use of |\expandafter|. They -% save and restore the current filename. Remember that |\@@input| is -% \LaTeX's redefinition of the \TeX{} input primitive. -% \end{macro} -% \end{macro} -% \begin{macrocode} -\newcommand*\fink@input{% - \xdef\finkdir{\fink@nextdir}% - \xdef\finkbase{\fink@nextbase}% - \xdef\finkext{\fink@nextext}% - \xdef\finkfile{\fink@nextfile}% - \xdef\finkpath{\fink@nextpath}% - \@@input\@filef@und} \newcommand*\fink@restore[1]{% \begingroup% \filename@parse{#1}% @@ -314,24 +340,27 @@ \endgroup} % \end{macrocode} -% Note: in earlier versions, we redefined |\IfFileExists| to prepare the -% name of the next file, but this is bad because it can be used outside of -% \fink{}'s scope. We also redefined |\@input|, but neither |\include| nor -% |\input| use it. +% \end{macro} +% \end{macro} +% +% Note: in earlier versions, we redefined |\IfFileExists| to prepare the name +% of the next file, but this is bad because it can be used outside of \fink's +% scope. We also redefined |\@input|, but neither |\include| nor |\input| use +% it. % \begin{macro}{\InputIfFileExists} % \LaTeX's |\input| and |\include| commands use |\InputIfFileExists|, so % let's redefine it here: -% \end{macro} % \begin{macrocode} \long\def\InputIfFileExists#1#2{% \IfFileExists{#1}{% #2\@addtofilelist{#1}% - \fink@prepare{#1}% - \expandafter\fink@input% - \expandafter\fink@restore\expandafter{\finkpath}}} + \edef\fink@before{\noexpand\fink@input{#1}}% + \edef\fink@after{\noexpand\fink@restore{\finkpath}}% + \expandafter\fink@before\fink@after}} +% % \end{macrocode} -% +% \end{macro} % ^^A \PrintChanges % ^^A \PrintIndex % \Finale diff --git a/Master/texmf-dist/source/latex/fink/fink.ins b/Master/texmf-dist/source/latex/fink/fink.ins index 2380ab35f74..9e5fa76cc29 100644 --- a/Master/texmf-dist/source/latex/fink/fink.ins +++ b/Master/texmf-dist/source/latex/fink/fink.ins @@ -1,11 +1,11 @@ %%% fink.ins --- Installation file for FiNK -*- mode: LaTeX -*- -%% Copyright (C) 1999, 2000, 2001, 2002, 2007 Didier Verna. +%% Copyright (C) 1999, 2000, 2001, 2002, 2007, 2010 Didier Verna %% Author: Didier Verna %% Maintainer: Didier Verna %% Created: Thu Sep 23 17:47:57 1999 -%% Last Revision: Mon Jun 4 12:55:27 2007 +%% Last Revision: Wed Dec 1 14:36:47 2010 %% This file is part of FiNK. @@ -28,12 +28,14 @@ %%% Code: \NeedsTeXFormat{LaTeX2e} -\input{docstrip.tex} +\input docstrip.tex +\InputIfFileExists{ltxpkg.tex}{}{} +\askforoverwritefalse \keepsilent \preamble ^^J^^J -Copyright (C) 1999, 2000, 2001, 2002, 2007 Didier Verna^^J +Copyright (C) 1999, 2000, 2001, 2002, 2007, 2010 Didier Verna^^J This file is part of FiNK.^^J FiNK may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.1 @@ -46,23 +48,9 @@ FiNK consists of all files listed in the file `README'.^^J \endpreamble \catcode`\¡=14 -\generate{\file{fink.sty}{\from{fink.dtx}{}}} - -\Msg{} -\Msg{,----------} -\Msg{|} -\Msg{| You have two more things to do to finish the installation:} -\Msg{|} -\Msg{| * Typeset the documentation by running LaTeX on the file `fink.dtx'.} -\Msg{| * Install `fink.sty' and `fink.dvi' anywhere you see fink^H^H^H^Hfit.} -\Msg{|} -\Msg{| If you're an AUC-TeX user, you can also install the file `fink.el' in} -\Msg{| a suitable AUC-TeX style directory.} -\Msg{|} -\Msg{| Have fun!} -\Msg{|} -\Msg{`----------} -\Msg{} +\generate{ + \file{header.inc}{\from{fink.dtx}{header}} + \file{fink.sty}{\from{fink.dtx}{header,fink}}} \endbatchfile -- cgit v1.2.3