diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2010-11-19 17:02:09 +0000 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2010-11-19 17:02:09 +0000 |
commit | b21be1479112cb049f743ba282027dc2fc97d522 (patch) | |
tree | 3709ea4b278b1bca9666863e88d8767ee26eaf52 /Master/texmf-dist/source/lualatex | |
parent | 42c262c3d990eed1f2bcb7bbbaf9e596f9287f85 (diff) |
luainputenc 0.973
git-svn-id: svn://tug.org/texlive/trunk@20491 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/lualatex')
-rw-r--r-- | Master/texmf-dist/source/lualatex/luainputenc/luainputenc.dtx | 48 |
1 files changed, 27 insertions, 21 deletions
diff --git a/Master/texmf-dist/source/lualatex/luainputenc/luainputenc.dtx b/Master/texmf-dist/source/lualatex/luainputenc/luainputenc.dtx index 0d6cb3a56cd..807d7344b86 100644 --- a/Master/texmf-dist/source/lualatex/luainputenc/luainputenc.dtx +++ b/Master/texmf-dist/source/lualatex/luainputenc/luainputenc.dtx @@ -1,4 +1,4 @@ -% \iffalse meta-comment +% \iffalse meta-comment -- by the way, this file contains UTF-8 % % Written in 2009, 2010 by Manuel Pégourié-Gonnard and Élie Roux. % <mpg@elzevir.fr> @@ -121,7 +121,7 @@ and the derived files %<package> %<package>\NeedsTeXFormat{LaTeX2e} %<package>\ProvidesPackage{luainputenc} -%<package> [2010/10/10 v0.972 inputenc package for LuaTeX] +%<package> [2010/11/19 v0.973 inputenc package for LuaTeX] %<package> % \fi %<*driver> @@ -165,7 +165,7 @@ and the derived files % Right brace \} Tilde \~} % % \title{The \textsf{luainputenc} package} -% \date{2010/10/10 v0.972} +% \date{2010/11/19 v0.973} % \author{% % Manuel P\'egouri\'e-Gonnard \email{mpg@elzevir.fr} \\ % \'Elie Roux \email{elie.roux@telecom-bretagne.eu}} @@ -453,11 +453,13 @@ and the derived files % \end{macrocode} % % Here we know we are called with Lua\TeX . We first require -% \textsf{luatextra}, then we load the \texttt{lua} file. +% \textsf{luatextra} and ensure a few primitives, then we load the +% \texttt{lua} file. % % \begin{macrocode} \RequirePackage{luatexbase} +\luatexbase@ensure@primitive{luaescapestring} \RequireLuaModule{luainputenc} @@ -527,7 +529,7 @@ and the derived files by input encoding change to `#1'\MessageBreak}% \fi \the\inpenc@posthook - \luadirect{luainputenc.set_option([[#1]])} + \luatexbase@directlua{luainputenc.set_option("\luatexluaescapestring{#1}")} } \newtoks\inpenc@prehook \newtoks\inpenc@posthook @@ -584,7 +586,7 @@ and the derived files \DeclareOption{unactivate}{% \edef\inputencodingname{unactivate}% - \luadirect{luainputenc.set_option([[unactivate]])} + \luatexbase@directlua{luainputenc.set_option([[unactivate]])} } % \end{macrocode} @@ -612,7 +614,7 @@ and the derived files \ifnum\luatexversion>42 \newcommand*{\lIE@activate}[0]{% - \luadirect{luainputenc.register_callbacks()}% + \luatexbase@directlua{luainputenc.register_callbacks()}% } \else @@ -629,13 +631,13 @@ and the derived files \newcommand*\lIE@setstarted[0]{% \ifnum\lIE@activated=1 % - \luadirect{luainputenc.setstarted()}% + \luatexbase@directlua{luainputenc.setstarted()}% \fi % } \newcommand*\lIE@setstopped[0]{% \ifnum\lIE@activated=1 % - \luadirect{luainputenc.setstopped()}% + \luatexbase@directlua{luainputenc.setstopped()}% \fi % } @@ -662,7 +664,7 @@ and the derived files % \begin{macrocode} \newcommand*\lIE@SetUtfFile[1]{% - \luadirect{luainputenc.set_unicode_file([[#1]])}% + \luatexbase@directlua{luainputenc.set_unicode_file("\luatexluaescapestring{#1}")}% } % \end{macrocode} @@ -678,7 +680,7 @@ and the derived files % \begin{macrocode} \newcommand*\lIE@SetNonUtfFile[1]{% - \luadirect{luainputenc.set_non_unicode_file([[#1]])}% + \luatexbase@directlua{luainputenc.set_non_unicode_file("\luatexluaescapestring{#1}")}% } % \end{macrocode} @@ -692,7 +694,7 @@ and the derived files % \begin{macrocode} \newcommand*\lIE@UnsetFile[1]{% - \luadirect{luainputenc.unset_file([[#1]])}% + \luatexbase@directlua{luainputenc.unset_file("\luatexluaescapestring{#1}")}% } % \end{macrocode} @@ -711,7 +713,7 @@ and the derived files % \begin{macrocode} \newcommand*\lIE@SetUtfExt[1]{% - \luadirect{luainputenc.set_unicode_extention([[#1]])}% + \luatexbase@directlua{luainputenc.set_unicode_extention("\luatexluaescapestring{#1}")}% } % \end{macrocode} @@ -725,7 +727,7 @@ and the derived files % \begin{macrocode} \newcommand*\lIE@SetNonUtfExt[1]{ - \luadirect{luainputenc.set_non_unicode_extention([[#1]])} + \luatexbase@directlua{luainputenc.set_non_unicode_extention("\luatexluaescapestring{#1}")} } % \end{macrocode} @@ -971,7 +973,7 @@ and the derived files \gdef\DeclareUnicodeCharacter#1#2{% \@tempcnta"#1% - \luadirect{luainputenc.declare_character('\the\@tempcnta')}% + \luatexbase@directlua{luainputenc.declare_character('\the\@tempcnta')}% \catcode\@tempcnta\active % \DeclareInputText{\the\@tempcnta}{#2}% } @@ -997,15 +999,15 @@ and the derived files % \begin{macrocode} \def\lIE@ActivateUnicodeCatcodes{% -\luadirect{luainputenc.activate_characters()}% +\luatexbase@directlua{luainputenc.activate_characters()}% } \def\lIE@DesactivateUnicodeCatcodes{% -\luadirect{luainputenc.desactivate_characters()}% +\luatexbase@directlua{luainputenc.desactivate_characters()}% } \def\lIE@CharactersActivated{% -\luadirect{luainputenc.force_characters_activated()} +\luatexbase@directlua{luainputenc.force_characters_activated()} } \edef\lIE@EU{EU2} @@ -1445,12 +1447,16 @@ end % % \section{Test file} % -% Very minimal, just check that the package correctly loads. +% Very minimal, just check that the package correctly loads with an option +% and doesn't crash on a one-line plain ASCII document body\dots % % \begin{macrocode} %<*test> -\RequirePackage{luainputenc} -\stop +\documentclass{article} +\usepackage[utf8]{luainputenc} +\begin{document} +bla +\end{document} %</test> % \end{macrocode} % |