From 6732b8712a1ab2a6cd750bf97ed98103a854bd53 Mon Sep 17 00:00:00 2001
From: Elie Roux <elie.roux@telecom-bretagne.eu>
Date: Tue, 16 Apr 2013 11:16:13 +0200
Subject: Inputing luatex.sty before luatexbase

Otherwise luatex.sty breaks
---
 luatexbase.dtx | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

(limited to 'luatexbase.dtx')

diff --git a/luatexbase.dtx b/luatexbase.dtx
index 6bf3fa6..49b0c07 100644
--- a/luatexbase.dtx
+++ b/luatexbase.dtx
@@ -132,11 +132,11 @@ See the aforementioned source file(s) for copyright and licensing information.
 % \subsection{History}
 %
 % The first package for managing \luatex's new resources was the \pk{luatex}
-% package by Heiko Oberdiek. Later, Élie Roux wrote \pk{luatextra} which
+% package by Heiko Oberdiek. Later, \'Elie Roux wrote \pk{luatextra} which
 % reprised many features of \pk{luatex} with little extensions to some of them
 % and added independant low-level features (currently found in the
 % \pk{modutils} and \pk{mcb} subpackages), as well as user-level things.
-% Later, \pk{luatexbase} was created by Manuel Pégourié-Gonnard by isolating
+% Later, \pk{luatexbase} was created by Manuel P\'egouri\'e-Gonnard by isolating
 % the general low-level features of \pk{luatextra}, and later expanding on
 % them.
 %
@@ -243,6 +243,21 @@ See the aforementioned source file(s) for copyright and licensing information.
 \fi
 %    \end{macrocode}
 %
+%    %\subsection{luatex.sty compatibility}
+%
+%    Currently, |luatex.sty| has to be loaded before luatexbase, otherwise it
+%    raises an error, as the same names are used between luatexbase and luatex.
+%
+%    This is a quite strange situation, but we hope to clarify it.
+%
+%    \begin{macrocode}
+\expandafter\ifx\csname RequirePackage\endcsname\relax
+  \input luatex.sty
+\else
+  \RequirePackage{luatex}
+\fi
+%    \end{macrocode}
+%
 %    \subsection{Packages loading}
 %
 %    \begin{macrocode}
-- 
cgit v1.2.3

