<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
                          "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % entities.ent SYSTEM "entities.ent">
%entities.ent;
]>

<refentry id="miktex-luatex">

<?dbhh topicname="MIKTEXHELP_LUATEX" topicid="0"?>

<refmeta>
<refentrytitle>miktex-luatex</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="source">&PACKAGE_NAME;</refmiscinfo>
<refmiscinfo class="version">&miktexrev;</refmiscinfo>
<refmiscinfo class="manual">User Commands</refmiscinfo>
</refmeta>

<refnamediv>
<refname>miktex-luatex</refname>
<refpurpose>an extended version of &pdfTeX; using &Lua; as an embedded scripting language</refpurpose>
</refnamediv>

<refsynopsisdiv>

<cmdsynopsis>
<command>miktex-luatex</command>
<arg choice="opt" rep="repeat"><replaceable>option</replaceable></arg>
<group>
<arg choice="opt" rep="repeat"><replaceable>command</replaceable></arg>
<arg choice="opt"><replaceable>file</replaceable></arg>
</group>
</cmdsynopsis>

</refsynopsisdiv>

<refsect1>

<title>Description</title>

<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="_tlack.xml" />

<para>Run the &LuaTeX; typesetter on <replaceable>file</replaceable>,
usually creating <filename>file.pdf</filename>.  Any remaining
commands are processed as &LuaTeX; input, after
<replaceable>file</replaceable> is read.</para>

<para>Alternatively, if the first non-option argument begins with a
backslash, interpret all non-option arguments as a line of &LuaTeX;
input.</para>

<para>Alternatively, if the first non-option argument begins with a
<option>&amp;</option>, the next word is taken as the
<replaceable>format</replaceable> to read, overriding all else.  Any
remaining arguments are processed as above.</para>

<para>If no arguments or options are specified, prompt for
input.</para>

<para>If called as <command>miktex-texlua</command> it acts as &Lua;
interpreter.  If called as <command>miktex-texluac</command> it acts
as &Lua; bytecode compiler.</para>

<para>&LuaTeX; is an extended version of &pdfTeX; with Unicode and
OpenType font support, embeded &Lua; scripting language, the &eTeX;
and &Omega; extensions, as well as integrated &MetaPost; engine, that
can create &PDF; files as well as &DVI; files. For more information
about &LuaTeX;, see <ulink
url="http://www.luatex.org">http://www.luatex.org</ulink>, you can
read the &LuaTeX; manual using the &MiKTeXHelpUtility;
(<userinput>&mthelp; luatex</userinput>).</para>

<para>All &LuaTeX; text input and output is considered to be Unicode
text.</para>

<para>In &DVI; mode, &LuaTeX; can be used as a complete replacement
for the &TeX; engine.</para>

<para>In &PDF; mode, &LuaTeX; can natively handle the &PDF;, &JPG;,
&JBIG2;, and &PNG; graphics formats.  &LuaTeX; cannot include
&PostScript; or Encapsulated &PostScript; (&EPS;) graphics files;
first convert them to &PDF; using
<citerefentry><refentrytitle>miktex-epstopdf</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>

</refsect1>

<refsect1>

<title>Options</title>

<para>When the &LuaTeX; executable starts, it looks for the
<option>--lua</option> commandline option.  If there is no
<option>--lua</option> option, the commandline is interpreted in a
similar fashion as in traditional &pdfTeX;. But if the option is
present, &LuaTeX; will enter an alternative mode of commandline
parsing in comparison to the standard &MiKTeX; programs.  The presence
of <option>--lua</option> makes most of other options unreliable,
because the &Lua; initialization file can disable path searching
and/or hook functions into various callbacks.</para>

<variablelist>
<varlistentry>
<term><option>--lua=<replaceable>file</replaceable></option></term>
<listitem>
<para>Load and execute a
<indexterm>
<primary>--lua=file</primary>
</indexterm>
&Lua; initialization script.</para>
</listitem>
</varlistentry>
</variablelist>

<para>The following two options alter the executable behaviour:</para>

<variablelist>
<varlistentry>
<term><option>--luaonly</option></term>
<listitem>
<para>Start &LuaTeX; as a &Lua; interpreter.
<indexterm>
<primary>--luaonly</primary>
</indexterm>
In this mode, it will set &Lua;’s <code>arg[0]</code> to the found
script name, pushing preceding options in negative values and the rest
of the commandline in the positive values, just like the &Lua;
interpreter. &LuaTeX; will exit immediately after executing the
specified &Lua; script.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--luaconly</option></term>
<listitem>
<para>Start &LuaTeX; as a &Lua; byte compiler.
<indexterm>
<primary>--luaconly</primary>
</indexterm>
In this mode, &LuaTeX; is exactly like <userinput>luac</userinput>
from the standalone &Lua; distribution, except that it does not have
the <option>−l</option> switch, and that it accepts (but ignores) the
<option>−−luaconly</option> switch.</para>
</listitem>
</varlistentry>
</variablelist>

