Dear list, I have two questions on how to improve the way I use ConTeXt to handle files. Is there a way that I can specify the document from the command line in the line below? \insertpages[mydocument.pdf][width=0pt] Is there any way that context compiles using the a pipe? (Sorry if this is wrong, but this is totally new to me.) I would like to compile something like (well, using pandoc): cat a.tex | contextjit --purgeall Many thanks for your help, Pablo -- http://www.ousia.tk
On 2/20/2015 10:53 PM, Pablo Rodriguez wrote:
Dear list,
I have two questions on how to improve the way I use ConTeXt to handle files.
Is there a way that I can specify the document from the command line in the line below?
\insertpages[mydocument.pdf][width=0pt]
Is there any way that context compiles using the a pipe? (Sorry if this is wrong, but this is totally new to me.)
you can pass command line arguments, see mtx-context-*.tex files for examples
I would like to compile something like (well, using pandoc):
cat a.tex | contextjit --purgeall
won't work (imagine multiple runs) .. why pipe and not just "contextjit a.tex"
Many thanks for your help,
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 02/20/2015 11:05 PM, Hans Hagen wrote:
On 2/20/2015 10:53 PM, Pablo Rodriguez wrote:
[...] Is there a way that I can specify the document from the command line in the line below?
\insertpages[mydocument.pdf][width=0pt]
you can pass command line arguments, see mtx-context-*.tex files for examples
Many thanks for your reply, Hans. I’ll check it right after this message.
I would like to compile something like (well, using pandoc):
cat a.tex | contextjit --purgeall
won't work (imagine multiple runs) .. why pipe and not just "contextjit a.tex"
Well, it was a more complex command: pandoc -S -s --section-divs book.md -t html -o book.xml Since I won’t use that book.xml for other purpose, I thought it would be better not to write it to disk. Many thanks for your help, Pablo -- http://www.ousia.tk
On 2/20/2015 11:28 PM, Pablo Rodriguez wrote:
On 02/20/2015 11:05 PM, Hans Hagen wrote:
On 2/20/2015 10:53 PM, Pablo Rodriguez wrote:
[...] Is there a way that I can specify the document from the command line in the line below?
\insertpages[mydocument.pdf][width=0pt]
you can pass command line arguments, see mtx-context-*.tex files for examples
Many thanks for your reply, Hans.
I’ll check it right after this message.
I would like to compile something like (well, using pandoc):
cat a.tex | contextjit --purgeall
won't work (imagine multiple runs) .. why pipe and not just "contextjit a.tex"
Well, it was a more complex command:
pandoc -S -s --section-divs book.md -t html -o book.xml
Since I won’t use that book.xml for other purpose, I thought it would be better not to write it to disk.
if you make complex one-liners on the command line adding a delete afterwards is no big deal (actually there is a whole subsystem driven by ctx files that can be set up to take a file, convert it, use environments and modules etc .. we sometimes use that for projects .. but i sometimes wonder if it should go) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 02/20/2015 11:43 PM, Hans Hagen wrote:
[...] if you make complex one-liners on the command line adding a delete afterwards is no big deal
I agree. I tend to make things way more complicated than they are.
(actually there is a whole subsystem driven by ctx files that can be set up to take a file, convert it, use environments and modules etc .. we sometimes use that for projects .. but i sometimes wonder if it should go)
Maybe including them in ConTeXt might help others. Pablo -- http://www.ousia.tk
On 2/21/2015 10:57 AM, Pablo Rodriguez wrote:
On 02/20/2015 11:43 PM, Hans Hagen wrote:
[...] if you make complex one-liners on the command line adding a delete afterwards is no big deal
I agree. I tend to make things way more complicated than they are.
(actually there is a whole subsystem driven by ctx files that can be set up to take a file, convert it, use environments and modules etc .. we sometimes use that for projects .. but i sometimes wonder if it should go)
Maybe including them in ConTeXt might help others.
they have been included for ages (ctx files), just like mtxrun has some features that help integrating in services (there is no difference between what we run here and what is in the distribution) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 02/21/2015 12:31 PM, Hans Hagen wrote:
On 2/21/2015 10:57 AM, Pablo Rodriguez wrote:
On 02/20/2015 11:43 PM, Hans Hagen wrote:
[...] (actually there is a whole subsystem driven by ctx files that can be set up to take a file, convert it, use environments and modules etc .. we sometimes use that for projects .. but i sometimes wonder if it should go)
Maybe including them in ConTeXt might help others.
they have been included for ages (ctx files), just like mtxrun has some features that help integrating in services (there is no difference between what we run here and what is in the distribution)
Many thanks for your reply, Hans. After your tip from yesterday, I started browsing what was in the mtx-context-*.tex files you told me. I discovered that the first one (mtx-context-arrange.tex) could spare me a special file on imposition (well, actually two). BTW, I think the example should be improved in the example (diff attached). The more I use ConTeXt, the more I realize how ignorant I am and how awesome ConTeXt is. Many thanks for your excellent work, Pablo -- http://www.ousia.tk
On Fri, 20 Feb 2015, Pablo Rodriguez wrote:
On 02/20/2015 11:05 PM, Hans Hagen wrote:
On 2/20/2015 10:53 PM, Pablo Rodriguez wrote:
I would like to compile something like (well, using pandoc):
cat a.tex | contextjit --purgeall
won't work (imagine multiple runs) .. why pipe and not just "contextjit a.tex"
Well, it was a more complex command:
pandoc -S -s --section-divs book.md -t html -o book.xml
Since I won’t use that book.xml for other purpose, I thought it would be better not to write it to disk.
If you don't require multiple runs, you can use `context --pipe`, for example: echo "\starttext Hello world \stoptext" | context --pipe Aditya
On 02/21/2015 08:44 AM, Aditya Mahajan wrote:
[...] If you don't require multiple runs, you can use `context --pipe`, for example:
echo "\starttext Hello world \stoptext" | context --pipe
Many thanks for your reply, Aditya. I require more than one runs. It is a book with a TOC. Pablo -- http://www.ousia.tk
participants (3)
-
Aditya Mahajan
-
Hans Hagen
-
Pablo Rodriguez