# [NTG-context] Fwd: Is it possible to set the output file name in the script

Again to Hans instead of to the list. I ‘hate’ gmail.


---------- Forwarded message ----------
From: Cecil Westerhof <cldwester...@gmail.com>
Date: 2013/4/26
Subject: Re: [NTG-context] Is it possible to set the output file name
in the script
To: Hans Hagen <pra...@wxs.nl>

2013/4/26 Hans Hagen <pra...@wxs.nl>:
> On 4/26/2013 7:01 PM, Cecil Westerhof wrote:
>>
>> 2013/4/26 Hans Hagen <pra...@wxs.nl>:
>>>
>>> On 4/26/2013 6:50 PM, Cecil Westerhof wrote:
>>>>
>>>>
>>>> 2013/4/26 Hans Hagen <pra...@wxs.nl>:
>>>>>
>>>>>
>>>>> On 4/26/2013 5:34 PM, Cecil Westerhof wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>> I am using a command line parameter to change the generated output. Is
>>>>>> it also possible to set the output file name depending on the
>>>>>> parameter?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --result=somename
>>>>
>>>>
>>>>
>>>> That is on the command line. Then you need to give two parameters. Not
>>>> a very big problem, but I would prefer one parameter. I like DRY. Less
>>>> that can go wrong.
>>>
>>>
>>>
>>> not possible but you can access the outputfilename at the tex and lua end
>>
>>
>> What do mean with that?
>
>
> just grep for outputfile in lua and mkiv files

I have now (I need to use jobfilename, because I get an error when I
use outputfilename):
\def\outputfilename{\jobfilename -\getvariable{meta}{type}}
\def\outputfilenametwo{\jobfilename -\getvariable{meta}{type}}

When displaying outputfilenametwo I see that it is filled with the
correct value, but the output is still written to the same file.

--
Cecil Westerhof

--
Cecil Westerhof
___________________________________________________________________________________