At least on my system, there is no default option to do this. However, it is not difficult to create such an option.
Settings > Configure Kile [should get you the configuration window. This option might be somewhere else on other systems - I'm not sure.]
Once in the configuration screen, choose
Tools > Build from the list.
Underneath the list of tools, click the "New" button. Enter the name you want to use e.g. LuaLaTeX and click next. It will ask you what to base the configuration on. Pick something similar e.g. XeLaTeX or PDFLaTeX. Click finish.
Now you need to edit the options by filling in the command name and the options you want to pass to it. The easiest way is to copy something from one of the other tool's options and then just adjust it as necessary. Probably you want "lualatex" for the command, for example, and something like "-interaction=nonstopmode '%source'" for options.
When you are satisfied, save your changes. You should get a new compile option in the build menu corresponding to your new settings.
Note that this is a lot easier to do than it is to describe and will be a lot faster to do, as well!
Best Answer
First things first.
:)
According to The Kile Handbook, chapter 13, "Kile's scripting feature allows for the execution of ECMAScript code. Scripts can be managed through the scripting panel in the sidebar." As a reference, both JavaScript and ActionScript are dialects of ECMAScript.
Unfortunately, my answer won't TeX-related. But here we go.
:)
A quick look into the ECMAScript Language Specification plus the section 13.2 (API Reference) of The Kile Handbook made me come up with the following example:
I created a new script and called
myscript.js
with the content described as follows; Kile seems to save them in a specific scripts folder.In line 1, I get a
KileTextDocument
object which reflects the currently active text document. Please note that my code has no error checking! In line 2, thegetInputValue
method opens a dialog with the given caption and label; the variablemyName
gets the returned value. In line 3, I simply insert the text.I saved the script and now it's available on the sidebar:
Let's say I create a dummy
test.tex
file with the following content:Running the script:
The result:
When clicking
OK
:There we go! My first script in Kile.
:)
Take a look in the API Reference. It might have some useful methods, but beware! According to the handbook:
Sorry to come up with this simple example, that's the only idea I had in such short time.
:)
By the way: boas festas, amigo!
:)