ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Mark IV and pre-processing input file processing.
@ 2007-11-06 13:32 Johannes Graumann
  2007-11-06 14:08 ` Wolfgang Schuster
  0 siblings, 1 reply; 9+ messages in thread
From: Johannes Graumann @ 2007-11-06 13:32 UTC (permalink / raw)
  To: ntg-context

Hello,

I started playing around with ConTeXt/LuaTeX and have a question here wich
is related to a pet project of mine: is it possible to tell Mark IV
something like this
> texmfstart texexec --lua --environments=myfile.tex someotherfile.zip
where 'myfile.tex' should contain a lua routine which would
unzip 'someotherfile.zip' to /tmp and call LuaConTeXt on a file actually
contained in the archive (among others)?

While I'm sure this can be done in Lua, I wonder whether somebody can point
me at how to access the names of files to be processed
('someotherfile.zip') from the running process ...

Not sure whether I can make myself understood here ... please ask if I'm not
making sense,

Joh

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Mark IV and pre-processing input file processing.
  2007-11-06 13:32 Mark IV and pre-processing input file processing Johannes Graumann
@ 2007-11-06 14:08 ` Wolfgang Schuster
  2007-11-06 15:29   ` Johannes Graumann
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2007-11-06 14:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 883 bytes --]

2007/11/6, Johannes Graumann <johannes_graumann@web.de>:
>
> Hello,
>
> I started playing around with ConTeXt/LuaTeX and have a question here wich
> is related to a pet project of mine: is it possible to tell Mark IV
> something like this
> > texmfstart texexec --lua --environments=myfile.tex someotherfile.zip
> where 'myfile.tex' should contain a lua routine which would
> unzip 'someotherfile.zip' to /tmp and call LuaConTeXt on a file actually
> contained in the archive (among others)?
>
> While I'm sure this can be done in Lua, I wonder whether somebody can
> point
> me at how to access the names of files to be processed
> ('someotherfile.zip') from the running process ...
>
> Not sure whether I can make myself understood here ... please ask if I'm
> not
> making sense,
>
> Joh


Take a look into Hans Mark manual.

http://pragma-ade.nl/general/manuals/mk.pdf

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 1285 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Mark IV and pre-processing input file processing.
  2007-11-06 14:08 ` Wolfgang Schuster
@ 2007-11-06 15:29   ` Johannes Graumann
  2007-11-06 16:35     ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Johannes Graumann @ 2007-11-06 15:29 UTC (permalink / raw)
  To: ntg-context

Wolfgang Schuster wrote:

> 2007/11/6, Johannes Graumann <johannes_graumann@web.de>:
>>
>> Hello,
>>
>> I started playing around with ConTeXt/LuaTeX and have a question here
>> wich is related to a pet project of mine: is it possible to tell Mark IV
>> something like this
>> > texmfstart texexec --lua --environments=myfile.tex someotherfile.zip
>> where 'myfile.tex' should contain a lua routine which would
>> unzip 'someotherfile.zip' to /tmp and call LuaConTeXt on a file actually
>> contained in the archive (among others)?
>>
>> While I'm sure this can be done in Lua, I wonder whether somebody can
>> point
>> me at how to access the names of files to be processed
>> ('someotherfile.zip') from the running process ...
>>
>> Not sure whether I can make myself understood here ... please ask if I'm
>> not
>> making sense,
>>
>> Joh
> 
> 
> Take a look into Hans Mark manual.
> 
> http://pragma-ade.nl/general/manuals/mk.pdf

Thanks for that! I found the zipping reference and got it to work.
Returning now to the example above ("texmfstart
texexec --lua --environments=myfile.tex someotherfile.zip"), what I would
like to do is using lua in "myfile.tex" to extract the filename to be texed
(someotherfile.zip) and rewrite it on the fly to a zip-archive content
along the lines of
\input zip::someotherfile.zip::somezipcontent.tex

Is that possible? "texmfstart texexec --verbose" produces something like
TeXExec | option 'filename' is set to 'someotherfile.tex', so how to access
this during processing using lua?

Thanks for any insights,

Joh


___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Mark IV and pre-processing input file processing.
  2007-11-06 15:29   ` Johannes Graumann
