ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Otared Kavian <otared@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Getting the filename which is being typeset
Date: Tue, 1 Dec 2020 16:20:05 +0100	[thread overview]
Message-ID: <5D3E1DDC-A961-4D79-9781-DC0756CE000B@gmail.com> (raw)
In-Reply-To: <20201201142545.GF19716@akela.mendelu.cz>

Thanks Tomás! Indeed \jobname does the job :-)

Best regards: Otared

> On 1 Dec 2020, at 15:25, Tomas Hala <tomas.hala@mendelu.cz> wrote:
> 
> Hi Otared,
> 
> try \jobname.
> 
> Best wishes,
> 
> Tomáš 
> 
> 
> Tue, Dec 01, 2020 ve 02:45:18PM +0100 Otared Kavian napsal(a):
> # Hi everyone,
> # 
> # I have to typeset a few files which get each an input file named in a certain way. For instance, a file named « myfile.tex » in which another file named « myfile-buffer.tex » is used as an \input file, as in
> # 
> # % content of myfile.tex
> # %%%%%
> # \starttext
> # This is a test.
> # 
> # \input myfile-buffer.tex
> # \stoptext
> # %%%%%
> # 
> #  When typesetting « myfile.tex » I wonder whether it is possible to get the name of the file without its suffix, that is to get « myfile », with a command such as
> # \getNameOfCurrentFile
> # and then be able to replace the above snippet by:
> # 
> # % desired content of myfile.tex
> #  %%%%%
> # \starttext
> # This is a test.
> # 
> # \input \getNameOfCurrentFile-buffer.tex
> # \stoptext
> # %%%%%
> # 
> # Best regards and thanks for any hint: Otared K.
> # ___________________________________________________________________________________
> # 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
> # ___________________________________________________________________________________
> 
>                                         Tomáš Hála
> --------------------------------------------------------------------
> Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky
> Zemědělská 1, CZ-613 00 Brno,  tel. +420 545 13 22 28
> --------------------------------------------------------------------
> http://akela.mendelu.cz/~thala
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________

___________________________________________________________________________________
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 15:20 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 [this message]
2020-12-01 16:33     ` Henning Hraban Ramm
2020-12-01 17:10       ` Otared Kavian
2020-12-01 17:23         ` Wolfgang Schuster
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=5D3E1DDC-A961-4D79-9781-DC0756CE000B@gmail.com \
    --to=otared@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).