| 1 |
% \iffalse meta-comment |
| 2 |
% |
| 3 |
% Written in 2009, 2010 by Manuel Pégourié-Gonnard and Élie Roux. |
| 4 |
% <[email protected]> |
| 5 |
% <[email protected]> |
| 6 |
% |
| 7 |
% This work is under the CC0 license. |
| 8 |
% |
| 9 |
% This work consists of the main source file luatextra.dtx |
| 10 |
% and the derived files |
| 11 |
% luatextra.sty, luatextra.lua, luatextra.pdf. |
| 12 |
% |
| 13 |
% Unpacking: |
| 14 |
% tex luatextra.dtx |
| 15 |
% Documentation: |
| 16 |
% pdflatex luatextra.dtx |
| 17 |
% |
| 18 |
%<*ignore> |
| 19 |
\begingroup |
| 20 |
\def\x{LaTeX2e}% |
| 21 |
\expandafter\endgroup |
| 22 |
\ifcase 0\ifx\install y1\fi\expandafter |
| 23 |
\ifx\csname processbatchFile\endcsname\relax\else1\fi |
| 24 |
\ifx\fmtname\x\else 1\fi\relax |
| 25 |
\else\csname fi\endcsname |
| 26 |
%</ignore> |
| 27 |
%<*install> |
| 28 |
\input docstrip.tex |
| 29 |
|
| 30 |
\keepsilent |
| 31 |
\askforoverwritefalse |
| 32 |
|
| 33 |
\preamble |
| 34 |
|
| 35 |
Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux. |
| 36 |
|
| 37 |
This work is under the CC0 license. |
| 38 |
See source file '\inFileName' for details. |
| 39 |
|
| 40 |
\endpreamble |
| 41 |
|
| 42 |
\generate{% |
| 43 |
\usedir{tex/luatex/luatextra}% |
| 44 |
\file{luatextra.sty}{\from{luatextra.dtx}{package}}% |
| 45 |
} |
| 46 |
|
| 47 |
\generate{% |
| 48 |
\usedir{doc/luatex/luatextra}% |
| 49 |
\file{test.tex}{\from{luatextra.dtx}{test}}% |
| 50 |
} |
| 51 |
|
| 52 |
\obeyspaces |
| 53 |
\Msg{************************************************************************} |
| 54 |
\Msg{*} |
| 55 |
\Msg{* To finish the installation you have to move the following} |
| 56 |
\Msg{* files into a directory searched by TeX:} |
| 57 |
\Msg{*} |
| 58 |
\Msg{* luatextra.sty luatextra.lua} |
| 59 |
\Msg{*} |
| 60 |
\Msg{* Happy TeXing!} |
| 61 |
\Msg{*} |
| 62 |
\Msg{************************************************************************} |
| 63 |
|
| 64 |
\endbatchfile |
| 65 |
%</install> |
| 66 |
%<*ignore> |
| 67 |
\fi |
| 68 |
%</ignore> |
| 69 |
%<*driver> |
| 70 |
\documentclass{ltxdoc} |
| 71 |
\usepackage[utf8]{inputenc} |
| 72 |
\usepackage[T1]{fontenc} |
| 73 |
\usepackage{textcomp} |
| 74 |
\usepackage{lmodern} |
| 75 |
\usepackage{metalogo} |
| 76 |
\usepackage[bookmarks=true, colorlinks=true]{hyperref} |
| 77 |
\usepackage{bookmark} |
| 78 |
\usepackage[english]{babel} |
| 79 |
\providecommand\eTeX{e\TeX} |
| 80 |
\newcommand\pf{\textsf} |
| 81 |
\newcommand\file{\texorpdfstring{\nolinkurl}{}} |
| 82 |
\newcommand\code{\texttt} |
| 83 |
\newcommand*\email[1]{\href{mailto:#1}{#1}} |
| 84 |
\begin{document} |
| 85 |
\DocInput{luatextra.dtx}% |
| 86 |
\end{document} |
| 87 |
%</driver> |
| 88 |
% \fi |
| 89 |
% |
| 90 |
% \CheckSum{0} |
| 91 |
% |
| 92 |
% \CharacterTable |
| 93 |
% {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 |
| 94 |
% 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 |
| 95 |
% Digits \0\1\2\3\4\5\6\7\8\9 |
| 96 |
% Exclamation \! Double quote \" Hash (number) \# |
| 97 |
% Dollar \$ Percent \% Ampersand \& |
| 98 |
% Acute accent \' Left paren \( Right paren \) |
| 99 |
% Asterisk \* Plus \+ Comma \, |
| 100 |
% Minus \- Point \. Solidus \/ |
| 101 |
% Colon \: Semicolon \; Less than \< |
| 102 |
% Equals \= Greater than \> Question mark \? |
| 103 |
% Commercial at \@ Left bracket \[ Backslash \\ |
| 104 |
% Right bracket \] Circumflex \^ Underscore \_ |
| 105 |
% Grave accent \` Left brace \{ Vertical bar \| |
| 106 |
% Right brace \} Tilde \~} |
| 107 |
% |
| 108 |
% \title{The \textsf{luatextra} package} |
| 109 |
% \date{2010/10/10 v1.0} |
| 110 |
% \author{% |
| 111 |
% Manuel P\'egouri\'e-Gonnard \& \'Elie Roux \\ |
| 112 |
% Support: \email{[email protected]}} |
| 113 |
% |
| 114 |
% \maketitle |
| 115 |
% |
| 116 |
% \begin{abstract} |
| 117 |
% The \pf{luatextra} package loads essential and useful packages for |
| 118 |
% \LuaLaTeX. It is meant as convenience for users who don't want to load them |
| 119 |
% individually. |
| 120 |
% \end{abstract} |
| 121 |
% |
| 122 |
% \tableofcontents |
| 123 |
% |
| 124 |
% \section{Documentation} |
| 125 |
% |
| 126 |
% The following packages are loaded: |
| 127 |
% \begin{description} |
| 128 |
% \item[fontspec] --- advanced font management, integrated in the \LaTeX\ font |
| 129 |
% selection scheme, with access to system fonts and opentype features; |
| 130 |
% \item[luacode] --- tools for easier integration of Lua code in \LaTeX; |
| 131 |
% \item[metalogo] --- commands for logos, including |\LuaTeX| and |
| 132 |
% |\LuaLaTeX|; |
| 133 |
% \item[fixltx2e] --- various fixes and small enchancements for the \LaTeX\ |
| 134 |
% core; |
| 135 |
% \item[luatexbase] --- low-level management of \LuaTeX's new and extended |
| 136 |
% resources; |
| 137 |
% \item[lualibs] --- additional general-purpose Lua functions. |
| 138 |
% \end{description} |
| 139 |
% |
| 140 |
% In case you are not yet familiar with the available \LuaLaTeX\ packages, you |
| 141 |
% might want to check the document \nolinkurl{lualatex-doc.pdf} from the |
| 142 |
% eponymous package. |
| 143 |
% |
| 144 |
% \section{Implementation} |
| 145 |
% |
| 146 |
% \begin{macrocode} |
| 147 |
%<*package> |
| 148 |
% \end{macrocode} |
| 149 |
% |
| 150 |
% Identify. |
| 151 |
% |
| 152 |
% \begin{macrocode} |
| 153 |
\ProvidesPackage{luatextra}[2010/10/10 v1.0 Loading usual LuaLaTeX packages] |
| 154 |
% \end{macrocode} |
| 155 |
% |
| 156 |
% Make sure Lua\TeX\ is being used. |
| 157 |
% |
| 158 |
% \begin{macrocode} |
| 159 |
\RequirePackage{ifluatex} |
| 160 |
\ifluatex\else |
| 161 |
\PackageError{luatextra}{LuaTeX is required for this package. Aborting.}{% |
| 162 |
This package can only be used with the LuaTeX engine^^J% |
| 163 |
(command `lualatex' or `luatex').^^J% |
| 164 |
Package loading has been stopped to prevent additional errors.} |
| 165 |
\expandafter\endinput |
| 166 |
\fi |
| 167 |
% \end{macrocode} |
| 168 |
% |
| 169 |
% Load packages; \pf{luatexbase} and \pf{lualibs} are loaded (indirectly) |
| 170 |
% by fontspec, but just to be sure (in case it changes in the future). |
| 171 |
% |
| 172 |
% \begin{macrocode} |
| 173 |
\RequirePackage{fontspec} |
| 174 |
\RequirePackage{luatexbase} |
| 175 |
\RequireLuaModule{lualibs} |
| 176 |
\RequirePackage{metalogo} |
| 177 |
\RequirePackage{luacode} |
| 178 |
\RequirePackage{fixltx2e} |
| 179 |
% \end{macrocode} |
| 180 |
% |
| 181 |
% \begin{macrocode} |
| 182 |
%</package> |
| 183 |
% \end{macrocode} |
| 184 |
% |
| 185 |
% \section{Test file} |
| 186 |
% |
| 187 |
% Very minimal, just check that the package correctly loads. We have to use |
| 188 |
% |\documentclass| to make \pf{xkeyval} (loaded by \pf{fontspec}) happy. |
| 189 |
% |
| 190 |
% \begin{macrocode} |
| 191 |
%<*test> |
| 192 |
\documentclass{minimal} |
| 193 |
\usepackage{luatextra} |
| 194 |
\stop |
| 195 |
%</test> |
| 196 |
% \end{macrocode} |
| 197 |
% |
| 198 |
% |
| 199 |
% \Finale |
| 200 |
\endinput |