Hello, is there a way to tell ConTeXt to generate a .pdf named otherwise instead of the name derived from file to be compiled? Let's have A.tex to be compiled and an existing A.pdf which cannot be written into, e.g. due to being open by a viewer. The "context.exe A.tex" fails as the A.pdf cannot be open for writing. The "context.exe A.tex --result=A2.pdf" fails too, as Ctx tries to write into A.pdf (derived from A.tex) first and later tries to rename A.pdf to A2.pdf. There is a way - "copy /y A.tex A2.tex & context.exe A2.tex" but it has some disadvantages - the .log, .tuc etc. will be named A2.log, A2.tuc etc., messages will refer to "A2" rather than to "A" etc. So best seems to me to have an option to tell ConTeXt to produce a .PDF WITH A DESIRED NAME from the beginning... Is there a way to do so? Best regards, Lukas -- Ing. Lukáš Procházka | mailto:LPr@pontex.cz Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 Fax: +420 244 461 038
On 04/09/2016 10:51 PM, Alan BRASLAU wrote:
On Sat, 9 Apr 2016 22:11:29 +0200 Lukáš Procházka wrote:
Let's have A.tex to be compiled and an existing A.pdf which cannot be written into, e.g. due to being open by a viewer.
This is only an issue for Windows users...
As far as I know, this is only an issue for Adobe users... At work, I have SumatraPDF running under Win7 and it reloads the PDF document when it has been recompiled. Pablo -- http://www.ousia.tk
On 2016-04-09 Pablo Rodriguez wrote:
On 04/09/2016 10:51 PM, Alan BRASLAU wrote:
On Sat, 9 Apr 2016 22:11:29 +0200 Lukáš Procházka wrote:
Let's have A.tex to be compiled and an existing A.pdf which cannot be written into, e.g. due to being open by a viewer.
This is only an issue for Windows users...
As far as I know, this is only an issue for Adobe users...
Especially Adobe Acrobat Reader DC. When the PDF file is closed in the Reader, a list of recent files is displayed instead. The most recent one is selected and its thumbnail is displayed in the right pane. From my experience as long as this thumbnail is displayed, the PDF file is locked for any modifications (!) Really silly from Adobe developers. My advice is to either close Reader completely or select another item in the recent opened documents. Jan
On 04/09/2016 10:11 PM, Lukáš Procházka wrote:
Hello,
is there a way to tell ConTeXt to generate a .pdf named othe instead of the name derived from file to be compiled?
Hi Lukáš, this wuld be the way to do it: context source.tex --result=output I’m not sure it may work with Adobe, since it compiles source.pdf and then it moves to output.pdf BTW, ---auto may achieve what you intend. I have never used it. Just in case it may help, Pablo -- http://www.ousia.tk
On 04/09/2016 11:47 PM, Pablo Rodriguez wrote:
On 04/09/2016 10:11 PM, Lukáš Procházka wrote:
Hello,
is there a way to tell ConTeXt to generate a .pdf named othe instead of the name derived from file to be compiled? [...] BTW, ---auto may achieve what you intend. I have never used it.
Sorry, the option is --autopdf, not --auto. Pablo -- http://www.ousia.tk
Hello,
thanks for the tip,
the issue here is that I'm not using AR but PdfXChange Viewer (and yes, there is also at least SumetraPPDF and Foxit Reader).
I don't use --autopdf as it closes the .pdf as soon as the compilation is to start.
My way is to compile into a "shadow copy" which allow use to view the document even during its compilation.
Once the compilation is done, I close the .pdf, I move the compiled "shadow copy" to the well-named .pdf and I open it in a viewer.
So I'm trying find a way to redirect ConTeXt to that "shadow copy"...
Best regards,
Lukas (and yes, WinXP)
On Sun, 10 Apr 2016 00:02:24 +0200, Pablo Rodriguez
On 04/09/2016 11:47 PM, Pablo Rodriguez wrote:
On 04/09/2016 10:11 PM, Lukáš Procházka wrote:
Hello,
is there a way to tell ConTeXt to generate a .pdf named othe instead of the name derived from file to be compiled? [...] BTW, ---auto may achieve what you intend. I have never used it.
Sorry, the option is --autopdf, not --auto.
Pablo
-- Ing. Lukáš Procházka | mailto:LPr@pontex.cz Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 Fax: +420 244 461 038
On Sun, 10 Apr 2016, Lukáš Procházka wrote:
My way is to compile into a "shadow copy" which allow use to view the document even during its compilation. Once the compilation is done, I close the .pdf, I move the compiled "shadow copy" to the well-named .pdf and I open it in a viewer.
So I'm trying find a way to redirect ConTeXt to that "shadow copy"...
This should have worked, but for some reason it does not: context --jobname=shadow main.tex The output says: system > files > jobname 'shadow', input './main', result 'shadow' ..... mkiv lua stats > result saved in file: shadow.pdf, compresslevel 3, objectcompresslevel 3 but no shadow.pdf file is created. Aditya
On 4/10/2016 6:07 PM, Aditya Mahajan wrote:
On Sun, 10 Apr 2016, Lukáš Procházka wrote:
My way is to compile into a "shadow copy" which allow use to view the document even during its compilation. Once the compilation is done, I close the .pdf, I move the compiled "shadow copy" to the well-named .pdf and I open it in a viewer.
So I'm trying find a way to redirect ConTeXt to that "shadow copy"...
This should have worked, but for some reason it does not:
context --jobname=shadow main.tex
The output says:
system > files > jobname 'shadow', input './main', result 'shadow' ..... mkiv lua stats > result saved in file: shadow.pdf, compresslevel 3, objectcompresslevel 3
but no shadow.pdf file is created.
because we do all kind of analysis command line arguments and given filenames and then set variables reflecting paths, input filenames, file types ... (we could probably do some magic with a specific pdf outputfile but i don't like that idea as it's a workaround for a problem that should not be there in the first place .. waste of time and energy) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hello,
On Sun, 10 Apr 2016 18:07:54 +0200, Aditya Mahajan
This should have worked, but for some reason it does not:
context --jobname=shadow main.tex
The output says:
system > files > jobname 'shadow', input './main', result 'shadow' ..... mkiv lua stats > result saved in file: shadow.pdf, compresslevel 3, objectcompresslevel 3
but no shadow.pdf file is created.
I can fully confirm this behavior; - the option "--jobname" is not listed when you type "context.exe" (= help), so it seems like a "hidden" option; - but ConTeXt seems to use this option somehow, as "context.exe --jobname=C A.mkiv" produces "system > files > jobname 'C', input './A.mkiv', result 'C'" to the console; - but the result file is still A.pdf. - Suggestion: would it be possible to use "--result=OutputFileName" as the name for the output stream immediately, i.e. not to produce "default PDF file" + rename it to "OutputFileName" (= --result), but to use the "OutputFileName" initially as the output stream? I guess I explained why I'd like to use "non-default" PDF stream (to allow working with the default PDF file during the compilation)... Best regards, Lukas (BTW: The PdfXChange Viewer has commands open/close PDF file similar to that of AR; unlike AR, these commands are still the same as far as I'm using PdfXCh.)
Aditya
-- Ing. Lukáš Procházka | mailto:LPr@pontex.cz Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 Fax: +420 244 461 038
On 4/10/2016 9:49 PM, Lukáš Procházka wrote:
- the option "--jobname" is not listed when you type "context.exe" (= help), so it seems like a "hidden" option;
it's not supported as engine flag
- Suggestion: would it be possible to use "--result=OutputFileName" as the name for the output stream immediately, i.e. not to produce "default PDF file" + rename it to "OutputFileName" (= --result), but to use the "OutputFileName" initially as the output stream?
maybe ... but it has to wait till after tex live code freeze (because it demands an extra flag to the engine --output-file so remind me in a month or so Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hello,
On Sun, 10 Apr 2016 23:43:30 +0200, Hans Hagen
On 4/10/2016 9:49 PM, Lukáš Procházka wrote:
- the option "--jobname" is not listed when you type "context.exe" (= help), so it seems like a "hidden" option;
it's not supported as engine flag
- Suggestion: would it be possible to use "--result=OutputFileName" as the name for the output stream immediately, i.e. not to produce "default PDF file" + rename it to "OutputFileName" (= --result), but to use the "OutputFileName" initially as the output stream?
maybe ... but it has to wait till after tex live code freeze (because it demands an extra flag to the engine --output-file
so remind me in a month or so
I will ... It would be very handy. Best regards, Lukas
Hans
-- Ing. Lukáš Procházka | mailto:LPr@pontex.cz Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 Fax: +420 244 461 038
Hello Hans,
just to remind -
- would it be possible to use "--result=OutputFileName" as the name for the output stream immediately?
(See the history bellow.)
Best regards,
Lukas
On Sun, 10 Apr 2016 23:43:30 +0200, Hans Hagen
On 4/10/2016 9:49 PM, Lukáš Procházka wrote:
- the option "--jobname" is not listed when you type "context.exe" (= help), so it seems like a "hidden" option;
it's not supported as engine flag
- Suggestion: would it be possible to use "--result=OutputFileName" as the name for the output stream immediately, i.e. not to produce "default PDF file" + rename it to "OutputFileName" (= --result), but to use the "OutputFileName" initially as the output stream?
maybe ... but it has to wait till after tex live code freeze (because it demands an extra flag to the engine --output-file
so remind me in a month or so
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- Ing. Lukáš Procházka | mailto:LPr@pontex.cz Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 Fax: +420 244 461 038
On 6/6/2016 9:21 AM, Procházka Lukáš Ing. wrote:
Hello Hans,
just to remind - - would it be possible to use "--result=OutputFileName" as the name for the output stream immediately?
not now (as it also relates to all kind of other name things like preventing a file to load itself as graphic and and i'm not going to mess up that code now) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 4/9/2016 11:47 PM, Pablo Rodriguez wrote:
On 04/09/2016 10:11 PM, Lukáš Procházka wrote:
Hello,
is there a way to tell ConTeXt to generate a .pdf named othe instead of the name derived from file to be compiled?
Hi Lukáš,
this wuld be the way to do it:
context source.tex --result=output
I’m not sure it may work with Adobe, since it compiles source.pdf and then it moves to output.pdf
BTW, ---auto may achieve what you intend. I have never used it.
there is code actually that will close the acrobat document but that api is different per version of acrobat and even between reader and professional so when again that happened i gave up on acrobat as previewer and switched to sumatrapdf Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (7)
-
Aditya Mahajan
-
Alan BRASLAU
-
Hans Hagen
-
Jan Tosovsky
-
Lukáš Procházka
-
Pablo Rodriguez
-
Procházka Lukáš Ing.