From 0fa82d952c1fc02c56e38c6e3a3e023f85cd5d79 Mon Sep 17 00:00:00 2001 From: Elie Roux Date: Tue, 16 Apr 2013 11:15:18 +0200 Subject: Not including luatex.sty in the CTAN archive --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 8f2f30d..6fdc7fb 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # Makefile for luatexbase NAME = luatexbase -DTX = $(wildcard *.dtx) +DTX = $(wildcard luatexbase*.dtx) DOC = $(patsubst %.dtx, %.pdf, $(DTX)) DTXSTY = lltxb-dtxstyle.tex @@ -28,6 +28,9 @@ UNPACKED_LUATEX = luatex.sty test-luatex1.tex test-luatex2.tex \ UNPACKED = $(UNPACKED_MCB) $(UNPACKED_REGS) $(UNPACKED_ATTR) $(UNPACKED_CCTB) \ $(UNPACKED_LOADER) $(UNPACKED_MODUTILS) $(UNPACKED_COMPAT) \ $(UNPACKED_BASE) $(UNPACKED_LUATEX) +UNPACKEDTL = $(UNPACKED_MCB) $(UNPACKED_REGS) $(UNPACKED_ATTR) $(UNPACKED_CCTB) \ + $(UNPACKED_LOADER) $(UNPACKED_MODUTILS) $(UNPACKED_COMPAT) \ + $(UNPACKED_BASE) COMPILED = $(DOC) GENERATED = $(COMPILED) $(UNPACKED) SOURCE = $(DTX) $(DTXSTY) README TODO Changes Makefile @@ -38,8 +41,8 @@ TMP_LOADER = $(TEST_LOADER).tex TEST_MCB = test-mcb-aux.tex # Files grouped by installation location -RUNFILES = $(filter-out test-%, $(UNPACKED)) -DOCFILES = $(DOC) $(filter test-%, $(UNPACKED)) README TODO Changes +RUNFILES = $(filter-out test-%, $(UNPACKEDTL)) +DOCFILES = $(DOC) $(filter test-%, $(UNPACKEDTL)) README TODO Changes SRCFILES = $(DTX) Makefile # The following definitions should be equivalent -- cgit v1.2.3 From 6732b8712a1ab2a6cd750bf97ed98103a854bd53 Mon Sep 17 00:00:00 2001 From: Elie Roux Date: Tue, 16 Apr 2013 11:16:13 +0200 Subject: Inputing luatex.sty before luatexbase Otherwise luatex.sty breaks --- Changes | 3 +++ luatexbase.dtx | 19 +++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index e3a7959..0b6b3d4 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,9 @@ Changes in the luatexbase package/bundle 2013/04/13 v0.5 + all + - input luatex.sty before doing anything, is luatex.sty + breaks if loaded after luatexbase mcb and loader - compatibility with Lua 5.2 (LuaTeX >= 0.74) loader 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 From a2ee5bc3b3ebe670d234826aa4302944ac301142 Mon Sep 17 00:00:00 2001 From: Elie Roux Date: Tue, 16 Apr 2013 11:16:58 +0200 Subject: Removing utf8 characters For an unknown reason, it breaks on my system... --- lltxb-dtxstyle.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lltxb-dtxstyle.tex b/lltxb-dtxstyle.tex index 804dbfb..115d4f2 100644 --- a/lltxb-dtxstyle.tex +++ b/lltxb-dtxstyle.tex @@ -57,8 +57,8 @@ \newif\ifluatexbase \author{% Heiko Oberdiek (primary author of \pk{luatex}) \\ - Élie Roux (primary author of \pk{luatextra}) \\ - Manuel Pégourié-Gonnard (current developper)\thanks{% + \'Elie Roux (primary author of \pk{luatextra}) \\ + Manuel P\'egouri\'e-Gonnard (current developper)\thanks{% See ``History'' \ifluatexbase\else in \href{luatexbase.pdf}{\file{luatexbase.pdf}} \fi for details.}% @@ -68,7 +68,7 @@ } \hypersetup{% pdfsubject = {Basic resource management for LuaTeX}, - pdfauthor = {Manuel Pégourié-Gonnard, Élie Roux, Heiko Oberdiek}, + pdfauthor = {Manuel P\'egouri\'e-Gonnard, \'Elie Roux, Heiko Oberdiek}, } % other metadata -- cgit v1.2.3 From f561b20dfd29458a3e0cd3d73d47cb491e9642f8 Mon Sep 17 00:00:00 2001 From: Elie Roux Date: Tue, 16 Apr 2013 11:24:56 +0200 Subject: Updating TODO --- TODO | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/TODO b/TODO index b70a84a..6205464 100644 --- a/TODO +++ b/TODO @@ -13,9 +13,7 @@ all or generalise use of qstest - add debug messages to be used in the test suite? - mark all occurences of version-dependent stuff in the code -- drop compat for 0.25 when tl2010 is frozen -- quit using module() in favor of locals, more generally ensure compat with - Lua 5.2 +- quit using module() in favor of locals - support the syntax foo = require"foo" in modutils? How? compat -- cgit v1.2.3 From 5e54c556e848afd081f6d47cb45bc5d7e192c30d Mon Sep 17 00:00:00 2001 From: Elie Roux Date: Tue, 16 Apr 2013 11:34:46 +0200 Subject: Fixing a typo --- Changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Changes b/Changes index 0b6b3d4..c4a11e5 100644 --- a/Changes +++ b/Changes @@ -2,7 +2,7 @@ 2013/04/13 v0.5 all - - input luatex.sty before doing anything, is luatex.sty + - input luatex.sty before doing anything, as luatex.sty breaks if loaded after luatexbase mcb and loader - compatibility with Lua 5.2 (LuaTeX >= 0.74) -- cgit v1.2.3 From 16c1318272c3fd2451cf7a3f5f93af1973131270 Mon Sep 17 00:00:00 2001 From: Elie Roux Date: Tue, 16 Apr 2013 12:17:59 +0200 Subject: Fixing a bug with plain tex --- luatexbase-modutils.dtx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luatexbase-modutils.dtx b/luatexbase-modutils.dtx index 57ffb1d..ae228b4 100644 --- a/luatexbase-modutils.dtx +++ b/luatexbase-modutils.dtx @@ -378,7 +378,7 @@ See the aforementioned source file(s) for copyright and licensing information. % supporting Lua module and make sure |luaescapestring| is available. % % \begin{macrocode} -\ifdefined\RequirePackage +\ifx\csname\RequirePackage \RequirePackage{luatexbase-loader} \else \input luatexbase-loader.sty -- cgit v1.2.3 From fb079cebe47137b48aa90ad735075d657695239a Mon Sep 17 00:00:00 2001 From: Elie Roux Date: Tue, 16 Apr 2013 12:19:28 +0200 Subject: A better fix --- luatexbase-modutils.dtx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/luatexbase-modutils.dtx b/luatexbase-modutils.dtx index ae228b4..6f500da 100644 --- a/luatexbase-modutils.dtx +++ b/luatexbase-modutils.dtx @@ -378,10 +378,10 @@ See the aforementioned source file(s) for copyright and licensing information. % supporting Lua module and make sure |luaescapestring| is available. % % \begin{macrocode} -\ifx\csname\RequirePackage - \RequirePackage{luatexbase-loader} -\else +\expandafter\ifx\csname RequirePackage\endcsname\relax \input luatexbase-loader.sty +\else + \RequirePackage{luatexbase-loader} \fi \luatexbase@directlua{require('luatexbase.modutils')} \luatexbase@ensure@primitive{luaescapestring} -- cgit v1.2.3 From 3598f72232426c45f81165df60211b65a2bbcf8a Mon Sep 17 00:00:00 2001 From: Elie Roux Date: Tue, 16 Apr 2013 12:21:37 +0200 Subject: Update Changes --- Changes | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Changes b/Changes index c4a11e5..7689400 100644 --- a/Changes +++ b/Changes @@ -12,6 +12,9 @@ - dropping support for LuaTeX < 0.45. - small improvement to make x.y.lua look for x/y.lua, not x/y/lua. + modutils + - fixing a bug printing "luatexbase-attr" in all documents + in plain TeX 2011/00/24 v0.4 cctb -- cgit v1.2.3 From 83d1a96aab50cc552604357dedc0b4810914c31a Mon Sep 17 00:00:00 2001 From: Elie Roux Date: Mon, 22 Apr 2013 14:41:35 +0200 Subject: Filenames are not printed if called by texlua --- luatexbase-loader.dtx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/luatexbase-loader.dtx b/luatexbase-loader.dtx index 77b9b9b..b8e5098 100644 --- a/luatexbase-loader.dtx +++ b/luatexbase-loader.dtx @@ -283,6 +283,17 @@ module('luatexbase', package.seeall) kpse.set_program_name("luatex") % \end{macrocode} % +% In \LaTeX, it's traditional to print the included file paths. We don't want +% to do this for scripts using texlua... Currently there is no perfect check +% of texlua vs. luatex, so we check for the token table. +% +% \begin{macrocode} +local print_included_path = false +if token then + print_included_path = true +end +% \end{macrocode} +% % Emulate (approximatively) kpse's lua format search. More precisely, % combine the search path of |texmfscripts| and |tex| in order to % approximate |LUAINPUTS|. But we need to handle suffixes ourselves. @@ -357,7 +368,9 @@ local function load_module(mod) if not loader then return "\n\t[luatexbase.loader] Loading error:\n\t"..error end - texio.write_nl("("..file..")") + if print_included_path then + texio.write_nl("("..file..")") + end return loader end % \end{macrocode} -- cgit v1.2.3 From 6d08e81d1de5033c7edefcce80656bda175aef08 Mon Sep 17 00:00:00 2001 From: Elie Roux Date: Mon, 22 Apr 2013 14:42:43 +0200 Subject: Callback infos are now in the log files I'm not sure these are meaningfull for users... --- luatexbase-mcb.dtx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/luatexbase-mcb.dtx b/luatexbase-mcb.dtx index 8b99a52..ee07019 100644 --- a/luatexbase-mcb.dtx +++ b/luatexbase-mcb.dtx @@ -393,7 +393,7 @@ See the aforementioned source file(s) for copyright and licensing information. % % \begin{macrocode} module('luatexbase', package.seeall) -local err, warning, info = luatexbase.provides_module({ +local err, warning, info, log = luatexbase.provides_module({ name = "luatexbase-mcb", version = 0.5, date = "2013/04/13", @@ -687,7 +687,7 @@ function add_to_callback (name,func,description,priority) warning("several functions in '%s',\n" .."only one will be active.", name) end - info("inserting '%s'\nat position %s in '%s'", + log("inserting '%s'\nat position %s in '%s'", description, priority, name) end % \end{macrocode} @@ -733,7 +733,7 @@ function remove_from_callback (name, description) return end table.remove(l, index) - info("removing '%s'\nfrom '%s'", description, name) + log("removing '%s'\nfrom '%s'", description, name) if #l == 0 then callbacklist[name] = nil if not lua_callbacks_defaults[name] then @@ -756,11 +756,11 @@ function reset_callback (name, make_false) err("unable to reset '%s':\nis not a valid callback", name) return end - info("resetting callback '%s'", name) + log("resetting callback '%s'", name) callbacklist[name] = nil if not lua_callbacks_defaults[name] then if make_false == true then - info("setting '%s' to false", name) + log("setting '%s' to false", name) register_callback(name, false) else register_callback(name, nil) @@ -823,7 +823,7 @@ function create_callback(name, ctype, default) err("unable to create callback '%s':\ntype '%s' undefined", name, ctype) return nil end - info("creating '%s' type %s", name, ctype) + log("creating '%s' type %s", name, ctype) lua_callbacks_defaults[name] = default callbacktypes[name] = ctype end -- cgit v1.2.3 From 9f6a0549cd37e642e4e3fd6c31a210544b6e93a0 Mon Sep 17 00:00:00 2001 From: Elie Roux Date: Mon, 22 Apr 2013 15:03:46 +0200 Subject: Updating Changes --- Changes | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Changes b/Changes index 7689400..7b39c55 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,11 @@ Changes in the luatexbase package/bundle +2013/04/22 v0.6 + loader + - do not output included file paths when called by texlua + mcb + - passing most of the term output to the log + 2013/04/13 v0.5 all - input luatex.sty before doing anything, as luatex.sty -- cgit v1.2.3