<para>Then the regular options:</para>

<variablelist>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../Options/alias.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../Options/auxdirectory.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../Options/cstyleerrors.xml" />
<varlistentry>
<term><option>--credits</option></term>
<listitem><para>Display
<indexterm>
<primary>--credits</primary>
</indexterm>
credits and exit.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--debug-format</option></term>
<listitem><para>Enable format
<indexterm>
<primary>--debug-format</primary>
</indexterm>
debugging.</para></listitem>
</varlistentry>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../Options/disableinstaller.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../Options/disablewriteeighteen.xml" />
<varlistentry>
<term><option>--draftmode</option></term>
<listitem><para>Switch on draft mode.
<indexterm>
<primary>--draftmode</primary>
</indexterm>
luaTeX; doesn't write a
&PDF; and doesn't read any included images, thus speeding up
execution.</para></listitem>
</varlistentry>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../Options/enableinstaller.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../Options/enablewriteeighteen.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../Options/haltonerror.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../Options/help.xml" />
<anchor id="luatex-include-directory"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../Options/includedirectory.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../Options/initialize.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../Options/interaction.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../Options/jobname.xml" />
<varlistentry>
<term><option>--mktex=<replaceable>fmt</replaceable></option></term>
<listitem>
<indexterm>
<primary>--mktex=fmt</primary>
</indexterm>
<para>Enable <replaceable>fmt</replaceable> generation, where
<replaceable>fmt</replaceable> must be either <option>tex</option> or
<option>tfm</option>.</para>
</listitem>
</varlistentry>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../Options/nocstyleerrors.xml" />
<varlistentry>
<term><option>--no-mktex=<replaceable>fmt</replaceable></option></term>
<listitem>
<indexterm>
<primary>--no-mktex=fmt</primary>
</indexterm>
<para>Disable <replaceable>fmt</replaceable> generation, where
<replaceable>fmt</replaceable> must be either <option>tex</option> or
<option>tfm</option>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--nosocket</option></term>
<listitem>
<indexterm>
<primary>--nosocket</primary>
</indexterm>
<para>Disable the &Lua; socket library.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--output-comment=<replaceable>string</replaceable></option></term>
<listitem>
<para>Use <replaceable>string</replaceable> for &DVI; file comment
<indexterm>
<primary>--output-comment=string</primary>
</indexterm>
instead of date.</para>
</listitem>
</varlistentry>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../Options/outputdirectory.xml" />
<varlistentry>
<term><option>--output-format=<replaceable>format</replaceable></option></term>
<listitem>
<para>Use <replaceable>format</replaceable> for job output
<indexterm>
<primary>--output-format=format</primary>
</indexterm>
(one of: <option>dvi</option>, <option>pdf</option>).</para>
</listitem>
</varlistentry>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../Options/recorder.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../Options/restrictwriteeighteen.xml" />
<varlistentry>
<term><option>--safer</option></term>
<listitem>
<para>Disable
<indexterm>
<primary>--safer</primary>
</indexterm>
easily exploitable &Lua; commands.</para>
</listitem>
</varlistentry>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../Options/synctex.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../Options/undump.xml" />
<varlistentry>
<term><option>--utc</option></term>
<listitem>
<para>Init
<indexterm>
<primary>--utc</primary>
</indexterm>
time to &UTC;.</para>
</listitem>
</varlistentry>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../Options/version.xml" />
</variablelist>

<para>The following options are ignored:</para>
<simplelist type="inline">
<member><option>−−8bit</option></member>
<member><option>−−etex</option></member>
<member><option>−−parse−first−line</option></member>
<member><option>−−no−parse−first−line</option></member>
</simplelist>
<para>These are always on.</para>
<simplelist type="inline">
<member><option>−−default−translate−file=<replaceable>tcxname</replaceable></option></member>
<member><option>−−translate−file=<replaceable>tcxname</replaceable></option></member>
</simplelist>
<para>These are always off.</para>

</refsect1>

<refsect1>

<title>Environment</title>

<variablelist>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../EnvVars/MIKTEX_EDITOR.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../EnvVars/MIKTEX_TRACE.xml" />
</variablelist>

</refsect1>

<refsect1>

<title>See Also</title>

<simplelist type="inline">
<member><citerefentry><refentrytitle>miktex-epstopdf</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
<member><citerefentry><refentrytitle>miktex-pdftex</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
</simplelist>

</refsect1>

</refentry>
