LuaTeX is quickly becoming mainstream (having been declared the successor to PDFTeX). Would it be possible to:
1) [Minor] Add it (and possibly PDFLuaTex) as an option in Configure -> Commands
2) [Major] Have syntax highlighting for lua that's embedded with the \directlua{ ... } command
and 3) [Most ambitious and I'm not even sure I fully understand it] Automatically provide an escaping macro such as this one:
http://wiki.luatex.org/index.php/Writing_Lua_in_TeX#Special_characters
The third might be OTT, but the first and second, imo, would be very up-to-date additions.
Anonymous
As a follow up, TeXStudio does not seem to detect all luatex errors (that come up in the log). It just says "process finished with errors". I have to run the command in a separate terminal if I want to find them. A minimum example is:
\documentclass{article}
\usepackage{luacode}
\begin{document}
\begin{luacode}
dofile("minimal.lua")
\end{luacode}
\end{document}
There are actually 2 examples here: one if you don't actually make a minimal.lua. Then the following error comes up in the log:
(./minimar.aux)
! LuaTeX error cannot open minimal.lua: No such file or directory
stack traceback:
[C]: in function 'dofile'
<\directlua >:2: in main chunk.
\luacode@execute ...oup \luatexbase@directlua {#1}
l.8 \end{luacode}
Second, I think it doesn't detect lua errors in separate files in general. If you do make the file, and make it just gibberish, the following error pops up in the log:
(./minimar.aux)
! LuaTeX error minimal.lua:2: '=' expected near '<eof>'
stack traceback:
[C]: in function 'dofile'
<\directlua >:2: in main chunk.
\luacode@execute ...oup \luatexbase@directlua {#1}</eof>
l.8 \end{luacode}
Neither error is caught by the parser to display in the errors tab.
Now that I think of it, the above should probably be in the bugs section for more exposure. I'll repost in a few days if nothing happens.
as luatex is not yet mainstream, i don't think that we will put too much work into it for satisfying a user base of 1. But we are happy to integrate any patch for luatex support that you can provide ...
I did make a quick fix for specified bug (and shouldn't introduce any regressions for pdflatex). I'll have to look at it harder to do more. Where are the instructions for submitting patches? The diff for latexoutputfilter.cpp is:
407,408c407,408
< static QRegExp reLaTeXError("^! (?:Lua|La)TeX Error(?: \<\\directlua \>:(?:[0-9]))?: (.)$", Qt::CaseInsensitive);
< static QRegExp rePDFLaTeXError("^Error: (?:lua|pdf)latex (.*)$", Qt::CaseInsensitive);
And for loghighlighter.cpp is:
25c25
< QRegExp rxWarning("(((! )?(La|pdf|Lua)TeX)|Package) .Warning.:(.*)");
you should create a patch file which can be inserted here via patch -p0 < patchfile.
The usual command for doing this is: svn diff > patchfile inside the directory texstudio/trunk (or wherever you have checked out trunk)
Thanks! http://pastebin.com/raw.php?i=QFjJ5H2z (I hope I did it right!)
Basic LuaLaTeX support has been implemented in rev. 2739 (build commands and completion file)
What is the status of the patch? Seems it has not been applied yet.
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
Just one small comment: " .. for a user base of ". Some of us just check if an editor can for instance lualatex or be configured to, if not just don't even consider it further. For teaching I believe a good combination is: lualatex, lua & tikz. It would be nice if an editor exists that can really make that combination easier to handle. Until I find one, I will stay with what I know.
Can you state your request more precisely?
For the time beeing 3) will not be implemented, except if there's really need and some would explain exaclty what is needed. I don't have time to dig into the lua & latex character escape problem.
related: [bugs:#2162]
Related
Bugs: #2162