Reputation: 124
I am trying to make an External Tool in Eclipse which requires several file names as inputs. However, I need to edit the output from the variable to exclude the file extension.
My arguments look as follows:
makeindex ${selected_resource_name}.nlo -s nomencl.ist -o ${selected_resource_name}.nls
The output from this compiles as follows:
makeindex filename.tex.nlo -s nomencl.ist -o filename.tex.nls
However, I would like to remove the .tex extensions, so the command compiles as
makeindex filename.nlo -s nomencl.ist -o filename.nls
Is this possible? And if so, how can I do this from within Eclipse?
Upvotes: 0
Views: 198
Reputation: 151
From what i am seeing it looks like you are trying to replace '.tex' with '.nlo'. You could use substring to specify the name minus the last four characters (.tex). And do the rest as you were.
Example:
$new_name = substr(selected_resource_name, 0, -4);
makeindex ${new_name}.nlo -s nomencl.ist -o ${new_name}.nls
This should return your desired result.
Upvotes: 1