lualatex needs --jobname option

View: New views
6 Messages — Rating Filter:   Alert me  

lualatex needs --jobname option

by Manuel Pégourié-Gonnard-2 :: Rate this Message:

| View Threaded | Show Only this Message

Hi,

Full disclosure: I'm not an AucTeX user (actually I'm an evil vimist). But I'm
also a TeX Live maintainer, and since it seems some decisions we made in TeX
Live have an impact on AucTeX, I thought it we be good to communicate about it.

Some background: LuaTeX is a new TeX engine which may be used as a replacement
for pdfTeX or XeTeX, though it is not fully compatible. One aspect is the way it
handles spaces in the main TeX file, creating problems with the LaTeX format
(command lualatex or dvilualatex). A workaround was installed in TeX Live on
2010-06-14. It was discovered later that this workaround doesn't work correctly
when luatex is invoked as

lualatex '\input foo.tex'

rather than the more usual

lualatex foo.tex

In the first case, the pdf file produced is called texput.pdf rather than the
expected foo.pdf (same for log, aux, etc.). Here is the connection with AucTeX:
it is using the first syntax.

Unfortunately, there is no way to fix the workaround so that it doesn't have
this side-effect. At least not until luatex 0.71 which will *not* be included in
the upcoming TeX Live 2011 whose source tree is already frozen.

So, currently (and with the next release of TeX Live), compiling files from
AucTeX with lualatex doesn't work as expected. It was discussed at least two
times on TeX Live or LuaTeX-related lists, and at least once here:
http://lists.gnu.org/archive/html/bug-auctex/2011-02/msg00001.html with a proper
fix found: use the --jobname option. That is, the invocation

lualatex --jobname=foo '\input foo.tex'

always works. It also works with latex, pdflatex or xelatex, even if the
--jobname part is redundant for anything but lualatex. So I'd like to suggest
adding --jobname to the default TeX invocation in AucTeX so that your users stop
having this problem with luatex, without having to wait for luatex 0.71.

Best regards,
Manuel.

PS: I'm not subscribed to the list, so please keep me cc-ed if you want me to
read your reply. Thanks.

_______________________________________________
bug-auctex mailing list
bug-auctex@...
https://lists.gnu.org/mailman/listinfo/bug-auctex

Re: lualatex needs --jobname option

by Ralf Angeli-3 :: Rate this Message:

| View Threaded | Show Only this Message

* Manuel Pégourié-Gonnard (2011-05-28) writes:

> Full disclosure: I'm not an AucTeX user (actually I'm an evil
> vimist).

