summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-11-08 23:38:36 +0000
committerKarl Berry <karl@freefriends.org>2010-11-08 23:38:36 +0000
commit2d2cc890664dd671b263c78b68d0edcfd3b2a2d9 (patch)
tree0ec98a4b9e1875d63e9601beabb421603b20c392 /Master/texmf-dist/source
parentbbc55d352bf3225c439e8ece86f2bc6c6b0b65f4 (diff)
luatextra 0.99 (8nov10)
git-svn-id: svn://tug.org/texlive/trunk@20371 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/luatex/luatextra/Makefile2
-rw-r--r--Master/texmf-dist/source/luatex/luatextra/luatextra.dtx190
2 files changed, 64 insertions, 128 deletions
diff --git a/Master/texmf-dist/source/luatex/luatextra/Makefile b/Master/texmf-dist/source/luatex/luatextra/Makefile
index 60708ac0665..ed6a666100d 100644
--- a/Master/texmf-dist/source/luatex/luatextra/Makefile
+++ b/Master/texmf-dist/source/luatex/luatextra/Makefile
@@ -10,7 +10,7 @@ COMPILED = $(DOC_DTX)
GENERATED = $(UNPACKED) $(COMPILED)
SOURCE = $(DTX) README Makefile News
-# Fi-es grouped by installation location
+# Files grouped by installation location
RUNFILES = $(filter-out test.tex, $(UNPACKED))
DOCFILES = $(DOC_DTX) test.tex README News
SRCFILES = $(DTX) Makefile
diff --git a/Master/texmf-dist/source/luatex/luatextra/luatextra.dtx b/Master/texmf-dist/source/luatex/luatextra/luatextra.dtx
index ff56b6e4211..6a4ab9bdb87 100644
--- a/Master/texmf-dist/source/luatex/luatextra/luatextra.dtx
+++ b/Master/texmf-dist/source/luatex/luatextra/luatextra.dtx
@@ -125,7 +125,7 @@ See source file '\inFileName' for details.
% Right brace \} Tilde \~}
%
% \title{The \textsf{luatextra} package}
-% \date{2010/11/04 v0.98}
+% \date{2010/11/08 v0.99}
% \author{%
% Manuel P\'egouri\'e-Gonnard \email{mpg@elzevir.fr} \\
% \'Elie Roux \email{elie.roux@telecom-bretagne.eu}}
@@ -133,10 +133,10 @@ See source file '\inFileName' for details.
% \maketitle
%
% \begin{abstract}
-% The \pf{luatextra} package loads essential packages for \LuaTeX, and
-% provides few additional user-level goodies. It is meant as a convenience
-% package for users. Developers should load directly the underlying packages
-% they specifically need.
+% The \pf{luatextra} package loads essential and convenient packages for
+% \LuaTeX, and provides few additional user-level goodies. It is meant as a
+% convenience package for users. Developers should load directly the
+% underlying packages they specifically need.
%
% \textbf{Warning.} This package is undergoing major changes, see the
% ``Planned changes'' section on page~\pageref{sec-plan}.
@@ -153,84 +153,46 @@ See source file '\inFileName' for details.
% \pf{luamcallbacks}) that allows to register several functions in a
% callback;
% \item \pf{lualibs}: additional lua functions (previously \pf{luaextra}) ;
-% \item \pf{luaotfload}: implements extended syntax for \verb+\font+;
+% \item \pf{luaotfload}: implements extended syntax \emph{à la} \XeTeX\
+% for the \verb+\font+ primitive.
% \end{itemize}
-% When running \LaTeX\ (as opposed to Plain \TeX), the \pf{metalogo} package
-% is loaded too, proviging the macros \verb+\LuaTeX+ and \verb+\LuaLaTeX+ to
-% typeset the logos.
-%
-% It also provides additional goodies, detailled in the next sections.
-%
-% By the way, people wanting to port their old documents to \LuaLaTeX\ without
-% needing to change the input and font encodings may want to use the
-% additional package \pf{luainputenc} (which is \emph{not} recommended for
-% anything but compatibility).
-%
-% \subsection{Plain and \LaTeX\ macros}
-%
-% The most useful macro provided by \pf{luatextra} is certainly
-% \verb+\luadirect+, which is a wrapper for \verb+\directlua+,
-% but will keep the same signature whatever the \LuaTeX\ version. For example
-% this macro works for \LuaTeX\ versions $<$ 0.36, and will most certainly work
-% for future versions of \LuaTeX . It is advised to use this macro to keep the
-% compatibility of your package with all versions of \LuaTeX .
-% \verb+\lualate+ is also provided as a wrapper for
-% \verb+\latelua+.
-%
-% \pf{luatextra} automatically loads \pf{luaotfload}, so you can open otf fonts
-% directly, for instance \verb+\font\foo="LinLibertine.otf"\foo+ will work. You
-% can also pass options to the font opening, for example the different OTF
-% options you want. These options are passed with the \XeTeX\ font syntax
-% (briefly described in \file{XeTeX-reference.pdf}), for example if you want to
-% open a font with the usual \TeX\ substitutions and ligatures, with also the
-% font default ligatures, you can try \newline
-% \verb!\font\foo="LinLibertine.otf;+tlig;+tsub;+liga;+rlig;"\foo!.
-%
-% \subsection{\LaTeX -only macros}
-%
-% \LuaTeX tra also provides an environment for lua code integration:
-% \code{luacode}. You can simply use it this way:
-%
-% \begin{verbatim}
-% \begin{luacode}
-% texio.write_nl("It works!")
-% \end{luacode}
-% \end{verbatim}
+%
+% When running \LaTeX\ \pf{luatextra} loads the following additional packages:
+% \begin{itemize}
+% \item \pf{metalogo}: provides commands for typesetting the \LuaTeX\
+% and \LuaLaTeX\ logos amongst others;
+% \item \pf{luacode}: provides tools for easy integration of Lua code in
+% \LaTeX;
+% \item \pf{fixltx2e}: fixes bugs or suboptimal things in the \LaTeX\ kernel.
+% \end{itemize}
+%
+% In case you are not yet familiar with the available \LuaLaTeX\ packages, you
+% might want to check the document \nolinkurl{lualatex-doc.pdf} from the
+% eponymous package.
%
% \subsection{Planned changes} \label{sec-plan}
%
% If, for some reason, you disagree with one of the upcoming changes described
% below, please discuss it on the development list:
-% \email{lualatex-dev@tug.org}. Here they are, in semi-random order.
+% \email{lualatex-dev@tug.org}.
%
% The most major change planned is to make this package compatible with
-% \LaTeX\ only. Rationale: it is (or will soon be) mostly a convenience
-% package loading other packages. Users of Plain \TeX\ often are assumed not
+% \LaTeX\ only. Rationale: it is (or will soon be) only a convenience
+% package loading other packages. Users of Plain \TeX\ are assumed not
% to care that much about such convenience. Then, \pf{fontspec} would be
% loaded rather than \pf{luaotfload}.
%
% Note that \pf{luatextra} currently expands on \pf{luatexbase-mcb} by
% proposing solutions for the \verb+define_font+ and \verb+open_read_file+
% callbacks. See the implementation section below for details. In the future,
-% this will either be merged in \pf{luatexbase-mcb} or just disappear, since
-% it seems rather unlikely that different packages want to (or are able to
-% usefully) share these callbacks. If you don't want this feature to
-% disappear, please protest on the mailing list.
-%
-% The \code{luatextra} Lua namespace (aka table) would then disappear. Most of
-% it has already been moved to \code{luatexbase} anyway.
-%
-% The remainning goodies (currently, just the \code{luacode} environment) mau
-% move to another (\LaTeX-only) package for better modularity.
-%
-% Also, the package will bail out in error when not running \LuaTeX, rather
-% than semi-silently exiting as it currently does.
+% this code (only half of which was activated) will be removed, since it seems
+% very unlikely that different packages want to (or are able to usefully)
+% share these callbacks. The \code{luatextra} Lua namespace (aka table) will
+% then disappear.
%
-% All name aliases (for primitives and macro from \pf{luatexbase}) will be
-% dropped, so as to maintain a the name space clean. Only \verb+\luadirect+
-% would be kept as it may be used by the user, and provides
-% version-independance. Please check section~\ref{rename} for the complete
-% list of what will be dropped.
+% All name aliases (for primitives and macro from \pf{luatexbase} and previous
+% versions) will be dropped, so as to maintain a the name space clean. Please
+% check section~\ref{rename} for the complete list of what will be dropped.
%
% \section{Implementation}
%
@@ -257,9 +219,9 @@ module("luatextra", package.seeall)
%
% \begin{macrocode}
luatexbase.provides_module {
- version = 0.971,
+ version = 0.99,
name = "luatextra",
- date = "2010/08/02",
+ date = "2010/10/08",
description = "Additional low level functions for LuaTeX",
author = "Elie Roux and Manuel Pegourie-Gonnard",
copyright = "Elie Roux, 2009 and Manuel Pegourie-Gonnard, 2010",
@@ -503,7 +465,7 @@ end
% \end{macrocode}
%
-% Then we load \textsf{ifluatex}.
+% Then we load \textsf{ifluatex} and identify.
%
% \begin{macrocode}
@@ -516,40 +478,32 @@ end
\RequirePackage{ifluatex}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{luatextra}
- [2010/08/02 v0.971 LuaTeX extra low-level macros]
+ [2010/10/08 v0.98 LuaTeX extra low-level macros]
\fi
% \end{macrocode}
%
-% Delegate logo definition to the metalogo package (unless running with
-% Plain TeX).
-%
-% \begin{macrocode}
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname RequirePackage\endcsname\relax \else
- \RequirePackage{metalogo}
-\fi
-% \end{macrocode}
-%
% Make sure Lua\TeX\ is being used.
%
% \begin{macrocode}
\ifluatex\else
\begingroup
- \expandafter\ifx\csname PackageWarningNoLine\endcsname\relax
- \def\x#1#2{\begingroup\newlinechar10
- \immediate\write16{Package #1 warning: #2}\endgroup}
+ \expandafter\ifx\csname PackageError\endcsname\relax
+ \def\x#1#2#3{\begingroup \newlinechar10
+ \errhelp{#3}\errmessage{Package #1 error: #2}\endgroup}
\else
- \let\x\PackageWarningNoLine
+ \let\x\PackageError
\fi
\expandafter\endgroup
- \x{luatextra}{LuaTeX is required for this package.^^J
- Aborting package loading.}
+ \x{luatextra}{LuaTeX is required for this package. Aborting.}{%
+ This package can only be used with the LuaTeX engine^^J%
+ (command `lualatex' or `luatex').^^J%
+ Package loading has been stopped to prevent additional errors.}
\expandafter\endinput
\fi
% \end{macrocode}
%
-% Load other usefull packages.
+% Load packages.
%
% \begin{macrocode}
\bgroup\expandafter\expandafter\expandafter\egroup
@@ -557,31 +511,26 @@ end
\input luatexbase.sty
\input luatexbase-modutils.sty
\input luatexbase-mcb.sty
+ \luatexUseModule{lualibs}
+ \input luaotfload.sty
\else
\RequirePackage{luatexbase}
\RequirePackage{luatexbase-modutils}
\RequirePackage{luatexbase-mcb}
-\fi
-\luatexUseModule{lualibs}
-% \end{macrocode}
-%
-% If the package is loaded with \LaTeX , we
-% also define the environment \texttt{luacode}.
-%
-% \begin{macrocode}
-\bgroup\expandafter\expandafter\expandafter\egroup
-\expandafter\ifx\csname ProvidesPackage\endcsname\relax \else
- \RequirePackage{environ}
- \NewEnviron{luacode}{\directlua{\BODY}}
+ \luatexUseModule{lualibs}
+ \RequirePackage{luaotfload}
+ %
+ \RequirePackage{metalogo}
+ \RequirePackage{luacode}
+ \RequirePackage{fixltx2e}
\fi
% \end{macrocode}
%
-%
% \subsubsection{Primitives and macros renaming}\label{rename}
%
-% \textbf{Warning.} This entire section will probably be dropped in a
-% future release. Check section~\ref{sec-plan} for what to do if ouy
-% deperately need it.
+% \textbf{Warning.} This entire section will be dropped in a future
+% release. Check section~\ref{sec-plan} for what to do if you deperately
+% need it.
%
% Here we differenciate two very different cases: Lua\TeX\ version < 0.36
% has no \texttt{tex.enableprimitives} function, and has support for
@@ -605,7 +554,6 @@ end
% \begin{macrocode}
\def\directlua{\pdfprimitive\directlua0}
\def\latelua{\pdfprimitive\latelua0}
- \def\luadirect{\pdfprimitive\directlua0}
\def\lualate{\pdfprimitive\latelua0}
\def\luatexattribute{\attribute}
\def\luatexattributedef{\attributedef}
@@ -634,7 +582,6 @@ end
\directlua{tex.enableprimitives('luatex', {'initcatcodetable'})}
\directlua{tex.enableprimitives('luatex', {'savecatcodetable'})}
\directlua{tex.enableprimitives('luatex', {'closelua'})}
- \let\luadirect\directlua
\let\lualate\luatexlatelua
\let\initluatexcatcodetable\luatexinitcatcodetable
\let\saveluatexcatcodetable\luatexsavecatcodetable
@@ -642,15 +589,6 @@ end
\fi
% \end{macrocode}
%
-% We load the \texttt{lua} file.
-%
-% \begin{macrocode}
-\directlua{dofile(kpse.find_file("luatextra.lua"))}
-% \end{macrocode}
-%
-% A small macro to register the \texttt{define\_font} callback from
-% \textsf{luatextra}.
-%
% We provide some functions for backward compatibility with old versions of
% luatextra.
%
@@ -667,23 +605,21 @@ end
\let\luaUseModule\luatexUseModule
% \end{macrocode}
%
-% \subsubsection{Misc}
+% \subsection{Callbacks}
+%
+% We load the \texttt{lua} file.
%
% \begin{macrocode}
-\def\ltxtra@RegisterFontCallback{
- \directlua{luatextra.register_font_callback()}
-}
+\directlua{dofile(kpse.find_file("luatextra.lua"))}
% \end{macrocode}
%
-% Finally, we load \textsf{luaotfload}.
+% A small macro to register the \texttt{define\_font} callback from
+% \textsf{luatextra}.
%
% \begin{macrocode}
-\bgroup\expandafter\expandafter\expandafter\egroup
-\expandafter\ifx\csname ProvidesPackage\endcsname\relax
- \input luaotfload.sty
-\else
- \RequirePackage{luaotfload}
-\fi
+\def\ltxtra@RegisterFontCallback{
+ \directlua{luatextra.register_font_callback()}
+}
% \end{macrocode}
%
% \begin{macrocode}