ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* foldername instead of jobname
@ 2008-07-11 16:20 Steffen Wolfrum
  2008-07-11 20:44 ` Taco Hoekwater
  0 siblings, 1 reply; 3+ messages in thread
From: Steffen Wolfrum @ 2008-07-11 16:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

marking=on often uses \jobname.

My file's name is not as important as its respective folder name.

Is it possible to read and reuse this folder's name?


Thanks,

Steffen
___________________________________________________________________________________
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] 3+ messages in thread

* Re: foldername instead of jobname
  2008-07-11 16:20 foldername instead of jobname Steffen Wolfrum
@ 2008-07-11 20:44 ` Taco Hoekwater
  2008-07-11 20:58   ` Steffen Wolfrum
  0 siblings, 1 reply; 3+ messages in thread
From: Taco Hoekwater @ 2008-07-11 20:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Steffen Wolfrum wrote:
> Hi,
> 
> marking=on often uses \jobname.
> 
> My file's name is not as important as its respective folder name.
> 
> Is it possible to read and reuse this folder's name?

In mkii you would have to do something with \write18, I fear.

In mkiv you can simply do:

   \edef\foldername{\ctxlua{tex.sprint(lfs.currentdir())}}

(assuming the jobname file lives inside the current directory)


Best wishes,
Taco
___________________________________________________________________________________
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] 3+ messages in thread

* Re: foldername instead of jobname
  2008-07-11 20:44 ` Taco Hoekwater
@ 2008-07-11 20:58   ` Steffen Wolfrum
  0 siblings, 0 replies; 3+ messages in thread
From: Steffen Wolfrum @ 2008-07-11 20:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 11.07.2008 um 22:44 schrieb Taco Hoekwater:

> In mkiv you can simply do:
>
>  \edef\foldername{\ctxlua{tex.sprint(lfs.currentdir())}}
>
> (assuming the jobname file lives inside the current directory)


quite comfortable ;o)

st.
___________________________________________________________________________________
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] 3+ messages in thread

end of thread, other threads:[~2008-07-11 20:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-11 16:20 foldername instead of jobname Steffen Wolfrum
2008-07-11 20:44 ` Taco Hoekwater
2008-07-11 20:58   ` Steffen Wolfrum

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).