Well, nobody is perfect. (c;

> But I'm also a TeX Live maintainer, and since it seems some
> decisions we made in TeX Live have an impact on AucTeX, I thought it
> we be good to communicate about it.

Thanks for that.

> So, currently (and with the next release of TeX Live), compiling files
> from AucTeX with lualatex doesn't work as expected. It was discussed
> at least two times on TeX Live or LuaTeX-related lists, and at least
> once here:
> http://lists.gnu.org/archive/html/bug-auctex/2011-02/msg00001.html
> with a proper fix found: use the --jobname option. That is, the
> invocation
>
> lualatex --jobname=foo '\input foo.tex'
>
> always works. It also works with latex, pdflatex or xelatex, even if
> the --jobname part is redundant for anything but lualatex. So I'd like
> to suggest adding --jobname to the default TeX invocation in AucTeX so
> that your users stop having this problem with luatex, without having
> to wait for luatex 0.71.

I've tried the --jobname switch with a file that contains a space in its
name.  I guess that the file name has to be quoted in this case.
Unfortunately I could not find a way to quote the name which works with
both

$ ~/texlive/2010/bin/x86_64-linux/lualatex --version
This is LuaTeX, Version beta-0.60.2-2010071218 (TeX Live 2010) (rev 3736)

and

$ lualatex --version
This is LuaTeX, Version beta-0.70.1-2011052000

The first one is from a local copy of TeX Live 2010 and the second one
is the version which is available in Debian/sid right now.

This is what I've tried with a file called "luatex test.tex":

First with LuaTeX 0.60.

$ /home/angeli/texlive/2010/bin/x86_64-linux/lualatex -interaction=nonstopmode "\input" \"luatex\ test.tex\"
This is LuaTeX, Version beta-0.60.2-2010071218 (TeX Live 2010) (rev 3736)
[...]
Output written on texput.pdf (1 page, 10924 bytes).
Transcript written on texput.log.

Okay, here we have the problem with the job name.

$ /home/angeli/texlive/2010/bin/x86_64-linux/lualatex --jobname=\"luatex\ test\"  -interaction=nonstopmode "\input" \"luatex\ test.tex\"
This is LuaTeX, Version beta-0.60.2-2010071218 (TeX Live 2010) (rev 3736)
[...]
! LaTeX Error: Missing \begin{document}.
[...]
Output written on luatex test.pdf (1 page, 12492 bytes).
Transcript written on "luatex test.log".

This does not work.

$ /home/angeli/texlive/2010/bin/x86_64-linux/lualatex --jobname="luatex test"  -interaction=nonstopmode "\input" \"luatex\ test.tex\"
This is LuaTeX, Version beta-0.60.2-2010071218 (TeX Live 2010) (rev 3736)
[...]
Output written on luatex test.pdf (1 page, 10924 bytes).
Transcript written on "luatex test.log".

So, this seems to work.

Now for LuaTeX 0.70.

$ lualatex -interaction=nonstopmode "\input" \"luatex\ test.tex\"
This is LuaTeX, Version beta-0.70.1-2011052000
[...]
! LaTeX Error: Missing \begin{document}.
[...]
Output written on luatex test.pdf (1 page, 12686 bytes).
Transcript written on "luatex test.log".

No problem with the job name, but elsewhere.

$ lualatex --jobname=\"luatex\ test\"  -interaction=nonstopmode "\input" \"luatex\ test.tex\"
This is LuaTeX, Version beta-0.70.1-2011052000
[...]
Output written on luatex test.pdf (1 page, 11284 bytes).
Transcript written on "luatex test.log".

Okay, this seems to work.

$ lualatex --jobname="luatex test"  -interaction=nonstopmode "\input" \"luatex\ test.tex\"
This is LuaTeX, Version beta-0.70.1-2011052000
[...]
! LaTeX Error: Missing \begin{document}.
[...]
Output written on luatex test.pdf (1 page, 12686 bytes).
Transcript written on "luatex test.log".

Does not work.

So without --jobname both versions fail; differently, though.

When supplying --jobname, LuaTeX 0.60 only works with --jobname="luatex
test" and LuaTeX 0.70 only with --jobname=\"luatex\ test\".

Do you happen to know a way of quoting which works with both versions?

--
Ralf

_______________________________________________
bug-auctex mailing list
bug-auctex@...
https://lists.gnu.org/mailman/listinfo/bug-auctex

Re: lualatex needs --jobname option

by Manuel Pégourié-Gonnard-2 :: Rate this Message:

| View Threaded | Show Only this Message

Le 14/06/2011 22:43, Ralf Angeli a écrit :
> I've tried the --jobname switch with a file that contains a space in its
> name.  I guess that the file name has to be quoted in this case.

Normally, no quoting is necessary in this case (other than required by the shell
to make it a single argument).

> The first one is from a local copy of TeX Live 2010 and the second one
> is the version which is available in Debian/sid right now.
>
Ok, got it. The discrepancy comes not from the version of the engine but from
the underlying distribution: Debian (even sid) still ships TeX Live 2009. The
(partially-working) autoquoting mechanism was introduced in the lualatex format
in TeX Live 2010.

> $ /home/angeli/texlive/2010/bin/x86_64-linux/lualatex --jobname=\"luatex\ test\"  -interaction=nonstopmode "\input" \"luatex\ test.tex\"
> This is LuaTeX, Version beta-0.60.2-2010071218 (TeX Live 2010) (rev 3736)
> [...]
> ! LaTeX Error: Missing \begin{document}.
> [...]
> Output written on luatex test.pdf (1 page, 12492 bytes).
> Transcript written on "luatex test.log".
>
> This does not work.
>
This was not the intended use, so the lualatex format adds an extra pair of
quotes, which is obviously wrong.

I would have expected pdflatex to fail in the same way in this case, but it does
handle is correctly, and so does xelatex (but with a slightly different
implementation).

> $ /home/angeli/texlive/2010/bin/x86_64-linux/lualatex --jobname="luatex test"  -interaction=nonstopmode "\input" \"luatex\ test.tex\"
> This is LuaTeX, Version beta-0.60.2-2010071218 (TeX Live 2010) (rev 3736)
> [...]
> Output written on luatex test.pdf (1 page, 10924 bytes).
> Transcript written on "luatex test.log".
>
> So, this seems to work.
>
Yep, this was the intended use. It works with pdflatex and xelatex too.

> $ lualatex -interaction=nonstopmode "\input" \"luatex\ test.tex\"
> This is LuaTeX, Version beta-0.70.1-2011052000
> [...]
> ! LaTeX Error: Missing \begin{document}.
> [...]
> Output written on luatex test.pdf (1 page, 12686 bytes).
> Transcript written on "luatex test.log".
>
> No problem with the job name, but elsewhere.
>
Yep, this was the original problem that started the whole story. I fails in the
same way with the more usual invocation

        lualatex luatex\ test.tex

and the change in the lualatex format in TL 2010, introducing autoquoting of the
job name, was meant to fix this problem. (We noticed only too late that the fix
didn't work with the less usual invocation style used by AucTeX.)

> $ lualatex --jobname=\"luatex\ test\"  -interaction=nonstopmode "\input" \"luatex\ test.tex\"
> This is LuaTeX, Version beta-0.70.1-2011052000
> [...]
> Output written on luatex test.pdf (1 page, 11284 bytes).
> Transcript written on "luatex test.log".
>
> Okay, this seems to work.
>
Yep, this may be called manually quoting the job name, as opposed to the
(imperfect) autoquiting feature of the lualatex format in TL 2010.

> $ lualatex --jobname="luatex test"  -interaction=nonstopmode "\input" \"luatex\ test.tex\"
> This is LuaTeX, Version beta-0.70.1-2011052000
> [...]
> ! LaTeX Error: Missing \begin{document}.
> [...]
> Output written on luatex test.pdf (1 page, 12686 bytes).
> Transcript written on "luatex test.log".
>
> Does not work.
>
This is equivalent to

        lualatex luatex\ test.tex

which, as mentioned above, was the original problematic case in TL 09.

> When supplying --jobname, LuaTeX 0.60 only works with --jobname="luatex
> test" and LuaTeX 0.70 only with --jobname=\"luatex\ test\".
>
> Do you happen to know a way of quoting which works with both versions?
>
Unfortunately not, and I'm really sorry for that. I tend to recommend the

        --jobname=luatex\ test

way, since it works for TL 2010 and TL 2011, and this is more important IMO than
supporting 2009 even if it is the Debian version for the following reasons:
1. Debian users seem unlikely to use spaces in their tex filenames too often, I
believe this is rather an habit of Windows and OS X users;
2. LuaTeX users tend to want up-to-date suff anyway.
(I admit this reasons are rather based on clichés.)

The only good news in this picture is that, however you quote the argument of
--jobname, it will work with any version of TeX Live if the filename doesn't
contain spaces. So it is probably still a good idea to add --jobname: it would
fix the problem with the autoquote fix in TL 2010/11 for filenames without spaces.

Manuel.

PS: I confirm your current syntax works with LuaTeX 0.71 on top of TeX Live
2011, as will the --jobname luatext\ test syntax. I'll also arrange for the
--jobname \"luatex\ test\" to work now that I'm aware of the issue.

_______________________________________________
bug-auctex mailing list
bug-auctex@...
https://lists.gnu.org/mailman/listinfo/bug-auctex

Re: lualatex needs --jobname option

by Ralf Angeli-3 :: Rate this Message:

| View Threaded | Show Only this Message

* Manuel Pégourié-Gonnard (2011-06-15) writes:

> Le 14/06/2011 22:43, Ralf Angeli a écrit :
>>
>> Do you happen to know a way of quoting which works with both versions?
>>
> Unfortunately not, and I'm really sorry for that. I tend to recommend the
>
> --jobname=luatex\ test
>
> way, since it works for TL 2010 and TL 2011, and this is more
> important IMO than supporting 2009 even if it is the Debian version
> for the following reasons:
> 1. Debian users seem unlikely to use spaces in their tex filenames too
> often, I believe this is rather an habit of Windows and OS X users;
> 2. LuaTeX users tend to want up-to-date suff anyway.
> (I admit this reasons are rather based on clichés.)
>
> The only good news in this picture is that, however you quote the
> argument of --jobname, it will work with any version of TeX Live if
> the filename doesn't contain spaces. So it is probably still a good
> idea to add --jobname: it would fix the problem with the autoquote fix
> in TL 2010/11 for filenames without spaces.

Thanks for all the informative explanations.  I've now added the
--jobname switch for luatex and lualatex with the quoting you recommend
above, i.e. --jobname=luatex\ test in the example we discussed.  I've
added it really only for the two LuaTeX binaries and not for other
engines' binaries since I want to keep the impact as small as possible.

--
Ralf

_______________________________________________
bug-auctex mailing list
bug-auctex@...
https://lists.gnu.org/mailman/listinfo/bug-auctex

Re: lualatex needs --jobname option

by Manuel Pégourié-Gonnard-2 :: Rate this Message:

| View Threaded | Show Only this Message

Le 19/06/2011 21:20, Ralf Angeli a écrit :
> Thanks for all the informative explanations.  I've now added the
> --jobname switch for luatex and lualatex with the quoting you recommend
> above, i.e. --jobname=luatex\ test in the example we discussed.  I've
> added it really only for the two LuaTeX binaries and not for other
> engines' binaries since I want to keep the impact as small as possible.
>
Great. By the way, only(dvi)lualatex is impacted, not the luatex command. The
rationale is, LaTeX does \input\jobname.aux for every document so jobname
quoting is crucial here, but Plain does not, so we thought it would be better to
left it untouched.

Manuel.

_______________________________________________
bug-auctex mailing list
bug-auctex@...
https://lists.gnu.org/mailman/listinfo/bug-auctex

Re: lualatex needs --jobname option

by Ralf Angeli-3 :: Rate this Message:

| View Threaded | Show Only this Message

* Manuel Pégourié-Gonnard (2011-06-19) writes:

> By the way, only(dvi)lualatex is impacted, not the luatex command. The
> rationale is, LaTeX does \input\jobname.aux for every document so
> jobname quoting is crucial here, but Plain does not, so we thought it
> would be better to left it untouched.

Oh, okay.  I've backed out the change for luatex again, but left it
intact for lualatex.

--
Ralf

_______________________________________________
bug-auctex mailing list
bug-auctex@...
https://lists.gnu.org/mailman/listinfo/bug-auctex