@ 2007-11-06 16:35     ` Hans Hagen
  2007-11-06 18:08       ` Johannes Graumann
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2007-11-06 16:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Johannes Graumann wrote:
> Wolfgang Schuster wrote:
> 
>> 2007/11/6, Johannes Graumann <johannes_graumann@web.de>:
>>> Hello,
>>>
>>> I started playing around with ConTeXt/LuaTeX and have a question here
>>> wich is related to a pet project of mine: is it possible to tell Mark IV
>>> something like this
>>>> texmfstart texexec --lua --environments=myfile.tex someotherfile.zip
>>> where 'myfile.tex' should contain a lua routine which would
>>> unzip 'someotherfile.zip' to /tmp and call LuaConTeXt on a file actually
>>> contained in the archive (among others)?
>>>
>>> While I'm sure this can be done in Lua, I wonder whether somebody can
>>> point
>>> me at how to access the names of files to be processed
>>> ('someotherfile.zip') from the running process ...
>>>
>>> Not sure whether I can make myself understood here ... please ask if I'm
>>> not
>>> making sense,
>>>
>>> Joh
>>
>> Take a look into Hans Mark manual.
>>
>> http://pragma-ade.nl/general/manuals/mk.pdf
> 
> Thanks for that! I found the zipping reference and got it to work.
> Returning now to the example above ("texmfstart
> texexec --lua --environments=myfile.tex someotherfile.zip"), what I would
> like to do is using lua in "myfile.tex" to extract the filename to be texed
> (someotherfile.zip) and rewrite it on the fly to a zip-archive content
> along the lines of
> \input zip::someotherfile.zip::somezipcontent.tex
> 
> Is that possible? "texmfstart texexec --verbose" produces something like
> TeXExec | option 'filename' is set to 'someotherfile.tex', so how to access
> this during processing using lua?

texmfstart texexec --lua myfile.tex --arg="name=someotherfile.zip"

mak emyfile.tex your main tex file (use --global if needed) and then use 
\env{name}

hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Mark IV and pre-processing input file processing.
  2007-11-06 16:35     ` Hans Hagen
@ 2007-11-06 18:08       ` Johannes Graumann
  2007-11-06 19:48         ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Johannes Graumann @ 2007-11-06 18:08 UTC (permalink / raw)
  To: ntg-context

Hans Hagen wrote:

>> Thanks for that! I found the zipping reference and got it to work.
>> Returning now to the example above ("texmfstart
>> texexec --lua --environments=myfile.tex someotherfile.zip"), what I would
>> like to do is using lua in "myfile.tex" to extract the filename to be
>> texed (someotherfile.zip) and rewrite it on the fly to a zip-archive
>> content along the lines of
>> \input zip::someotherfile.zip::somezipcontent.tex
>> 
>> Is that possible? "texmfstart texexec --verbose" produces something like
>> TeXExec | option 'filename' is set to 'someotherfile.tex', so how to
>> access this during processing using lua?
> 
> texmfstart texexec --lua myfile.tex --arg="name=someotherfile.zip"
> 
> mak emyfile.tex your main tex file (use --global if needed) and then use
> \env{name}

Thanks Hans! Not as elegant as I had hoped, but it does what I want when I
use "\input zip::\env{name}::somezipcontent.tex" in myfile.tex ... 
Now is there any way to define the output-filename from within myfile.tex?
This would be analogous to texexec's '--result' option, but from within the
texfile to change the output-name with the help of the newly
defined '\env{name}' - in the example to '\env{name}.pdf'.

Thanks, Joh



___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Mark IV and pre-processing input file processing.
  2007-11-06 18:08       ` Johannes Graumann
@ 2007-11-06 19:48         ` Hans Hagen
  2007-11-11 12:15           ` Wolfgang Schuster
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2007-11-06 19:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Johannes Graumann wrote:
> Hans Hagen wrote:
> 
>>> Thanks for that! I found the zipping reference and got it to work.
>>> Returning now to the example above ("texmfstart
>>> texexec --lua --environments=myfile.tex someotherfile.zip"), what I would
>>> like to do is using lua in "myfile.tex" to extract the filename to be
>>> texed (someotherfile.zip) and rewrite it on the fly to a zip-archive
>>> content along the lines of
>>> \input zip::someotherfile.zip::somezipcontent.tex
>>>
>>> Is that possible? "texmfstart texexec --verbose" produces something like
>>> TeXExec | option 'filename' is set to 'someotherfile.tex', so how to
>>> access this during processing using lua?
>> texmfstart texexec --lua myfile.tex --arg="name=someotherfile.zip"
>>
>> mak emyfile.tex your main tex file (use --global if needed) and then use
>> \env{name}
> 
> Thanks Hans! Not as elegant as I had hoped, but it does what I want when I
> use "\input zip::\env{name}::somezipcontent.tex" in myfile.tex ... 
> Now is there any way to define the output-filename from within myfile.tex?
> This would be analogous to texexec's '--result' option, but from within the
> texfile to change the output-name with the help of the newly
> defined '\env{name}' - in the example to '\env{name}.pdf'.

no ... maybe some day

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Mark IV and pre-processing input file processing.
  2007-11-06 19:48         ` Hans Hagen
@ 2007-11-11 12:15           ` Wolfgang Schuster
  2007-11-11 21:37             ` Hans Hagen
  2007-11-12  9:33             ` Johannes Graumann
  0 siblings, 2 replies; 9+ messages in thread
From: Wolfgang Schuster @ 2007-11-11 12:15 UTC (permalink / raw)
  To: ntg-context

On Tue, 06 Nov 2007 20:48:26 +0100
Hans Hagen <pragma@wxs.nl> wrote:

> Johannes Graumann wrote:
> > Hans Hagen wrote:
> > 
> >>> Thanks for that! I found the zipping reference and got it to work.
> >>> Returning now to the example above ("texmfstart
> >>> texexec --lua --environments=myfile.tex someotherfile.zip"), what I would
> >>> like to do is using lua in "myfile.tex" to extract the filename to be
> >>> texed (someotherfile.zip) and rewrite it on the fly to a zip-archive
> >>> content along the lines of
> >>> \input zip::someotherfile.zip::somezipcontent.tex
> >>>
> >>> Is that possible? "texmfstart texexec --verbose" produces something like
> >>> TeXExec | option 'filename' is set to 'someotherfile.tex', so how to
> >>> access this during processing using lua?
> >> texmfstart texexec --lua myfile.tex --arg="name=someotherfile.zip"
> >>
> >> mak emyfile.tex your main tex file (use --global if needed) and then use
> >> \env{name}
> > 
> > Thanks Hans! Not as elegant as I had hoped, but it does what I want when I
> > use "\input zip::\env{name}::somezipcontent.tex" in myfile.tex ... 
> > Now is there any way to define the output-filename from within myfile.tex?
> > This would be analogous to texexec's '--result' option, but from within the
> > texfile to change the output-name with the help of the newly
> > defined '\env{name}' - in the example to '\env{name}.pdf'.
> 
> no ... maybe some day

this give us so many options.

I think about something like,

We can create a zip archive of a current project with a file ending
like cdx (ConTeXt Document Excange) and can now process this file by
calling texexec only on this file.

Nothing special at this moment for now but it is easier send only one
files to someone else instead of a many files or many files in a zip
file he has to unzip first and call texexec later on the main file.

What I want is to create a document in one directory with the normal
structure with projects, components, a figure directory etc. and zip
this directory to only one file. I can now process file simply by
calling texexec on the directory and it is unzipped on the fly
(unnoticed by the user) and I have no longer many different files in my
directory and it is easier to send a docuemnt to someone else because
he get from me only the zipped project file.

I know this is nearly the same as a openoffice document (also a zip
archive with many files) but why not.

Wolfgang

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Mark IV and pre-processing input file processing.
  2007-11-11 12:15           ` Wolfgang Schuster
@ 2007-11-11 21:37             ` Hans Hagen
  2007-11-12  9:33             ` Johannes Graumann
  1 sibling, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2007-11-11 21:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Wolfgang Schuster wrote:

> this give us so many options.
> 
> I think about something like,
> 
> We can create a zip archive of a current project with a file ending
> like cdx (ConTeXt Document Excange) and can now process this file by
> calling texexec only on this file.
> 
> Nothing special at this moment for now but it is easier send only one
> files to someone else instead of a many files or many files in a zip
> file he has to unzip first and call texexec later on the main file.
> 
> What I want is to create a document in one directory with the normal
> structure with projects, components, a figure directory etc. and zip
> this directory to only one file. I can now process file simply by
> calling texexec on the directory and it is unzipped on the fly
> (unnoticed by the user) and I have no longer many different files in my
> directory and it is easier to send a docuemnt to someone else because
> he get from me only the zipped project file.
> 
> I know this is nearly the same as a openoffice document (also a zip
> archive with many files) but why not.

sounds interesting

it's no big problem to implement this, but it makes most sense to stick 
to luatex for this because it has zip support built in, so there is no 
need to unzip then. things like the output, style etc can be controller 
using a ctx file but currently that file is handled outside the tex run

for luatex, in the near future we will no longer use texexec but a lua 
based variant (this removes the dependency on ruby) (i have a prototype 
plugin for mtxrun for that; all support script will use mtxrun as stub)

let's come back to it later this year when we have a more stable luatex

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Mark IV and pre-processing input file processing.
  2007-11-11 12:15           ` Wolfgang Schuster
  2007-11-11 21:37             ` Hans Hagen
@ 2007-11-12  9:33             ` Johannes Graumann
  1 sibling, 0 replies; 9+ messages in thread
From: Johannes Graumann @ 2007-11-12  9:33 UTC (permalink / raw)
  To: ntg-context

Wolfgang Schuster wrote:

> I know this is nearly the same as a openoffice document (also a zip
> archive with many files) but why not.
This is in fact what I'm trying to setup: a Mark IV mapping environment to
typeset odt's (mainly the "content.xml" part) by just calling ConTeXt on
the odt.
I'm in an academic environment wher Word dominates and the change tracking
features of a WYSIWYG-moloch like Word or OOWriter are heavily used. This
direct mapping strategy seems to me the most straight forward way of living
with that tradition/necessity and still achieve nice typesetting. I read
about The odt-markdown-context route on a recent thread, but my solution
(if it ever comes about) seems theoretically more robust - aside from
catering to my manic tinkerism ...

Joh

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-11-12  9:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-06 13:32 Mark IV and pre-processing input file processing Johannes Graumann
2007-11-06 14:08 ` Wolfgang Schuster
2007-11-06 15:29   ` Johannes Graumann
2007-11-06 16:35     ` Hans Hagen
2007-11-06 18:08       ` Johannes Graumann
2007-11-06 19:48         ` Hans Hagen
2007-11-11 12:15           ` Wolfgang Schuster
2007-11-11 21:37             ` Hans Hagen
2007-11-12  9:33             ` Johannes Graumann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).