summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/lualatex/luabibentry/News2
-rw-r--r--Master/texmf-dist/doc/lualatex/luabibentry/README45
-rw-r--r--Master/texmf-dist/doc/lualatex/luabibentry/luabibentry.pdfbin0 -> 157642 bytes
-rw-r--r--Master/texmf-dist/source/lualatex/luabibentry/Makefile100
-rw-r--r--Master/texmf-dist/source/lualatex/luabibentry/luabibentry.dtx400
-rw-r--r--Master/texmf-dist/tex/lualatex/luabibentry/luabibentry.lua104
-rw-r--r--Master/texmf-dist/tex/lualatex/luabibentry/luabibentry.sty56
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
-rwxr-xr-xMaster/tlpkg/bin/tlpkginfo3
-rw-r--r--Master/tlpkg/tlpsrc/collection-luatex.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/luabibentry.tlpsrc0
11 files changed, 711 insertions, 2 deletions
diff --git a/Master/texmf-dist/doc/lualatex/luabibentry/News b/Master/texmf-dist/doc/lualatex/luabibentry/News
new file mode 100644
index 00000000000..df3891e601d
--- /dev/null
+++ b/Master/texmf-dist/doc/lualatex/luabibentry/News
@@ -0,0 +1,2 @@
+2011/06/27
+ * Initial version
diff --git a/Master/texmf-dist/doc/lualatex/luabibentry/README b/Master/texmf-dist/doc/lualatex/luabibentry/README
new file mode 100644
index 00000000000..123b353ea35
--- /dev/null
+++ b/Master/texmf-dist/doc/lualatex/luabibentry/README
@@ -0,0 +1,45 @@
+LuaLaTeX package luaindex v0.1, 2001-06-27.
+Copyright (c) Oliver Kopp, 2011
+
+Summary
+-------
+luabibentry is a reimplementation of bibentry.sty by Patrick W.\ Daly. It
+provides the command \bibentry{<BibTeXKey>} to print the bibliographic entry in
+the main document.
+
+
+Generating the package
+----------------------
+To produce the package and the manual from `luabibentry.dtx' you have to run
+
+ tex luaindex.dtx
+and pdflatex luaindex.dtx
+
+or make all
+
+
+Installation
+------------
+Distributors should save
+ luabibentry.lua as TDS:luatex/luabibentry/luabibentry.lua and
+ luabibentry.sty as TDS:luatex/luabibentry/luabibindex.sty.
+
+A TDS-friendly .zip can be obtained by "make tds"
+
+
+License
+-------
+This file is part of the LuaLaTex package `luabibentry'.
+
+This work may be distributed and/or modified under the conditions of
+the LaTeX Project Public License, version 1.3c of the license.
+The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3c or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
+
+This work has the LPPL maintenance status "maintained".
+
+The Current Maintainer and author of this work is Oliver Kopp.
+
+This work consists of the files `luabibentry.dtx' and `README'.
diff --git a/Master/texmf-dist/doc/lualatex/luabibentry/luabibentry.pdf b/Master/texmf-dist/doc/lualatex/luabibentry/luabibentry.pdf
new file mode 100644
index 00000000000..bc2d16f64ac
--- /dev/null
+++ b/Master/texmf-dist/doc/lualatex/luabibentry/luabibentry.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/lualatex/luabibentry/Makefile b/Master/texmf-dist/source/lualatex/luabibentry/Makefile
new file mode 100644
index 00000000000..42b91bd3e3c
--- /dev/null
+++ b/Master/texmf-dist/source/lualatex/luabibentry/Makefile
@@ -0,0 +1,100 @@
+#This Makefile is a modified version of luacode's Makefile
+#
+#Changes
+# * "NAME" field: luacode -> luabibentry
+# * check target also calls BibTeX and re-runs lualatex
+# * use of pdflatex instead of latexmk to build documentation
+# * added LUA
+
+NAME = luabibentry
+FORMAT = lualatex
+
+DTX = $(NAME).dtx
+DOC = $(NAME).pdf
+STY = $(NAME).sty
+LUA = $(NAME).lua
+TEST = test-$(NAME).tex
+
+UNPACKED = $(STY) $(TEST)
+GENERATED = $(UNPACKED) $(DOC)
+SOURCES = $(DTX) README News Makefile
+
+SRCFILES = $(DTX) Makefile
+DOCFILES = $(DOC) README News
+RUNFILES = $(STY) $(LUA)
+ALL = $(SRCFILES) $(DOCFILES) $(RUNFILES)
+
+TEXMFROOT = ./texmf
+RUNDIR = $(TEXMFROOT)/tex/$(FORMAT)/$(NAME)
+DOCDIR = $(TEXMFROOT)/doc/$(FORMAT)/$(NAME)
+SRCDIR = $(TEXMFROOT)/source/$(FORMAT)/$(NAME)
+
+CTAN_ZIP = $(NAME).zip
+TDS_ZIP = $(NAME).tds.zip
+ZIPS = $(CTAN_ZIP) $(TDS_ZIP)
+
+all: $(GENERATED)
+doc: $(DOC)
+unpack: $(UNPACKED)
+ctan: check $(CTAN_ZIP)
+tds: $(TDS_ZIP)
+world: ctan
+
+.PHONY: all doc unpack ctan tds check world
+
+%.pdf: %.dtx
+ pdflatex -interaction=batchmode $< >/dev/null
+ pdflatex -interaction=batchmode $< >/dev/null
+
+$(UNPACKED): $(DTX)
+ tex -interaction=batchmode $< >/dev/null
+
+check: $(UNPACKED)
+ lualatex -interaction=batchmode $(TEST) >/dev/null
+ bibtex $(TEST) >/dev/null
+ lualatex -interaction=batchmode $(TEST) >/dev/null
+
+$(CTAN_ZIP): $(DOC) $(SOURCES) $(TDS_ZIP)
+ @echo "Making $@ for CTAN upload."
+ @$(RM) -- $@
+ @zip -9 -q $@ $^
+
+define run-install
+@mkdir -p $(RUNDIR) && cp $(RUNFILES) $(RUNDIR)
+@mkdir -p $(DOCDIR) && cp $(DOCFILES) $(DOCDIR)
+@mkdir -p $(SRCDIR) && cp $(SRCFILES) $(SRCDIR)
+endef
+
+$(TDS_ZIP): TEXMFROOT=./tmp-texmf
+$(TDS_ZIP): $(ALL)
+ @echo "Making TDS-ready archive $@."
+ @$(RM) -- $@
+ @if test -e $(TEXMFROOT); then echo 'bad TEXMFROOT'; false; fi
+ $(run-install)
+ @cd $(TEXMFROOT) && zip -q -9 ../$@ -r .
+ @$(RM) -r -- $(TEXMFROOT)
+
+.PHONY: install clean mrproper help
+
+install: check $(ALL)
+ @echo "Installing in '$(TEXMFROOT)'."
+ $(run-install)
+
+clean:
+ @latexmk -silent -c $(DTX) >/dev/null
+ @rm -f -- test-*.log test-*.aux test-*.pdf
+
+mrproper: clean
+ @rm -f -- $(GENERATED) $(ZIPS)
+
+help:
+ @echo '$(NAME) makefile targets:'
+ @echo ' help - (this message)'
+ @echo ' all - (default target) all generated files'
+ @echo ' world - synonymous for ctan'
+ @echo ' unpack - extract all files'
+ @echo ' doc - compile documentation'
+ @echo ' ctan - run check & generate archive for CTAN'
+ @echo ' tds - generate a TDS compliant archive'
+ @echo ' check - run the test files'
+ @echo ' install TEXMFROOT=<path> - install in <path>'
diff --git a/Master/texmf-dist/source/lualatex/luabibentry/luabibentry.dtx b/Master/texmf-dist/source/lualatex/luabibentry/luabibentry.dtx
new file mode 100644
index 00000000000..86b0ebce806
--- /dev/null
+++ b/Master/texmf-dist/source/lualatex/luabibentry/luabibentry.dtx
@@ -0,0 +1,400 @@
+% \iffalse meta-comment
+% ==========================================================================
+% luabibentry.dtx v0.1, 2011/06/27
+% Copyright (c) Oliver Kopp, 2011
+%
+% This file is part of the LuaLaTex package `luabibentry'.
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, version 1.3c of the license.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% The Current Maintainer and author of this work is Oliver Kopp.
+%
+% This work consists of the files `luabibentry.dtx' and `README'.
+%
+% Unpacking:
+% tex luabibentry.dtx
+% Documentation:
+% pdflatex luacode.dtx
+% ==========================================================================
+%
+%<*ignore>
+\begingroup
+ \def\x{LaTeX2e}%
+\expandafter\endgroup
+\ifcase 0\ifx\install y1\fi\expandafter
+ \ifx\csname processbatchFile\endcsname\relax\else1\fi
+ \ifx\fmtname\x\else 1\fi\relax
+\else\csname fi\endcsname
+%</ignore>
+%<*install>
+\input docstrip.tex
+\keepsilent
+\askforoverwritefalse
+{
+\obeyspaces\obeylines
+\global\def\preambletext{
+\space
+Copyright (c) 2011 by Oliver Kopp <oliver.kopp.googlemail.com>
+
+This file was generated from file(s) of luabibentry distribution.
+-----------------------------------------------------------------
+
+This work may be distributed and/or modified under the conditions of
+the LaTeX Project Public License, version 1.3c of the license.
+The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3c or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
+
+This work has the LPPL maintenance status "maintained".
+
+The Current Maintainer and author of this work is Oliver Kopp.
+
+This file may only be distributed together with the files listed in
+`luabibentry.dtx'. You may however distribute the files listed in
+`luabibentry.dtx' without this file.
+}
+\global\def\stypreambletext{
+\preambletext
+Usage:
+
+\string\setupbibentry{<bibliography>} before the usage of \string\bibentry.
+\string\setupbibentry{\string\jobname} may be used if the bibliography has the same name as the .tex file.
+
+\string\bibentry{<entry>} where you want to have placed an entry.
+In case an entry is not found "?" is output
+}
+}
+%
+\expandafter\preamble
+\preambletext
+\endpreamble
+%
+\declarepreamble\stypreamble
+\stypreambletext
+\endpreamble
+%
+\def\BibTeXComment{@Comment }
+\let\MetaPrefix\BibTeXComment
+\declarepreamble\bibpreamble
+\preambletext
+\endpreamble
+%
+\def\ThreeHyphens{---}
+\let\MetaPrefix\ThreeHyphens
+%
+\expandafter\declarepreamble\expandafter\luapreamble
+\preambletext
+\endpreamble
+
+\generate{%
+ \let\MetaPrefix\DoubleperCent
+ \usepreamble\defaultpreamble
+ \file{test-luabibentry.tex}{\from{luabibentry.dtx}{testlatex}}%
+%
+ \let\MetaPrefix\DoubleperCent
+ \usepreamble\stypreamble
+ \file{luabibentry.sty}{\from{luabibentry.dtx}{package}}%
+%
+ \let\MetaPrefix\BibTeXComment
+ \usepreamble\bibpreamble
+ \nopostamble
+ \file{test-luabibentry.bib}{\from{luabibentry.dtx}{testbibtex}}%
+%
+ \let\MetaPrefix\ThreeHyphens
+ \usepreamble\luapreamble
+ \nopostamble
+ \file{luabibentry.lua}{\from{luabibentry.dtx}{lua}}%
+}
+{
+\obeyspaces
+\Msg{************************************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{* luabibentry.sty and luabibentry.lua}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*}
+\Msg{************************************************************************}
+}
+
+%\csname endinput\endcsname
+\endbatchfile
+%</install>
+%<package>\NeedsTeXFormat{LaTeX2e}[1995/06/01]
+%<package>\ProvidesPackage{luabibentry}
+%<driver>\ProvidesFile{luaindex.dtx}
+%<*driver|package>
+[2011/06/27 v0.1 LuaLaTeX Package to place bibliography entries in text]
+%</driver|package>
+%<lua>if (luatexbase and (luatexbase.provides_module)) then
+%<lua> luatexbase.provides_module({
+%<lua> name = "luabibentry",
+%<lua> date = "2011/06/27",
+%<lua> version = "0.1",
+%<lua> description = "LuaLaTeX Package to Place Bibliography Entries in Text",
+%<lua> author = "Oliver Kopp",
+%<lua> licence = "LPPL v1.3c or later"
+%<lua> })
+%<lua>end
+%<*ignore>
+\fi
+%</ignore>
+%<*driver>
+\documentclass[oneside,DIV=16,BCOR=0cm,parskip=half]{scrdoc}
+\usepackage[english]{babel}
+\usepackage{hyperref}
+\providecommand*{\LuaLaTeX}{Lua\kern-.025em\LaTeX}
+\CodelineIndex
+\RecordChanges
+\GetFileInfo{luabibentry.ltx}
+\title{%
+ The \texttt{luabibentry} package
+}
+%\date{\fileversion} %currently doesn't work
+\date{Version 0.1 as of 2011/06/27}
+\author{Oliver Kopp\thanks{oliver.kopp%
+@%
+googlemail%
+.%
+com}}
+\begin{document}
+\maketitle
+\DocInput{luabibentry.dtx}
+\end{document}
+%</driver>
+%\fi^^A meta-comment
+%
+% \changes{v0.1}{2011/06/27}{start of new package}
+%
+% \begin{abstract}
+% Typically, bibliographic entries are put at the end of a document. This
+% package allows for \emph{repeating} bibliographic entries in the document itself. The package
+% is inspired by bibentry, which provides similar functionality for \LaTeX{}.
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \section{Introduction}
+% This package allows one to place bibliographic entries anywhere
+% in the text. It is to be used to produce annotated bibliographies, such as
+% \begin{quote}
+% For an intoduction to the topic of workflow management, see
+% Frank Leymann and Dieter Roller. {\it Production Workflow -- Concepts and Techniques}.
+% Prentice Hall PTR, 2000.
+% \end{quote}
+%
+% The idea is that the full reference is used, not just the citation [1] or
+% Leymann and Roller [2000].
+%
+% This package is a variant of bibentry.sty by Patrick W.\ Daly. bibentry.sty is
+% distributed with the natbib
+% package\footnote{\url{http://mirror.ctan.org/macros/latex/contrib/natbib/}}. This
+% documentation of luabibentry is mostly adapted from Patrick's documentation of
+% bibentry. bibentry itself is part of the natbib package.
+%
+% The main reason for the reimplementation is the incompatibility of hyperref's
+% backref with bibenetry.sty. The \texttt{\textbackslash saved \makeatletter
+% @\makeatother bibitem} solution did not work here.
+%
+% The differences to bibentry.sty is:
+% The commands |\nobibliography| and |\nobibliography*|
+% are unsupported. luabibentry always uses the bibliography of the
+% document.
+%
+% \section{Usage}
+% |\setupbibentry{<bibliography>}| before the usage of |\bibentry|.\\
+% |\setupbibentry{\jobname}| may be used if the bibliography has the same name as the |.tex| file.
+%
+% |\bibentry{<entry>}| where you want to have placed an entry.
+% In case an entry is not found, ``?'' is output.
+%
+% \section{Caveats}
+% The caveats of the entry format are similar to the bibentry package. The only
+% difference is that luabibentry expects the key as last token in the bibitem entry.
+% Thus, the following text is a verbatim copy of bibentry's documentation with the
+% reference to the allowed space after the key being removed.
+%
+% The entries in the \texttt{.bbl} must be of the form
+% \begin{quote}
+% |\bibitem|\oarg{label}\marg{key}\\
+% \emph{Text of the reference entry.}\\[1ex]
+% |\bibitem|\dots
+% \end{quote}
+% That is, there must be a new line after the \marg{key}
+% and a blank line before the next |\bibitem|. The final period in the text
+% will be removed, if present, allowing one to place the |\bibentry| commands
+% in mid-sentence. Of course, there may be other periods within the text that
+% might look funny.
+%
+% \section{Test}
+% A simple test whether luabibentry runs is provided here:
+%
+% \iffalse meta-comment
+%<*testlatex>
+% \fi
+% \begin{macrocode}
+\documentclass{article}
+\usepackage{luabibentry}
+\setupbibentry{\jobname}
+
+\usepackage[backref=page]{hyperref}
+
+\begin{document}
+
+The entry for \cite{LR2000} is: \bibentry{LR2000}.
+
+\bibliographystyle{plain}
+\bibliography{test-luabibentry}
+
+\end{document}
+% \end{macrocode}
+% \iffalse meta-comment
+%</testlatex>
+% \fi
+%
+% \iffalse meta-comment
+%<*testbibtex>
+% \fi
+% \begin{macrocode}
+@BOOK{LR2000,
+ title = {{P}roduction {W}orkflow -- {C}oncepts and {T}echniques},
+ publisher = {Prentice Hall PTR},
+ year = {2000},
+ author = {Frank Leymann and Dieter Roller},
+ isbn = {0130217530}
+}
+% \end{macrocode}
+% \iffalse meta-comment
+%</testbibtex>
+% \fi
+%
+% \section{Implementation of Lua Module \texttt{luabibentry.lua}}
+% \iffalse meta-comment
+%<*lua>
+% \fi^^A meta-comment
+% \begin{macrocode}
+module("luabibentry", package.seeall)
+require("lualibs-file")
+
+-- stores all entries
+local entries = {}
+
+-- builds the data by reading the given filename
+function builddata(filename)
+ -- Parameters seem to be passed as arrays.
+ -- We access the first element of the parameter to get the filename
+ local file = io.open(filename[1], "r")
+ if file==nil then
+ texio.write_nl("luabibentry: could not open file " .. filename[1])
+ return
+ end
+ local line = file:read("*line")
+ while (line~=nil) do
+ -- \bibitem is our marker for new entries
+ local i = string.find(line, "\\bibitem")
+ if i~=nil then
+ -- we expect the key in brackets in the same line
+ i = string.find(line,"{")
+ local lasti = 0
+ -- we jump to the last bracket
+ while i~= nil do
+ lasti = i
+ i = string.find(line,"{",i+1)
+ end
+ local key = string.sub(line, lasti+1)
+ -- we use the text from the last opening bracket ("{") until
+ -- the end of the line minus one
+ -- we expect nothing more to follow in this line
+ key = string.sub(key, 1, string.len(key)-1)
+ -- the next lines are the entry
+ -- we expect an entry to be finished with a blank line
+ -- (or the end of the file)
+ line = file:read("*line")
+ local entry = ""
+ while (line~=nil) and (line~="") do
+ entry = entry .. line
+ line = file:read("*line")
+ end
+ -- remove the final dot (if present)
+ local entryLen = string.len(entry)
+ local lastChar = string.sub(entry, entryLen, entryLen)
+ if lastChar == "." then
+ entry = string.sub(entry, 1, entryLen-1)
+ end
+ entries[key]=entry
+ end
+ line = file:read("*line")
+ end
+ file:close()
+end
+
+-- looks up the given key in the entries
+-- in case an entry is not found, a bold question mark is printed
+function bibentry(key)
+ local res = entries[key[1]]
+ if res==nil then
+ res = "\\textbf{?}"
+ end
+ tex.print(res)
+end
+
+% \end{macrocode}
+%
+% \iffalse meta-comment
+%</lua>
+% \fi^^A meta-comment
+
+% \section{Implementation of \LaTeX{} Package \texttt{luabibentry.sty}}
+%
+% \iffalse meta-comment
+%<*package>
+% \fi^^A meta-comment
+% \LuaLaTeX{} must be used to use the package.
+% \begin{macrocode}
+\RequirePackage{ifluatex}
+\ifluatex\else
+ \PackageError{luabibentry}{lualatex needed}{%
+ Package `luabibentry' needs LuaTeX.\MessageBreak
+ So you should use `lualatex' to process you document!\MessageBreak
+ See documentation of `luabibentry' for further information.}%
+ \expandafter\expandafter\expandafter\csname endinput\endcsname
+\fi
+% \end{macrocode}
+%
+% Load the lua module:
+% \begin{macrocode}
+\directlua{dofile("luabibentry.lua")}
+% \end{macrocode}
+%
+% Interface to the lua module:
+% \begin{macrocode}
+\newcommand{\setupbibentry}[1]{\directlua{luabibentry.builddata{"#1.bbl"}}}
+\newcommand{\bibentry}[1]{\nocite{#1}\directlua{luabibentry.bibentry{"#1"}}}
+% \end{macrocode}
+%
+% \iffalse meta-comment
+%</package>
+% \fi^^A meta-comment
+%
+% \section{Acknowledgements}
+% This package is a variant of |bibentry.sty| by Patrick W.\ Daly. |bibentry.sty| is
+% distributed with the |natbib| package. This documentation of luabibentry is
+% mostly adapted from Patrick's documentation of |bibentry|.
+%
+% Thanks to Markus Kohm for the dtx and lua inspirements, Manuel
+% P\'egouri\'e-Gonnard for the Makefile, dtx, and lua inspirements, and
+% Heiko Oberdiek for his detailed feedback on a draft version of this package.
+%
+% \Finale
+%
+\endinput
diff --git a/Master/texmf-dist/tex/lualatex/luabibentry/luabibentry.lua b/Master/texmf-dist/tex/lualatex/luabibentry/luabibentry.lua
new file mode 100644
index 00000000000..8fdceb2c8a7
--- /dev/null
+++ b/Master/texmf-dist/tex/lualatex/luabibentry/luabibentry.lua
@@ -0,0 +1,104 @@
+---
+--- This is file `luabibentry.lua',
+--- generated with the docstrip utility.
+---
+--- The original source files were:
+---
+--- luabibentry.dtx (with options: `lua')
+---
+--- Copyright (c) 2011 by Oliver Kopp <oliver.kopp.googlemail.com>
+---
+--- This file was generated from file(s) of luabibentry distribution.
+--- -----------------------------------------------------------------
+---
+--- This work may be distributed and/or modified under the conditions of
+--- the LaTeX Project Public License, version 1.3c of the license.
+--- The latest version of this license is in
+--- http://www.latex-project.org/lppl.txt
+--- and version 1.3c or later is part of all distributions of LaTeX
+--- version 2005/12/01 or later.
+---
+--- This work has the LPPL maintenance status "maintained".
+---
+--- The Current Maintainer and author of this work is Oliver Kopp.
+---
+--- This file may only be distributed together with the files listed in
+--- `luabibentry.dtx'. You may however distribute the files listed in
+--- `luabibentry.dtx' without this file.
+---
+if (luatexbase and (luatexbase.provides_module)) then
+ luatexbase.provides_module({
+ name = "luabibentry",
+ date = "2011/06/27",
+ version = "0.1",
+ description = "LuaLaTeX Package to Place Bibliography Entries in Text",
+ author = "Oliver Kopp",
+ licence = "LPPL v1.3c or later"
+ })
+end
+module("luabibentry", package.seeall)
+require("lualibs-file")
+
+-- stores all entries
+local entries = {}
+
+-- builds the data by reading the given filename
+function builddata(filename)
+ -- Parameters seem to be passed as arrays.
+ -- We access the first element of the parameter to get the filename
+ local file = io.open(filename[1], "r")
+ if file==nil then
+ texio.write_nl("luabibentry: could not open file " .. filename[1])
+ return
+ end
+ local line = file:read("*line")
+ while (line~=nil) do
+ -- \bibitem is our marker for new entries
+ local i = string.find(line, "\\bibitem")
+ if i~=nil then
+ -- we expect the key in brackets in the same line
+ i = string.find(line,"{")
+ local lasti = 0
+ -- we jump to the last bracket
+ while i~= nil do
+ lasti = i
+ i = string.find(line,"{",i+1)
+ end
+ local key = string.sub(line, lasti+1)
+ -- we use the text from the last opening bracket ("{") until
+ -- the end of the line minus one
+ -- we expect nothing more to follow in this line
+ key = string.sub(key, 1, string.len(key)-1)
+ -- the next lines are the entry
+ -- we expect an entry to be finished with a blank line
+ -- (or the end of the file)
+ line = file:read("*line")
+ local entry = ""
+ while (line~=nil) and (line~="") do
+ entry = entry .. line
+ line = file:read("*line")
+ end
+ -- remove the final dot (if present)
+ local entryLen = string.len(entry)
+ local lastChar = string.sub(entry, entryLen, entryLen)
+ if lastChar == "." then
+ entry = string.sub(entry, 1, entryLen-1)
+ end
+ entries[key]=entry
+ end
+ line = file:read("*line")
+ end
+ file:close()
+end
+
+-- looks up the given key in the entries
+-- in case an entry is not found, a bold question mark is printed
+function bibentry(key)
+ local res = entries[key[1]]
+ if res==nil then
+ res = "\\textbf{?}"
+ end
+ tex.print(res)
+end
+
+
diff --git a/Master/texmf-dist/tex/lualatex/luabibentry/luabibentry.sty b/Master/texmf-dist/tex/lualatex/luabibentry/luabibentry.sty
new file mode 100644
index 00000000000..263e59ec5d5
--- /dev/null
+++ b/Master/texmf-dist/tex/lualatex/luabibentry/luabibentry.sty
@@ -0,0 +1,56 @@
+%%
+%% This is file `luabibentry.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% luabibentry.dtx (with options: `package')
+%%
+%%
+%%
+%% Copyright (c) 2011 by Oliver Kopp <oliver.kopp.googlemail.com>
+%%
+%% This file was generated from file(s) of luabibentry distribution.
+%% -----------------------------------------------------------------
+%%
+%% This work may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, version 1.3c of the license.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status "maintained".
+%%
+%% The Current Maintainer and author of this work is Oliver Kopp.
+%%
+%% This file may only be distributed together with the files listed in
+%% `luabibentry.dtx'. You may however distribute the files listed in
+%% `luabibentry.dtx' without this file.
+%%
+%% Usage:
+%%
+%% \setupbibentry{<bibliography>} before the usage of \bibentry.
+%% \setupbibentry{\jobname} may be used if the bibliography has the same name as the .tex file.
+%%
+%% \bibentry{<entry>} where you want to have placed an entry.
+%% In case an entry is not found "?" is output
+%%
+\NeedsTeXFormat{LaTeX2e}[1995/06/01]
+\ProvidesPackage{luabibentry}
+[2011/06/27 v0.1 LuaLaTeX Package to place bibliography entries in text]
+
+\RequirePackage{ifluatex}
+\ifluatex\else
+ \PackageError{luabibentry}{lualatex needed}{%
+ Package `luabibentry' needs LuaTeX.\MessageBreak
+ So you should use `lualatex' to process you document!\MessageBreak
+ See documentation of `luabibentry' for further information.}%
+ \expandafter\expandafter\expandafter\csname endinput\endcsname
+\fi
+\directlua{dofile("luabibentry.lua")}
+\newcommand{\setupbibentry}[1]{\directlua{luabibentry.builddata{"#1.bbl"}}}
+\newcommand{\bibentry}[1]{\nocite{#1}\directlua{luabibentry.bibentry{"#1"}}}
+\endinput
+%%
+%% End of file `luabibentry.sty'.
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index b943b1babde..92dc5927d56 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -222,7 +222,7 @@ my @TLP_working = qw(
lshort-slovenian lshort-spanish lshort-thai lshort-turkish lshort-ukr
lshort-vietnamese ltabptch
ltxdockit ltxindex ltxkeys ltxmisc ltxnew
- lua-alt-getopt luacode
+ lua-alt-getopt luabibentry luacode
luainputenc lualatex-doc lualatex-math lualibs luamplib luaotfload
luasseq luatexbase luatextra
lxfonts ly1
diff --git a/Master/tlpkg/bin/tlpkginfo b/Master/tlpkg/bin/tlpkginfo
index 144d38301c4..b1578eba97d 100755
--- a/Master/tlpkg/bin/tlpkginfo
+++ b/Master/tlpkg/bin/tlpkginfo
@@ -306,9 +306,10 @@ sub prepare {
return $ctan_loc unless (-s $tds_path);
- # now we have a tds, so unzip it in a tmpdir
+ # now we have a tds, so unzip it in a tmpdir and be sure it's readable.
my $tmpdir = &copy_to_tmpdir ($pkg);
system ("unzip -q $tds_path -d $tmpdir");
+ system ("chmod -R a+rX $tmpdir");
# put a flag for ctan2tds' donormal() to work
system ("echo $tds_path >$tmpdir/TDS_READY");
diff --git a/Master/tlpkg/tlpsrc/collection-luatex.tlpsrc b/Master/tlpkg/tlpsrc/collection-luatex.tlpsrc
index 0154e8d6e93..e3fbcb5bef2 100644
--- a/Master/tlpkg/tlpsrc/collection-luatex.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-luatex.tlpsrc
@@ -6,6 +6,7 @@ longdesc as an embedded scripting and extension language. http://luatex.org/
depend collection-basic
#
depend interpreter
+depend luabibentry
depend luacode
depend luainputenc
depend lualatex-doc
diff --git a/Master/tlpkg/tlpsrc/luabibentry.tlpsrc b/Master/tlpkg/tlpsrc/luabibentry.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/luabibentry.tlpsrc