ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: ntg-context@ntg.nl
Subject: Re: Getting the filename which is being typeset
Date: Tue, 1 Dec 2020 18:23:50 +0100	[thread overview]
Message-ID: <bea3575a-ed04-fb4d-08a4-a3034d2937a2@gmail.com> (raw)
In-Reply-To: <7AFD3EF6-54EA-477B-A89E-95CC2C0B334C@gmail.com>

Otared Kavian schrieb am 01.12.2020 um 18:10:
> Thanks Hraban, this might be also useful and I'll keep it somewhere on my mind, but for the project I was asking my question \jobname is enough.
>
> Best regards: Otared
>> On 1 Dec 2020, at 17:33, Henning Hraban Ramm <texml@fiee.net> wrote:
>>> Am 01.12.2020 um 16:20 schrieb Otared Kavian <otared@gmail.com>:
>>>
>>> Thanks Tomás! Indeed \jobname does the job :-)
>> In case you need the current component file in a project environment: \currentcomponent

In some case \inputfilename is the better choice, e.g. when you process 
xml files with a environment file for the style and processing settings.

     context --environment=myxmlstyle myfile.xml

The following example shows the output of all commands:

\starttext
\starttabulate [|T|T|]
\NC \type{\jobname}           \NC \jobname           \NC\NR
\NC \type{\jobfilename}       \NC \jobfilename       \NC\NR
\NC \type{\jobfilesuffix}     \NC \jobfilesuffix     \NC\NR
\NC \type{\inputfilename}     \NC \inputfilename     \NC\NR
\NC \type{\inputfilebarename} \NC \inputfilebarename \NC\NR
\NC \type{\inputfilesuffix}   \NC \inputfilesuffix   \NC\NR
\NC \type{\outputfilename}    \NC \outputfilename    \NC\NR
\NC \type{\operatingsystem}   \NC \operatingsystem   \NC\NR
\stoptabulate
\stoptext

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2020-12-01 17:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01 13:45 Otared Kavian
2020-12-01 14:25 ` Tomas Hala
2020-12-01 15:20   ` Otared Kavian
2020-12-01 16:33     ` Henning Hraban Ramm
2020-12-01 17:10       ` Otared Kavian
2020-12-01 17:23         ` Wolfgang Schuster [this message]
2020-12-01 17:55           ` Otared Kavian
2020-12-01 18:47             ` Hans Hagen
2020-12-04  7:02           ` Axel Kielhorn
2020-12-04  9:04             ` Hans Hagen
2020-12-05  8:38               ` Axel Kielhorn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bea3575a-ed04-fb4d-08a4-a3034d2937a2@gmail.com \
    --to=wolfgang.schuster.lists@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).